@gpc-cli/cli 0.9.46 → 0.9.47

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 (37) hide show
  1. package/README.md +36 -15
  2. package/dist/{anomalies-UDE4NGHJ.js → anomalies-V3AFS4LD.js} +20 -3
  3. package/dist/anomalies-V3AFS4LD.js.map +1 -0
  4. package/dist/bin.js +2 -2
  5. package/dist/{changelog-7COFZO7Q.js → changelog-QLDFG5TV.js} +5 -5
  6. package/dist/changelog-QLDFG5TV.js.map +1 -0
  7. package/dist/{chunk-6OWN6S6X.js → chunk-WWVURXVO.js} +16 -13
  8. package/dist/chunk-WWVURXVO.js.map +1 -0
  9. package/dist/{config-2FTCYEGD.js → config-NY3TZGVS.js} +2 -2
  10. package/dist/{doctor-H4X7Q57B.js → doctor-QCCWG6Y3.js} +19 -2
  11. package/dist/{doctor-H4X7Q57B.js.map → doctor-QCCWG6Y3.js.map} +1 -1
  12. package/dist/{feedback-XP765TOO.js → feedback-CET2X67K.js} +2 -2
  13. package/dist/index.js +1 -1
  14. package/dist/{purchases-DAWTMXP6.js → purchases-Z3QBM3UO.js} +4 -2
  15. package/dist/purchases-Z3QBM3UO.js.map +1 -0
  16. package/dist/{releases-2I3WBULC.js → releases-276W3BR7.js} +5 -3
  17. package/dist/releases-276W3BR7.js.map +1 -0
  18. package/dist/{reviews-BCCXIQ6C.js → reviews-YCBBM656.js} +15 -4
  19. package/dist/reviews-YCBBM656.js.map +1 -0
  20. package/dist/rtdn-LID2B7XZ.js +87 -0
  21. package/dist/rtdn-LID2B7XZ.js.map +1 -0
  22. package/dist/{update-OMALGIBR.js → update-XAO5EZHC.js} +2 -2
  23. package/dist/{version-NCSNXNVN.js → version-R3P4NHCF.js} +2 -2
  24. package/dist/{vitals-C23L2Y2E.js → vitals-PJEQUUAK.js} +35 -7
  25. package/dist/vitals-PJEQUUAK.js.map +1 -0
  26. package/package.json +3 -3
  27. package/dist/anomalies-UDE4NGHJ.js.map +0 -1
  28. package/dist/changelog-7COFZO7Q.js.map +0 -1
  29. package/dist/chunk-6OWN6S6X.js.map +0 -1
  30. package/dist/purchases-DAWTMXP6.js.map +0 -1
  31. package/dist/releases-2I3WBULC.js.map +0 -1
  32. package/dist/reviews-BCCXIQ6C.js.map +0 -1
  33. package/dist/vitals-C23L2Y2E.js.map +0 -1
  34. /package/dist/{config-2FTCYEGD.js.map → config-NY3TZGVS.js.map} +0 -0
  35. /package/dist/{feedback-XP765TOO.js.map → feedback-CET2X67K.js.map} +0 -0
  36. /package/dist/{update-OMALGIBR.js.map → update-XAO5EZHC.js.map} +0 -0
  37. /package/dist/{version-NCSNXNVN.js.map → version-R3P4NHCF.js.map} +0 -0
package/README.md CHANGED
@@ -3,14 +3,14 @@
3
3
  <p align="center"><strong>Ship Android apps from your terminal.</strong></p>
4
4
 
5
5
  <p align="center">
6
- The complete CLI for Google Play — 187 API endpoints, one tool.<br>
6
+ The complete CLI for Google Play — 204 API endpoints, one tool.<br>
7
7
  Releases, rollouts, metadata, vitals, reviews, subscriptions, reports, and more.
8
8
  </p>
9
9
 
10
10
  <p align="center">
11
11
  <a href="https://www.npmjs.com/package/@gpc-cli/cli"><img src="https://img.shields.io/npm/v/@gpc-cli/cli?color=00D26A" alt="npm version"></a>
