@gpc-cli/cli 0.9.43 → 0.9.45

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 (47) hide show
  1. package/dist/bin.js +2 -2
  2. package/dist/changelog-ZYD6W5IV.js +53 -0
  3. package/dist/changelog-ZYD6W5IV.js.map +1 -0
  4. package/dist/{chunk-VK53B56I.js → chunk-SEVX56VN.js} +23 -20
  5. package/dist/chunk-SEVX56VN.js.map +1 -0
  6. package/dist/{config-222P3MKK.js → config-BUXPDN7N.js} +1 -1
  7. package/dist/config-BUXPDN7N.js.map +1 -0
  8. package/dist/{data-safety-L64D6ZZX.js → data-safety-Q7FTCEWU.js} +5 -5
  9. package/dist/{device-tiers-UZVKC726.js → device-tiers-MIOQEXYY.js} +5 -5
  10. package/dist/{external-transactions-6DWF5U3Q.js → external-transactions-2GWIMUVM.js} +5 -5
  11. package/dist/{feedback-MVLGSBOE.js → feedback-DPTO6DUT.js} +2 -2
  12. package/dist/{iap-QTO5Q6SN.js → iap-ICAEQLK5.js} +5 -5
  13. package/dist/index.js +1 -1
  14. package/dist/{internal-sharing-DEOI3ENH.js → internal-sharing-3U2XFHA4.js} +5 -5
  15. package/dist/{listings-NJWIKN4J.js → listings-77HZW4S5.js} +5 -5
  16. package/dist/{one-time-products-6CQNNTBX.js → one-time-products-LHZAXQES.js} +5 -5
  17. package/dist/{publish-OJJFPDRM.js → publish-Q5ZKEKZ5.js} +4 -4
  18. package/dist/{purchases-745IKIG5.js → purchases-43AKV6HG.js} +133 -5
  19. package/dist/purchases-43AKV6HG.js.map +1 -0
  20. package/dist/{recovery-BBF6NQ4C.js → recovery-5EV2R476.js} +5 -5
  21. package/dist/{reviews-2B5SKNXW.js → reviews-2CWOI5CV.js} +5 -5
  22. package/dist/{subscriptions-4XKNTOOL.js → subscriptions-CI3JH3VQ.js} +5 -5
  23. package/dist/{testers-3Y753PFW.js → testers-NZOFA3EF.js} +5 -5
  24. package/dist/{train-YA4KGVGZ.js → train-CJJVLY4B.js} +4 -4
  25. package/dist/train-CJJVLY4B.js.map +1 -0
  26. package/dist/{update-XUZHWWDD.js → update-NAK6CMUX.js} +2 -2
  27. package/dist/{version-ABKNE54K.js → version-N64UBW7A.js} +2 -2
  28. package/package.json +5 -5
  29. package/dist/chunk-VK53B56I.js.map +0 -1
  30. package/dist/config-222P3MKK.js.map +0 -1
  31. package/dist/purchases-745IKIG5.js.map +0 -1
  32. package/dist/train-YA4KGVGZ.js.map +0 -1
  33. /package/dist/{data-safety-L64D6ZZX.js.map → data-safety-Q7FTCEWU.js.map} +0 -0
  34. /package/dist/{device-tiers-UZVKC726.js.map → device-tiers-MIOQEXYY.js.map} +0 -0
  35. /package/dist/{external-transactions-6DWF5U3Q.js.map → external-transactions-2GWIMUVM.js.map} +0 -0
  36. /package/dist/{feedback-MVLGSBOE.js.map → feedback-DPTO6DUT.js.map} +0 -0
  37. /package/dist/{iap-QTO5Q6SN.js.map → iap-ICAEQLK5.js.map} +0 -0
  38. /package/dist/{internal-sharing-DEOI3ENH.js.map → internal-sharing-3U2XFHA4.js.map} +0 -0
  39. /package/dist/{listings-NJWIKN4J.js.map → listings-77HZW4S5.js.map} +0 -0
  40. /package/dist/{one-time-products-6CQNNTBX.js.map → one-time-products-LHZAXQES.js.map} +0 -0
  41. /package/dist/{publish-OJJFPDRM.js.map → publish-Q5ZKEKZ5.js.map} +0 -0
  42. /package/dist/{recovery-BBF6NQ4C.js.map → recovery-5EV2R476.js.map} +0 -0
  43. /package/dist/{reviews-2B5SKNXW.js.map → reviews-2CWOI5CV.js.map} +0 -0
  44. /package/dist/{subscriptions-4XKNTOOL.js.map → subscriptions-CI3JH3VQ.js.map} +0 -0
  45. /package/dist/{testers-3Y753PFW.js.map → testers-NZOFA3EF.js.map} +0 -0
  46. /package/dist/{update-XUZHWWDD.js.map → update-NAK6CMUX.js.map} +0 -0
  47. /package/dist/{version-ABKNE54K.js.map → version-N64UBW7A.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-VK53B56I.js";
6
+ } from "./chunk-SEVX56VN.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.43";
47
+ var currentVersion = "0.9.45";
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")) {
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ getOutputFormat
4
+ } from "./chunk-ELXAK7GI.js";
5
+
6
+ // src/commands/changelog.ts
7
+ import { fetchChangelog, formatChangelogEntry } from "@gpc-cli/core";
8
+ import { formatOutput } from "@gpc-cli/core";
9
+ import { loadConfig } from "@gpc-cli/config";
10
+ function registerChangelogCommand(program) {
11
+ program.command("changelog").description("Show release history").option("-n, --limit <count>", "Number of releases to show", parseInt, 5).option("--version <tag>", "Show a specific version (e.g., v0.9.43)").option("--all", "Show all releases").action(async (opts) => {
12
+ const config = await loadConfig();
13
+ const format = getOutputFormat(program, config);
14
+ try {
15
+ const entries = await fetchChangelog({
16
+ limit: opts.all ? 100 : opts.limit,
17
+ version: opts.version
18
+ });
19
+ if (entries.length === 0) {
20
+ console.log("No releases found.");
21
+ return;
22
+ }
23
+ if (format === "json") {
24
+ console.log(formatOutput(entries, "json"));
25
+ return;
26
+ }
27
+ if (opts.version || entries.length === 1) {
28
+ console.log(formatChangelogEntry(entries[0]));
29
+ return;
30
+ }
31
+ const header = "VERSION DATE TITLE";
32
+ const separator = "\u2500".repeat(header.length);
33
+ console.log(header);
34
+ console.log(separator);
35
+ for (const entry of entries) {
36
+ const version = entry.version.padEnd(12);
37
+ const date = entry.date.padEnd(12);
38
+ console.log(`${version} ${date} ${entry.title}`);
39
+ }
40
+ console.log("");
41
+ console.log(
42
+ `Showing ${entries.length} releases. Use --version <tag> for details, or --all for full history.`
43
+ );
44
+ } catch (error) {
45
+ console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
46
+ process.exit(4);
47
+ }
48
+ });
49
+ }
50
+ export {
51
+ registerChangelogCommand
52
+ };
53
+ //# sourceMappingURL=changelog-ZYD6W5IV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/changelog.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { fetchChangelog, formatChangelogEntry } from \"@gpc-cli/core\";\nimport { formatOutput } from \"@gpc-cli/core\";\nimport { loadConfig } from \"@gpc-cli/config\";\nimport { getOutputFormat } from \"../format.js\";\n\nexport function registerChangelogCommand(program: Command): void {\n program\n .command(\"changelog\")\n .description(\"Show release history\")\n .option(\"-n, --limit <count>\", \"Number of releases to show\", parseInt, 5)\n .option(\"--version <tag>\", \"Show a specific version (e.g., v0.9.43)\")\n .option(\"--all\", \"Show all releases\")\n .action(async (opts: { limit: number; version?: string; all?: boolean }) => {\n const config = await loadConfig();\n const format = getOutputFormat(program, config);\n\n try {\n const entries = await fetchChangelog({\n limit: opts.all ? 100 : opts.limit,\n version: opts.version,\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 // Single version — show full details\n if (opts.version || entries.length === 1) {\n console.log(formatChangelogEntry(entries[0]!));\n return;\n }\n\n // Multiple versions — table summary\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 --version <tag> for details, or --all for full history.`,\n );\n } catch (error) {\n console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);\n process.exit(4);\n }\n });\n}\n"],"mappings":";;;;;;AACA,SAAS,gBAAgB,4BAA4B;AACrD,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAGpB,SAAS,yBAAyB,SAAwB;AAC/D,UACG,QAAQ,WAAW,EACnB,YAAY,sBAAsB,EAClC,OAAO,uBAAuB,8BAA8B,UAAU,CAAC,EACvE,OAAO,mBAAmB,yCAAyC,EACnE,OAAO,SAAS,mBAAmB,EACnC,OAAO,OAAO,SAA6D;AAC1E,UAAM,SAAS,MAAM,WAAW;AAChC,UAAM,SAAS,gBAAgB,SAAS,MAAM;AAE9C,QAAI;AACF,YAAM,UAAU,MAAM,eAAe;AAAA,QACnC,OAAO,KAAK,MAAM,MAAM,KAAK;AAAA,QAC7B,SAAS,KAAK;AAAA,MAChB,CAAC;AAED,UAAI,QAAQ,WAAW,GAAG;AACxB,gBAAQ,IAAI,oBAAoB;AAChC;AAAA,MACF;AAEA,UAAI,WAAW,QAAQ;AACrB,gBAAQ,IAAI,aAAa,SAAS,MAAM,CAAC;AACzC;AAAA,MACF;AAGA,UAAI,KAAK,WAAW,QAAQ,WAAW,GAAG;AACxC,gBAAQ,IAAI,qBAAqB,QAAQ,CAAC,CAAE,CAAC;AAC7C;AAAA,MACF;AAGA,YAAM,SAAS;AACf,YAAM,YAAY,SAAI,OAAO,OAAO,MAAM;AAC1C,cAAQ,IAAI,MAAM;AAClB,cAAQ,IAAI,SAAS;AACrB,iBAAW,SAAS,SAAS;AAC3B,cAAM,UAAU,MAAM,QAAQ,OAAO,EAAE;AACvC,cAAM,OAAO,MAAM,KAAK,OAAO,EAAE;AACjC,gBAAQ,IAAI,GAAG,OAAO,IAAI,IAAI,IAAI,MAAM,KAAK,EAAE;AAAA,MACjD;AACA,cAAQ,IAAI,EAAE;AACd,cAAQ;AAAA,QACN,WAAW,QAAQ,MAAM;AAAA,MAC3B;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":[]}
@@ -67,23 +67,26 @@ 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.43", "-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.45", "-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-222P3MKK.js")).registerConfigCommands(program);
76
+ (await import("./config-BUXPDN7N.js")).registerConfigCommands(program);
77
77
  },
