@gpc-cli/cli 0.9.81 → 0.9.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +1 -1
  2. package/dist/bin.js +2 -2
  3. package/dist/{changelog-STYBBYDC.js → changelog-4F6SYF2T.js} +4 -3
  4. package/dist/changelog-4F6SYF2T.js.map +1 -0
  5. package/dist/{chunk-LKI2MVT4.js → chunk-45UKFQMC.js} +15 -15
  6. package/dist/{config-3GHC45S5.js → config-URSFMVMI.js} +2 -2
  7. package/dist/{docs-OU6LSSJD.js → docs-ADZRT76Y.js} +10 -6
  8. package/dist/docs-ADZRT76Y.js.map +1 -0
  9. package/dist/{doctor-AO52FMY4.js → doctor-H3S574SE.js} +4 -4
  10. package/dist/{doctor-AO52FMY4.js.map → doctor-H3S574SE.js.map} +1 -1
  11. package/dist/{external-transactions-IIF2TSH6.js → external-transactions-GFMGHOW2.js} +1 -1
  12. package/dist/external-transactions-GFMGHOW2.js.map +1 -0
  13. package/dist/{feedback-OT4VK7B6.js → feedback-BVXS2Y4C.js} +2 -2
  14. package/dist/generated/docs-bundle.json +1 -1
  15. package/dist/{iap-S5X4O7XF.js → iap-XAZUUGFI.js} +1 -1
  16. package/dist/iap-XAZUUGFI.js.map +1 -0
  17. package/dist/index.js +1 -1
  18. package/dist/{one-time-products-YSX5VI6I.js → one-time-products-ETPRFVOB.js} +1 -1
  19. package/dist/one-time-products-ETPRFVOB.js.map +1 -0
  20. package/dist/{releases-IH2ZK3BB.js → releases-UWIOZN4Y.js} +7 -4
  21. package/dist/releases-UWIOZN4Y.js.map +1 -0
  22. package/dist/{subscriptions-FR6GCMPC.js → subscriptions-TED4SY7A.js} +1 -1
  23. package/dist/subscriptions-TED4SY7A.js.map +1 -0
  24. package/dist/{system-apks-ZKVZLJPY.js → system-apks-MLI34HAM.js} +1 -1
  25. package/dist/system-apks-MLI34HAM.js.map +1 -0
  26. package/dist/{update-TXLKZ6JD.js → update-Q4DRERBG.js} +2 -2
  27. package/dist/{version-BHRQPXO6.js → version-QAXDOIOK.js} +2 -2
  28. package/package.json +1 -1
  29. package/dist/changelog-STYBBYDC.js.map +0 -1
  30. package/dist/docs-OU6LSSJD.js.map +0 -1
  31. package/dist/external-transactions-IIF2TSH6.js.map +0 -1
  32. package/dist/iap-S5X4O7XF.js.map +0 -1
  33. package/dist/one-time-products-YSX5VI6I.js.map +0 -1
  34. package/dist/releases-IH2ZK3BB.js.map +0 -1
  35. package/dist/subscriptions-FR6GCMPC.js.map +0 -1
  36. package/dist/system-apks-ZKVZLJPY.js.map +0 -1
  37. /package/dist/{chunk-LKI2MVT4.js.map → chunk-45UKFQMC.js.map} +0 -0
  38. /package/dist/{config-3GHC45S5.js.map → config-URSFMVMI.js.map} +0 -0
  39. /package/dist/{feedback-OT4VK7B6.js.map → feedback-BVXS2Y4C.js.map} +0 -0
  40. /package/dist/{update-TXLKZ6JD.js.map → update-Q4DRERBG.js.map} +0 -0
  41. /package/dist/{version-BHRQPXO6.js.map → version-QAXDOIOK.js.map} +0 -0