12
12
  <a href="https://github.com/yasserstudio/gpc"><img src="https://img.shields.io/github/stars/yasserstudio/gpc" alt="GitHub Stars"></a>
13
- <img src="https://img.shields.io/badge/Tests-1504_passing-00D26A" alt="Tests">
13
+ <img src="https://img.shields.io/badge/Tests-1845_passing-00D26A" alt="Tests">
14
14
  <img src="https://img.shields.io/badge/License-MIT-yellow" alt="License">
15
15
  </p>
16
16
 
@@ -23,8 +23,11 @@ npm install -g @gpc-cli/cli
23
23
  # Homebrew (macOS/Linux)
24
24
  brew install yasserstudio/tap/gpc
25
25
 
26
- # Standalone binary (no Node.js required)
26
+ # Standalone binary — macOS/Linux (no Node.js required)
27
27
  curl -fsSL https://raw.githubusercontent.com/yasserstudio/gpc/main/scripts/install.sh | sh
28
+
29
+ # Standalone binary — Windows (PowerShell)
30
+ iwr -useb https://raw.githubusercontent.com/yasserstudio/gpc/main/scripts/install.ps1 | iex
28
31
  ```
29
32
 
30
33
  Free. Open-source. No account required beyond your existing Google Play service account.
@@ -35,13 +38,13 @@ Free. Open-source. No account required beyond your existing Google Play service
35
38
  # Authenticate
36
39
  gpc auth login --service-account path/to/key.json
37
40
 
38
- # Verify your setup
41
+ # Verify your setup (20 automated checks)
39
42
  gpc doctor
40
43
 
41
44
  # App health at a glance — releases, vitals, and reviews in one command
42
45
  gpc status
43
46
 
44
- # Upload and release
47
+ # Upload and release (AAB or APK)
45
48
  gpc releases upload app.aab --track internal
46
49
 
47
50
  # Promote to production
@@ -75,25 +78,42 @@ REVIEWS (last 30 days)
75
78
 
76
79
  ## What You Get
77
80
 
78
- 187 API endpoints across these command groups:
81
+ 204 API endpoints across these command groups:
79
82
 
80
83
  | Group | What you can do |
81
84
  | ----------------- | -------------------------------------------------------------------------------------- |
82
- | **Releases** | Upload, promote, rollout increase/halt/resume, end-to-end `publish` |
83
- | **Listings** | Pull and push store listings, upload screenshots works with Fastlane metadata format |
84
- | **Reviews** | Filter by stars, reply to users, export to CSV |
85
- | **Vitals** | Crash rates, ANR, startup, rendering with CI threshold gates |
85
+ | **Releases** | Upload AAB/APK, promote, rollout increase/halt/resume, draft releases, `publish` |
86
+ | **Preflight** | 9 offline AAB policy scannerscatches rejections before upload |
87
+ | **Listings** | Pull and push store listings, upload screenshots Fastlane metadata compatible |
88
+ | **Reviews** | Filter by stars, reply (350-char validated), auto-paginate, export to CSV |
89
+ | **Vitals** | Crash rates, ANR, startup, rendering, battery, memory — with CI threshold gates |
90
+ | **Status** | Releases + vitals + reviews in one command, `--watch`, `--since-last` diff |
86
91
  | **Bundle** | Per-module size breakdown, build-to-build diff, size CI gates |
87
- | **Subscriptions** | Create and manage base plans, offers, and pricing |
88
- | **IAP** | Sync products from local files, batch get and update |
89
- | **Purchases** | Verify, acknowledge, cancel, refund, list voided |
90
- | **Reports** | Download financial and stats reports |
92
+ | **Subscriptions** | Base plans, offers, pricing, batch operations, RTDN notification decoding |
93
+ | **IAP / OTP** | One-time products, purchase options, batch get/update/delete |
94
+ | **Purchases** | Verify, acknowledge, cancel, refund, voided (with `--type` subscription filter) |
95
+ | **Reports** | Financial and stats report downloads |
91
96
  | **Testers** | Add, remove, import from CSV |
92
97
  | **Users** | Invite, update, remove, manage per-app grants |
98
+ | **Doctor** | 20 automated setup checks — config, auth, connectivity, app access, key age |
99
+ | **Anomalies** | Auto-detect vitals quality spikes from Reporting API |
100
+ | **More** | Init, diff, changelog, quota, train, cache, feedback, enterprise, games |
101
+
102
+ ## Exit Codes
103
+
104
+ | Code | Meaning |
105
+ | ---- | ------------------------------------- |
106
+ | `0` | Success |
107
+ | `1` | General error |
108
+ | `2` | Usage error (bad arguments) |
109
+ | `3` | Authentication error |
110
+ | `4` | API error (rate limit, permission) |
111
+ | `5` | Network error |
112
+ | `6` | Threshold breach (vitals CI alerting) |
93
113
 
94
114
  ## CI/CD Ready
95
115
 
96
- JSON output when piped. Formatted tables in your terminal. Semantic exit codes (06) your CI can react to. Every write operation supports `--dry-run`.
116
+ JSON output when piped. Formatted tables in your terminal. Semantic exit codes (0-6) your CI can react to. Every write operation supports `--dry-run`.
97
117
 
98
118
  ```yaml
