@gpc-cli/cli 0.9.70 → 0.9.72

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 (29) hide show
  1. package/README.md +2 -2
  2. package/dist/bin.js +2 -2
  3. package/dist/{bundles-AVWFGDFD.js → bundles-6F3AD4QM.js} +18 -19
  4. package/dist/bundles-6F3AD4QM.js.map +1 -0
  5. package/dist/{chunk-RKVAMOO2.js → chunk-CE55NKPB.js} +13 -10
  6. package/dist/chunk-CE55NKPB.js.map +1 -0
  7. package/dist/{config-MPTRKWPJ.js → config-FRRVRPMS.js} +2 -2
  8. package/dist/{doctor-ECRWYCY6.js → doctor-YAGR6P4M.js} +95 -2
  9. package/dist/doctor-YAGR6P4M.js.map +1 -0
  10. package/dist/{feedback-A5B47QAO.js → feedback-X24F7JNC.js} +2 -2
  11. package/dist/generated/docs-bundle.json +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/{listings-BUXXP2UN.js → listings-ISNU3FIE.js} +1 -1
  14. package/dist/{listings-BUXXP2UN.js.map → listings-ISNU3FIE.js.map} +1 -1
  15. package/dist/{releases-WJXNU25H.js → releases-AROYBDKP.js} +61 -4
  16. package/dist/releases-AROYBDKP.js.map +1 -0
  17. package/dist/skills-FWGWYYKJ.js +120 -0
  18. package/dist/skills-FWGWYYKJ.js.map +1 -0
  19. package/dist/{update-ZCZG4JJK.js → update-C2J3PFBR.js} +2 -2
  20. package/dist/{version-SDP2KA3J.js → version-NBZL2G7F.js} +2 -2
  21. package/package.json +15 -5
  22. package/dist/bundles-AVWFGDFD.js.map +0 -1
  23. package/dist/chunk-RKVAMOO2.js.map +0 -1
  24. package/dist/doctor-ECRWYCY6.js.map +0 -1
  25. package/dist/releases-WJXNU25H.js.map +0 -1
  26. /package/dist/{config-MPTRKWPJ.js.map → config-FRRVRPMS.js.map} +0 -0
  27. /package/dist/{feedback-A5B47QAO.js.map → feedback-X24F7JNC.js.map} +0 -0
  28. /package/dist/{update-ZCZG4JJK.js.map → update-C2J3PFBR.js.map} +0 -0
  29. /package/dist/{version-SDP2KA3J.js.map → version-NBZL2G7F.js.map} +0 -0
package/README.md CHANGED
@@ -26,7 +26,7 @@ gpc listings push --dir metadata/ # Sync store metadata (Fastlane-co
26
26
  gpc changelog generate --target play-store --locales auto --ai # AI-translated "What's new" in every locale
27
27
  gpc enterprise publish app.aab --account 123 --title "Private App" # Managed Google Play
28
28
  gpc verify # Developer verification readiness