78
78
  doctor: async () => {
79
79
  (await import("./doctor-3Z4ARPM2.js")).registerDoctorCommand(program);
80
80
  },
81
81
  update: async () => {
82
- (await import("./update-XUZHWWDD.js")).registerUpdateCommand(program);
82
+ (await import("./update-NAK6CMUX.js")).registerUpdateCommand(program);
83
83
  },
84
84
  docs: async () => {
85
85
  (await import("./docs-7DUXIKA3.js")).registerDocsCommand(program);
86
86
  },
87
+ changelog: async () => {
88
+ (await import("./changelog-ZYD6W5IV.js")).registerChangelogCommand(program);
89
+ },
87
90
  completion: async () => {
88
91
  (await import("./completion-BCHRJSAT.js")).registerCompletionCommand(program);
89
92
  },
@@ -100,22 +103,22 @@ async function createProgram(pluginManager) {
100
103
  (await import("./status-WHGLODGV.js")).registerStatusCommand(program);
101
104
  },
102
105
  listings: async () => {
103
- (await import("./listings-NJWIKN4J.js")).registerListingsCommands(program);
106
+ (await import("./listings-77HZW4S5.js")).registerListingsCommands(program);
104
107
  },
105
108
  reviews: async () => {
106
- (await import("./reviews-2B5SKNXW.js")).registerReviewsCommands(program);
109
+ (await import("./reviews-2CWOI5CV.js")).registerReviewsCommands(program);
107
110
  },