99
119
  - name: Upload
@@ -102,6 +122,7 @@ JSON output when piped. Formatted tables in your terminal. Semantic exit codes (
102
122
  GPC_APP: com.example.myapp
103
123
  run: |
104
124
  npm install -g @gpc-cli/cli
125
+ gpc preflight app.aab --fail-on error
105
126
  gpc releases upload app.aab --track internal
106
127
  ```
107
128
 
@@ -2,6 +2,9 @@
2
2
  import {
3
3
  resolvePackageName
4
4
  } from "./chunk-NQH4G7BI.js";
5
+ import {
6
+ yellow
7
+ } from "./chunk-FAN4ZITI.js";
5
8
  import {
6
9
  getOutputFormat
7
10
  } from "./chunk-ELXAK7GI.js";
@@ -9,7 +12,7 @@ import {
9
12
  // src/commands/anomalies.ts
10
13
  import { loadConfig } from "@gpc-cli/config";
11
14
  import { resolveAuth } from "@gpc-cli/auth";
12
- import { createReportingClient } from "@gpc-cli/api";
15
+ import { createReportingClient, PlayApiError } from "@gpc-cli/api";
13
16
  import { getVitalsAnomalies, formatOutput } from "@gpc-cli/core";
14
17
  async function getReportingClient(config) {
15
18
  const auth = await resolveAuth({ serviceAccountPath: config.auth?.serviceAccount });
@@ -22,7 +25,21 @@ function registerAnomaliesCommands(program) {
22
25
  const packageName = resolvePackageName(program.opts()["app"], config);
23
26
  const reporting = await getReportingClient(config);
24
27
  const format = getOutputFormat(program, config);
25
- const result = await getVitalsAnomalies(reporting, packageName);
28
+ let result;
29
+ try {
30
+ result = await getVitalsAnomalies(reporting, packageName);
31
+ } catch (err) {
32
+ if (err instanceof PlayApiError && err.statusCode === 403) {
33
+ if (format === "json") {
34
+ console.log(formatOutput({ anomalies: [], message: "Reporting API not enabled or insufficient permissions" }, format));
35
+ } else {
36
+ console.log(`${yellow("\u26A0")} No anomaly data available. The Reporting API may not be enabled for this project.`);
37
+ console.log(` Enable it at: https://console.cloud.google.com/apis/library/playdeveloperreporting.googleapis.com`);
38
+ }
39
+ return;
40
+ }
41
+ throw err;
42
+ }
26
43
  const items = result["anomalies"];