package/README.md CHANGED
@@ -97,7 +97,7 @@ curl -fsSL https://raw.githubusercontent.com/yasserstudio/gpc/main/scripts/insta
97
97
  - [Commands reference](https://yasserstudio.github.io/gpc/commands/)
98
98
  - [CI/CD recipes](https://yasserstudio.github.io/gpc/ci-cd/)
99
99
 
100
- Free to use. 2,332 tests. 90%+ coverage. Every write operation supports `--dry-run`.
100
+ Free to use. 2,345 tests. 90%+ coverage. Every write operation supports `--dry-run`.
101
101
 
102
102
  ## Licensing
103
103
 
package/dist/bin.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  createProgram,
4
4
  handleCliError,
5
5
  loadPlugins
6
- } from "./chunk-LKI2MVT4.js";
6
+ } from "./chunk-45UKFQMC.js";
7
7
  import {
8
8
  checkForUpdate,
9
9
  formatUpdateNotification
@@ -57,7 +57,7 @@ if (!_isJsonMode && !_isQuiet && !_isSetupCommand && !existsSync(getUserConfigPa
57
57
  }
58
58
  await setupNetworking();
59
59
  initAudit(getConfigDir());
60
- var currentVersion = "0.9.81";
60
+ var currentVersion = "0.9.82";
61
61
  var isUpdateCommand = process.argv[2] === "update";
62
62
  var isCompletionProvider = process.argv[2] === "__complete";
63
63
  var updateCheckPromise = isUpdateCommand || isCompletionProvider ? Promise.resolve(null) : checkForUpdate(currentVersion);
@@ -89,7 +89,8 @@ function registerChangelogCommand(program) {
89
89
  return;
90
90
  }
91
91
  if (opts.tag || entries.length === 1) {
92
- console.log(formatChangelogEntry(entries[0]));
92
+ const entry = entries[0];
93
+ if (entry) console.log(formatChangelogEntry(entry));
93
94
  return;
94
95
  }
95
96
  const header = "VERSION DATE TITLE";
@@ -211,7 +212,7 @@ function registerChangelogCommand(program) {
211
212
  const client = await getClient(config);
212
213
  locales = await resolveLocales("auto", { client, packageName });
213
214
  } else {
214
- locales = await resolveLocales(opts.locales);
215
+ locales = await resolveLocales(opts.locales ?? "");
215
216
  }
216
217
  } catch (error) {
217
218
  if (error instanceof GpcError) {
@@ -368,4 +369,4 @@ function registerChangelogCommand(program) {
368
369
  export {
369
370
  registerChangelogCommand
370
371
  };
371
- //# sourceMappingURL=changelog-STYBBYDC.js.map
372
+ //# sourceMappingURL=changelog-4F6SYF2T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/changelog.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport {\n fetchChangelog,\n formatChangelogEntry,\n formatOutput,\n generateChangelog,\n RENDERERS,\n renderPlayStore,\n renderPlayStoreMd,\n renderPlayStorePrompt,\n buildLocaleBundle,\n translateBundle,\n resolveAiConfig,\n createTranslator,\n fetchAggregateCost,\n formatPathLabel,\n PROVIDER_WHITELIST,\n resolveLocales,\n validateBundleForApply,\n bundleToReleaseNotes,\n applyReleaseNotes,\n GpcError,\n type OutputMode,\n type PlayStoreFormat,\n} from \"@gpc-cli/core\";\nimport { loadConfig } from \"@gpc-cli/config\";\nimport { getOutputFormat } from \"../format.js\";\nimport { yellow, dim } from \"../colors.js\";\nimport { resolvePackageName, getClient } from \"../resolve.js\";\n\nconst VALID_OUTPUT_MODES: OutputMode[] = [\"md\", \"json\", \"prompt\"];\nconst VALID_TARGETS = [\"github\", \"play-store\"] as const;\ntype ChangelogTarget = (typeof VALID_TARGETS)[number];\nconst REPO_RE = /^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/;\n\ninterface ApplyContext {\n bundle: Parameters<typeof validateBundleForApply>[0];\n program: Command;\n track: string;\n dryRun: boolean;\n aiBlock?: Record<string, unknown>;\n}\n\nasync function performApply(ctx: ApplyContext): Promise<boolean> {\n const blocked = validateBundleForApply(ctx.bundle);\n if (blocked.length > 0) {\n process.stderr.write(\n `Cannot --apply: ${blocked.length} locale(s) blocked:\\n` +\n blocked.map((b) => ` ${b}`).join(\"\\n\") +\n \"\\n\",\n );\n process.exitCode = 1;\n return false;\n }\n const notes = bundleToReleaseNotes(ctx.bundle);\n const config = await loadConfig();\n const packageName = resolvePackageName(ctx.program.opts()[\"app\"], config);\n if (ctx.dryRun) {\n const payload: Record<string, unknown> = {\n dryRun: true,\n action: \"apply release notes\",\n track: ctx.track,\n packageName,\n localeCount: notes.length,\n releaseNotes: notes,\n };\n if (ctx.aiBlock) payload[\"ai\"] = ctx.aiBlock;\n console.log(JSON.stringify(payload, null, 2));\n return false;\n }\n const client = await getClient(config);\n const result = await applyReleaseNotes(client, packageName, ctx.track, notes);\n process.stderr.write(\n `${dim(`→ Applied ${result.localeCount} locale(s) to draft on ${result.track} (${packageName})`)}\\n`,\n );\n return true;\n}\n\nexport function registerChangelogCommand(program: Command): void {\n const changelog = program\n .command(\"changelog\")\n .description(\"Show release history\")\n .option(\"-n, --limit <count>\", \"Number of releases to show\", parseInt, 5)\n .option(\"--tag <tag>\", \"Show a specific release (e.g., v0.9.43)\")\n .option(\"--all\", \"Show all releases\")\n .action(async (opts: { limit: number; tag?: string; all?: boolean }) => {\n const config = await loadConfig();\n const format = getOutputFormat(program, config);\n\n const entries = await fetchChangelog({\n limit: opts.all ? 100 : opts.limit,\n version: opts.tag,\n });\n\n if (entries.length === 0) {\n console.log(\"No releases found.\");\n return;\n }\n\n if (format === \"json\") {\n console.log(formatOutput(entries, \"json\"));\n return;\n }\n\n if (opts.tag || entries.length === 1) {\n const entry = entries[0];\n if (entry) console.log(formatChangelogEntry(entry));\n return;\n }\n\n const header = \"VERSION DATE TITLE\";\n const separator = \"─\".repeat(header.length);\n console.log(header);\n console.log(separator);\n for (const entry of entries) {\n const version = entry.version.padEnd(12);\n const date = entry.date.padEnd(12);\n console.log(`${version} ${date} ${entry.title}`);\n }\n console.log(\"\");\n console.log(\n `Showing ${entries.length} releases. Use --tag <tag> for details, or --all for full history.`,\n );\n });\n\n changelog\n .command(\"generate\")\n .description(\"Generate release notes from local git commits\")\n .option(\"--from <ref>\", \"Starting ref (default: latest v* tag)\")\n .option(\"--to <ref>\", \"Ending ref (default: HEAD)\")\n .option(\"--format <mode>\", \"Renderer: md, json, or prompt\", \"md\")\n .option(\"--repo <owner/name>\", \"Override auto-detected repo (e.g., yasserstudio/gpc)\")\n .option(\"--target <mode>\", \"Output target: github or play-store\", \"github\")\n .option(\n \"--locales <csv|auto>\",\n \"Comma-separated BCP 47 locales, or 'auto' (play-store target only)\",\n )\n .option(\"--ai\", \"Translate non-source locales via LLM (play-store target only, BYO key)\")\n .option(\n \"--provider <name>\",\n `AI provider (${PROVIDER_WHITELIST.join(\"|\")}). Defaults to first env key detected`,\n )\n .option(\"--model <id>\", \"Override default model for the chosen provider\")\n .option(\"--strict\", \"Exit non-zero if warnings, overflows, or translation failures occur\")\n .option(\"--apply\", \"Write notes into the draft release on --track (play-store target only)\")\n .option(\"--track <name>\", \"Play Store track for --apply (default: production)\", \"production\")\n .action(\n async (opts: {\n from?: string;\n to?: string;\n format: string;\n repo?: string;\n target: string;\n locales?: string;\n strict?: boolean;\n ai?: boolean;\n provider?: string;\n model?: string;\n apply?: boolean;\n track: string;\n }) => {\n const dryRun = !!program.opts()[\"dryRun\"];\n const mode = opts.format as OutputMode;\n if (!VALID_OUTPUT_MODES.includes(mode)) {\n process.stderr.write(\n `Invalid --format \"${opts.format}\". Valid: ${VALID_OUTPUT_MODES.join(\", \")}\\n`,\n );\n process.exitCode = 2;\n return;\n }\n if (!VALID_TARGETS.includes(opts.target as ChangelogTarget)) {\n process.stderr.write(\n `Invalid --target \"${opts.target}\". Valid: ${VALID_TARGETS.join(\", \")}\\n`,\n );\n process.exitCode = 2;\n return;\n }\n const target = opts.target as ChangelogTarget;\n if (opts.repo && !REPO_RE.test(opts.repo)) {\n process.stderr.write(\n `Invalid --repo \"${opts.repo}\". Expected \"owner/name\" (e.g., yasserstudio/gpc).\\n`,\n );\n process.exitCode = 2;\n return;\n }\n if (target === \"github\" && opts.locales) {\n process.stderr.write(\n `--locales only applies to --target play-store (current target: github)\\n`,\n );\n process.exitCode = 2;\n return;\n }\n // Only block when the AI-adjacent flags are explicitly set. The root\n // program has its own `--dry-run` flag that may already be set\n // globally by the user for unrelated reasons; we silently ignore it\n // on non-AI code paths.\n if (target === \"github\" && (opts.ai || opts.provider || opts.model)) {\n process.stderr.write(\"--ai / --provider / --model only apply to --target play-store\\n\");\n process.exitCode = 2;\n return;\n }\n // --format prompt + --ai is nonsensical outside --dry-run: it would\n // render a \"please translate this\" prompt from already-translated\n // text. Either inspect the prompt via --dry-run, or pick md/json.\n if (opts.ai && opts.format === \"prompt\" && !dryRun) {\n process.stderr.write(\n \"--ai with --format prompt only makes sense with --dry-run\\n\" +\n \" (otherwise it would re-wrap translated text in a translation prompt).\\n\" +\n \" Hint: use --format md or --format json for live translation, or add --dry-run to inspect the prompt.\\n\",\n );\n process.exitCode = 2;\n return;\n }\n if (opts.apply && target !== \"play-store\") {\n process.stderr.write(\"--apply only applies to --target play-store\\n\");\n process.exitCode = 2;\n return;\n }\n if (opts.apply && mode === \"prompt\") {\n process.stderr.write(\n \"--apply cannot be combined with --format prompt\\n\" +\n \" Hint: use --format md or --format json.\\n\",\n );\n process.exitCode = 2;\n return;\n }\n if (target === \"play-store\" && !opts.locales) {\n process.stderr.write(\n \"--target play-store requires --locales <csv|auto>\\n\" +\n \" Example: --locales en-US,fr-FR,de-DE\\n\" +\n \" Example: --locales auto (reads current Play Store listing — requires --app)\\n\",\n );\n process.exitCode = 2;\n return;\n }\n\n const generated = await generateChangelog({\n from: opts.from,\n to: opts.to,\n repo: opts.repo,\n });\n\n for (const w of generated.warnings) {\n process.stderr.write(`${yellow(\"warn:\")} ${w}\\n`);\n }\n if (generated.warnings.length > 0) {\n process.stderr.write(\n `${dim(`(${generated.warnings.length} warning${generated.warnings.length === 1 ? \"\" : \"s\"} — review before publishing)`)}\\n`,\n );\n }\n\n if (target === \"github\") {\n const output = RENDERERS[mode](generated);\n console.log(output);\n if (opts.strict && generated.warnings.length > 0) {\n process.exitCode = 1;\n }\n return;\n }\n\n // target === \"play-store\"\n let locales: string[];\n try {\n if (opts.locales === \"auto\") {\n const config = await loadConfig();\n const packageName = resolvePackageName(program.opts()[\"app\"], config);\n const client = await getClient(config);\n locales = await resolveLocales(\"auto\", { client, packageName });\n } else {\n locales = await resolveLocales(opts.locales ?? \"\");\n }\n } catch (error) {\n if (error instanceof GpcError) {\n process.stderr.write(`${error.message}\\n`);\n if (error.suggestion) process.stderr.write(`${dim(error.suggestion)}\\n`);\n process.exitCode = error.exitCode;\n return;\n }\n throw error;\n }\n\n const playStoreFormat = mode as PlayStoreFormat;\n\n // Non-AI path: existing v0.9.62 behavior\n if (!opts.ai) {\n const { output, bundle } = renderPlayStore(generated, {\n locales,\n format: playStoreFormat,\n });\n console.log(output);\n\n for (const lang of bundle.overflows) {\n process.stderr.write(\n `${yellow(\"warn:\")} ${lang} exceeds ${bundle.limit} chars (truncated)\\n`,\n );\n }\n\n if (opts.apply) {\n const ok = await performApply({ bundle, program, track: opts.track, dryRun });\n if (!ok) return;\n }\n\n const hasOverflow = bundle.overflows.length > 0;\n const hasWarnings = generated.warnings.length > 0;\n if (opts.strict && (hasWarnings || hasOverflow)) {\n process.exitCode = 1;\n }\n return;\n }\n\n // --ai path: resolve config, translate, render with ai block\n let aiConfig;\n try {\n aiConfig = resolveAiConfig({ provider: opts.provider, model: opts.model });\n } catch (error) {\n if (error instanceof GpcError) {\n process.stderr.write(`${error.message}\\n`);\n if (error.suggestion) process.stderr.write(`${dim(error.suggestion)}\\n`);\n process.exitCode = error.exitCode;\n return;\n }\n throw error;\n }\n\n process.stderr.write(`${dim(`→ ${formatPathLabel(aiConfig)}`)}\\n`);\n\n const baseBundle = buildLocaleBundle(generated, {\n locales,\n format: playStoreFormat,\n });\n\n if (dryRun) {\n const preview = renderPlayStorePrompt(baseBundle, generated);\n console.log(preview);\n process.stderr.write(\n `${dim(\"(--dry-run: no API call was made; the prompt above is what would be sent per locale)\")}\\n`,\n );\n return;\n }\n\n const translator = await createTranslator(aiConfig);\n let translated;\n try {\n translated = await translateBundle(baseBundle, {\n translator,\n strict: opts.strict,\n onError: ({ language, reason }) => {\n process.stderr.write(\n `${yellow(\"warn:\")} ${language} translation failed: ${reason}\\n`,\n );\n },\n });\n } catch (error) {\n if (error instanceof GpcError) {\n process.stderr.write(`${error.message}\\n`);\n if (error.suggestion) process.stderr.write(`${dim(error.suggestion)}\\n`);\n process.exitCode = error.exitCode;\n return;\n }\n throw error;\n }\n\n const costUsd =\n aiConfig.path === \"gateway\" ? await fetchAggregateCost(aiConfig.runId) : undefined;\n\n const aiBlock: Record<string, unknown> = {\n path: aiConfig.path,\n provider: aiConfig.provider,\n model: aiConfig.model,\n tokensIn: translated.tokensIn,\n tokensOut: translated.tokensOut,\n };\n if (aiConfig.path === \"gateway\") {\n aiBlock[\"runId\"] = aiConfig.runId;\n if (typeof costUsd === \"number\") aiBlock[\"costUsd\"] = costUsd;\n }\n\n if (playStoreFormat === \"json\") {\n const payload = {\n from: translated.from,\n to: translated.to,\n limit: translated.limit,\n sourceLanguage: translated.sourceLanguage,\n ai: aiBlock,\n locales: translated.locales,\n overflows: translated.overflows,\n failures: translated.failures,\n };\n console.log(JSON.stringify(payload, null, 2));\n } else if (playStoreFormat === \"prompt\") {\n console.log(renderPlayStorePrompt(translated, generated));\n } else {\n console.log(renderPlayStoreMd(translated));\n }\n\n for (const lang of translated.overflows) {\n process.stderr.write(\n `${yellow(\"warn:\")} ${lang} exceeds ${translated.limit} chars (truncated)\\n`,\n );\n }\n\n if (translated.failures.length > 0) {\n process.stderr.write(\n `${dim(`(${translated.failures.length} locale${translated.failures.length === 1 ? \"\" : \"s\"} failed — see placeholders in output)`)}\\n`,\n );\n }\n\n if (typeof costUsd === \"number\") {\n process.stderr.write(`${dim(`(run cost: $${costUsd.toFixed(4)})`)}\\n`);\n }\n\n if (opts.apply) {\n const ok = await performApply({\n bundle: translated,\n program,\n track: opts.track,\n dryRun,\n aiBlock,\n });\n if (!ok) return;\n }\n\n const hasOverflow = translated.overflows.length > 0;\n const hasWarnings = generated.warnings.length > 0;\n const hasFailures = translated.failures.length > 0;\n if (opts.strict && (hasWarnings || hasOverflow || hasFailures)) {\n process.exitCode = 1;\n }\n },\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,kBAAkB;AAK3B,IAAM,qBAAmC,CAAC,MAAM,QAAQ,QAAQ;AAChE,IAAM,gBAAgB,CAAC,UAAU,YAAY;AAE7C,IAAM,UAAU;AAUhB,eAAe,aAAa,KAAqC;AAC/D,QAAM,UAAU,uBAAuB,IAAI,MAAM;AACjD,MAAI,QAAQ,SAAS,GAAG;AACtB,YAAQ,OAAO;AAAA,MACb,mBAAmB,QAAQ,MAAM;AAAA,I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;AAAA,UACtB,UAAU,WAAW;AAAA,QACvB;AACA,gBAAQ,IAAI,KAAK,UAAU,SAAS,MAAM,CAAC,CAAC;AAAA,MAC9C,WAAW,oBAAoB,UAAU;AACvC,gBAAQ,IAAI,sBAAsB,YAAY,SAAS,CAAC;AAAA,MAC1D,OAAO;AACL,gBAAQ,IAAI,kBAAkB,UAAU,CAAC;AAAA,MAC3C;AAEA,iBAAW,QAAQ,WAAW,WAAW;AACvC,gBAAQ,OAAO;AAAA,UACb,GAAG,OAAO,OAAO,CAAC,IAAI,IAAI,YAAY,WAAW,KAAK;AAAA;AAAA,QACxD;AAAA,MACF;AAEA,UAAI,WAAW,SAAS,SAAS,GAAG;AAClC,gBAAQ,OAAO;AAAA,UACb,GAAG,IAAI,IAAI,WAAW,SAAS,MAAM,UAAU,WAAW,SAAS,WAAW,IAAI,KAAK,GAAG,4CAAuC,CAAC;AAAA;AAAA,QACpI;AAAA,MACF;AAEA,UAAI,OAAO,YAAY,UAAU;AAC/B,gBAAQ,OAAO,MAAM,GAAG,IAAI,eAAe,QAAQ,QAAQ,CAAC,CAAC,GAAG,CAAC;AAAA,CAAI;AAAA,MACvE;AAEA,UAAI,KAAK,OAAO;AACd,cAAM,KAAK,MAAM,aAAa;AAAA,UAC5B,QAAQ;AAAA,UACR;AAAA,UACA,OAAO,KAAK;AAAA,UACZ;AAAA,UACA;AAAA,QACF,CAAC;AACD,YAAI,CAAC,GAAI;AAAA,MACX;AAEA,YAAM,cAAc,WAAW,UAAU,SAAS;AAClD,YAAM,cAAc,UAAU,SAAS,SAAS;AAChD,YAAM,cAAc,WAAW,SAAS,SAAS;AACjD,UAAI,KAAK,WAAW,eAAe,eAAe,cAAc;AAC9D,gBAAQ,WAAW;AAAA,MACrB;AAAA,IACF;AAAA,EACF;AACJ;","names":["hasOverflow","hasWarnings"]}
@@ -59,25 +59,25 @@ function registerPluginCommands(program, manager) {
59
59
  import { Command } from "commander";
60
60
  async function createProgram(pluginManager) {
61
61
  const program = new Command();
62
- program.name("gpc").description("GPC \u2014 Google Play Console CLI").version("0.9.81", "-V, --version").option("-o, --output <format>", "Output format: table, json, yaml, markdown, csv, tsv, junit").option("-v, --verbose", "Enable debug logging").option("-q, --quiet", "Suppress non-essential output").option("-a, --app <package>", "App package name").option("-p, --profile <name>", "Auth profile name").option("--no-color", "Disable colored output").option("--no-interactive", "Disable interactive prompts").option("-y, --yes", "Skip confirmation prompts").option("--dry-run", "Preview changes without executing").option("--notify [target]", "Send webhook notification on completion (slack, discord, custom)").option("--ci", "Force CI mode (JSON output, no prompts, strict exit codes)").option("-j, --json", "Shorthand for --output json").option("--apps <csv>", "Comma-separated package names for multi-app operations").showSuggestionAfterError(false);
62
+ program.name("gpc").description("GPC \u2014 Google Play Console CLI").version("0.9.82", "-V, --version").option("-o, --output <format>", "Output format: table, json, yaml, markdown, csv, tsv, junit").option("-v, --verbose", "Enable debug logging").option("-q, --quiet", "Suppress non-essential output").option("-a, --app <package>", "App package name").option("-p, --profile <name>", "Auth profile name").option("--no-color", "Disable colored output").option("--no-interactive", "Disable interactive prompts").option("-y, --yes", "Skip confirmation prompts").option("--dry-run", "Preview changes without executing").option("--notify [target]", "Send webhook notification on completion (slack, discord, custom)").option("--ci", "Force CI mode (JSON output, no prompts, strict exit codes)").option("-j, --json", "Shorthand for --output json").option("--apps <csv>", "Comma-separated package names for multi-app operations").showSuggestionAfterError(false);
63
63
  const commandLoaders = {
64
64
  auth: async () => {
65
65
  (await import("./auth-C6K563I5.js")).registerAuthCommands(program);
66
66
  },
67
67
  config: async () => {
68
- (await import("./config-3GHC45S5.js")).registerConfigCommands(program);
68
+ (await import("./config-URSFMVMI.js")).registerConfigCommands(program);
69
69
  },
70
70
  doctor: async () => {
71
- (await import("./doctor-AO52FMY4.js")).registerDoctorCommand(program);
71
+ (await import("./doctor-H3S574SE.js")).registerDoctorCommand(program);
72
72
  },
73
73
  update: async () => {
74
- (await import("./update-TXLKZ6JD.js")).registerUpdateCommand(program);
74
+ (await import("./update-Q4DRERBG.js")).registerUpdateCommand(program);
75
75
  },
76
76
  docs: async () => {
77
- (await import("./docs-OU6LSSJD.js")).registerDocsCommand(program);
77
+ (await import("./docs-ADZRT76Y.js")).registerDocsCommand(program);
78
78
  },
79
79
  changelog: async () => {
80
- (await import("./changelog-STYBBYDC.js")).registerChangelogCommand(program);
80
+ (await import("./changelog-4F6SYF2T.js")).registerChangelogCommand(program);
81
81
  },
82
82
  completion: async () => {
83
83
  (await import("./completion-ZK7RPPFD.js")).registerCompletionCommand(program, async () => {
@@ -93,7 +93,7 @@ async function createProgram(pluginManager) {
93
93
  (await import("./apps-WT4FKQFR.js")).registerAppsCommands(program);
94
94
  },
95
95
  releases: async () => {
96
- (await import("./releases-IH2ZK3BB.js")).registerReleasesCommands(program);
96
+ (await import("./releases-UWIOZN4Y.js")).registerReleasesCommands(program);
97
97
  },
98
98
  tracks: async () => {
99
99
  (await import("./tracks-N7KPBVPC.js")).registerTracksCommands(program);
@@ -111,10 +111,10 @@ async function createProgram(pluginManager) {
111
111
  (await import("./vitals-QPHS6QFH.js")).registerVitalsCommands(program);
112
112
  },
113
113
  subscriptions: async () => {
114
- (await import("./subscriptions-FR6GCMPC.js")).registerSubscriptionsCommands(program);
114
+ (await import("./subscriptions-TED4SY7A.js")).registerSubscriptionsCommands(program);
115
115
  },
116
116
  iap: async () => {
117
- (await import("./iap-S5X4O7XF.js")).registerIapCommands(program);
117
+ (await import("./iap-XAZUUGFI.js")).registerIapCommands(program);
118
118
  },
119
119
  purchases: async () => {
120
120
  (await import("./purchases-3KUR5YR3.js")).registerPurchasesCommands(program);
@@ -144,7 +144,7 @@ async function createProgram(pluginManager) {
144
144
  (await import("./data-safety-PDZTJ32M.js")).registerDataSafetyCommands(program);
145
145
  },
146
146
  "external-transactions": async () => {
147
- (await import("./external-transactions-IIF2TSH6.js")).registerExternalTransactionsCommands(
147
+ (await import("./external-transactions-GFMGHOW2.js")).registerExternalTransactionsCommands(
148
148
  program
149
149
  );
150
150
  },
@@ -152,7 +152,7 @@ async function createProgram(pluginManager) {
152
152
  (await import("./device-tiers-EKU2TUPW.js")).registerDeviceTiersCommands(program);
153
153
  },
154
154
  "one-time-products": async () => {
155
- (await import("./one-time-products-YSX5VI6I.js")).registerOneTimeProductsCommands(program);
155
+ (await import("./one-time-products-ETPRFVOB.js")).registerOneTimeProductsCommands(program);
156
156
  },
157
157
  "internal-sharing": async () => {
158
158
  (await import("./internal-sharing-BC76IRJG.js")).registerInternalSharingCommands(program);
@@ -161,7 +161,7 @@ async function createProgram(pluginManager) {
161
161
  (await import("./generated-apks-TC33S2YN.js")).registerGeneratedApksCommands(program);
162
162
  },
163
163
  "system-apks": async () => {
164
- (await import("./system-apks-ZKVZLJPY.js")).registerSystemApksCommands(program);
164
+ (await import("./system-apks-MLI34HAM.js")).registerSystemApksCommands(program);
165
165
  },
166
166
  "purchase-options": async () => {
167
167
  (await import("./purchase-options-KFWW4JW2.js")).registerPurchaseOptionsCommands(program);
@@ -191,13 +191,13 @@ async function createProgram(pluginManager) {
191
191
  (await import("./verify-O2PSBTIC.js")).registerVerifyCommand(program);
192
192
  },
193
193
  version: async () => {
194
- (await import("./version-BHRQPXO6.js")).registerVersionCommand(program);
194
+ (await import("./version-QAXDOIOK.js")).registerVersionCommand(program);
195
195
  },
196
196
  cache: async () => {
197
197
  (await import("./cache-FGNP7Y37.js")).registerCacheCommand(program);
198
198
  },
199
199
  feedback: async () => {
200
- (await import("./feedback-OT4VK7B6.js")).registerFeedbackCommand(program);
200
+ (await import("./feedback-BVXS2Y4C.js")).registerFeedbackCommand(program);
201
201
  },
202
202
  setup: async () => {
203
203
  (await import("./setup-XC4X323X.js")).registerSetupCommand(program);
@@ -471,4 +471,4 @@ export {
471
471
  createProgram,
472
472
  handleCliError
473
473
  };
474
- //# sourceMappingURL=chunk-LKI2MVT4.js.map
474
+ //# sourceMappingURL=chunk-45UKFQMC.js.map
@@ -78,7 +78,7 @@ Configuration file created: ${path}`);
78
78
  });
79
79
  console.log("\nVerifying setup...");
80
80
  try {
81
- const { registerDoctorCommand } = await import("./doctor-AO52FMY4.js");
81
+ const { registerDoctorCommand } = await import("./doctor-H3S574SE.js");
82
82
  const { Command } = await import("commander");
83
83
  const doctorProgram = new Command();
84
84
  doctorProgram.option("-o, --output <format>", "Output format").option("-j, --json", "JSON mode");
@@ -107,4 +107,4 @@ Configuration file created: ${path}`);
107
107
  export {
108
108
  registerConfigCommands
109
109
  };
110
- //# sourceMappingURL=config-3GHC45S5.js.map
110
+ //# sourceMappingURL=config-URSFMVMI.js.map
@@ -39,8 +39,8 @@ function renderMarkdown(content) {
39
39
  const h1 = line.match(/^# (.+)$/);
40
40
  if (h1) {
41
41
  out.push("");
42
- out.push(bold(green(` ${h1[1]}`)));
43
- out.push(green(" " + "\u2500".repeat(h1[1].length)));
42
+ out.push(bold(green(` ${h1[1] ?? ""}`)));
43
+ out.push(green(" " + "\u2500".repeat((h1[1] ?? "").length)));
44
44
  out.push("");
45
45
  continue;
46
46
  }
@@ -179,7 +179,7 @@ function searchPages(query, bundle) {
179
179
  function extractSnippet(content, words) {
180
180
  const lines = content.split("\n");
181
181
  for (let i = 0; i < lines.length; i++) {
182
- const lower = lines[i].toLowerCase();
182
+ const lower = (lines[i] ?? "").toLowerCase();
183
183
  if (words.some((w) => lower.includes(w))) {
184
184
  const start = Math.max(0, i - 1);
185
185
  const end = Math.min(lines.length, i + 2);
@@ -220,8 +220,12 @@ function registerDocsCommand(program) {
220
220
  }
221
221
  const bySection = /* @__PURE__ */ new Map();
222
222
  for (const page of bundle.pages) {
223
- if (!bySection.has(page.section)) bySection.set(page.section, []);
224
- bySection.get(page.section).push(page);
223
+ let section = bySection.get(page.section);
224
+ if (!section) {
225
+ section = [];
226
+ bySection.set(page.section, section);
227
+ }
228
+ section.push(page);
225
229
  }
226
230
  for (const [section, pages] of bySection) {
227
231
  console.log(bold(`
@@ -384,4 +388,4 @@ function generateQuickReference(bundle) {
384
388
  export {
385
389
  registerDocsCommand
386
390
  };
387
- //# sourceMappingURL=docs-OU6LSSJD.js.map
391
+ //# sourceMappingURL=docs-ADZRT76Y.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/docs.ts","../src/docs-renderer.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport * as cp from \"node:child_process\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { join, dirname } from \"node:path\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { fileURLToPath } from \"node:url\";\nimport { renderMarkdown, formatSearchResult } from \"../docs-renderer.js\";\nimport { bold, dim } from \"../colors.js\";\nimport { getOutputFormat } from \"../format.js\";\nimport { loadConfig } from \"@gpc-cli/config\";\nimport { formatOutput, GpcError } from \"@gpc-cli/core\";\nimport type { DocPage, DocsBundle } from \"../generated/docs-types.js\";\n\nlet _bundle: DocsBundle | undefined;\nlet _pageMap: Map<string, DocPage> | undefined;\n\nfunction getBundle(): DocsBundle {\n if (!_bundle) {\n const moduleDir = dirname(fileURLToPath(import.meta.url));\n // Works from src/commands/ (dev/test) and dist/ (built output)\n const candidates = [\n join(moduleDir, \"..\", \"generated\", \"docs-bundle.json\"),\n join(moduleDir, \"generated\", \"docs-bundle.json\"),\n ];\n const bundlePath = candidates.find((p) => existsSync(p));\n if (!bundlePath) {\n throw new GpcError(\n \"Embedded docs bundle not found. Run the build first.\",\n \"DOCS_BUNDLE_MISSING\",\n 1,\n \"Run: pnpm build --filter @gpc-cli/cli\",\n );\n }\n _bundle = JSON.parse(readFileSync(bundlePath, \"utf-8\")) as DocsBundle;\n }\n return _bundle;\n}\n\nfunction getPageMap(): Map<string, DocPage> {\n if (!_pageMap) {\n const bundle = getBundle();\n _pageMap = new Map<string, DocPage>();\n for (const page of bundle.pages) {\n _pageMap.set(page.slug, page);\n }\n }\n return _pageMap;\n}\n\nfunction fuzzyMatch(query: string, pages: DocPage[]): DocPage | undefined {\n const q = query.toLowerCase();\n // Exact full slug match (e.g., \"guide/authentication\")\n const exact = pages.find((p) => p.slug === q);\n if (exact) return exact;\n // Match on the filename part (e.g., \"authentication\" matches \"guide/authentication\")\n const byName = pages.find((p) => p.slug.endsWith(`/${q}`));\n if (byName) return byName;\n // Prefix match on filename part\n const prefix = pages.find((p) => {\n const name = p.slug.split(\"/\").pop() || \"\";\n return name.startsWith(q);\n });\n if (prefix) return prefix;\n // Contains match anywhere in slug\n const contains = pages.find((p) => p.slug.includes(q));\n if (contains) return contains;\n // Title match\n const titleMatch = pages.find((p) => p.title.toLowerCase().includes(q));\n if (titleMatch) return titleMatch;\n return undefined;\n}\n\nfunction searchPages(\n query: string,\n bundle: DocsBundle,\n): { page: DocPage; score: number; snippet: string }[] {\n const words = query\n .toLowerCase()\n .replace(/[^a-z0-9\\s-]/g, \" \")\n .split(/\\s+/)\n .filter((w) => w.length > 2);\n\n if (words.length === 0) return [];\n\n const pageMap = getPageMap();\n const scores = new Map<string, number>();\n for (const word of words) {\n const entries = bundle.searchIndex[word];\n if (!entries) continue;\n for (const entry of entries) {\n scores.set(entry.slug, (scores.get(entry.slug) || 0) + entry.score);\n }\n }\n\n const results: { page: DocPage; score: number; snippet: string }[] = [];\n for (const [slug, score] of scores) {\n const page = pageMap.get(slug);\n if (!page) continue;\n const snippet = extractSnippet(page.content, words);\n results.push({ page, score, snippet });\n }\n\n results.sort((a, b) => b.score - a.score);\n return results.slice(0, 15);\n}\n\nfunction extractSnippet(content: string, words: string[]): string {\n const lines = content.split(\"\\n\");\n for (let i = 0; i < lines.length; i++) {\n const lower = (lines[i] ?? \"\").toLowerCase();\n if (words.some((w) => lower.includes(w))) {\n const start = Math.max(0, i - 1);\n const end = Math.min(lines.length, i + 2);\n return lines.slice(start, end).join(\"\\n\");\n }\n }\n return lines.slice(0, 3).join(\"\\n\");\n}\n\nconst DOCS_BASE = \"https://yasserstudio.github.io/gpc/\";\n\nfunction openInBrowser(url: string): void {\n const platform = process.platform;\n if (platform === \"win32\") {\n cp.exec(`start \"\" \"${url}\"`, (error) => {\n if (error) console.log(`Open in your browser: ${url}`);\n });\n } else {\n const cmd = platform === \"darwin\" ? \"open\" : \"xdg-open\";\n cp.execFile(cmd, [url], (error) => {\n if (error) console.log(`Open in your browser: ${url}`);\n });\n }\n}\n\nexport function registerDocsCommand(program: Command): void {\n const docs = program\n .command(\"docs\")\n .description(\"Access embedded documentation (list, show, search, init, web)\");\n\n docs\n .command(\"list\")\n .description(\"List all available documentation topics\")\n .action(async () => {\n const config = await loadConfig();\n const format = getOutputFormat(program, config);\n const bundle = getBundle();\n\n if (format === \"json\") {\n const data = bundle.pages.map((p) => ({\n slug: p.slug,\n section: p.section,\n title: p.title,\n description: p.description,\n }));\n console.log(formatOutput(data, \"json\"));\n return;\n }\n\n const bySection = new Map<string, DocPage[]>();\n for (const page of bundle.pages) {\n let section = bySection.get(page.section);\n if (!section) {\n section = [];\n bySection.set(page.section, section);\n }\n section.push(page);\n }\n\n for (const [section, pages] of bySection) {\n console.log(bold(`\\n ${section.toUpperCase()}`));\n for (const page of pages) {\n const label = page.slug.padEnd(36);\n console.log(` ${label} ${dim(page.title || page.slug)}`);\n }\n }\n console.log(\"\");\n console.log(dim(` ${bundle.pageCount} topics. Use: gpc docs show <topic>`));\n });\n\n docs\n .command(\"show <topic>\")\n .description(\"Show a documentation page in the terminal\")\n .action(async (topic: string) => {\n const config = await loadConfig();\n const format = getOutputFormat(program, config);\n const bundle = getBundle();\n\n const page = fuzzyMatch(topic, bundle.pages);\n if (!page) {\n const suggestions = bundle.pages\n .filter((p) => p.slug.includes(topic.toLowerCase().slice(0, 3)))\n .slice(0, 5)\n .map((p) => p.slug);\n\n throw new GpcError(\n `No documentation found for \"${topic}\"`,\n \"DOCS_NOT_FOUND\",\n 2,\n suggestions.length > 0\n ? `Did you mean: ${suggestions.join(\", \")}?\\nRun: gpc docs list`\n : \"Run: gpc docs list\",\n );\n }\n\n if (format === \"json\") {\n console.log(\n formatOutput(\n { slug: page.slug, section: page.section, title: page.title, content: page.content },\n \"json\",\n ),\n );\n return;\n }\n\n console.log(renderMarkdown(page.content));\n });\n\n docs\n .command(\"search <query>\")\n .description(\"Search documentation\")\n .action(async (query: string) => {\n const config = await loadConfig();\n const format = getOutputFormat(program, config);\n const bundle = getBundle();\n\n const results = searchPages(query, bundle);\n\n if (results.length === 0) {\n console.log(dim(` No results for \"${query}\".`));\n console.log(dim(\" Try a different search term, or: gpc docs list\"));\n return;\n }\n\n if (format === \"json\") {\n const data = results.map((r) => ({\n slug: r.page.slug,\n section: r.page.section,\n title: r.page.title,\n score: r.score,\n }));\n console.log(formatOutput(data, \"json\"));\n return;\n }\n\n console.log(bold(`\\n Search results for \"${query}\"\\n`));\n for (const r of results) {\n console.log(\" \" + formatSearchResult(r.page.slug, r.page.title, r.snippet, r.score));\n console.log(\"\");\n }\n console.log(\n dim(\n ` ${results.length} result${results.length === 1 ? \"\" : \"s\"}. Use: gpc docs show <topic>`,\n ),\n );\n });\n\n docs\n .command(\"init\")\n .description(\"Create GPC.md quick-reference for AI agents in this directory\")\n .option(\"--force\", \"Overwrite existing GPC.md\")\n .option(\"--path <dir>\", \"Output directory\", \".\")\n .action(async (opts: { force?: boolean; path: string }) => {\n const outDir = opts.path;\n const outFile = join(outDir, \"GPC.md\");\n\n if (existsSync(outFile) && !opts.force) {\n throw new GpcError(\n `GPC.md already exists at ${outFile}`,\n \"DOCS_INIT_EXISTS\",\n 1,\n \"Use --force to overwrite.\",\n );\n }\n\n const bundle = getBundle();\n const content = generateQuickReference(bundle);\n await writeFile(outFile, content, \"utf-8\");\n console.log(`Created ${outFile} (${bundle.pageCount} topics indexed)`);\n\n for (const agentFile of [\"CLAUDE.md\", \"AGENTS.md\"]) {\n const agentPath = join(outDir, agentFile);\n if (existsSync(agentPath)) {\n const existing = await readFile(agentPath, \"utf-8\");\n if (!existing.includes(\"GPC.md\")) {\n const separator = existing.endsWith(\"\\n\") ? \"\\n\" : \"\\n\\n\";\n await writeFile(\n agentPath,\n existing + separator + \"See also: @GPC.md for GPC CLI reference.\\n\",\n \"utf-8\",\n );\n console.log(`Updated ${agentPath} (added @GPC.md reference)`);\n }\n }\n }\n });\n\n docs\n .command(\"web [topic]\")\n .description(\"Open documentation in browser\")\n .action((topic?: string) => {\n const bundle = getBundle();\n if (!topic) {\n openInBrowser(DOCS_BASE);\n return;\n }\n const page = fuzzyMatch(topic, bundle.pages);\n if (page) {\n openInBrowser(`${DOCS_BASE}${page.slug}`);\n } else {\n openInBrowser(DOCS_BASE);\n console.log(dim(`Topic \"${topic}\" not found. Opened docs home page.`));\n }\n });\n}\n\nfunction generateQuickReference(bundle: DocsBundle): string {\n const lines: string[] = [\n \"# GPC Quick Reference\",\n \"\",\n \"> Auto-generated by `gpc docs init`. See full docs: https://yasserstudio.github.io/gpc/\",\n \"\",\n \"## Commands\",\n \"\",\n ];\n\n const commandPages = bundle.pages\n .filter((p) => p.section === \"commands\")\n .sort((a, b) => a.slug.localeCompare(b.slug));\n\n for (const page of commandPages) {\n const desc = page.description || page.title;\n lines.push(`- **gpc ${page.slug}** -- ${desc}`);\n }\n\n lines.push(\"\", \"## Guides\", \"\");\n\n const guidePages = bundle.pages\n .filter((p) => p.section === \"guide\")\n .sort((a, b) => a.slug.localeCompare(b.slug));\n\n for (const page of guidePages) {\n lines.push(`- **${page.title || page.slug}** -- \\`gpc docs show ${page.slug}\\``);\n }\n\n lines.push(\n \"\",\n \"## Quick Workflows\",\n \"\",\n \"```bash\",\n \"# Upload and publish\",\n \"gpc publish app.aab\",\n \"\",\n \"# Check vitals before release\",\n \"gpc preflight app.aab\",\n \"\",\n \"# Generate changelog with AI translation\",\n \"gpc changelog generate --target play-store --locales auto --ai\",\n \"\",\n \"# Staged rollout\",\n \"gpc releases rollout --fraction 0.1 --app com.example.app\",\n \"```\",\n \"\",\n `*${bundle.pageCount} docs pages available offline via \\`gpc docs show <topic>\\`*`,\n \"\",\n );\n\n return lines.join(\"\\n\");\n}\n","import { bold, dim, yellow, green, gray } from \"./colors.js\";\n\nexport function renderMarkdown(content: string): string {\n const lines = content.split(\"\\n\");\n const out: string[] = [];\n\n let inCodeBlock = false;\n\n for (const line of lines) {\n if (line.startsWith(\"```\")) {\n inCodeBlock = !inCodeBlock;\n if (inCodeBlock) {\n out.push(dim(\" ┌─────────────────────────────────────\"));\n } else {\n out.push(dim(\" └─────────────────────────────────────\"));\n }\n continue;\n }\n\n if (inCodeBlock) {\n out.push(dim(` │ ${line}`));\n continue;\n }\n\n // Headers\n const h1 = line.match(/^# (.+)$/);\n if (h1) {\n out.push(\"\");\n out.push(bold(green(` ${h1[1] ?? \"\"}`)));\n out.push(green(\" \" + \"─\".repeat((h1[1] ?? \"\").length)));\n out.push(\"\");\n continue;\n }\n const h2 = line.match(/^## (.+)$/);\n if (h2) {\n out.push(\"\");\n out.push(bold(yellow(` ${h2[1]}`)));\n out.push(\"\");\n continue;\n }\n const h3 = line.match(/^### (.+)$/);\n if (h3) {\n out.push(bold(` ${h3[1]}`));\n continue;\n }\n\n // Blockquotes (converted from ::: containers)\n if (line.startsWith(\"> \")) {\n out.push(dim(` │ ${renderInline(line.slice(2))}`));\n continue;\n }\n\n // Table rows\n if (line.startsWith(\"|\")) {\n if (line.match(/^\\|[\\s-|]+\\|$/)) {\n out.push(gray(\" \" + \"─\".repeat(Math.min(line.length, 60))));\n continue;\n }\n const cells = line\n .split(\"|\")\n .filter(Boolean)\n .map((c) => c.trim());\n out.push(\" \" + cells.join(\" \"));\n continue;\n }\n\n // List items\n if (line.match(/^\\s*[-*]\\s/)) {\n out.push(` ${renderInline(line)}`);\n continue;\n }\n\n // Numbered list items\n if (line.match(/^\\s*\\d+\\.\\s/)) {\n out.push(` ${renderInline(line)}`);\n continue;\n }\n\n // Regular text\n out.push(` ${renderInline(line)}`);\n }\n\n // Close unclosed code block gracefully\n if (inCodeBlock) {\n out.push(dim(\" └─────────────────────────────────────\"));\n }\n\n return out.join(\"\\n\");\n}\n\nfunction renderInline(text: string): string {\n let result = text.replace(/\\*\\*(.+?)\\*\\*/g, (_, t) => bold(t));\n result = result.replace(/`([^`]+)`/g, (_, t) => dim(t));\n result = result.replace(\n /\\[([^\\]]+)\\]\\(([^)]+)\\)/g,\n (_, label, url) => `${label} ${dim(`(${url})`)}`,\n );\n return result;\n}\n\nexport function formatSearchResult(\n slug: string,\n title: string,\n snippet: string,\n score: number,\n): string {\n const header = bold(slug) + dim(` (score: ${score})`);\n const titleLine = ` ${title}`;\n const snippetLines = snippet\n .split(\"\\n\")\n .slice(0, 3)\n .map((l) => gray(` ${l.trim()}`))\n .join(\"\\n\");\n return `${header}\\n${titleLine}\\n${snippetLines}`;\n}\n"],"mappings":";;;;;;;;;;;;;AACA,YAAY,QAAQ;AACpB,SAAS,UAAU,iBAAiB;AACpC,SAAS,MAAM,eAAe;AAC9B,SAAS,YAAY,oBAAoB;AACzC,SAAS,qBAAqB;;;ACHvB,SAAS,eAAe,SAAyB;AACtD,QAAM,QAAQ,QAAQ,MAAM,IAAI;AAChC,QAAM,MAAgB,CAAC;AAEvB,MAAI,cAAc;AAElB,aAAW,QAAQ,OAAO;AACxB,QAAI,KAAK,WAAW,KAAK,GAAG;AAC1B,oBAAc,CAAC;AACf,UAAI,aAAa;AACf,YAAI,KAAK,IAAI,wOAA0C,CAAC;AAAA,MAC1D,OAAO;AACL,YAAI,KAAK,IAAI,wOAA0C,CAAC;AAAA,MAC1D;AACA;AAAA,IACF;AAEA,QAAI,aAAa;AACf,UAAI,KAAK,IAAI,YAAO,IAAI,EAAE,CAAC;AAC3B;AAAA,IACF;AAGA,UAAM,KAAK,KAAK,MAAM,UAAU;AAChC,QAAI,IAAI;AACN,UAAI,KAAK,EAAE;AACX,UAAI,KAAK,KAAK,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACxC,UAAI,KAAK,MAAM,OAAO,SAAI,QAAQ,GAAG,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC;AACvD,UAAI,KAAK,EAAE;AACX;AAAA,IACF;AACA,UAAM,KAAK,KAAK,MAAM,WAAW;AACjC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AAAA,IACA;AAAA,IACA;AAAA,IACA,IAAI,OAAO,SAAS;AAAA,IACpB;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
@@ -144,7 +144,7 @@ function checkCiEnvironment() {
144
144
  };
145
145
  }
146
146
  async function checkGpcVersion() {
147
- const currentVersion = "0.9.81";
147
+ const currentVersion = "0.9.82";
148
148
  if (currentVersion === "0.0.0") {
149
149
  return { name: "version", status: "info", message: "GPC development build" };
150
150
  }
@@ -934,7 +934,7 @@ function registerDoctorCommand(program) {
934
934
  const dnsHosts = [API_HOST, REPORTING_HOST];
935
935
  const dnsPassedHosts = [];
936
936
  for (const host of dnsHosts) {
937
- const label = host.split(".")[0];
937
+ const label = host.split(".")[0] ?? "";
938
938
  try {
939
939
  const start = performance.now();
940
940
  await lookup(host);
@@ -955,7 +955,7 @@ function registerDoctorCommand(program) {
955
955
  }
956
956
  }
957
957
  for (const host of dnsPassedHosts) {
958
- const label = host.split(".")[0];
958
+ const label = host.split(".")[0] ?? "";
959
959
  const probe = await probeHttps(host);
960
960
  if (probe.ok) {
961
961
  results.push({
@@ -1138,4 +1138,4 @@ export {
1138
1138
  checkVerificationDeadline,
1139
1139
  registerDoctorCommand
1140
1140
  };
1141
- //# sourceMappingURL=doctor-AO52FMY4.js.map
1141
+ //# sourceMappingURL=doctor-H3S574SE.js.map