diff --git a/packages/@nitpicker/cli/src/commands/analyze.spec.ts b/packages/@nitpicker/cli/src/commands/analyze.spec.ts index b09260be..e52f8f94 100644 --- a/packages/@nitpicker/cli/src/commands/analyze.spec.ts +++ b/packages/@nitpicker/cli/src/commands/analyze.spec.ts @@ -118,7 +118,7 @@ describe('analyze command', () => { expect(consoleErrorSpy).toHaveBeenCalledWith('Error: No .nitpicker file specified.'); expect(consoleErrorSpy).toHaveBeenCalledWith( - 'Usage: nitpicker analyze [options]', + 'Usage: npx @nitpicker/cli analyze [options]', ); expect(exitSpy).toHaveBeenCalledWith(1); }); diff --git a/packages/@nitpicker/cli/src/commands/analyze.ts b/packages/@nitpicker/cli/src/commands/analyze.ts index 15f0d495..1648ff21 100644 --- a/packages/@nitpicker/cli/src/commands/analyze.ts +++ b/packages/@nitpicker/cli/src/commands/analyze.ts @@ -91,7 +91,7 @@ export async function analyze(args: string[], flags: AnalyzeFlags) { // eslint-disable-next-line no-console console.error('Error: No .nitpicker file specified.'); // eslint-disable-next-line no-console - console.error('Usage: nitpicker analyze [options]'); + console.error('Usage: npx @nitpicker/cli analyze [options]'); process.exit(1); } diff --git a/packages/@nitpicker/cli/src/commands/cache.ts b/packages/@nitpicker/cli/src/commands/cache.ts index 4f5efcd6..2709e90c 100644 --- a/packages/@nitpicker/cli/src/commands/cache.ts +++ b/packages/@nitpicker/cli/src/commands/cache.ts @@ -70,7 +70,7 @@ export async function cache(args: string[], flags: CacheFlags): Promise { ); // eslint-disable-next-line no-console console.error( - `Usage: nitpicker cache <${VALID_SUB_COMMANDS.join('|')}> [archive] [--json]`, + `Usage: npx @nitpicker/cli cache <${VALID_SUB_COMMANDS.join('|')}> [archive] [--json]`, ); process.exit(ExitCode.Fatal); } @@ -162,7 +162,7 @@ async function runClear( ? `Removed cache entry for ${absArchivePath}: ${cacheDir}` : `No cache entry matches the current content of ${absArchivePath} (nothing to clear here). ` + `Note: stale entries from a previous version of this file are not found by ` + - `content-addressed lookup — use 'nitpicker cache list' + 'nitpicker cache clear' ` + + `content-addressed lookup — use 'npx @nitpicker/cli cache list' + 'npx @nitpicker/cli cache clear' ` + `(no argument) to remove them.`, ); } catch (error) { diff --git a/packages/@nitpicker/cli/src/commands/pipeline.spec.ts b/packages/@nitpicker/cli/src/commands/pipeline.spec.ts index b1f13490..688edb4f 100644 --- a/packages/@nitpicker/cli/src/commands/pipeline.spec.ts +++ b/packages/@nitpicker/cli/src/commands/pipeline.spec.ts @@ -96,7 +96,7 @@ describe('pipeline command', () => { expect(consoleErrorSpy).toHaveBeenCalledWith('Error: No URL specified.'); expect(consoleErrorSpy).toHaveBeenCalledWith( - 'Usage: nitpicker pipeline [options]', + 'Usage: npx @nitpicker/cli pipeline [options]', ); expect(exitSpy).toHaveBeenCalledWith(ExitCode.Fatal); }); diff --git a/packages/@nitpicker/cli/src/commands/pipeline.ts b/packages/@nitpicker/cli/src/commands/pipeline.ts index efb813fb..9f6a0dff 100644 --- a/packages/@nitpicker/cli/src/commands/pipeline.ts +++ b/packages/@nitpicker/cli/src/commands/pipeline.ts @@ -209,7 +209,7 @@ export async function pipeline(args: string[], flags: PipelineFlags) { // eslint-disable-next-line no-console console.error('Error: No URL specified.'); // eslint-disable-next-line no-console - console.error('Usage: nitpicker pipeline [options]'); + console.error('Usage: npx @nitpicker/cli pipeline [options]'); process.exit(ExitCode.Fatal); } diff --git a/packages/@nitpicker/cli/src/commands/query.spec.ts b/packages/@nitpicker/cli/src/commands/query.spec.ts index 58393cdb..7f79b000 100644 --- a/packages/@nitpicker/cli/src/commands/query.spec.ts +++ b/packages/@nitpicker/cli/src/commands/query.spec.ts @@ -63,7 +63,7 @@ describe('query command', () => { expect(consoleErrorSpy).toHaveBeenCalledWith('Error: No .nitpicker file specified.'); expect(consoleErrorSpy).toHaveBeenCalledWith( - 'Usage: nitpicker query [options]', + 'Usage: npx @nitpicker/cli query [options]', ); expect(exitSpy).toHaveBeenCalledWith(1); }); diff --git a/packages/@nitpicker/cli/src/commands/query.ts b/packages/@nitpicker/cli/src/commands/query.ts index 4b3884b2..21ceec16 100644 --- a/packages/@nitpicker/cli/src/commands/query.ts +++ b/packages/@nitpicker/cli/src/commands/query.ts @@ -185,7 +185,7 @@ export async function query(args: string[], flags: QueryFlags) { // eslint-disable-next-line no-console console.error('Error: No .nitpicker file specified.'); // eslint-disable-next-line no-console - console.error('Usage: nitpicker query [options]'); + console.error('Usage: npx @nitpicker/cli query [options]'); process.exit(1); } diff --git a/packages/@nitpicker/cli/src/commands/report.spec.ts b/packages/@nitpicker/cli/src/commands/report.spec.ts index d5a1865e..fd0edb8a 100644 --- a/packages/@nitpicker/cli/src/commands/report.spec.ts +++ b/packages/@nitpicker/cli/src/commands/report.spec.ts @@ -183,7 +183,7 @@ describe('report command', () => { expect(consoleErrorSpy).toHaveBeenCalledWith('Error: No .nitpicker file specified.'); expect(consoleErrorSpy).toHaveBeenCalledWith( - 'Usage: nitpicker report [options]', + 'Usage: npx @nitpicker/cli report [options]', ); expect(exitSpy).toHaveBeenCalledWith(1); expect(runReport).not.toHaveBeenCalled(); diff --git a/packages/@nitpicker/cli/src/commands/report.ts b/packages/@nitpicker/cli/src/commands/report.ts index b5dca036..512b3072 100644 --- a/packages/@nitpicker/cli/src/commands/report.ts +++ b/packages/@nitpicker/cli/src/commands/report.ts @@ -84,7 +84,7 @@ export async function report(args: string[], flags: ReportFlags) { // eslint-disable-next-line no-console console.error('Error: No .nitpicker file specified.'); // eslint-disable-next-line no-console - console.error('Usage: nitpicker report [options]'); + console.error('Usage: npx @nitpicker/cli report [options]'); process.exit(1); } diff --git a/packages/@nitpicker/cli/src/commands/viewer-build.ts b/packages/@nitpicker/cli/src/commands/viewer-build.ts index 4a5baf6c..6319aa4e 100644 --- a/packages/@nitpicker/cli/src/commands/viewer-build.ts +++ b/packages/@nitpicker/cli/src/commands/viewer-build.ts @@ -95,7 +95,7 @@ export async function viewerBuild( // eslint-disable-next-line no-console console.error('Error: No .nitpicker file specified.'); // eslint-disable-next-line no-console - console.error('Usage: nitpicker viewer-build [--force]'); + console.error('Usage: npx @nitpicker/cli viewer-build [--force]'); process.exit(ExitCode.Fatal); } diff --git a/packages/@nitpicker/cli/src/commands/viewer.ts b/packages/@nitpicker/cli/src/commands/viewer.ts index 66ef924a..eabe091c 100644 --- a/packages/@nitpicker/cli/src/commands/viewer.ts +++ b/packages/@nitpicker/cli/src/commands/viewer.ts @@ -54,7 +54,7 @@ export async function viewer(args: string[], flags: ViewerFlags) { 'Error: No source specified. Pass a .nitpicker file or a crawl stub directory.', ); // eslint-disable-next-line no-console - console.error('Usage: nitpicker viewer [options]'); + console.error('Usage: npx @nitpicker/cli viewer [options]'); process.exit(ExitCode.Fatal); } diff --git a/packages/@nitpicker/viewer/e2e/template-clusters-classified.spec.ts b/packages/@nitpicker/viewer/e2e/template-clusters-classified.spec.ts index 24584211..11a0f8a9 100644 --- a/packages/@nitpicker/viewer/e2e/template-clusters-classified.spec.ts +++ b/packages/@nitpicker/viewer/e2e/template-clusters-classified.spec.ts @@ -120,7 +120,7 @@ test.describe('Nitpicker Viewer template clusters (classified fixture)', () => { 'No cluster-selection evidence was captured for this cluster.', ); await expect(sectionsCluster).toContainText( - 'nitpicker analyze --templates', + 'npx @nitpicker/cli analyze --templates', ); }); }); diff --git a/packages/@nitpicker/viewer/e2e/template-clusters.spec.ts b/packages/@nitpicker/viewer/e2e/template-clusters.spec.ts index 11e357f6..1b9f6235 100644 --- a/packages/@nitpicker/viewer/e2e/template-clusters.spec.ts +++ b/packages/@nitpicker/viewer/e2e/template-clusters.spec.ts @@ -17,7 +17,7 @@ test.describe('Nitpicker Viewer template clusters (unclassified fixture)', () => page.getByRole('heading', { name: 'Template Clusters', level: 1 }), ).toBeVisible(); await expect(page.locator('.state code')).toHaveText( - 'nitpicker analyze --templates', + 'npx @nitpicker/cli analyze --templates', ); await expect(page.locator('details')).toHaveCount(0); }); diff --git a/packages/@nitpicker/viewer/e2e/viewer-stub.spec.ts b/packages/@nitpicker/viewer/e2e/viewer-stub.spec.ts index e2df26e0..975f5610 100644 --- a/packages/@nitpicker/viewer/e2e/viewer-stub.spec.ts +++ b/packages/@nitpicker/viewer/e2e/viewer-stub.spec.ts @@ -78,7 +78,7 @@ test.describe('Nitpicker Viewer (stub mode)', () => { ).toBeVisible(); await expect( page.getByText( - 'No directory data available. Run `nitpicker viewer-build` to generate it.', + 'No directory data available. Run `npx @nitpicker/cli viewer-build` to generate it.', ), ).toBeVisible(); }); diff --git a/packages/@nitpicker/viewer/src/routes/register-duplicates-route.ts b/packages/@nitpicker/viewer/src/routes/register-duplicates-route.ts index 0f43478e..8834e7b8 100644 --- a/packages/@nitpicker/viewer/src/routes/register-duplicates-route.ts +++ b/packages/@nitpicker/viewer/src/routes/register-duplicates-route.ts @@ -96,7 +96,7 @@ export function registerDuplicatesRoute(app: Hono, context: ArchiveContext): voi return c.json( { error: - 'Duplicate-group member pages require the viewer read model, which is not built or is stale for this archive. Rebuild it with `nitpicker viewer-build`.', + 'Duplicate-group member pages require the viewer read model, which is not built or is stale for this archive. Rebuild it with `npx @nitpicker/cli viewer-build`.', }, 404, ); diff --git a/packages/@nitpicker/viewer/src/start-viewer.ts b/packages/@nitpicker/viewer/src/start-viewer.ts index 8e09c2d9..db2b124a 100644 --- a/packages/@nitpicker/viewer/src/start-viewer.ts +++ b/packages/@nitpicker/viewer/src/start-viewer.ts @@ -60,7 +60,7 @@ export async function startViewer(options: ViewerOptions): Promise { "\n ⚠ This archive's viewer read model is missing or stale.\n" + ' Pages/resources/links/images and similar list views will\n' + ' respond with "read model required" until you rebuild it:\n\n' + - ` nitpicker viewer-build ${filePath}\n`, + ` npx @nitpicker/cli viewer-build ${filePath}\n`, ); } } diff --git a/packages/@nitpicker/viewer/web/api/api-client.ts b/packages/@nitpicker/viewer/web/api/api-client.ts index a3802514..40b0f23a 100644 --- a/packages/@nitpicker/viewer/web/api/api-client.ts +++ b/packages/@nitpicker/viewer/web/api/api-client.ts @@ -60,8 +60,8 @@ export async function apiGet( ) { throw new Error( "This view requires the archive's viewer read model, which is missing or stale. " + - 'Run `nitpicker viewer-build ` once, then restart the viewer. ' + - 'このビューにはviewer read modelが必要です。`nitpicker viewer-build ` を実行してからviewerを再起動してください。', + 'Run `npx @nitpicker/cli viewer-build ` once, then restart the viewer. ' + + 'このビューにはviewer read modelが必要です。`npx @nitpicker/cli viewer-build ` を実行してからviewerを再起動してください。', ); } return payload; diff --git a/packages/@nitpicker/viewer/web/i18n/translations.ts b/packages/@nitpicker/viewer/web/i18n/translations.ts index ef0288cb..dcb68823 100644 --- a/packages/@nitpicker/viewer/web/i18n/translations.ts +++ b/packages/@nitpicker/viewer/web/i18n/translations.ts @@ -17,7 +17,7 @@ export const translations: Record> = { 'A crawler process is currently writing this directory. The view is a snapshot taken when the viewer started; the underlying data is still moving.', interruptedCrawlBadge: 'Interrupted crawl stub', interruptedCrawlBadgeTitle: - 'This is a stub directory left behind by a stopped crawl. Read-only — you can resume the crawl with `nitpicker crawl --resume`.', + 'This is a stub directory left behind by a stopped crawl. Read-only — you can resume the crawl with `npx @nitpicker/cli crawl --resume`.', }, nav: { summary: 'Summary', @@ -183,7 +183,7 @@ export const translations: Record> = { expandNode: 'Expand {name}', collapseNode: 'Collapse {name}', noRoots: - 'No directory data available. Run `nitpicker viewer-build` to generate it.', + 'No directory data available. Run `npx @nitpicker/cli viewer-build` to generate it.', collapseDepthInputLabel: 'Depth', collapseToDepth: 'Collapse to depth', sortOrderLabel: 'Sort order', @@ -387,7 +387,7 @@ export const translations: Record> = { 'Every DOM-structure template cluster found by `--templates`, with the top directories by page count and common stylesheet set computed from its member pages — the raw template key is an opaque blocking key and is not human-readable on its own.', notClassified: 'This archive has no DOM-structure template classification yet. Run the following, then re-open the viewer:', - notClassifiedCommandHint: 'nitpicker analyze --templates', + notClassifiedCommandHint: 'npx @nitpicker/cli analyze --templates', noClusters: 'No template clusters found.', pageCount: '{count} pages', commonDirectories: 'Top directories', @@ -415,7 +415,7 @@ export const translations: Record> = { siblingsCaveat: 'Clusters that split off from the same blocking group as this one.', noReason: 'No cluster-selection evidence was captured for this cluster.', - noReasonCommandHint: 'nitpicker analyze --templates', + noReasonCommandHint: 'npx @nitpicker/cli analyze --templates', }, consoleLogs: { title: 'Console Logs', @@ -456,7 +456,7 @@ export const translations: Record> = { 'クロールプロセスがこのディレクトリに書き込み中です。表示は viewer 起動時点のスナップショットで、実データは更新され続けています。', interruptedCrawlBadge: '中断クロールのスタブ', interruptedCrawlBadgeTitle: - '停止されたクロールのスタブディレクトリです。読み取り専用 — `nitpicker crawl --resume` で再開できます。', + '停止されたクロールのスタブディレクトリです。読み取り専用 — `npx @nitpicker/cli crawl --resume` で再開できます。', }, nav: { summary: 'サマリー', @@ -622,7 +622,7 @@ export const translations: Record> = { expandNode: '{name} を展開', collapseNode: '{name} を折りたたむ', noRoots: - 'ディレクトリデータがありません。`nitpicker viewer-build` を実行して生成してください。', + 'ディレクトリデータがありません。`npx @nitpicker/cli viewer-build` を実行して生成してください。', collapseDepthInputLabel: '階層数', collapseToDepth: '階層まで全て閉じる', sortOrderLabel: '並び順', @@ -826,7 +826,7 @@ export const translations: Record> = { '`--templates` で検出したDOM構造テンプレートクラスタの一覧。各クラスタの所属ページ数が多いディレクトリ上位と共通CSSファイルを算出して表示します — 生のテンプレートキーはブロッキング用の内部識別子で、それ自体は人間には読めません。', notClassified: 'このアーカイブはまだテンプレート分類を実行していません。以下を実行してからビューアを再度開いてください:', - notClassifiedCommandHint: 'nitpicker analyze --templates', + notClassifiedCommandHint: 'npx @nitpicker/cli analyze --templates', noClusters: 'テンプレートクラスタが見つかりません。', pageCount: '{count} ページ', commonDirectories: '主要ディレクトリ', @@ -853,7 +853,7 @@ export const translations: Record> = { siblings: '兄弟クラスタ', siblingsCaveat: '同じブロッキンググループから分岐したクラスタ。', noReason: 'このクラスタのクラスタ選定理由は保存されていません。', - noReasonCommandHint: 'nitpicker analyze --templates', + noReasonCommandHint: 'npx @nitpicker/cli analyze --templates', }, consoleLogs: { title: 'コンソールログ',