27
44
  if (format !== "json") {
28
45
  if (!items || items.length === 0) {
@@ -46,4 +63,4 @@ function registerAnomaliesCommands(program) {
46
63
  export {
47
64
  registerAnomaliesCommands
48
65
  };
49
- //# sourceMappingURL=anomalies-UDE4NGHJ.js.map
66
+ //# sourceMappingURL=anomalies-V3AFS4LD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/anomalies.ts"],"sourcesContent":["import { resolvePackageName } from \"../resolve.js\";\nimport type { Command } from \"commander\";\nimport type { GpcConfig } from \"@gpc-cli/config\";\nimport { loadConfig } from \"@gpc-cli/config\";\nimport { resolveAuth } from \"@gpc-cli/auth\";\nimport { createReportingClient, PlayApiError } from \"@gpc-cli/api\";\nimport { getVitalsAnomalies, formatOutput } from \"@gpc-cli/core\";\nimport { getOutputFormat } from \"../format.js\";\nimport { yellow } from \"../colors.js\";\n\n\nasync function getReportingClient(config: GpcConfig) {\n const auth = await resolveAuth({ serviceAccountPath: config.auth?.serviceAccount });\n return createReportingClient({ auth });\n}\n\nexport function registerAnomaliesCommands(program: Command): void {\n const anomalies = program.command(\"anomalies\").description(\"Detect and list vitals anomalies\");\n\n anomalies\n .command(\"list\")\n .description(\"List detected vitals anomalies\")\n .action(async () => {\n const config = await loadConfig();\n const packageName = resolvePackageName(program.opts()[\"app\"], config);\n const reporting = await getReportingClient(config);\n const format = getOutputFormat(program, config);\n\n let result;\n try {\n result = await getVitalsAnomalies(reporting, packageName);\n } catch (err) {\n if (err instanceof PlayApiError && err.statusCode === 403) {\n if (format === \"json\") {\n console.log(formatOutput({ anomalies: [], message: \"Reporting API not enabled or insufficient permissions\" }, format));\n } else {\n console.log(`${yellow(\"⚠\")} No anomaly data available. The Reporting API may not be enabled for this project.`);\n console.log(` Enable it at: https://console.cloud.google.com/apis/library/playdeveloperreporting.googleapis.com`);\n }\n return;\n }\n throw err;\n }\n const items = (result as unknown as Record<string, unknown>)[\"anomalies\"] as\n | unknown[]\n | undefined;\n\n if (format !== \"json\") {\n if (!items || items.length === 0) {\n console.log(\"No anomalies detected.\");\n return;\n }\n const rows = items.map((item) => {\n const a = item as Record<string, unknown>;\n return {\n name: String(a[\"name\"] ?? \"-\"),\n metricSet: String(a[\"metricSet\"] ?? \"-\"),\n aggregationPeriod: String(a[\"aggregationPeriod\"] ?? \"-\"),\n };\n });\n console.log(formatOutput(rows, format));\n } else {\n console.log(formatOutput(result, format));\n }\n });\n}\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB,oBAAoB;AACpD,SAAS,oBAAoB,oBAAoB;AAKjD,eAAe,mBAAmB,QAAmB;AACnD,QA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,MAAM,MAAM,CAAC;AAAA,IACxC,OAAO;AACL,cAAQ,IAAI,aAAa,QAAQ,MAAM,CAAC;AAAA,IAC1C;AAAA,EACF,CAAC;AACL;","names":[]}
package/dist/bin.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  createProgram,
4
4
  handleCliError,
5
5
  loadPlugins
6
- } from "./chunk-6OWN6S6X.js";
6
+ } from "./chunk-WWVURXVO.js";
7
7
  import {
8
8
  checkForUpdate,
9
9
  formatUpdateNotification
@@ -46,7 +46,7 @@ if (!_isJsonMode && !_isQuiet && !_isSetupCommand && !existsSync(getUserConfigPa
46
46
  }
47
47
  await setupNetworking();
48
48
  initAudit(getConfigDir());
49
- var currentVersion = "0.9.45";
49
+ var currentVersion = "0.9.47";
50
50
  var isUpdateCommand = process.argv[2] === "update";
51
51
  var updateCheckPromise = isUpdateCommand ? Promise.resolve(null) : checkForUpdate(currentVersion);
52
52
  if (process.argv.includes("--ci")) {
@@ -8,12 +8,12 @@ import { fetchChangelog, formatChangelogEntry } from "@gpc-cli/core";
8
8
  import { formatOutput } from "@gpc-cli/core";
9
9
  import { loadConfig } from "@gpc-cli/config";
10
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) => {
11
+ program.command("changelog").description("Show release history").option("-n, --limit <count>", "Number of releases to show", parseInt, 5).option("--tag <tag>", "Show a specific release (e.g., v0.9.43)").option("--all", "Show all releases").action(async (opts) => {
12
12
  const config = await loadConfig();
13
13
  const format = getOutputFormat(program, config);
14
14
  const entries = await fetchChangelog({
15
15
  limit: opts.all ? 100 : opts.limit,
16
- version: opts.version
16
+ version: opts.tag
17
17
  });
18
18
  if (entries.length === 0) {
19
19
  console.log("No releases found.");
@@ -23,7 +23,7 @@ function registerChangelogCommand(program) {
23
23
  console.log(formatOutput(entries, "json"));
24
24
  return;
25
25
  }
26
- if (opts.version || entries.length === 1) {
26
+ if (opts.tag || entries.length === 1) {
27
27
  console.log(formatChangelogEntry(entries[0]));
28
28
  return;
29
29
  }
@@ -38,11 +38,11 @@ function registerChangelogCommand(program) {
38
38
  }
39
39
  console.log("");
40
40
  console.log(
41
- `Showing ${entries.length} releases. Use --version <tag> for details, or --all for full history.`
41
+ `Showing ${entries.length} releases. Use --tag <tag> for details, or --all for full history.`
42
42
  );
43
43
  });
44
44
  }
45
45
  export {
46
46
  registerChangelogCommand
47
47
  };
48
- //# sourceMappingURL=changelog-7COFZO7Q.js.map
48
+ //# sourceMappingURL=changelog-QLDFG5TV.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(\"--tag <tag>\", \"Show a specific release (e.g., v0.9.43)\")\n .option(\"--all\", \"Show all releases\")\n .action(async (opts: { limit: number; tag?: string; all?: boolean }) => {\n const config = await loadConfig();\n const format = getOutputFormat(program, config);\n\n const entries = await fetchChangelog({\n limit: opts.all ? 100 : opts.limit,\n version: opts.tag,\n });\n\n if (entries.length === 0) {\n console.log(\"No releases found.\");\n return;\n }\n\n if (format === \"json\") {\n console.log(formatOutput(entries, \"json\"));\n return;\n }\n\n // Single version — show full details\n if (opts.tag || 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 --tag <tag> for details, or --all for full history.`,\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,eAAe,yCAAyC,EAC/D,OAAO,SAAS,mBAAmB,EACnC,OAAO,OAAO,SAAyD;AACtE,UAAM,SAAS,MAAM,WAAW;AAChC,UAAM,SAAS,gBAAgB,SAAS,MAAM;AAE9C,UAAM,UAAU,MAAM,eAAe;AAAA,MACnC,OAAO,KAAK,MAAM,MAAM,KAAK;AAAA,MAC7B,SAAS,KAAK;AAAA,IAChB,CAAC;AAED,QAAI,QAAQ,WAAW,GAAG;AACxB,cAAQ,IAAI,oBAAoB;AAChC;AAAA,IACF;AAEA,QAAI,WAAW,QAAQ;AACrB,cAAQ,IAAI,aAAa,SAAS,MAAM,CAAC;AACzC;AAAA,IACF;AAGA,QAAI,KAAK,OAAO,QAAQ,WAAW,GAAG;AACpC,cAAQ,IAAI,qBAAqB,QAAQ,CAAC,CAAE,CAAC;AAC7C;AAAA,IACF;AAGA,UAAM,SAAS;AACf,UAAM,YAAY,SAAI,OAAO,OAAO,MAAM;AAC1C,YAAQ,IAAI,MAAM;AAClB,YAAQ,IAAI,SAAS;AACrB,eAAW,SAAS,SAAS;AAC3B,YAAM,UAAU,MAAM,QAAQ,OAAO,EAAE;AACvC,YAAM,OAAO,MAAM,KAAK,OAAO,EAAE;AACjC,cAAQ,IAAI,GAAG,OAAO,IAAI,IAAI,IAAI,MAAM,KAAK,EAAE;AAAA,IACjD;AACA,YAAQ,IAAI,EAAE;AACd,YAAQ;AAAA,MACN,WAAW,QAAQ,MAAM;AAAA,IAC3B;AAAA,EACF,CAAC;AACL;","names":[]}
@@ -67,25 +67,25 @@ 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.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);
70
+ program.name("gpc").description("GPC \u2014 Google Play Console CLI").version("0.9.47", "-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-OTA3SV3J.js")).registerAuthCommands(program);
74
74
  },
75
75
  config: async () => {
76
- (await import("./config-2FTCYEGD.js")).registerConfigCommands(program);
76
+ (await import("./config-NY3TZGVS.js")).registerConfigCommands(program);
77
77
  },
78
78
  doctor: async () => {
79
- (await import("./doctor-H4X7Q57B.js")).registerDoctorCommand(program);
79
+ (await import("./doctor-QCCWG6Y3.js")).registerDoctorCommand(program);
80
80
  },
81
81
  update: async () => {
82
- (await import("./update-OMALGIBR.js")).registerUpdateCommand(program);
82
+ (await import("./update-XAO5EZHC.js")).registerUpdateCommand(program);
83
83
  },
84
84
  docs: async () => {
85
85
  (await import("./docs-4D2SJ4LY.js")).registerDocsCommand(program);
86
86
  },
87
87
  changelog: async () => {
88
- (await import("./changelog-7COFZO7Q.js")).registerChangelogCommand(program);
88
+ (await import("./changelog-QLDFG5TV.js")).registerChangelogCommand(program);
89
89
  },
90
90
  completion: async () => {
91
91
  (await import("./completion-BCHRJSAT.js")).registerCompletionCommand(program);
@@ -94,7 +94,7 @@ async function createProgram(pluginManager) {
94
94
  (await import("./apps-FKD3ZG5X.js")).registerAppsCommands(program);
95
95
  },
96
96
  releases: async () => {
97
- (await import("./releases-2I3WBULC.js")).registerReleasesCommands(program);
97
+ (await import("./releases-276W3BR7.js")).registerReleasesCommands(program);
98
98
  },
99
99
  tracks: async () => {
100
100
  (await import("./tracks-YHMO2A6B.js")).registerTracksCommands(program);
@@ -106,10 +106,10 @@ async function createProgram(pluginManager) {
106
106
  (await import("./listings-7SGQ4SRX.js")).registerListingsCommands(program);
107
107
  },
108
108
  reviews: async () => {
109
- (await import("./reviews-BCCXIQ6C.js")).registerReviewsCommands(program);
109
+ (await import("./reviews-YCBBM656.js")).registerReviewsCommands(program);
110
110
  },
111
111
  vitals: async () => {
112
- (await import("./vitals-C23L2Y2E.js")).registerVitalsCommands(program);
112
+ (await import("./vitals-PJEQUUAK.js")).registerVitalsCommands(program);
113
113
  },
114
114
  subscriptions: async () => {
115
115
  (await import("./subscriptions-DZP3Y7O7.js")).registerSubscriptionsCommands(program);
@@ -118,7 +118,7 @@ async function createProgram(pluginManager) {
118
118
  (await import("./iap-OUI5YYN4.js")).registerIapCommands(program);
119
119
  },
120
120
  purchases: async () => {
121
- (await import("./purchases-DAWTMXP6.js")).registerPurchasesCommands(program);
121
+ (await import("./purchases-Z3QBM3UO.js")).registerPurchasesCommands(program);
122
122
  },
123
123
  pricing: async () => {
124
124
  (await import("./pricing-JJZFICFL.js")).registerPricingCommands(program);
@@ -174,19 +174,19 @@ async function createProgram(pluginManager) {
174
174
  (await import("./migrate-ZQCJGQQS.js")).registerMigrateCommands(program);
175
175
  },
176
176
  anomalies: async () => {
177
- (await import("./anomalies-UDE4NGHJ.js")).registerAnomaliesCommands(program);
177
+ (await import("./anomalies-V3AFS4LD.js")).registerAnomaliesCommands(program);
178
178
  },
179
179
  "install-skills": async () => {
180
180
  (await import("./install-skills-6QDUXI5F.js")).registerInstallSkillsCommand(program);
181
181
  },
182
182
  version: async () => {
183
- (await import("./version-NCSNXNVN.js")).registerVersionCommand(program);
183
+ (await import("./version-R3P4NHCF.js")).registerVersionCommand(program);
184
184
  },
185
185
  cache: async () => {
186
186
  (await import("./cache-XKPLZYEB.js")).registerCacheCommand(program);
187
187
  },
188
188
  feedback: async () => {
189
- (await import("./feedback-XP765TOO.js")).registerFeedbackCommand(program);
189
+ (await import("./feedback-CET2X67K.js")).registerFeedbackCommand(program);
190
190
  },
191
191
  quickstart: async () => {
192
192
  (await import("./quickstart-Z5Y3FYJU.js")).registerQuickstartCommand(program);
@@ -217,6 +217,9 @@ async function createProgram(pluginManager) {
217
217
  },
218
218
  plugins: async () => {
219
219
  registerPluginsCommand(program, pluginManager);
220
+ },
221
+ rtdn: async () => {
222
+ (await import("./rtdn-LID2B7XZ.js")).registerRtdnCommands(program);
220
223
  }
221
224
  };
222
225
  function levenshtein(a, b) {
@@ -451,4 +454,4 @@ export {
451
454
  createProgram,
452
455
  handleCliError
453
456
  };
454
- //# sourceMappingURL=chunk-6OWN6S6X.js.map
457
+ //# sourceMappingURL=chunk-WWVURXVO.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 rtdn: async () => {\n (await import(\"./commands/rtdn.js\")).registerRtdnCommands(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,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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-H4X7Q57B.js");
81
+ const { registerDoctorCommand } = await import("./doctor-QCCWG6Y3.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-2FTCYEGD.js.map
110
+ //# sourceMappingURL=config-NY3TZGVS.js.map
@@ -140,7 +140,7 @@ function checkCiEnvironment() {
140
140
  };
141
141
  }
142
142
  async function checkGpcVersion() {
143
- const currentVersion = "0.9.45";
143
+ const currentVersion = "0.9.47";
144
144
  if (currentVersion === "0.0.0") {
145
145
  return { name: "version", status: "info", message: "GPC development build" };
146
146
  }
@@ -623,6 +623,23 @@ function registerDoctorCommand(program) {
623
623
  if (accessToken && config?.app) {
624
624
  results.push(await checkAppAccess(config.app, accessToken));
625
625
  }
626
+ if (config?.developerId) {
627
+ const devId = String(config.developerId);
628
+ if (/^\d{10,}$/.test(devId)) {
629
+ results.push({
630
+ name: "developer-id",
631
+ status: "pass",
632
+ message: `Developer ID: ${devId}`
633
+ });
634
+ } else {
635
+ results.push({
636
+ name: "developer-id",
637
+ status: "warn",
638
+ message: `Developer ID "${devId}" may be invalid \u2014 expected a long numeric string`,
639
+ suggestion: "Find your Developer ID in Play Console \u2192 Settings \u2192 Developer account \u2192 Developer ID."
640
+ });
641
+ }
642
+ }
626
643
  if (opts["fix"]) {
627
644
  for (const r of results) {
628
645
  if (r.status === "fail" || r.status === "warn") {
@@ -688,4 +705,4 @@ export {
688
705
  checkProxy,
689
706
  registerDoctorCommand
690
707
  };
691
- //# sourceMappingURL=doctor-H4X7Q57B.js.map
708
+ //# sourceMappingURL=doctor-QCCWG6Y3.js.map