108
111
  vitals: async () => {
109
112
  (await import("./vitals-A4CS4MSS.js")).registerVitalsCommands(program);
110
113
  },
111
114
  subscriptions: async () => {
112
- (await import("./subscriptions-4XKNTOOL.js")).registerSubscriptionsCommands(program);
115
+ (await import("./subscriptions-CI3JH3VQ.js")).registerSubscriptionsCommands(program);
113
116
  },
114
117
  iap: async () => {
115
- (await import("./iap-QTO5Q6SN.js")).registerIapCommands(program);
118
+ (await import("./iap-ICAEQLK5.js")).registerIapCommands(program);
116
119
  },
117
120
  purchases: async () => {
118
- (await import("./purchases-745IKIG5.js")).registerPurchasesCommands(program);
121
+ (await import("./purchases-43AKV6HG.js")).registerPurchasesCommands(program);
119
122
  },
120
123
  pricing: async () => {
121
124
  (await import("./pricing-XQSDTTK5.js")).registerPricingCommands(program);
@@ -127,33 +130,33 @@ async function createProgram(pluginManager) {
127
130
  (await import("./users-2YTC4Q36.js")).registerUsersCommands(program);
128
131
  },
129
132
  testers: async () => {
130
- (await import("./testers-3Y753PFW.js")).registerTestersCommands(program);
133
+ (await import("./testers-NZOFA3EF.js")).registerTestersCommands(program);
131
134
  },
132
135
  validate: async () => {
133
136
  (await import("./validate-UOVTM6L3.js")).registerValidateCommand(program);
134
137
  },
135
138
  publish: async () => {
136
- (await import("./publish-OJJFPDRM.js")).registerPublishCommand(program);
139
+ (await import("./publish-Q5ZKEKZ5.js")).registerPublishCommand(program);
137
140
  },
138
141
  recovery: async () => {
139
- (await import("./recovery-BBF6NQ4C.js")).registerRecoveryCommands(program);
142
+ (await import("./recovery-5EV2R476.js")).registerRecoveryCommands(program);
140
143
  },
141
144
  "data-safety": async () => {
142
- (await import("./data-safety-L64D6ZZX.js")).registerDataSafetyCommands(program);
145
+ (await import("./data-safety-Q7FTCEWU.js")).registerDataSafetyCommands(program);
143
146
  },
144
147
  "external-transactions": async () => {
145
- (await import("./external-transactions-6DWF5U3Q.js")).registerExternalTransactionsCommands(
148
+ (await import("./external-transactions-2GWIMUVM.js")).registerExternalTransactionsCommands(
146
149
  program
147
150
  );
148
151
  },
149
152
  "device-tiers": async () => {
150
- (await import("./device-tiers-UZVKC726.js")).registerDeviceTiersCommands(program);
153
+ (await import("./device-tiers-MIOQEXYY.js")).registerDeviceTiersCommands(program);
151
154
  },
152
155
  "one-time-products": async () => {
153
- (await import("./one-time-products-6CQNNTBX.js")).registerOneTimeProductsCommands(program);
156
+ (await import("./one-time-products-LHZAXQES.js")).registerOneTimeProductsCommands(program);
154
157
  },
155
158
  "internal-sharing": async () => {
156
- (await import("./internal-sharing-DEOI3ENH.js")).registerInternalSharingCommands(program);
159
+ (await import("./internal-sharing-3U2XFHA4.js")).registerInternalSharingCommands(program);
157
160
  },
158
161
  "generated-apks": async () => {
159
162
  (await import("./generated-apks-RJWTIX7L.js")).registerGeneratedApksCommands(program);
@@ -177,13 +180,13 @@ async function createProgram(pluginManager) {
177
180
  (await import("./install-skills-OV4HVANW.js")).registerInstallSkillsCommand(program);
178
181
  },
179
182
  version: async () => {
180
- (await import("./version-ABKNE54K.js")).registerVersionCommand(program);
183
+ (await import("./version-N64UBW7A.js")).registerVersionCommand(program);
181
184
  },
182
185
  cache: async () => {
183
186
  (await import("./cache-SLNFRTI2.js")).registerCacheCommand(program);
184
187
  },
185
188
  feedback: async () => {
186
- (await import("./feedback-MVLGSBOE.js")).registerFeedbackCommand(program);
189
+ (await import("./feedback-DPTO6DUT.js")).registerFeedbackCommand(program);
187
190
  },
188
191
  quickstart: async () => {
189
192
  (await import("./quickstart-4HB62YEL.js")).registerQuickstartCommand(program);
@@ -192,7 +195,7 @@ async function createProgram(pluginManager) {
192
195
  (await import("./grants-TKQJ3IER.js")).registerGrantsCommands(program);
193
196
  },
194
197
  train: async () => {
195
- (await import("./train-YA4KGVGZ.js")).registerTrainCommands(program);
198
+ (await import("./train-CJJVLY4B.js")).registerTrainCommands(program);
196
199
  },
197
200
  quota: async () => {
198
201
  (await import("./quota-UHIQQYOY.js")).registerQuotaCommand(program);
@@ -444,4 +447,4 @@ export {
444
447
  createProgram,
445
448
  handleCliError
446
449
  };
447
- //# sourceMappingURL=chunk-VK53B56I.js.map
450
+ //# sourceMappingURL=chunk-SEVX56VN.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 changelog: async () => {\n (await import(\"./commands/changelog.js\")).registerChangelogCommand(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,QAAQ;AAAA,EAER;AAEA,SAAO;AACT;AAKO,SAAS,uBAAuB,SAAkB,SAA8B;AACrF,aAAW,OAAO,QAAQ,sBAAsB,GAAG;AACjD,UAAM,MA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AAU,QAAQ;AAAA,EACpB;AACA,SAAO,MAAM,KAAK,GAAG;AACvB;;;ACzbA,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"]}
@@ -104,4 +104,4 @@ Configuration file created: ${path}`);
104
104
  export {
105
105
  registerConfigCommands
106
106
  };
107
- //# sourceMappingURL=config-222P3MKK.js.map
107
+ //# sourceMappingURL=config-BUXPDN7N.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/config.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport type { GpcConfig } from \"@gpc-cli/config\";\nimport { loadConfig, setConfigValue, getUserConfigPath, initConfig } from \"@gpc-cli/config\";\nimport { formatOutput, writeAuditLog, createAuditEntry } from \"@gpc-cli/core\";\nimport { existsSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\nimport { getOutputFormat } from \"../format.js\";\nimport { isInteractive, promptInput, promptSelect, promptConfirm } from \"../prompt.js\";\n\nconst ANDROID_PACKAGE_RE = /^[a-zA-Z][a-zA-Z0-9_]*(\\.[a-zA-Z][a-zA-Z0-9_]*)+$/;\n\nexport function registerConfigCommands(program: Command): void {\n const config = program.command(\"config\").description(\"Manage configuration\");\n\n config\n .command(\"init\")\n .description(\"Create a configuration file\")\n .option(\"--global\", \"Create in user config directory (~/.config/gpc/)\")\n .action(async (_options: { global?: boolean }) => {\n const initialConfig: Record<string, unknown> = {};\n\n if (isInteractive(program)) {\n console.log(\"\\nGPC Setup Wizard\\n\");\n\n // Package name\n const app = await promptInput(\"Default package name (e.g. com.example.app, blank to skip)\");\n if (app) {\n if (!ANDROID_PACKAGE_RE.test(app)) {\n console.error(\n ` Warning: \"${app}\" doesn't look like a valid Android package name — continuing anyway`,\n );\n }\n initialConfig[\"app\"] = app;\n }\n\n // Auth method\n const authMethod = await promptSelect(\n \"Authentication method:\",\n [\"service-account\", \"adc\", \"skip\"],\n \"service-account\",\n );\n\n if (authMethod === \"service-account\") {\n let saPath: string;\n while (true) {\n saPath = await promptInput(\"Path to service account JSON key file\");\n if (!saPath) {\n console.log(\" Skipping service account setup.\");\n break;\n }\n const resolved = resolve(saPath);\n if (existsSync(resolved)) {\n initialConfig[\"auth\"] = { serviceAccount: saPath };\n break;\n }\n console.error(` File not found: ${resolved}`);\n const retry = await promptConfirm(\"Try a different path?\");\n if (!retry) break;\n }\n } else if (authMethod === \"adc\") {\n console.log(\n \" Using Application Default Credentials — run `gcloud auth application-default login` if not already set up.\",\n );\n }\n\n // Output format\n const output = await promptSelect(\n \"Default output format:\",\n [\"table\", \"json\", \"yaml\", \"markdown\"],\n \"table\",\n );\n if (output !== \"table\") initialConfig[\"output\"] = output;\n }\n\n const path = await initConfig(initialConfig as GpcConfig);\n\n // Summary\n const configured: string[] = [];\n if (initialConfig[\"app\"]) configured.push(`app: ${initialConfig[\"app\"]}`);\n if (initialConfig[\"auth\"]) configured.push(\"auth: service account\");\n if (initialConfig[\"output\"]) configured.push(`output: ${initialConfig[\"output\"]}`);\n\n console.log(`\\nConfiguration file created: ${path}`);\n if (configured.length > 0) {\n console.log(` ${configured.join(\" · \")}`);\n }\n\n writeAuditLog(createAuditEntry(\"config init\", { path })).catch(() => {});\n\n // Run doctor inline to verify setup\n console.log(\"\\nVerifying setup...\");\n try {\n const { registerDoctorCommand } = await import(\"./doctor.js\");\n const { Command } = await import(\"commander\");\n const doctorProgram = new Command();\n doctorProgram\n .option(\"-o, --output <format>\", \"Output format\")\n .option(\"-j, --json\", \"JSON mode\");\n registerDoctorCommand(doctorProgram);\n await doctorProgram.parseAsync([\"node\", \"gpc\", \"doctor\"]);\n } catch {\n // Doctor failures should not prevent config init from succeeding\n console.log(\"Run `gpc doctor` to verify your setup.\");\n }\n });\n\n config\n .command(\"show\")\n .description(\"Display resolved configuration\")\n .action(async () => {\n const resolved = await loadConfig();\n const format = getOutputFormat(program, resolved);\n console.log(formatOutput(resolved, format));\n });\n\n config\n .command(\"set <key> <value>\")\n .description(\"Set a configuration value\")\n .action(async (key: string, value: string) => {\n await setConfigValue(key, value);\n console.log(`Set ${key} = ${value}`);\n });\n\n config\n .command(\"path\")\n .description(\"Show configuration file path\")\n .action(() => {\n console.log(getUserConfigPath());\n });\n}\n"],"mappings":";;;;;;;;;;;;AAEA,SAAS,YAAY,gBAAgB,mBAAmB,kBAAkB;AAC1E,SAAS,cAAc,eAAe,wBAAwB;AAC9D,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AAIxB,IAAM,qBAAqB;AAEpB,SAAS,uBAAuB,SAAwB;AAC7D,QAAM,SAAS,QAA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OAAO,MAAM;AACZ,YAAQ,IAAI,kBAAkB,CAAC;AAAA,EACjC,CAAC;AACL;","names":[]}
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- isDryRun,
4
- printDryRun
5
- } from "./chunk-Y3QZDAKS.js";
6
2
  import {
7
3
  getClient,
8
4
  resolvePackageName
9
5
  } from "./chunk-AA577WVQ.js";
6
+ import {
7
+ isDryRun,
8
+ printDryRun
9
+ } from "./chunk-Y3QZDAKS.js";
10
10
  import {
11
11
  getOutputFormat
12
12
  } from "./chunk-ELXAK7GI.js";
@@ -69,4 +69,4 @@ function registerDataSafetyCommands(program) {
69
69
  export {
70
70
  registerDataSafetyCommands
71
71
  };
72
- //# sourceMappingURL=data-safety-L64D6ZZX.js.map
72
+ //# sourceMappingURL=data-safety-Q7FTCEWU.js.map
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- isDryRun,
4
- printDryRun
5
- } from "./chunk-Y3QZDAKS.js";
6
2
  import {
7
3
  getClient,
8
4
  resolvePackageName
9
5
  } from "./chunk-AA577WVQ.js";
6
+ import {
7
+ isDryRun,
8
+ printDryRun
9
+ } from "./chunk-Y3QZDAKS.js";
10
10
  import {
11
11
  getOutputFormat
12
12
  } from "./chunk-ELXAK7GI.js";
@@ -88,4 +88,4 @@ function registerDeviceTiersCommands(program) {
88
88
  export {
89
89
  registerDeviceTiersCommands
90
90
  };
91
- //# sourceMappingURL=device-tiers-UZVKC726.js.map
91
+ //# sourceMappingURL=device-tiers-MIOQEXYY.js.map
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- isDryRun,
4
- printDryRun
5
- } from "./chunk-Y3QZDAKS.js";
6
2
  import {
7
3
  getClient,
8
4
  resolvePackageName
9
5
  } from "./chunk-AA577WVQ.js";
6
+ import {
7
+ isDryRun,
8
+ printDryRun
9
+ } from "./chunk-Y3QZDAKS.js";
10
10
  import {
11
11
  getOutputFormat
12
12
  } from "./chunk-ELXAK7GI.js";
@@ -117,4 +117,4 @@ function registerExternalTransactionsCommands(program) {
117
117
  export {
118
118
  registerExternalTransactionsCommands
119
119
  };
120
- //# sourceMappingURL=external-transactions-6DWF5U3Q.js.map
120
+ //# sourceMappingURL=external-transactions-2GWIMUVM.js.map
@@ -9,7 +9,7 @@ import { execFile } from "child_process";
9
9
  import { listAuditEvents } from "@gpc-cli/core";
10
10
  function registerFeedbackCommand(program) {
11
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.43";
12
+ const version = "0.9.45";
13
13
  let lastCommand = "";
14
14
  try {
15
15
  const events = await listAuditEvents({ limit: 3 });
@@ -67,4 +67,4 @@ ${url}`);
67
67
  export {
68
68
  registerFeedbackCommand
69
69
  };
70
- //# sourceMappingURL=feedback-MVLGSBOE.js.map
70
+ //# sourceMappingURL=feedback-DPTO6DUT.js.map
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  readJsonFile
4
4
  } from "./chunk-FWKYRLKY.js";
5
- import {
6
- isDryRun,
7
- printDryRun
8
- } from "./chunk-Y3QZDAKS.js";
9
5
  import {
10
6
  getClient,
11
7
  resolvePackageName
12
8
  } from "./chunk-AA577WVQ.js";
9
+ import {
10
+ isDryRun,
11
+ printDryRun
12
+ } from "./chunk-Y3QZDAKS.js";
13
13
  import {
14
14
  getOutputFormat
15
15
  } from "./chunk-ELXAK7GI.js";
@@ -222,4 +222,4 @@ function registerIapCommands(program) {
222
222
  export {
223
223
  registerIapCommands
224
224
  };
225
- //# sourceMappingURL=iap-QTO5Q6SN.js.map
225
+ //# sourceMappingURL=iap-ICAEQLK5.js.map
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createProgram,
4
4
  handleCliError
5
- } from "./chunk-VK53B56I.js";
5
+ } from "./chunk-SEVX56VN.js";
6
6
  export {
7
7
  createProgram,
8
8
  handleCliError
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- isDryRun,
4
- printDryRun
5
- } from "./chunk-Y3QZDAKS.js";
6
2
  import {
7
3
  getClient,
8
4
  resolvePackageName
9
5
  } from "./chunk-AA577WVQ.js";
6
+ import {
7
+ isDryRun,
8
+ printDryRun
9
+ } from "./chunk-Y3QZDAKS.js";
10
10
  import {
11
11
  getOutputFormat
12
12
  } from "./chunk-ELXAK7GI.js";
@@ -50,4 +50,4 @@ function registerInternalSharingCommands(program) {
50
50
  export {
51
51
  registerInternalSharingCommands
52
52
  };
53
- //# sourceMappingURL=internal-sharing-DEOI3ENH.js.map
53
+ //# sourceMappingURL=internal-sharing-3U2XFHA4.js.map
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- isDryRun,
4
- printDryRun
5
- } from "./chunk-Y3QZDAKS.js";
6
2
  import {
7
3
  getClient,
8
4
  resolvePackageName
9
5
  } from "./chunk-AA577WVQ.js";
6
+ import {
7
+ isDryRun,
8
+ printDryRun
9
+ } from "./chunk-Y3QZDAKS.js";
10
10
  import {
11
11
  green,
12
12
  red
@@ -463,4 +463,4 @@ Missing locales: ${missingLocales.join(", ")}`);
463
463
  export {
464
464
  registerListingsCommands
465
465
  };
466
- //# sourceMappingURL=listings-NJWIKN4J.js.map
466
+ //# sourceMappingURL=listings-77HZW4S5.js.map
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  readJsonFile
4
4
  } from "./chunk-FWKYRLKY.js";
5
- import {
6
- isDryRun,
7
- printDryRun
8
- } from "./chunk-Y3QZDAKS.js";
9
5
  import {
10
6
  getClient,
11
7
  resolvePackageName
12
8
  } from "./chunk-AA577WVQ.js";
9
+ import {
10
+ isDryRun,
11
+ printDryRun
12
+ } from "./chunk-Y3QZDAKS.js";
13
13
  import {
14
14
  getOutputFormat
15
15
  } from "./chunk-ELXAK7GI.js";
@@ -306,4 +306,4 @@ function registerOneTimeProductsCommands(program) {
306
306
  export {
307
307
  registerOneTimeProductsCommands
308
308
  };
309
- //# sourceMappingURL=one-time-products-6CQNNTBX.js.map
309
+ //# sourceMappingURL=one-time-products-LHZAXQES.js.map
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- isDryRun
4
- } from "./chunk-Y3QZDAKS.js";
5
2
  import {
6
3
  resolvePackageName
7
4
  } from "./chunk-AA577WVQ.js";
5
+ import {
6
+ isDryRun
7
+ } from "./chunk-Y3QZDAKS.js";
8
8
  import {
9
9
  getOutputFormat
10
10
  } from "./chunk-ELXAK7GI.js";
@@ -200,4 +200,4 @@ function registerPublishCommand(program) {
200
200
  export {
201
201
  registerPublishCommand
202
202
  };
203
- //# sourceMappingURL=publish-OJJFPDRM.js.map
203
+ //# sourceMappingURL=publish-Q5ZKEKZ5.js.map