Skip to content

Commit 9bee88b

Browse files
committed
docs: JSDocコメントを実装と一致するよう修正
- pipeline.ts: process.exit(1)ではなく例外伝搬である旨に修正 - crawl.ts: CrawlAggregateErrorコンストラクタに@paramタグ追加 - database.ts: getJSON関数に@templateタグ追加 https://claude.ai/code/session_01Gz7eS3SnV1N6LakV8b7CxM
1 parent f68ac54 commit 9bee88b

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

packages/@nitpicker/cli/src/commands/crawl.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,9 @@ export async function crawl(args: string[], flags: CrawlFlags) {
332332
export class CrawlAggregateError extends Error {
333333
/** The individual errors that occurred during crawling. */
334334
readonly errors: readonly (CrawlerError | Error)[];
335+
/**
336+
* @param errors - The individual errors collected during the crawl session.
337+
*/
335338
constructor(errors: (CrawlerError | Error)[]) {
336339
super(`Crawl completed with ${errors.length} error(s).`);
337340
this.errors = errors;

packages/@nitpicker/cli/src/commands/pipeline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ type PipelineFlags = InferFlags<typeof commandDef.flags>;
178178
* to the analyze step. If `--sheet` is provided, the report step runs
179179
* last to publish results to Google Sheets.
180180
*
181-
* Each step's errors cause `process.exit(1)`, halting the pipeline.
181+
* Errors from any step propagate to the caller as exceptions.
182182
* @param args - Positional arguments; first argument is the root URL to crawl.
183183
* @param flags - Parsed CLI flags from the `pipeline` command.
184184
* @returns Resolves when all pipeline steps complete.

packages/@nitpicker/crawler/src/archive/database.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,7 @@ function redirectTable(includeNull = true) {
10211021
* Safely parses a JSON string, returning a fallback value if parsing fails or the input is not a string.
10221022
* Logs a warning via {@link dbLog} when invalid JSON is detected, including a truncated preview
10231023
* of the data and the parse error message.
1024+
* @template T The expected type of the parsed JSON value and the fallback.
10241025
* @param data - The data to parse. Only string values are parsed; other types return the fallback.
10251026
* @param fallback - The value to return if parsing fails or the result is falsy.
10261027
* @returns The parsed JSON value, or the fallback.

0 commit comments

Comments
 (0)