29
- gpc doctor # 20 setup checks
29
+ gpc doctor # 22 setup checks
30
30
  ```
31
31
 
32
32
  ## Why this over Fastlane?
@@ -97,7 +97,7 @@ curl -fsSL https://raw.githubusercontent.com/yasserstudio/gpc/main/scripts/insta
97
97
  - [Commands reference](https://yasserstudio.github.io/gpc/commands/)
98
98
  - [CI/CD recipes](https://yasserstudio.github.io/gpc/ci-cd/)
99
99
 
100
- Free to use. 2,260 tests. 90%+ coverage. Every write operation supports `--dry-run`.
100
+ Free to use. 2,269 tests. 90%+ coverage. Every write operation supports `--dry-run`.
101
101
 
102
102
  ## Licensing
103
103
 
package/dist/bin.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  createProgram,
4
4
  handleCliError,
5
5
  loadPlugins
6
- } from "./chunk-RKVAMOO2.js";
6
+ } from "./chunk-CE55NKPB.js";
7
7
  import {
8
8
  checkForUpdate,
9
9
  formatUpdateNotification
@@ -57,7 +57,7 @@ if (!_isJsonMode && !_isQuiet && !_isSetupCommand && !existsSync(getUserConfigPa
57
57
  }
58
58
  await setupNetworking();
59
59
  initAudit(getConfigDir());
60
- var currentVersion = "0.9.70";
60
+ var currentVersion = "0.9.72";
61
61
  var isUpdateCommand = process.argv[2] === "update";
62
62
  var isCompletionProvider = process.argv[2] === "__complete";
63
63
  var updateCheckPromise = isUpdateCommand || isCompletionProvider ? Promise.resolve(null) : checkForUpdate(currentVersion);
@@ -9,12 +9,7 @@ import {
9
9
 
10
10
  // src/commands/bundles.ts
11
11
  import { loadConfig } from "@gpc-cli/config";
12
- import {
13
- listBundles,
14
- findBundle,
15
- waitForBundle,
16
- formatOutput
17
- } from "@gpc-cli/core";
12
+ import { listBundles, findBundle, waitForBundle, formatOutput } from "@gpc-cli/core";
18
13
  function registerBundlesCommands(program) {
19
14
  const bundles = program.command("bundles").description("Manage uploaded app bundles (API)");
20
15
  bundles.command("list").description("List all processed bundles").action(async () => {
@@ -30,13 +25,15 @@ function registerBundlesCommands(program) {
30
25
  console.log("No bundles found.");
31
26
  return;
32
27
  }
33
- console.log(formatOutput(
34
- result.map((b) => ({
35
- versionCode: b.versionCode,
36
- sha256: b.sha256.slice(0, 12) + "..."
37
- })),
38
- format
39
- ));
28
+ console.log(
29
+ formatOutput(
30
+ result.map((b) => ({
31
+ versionCode: b.versionCode,
32
+ sha256: b.sha256.slice(0, 12) + "..."
33
+ })),
34
+ format
35
+ )
36
+ );
40
37
  }
41
38
  });
42
39
  bundles.command("find").description("Find a specific bundle by version code").requiredOption("--version-code <n>", "Version code to find", (v) => parseInt(v, 10)).action(async (options) => {
@@ -55,16 +52,18 @@ function registerBundlesCommands(program) {
55
52
  }
56
53
  console.log(formatOutput(result, format));
57
54
  });
58
- bundles.command("wait").description("Wait for a bundle to finish server-side processing").requiredOption("--version-code <n>", "Version code to wait for", (v) => parseInt(v, 10)).option("--timeout <seconds>", "Timeout in seconds (default: 600)", (v) => parseInt(v, 10)).option("--interval <seconds>", "Poll interval in seconds (default: 15)", (v) => parseInt(v, 10)).action(async (options) => {
55
+ bundles.command("wait").description("Wait for a bundle to finish server-side processing").requiredOption("--version-code <n>", "Version code to wait for", (v) => parseInt(v, 10)).option("--timeout <seconds>", "Timeout in seconds (default: 600)", (v) => parseInt(v, 10)).option(
56
+ "--interval <seconds>",
57
+ "Poll interval in seconds (default: 15)",
58
+ (v) => parseInt(v, 10)
59
+ ).action(async (options) => {
59
60
  const config = await loadConfig();
60
61
  const format = getOutputFormat(program, config);
61
62
  const packageName = resolvePackageName(program.opts()["app"], config);
62
63
  const client = await getClient(config);
63
64
  if (format !== "json") {
64
- process.stderr.write(
65
- `Waiting for bundle ${options.versionCode} to finish processing...
66
- `
67
- );
65
+ process.stderr.write(`Waiting for bundle ${options.versionCode} to finish processing...
66
+ `);
68
67
  }
69
68
  const result = await waitForBundle(client, packageName, options.versionCode, {
70
69
  timeout: options.timeout ? options.timeout * 1e3 : void 0,
@@ -80,4 +79,4 @@ function registerBundlesCommands(program) {
80
79
  export {
81
80
  registerBundlesCommands
82
81
  };
83
- //# sourceMappingURL=bundles-AVWFGDFD.js.map
82
+ //# sourceMappingURL=bundles-6F3AD4QM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/bundles.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { loadConfig } from \"@gpc-cli/config\";\nimport { listBundles, findBundle, waitForBundle, formatOutput } from \"@gpc-cli/core\";\nimport { getOutputFormat } from \"../format.js\";\nimport { resolvePackageName, getClient } from \"../resolve.js\";\n\nexport function registerBundlesCommands(program: Command): void {\n const bundles = program.command(\"bundles\").description(\"Manage uploaded app bundles (API)\");\n\n bundles\n .command(\"list\")\n .description(\"List all processed bundles\")\n .action(async () => {\n const config = await loadConfig();\n const format = getOutputFormat(program, config);\n const packageName = resolvePackageName(program.opts()[\"app\"], config);\n const client = await getClient(config);\n\n const result = await listBundles(client, packageName);\n\n if (format === \"json\") {\n console.log(formatOutput(result, \"json\"));\n } else {\n if (result.length === 0) {\n console.log(\"No bundles found.\");\n return;\n }\n console.log(\n formatOutput(\n result.map((b) => ({\n versionCode: b.versionCode,\n sha256: b.sha256.slice(0, 12) + \"...\",\n })),\n format,\n ),\n );\n }\n });\n\n bundles\n .command(\"find\")\n .description(\"Find a specific bundle by version code\")\n .requiredOption(\"--version-code <n>\", \"Version code to find\", (v) => parseInt(v, 10))\n .action(async (options: { versionCode: number }) => {\n const config = await loadConfig();\n const format = getOutputFormat(program, config);\n const packageName = resolvePackageName(program.opts()[\"app\"], config);\n const client = await getClient(config);\n\n const result = await findBundle(client, packageName, options.versionCode);\n\n if (!result) {\n if (format === \"json\") {\n console.log(formatOutput(null, \"json\"));\n } else {\n console.error(`Bundle with version code ${options.versionCode} not found.`);\n }\n process.exit(1);\n }\n\n console.log(formatOutput(result, format));\n });\n\n bundles\n .command(\"wait\")\n .description(\"Wait for a bundle to finish server-side processing\")\n .requiredOption(\"--version-code <n>\", \"Version code to wait for\", (v) => parseInt(v, 10))\n .option(\"--timeout <seconds>\", \"Timeout in seconds (default: 600)\", (v) => parseInt(v, 10))\n .option(\"--interval <seconds>\", \"Poll interval in seconds (default: 15)\", (v) =>\n parseInt(v, 10),\n )\n .action(async (options: { versionCode: number; timeout?: number; interval?: number }) => {\n const config = await loadConfig();\n const format = getOutputFormat(program, config);\n const packageName = resolvePackageName(program.opts()[\"app\"], config);\n const client = await getClient(config);\n\n if (format !== \"json\") {\n process.stderr.write(`Waiting for bundle ${options.versionCode} to finish processing...\\n`);\n }\n\n const result = await waitForBundle(client, packageName, options.versionCode, {\n timeout: options.timeout ? options.timeout * 1000 : undefined,\n interval: options.interval ? options.interval * 1000 : undefined,\n });\n\n if (format !== \"json\") {\n process.stderr.write(`Bundle ${result.versionCode} is ready.\\n`);\n }\n console.log(formatOutput(result, format));\n });\n}\n"],"mappings":";;;;;;;;;;AACA,SAAS,kBAAkB;AAC3B,SAAS,aAAa,YAAY,eAAe,oBAAoB;AAI9D,SAAS,wBAAwB,SAAwB;AAC9D,QAAM,UAAU,QAAQ,QAAQ,SAAS,EAAE,YAAY,mCAAmC;AAE1F,UACG,QAAQ,MAAM,EACd,YAAY,4BAA4B,EACxC,OAAO,YAAY;AAClB,UAAM,SAAS,MAAM,WAAW;AAChC,UAAM,SAAS,gBAAgB,SAAS,MAAM;AAC9C,UAAM,cAAc,mBAAmB,QAAQ,KAAK,EAAE,KAAK,GAAG,MAAM;AACpE,UAAM,SAAS,MAAM,UAAU,MAAM;AAErC,UAAM,SAAS,MAAM,YAAY,QAAQ,WAAW;AAEpD,QAAI,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S,GAAG,EAAE;AAAA,EAChB,EACC,OAAO,OAAO,YAA0E;AACvF,UAAM,SAAS,MAAM,WAAW;AAChC,UAAM,SAAS,gBAAgB,SAAS,MAAM;AAC9C,UAAM,cAAc,mBAAmB,QAAQ,KAAK,EAAE,KAAK,GAAG,MAAM;AACpE,UAAM,SAAS,MAAM,UAAU,MAAM;AAErC,QAAI,WAAW,QAAQ;AACrB,cAAQ,OAAO,MAAM,sBAAsB,QAAQ,WAAW;AAAA,CAA4B;AAAA,IAC5F;AAEA,UAAM,SAAS,MAAM,cAAc,QAAQ,aAAa,QAAQ,aAAa;AAAA,MAC3E,SAAS,QAAQ,UAAU,QAAQ,UAAU,MAAO;AAAA,MACpD,UAAU,QAAQ,WAAW,QAAQ,WAAW,MAAO;AAAA,IACzD,CAAC;AAED,QAAI,WAAW,QAAQ;AACrB,cAAQ,OAAO,MAAM,UAAU,OAAO,WAAW;AAAA,CAAc;AAAA,IACjE;AACA,YAAQ,IAAI,aAAa,QAAQ,MAAM,CAAC;AAAA,EAC1C,CAAC;AACL;","names":[]}
@@ -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.70", "-V, --version").option("-o, --output <format>", "Output format: table, json, yaml, markdown, csv, tsv, junit").option("-v, --verbose", "Enable debug logging").option("-q, --quiet", "Suppress non-essential output").option("-a, --app <package>", "App package name").option("-p, --profile <name>", "Auth profile name").option("--no-color", "Disable colored output").option("--no-interactive", "Disable interactive prompts").option("-y, --yes", "Skip confirmation prompts").option("--dry-run", "Preview changes without executing").option("--notify [target]", "Send webhook notification on completion (slack, discord, custom)").option("--ci", "Force CI mode (JSON output, no prompts, strict exit codes)").option("-j, --json", "Shorthand for --output json").option("--apps <csv>", "Comma-separated package names for multi-app operations").showSuggestionAfterError(false);
70
+ program.name("gpc").description("GPC \u2014 Google Play Console CLI").version("0.9.72", "-V, --version").option("-o, --output <format>", "Output format: table, json, yaml, markdown, csv, tsv, junit").option("-v, --verbose", "Enable debug logging").option("-q, --quiet", "Suppress non-essential output").option("-a, --app <package>", "App package name").option("-p, --profile <name>", "Auth profile name").option("--no-color", "Disable colored output").option("--no-interactive", "Disable interactive prompts").option("-y, --yes", "Skip confirmation prompts").option("--dry-run", "Preview changes without executing").option("--notify [target]", "Send webhook notification on completion (slack, discord, custom)").option("--ci", "Force CI mode (JSON output, no prompts, strict exit codes)").option("-j, --json", "Shorthand for --output json").option("--apps <csv>", "Comma-separated package names for multi-app operations").showSuggestionAfterError(false);
71
71
  const commandLoaders = {
72
72
  auth: async () => {
73
73
  (await import("./auth-4DRT7ZH2.js")).registerAuthCommands(program);
74
74
  },
75
75
  config: async () => {
76
- (await import("./config-MPTRKWPJ.js")).registerConfigCommands(program);
76
+ (await import("./config-FRRVRPMS.js")).registerConfigCommands(program);
77
77
  },
78
78
  doctor: async () => {
79
- (await import("./doctor-ECRWYCY6.js")).registerDoctorCommand(program);
79
+ (await import("./doctor-YAGR6P4M.js")).registerDoctorCommand(program);
80
80
  },
81
81
  update: async () => {
82
- (await import("./update-ZCZG4JJK.js")).registerUpdateCommand(program);
82
+ (await import("./update-C2J3PFBR.js")).registerUpdateCommand(program);
83
83
  },
84
84
  docs: async () => {
85
85
  (await import("./docs-OU6LSSJD.js")).registerDocsCommand(program);
@@ -101,7 +101,7 @@ async function createProgram(pluginManager) {
101
101
  (await import("./apps-WPUQOQLL.js")).registerAppsCommands(program);
102
102
  },
103
103
  releases: async () => {
104
- (await import("./releases-WJXNU25H.js")).registerReleasesCommands(program);
104
+ (await import("./releases-AROYBDKP.js")).registerReleasesCommands(program);
105
105
  },
106
106
  tracks: async () => {
107
107
  (await import("./tracks-RH3RKVFB.js")).registerTracksCommands(program);
@@ -110,7 +110,7 @@ async function createProgram(pluginManager) {
110
110
  (await import("./status-32AJ7A6O.js")).registerStatusCommand(program);
111
111
  },
112
112
  listings: async () => {
113
- (await import("./listings-BUXXP2UN.js")).registerListingsCommands(program);
113
+ (await import("./listings-ISNU3FIE.js")).registerListingsCommands(program);
114
114
  },
115
115
  reviews: async () => {
116
116
  (await import("./reviews-GZ2VOIRN.js")).registerReviewsCommands(program);
@@ -178,7 +178,7 @@ async function createProgram(pluginManager) {
178
178
  (await import("./bundle-PFTE7XMU.js")).registerBundleCommands(program);
179
179
  },
180
180
  bundles: async () => {
181
- (await import("./bundles-AVWFGDFD.js")).registerBundlesCommands(program);
181
+ (await import("./bundles-6F3AD4QM.js")).registerBundlesCommands(program);
182
182
  },
183
183
  audit: async () => {
184
184
  (await import("./audit-BDPS5ODN.js")).registerAuditCommands(program);
@@ -192,17 +192,20 @@ async function createProgram(pluginManager) {
192
192
  "install-skills": async () => {
193
193
  (await import("./install-skills-S342NJ7T.js")).registerInstallSkillsCommand(program);
194
194
  },
195
+ skills: async () => {
196
+ (await import("./skills-FWGWYYKJ.js")).registerSkillsCommand(program);
197
+ },
195
198
  verify: async () => {
196
199
  (await import("./verify-O2PSBTIC.js")).registerVerifyCommand(program);
197
200
  },
198
201
  version: async () => {
199
- (await import("./version-SDP2KA3J.js")).registerVersionCommand(program);
202
+ (await import("./version-NBZL2G7F.js")).registerVersionCommand(program);
200
203
  },
201
204
  cache: async () => {
202
205
  (await import("./cache-FGNP7Y37.js")).registerCacheCommand(program);
203
206
  },
204
207
  feedback: async () => {
205
- (await import("./feedback-A5B47QAO.js")).registerFeedbackCommand(program);
208
+ (await import("./feedback-X24F7JNC.js")).registerFeedbackCommand(program);
206
209
  },
207
210
  setup: async () => {
208
211
  (await import("./setup-IKHZQJIH.js")).registerSetupCommand(program);
@@ -476,4 +479,4 @@ export {
476
479
  createProgram,
477
480
  handleCliError
478
481
  };
479
- //# sourceMappingURL=chunk-RKVAMOO2.js.map
482
+ //# sourceMappingURL=chunk-CE55NKPB.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, csv, tsv, 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, async () => {\n // Force-load every non-completion command so the introspection walker\n // sees the full tree (including plugins registered later in createProgram).\n await Promise.all(\n Object.entries(commandLoaders)\n .filter(([name]) => name !== \"completion\")\n .map(([, loader]) => loader()),\n );\n });\n },\n __complete: async () => {\n (await import(\"./commands/__complete.js\")).registerCompleteCommand(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 \"system-apks\": async () => {\n (await import(\"./commands/system-apks.js\")).registerSystemApksCommands(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 bundles: async () => {\n (await import(\"./commands/bundles.js\")).registerBundlesCommands(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 skills: async () => {\n (await import(\"./commands/skills.js\")).registerSkillsCommand(program);\n },\n verify: async () => {\n (await import(\"./commands/verify.js\")).registerVerifyCommand(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 setup: async () => {\n (await import(\"./commands/setup.js\")).registerSetupCommand(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 rtdn: async () => {\n (await import(\"./commands/rtdn.js\")).registerRtdnCommands(program);\n },\n watch: async () => {\n (await import(\"./commands/watch.js\")).registerWatchCommand(program);\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 /** When true, error handler prints nothing (e.g., user-aborted operations). */\n silent?: boolean;\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 // Update errors hit GitHub, not Google Play — never an auth issue\n if (error.code?.startsWith(\"UPDATE_\")) return false;\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 // Silent errors (e.g., user abort) — don't print anything\n if (isTypedError(error) && error.silent) {\n return error.exitCode ?? 0;\n }\n\n const authHint = isAuthRelatedError(error)\n ? \"\\n\\u2192 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,MAAM,QAAQ,QAAQ,IAAI,IAAI,EAAE,YAAY,IAAI,WAAW;AAEjE,QAAI,IAAI,WAAW;AACjB,iBAAW,OAAO,IAAI,WAAW;AAC/B,cAAM,SAAS,IAAI,WAAW,IAAI,IAAI,I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,QAAQ,MAAM,UAAU,OAAO,KAAK;AACjE,SAAO,cAAc,KAAK,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC;AAClD;AASO,SAAS,eAAe,OAAwB;AAErD,MAAI,aAAa,KAAK,KAAK,MAAM,QAAQ;AACvC,WAAO,MAAM,YAAY;AAAA,EAC3B;AAEA,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","_"]}
@@ -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-ECRWYCY6.js");
81
+ const { registerDoctorCommand } = await import("./doctor-YAGR6P4M.js");
82
82
  const { Command } = await import("commander");
83
83
  const doctorProgram = new Command();
84
84
  doctorProgram.option("-o, --output <format>", "Output format").option("-j, --json", "JSON mode");
@@ -107,4 +107,4 @@ Configuration file created: ${path}`);
107
107
  export {
108
108
  registerConfigCommands
109
109
  };
