@gpc-cli/cli 0.9.38 → 0.9.39

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 (40) hide show
  1. package/dist/bin.js +2 -2
  2. package/dist/{chunk-NQABG7D4.js → chunk-ELZTOKWU.js} +22 -13
  3. package/dist/chunk-ELZTOKWU.js.map +1 -0
  4. package/dist/{chunk-P5GF73XK.js → chunk-FAN4ZITI.js} +6 -2
  5. package/dist/{chunk-P5GF73XK.js.map → chunk-FAN4ZITI.js.map} +1 -1
  6. package/dist/{config-F2U3KUHX.js → config-36GIPNWX.js} +2 -2
  7. package/dist/diff-V7VBKG27.js +101 -0
  8. package/dist/diff-V7VBKG27.js.map +1 -0
  9. package/dist/{doctor-4BUPAVFT.js → doctor-3Z4ARPM2.js} +2 -2
  10. package/dist/{feedback-RMOLFCQW.js → feedback-TTMAF5I6.js} +25 -8
  11. package/dist/feedback-TTMAF5I6.js.map +1 -0
  12. package/dist/index.js +1 -1
  13. package/dist/init-FXB25TPF.js +65 -0
  14. package/dist/init-FXB25TPF.js.map +1 -0
  15. package/dist/{listings-IVHZJNES.js → listings-JOFAZBKU.js} +2 -2
  16. package/dist/preflight-H3HEBYQW.js +143 -0
  17. package/dist/preflight-H3HEBYQW.js.map +1 -0
  18. package/dist/{pricing-D5ZIMOZ3.js → pricing-OZO66DVL.js} +1 -1
  19. package/dist/{pricing-D5ZIMOZ3.js.map → pricing-OZO66DVL.js.map} +1 -1
  20. package/dist/{releases-JIXAMXLM.js → releases-472GERCZ.js} +63 -9
  21. package/dist/releases-472GERCZ.js.map +1 -0
  22. package/dist/{status-G3AMJ34G.js → status-SRG6RUCV.js} +48 -7
  23. package/dist/status-SRG6RUCV.js.map +1 -0
  24. package/dist/{update-AMNBSZEK.js → update-2ECQ2F5U.js} +2 -2
  25. package/dist/{validate-VNIS6OEB.js → validate-UOVTM6L3.js} +2 -2
  26. package/dist/{version-R63OY7PW.js → version-KRDVPPQ4.js} +2 -2
  27. package/dist/{vitals-HFWCXRT7.js → vitals-6EYDCGQK.js} +2 -2
  28. package/dist/vitals-6EYDCGQK.js.map +1 -0
  29. package/package.json +3 -3
  30. package/dist/chunk-NQABG7D4.js.map +0 -1
  31. package/dist/feedback-RMOLFCQW.js.map +0 -1
  32. package/dist/releases-JIXAMXLM.js.map +0 -1
  33. package/dist/status-G3AMJ34G.js.map +0 -1
  34. package/dist/vitals-HFWCXRT7.js.map +0 -1
  35. /package/dist/{config-F2U3KUHX.js.map → config-36GIPNWX.js.map} +0 -0
  36. /package/dist/{doctor-4BUPAVFT.js.map → doctor-3Z4ARPM2.js.map} +0 -0
  37. /package/dist/{listings-IVHZJNES.js.map → listings-JOFAZBKU.js.map} +0 -0
  38. /package/dist/{update-AMNBSZEK.js.map → update-2ECQ2F5U.js.map} +0 -0
  39. /package/dist/{validate-VNIS6OEB.js.map → validate-UOVTM6L3.js.map} +0 -0
  40. /package/dist/{version-R63OY7PW.js.map → version-KRDVPPQ4.js.map} +0 -0
package/dist/bin.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  createProgram,
4
4
  handleCliError,
5
5
  loadPlugins