110
- //# sourceMappingURL=config-MPTRKWPJ.js.map
110
+ //# sourceMappingURL=config-FRRVRPMS.js.map
@@ -12,6 +12,7 @@ import {
12
12
  import { loadConfig, getCacheDir, getConfigDir } from "@gpc-cli/config";
13
13
  import { resolveAuth, AuthError } from "@gpc-cli/auth";
14
14
  import { existsSync, accessSync, statSync, constants } from "fs";
15
+ import { execFileSync } from "child_process";
15
16
  import { readFile, readdir, stat, statfs } from "fs/promises";
16
17
  import { resolve, join } from "path";
17
18
  import { lookup } from "dns/promises";
@@ -141,7 +142,7 @@ function checkCiEnvironment() {
141
142
  };
142
143
  }
143
144
  async function checkGpcVersion() {
144
- const currentVersion = "0.9.70";
145
+ const currentVersion = "0.9.72";
145
146
  if (currentVersion === "0.0.0") {
146
147
  return { name: "version", status: "info", message: "GPC development build" };
147
148
  }
@@ -460,6 +461,90 @@ async function checkShellCompletion() {
460
461
  suggestion: "Install with: gpc completion install"
461
462
  };
462
463
  }
464
+ async function checkQuotaProximity() {
465
+ try {
466
+ const { getQuotaUsage } = await import("@gpc-cli/core");
467
+ const usage = await getQuotaUsage();
468
+ if (usage.dailyCallsUsed === 0) return null;
469
+ if (usage.dailyCallsLimit === 0 || usage.minuteCallsLimit === 0) return null;
470
+ const minutePct = usage.minuteCallsUsed / usage.minuteCallsLimit;
471
+ if (minutePct > 0.8) {
472
+ return {
473
+ name: "quota",
474
+ status: "warn",
475
+ message: `Per-minute quota: ${usage.minuteCallsUsed}/${usage.minuteCallsLimit} (${Math.round(minutePct * 100)}%)`,
476
+ suggestion: "You are approaching the per-minute rate limit. Space out API calls or wait before retrying."
477
+ };
478
+ }
479
+ const dailyPct = usage.dailyCallsUsed / usage.dailyCallsLimit;
480
+ if (dailyPct > 0.8) {
481
+ return {
482
+ name: "quota",
483
+ status: "warn",
484
+ message: `Daily quota: ${usage.dailyCallsUsed}/${usage.dailyCallsLimit} (${Math.round(dailyPct * 100)}%)`,
485
+ suggestion: "You are approaching the daily API call limit. Monitor usage with: gpc quota status"
486
+ };
487
+ }
488
+ return {
489
+ name: "quota",
490
+ status: "pass",
491
+ message: `Quota: ${usage.dailyCallsUsed}/${usage.dailyCallsLimit} daily, ${usage.minuteCallsUsed}/${usage.minuteCallsLimit}/min`
492
+ };
493
+ } catch {
494
+ return null;
495
+ }
496
+ }
497
+ async function checkPluginHealth(configPlugins) {
498
+ try {
499
+ const { discoverPlugins, PluginManager } = await import("@gpc-cli/core");
500
+ const plugins = await discoverPlugins({ configPlugins });
501
+ if (plugins.length === 0) return [];
502
+ const results = [];
503
+ const manager = new PluginManager();
504
+ for (const plugin of plugins) {
505
+ try {
506
+ await manager.load(plugin);
507
+ results.push({
508
+ name: `plugin-${plugin.name}`,
509
+ status: "pass",
510
+ message: `Plugin: ${plugin.name}@${plugin.version ?? "unknown"}`
511
+ });
512
+ } catch {
513
+ results.push({
514
+ name: `plugin-${plugin.name}`,
515
+ status: "warn",
516
+ message: `Plugin failed to load: ${plugin.name}`,
517
+ suggestion: `Try reinstalling: npm install ${plugin.name}`
518
+ });
519
+ }
520
+ }
521
+ return results;
522
+ } catch {
523
+ return [];
524
+ }
525
+ }
526
+ function checkAndroidCli() {
527
+ try {
528
+ const output = execFileSync("android", ["--version"], {
529
+ timeout: 5e3,
530
+ encoding: "utf-8",
531
+ stdio: ["pipe", "pipe", "pipe"]
532
+ }).trim();
533
+ const firstLine = output.split("\n")[0] ?? output;
534
+ return {
535
+ name: "android-cli",
536
+ status: "pass",
537
+ message: `Android CLI: ${firstLine}`
538
+ };
539
+ } catch {
540
+ return {
541
+ name: "android-cli",
542
+ status: "info",
543
+ message: "Android CLI not installed (optional)",
544
+ suggestion: "Google's Android CLI complements GPC for build and device management. See: https://developer.android.com/tools/agents/android-cli"
545
+ };
546
+ }
547
+ }
463
548
  async function checkSigningKey(packageName, accessToken, keystorePath, storePassword, keyAlias) {
464
549
  const results = [];
465
550
  const baseUrl = `https://${API_HOST}/androidpublisher/v3/applications/${encodeURIComponent(packageName)}`;
@@ -948,6 +1033,11 @@ function registerDoctorCommand(program) {
948
1033
  if (staleCacheResult) results.push(staleCacheResult);
949
1034
  const completionResult = await checkShellCompletion();
950
1035
  if (completionResult) results.push(completionResult);
1036
+ const quotaResult = await checkQuotaProximity();
1037
+ if (quotaResult) results.push(quotaResult);
1038
+ const pluginResults = await checkPluginHealth(config?.plugins);
1039
+ results.push(...pluginResults);
1040
+ results.push(checkAndroidCli());
951
1041
  if (opts["verify"] && accessToken && config?.app) {
952
1042
  const ksPath = opts["keystore"] ?? process.env["GPC_KEYSTORE_PATH"];
953
1043
  const ksPass = opts["storePass"] ?? process.env["GPC_STORE_PASSWORD"];
@@ -1031,16 +1121,19 @@ ${green("\u2713")} Ready. Try: gpc status`);
1031
1121
  });
1032
1122
  }
1033
1123
  export {
1124
+ checkAndroidCli,
1034
1125
  checkCiEnvironment,
1035
1126
  checkConfigKeys,
1036
1127
  checkConflictingCredentials,
1037
1128
  checkDeveloperId,
1038
1129
  checkNodeVersion,
1039
1130
  checkPackageName,
1131
+ checkPluginHealth,
1040
1132
  checkProxy,
1133
+ checkQuotaProximity,
1041
1134
  checkShellCompletion,
1042
1135
  checkStaleCache,
1043
1136
  checkVerificationDeadline,
1044
1137
  registerDoctorCommand
1045
1138
  };
1046
- //# sourceMappingURL=doctor-ECRWYCY6.js.map
1139
+ //# sourceMappingURL=doctor-YAGR6P4M.js.map