6
- } from "./chunk-NQABG7D4.js";
6
+ } from "./chunk-ELZTOKWU.js";
7
7
  import {
8
8
  checkForUpdate,
9
9
  formatUpdateNotification
@@ -44,7 +44,7 @@ if (!_isJsonMode && !_isQuiet && !existsSync(getUserConfigPath())) {
44
44
  }
45
45
  await setupNetworking();
46
46
  initAudit(getConfigDir());
47
- var currentVersion = "0.9.38";
47
+ var currentVersion = "0.9.39";
48
48
  var isUpdateCommand = process.argv[2] === "update";
49
49
  var updateCheckPromise = isUpdateCommand ? Promise.resolve(null) : checkForUpdate(currentVersion);
50
50
  if (process.argv.includes("--ci")) {
@@ -67,19 +67,19 @@ function registerPluginCommands(program, manager) {
67
67
  import { Command } from "commander";
68
68
  async function createProgram(pluginManager) {
69
69
  const program = new Command();
70
- program.name("gpc").description("GPC \u2014 Google Play Console CLI").version("0.9.38", "-V, --version").option("-o, --output <format>", "Output format: table, json, yaml, markdown, 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);
70
+ program.name("gpc").description("GPC \u2014 Google Play Console CLI").version("0.9.39", "-V, --version").option("-o, --output <format>", "Output format: table, json, yaml, markdown, 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);
71
71
  const commandLoaders = {
72
72
  auth: async () => {
73
73
  (await import("./auth-XGSTT5G5.js")).registerAuthCommands(program);
74
74
  },
75
75
  config: async () => {
76
- (await import("./config-F2U3KUHX.js")).registerConfigCommands(program);
76
+ (await import("./config-36GIPNWX.js")).registerConfigCommands(program);
77
77
  },
78
78
  doctor: async () => {
79
- (await import("./doctor-4BUPAVFT.js")).registerDoctorCommand(program);
79
+ (await import("./doctor-3Z4ARPM2.js")).registerDoctorCommand(program);
80
80
  },
81
81
  update: async () => {
82
- (await import("./update-AMNBSZEK.js")).registerUpdateCommand(program);
82
+ (await import("./update-2ECQ2F5U.js")).registerUpdateCommand(program);
83
83
  },
84
84
  docs: async () => {
85
85
  (await import("./docs-7DUXIKA3.js")).registerDocsCommand(program);
@@ -91,22 +91,22 @@ async function createProgram(pluginManager) {
91
91
  (await import("./apps-J2446UDA.js")).registerAppsCommands(program);
92
92
  },
93
93
  releases: async () => {
94
- (await import("./releases-JIXAMXLM.js")).registerReleasesCommands(program);
94
+ (await import("./releases-472GERCZ.js")).registerReleasesCommands(program);
95
95
  },
96
96
  tracks: async () => {
97
97
  (await import("./tracks-NERFFEDT.js")).registerTracksCommands(program);
98
98
  },
99
99
  status: async () => {
100
- (await import("./status-G3AMJ34G.js")).registerStatusCommand(program);
100
+ (await import("./status-SRG6RUCV.js")).registerStatusCommand(program);
101
101
  },
102
102
  listings: async () => {
103
- (await import("./listings-IVHZJNES.js")).registerListingsCommands(program);
103
+ (await import("./listings-JOFAZBKU.js")).registerListingsCommands(program);
104
104
  },
105
105
  reviews: async () => {
106
106
  (await import("./reviews-MOVGATUI.js")).registerReviewsCommands(program);
107
107
  },
108
108
  vitals: async () => {
109
- (await import("./vitals-HFWCXRT7.js")).registerVitalsCommands(program);
109
+ (await import("./vitals-6EYDCGQK.js")).registerVitalsCommands(program);
110
110
  },
111
111
  subscriptions: async () => {
112
112
  (await import("./subscriptions-LSOJID6H.js")).registerSubscriptionsCommands(program);
@@ -118,7 +118,7 @@ async function createProgram(pluginManager) {
118
118
  (await import("./purchases-7ZPVCN6D.js")).registerPurchasesCommands(program);
119
119
  },
120
120
  pricing: async () => {
121
- (await import("./pricing-D5ZIMOZ3.js")).registerPricingCommands(program);
121
+ (await import("./pricing-OZO66DVL.js")).registerPricingCommands(program);
122
122
  },
123
123
  reports: async () => {
124
124
  (await import("./reports-2YX3RDOS.js")).registerReportsCommands(program);
@@ -130,7 +130,7 @@ async function createProgram(pluginManager) {
130
130
  (await import("./testers-SDLVWQ2Z.js")).registerTestersCommands(program);
131
131
  },
132
132
  validate: async () => {
133
- (await import("./validate-VNIS6OEB.js")).registerValidateCommand(program);
133
+ (await import("./validate-UOVTM6L3.js")).registerValidateCommand(program);
134
134
  },
135
135
  publish: async () => {
136
136
  (await import("./publish-EPZXLGKZ.js")).registerPublishCommand(program);
@@ -177,13 +177,13 @@ async function createProgram(pluginManager) {
177
177
  (await import("./install-skills-OV4HVANW.js")).registerInstallSkillsCommand(program);
178
178
  },
179
179
  version: async () => {
180
- (await import("./version-R63OY7PW.js")).registerVersionCommand(program);
180
+ (await import("./version-KRDVPPQ4.js")).registerVersionCommand(program);
181
181
  },
182
182
  cache: async () => {
183
183
  (await import("./cache-SLNFRTI2.js")).registerCacheCommand(program);
184
184
  },
185
185
  feedback: async () => {
186
- (await import("./feedback-RMOLFCQW.js")).registerFeedbackCommand(program);
186
+ (await import("./feedback-TTMAF5I6.js")).registerFeedbackCommand(program);
187
187
  },
188
188
  quickstart: async () => {
189
189
  (await import("./quickstart-4HB62YEL.js")).registerQuickstartCommand(program);
@@ -203,6 +203,15 @@ async function createProgram(pluginManager) {
203
203
  enterprise: async () => {
204
204
  (await import("./enterprise-7THXNBTC.js")).registerEnterpriseCommands(program);
205
205
  },
206
+ diff: async () => {
207
+ (await import("./diff-V7VBKG27.js")).registerDiffCommand(program);
208
+ },
209
+ init: async () => {
210
+ (await import("./init-FXB25TPF.js")).registerInitCommand(program);
211
+ },
212
+ preflight: async () => {
213
+ (await import("./preflight-H3HEBYQW.js")).registerPreflightCommand(program);
214
+ },
206
215
  plugins: async () => {
207
216
  registerPluginsCommand(program, pluginManager);
208
217
  }
@@ -435,4 +444,4 @@ export {
435
444
  createProgram,
436
445
  handleCliError
437
446
  };
438
- //# sourceMappingURL=chunk-NQABG7D4.js.map
447
+ //# sourceMappingURL=chunk-ELZTOKWU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/plugins.ts","../src/program.ts","../src/error-handler.ts"],"sourcesContent":["import { PluginManager, discoverPlugins } from \"@gpc-cli/core\";\nimport type { Command } from \"commander\";\n\n/**\n * Load and initialize all plugins.\n * First-party plugins (@gpc-cli/*) are auto-trusted.\n * Third-party plugins require prior approval stored in config.\n * Plugin loading is disabled in standalone binary mode.\n */\nexport async function loadPlugins(): Promise<PluginManager> {\n const manager = new PluginManager();\n\n // Standalone binary cannot resolve external npm packages at runtime\n if (process.env[\"__GPC_BINARY\"] === \"1\") {\n return manager;\n }\n\n try {\n const { loadConfig } = await import(\"@gpc-cli/config\");\n const config = await loadConfig();\n const plugins = await discoverPlugins({ configPlugins: config.plugins });\n const approved = new Set(config.approvedPlugins ?? []);\n\n for (const plugin of plugins) {\n const isTrusted = plugin.name.startsWith(\"@gpc-cli/\");\n\n if (!isTrusted && !approved.has(plugin.name)) {\n // Skip unapproved third-party plugins silently in non-interactive mode\n // In interactive mode, the user would run `gpc plugins approve <name>` first\n const isQuiet = process.argv.includes(\"--quiet\") || process.argv.includes(\"-q\");\n if (!isQuiet) {\n console.error(\n `Plugin \"${plugin.name}\" is not approved. Run: gpc plugins approve ${plugin.name}`,\n );\n }\n continue;\n }\n\n try {\n await manager.load(plugin);\n } catch {\n // Skip plugins that fail to load — don't block the CLI\n }\n }\n } catch {\n // Config loading failure shouldn't block plugin-free commands\n }\n\n return manager;\n}\n\n/**\n * Register plugin-defined commands with the Commander program.\n */\nexport function registerPluginCommands(program: Command, manager: PluginManager): void {\n for (const def of manager.getRegisteredCommands()) {\n const cmd = program.command(def.name).description(def.description);\n\n if (def.arguments) {\n for (const arg of def.arguments) {\n const syntax = arg.required ? `<${arg.name}>` : `[${arg.name}]`;\n cmd.argument(syntax, arg.description);\n }\n }\n\n if (def.options) {\n for (const opt of def.options) {\n cmd.option(\n opt.flags,\n opt.description,\n opt.defaultValue as string | boolean | string[] | undefined,\n );\n }\n }\n\n cmd.action(async (...rawArgs: unknown[]) => {\n const opts = rawArgs[rawArgs.length - 2] as Record<string, unknown>;\n const args: Record<string, unknown> = {};\n\n if (def.arguments) {\n def.arguments.forEach((argDef, i) => {\n args[argDef.name] = rawArgs[i];\n });\n }\n\n await def.action(args, opts);\n });\n }\n}\n","import { Command } from \"commander\";\nimport type { PluginManager } from \"@gpc-cli/core\";\nimport type { CommandEvent, CommandResult } from \"@gpc-cli/plugin-sdk\";\nimport { registerPluginCommands } from \"./plugins.js\";\n\nexport async function createProgram(pluginManager?: PluginManager): Promise<Command> {\n const program = new Command();\n\n program\n .name(\"gpc\")\n .description(\"GPC — Google Play Console CLI\")\n .version(process.env[\"__GPC_VERSION\"] || \"0.0.0\", \"-V, --version\")\n .option(\"-o, --output <format>\", \"Output format: table, json, yaml, markdown, junit\")\n .option(\"-v, --verbose\", \"Enable debug logging\")\n .option(\"-q, --quiet\", \"Suppress non-essential output\")\n .option(\"-a, --app <package>\", \"App package name\")\n .option(\"-p, --profile <name>\", \"Auth profile name\")\n .option(\"--no-color\", \"Disable colored output\")\n .option(\"--no-interactive\", \"Disable interactive prompts\")\n .option(\"-y, --yes\", \"Skip confirmation prompts\")\n .option(\"--dry-run\", \"Preview changes without executing\")\n .option(\"--notify [target]\", \"Send webhook notification on completion (slack, discord, custom)\")\n .option(\"--ci\", \"Force CI mode (JSON output, no prompts, strict exit codes)\")\n .option(\"-j, --json\", \"Shorthand for --output json\")\n .option(\"--apps <csv>\", \"Comma-separated package names for multi-app operations\")\n .showSuggestionAfterError(false);\n\n const commandLoaders: Record<string, () => Promise<void>> = {\n auth: async () => {\n (await import(\"./commands/auth.js\")).registerAuthCommands(program);\n },\n config: async () => {\n (await import(\"./commands/config.js\")).registerConfigCommands(program);\n },\n doctor: async () => {\n (await import(\"./commands/doctor.js\")).registerDoctorCommand(program);\n },\n update: async () => {\n (await import(\"./commands/update.js\")).registerUpdateCommand(program);\n },\n docs: async () => {\n (await import(\"./commands/docs.js\")).registerDocsCommand(program);\n },\n completion: async () => {\n (await import(\"./commands/completion.js\")).registerCompletionCommand(program);\n },\n apps: async () => {\n (await import(\"./commands/apps.js\")).registerAppsCommands(program);\n },\n releases: async () => {\n (await import(\"./commands/releases.js\")).registerReleasesCommands(program);\n },\n tracks: async () => {\n (await import(\"./commands/tracks.js\")).registerTracksCommands(program);\n },\n status: async () => {\n (await import(\"./commands/status.js\")).registerStatusCommand(program);\n },\n listings: async () => {\n (await import(\"./commands/listings.js\")).registerListingsCommands(program);\n },\n reviews: async () => {\n (await import(\"./commands/reviews.js\")).registerReviewsCommands(program);\n },\n vitals: async () => {\n (await import(\"./commands/vitals.js\")).registerVitalsCommands(program);\n },\n subscriptions: async () => {\n (await import(\"./commands/subscriptions.js\")).registerSubscriptionsCommands(program);\n },\n iap: async () => {\n (await import(\"./commands/iap.js\")).registerIapCommands(program);\n },\n purchases: async () => {\n (await import(\"./commands/purchases.js\")).registerPurchasesCommands(program);\n },\n pricing: async () => {\n (await import(\"./commands/pricing.js\")).registerPricingCommands(program);\n },\n reports: async () => {\n (await import(\"./commands/reports.js\")).registerReportsCommands(program);\n },\n users: async () => {\n (await import(\"./commands/users.js\")).registerUsersCommands(program);\n },\n testers: async () => {\n (await import(\"./commands/testers.js\")).registerTestersCommands(program);\n },\n validate: async () => {\n (await import(\"./commands/validate.js\")).registerValidateCommand(program);\n },\n publish: async () => {\n (await import(\"./commands/publish.js\")).registerPublishCommand(program);\n },\n recovery: async () => {\n (await import(\"./commands/recovery.js\")).registerRecoveryCommands(program);\n },\n \"data-safety\": async () => {\n (await import(\"./commands/data-safety.js\")).registerDataSafetyCommands(program);\n },\n \"external-transactions\": async () => {\n (await import(\"./commands/external-transactions.js\")).registerExternalTransactionsCommands(\n program,\n );\n },\n \"device-tiers\": async () => {\n (await import(\"./commands/device-tiers.js\")).registerDeviceTiersCommands(program);\n },\n \"one-time-products\": async () => {\n (await import(\"./commands/one-time-products.js\")).registerOneTimeProductsCommands(program);\n },\n \"internal-sharing\": async () => {\n (await import(\"./commands/internal-sharing.js\")).registerInternalSharingCommands(program);\n },\n \"generated-apks\": async () => {\n (await import(\"./commands/generated-apks.js\")).registerGeneratedApksCommands(program);\n },\n \"purchase-options\": async () => {\n (await import(\"./commands/purchase-options.js\")).registerPurchaseOptionsCommands(program);\n },\n bundle: async () => {\n (await import(\"./commands/bundle.js\")).registerBundleCommands(program);\n },\n audit: async () => {\n (await import(\"./commands/audit.js\")).registerAuditCommands(program);\n },\n migrate: async () => {\n (await import(\"./commands/migrate.js\")).registerMigrateCommands(program);\n },\n anomalies: async () => {\n (await import(\"./commands/anomalies.js\")).registerAnomaliesCommands(program);\n },\n \"install-skills\": async () => {\n (await import(\"./commands/install-skills.js\")).registerInstallSkillsCommand(program);\n },\n version: async () => {\n (await import(\"./commands/version.js\")).registerVersionCommand(program);\n },\n cache: async () => {\n (await import(\"./commands/cache.js\")).registerCacheCommand(program);\n },\n feedback: async () => {\n (await import(\"./commands/feedback.js\")).registerFeedbackCommand(program);\n },\n quickstart: async () => {\n (await import(\"./commands/quickstart.js\")).registerQuickstartCommand(program);\n },\n grants: async () => {\n (await import(\"./commands/grants.js\")).registerGrantsCommands(program);\n },\n train: async () => {\n (await import(\"./commands/train.js\")).registerTrainCommands(program);\n },\n quota: async () => {\n (await import(\"./commands/quota.js\")).registerQuotaCommand(program);\n },\n games: async () => {\n (await import(\"./commands/games.js\")).registerGamesCommands(program);\n },\n enterprise: async () => {\n (await import(\"./commands/enterprise.js\")).registerEnterpriseCommands(program);\n },\n diff: async () => {\n (await import(\"./commands/diff.js\")).registerDiffCommand(program);\n },\n init: async () => {\n (await import(\"./commands/init.js\")).registerInitCommand(program);\n },\n preflight: async () => {\n (await import(\"./commands/preflight.js\")).registerPreflightCommand(program);\n },\n plugins: async () => {\n registerPluginsCommand(program, pluginManager);\n },\n };\n\n // \"Did you mean?\" suggestions for unknown commands\n function levenshtein(a: string, b: string): number {\n const m = a.length,\n n = b.length;\n const dp: number[][] = Array.from({ length: m + 1 }, (_, i) =>\n Array.from({ length: n + 1 }, (_, j) => (i === 0 ? j : j === 0 ? i : 0)),\n );\n const cell = (r: number, c: number): number => dp[r]?.[c] ?? 0;\n for (let i = 1; i <= m; i++) {\n for (let j = 1; j <= n; j++) {\n (dp[i] as number[])[j] =\n a[i - 1] === b[j - 1]\n ? cell(i - 1, j - 1)\n : 1 + Math.min(cell(i - 1, j), cell(i, j - 1), cell(i - 1, j - 1));\n }\n }\n return cell(m, n);\n }\n\n program.on(\"command:*\", (operands: string[]) => {\n const cmd = operands[0] ?? \"\";\n const names = Object.keys(commandLoaders);\n const best = names\n .map((name) => ({ name, d: levenshtein(cmd, name) }))\n .sort((a, b) => a.d - b.d)[0];\n console.error(`Error: Unknown command \"${cmd}\".`);\n if (best && best.d <= 3) console.error(`Did you mean: gpc ${best.name}?`);\n console.error(`Run \"gpc --help\" to see all commands.`);\n process.exit(2);\n });\n\n // Resolve command aliases for lazy loading\n const commandAliases: Record<string, string> = {\n \"ext-txn\": \"external-transactions\",\n otp: \"one-time-products\",\n };\n\n const rawTarget = process.argv[2];\n const target = rawTarget ? (commandAliases[rawTarget] ?? rawTarget) : undefined;\n\n const loader = target ? commandLoaders[target] : undefined;\n if (loader) {\n await loader();\n } else {\n await Promise.all(Object.values(commandLoaders).map((loader) => loader()));\n }\n\n // Register plugin-defined commands\n if (pluginManager) {\n registerPluginCommands(program, pluginManager);\n }\n\n // Wire plugin lifecycle hooks around command execution\n if (pluginManager) {\n wrapCommandHooks(program, pluginManager);\n }\n\n return program;\n}\n\n/**\n * `gpc plugins` — manage plugins.\n */\nfunction registerPluginsCommand(program: Command, manager?: PluginManager): void {\n const cmd = program.command(\"plugins\").description(\"Manage plugins\");\n\n cmd\n .command(\"list\")\n .description(\"List loaded plugins\")\n .action(() => {\n const plugins = manager?.getLoadedPlugins() ?? [];\n const opts = program.opts();\n\n if (opts[\"output\"] === \"json\") {\n console.log(JSON.stringify(plugins, null, 2));\n return;\n }\n\n if (plugins.length === 0) {\n console.log(\"No plugins loaded.\");\n console.log('\\nConfigure plugins in .gpcrc.json: { \"plugins\": [\"@gpc-cli/plugin-ci\"] }');\n return;\n }\n\n console.log(\"Loaded plugins:\\n\");\n for (const p of plugins) {\n const trust = p.trusted ? \"trusted\" : \"third-party\";\n console.log(` ${p.name}@${p.version} (${trust})`);\n }\n\n const commands = manager?.getRegisteredCommands() ?? [];\n if (commands.length > 0) {\n console.log(\"\\nPlugin commands:\\n\");\n for (const c of commands) {\n console.log(` gpc ${c.name} — ${c.description}`);\n }\n }\n });\n\n cmd\n .command(\"init <name>\")\n .description(\"Scaffold a new plugin project\")\n .option(\"-d, --dir <path>\", \"Output directory (defaults to ./gpc-plugin-<name>)\")\n .option(\"--description <text>\", \"Plugin description\")\n .action(async (name: string, opts: { dir?: string; description?: string }) => {\n const { scaffoldPlugin } = await import(\"@gpc-cli/core\");\n const pluginName = name.startsWith(\"gpc-plugin-\") ? name : `gpc-plugin-${name}`;\n const dir = opts.dir ?? `./${pluginName}`;\n\n const result = await scaffoldPlugin({ name, dir, description: opts.description });\n\n console.log(`Plugin scaffolded at ${result.dir}/\\n`);\n console.log(\"Files created:\");\n for (const f of result.files) {\n console.log(` ${f}`);\n }\n console.log(`\\nNext steps:`);\n console.log(` cd ${pluginName}`);\n console.log(` npm install`);\n console.log(` npm run build`);\n console.log(` npm test`);\n });\n\n cmd\n .command(\"approve <name>\")\n .description(\"Approve a third-party plugin for loading\")\n .action(async (name: string) => {\n const { approvePlugin } = await import(\"@gpc-cli/config\");\n await approvePlugin(name);\n console.log(`Plugin \"${name}\" approved. It will be loaded on next run.`);\n });\n\n cmd\n .command(\"revoke <name>\")\n .description(\"Revoke approval for a third-party plugin\")\n .action(async (name: string) => {\n const { revokePluginApproval } = await import(\"@gpc-cli/config\");\n const removed = await revokePluginApproval(name);\n if (removed) {\n console.log(`Plugin \"${name}\" approval revoked.`);\n } else {\n console.log(`Plugin \"${name}\" was not in the approved list.`);\n }\n });\n\n const REGISTRY_URL =\n \"https://raw.githubusercontent.com/yasserstudio/gpc-plugins/main/registry.json\";\n\n interface RegistryPlugin {\n name: string;\n description: string;\n version: string;\n author?: string;\n tags?: string[];\n }\n\n cmd\n .command(\"search [query]\")\n .description(\"Search the GPC plugin registry\")\n .action(async (query?: string) => {\n try {\n const res = await fetch(REGISTRY_URL);\n if (!res.ok) throw new Error(`Registry fetch failed: ${res.status}`);\n const plugins = (await res.json()) as RegistryPlugin[];\n const filtered = query\n ? plugins.filter(\n (p) =>\n p.name.includes(query) ||\n p.description?.toLowerCase().includes(query.toLowerCase()),\n )\n : plugins;\n\n if (filtered.length === 0) {\n console.log(`No plugins found${query ? ` matching \"${query}\"` : \"\"}.`);\n return;\n }\n\n for (const p of filtered) {\n console.log(` ${p.name}@${p.version}`);\n if (p.description) console.log(` ${p.description}`);\n }\n console.log(`\\nInstall: gpc plugins install <name>`);\n } catch (error) {\n console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);\n process.exit(4);\n }\n });\n\n cmd\n .command(\"install <name>\")\n .description(\"Install a plugin from npm\")\n .action(async (name: string) => {\n const { spawnSync } = await import(\"node:child_process\");\n console.log(`Installing plugin \"${name}\"...`);\n try {\n // Use spawnSync with an array to avoid shell injection — no shell is invoked\n const result = spawnSync(\"npm\", [\"install\", \"-g\", name], { stdio: \"inherit\" });\n if (result.status !== 0) {\n throw new Error(`npm install exited with code ${result.status ?? \"unknown\"}`);\n }\n const { approvePlugin } = await import(\"@gpc-cli/config\");\n await approvePlugin(name);\n console.log(`\\nPlugin \"${name}\" installed and approved. It will be loaded on next run.`);\n console.log(`Configure it in .gpcrc.json: { \"plugins\": [\"${name}\"] }`);\n } catch (error) {\n console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);\n process.exit(4);\n }\n });\n\n cmd\n .command(\"uninstall <name>\")\n .description(\"Uninstall a plugin and revoke its approval\")\n .action(async (name: string) => {\n const { spawnSync } = await import(\"node:child_process\");\n console.log(`Uninstalling plugin \"${name}\"...`);\n try {\n // Use spawnSync with an array to avoid shell injection — no shell is invoked\n const result = spawnSync(\"npm\", [\"uninstall\", \"-g\", name], { stdio: \"inherit\" });\n if (result.status !== 0) {\n throw new Error(`npm uninstall exited with code ${result.status ?? \"unknown\"}`);\n }\n const { revokePluginApproval } = await import(\"@gpc-cli/config\");\n await revokePluginApproval(name);\n console.log(`\\nPlugin \"${name}\" uninstalled and approval revoked.`);\n } catch (error) {\n console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);\n process.exit(4);\n }\n });\n}\n\n/**\n * Wrap all registered commands so plugin hooks fire before/after each command.\n */\nfunction wrapCommandHooks(program: Command, manager: PluginManager): void {\n program.hook(\"preAction\", async (thisCommand) => {\n const event: CommandEvent = {\n command: getFullCommandName(thisCommand),\n args: thisCommand.opts(),\n app: program.opts()[\"app\"] as string | undefined,\n startedAt: new Date(),\n };\n\n // Store on the command for afterCommand/onError\n (thisCommand as unknown as Record<string, unknown>)[\"__pluginEvent\"] = event;\n\n await manager.runBeforeCommand(event);\n });\n\n program.hook(\"postAction\", async (thisCommand) => {\n const event: CommandEvent = (thisCommand as unknown as Record<string, unknown>)[\n \"__pluginEvent\"\n ] as CommandEvent;\n if (!event) return;\n\n const result: CommandResult = {\n success: true,\n durationMs: Date.now() - event.startedAt.getTime(),\n exitCode: 0,\n };\n\n await manager.runAfterCommand(event, result);\n });\n}\n\nfunction getFullCommandName(cmd: Command): string {\n const parts: string[] = [];\n let current: Command | null = cmd;\n while (current && current.name() !== \"gpc\") {\n parts.unshift(current.name());\n current = current.parent;\n }\n return parts.join(\" \");\n}\n","/**\n * Shared error formatting for CLI output.\n * Extracts error code, message, and suggestion from typed errors (GpcError, AuthError, ApiError, ConfigError).\n */\n\ninterface TypedError {\n message: string;\n code?: string;\n suggestion?: string;\n exitCode?: number;\n}\n\nfunction isTypedError(error: unknown): error is Error & TypedError {\n return (\n error instanceof Error && \"code\" in error && typeof (error as TypedError).code === \"string\"\n );\n}\n\nconst AUTH_KEYWORDS = [\"AUTH\", \"UNAUTHENTICATED\", \"PERMISSION_DENIED\", \"401\", \"403\"];\n\nfunction isAuthRelatedError(error: unknown): boolean {\n if (isTypedError(error)) {\n if (error.exitCode === 3) return true;\n if (error.code && AUTH_KEYWORDS.some((k) => error.code?.includes(k))) return true;\n }\n const msg = error instanceof Error ? error.message : String(error);\n return AUTH_KEYWORDS.some((k) => msg.includes(k));\n}\n\n/**\n * Format an error for CLI output. Prints:\n * Error [CODE]: message\n * Suggestion: suggestion (if available)\n *\n * Returns the appropriate exit code.\n */\nexport function handleCliError(error: unknown): number {\n const authHint = isAuthRelatedError(error)\n ? \"\\n→ Run gpc doctor to diagnose your credentials.\"\n : \"\";\n\n if (isTypedError(error)) {\n console.error(`Error [${error.code}]: ${error.message}`);\n if (error.suggestion) {\n console.error(`Suggestion: ${error.suggestion}`);\n }\n if (authHint) console.error(authHint);\n return error.exitCode ?? 1;\n }\n\n const message = error instanceof Error ? error.message : String(error);\n console.error(`Error: ${message}`);\n if (authHint) console.error(authHint);\n return 1;\n}\n"],"mappings":";;;AAAA,SAAS,eAAe,uBAAuB;AAS/C,eAAsB,cAAsC;AAC1D,QAAM,UAAU,IAAI,cAAc;AAGlC,MAAI,QAAQ,IAAI,cAAc,MAAM,KAAK;AACvC,WAAO;AAAA,EACT;AAEA,MAAI;AACF,UAAM,EAAE,WAAW,IAAI,MAAM,OAAO,iBAAiB;AACrD,UAAM,SAAS,MAAM,WAAW;AAChC,UAAM,UAAU,MAAM,gBAAgB,EAAE,eAAe,OAAO,QAAQ,CAAC;AACvE,UAAM,WAAW,IAAI,IAAI,OAAO,mBAAmB,CAAC,CAAC;AAErD,eAAW,UAAU,SAAS;AAC5B,YAAM,YAAY,OAAO,KAAK,WAAW,WAAW;AAEpD,UAAI,CAAC,aAAa,CAAC,SAAS,IAAI,OAAO,IAAI,GAAG;AAG5C,cAAM,UAAU,QAAQ,KAAK,SAAS,SAAS,KAAK,QAAQ,KAAK,SAAS,IAAI;AAC9E,YAAI,CAAC,SAAS;AACZ,kBAAQ;AAAA,YACN,WAAW,OAAO,IAAI,+CAA+C,OAAO,IAAI;AAAA,UAClF;AAAA,QACF;AACA;AAAA,MACF;AAEA,UAAI;AACF,cAAM,QAAQ,KAAK,MAAM;AAAA,MAC3B,QAAQ;AAAA,MAER;AAAA,IACF;AAAA,EACF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,QAAQ,QAAQ,KAAK,CAAC;AAC5B,cAAU,QAAQ;AAAA,EACpB;AACA,SAAO,MAAM,KAAK,GAAG;AACvB;;;ACtbA,SAAS,aAAa,OAA6C;AACjE,SACE,iBAAiB,SAAS,UAAU,SAAS,OAAQ,MAAqB,SAAS;AAEvF;AAEA,IAAM,gBAAgB,CAAC,QAAQ,mBAAmB,qBAAqB,OAAO,KAAK;AAEnF,SAAS,mBAAmB,OAAyB;AACnD,MAAI,aAAa,KAAK,GAAG;AACvB,QAAI,MAAM,aAAa,EAAG,QAAO;AACjC,QAAI,MAAM,QAAQ,cAAc,KAAK,CAAC,MAAM,MAAM,MAAM,SAAS,CAAC,CAAC,EAAG,QAAO;AAAA,EAC/E;AACA,QAAM,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AACjE,SAAO,cAAc,KAAK,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC;AAClD;AASO,SAAS,eAAe,OAAwB;AACrD,QAAM,WAAW,mBAAmB,KAAK,IACrC,0DACA;AAEJ,MAAI,aAAa,KAAK,GAAG;AACvB,YAAQ,MAAM,UAAU,MAAM,IAAI,MAAM,MAAM,OAAO,EAAE;AACvD,QAAI,MAAM,YAAY;AACpB,cAAQ,MAAM,eAAe,MAAM,UAAU,EAAE;AAAA,IACjD;AACA,QAAI,SAAU,SAAQ,MAAM,QAAQ;AACpC,WAAO,MAAM,YAAY;AAAA,EAC3B;AAEA,QAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AACrE,UAAQ,MAAM,UAAU,OAAO,EAAE;AACjC,MAAI,SAAU,SAAQ,MAAM,QAAQ;AACpC,SAAO;AACT;","names":["_","loader"]}
@@ -26,12 +26,16 @@ function dim(s) {
26
26
  function gray(s) {
27
27
  return wrap(90, s);
28
28
  }
29
+ function bold(s) {
30
+ return wrap(1, s);
31
+ }
29
32
 
30
33
  export {
31
34
  green,
32
35
  red,
33
36
  yellow,
34
37
  dim,
35
- gray
38
+ gray,
39
+ bold
36
40
  };
37
- //# sourceMappingURL=chunk-P5GF73XK.js.map
41
+ //# sourceMappingURL=chunk-FAN4ZITI.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/colors.ts"],"sourcesContent":["// Named exports only. No default export.\n\nfunction isColorEnabled(): boolean {\n if (process.env[\"NO_COLOR\"] !== undefined && process.env[\"NO_COLOR\"] !== \"\") return false;\n if (\n process.env[\"FORCE_COLOR\"] === \"1\" ||\n process.env[\"FORCE_COLOR\"] === \"2\" ||\n process.env[\"FORCE_COLOR\"] === \"3\"\n )\n return true;\n return process.stdout.isTTY ?? false;\n}\n\nfunction wrap(code: number, s: string): string {\n if (!isColorEnabled()) return s;\n return `\\x1b[${code}m${s}\\x1b[0m`;\n}\n\nexport function green(s: string): string {\n return wrap(32, s);\n}\nexport function red(s: string): string {\n return wrap(31, s);\n}\nexport function yellow(s: string): string {\n return wrap(33, s);\n}\nexport function dim(s: string): string {\n return wrap(2, s);\n}\nexport function gray(s: string): string {\n return wrap(90, s);\n}\nexport function bold(s: string): string {\n return wrap(1, s);\n}\n"],"mappings":";;;AAEA,SAAS,iBAA0B;AACjC,MAAI,QAAQ,IAAI,UAAU,MAAM,UAAa,QAAQ,IAAI,UAAU,MAAM,GAAI,QAAO;AACpF,MACE,QAAQ,IAAI,aAAa,MAAM,OAC/B,QAAQ,IAAI,aAAa,MAAM,OAC/B,QAAQ,IAAI,aAAa,MAAM;AAE/B,WAAO;AACT,SAAO,QAAQ,OAAO,SAAS;AACjC;AAEA,SAAS,KAAK,MAAc,GAAmB;AAC7C,MAAI,CAAC,eAAe,EAAG,QAAO;AAC9B,SAAO,QAAQ,IAAI,IAAI,CAAC;AAC1B;AAEO,SAAS,MAAM,GAAmB;AACvC,SAAO,KAAK,IAAI,CAAC;AACnB;AACO,SAAS,IAAI,GAAmB;AACrC,SAAO,KAAK,IAAI,CAAC;AACnB;AACO,SAAS,OAAO,GAAmB;AACxC,SAAO,KAAK,IAAI,CAAC;AACnB;AACO,SAAS,IAAI,GAAmB;AACrC,SAAO,KAAK,GAAG,CAAC;AAClB;AACO,SAAS,KAAK,GAAmB;AACtC,SAAO,KAAK,IAAI,CAAC;AACnB;","names":[]}
1
+ {"version":3,"sources":["../src/colors.ts"],"sourcesContent":["// Named exports only. No default export.\n\nfunction isColorEnabled(): boolean {\n if (process.env[\"NO_COLOR\"] !== undefined && process.env[\"NO_COLOR\"] !== \"\") return false;\n if (\n process.env[\"FORCE_COLOR\"] === \"1\" ||\n process.env[\"FORCE_COLOR\"] === \"2\" ||\n process.env[\"FORCE_COLOR\"] === \"3\"\n )\n return true;\n return process.stdout.isTTY ?? false;\n}\n\nfunction wrap(code: number, s: string): string {\n if (!isColorEnabled()) return s;\n return `\\x1b[${code}m${s}\\x1b[0m`;\n}\n\nexport function green(s: string): string {\n return wrap(32, s);\n}\nexport function red(s: string): string {\n return wrap(31, s);\n}\nexport function yellow(s: string): string {\n return wrap(33, s);\n}\nexport function dim(s: string): string {\n return wrap(2, s);\n}\nexport function gray(s: string): string {\n return wrap(90, s);\n}\nexport function bold(s: string): string {\n return wrap(1, s);\n}\n"],"mappings":";;;AAEA,SAAS,iBAA0B;AACjC,MAAI,QAAQ,IAAI,UAAU,MAAM,UAAa,QAAQ,IAAI,UAAU,MAAM,GAAI,QAAO;AACpF,MACE,QAAQ,IAAI,aAAa,MAAM,OAC/B,QAAQ,IAAI,aAAa,MAAM,OAC/B,QAAQ,IAAI,aAAa,MAAM;AAE/B,WAAO;AACT,SAAO,QAAQ,OAAO,SAAS;AACjC;AAEA,SAAS,KAAK,MAAc,GAAmB;AAC7C,MAAI,CAAC,eAAe,EAAG,QAAO;AAC9B,SAAO,QAAQ,IAAI,IAAI,CAAC;AAC1B;AAEO,SAAS,MAAM,GAAmB;AACvC,SAAO,KAAK,IAAI,CAAC;AACnB;AACO,SAAS,IAAI,GAAmB;AACrC,SAAO,KAAK,IAAI,CAAC;AACnB;AACO,SAAS,OAAO,GAAmB;AACxC,SAAO,KAAK,IAAI,CAAC;AACnB;AACO,SAAS,IAAI,GAAmB;AACrC,SAAO,KAAK,GAAG,CAAC;AAClB;AACO,SAAS,KAAK,GAAmB;AACtC,SAAO,KAAK,IAAI,CAAC;AACnB;AACO,SAAS,KAAK,GAAmB;AACtC,SAAO,KAAK,GAAG,CAAC;AAClB;","names":[]}
@@ -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-4BUPAVFT.js");
81
+ const { registerDoctorCommand } = await import("./doctor-3Z4ARPM2.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");
@@ -104,4 +104,4 @@ Configuration file created: ${path}`);
104
104
  export {
105
105
  registerConfigCommands
106
106
  };
107
- //# sourceMappingURL=config-F2U3KUHX.js.map
107
+ //# sourceMappingURL=config-36GIPNWX.js.map
@@ -0,0 +1,101 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ bold,
4
+ dim,
5
+ green,
6
+ red,
7
+ yellow
8
+ } from "./chunk-FAN4ZITI.js";
9
+ import {
10
+ getOutputFormat
11
+ } from "./chunk-ELXAK7GI.js";
12
+
13
+ // src/commands/diff.ts
14
+ import { loadConfig } from "@gpc-cli/config";
15
+ import { resolveAuth } from "@gpc-cli/auth";
16
+ import { createApiClient } from "@gpc-cli/api";
17
+ import { getReleasesStatus, diffReleases, diffListingsCommand, formatOutput } from "@gpc-cli/core";
18
+ function resolvePackageName(cliApp, config) {
19
+ const pkg = cliApp || config.app || process.env["GPC_APP"];
20
+ if (!pkg) {
21
+ console.error("Error: No package name. Use --app, set GPC_APP, or add 'app' to .gpcrc.json");
22
+ process.exit(2);
23
+ }
24
+ return pkg;
25
+ }
26
+ function registerDiffCommand(program) {
27
+ program.command("diff").description("Preview current release state and pending changes (read-only)").option("--from <track>", "Compare releases from this track").option("--to <track>", "Compare releases to this track").option("--metadata <dir>", "Compare local metadata directory vs remote listings").action(async (options) => {
28
+ const config = await loadConfig();
29
+ const packageName = resolvePackageName(program.opts()["app"], config);
30
+ const format = getOutputFormat(program, config);
31
+ const auth = await resolveAuth({ serviceAccountPath: config.auth?.serviceAccount });
32
+ const client = createApiClient(auth);
33
+ try {
34
+ const sections = {};
35
+ const releases = await getReleasesStatus(client, packageName);
36
+ sections["releases"] = releases;
37
+ let trackDiff;
38
+ if (options.from && options.to) {
39
+ trackDiff = await diffReleases(client, packageName, options.from, options.to);
40
+ sections["trackDiff"] = trackDiff;
41
+ }
42
+ let metadataDiff;
43
+ if (options.metadata) {
44
+ metadataDiff = await diffListingsCommand(client, packageName, options.metadata);
45
+ sections["metadata"] = metadataDiff;
46
+ }
47
+ if (format === "json") {
48
+ console.log(formatOutput(sections, format));
49
+ return;
50
+ }
51
+ console.log(bold("GPC Diff \u2014 Current State"));
52
+ console.log("");
53
+ console.log(bold("Releases"));
54
+ if (releases.length === 0) {
55
+ console.log(dim(" No releases found"));
56
+ } else {
57
+ for (const r of releases) {
58
+ const statusColor = r.status === "completed" ? green : r.status === "inProgress" ? yellow : dim;
59
+ const fraction = r.userFraction ? ` ${yellow(`${Math.round(r.userFraction * 100)}%`)}` : "";
60
+ const versions = r.versionCodes.join(", ");
61
+ console.log(
62
+ ` ${r.track.padEnd(14)} ${statusColor(r.status.padEnd(12))} v${versions}${fraction}`
63
+ );
64
+ }
65
+ }
66
+ console.log("");
67
+ if (trackDiff) {
68
+ console.log(bold(`Track Diff: ${trackDiff.fromTrack} \u2192 ${trackDiff.toTrack}`));
69
+ if (trackDiff.diffs.length === 0) {
70
+ console.log(dim(" No differences"));
71
+ } else {
72
+ for (const d of trackDiff.diffs) {
73
+ console.log(
74
+ ` ${d.field.padEnd(16)} ${red(d.track1Value || "(empty)")} \u2192 ${green(d.track2Value || "(empty)")}`
75
+ );
76
+ }
77
+ }
78
+ console.log("");
79
+ }
80
+ if (metadataDiff && Array.isArray(metadataDiff)) {
81
+ console.log(bold("Metadata Diff (local vs remote)"));
82
+ if (metadataDiff.length === 0) {
83
+ console.log(dim(" No differences \u2014 local matches remote"));
84
+ } else {
85
+ for (const d of metadataDiff) {
86
+ const icon = d.status === "added" ? green("+") : d.status === "removed" ? red("-") : yellow("~");
87
+ console.log(` ${icon} ${d.language}/${d.field}: ${d.status}`);
88
+ }
89
+ }
90
+ console.log("");
91
+ }
92
+ } catch (error) {
93
+ console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
94
+ process.exit(4);
95
+ }
96
+ });
97
+ }
98
+ export {
99
+ registerDiffCommand
100
+ };
101
+ //# sourceMappingURL=diff-V7VBKG27.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/diff.ts"],"sourcesContent":["// Named exports only. No default export.\n\nimport type { Command } from \"commander\";\nimport { loadConfig } from \"@gpc-cli/config\";\nimport { resolveAuth } from \"@gpc-cli/auth\";\nimport { createApiClient } from \"@gpc-cli/api\";\nimport { getReleasesStatus, diffReleases, diffListingsCommand, formatOutput } from \"@gpc-cli/core\";\nimport type { ReleaseDiff } from \"@gpc-cli/core\";\nimport { getOutputFormat } from \"../format.js\";\nimport { green, red, yellow, dim, bold } from \"../colors.js\";\n\nfunction resolvePackageName(cliApp: string | undefined, config: { app?: string }): string {\n const pkg = cliApp || config.app || process.env[\"GPC_APP\"];\n if (!pkg) {\n console.error(\"Error: No package name. Use --app, set GPC_APP, or add 'app' to .gpcrc.json\");\n process.exit(2);\n }\n return pkg;\n}\n\nexport function registerDiffCommand(program: Command): void {\n program\n .command(\"diff\")\n .description(\"Preview current release state and pending changes (read-only)\")\n .option(\"--from <track>\", \"Compare releases from this track\")\n .option(\"--to <track>\", \"Compare releases to this track\")\n .option(\"--metadata <dir>\", \"Compare local metadata directory vs remote listings\")\n .action(async (options) => {\n const config = await loadConfig();\n const packageName = resolvePackageName(program.opts()[\"app\"], config);\n const format = getOutputFormat(program, config);\n\n const auth = await resolveAuth({ serviceAccountPath: config.auth?.serviceAccount });\n const client = createApiClient(auth);\n\n try {\n const sections: Record<string, unknown> = {};\n\n // Always show release status across all tracks\n const releases = await getReleasesStatus(client, packageName);\n sections[\"releases\"] = releases;\n\n // Track-to-track diff if specified\n let trackDiff: { fromTrack: string; toTrack: string; diffs: ReleaseDiff[] } | undefined;\n if (options.from && options.to) {\n trackDiff = await diffReleases(client, packageName, options.from, options.to);\n sections[\"trackDiff\"] = trackDiff;\n }\n\n // Metadata diff if specified\n let metadataDiff: unknown;\n if (options.metadata) {\n metadataDiff = await diffListingsCommand(client, packageName, options.metadata);\n sections[\"metadata\"] = metadataDiff;\n }\n\n if (format === \"json\") {\n console.log(formatOutput(sections, format));\n return;\n }\n\n // Human-readable output\n console.log(bold(\"GPC Diff — Current State\"));\n console.log(\"\");\n\n // Release status\n console.log(bold(\"Releases\"));\n if (releases.length === 0) {\n console.log(dim(\" No releases found\"));\n } else {\n for (const r of releases) {\n const statusColor =\n r.status === \"completed\" ? green : r.status === \"inProgress\" ? yellow : dim;\n const fraction = r.userFraction\n ? ` ${yellow(`${Math.round(r.userFraction * 100)}%`)}`\n : \"\";\n const versions = r.versionCodes.join(\", \");\n console.log(\n ` ${r.track.padEnd(14)} ${statusColor(r.status.padEnd(12))} v${versions}${fraction}`,\n );\n }\n }\n console.log(\"\");\n\n // Track diff\n if (trackDiff) {\n console.log(bold(`Track Diff: ${trackDiff.fromTrack} → ${trackDiff.toTrack}`));\n if (trackDiff.diffs.length === 0) {\n console.log(dim(\" No differences\"));\n } else {\n for (const d of trackDiff.diffs) {\n console.log(\n ` ${d.field.padEnd(16)} ${red(d.track1Value || \"(empty)\")} → ${green(d.track2Value || \"(empty)\")}`,\n );\n }\n }\n console.log(\"\");\n }\n\n // Metadata diff\n if (metadataDiff && Array.isArray(metadataDiff)) {\n console.log(bold(\"Metadata Diff (local vs remote)\"));\n if (metadataDiff.length === 0) {\n console.log(dim(\" No differences — local matches remote\"));\n } else {\n for (const d of metadataDiff as Array<{\n language: string;\n field: string;\n status: string;\n }>) {\n const icon =\n d.status === \"added\" ? green(\"+\") : d.status === \"removed\" ? red(\"-\") : yellow(\"~\");\n console.log(` ${icon} ${d.language}/${d.field}: ${d.status}`);\n }\n }\n console.log(\"\");\n }\n } catch (error) {\n console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);\n process.exit(4);\n }\n });\n}\n"],"mappings":";;;;;;;;;;;;;AAGA,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,mBAAmB,cAAc,qBAAqB,oBAAoB;AAKnF,SAAS,mBAAmB,QAA4B,QAAkC;AACxF,QAAM,MAAM,UAAU,OAAO,OAAO,QAAQ,IAAI,SAAS;AACzD,MAAI,CAAC,KAAK;AACR,YAAQ,MAAM,6EAA6E;AAC3F,YAAQ,KAAK,CAAC;AAAA,EAChB;AACA,SAAO;AACT;AAEO,SAAS,oBAAoB,SAAwB;AAC1D,UACG,QAAQ,MAAM,EACd,YAAY,+DAA+D,EAC3E,OAAO,kBAAkB,kCAAkC,EAC3D,OAAO,gBAAgB,gCAAgC,EACvD,OAAO,oBAAoB,qDAAqD,EAChF,OAAO,OAAO,YAAY;AACzB,UAAM,SAAS,MAAM,WAAW;AAChC,UAAM,cAAc,mBAAmB,QAAQ,KAAK,EAAE,KAAK,GAAG,MAAM;AACpE,UAAM,SAAS,gBAAgB,SAAS,MAAM;AAE9C,UAAM,OAAO,MAAM,YAAY,EAAE,oBAAoB,OAAO,MAAM,eAAe,CAAC;AAClF,UAAM,SAAS,gBAAgB,IAAI;AAEnC,QAAI;AACF,YAAM,WAAoC,CAAC;AAG3C,YAAM,WAAW,MAAM,kBAAkB,QAAQ,WAAW;AAC5D,eAAS,UAAU,IAAI;AAGvB,UAAI;AACJ,UAAI,QAAQ,QAAQ,QAAQ,IAAI;AAC9B,oBAAY,MAAM,aAAa,QAAQ,aAAa,QAAQ,MAAM,QAAQ,EAAE;AAC5E,iBAAS,WAAW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AAA,UACF;AAAA,QACF;AACA,gBAAQ,IAAI,EAAE;AAAA,MAChB;AAGA,UAAI,gBAAgB,MAAM,QAAQ,YAAY,GAAG;AAC/C,gBAAQ,IAAI,KAAK,iCAAiC,CAAC;AACnD,YAAI,aAAa,WAAW,GAAG;AAC7B,kBAAQ,IAAI,IAAI,8CAAyC,CAAC;AAAA,QAC5D,OAAO;AACL,qBAAW,KAAK,cAIZ;AACF,kBAAM,OACJ,EAAE,WAAW,UAAU,MAAM,GAAG,IAAI,EAAE,WAAW,YAAY,IAAI,GAAG,IAAI,OAAO,GAAG;AACpF,oBAAQ,IAAI,KAAK,IAAI,IAAI,EAAE,QAAQ,IAAI,EAAE,KAAK,KAAK,EAAE,MAAM,EAAE;AAAA,UAC/D;AAAA,QACF;AACA,gBAAQ,IAAI,EAAE;AAAA,MAChB;AAAA,IACF,SAAS,OAAO;AACd,cAAQ,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC,EAAE;AAChF,cAAQ,KAAK,CAAC;AAAA,IAChB;AAAA,EACF,CAAC;AACL;","names":[]}
@@ -3,7 +3,7 @@ import {
3
3
  green,
4
4
  red,
5
5
  yellow
6
- } from "./chunk-P5GF73XK.js";
6
+ } from "./chunk-FAN4ZITI.js";
7
7
 
8
8
  // src/commands/doctor.ts
9
9
  import { loadConfig, getCacheDir, getConfigDir } from "@gpc-cli/config";
@@ -369,4 +369,4 @@ export {
369
369
  checkProxy,
370
370
  registerDoctorCommand
371
371
  };
372
- //# sourceMappingURL=doctor-4BUPAVFT.js.map
372
+ //# sourceMappingURL=doctor-3Z4ARPM2.js.map
@@ -6,18 +6,35 @@ import "./chunk-4O4D5SGL.js";
6
6
 
7
7
  // src/commands/feedback.ts
8
8
  import { execFile } from "child_process";
9
+ import { listAuditEvents } from "@gpc-cli/core";
9
10
  function registerFeedbackCommand(program) {
10
- program.command("feedback").description("Open a pre-filled GitHub issue with system diagnostics").option("--title <title>", "Issue title").action(async (opts) => {
11
- const version = "0.9.38";
12
- const body = [
11
+ program.command("feedback").description("Open a pre-filled GitHub issue with system diagnostics").option("--title <title>", "Issue title").option("--print", "Print the report to stdout instead of opening a browser").action(async (opts) => {
12
+ const version = "0.9.39";
13
+ let lastCommand = "";
14
+ try {
15
+ const events = await listAuditEvents({ limit: 3 });
16
+ if (events.length > 0) {
17
+ lastCommand = events.map((e) => `\`${e.command}${e.args ? " " + e.args : ""}\` (${e.timestamp})`).join("\n- ");
18
+ }
19
+ } catch {
20
+ }
21
+ const sections = [
13
22
  "**GPC version:** " + version,
14
23
  "**Node:** " + process.version,
15
24
  "**Platform:** " + process.platform + "/" + process.arch,
16
25
  "**Install method:** " + detectInstallMethod(),
17
- "",
18
- "**Describe the issue:**",
19
- "<!-- Replace this with your bug description -->"
20
- ].join("\n");
26
+ "**Shell:** " + (process.env["SHELL"] || process.env["ComSpec"] || "unknown"),
27
+ "**CI:** " + (process.env["CI"] ? "yes" : "no")
28
+ ];
29
+ if (lastCommand) {
30
+ sections.push("", "**Recent commands:**", "- " + lastCommand);
31
+ }
32
+ sections.push("", "**Describe the issue:**", "<!-- Replace this with your bug description -->");
33
+ const body = sections.join("\n");
34
+ if (opts.print) {
35
+ console.log(body);
36
+ return;
37
+ }
21
38
  const params = new URLSearchParams({
22
39
  title: opts.title ?? "Bug report",
23
40
  body,
@@ -43,4 +60,4 @@ ${url}`);
43
60
  export {
44
61
  registerFeedbackCommand
45
62
  };
46
- //# sourceMappingURL=feedback-RMOLFCQW.js.map
63
+ //# sourceMappingURL=feedback-TTMAF5I6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/feedback.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { execFile } from \"node:child_process\";\nimport { listAuditEvents } from \"@gpc-cli/core\";\nimport { detectInstallMethod } from \"../updater.js\";\n\nexport function registerFeedbackCommand(program: Command): void {\n program\n .command(\"feedback\")\n .description(\"Open a pre-filled GitHub issue with system diagnostics\")\n .option(\"--title <title>\", \"Issue title\")\n .option(\"--print\", \"Print the report to stdout instead of opening a browser\")\n .action(async (opts) => {\n const version = process.env[\"__GPC_VERSION\"] || \"0.0.0\";\n\n // Collect last audit entry for context\n let lastCommand = \"\";\n try {\n const events = await listAuditEvents({ limit: 3 });\n if (events.length > 0) {\n lastCommand = events\n .map((e) => `\\`${e.command}${e.args ? \" \" + e.args : \"\"}\\` (${e.timestamp})`)\n .join(\"\\n- \");\n }\n } catch {\n // Audit log unavailable — skip\n }\n\n const sections = [\n \"**GPC version:** \" + version,\n \"**Node:** \" + process.version,\n \"**Platform:** \" + process.platform + \"/\" + process.arch,\n \"**Install method:** \" + detectInstallMethod(),\n \"**Shell:** \" + (process.env[\"SHELL\"] || process.env[\"ComSpec\"] || \"unknown\"),\n \"**CI:** \" + (process.env[\"CI\"] ? \"yes\" : \"no\"),\n ];\n\n if (lastCommand) {\n sections.push(\"\", \"**Recent commands:**\", \"- \" + lastCommand);\n }\n\n sections.push(\"\", \"**Describe the issue:**\", \"<!-- Replace this with your bug description -->\");\n\n const body = sections.join(\"\\n\");\n\n if (opts.print) {\n console.log(body);\n return;\n }\n const params = new URLSearchParams({\n title: opts.title ?? \"Bug report\",\n body,\n labels: \"bug\",\n });\n const url = `https://github.com/yasserstudio/gpc/issues/new?${params}`;\n if (process.platform === \"win32\") {\n execFile(\"cmd\", [\"/c\", \"start\", \"\", url], (err) => {\n if (err) console.log(`Open in your browser:\\n${url}`);\n else console.log(\"Opened GitHub issue form in your browser.\");\n });\n } else {\n const cmd = process.platform === \"darwin\" ? \"open\" : \"xdg-open\";\n execFile(cmd, [url], (err) => {\n if (err) console.log(`Open in your browser:\\n${url}`);\n else console.log(\"Opened GitHub issue form in your browser.\");\n });\n }\n });\n}\n"],"mappings":";;;;;;;AACA,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAGzB,SAAS,wBAAwB,SAAwB;AAC9D,UACG,QAAQ,UAAU,EAClB,YAAY,wDAAwD,EACpE,OAAO,mBAAmB,a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ACL,YAAM,MAAM,QAAQ,aAAa,WAAW,SAAS;AACrD,eAAS,KAAK,CAAC,GAAG,GAAG,CAAC,QAAQ;AAC5B,YAAI,IAAK,SAAQ,IAAI;AAAA,EAA0B,GAAG,EAAE;AAAA,YAC/C,SAAQ,IAAI,2CAA2C;AAAA,MAC9D,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACL;","names":[]}
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createProgram,
4
4
  handleCliError
5
- } from "./chunk-NQABG7D4.js";
5
+ } from "./chunk-ELZTOKWU.js";
6
6
  export {
7
7
  createProgram,
8
8
  handleCliError
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ dim,
4
+ green,
5
+ yellow
6
+ } from "./chunk-FAN4ZITI.js";
7
+ import {
8
+ isInteractive,
9
+ promptInput,
10
+ promptSelect
11
+ } from "./chunk-NV75I5VP.js";
12
+
13
+ // src/commands/init.ts
14
+ import { initProject } from "@gpc-cli/core";
15
+ function registerInitCommand(program) {
16
+ program.command("init").description("Scaffold project config, metadata, and CI templates").option("--app <package>", "Android package name (e.g. com.example.app)").option("--ci <platform>", "Generate CI template: github, gitlab").option("--force", "Overwrite existing files").action(async (options) => {
17
+ let app = options["app"];
18
+ let ci = options["ci"];
19
+ if (isInteractive(program) && !app) {
20
+ app = await promptInput("Package name (e.g. com.example.app)");
21
+ if (!app) app = void 0;
22
+ }
23
+ if (isInteractive(program) && !ci) {
24
+ const ciChoice = await promptSelect("Generate CI template?", ["none", "github", "gitlab"]);
25
+ if (ciChoice !== "none") ci = ciChoice;
26
+ }
27
+ if (ci && ci !== "github" && ci !== "gitlab") {
28
+ console.error(`Error: Invalid --ci value "${ci}". Use: github, gitlab`);
29
+ process.exit(2);
30
+ }
31
+ const result = await initProject({
32
+ dir: process.cwd(),
33
+ app: app || void 0,
34
+ ci,
35
+ skipExisting: !options["force"]
36
+ });
37
+ if (result.created.length === 0 && result.skipped.length > 0) {
38
+ console.log(yellow("\u26A0 All files already exist. Use --force to overwrite."));
39
+ for (const f of result.skipped) {
40
+ console.log(` ${dim("skip")} ${f}`);
41
+ }
42
+ return;
43
+ }
44
+ for (const f of result.created) {
45
+ console.log(` ${green("\u2713")} ${f}`);
46
+ }
47
+ for (const f of result.skipped) {
48
+ console.log(` ${dim("skip")} ${f}`);
49
+ }
50
+ console.log("");
51
+ console.log(
52
+ `${green("\u2713")} Project initialized (${result.created.length} file${result.created.length === 1 ? "" : "s"} created)`
53
+ );
54
+ if (result.created.some((f) => f.includes(".gpcrc.json"))) {
55
+ console.log(dim("\nNext steps:"));
56
+ console.log(dim(" 1. gpc auth login --service-account path/to/key.json"));
57
+ console.log(dim(" 2. gpc doctor"));
58
+ console.log(dim(" 3. gpc status"));
59
+ }
60
+ });
61
+ }
62
+ export {
63
+ registerInitCommand
64
+ };
65
+ //# sourceMappingURL=init-FXB25TPF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/init.ts"],"sourcesContent":["// Named exports only. No default export.\n\nimport type { Command } from \"commander\";\nimport { initProject } from \"@gpc-cli/core\";\nimport { isInteractive, promptInput, promptSelect } from \"../prompt.js\";\nimport { green, dim, yellow } from \"../colors.js\";\n\nexport function registerInitCommand(program: Command): void {\n program\n .command(\"init\")\n .description(\"Scaffold project config, metadata, and CI templates\")\n .option(\"--app <package>\", \"Android package name (e.g. com.example.app)\")\n .option(\"--ci <platform>\", \"Generate CI template: github, gitlab\")\n .option(\"--force\", \"Overwrite existing files\")\n .action(async (options) => {\n let app = options[\"app\"] as string | undefined;\n let ci = options[\"ci\"] as \"github\" | \"gitlab\" | undefined;\n\n // Interactive prompts when TTY\n if (isInteractive(program) && !app) {\n app = await promptInput(\"Package name (e.g. com.example.app)\");\n if (!app) app = undefined;\n }\n\n if (isInteractive(program) && !ci) {\n const ciChoice = await promptSelect(\"Generate CI template?\", [\"none\", \"github\", \"gitlab\"]);\n if (ciChoice !== \"none\") ci = ciChoice as \"github\" | \"gitlab\";\n }\n\n if (ci && ci !== \"github\" && ci !== \"gitlab\") {\n console.error(`Error: Invalid --ci value \"${ci}\". Use: github, gitlab`);\n process.exit(2);\n }\n\n const result = await initProject({\n dir: process.cwd(),\n app: app || undefined,\n ci,\n skipExisting: !options[\"force\"],\n });\n\n if (result.created.length === 0 && result.skipped.length > 0) {\n console.log(yellow(\"⚠ All files already exist. Use --force to overwrite.\"));\n for (const f of result.skipped) {\n console.log(` ${dim(\"skip\")} ${f}`);\n }\n return;\n }\n\n for (const f of result.created) {\n console.log(` ${green(\"✓\")} ${f}`);\n }\n for (const f of result.skipped) {\n console.log(` ${dim(\"skip\")} ${f}`);\n }\n\n console.log(\"\");\n console.log(\n `${green(\"✓\")} Project initialized (${result.created.length} file${result.created.length === 1 ? \"\" : \"s\"} created)`,\n );\n\n if (result.created.some((f) => f.includes(\".gpcrc.json\"))) {\n console.log(dim(\"\\nNext steps:\"));\n console.log(dim(\" 1. gpc auth login --service-account path/to/key.json\"));\n console.log(dim(\" 2. gpc doctor\"));\n console.log(dim(\" 3. gpc status\"));\n }\n });\n}\n"],"mappings":";;;;;;;;;;;;;AAGA,SAAS,mBAAmB;AAIrB,SAAS,oBAAoB,SAAwB;AAC1D,UACG,QAAQ,MAAM,EACd,YAAY,qDAAqD,EACjE,OAAO,mBAAmB,6CAA6C,EACvE,OAAO,mBAAmB,sCAAsC,EAChE,OAAO,WAAW,0BAA0B,EAC5C,OAAO,OAAO,YAAY;AACzB,QAAI,MAAM,QAAQ,KAAK;AACvB,QAAI,KAAK,QAAQ,IAAI;AAGrB,QAAI,cAAc,OAAO,KAAK,CAAC,KAAK;AAClC,YAAM,MAAM,YAAY,qCAAqC;AAC7D,UAAI,CAAC,IAAK,OAAM;AAAA,IAClB;AAEA,QAAI,cAAc,OAAO,KAAK,CAAC,IAAI;AACjC,YAAM,WAAW,MAAM,aAAa,yBAAyB,CAAC,QAAQ,UAAU,QAAQ,CAAC;AACzF,UAAI,aAAa,OAAQ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.js";
9
+ } from "./chunk-FAN4ZITI.js";
10
10
  import {
11
11
  getOutputFormat
12
12
  } from "./chunk-ELXAK7GI.js";
@@ -473,4 +473,4 @@ Missing locales: ${missingLocales.join(", ")}`);
473
473
  export {
474
474
  registerListingsCommands
475
475
  };
476
- //# sourceMappingURL=listings-IVHZJNES.js.map
476
+ //# sourceMappingURL=listings-JOFAZBKU.js.map