@gpc-cli/cli 0.9.74 → 0.9.76

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 (87) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -1
  3. package/dist/__complete-AZXI2O25.js +0 -0
  4. package/dist/anomalies-I5P6QQAZ.js +0 -0
  5. package/dist/apps-WPUQOQLL.js +0 -0
  6. package/dist/audit-BDPS5ODN.js +0 -0
  7. package/dist/auth-4DRT7ZH2.js +0 -0
  8. package/dist/bin.js +2 -2
  9. package/dist/bundle-PFTE7XMU.js +0 -0
  10. package/dist/bundles-6F3AD4QM.js +0 -0
  11. package/dist/cache-FGNP7Y37.js +0 -0
  12. package/dist/changelog-STYBBYDC.js +0 -0
  13. package/dist/chunk-22XCOLZX.js +0 -0
  14. package/dist/chunk-3SJ6OXCZ.js +0 -0
  15. package/dist/chunk-ELXAK7GI.js +0 -0
  16. package/dist/chunk-FAN4ZITI.js +0 -0
  17. package/dist/chunk-JDRY7HK5.js +0 -0
  18. package/dist/chunk-QLR4EWJG.js +0 -0
  19. package/dist/chunk-RZQSEDKI.js +0 -0
  20. package/dist/chunk-WSLFHX5X.js +0 -0
  21. package/dist/chunk-Y3QZDAKS.js +0 -0
  22. package/dist/{chunk-OUOQV62L.js → chunk-ZGYSVI3L.js} +11 -11
  23. package/dist/completion-ZK7RPPFD.js +0 -0
  24. package/dist/{config-RRQM4A3G.js → config-7KYZ2AOQ.js} +2 -2
  25. package/dist/{data-safety-46VY64OO.js → data-safety-UM74SYYE.js} +3 -3
  26. package/dist/data-safety-UM74SYYE.js.map +1 -0
  27. package/dist/device-tiers-MNZYMG3Y.js +0 -0
  28. package/dist/diff-OBSHUSTL.js +0 -0
  29. package/dist/docs-OU6LSSJD.js +0 -0
  30. package/dist/{doctor-AT2OKNVS.js → doctor-5YPXWCNS.js} +2 -2
  31. package/dist/enterprise-L7DTIX2O.js +0 -0
  32. package/dist/{external-transactions-BP42CK3H.js → external-transactions-TL6BCRV5.js} +3 -3
  33. package/dist/external-transactions-TL6BCRV5.js.map +1 -0
  34. package/dist/{feedback-LS2B3NBT.js → feedback-GUXVUAIA.js} +2 -2
  35. package/dist/games-SVFN2YIS.js +0 -0
  36. package/dist/generated/docs-bundle.json +1 -1
  37. package/dist/generated-apks-TC33S2YN.js +0 -0
  38. package/dist/grants-32DED5QL.js +0 -0
  39. package/dist/iap-EPJ76IAC.js +0 -0
  40. package/dist/index.js +1 -1
  41. package/dist/init-OCBFI4VH.js +0 -0
  42. package/dist/install-skills-P7LXDTBX.js +0 -0
  43. package/dist/internal-sharing-KW6YENDG.js +0 -0
  44. package/dist/listings-7RTA4MCI.js +0 -0
  45. package/dist/migrate-ZQCJGQQS.js +0 -0
  46. package/dist/one-time-products-OIDBVCFE.js +0 -0
  47. package/dist/preflight-BL67VGUX.js +0 -0
  48. package/dist/pricing-HYQRXKNO.js +0 -0
  49. package/dist/prompt-HJXNXXAR.js +0 -0
  50. package/dist/publish-4LBADN6P.js +0 -0
  51. package/dist/purchase-options-KFWW4JW2.js +0 -0
  52. package/dist/{purchases-GFLYTKR3.js → purchases-ZKL2RSJL.js} +37 -18
  53. package/dist/purchases-ZKL2RSJL.js.map +1 -0
  54. package/dist/quickstart-FOWM3OKT.js +0 -0
  55. package/dist/quota-MZRWYJGR.js +0 -0
  56. package/dist/recovery-2VJJLAIQ.js +0 -0
  57. package/dist/releases-KXE2EKSO.js +0 -0
  58. package/dist/reports-CIB2T3XT.js +0 -0
  59. package/dist/reviews-GZ2VOIRN.js +0 -0
  60. package/dist/rtdn-ECZOB7FH.js +0 -0
  61. package/dist/setup-IKHZQJIH.js +0 -0
  62. package/dist/skills-2H5WC6XH.js +0 -0
  63. package/dist/status-32AJ7A6O.js +0 -0
  64. package/dist/{subscriptions-JPHFBREY.js → subscriptions-U75YUOR2.js} +4 -4
  65. package/dist/subscriptions-U75YUOR2.js.map +1 -0
  66. package/dist/system-apks-KWTN5LHO.js +0 -0
  67. package/dist/testers-7ILUCKYB.js +0 -0
  68. package/dist/tracks-RH3RKVFB.js +0 -0
  69. package/dist/train-G44NEK43.js +0 -0
  70. package/dist/{update-2Z5XJD33.js → update-UW3MAS2D.js} +2 -2
  71. package/dist/users-W66YCFDX.js +0 -0
  72. package/dist/validate-RHWEZYD2.js +0 -0
  73. package/dist/verify-O2PSBTIC.js +0 -0
  74. package/dist/{version-SOH43VET.js → version-RLUBRC7N.js} +2 -2
  75. package/dist/vitals-QPHS6QFH.js +0 -0
  76. package/dist/watch-4HDEY5FR.js +0 -0
  77. package/package.json +19 -19
  78. package/dist/data-safety-46VY64OO.js.map +0 -1
  79. package/dist/external-transactions-BP42CK3H.js.map +0 -1
  80. package/dist/purchases-GFLYTKR3.js.map +0 -1
  81. package/dist/subscriptions-JPHFBREY.js.map +0 -1
  82. /package/dist/{chunk-OUOQV62L.js.map → chunk-ZGYSVI3L.js.map} +0 -0
  83. /package/dist/{config-RRQM4A3G.js.map → config-7KYZ2AOQ.js.map} +0 -0
  84. /package/dist/{doctor-AT2OKNVS.js.map → doctor-5YPXWCNS.js.map} +0 -0
  85. /package/dist/{feedback-LS2B3NBT.js.map → feedback-GUXVUAIA.js.map} +0 -0
  86. /package/dist/{update-2Z5XJD33.js.map → update-UW3MAS2D.js.map} +0 -0
  87. /package/dist/{version-SOH43VET.js.map → version-RLUBRC7N.js.map} +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 GPC Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -97,7 +97,7 @@ curl -fsSL https://raw.githubusercontent.com/yasserstudio/gpc/main/scripts/insta
97
97
  - [Commands reference](https://yasserstudio.github.io/gpc/commands/)
98
98
  - [CI/CD recipes](https://yasserstudio.github.io/gpc/ci-cd/)
99
99
 
100
- Free to use. 2,269 tests. 90%+ coverage. Every write operation supports `--dry-run`.
100
+ Free to use. 2,313 tests. 90%+ coverage. Every write operation supports `--dry-run`.
101
101
 
102
102
  ## Licensing
103
103
 
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/bin.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  createProgram,
4
4
  handleCliError,
5
5
  loadPlugins
6
- } from "./chunk-OUOQV62L.js";
6
+ } from "./chunk-ZGYSVI3L.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.74";
60
+ var currentVersion = "0.9.76";
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);
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -59,19 +59,19 @@ function registerPluginCommands(program, manager) {
59
59
  import { Command } from "commander";
60
60
  async function createProgram(pluginManager) {
61
61
  const program = new Command();
62
- program.name("gpc").description("GPC \u2014 Google Play Console CLI").version("0.9.74", "-V, --version").option("-o, --output <format>", "Output format: table, json, yaml, markdown, csv, tsv, junit").option("-v, --verbose", "Enable debug logging").option("-q, --quiet", "Suppress non-essential output").option("-a, --app <package>", "App package name").option("-p, --profile <name>", "Auth profile name").option("--no-color", "Disable colored output").option("--no-interactive", "Disable interactive prompts").option("-y, --yes", "Skip confirmation prompts").option("--dry-run", "Preview changes without executing").option("--notify [target]", "Send webhook notification on completion (slack, discord, custom)").option("--ci", "Force CI mode (JSON output, no prompts, strict exit codes)").option("-j, --json", "Shorthand for --output json").option("--apps <csv>", "Comma-separated package names for multi-app operations").showSuggestionAfterError(false);
62
+ program.name("gpc").description("GPC \u2014 Google Play Console CLI").version("0.9.76", "-V, --version").option("-o, --output <format>", "Output format: table, json, yaml, markdown, csv, tsv, junit").option("-v, --verbose", "Enable debug logging").option("-q, --quiet", "Suppress non-essential output").option("-a, --app <package>", "App package name").option("-p, --profile <name>", "Auth profile name").option("--no-color", "Disable colored output").option("--no-interactive", "Disable interactive prompts").option("-y, --yes", "Skip confirmation prompts").option("--dry-run", "Preview changes without executing").option("--notify [target]", "Send webhook notification on completion (slack, discord, custom)").option("--ci", "Force CI mode (JSON output, no prompts, strict exit codes)").option("-j, --json", "Shorthand for --output json").option("--apps <csv>", "Comma-separated package names for multi-app operations").showSuggestionAfterError(false);
63
63
  const commandLoaders = {
64
64
  auth: async () => {
65
65
  (await import("./auth-4DRT7ZH2.js")).registerAuthCommands(program);
66
66
  },
67
67
  config: async () => {
68
- (await import("./config-RRQM4A3G.js")).registerConfigCommands(program);
68
+ (await import("./config-7KYZ2AOQ.js")).registerConfigCommands(program);
69
69
  },
70
70
  doctor: async () => {
71
- (await import("./doctor-AT2OKNVS.js")).registerDoctorCommand(program);
71
+ (await import("./doctor-5YPXWCNS.js")).registerDoctorCommand(program);
72
72
  },
73
73
  update: async () => {
74
- (await import("./update-2Z5XJD33.js")).registerUpdateCommand(program);
74
+ (await import("./update-UW3MAS2D.js")).registerUpdateCommand(program);
75
75
  },
76
76
  docs: async () => {
77
77
  (await import("./docs-OU6LSSJD.js")).registerDocsCommand(program);
@@ -111,13 +111,13 @@ async function createProgram(pluginManager) {
111
111
  (await import("./vitals-QPHS6QFH.js")).registerVitalsCommands(program);
112
112
  },
113
113
  subscriptions: async () => {
114
- (await import("./subscriptions-JPHFBREY.js")).registerSubscriptionsCommands(program);
114
+ (await import("./subscriptions-U75YUOR2.js")).registerSubscriptionsCommands(program);
115
115
  },
116
116
  iap: async () => {
117
117
  (await import("./iap-EPJ76IAC.js")).registerIapCommands(program);
118
118
  },
119
119
  purchases: async () => {
120
- (await import("./purchases-GFLYTKR3.js")).registerPurchasesCommands(program);
120
+ (await import("./purchases-ZKL2RSJL.js")).registerPurchasesCommands(program);
121
121
  },
122
122
  pricing: async () => {
123
123
  (await import("./pricing-HYQRXKNO.js")).registerPricingCommands(program);
@@ -141,10 +141,10 @@ async function createProgram(pluginManager) {
141
141
  (await import("./recovery-2VJJLAIQ.js")).registerRecoveryCommands(program);
142
142
  },
143
143
  "data-safety": async () => {
144
- (await import("./data-safety-46VY64OO.js")).registerDataSafetyCommands(program);
144
+ (await import("./data-safety-UM74SYYE.js")).registerDataSafetyCommands(program);
145
145
  },
146
146
  "external-transactions": async () => {
147
- (await import("./external-transactions-BP42CK3H.js")).registerExternalTransactionsCommands(
147
+ (await import("./external-transactions-TL6BCRV5.js")).registerExternalTransactionsCommands(
148
148
  program
149
149
  );
150
150
  },
@@ -191,13 +191,13 @@ async function createProgram(pluginManager) {
191
191
  (await import("./verify-O2PSBTIC.js")).registerVerifyCommand(program);
192
192
  },
193
193
  version: async () => {
194
- (await import("./version-SOH43VET.js")).registerVersionCommand(program);
194
+ (await import("./version-RLUBRC7N.js")).registerVersionCommand(program);
195
195
  },
196
196
  cache: async () => {
197
197
  (await import("./cache-FGNP7Y37.js")).registerCacheCommand(program);
198
198
  },
199
199
  feedback: async () => {
200
- (await import("./feedback-LS2B3NBT.js")).registerFeedbackCommand(program);
200
+ (await import("./feedback-GUXVUAIA.js")).registerFeedbackCommand(program);
201
201
  },
202
202
  setup: async () => {
203
203
  (await import("./setup-IKHZQJIH.js")).registerSetupCommand(program);
@@ -471,4 +471,4 @@ export {
471
471
  createProgram,
472
472
  handleCliError
473
473
  };
474
- //# sourceMappingURL=chunk-OUOQV62L.js.map
474
+ //# sourceMappingURL=chunk-ZGYSVI3L.js.map
File without changes
@@ -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-AT2OKNVS.js");
81
+ const { registerDoctorCommand } = await import("./doctor-5YPXWCNS.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-RRQM4A3G.js.map
110
+ //# sourceMappingURL=config-7KYZ2AOQ.js.map
@@ -27,7 +27,7 @@ function registerDataSafetyCommands(program) {
27
27
  });
28
28
  throw err;
29
29
  });
30
- dataSafety.command("update").description("Update data safety declaration from a JSON file").requiredOption("--file <path>", "Path to data safety JSON file").action(async (options) => {
30
+ dataSafety.command("update").description("Update data safety declaration from a CSV file").requiredOption("--file <path>", "Path to data safety CSV file (Play Console export format)").action(async (options) => {
31
31
  const config = await loadConfig();
32
32
  const packageName = resolvePackageName(program.opts()["app"], config);
33
33
  const format = getOutputFormat(program, config);
@@ -47,7 +47,7 @@ function registerDataSafetyCommands(program) {
47
47
  const result = await importDataSafety(client, packageName, options.file);
48
48
  console.log(formatOutput(result, format));
49
49
  });
50
- dataSafety.command("export").description("Export data safety declaration to a JSON file").option("--output <path>", "Output file path", "data-safety.json").action(async () => {
50
+ dataSafety.command("export").description("Export data safety declaration to a file").action(async () => {
51
51
  const err = new Error(
52
52
  "The Google Play Developer API does not provide a GET endpoint for data safety declarations.\nData safety labels cannot be exported via the API."
53
53
  );
@@ -62,4 +62,4 @@ function registerDataSafetyCommands(program) {
62
62
  export {
63
63
  registerDataSafetyCommands
64
64
  };
65
- //# sourceMappingURL=data-safety-46VY64OO.js.map
65
+ //# sourceMappingURL=data-safety-UM74SYYE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/data-safety.ts"],"sourcesContent":["import { resolvePackageName, getClient } from \"../resolve.js\";\nimport type { Command } from \"commander\";\nimport { loadConfig } from \"@gpc-cli/config\";\n\nimport { importDataSafety, formatOutput } from \"@gpc-cli/core\";\nimport { isDryRun, printDryRun } from \"../dry-run.js\";\nimport { getOutputFormat } from \"../format.js\";\n\nexport function registerDataSafetyCommands(program: Command): void {\n const dataSafety = program.command(\"data-safety\").description(\"Manage data safety declarations\");\n\n dataSafety\n .command(\"get\")\n .description(\"Get the current data safety declaration\")\n .action(async () => {\n const err = new Error(\n \"The Google Play Developer API does not provide a GET endpoint for data safety declarations.\\n\\n\" +\n \"Data safety labels can only be updated (not read) via the API.\\n\" +\n \"To view your current data safety declaration, use the Google Play Console:\\n\" +\n \" https://play.google.com/console → App content → Data safety\",\n );\n Object.assign(err, {\n code: \"UNSUPPORTED_OPERATION\",\n exitCode: 2,\n suggestion:\n \"To update data safety via the API, use: gpc data-safety update --file <csv-file>\",\n });\n throw err;\n });\n\n dataSafety\n .command(\"update\")\n .description(\"Update data safety declaration from a CSV file\")\n .requiredOption(\"--file <path>\", \"Path to data safety CSV file (Play Console export format)\")\n .action(async (options) => {\n const config = await loadConfig();\n const packageName = resolvePackageName(program.opts()[\"app\"], config);\n const format = getOutputFormat(program, config);\n\n if (isDryRun(program)) {\n printDryRun(\n {\n command: \"data-safety update\",\n action: \"update data safety from\",\n target: options.file,\n },\n format,\n formatOutput,\n );\n return;\n }\n\n const client = await getClient(config);\n\n const result = await importDataSafety(client, packageName, options.file);\n console.log(formatOutput(result, format));\n });\n\n dataSafety\n .command(\"export\")\n .description(\"Export data safety declaration to a file\")\n .action(async () => {\n const err = new Error(\n \"The Google Play Developer API does not provide a GET endpoint for data safety declarations.\\n\" +\n \"Data safety labels cannot be exported via the API.\",\n );\n Object.assign(err, {\n code: \"UNSUPPORTED_OPERATION\",\n exitCode: 2,\n suggestion:\n \"To export your data safety declaration, use the Google Play Console: App content → Data safety → Export to CSV\",\n });\n throw err;\n });\n}\n"],"mappings":";;;;;;;;;;;;;;AAEA,SAAS,kBAAkB;AAE3B,SAAS,kBAAkB,oBAAoB;AAIxC,SAAS,2BAA2B,SAAwB;AACjE,QAAM,aAAa,QAAQ,QAAQ,aAAa,EAAE,YAAY,iCAAiC;AAE/F,aACG,QAAQ,KAAK,EACb,YAAY,yCAAyC,EACrD,OAAO,YAAY;AAClB,UAAM,MAAM,IAAI;AAAA,MACd;AAAA,IAIF;AACA,WAAO,OAAO,KAAK;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,YACE;AAAA,IACJ,CAAC;AACD,UAAM;AAAA,EACR,CAAC;AAEH,aACG,QAAQ,QAAQ,EAChB,YAAY,gDAAgD,EAC5D,eAAe,iBAAiB,2DAA2D,EAC3F,OAAO,OAAO,YAAY;AACzB,UAAM,SAAS,MAAM,WAAW;AAChC,UAAM,cAAc,mBAAmB,QAAQ,KAAK,EAAE,KAAK,GAAG,MAAM;AACpE,UAAM,SAAS,gBAAgB,SAAS,MAAM;AAE9C,QAAI,SAAS,OAAO,GAAG;AACrB;AAAA,QACE;AAAA,UACE,SAAS;AAAA,UACT,QAAQ;AAAA,UACR,QAAQ,QAAQ;AAAA,QAClB;AAAA,QACA;AAAA,QACA;AAAA,MACF;AACA;AAAA,IACF;AAEA,UAAM,SAAS,MAAM,UAAU,MAAM;AAErC,UAAM,SAAS,MAAM,iBAAiB,QAAQ,aAAa,QAAQ,IAAI;AACvE,YAAQ,IAAI,aAAa,QAAQ,MAAM,CAAC;AAAA,EAC1C,CAAC;AAEH,aACG,QAAQ,QAAQ,EAChB,YAAY,0CAA0C,EACtD,OAAO,YAAY;AAClB,UAAM,MAAM,IAAI;AAAA,MACd;AAAA,IAEF;AACA,WAAO,OAAO,KAAK;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,YACE;AAAA,IACJ,CAAC;AACD,UAAM;AAAA,EACR,CAAC;AACL;","names":[]}
File without changes
File without changes
File without changes
@@ -144,7 +144,7 @@ function checkCiEnvironment() {
144
144
  };
145
145
  }
146
146
  async function checkGpcVersion() {
147
- const currentVersion = "0.9.74";
147
+ const currentVersion = "0.9.76";
148
148
  if (currentVersion === "0.0.0") {
149
149
  return { name: "version", status: "info", message: "GPC development build" };
150
150
  }
@@ -1138,4 +1138,4 @@ export {
1138
1138
  checkVerificationDeadline,
1139
1139
  registerDoctorCommand
1140
1140
  };
1141
- //# sourceMappingURL=doctor-AT2OKNVS.js.map
1141
+ //# sourceMappingURL=doctor-5YPXWCNS.js.map
File without changes
@@ -25,7 +25,7 @@ import {
25
25
  import { readFileSync } from "fs";
26
26
  function registerExternalTransactionsCommands(program) {
27
27
  const extTxn = program.command("external-transactions").alias("ext-txn").description("Manage external transactions (alternative billing)");
28
- extTxn.command("create").description("Create a new external transaction").requiredOption("--file <path>", "Path to JSON file with transaction data").action(async (options) => {
28
+ extTxn.command("create").description("Create a new external transaction").requiredOption("--file <path>", "Path to JSON file with transaction data").requiredOption("--transaction-id <id>", "External transaction ID").action(async (options) => {
29
29
  const config = await loadConfig();
30
30
  const packageName = resolvePackageName(program.opts()["app"], config);
31
31
  const format = getOutputFormat(program, config);
@@ -57,7 +57,7 @@ function registerExternalTransactionsCommands(program) {
57
57
  return;
58
58
  }
59
59
  const client = await getClient(config);
60
- const result = await createExternalTransaction(client, packageName, data);
60
+ const result = await createExternalTransaction(client, packageName, data, options.transactionId);
61
61
  console.log(formatOutput(result, format));
62
62
  });
63
63
  extTxn.command("get <id>").description("Get an external transaction by ID").action(async (id) => {
@@ -107,4 +107,4 @@ function registerExternalTransactionsCommands(program) {
107
107
  export {
108
108
  registerExternalTransactionsCommands
109
109
  };
110
- //# sourceMappingURL=external-transactions-BP42CK3H.js.map
110
+ //# sourceMappingURL=external-transactions-TL6BCRV5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/external-transactions.ts"],"sourcesContent":["import { resolvePackageName, getClient } from \"../resolve.js\";\nimport type { Command } from \"commander\";\nimport { loadConfig } from \"@gpc-cli/config\";\n\nimport {\n createExternalTransaction,\n getExternalTransaction,\n refundExternalTransaction,\n formatOutput,\n} from \"@gpc-cli/core\";\nimport { getOutputFormat } from \"../format.js\";\nimport { isDryRun, printDryRun } from \"../dry-run.js\";\nimport { requireConfirm } from \"../prompt.js\";\nimport { readFileSync } from \"node:fs\";\n\nexport function registerExternalTransactionsCommands(program: Command): void {\n const extTxn = program\n .command(\"external-transactions\")\n .alias(\"ext-txn\")\n .description(\"Manage external transactions (alternative billing)\");\n\n extTxn\n .command(\"create\")\n .description(\"Create a new external transaction\")\n .requiredOption(\"--file <path>\", \"Path to JSON file with transaction data\")\n .requiredOption(\"--transaction-id <id>\", \"External transaction ID\")\n .action(async (options) => {\n const config = await loadConfig();\n const packageName = resolvePackageName(program.opts()[\"app\"], config);\n const format = getOutputFormat(program, config);\n\n let data: Record<string, unknown>;\n try {\n data = JSON.parse(readFileSync(options.file, \"utf-8\"));\n } catch (err) {\n const error = new Error(\n `Could not read transaction data from ${options.file}: ${err instanceof Error ? err.message : String(err)}`,\n );\n Object.assign(error, {\n code: \"INVALID_INPUT\",\n exitCode: 2,\n suggestion: \"Check the file path and ensure it contains valid JSON.\",\n });\n throw error;\n }\n\n if (isDryRun(program)) {\n printDryRun(\n {\n command: \"external-transactions create\",\n action: \"create external transaction\",\n target: packageName,\n details: data,\n },\n format,\n formatOutput,\n );\n return;\n }\n\n const client = await getClient(config);\n\n const result = await createExternalTransaction(client, packageName, data as any, options.transactionId);\n console.log(formatOutput(result, format));\n });\n\n extTxn\n .command(\"get <id>\")\n .description(\"Get an external transaction by ID\")\n .action(async (id: string) => {\n const config = await loadConfig();\n const packageName = resolvePackageName(program.opts()[\"app\"], config);\n const client = await getClient(config);\n const format = getOutputFormat(program, config);\n\n const result = await getExternalTransaction(client, packageName, id);\n console.log(formatOutput(result, format));\n });\n\n extTxn\n .command(\"refund <id>\")\n .description(\"Refund an external transaction\")\n .option(\"--full\", \"Full refund\")\n .option(\"--partial-amount <micros>\", \"Partial refund pre-tax amount in micros (e.g., 1990000)\")\n .option(\"--currency <code>\", \"Currency code for partial refund (e.g. USD)\")\n .action(async (id: string, options) => {\n const config = await loadConfig();\n const packageName = resolvePackageName(program.opts()[\"app\"], config);\n const format = getOutputFormat(program, config);\n\n const refundData: Record<string, unknown> = {};\n if (options.full) {\n refundData[\"fullRefund\"] = {};\n } else if (options.partialAmount) {\n refundData[\"partialRefund\"] = {\n refundPreTaxAmount: {\n priceMicros: options.partialAmount,\n currency: options.currency,\n },\n };\n } else {\n refundData[\"fullRefund\"] = {};\n }\n\n await requireConfirm(`Refund external transaction \"${id}\"?`, program);\n\n if (isDryRun(program)) {\n printDryRun(\n {\n command: \"external-transactions refund\",\n action: \"refund external transaction\",\n target: id,\n details: refundData,\n },\n format,\n formatOutput,\n );\n return;\n }\n\n const client = await getClient(config);\n\n const result = await refundExternalTransaction(client, packageName, id, refundData);\n console.log(formatOutput(result, format));\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAEA,SAAS,kBAAkB;AAE3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP,SAAS,oBAAoB;AAEtB,SAAS,qCAAqC,SAAwB;AAC3E,QAAM,SAAS,QACZ,QAAQ,uBAAuB,EAC/B,MAAM,SAAS,EACf,YAAY,oDAAoD;AAEnE,SACG,QAAQ,QAAQ,EAChB,YAAY,mCAAmC,EAC/C,eAAe,iBAAiB,yCAAyC,EACzE,eAAe,yBAAyB,yBAAyB,EACjE,OAAO,OAAO,YAAY;AACzB,UAAM,SAAS,MAAM,WAAW;AAChC,UAAM,cAAc,mBAAmB,QAAQ,KAAK,EAAE,KAAK,GAAG,MAAM;AACpE,UAAM,SAAS,gBAAgB,SAAS,MAAM;AAE9C,QAAI;AACJ,QAAI;AACF,aAAO,KAAK,MAAM,aAAa,QAAQ,MAAM,OAAO,CAAC;AAAA,IACvD,SAAS,KAAK;AACZ,YAAM,QAAQ,IAAI;AAAA,QAChB,wCAAwC,QAAQ,IAAI,KAAK,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC;AAAA,MAC3G;AACA,aAAO,OAAO,OAAO;AAAA,QACnB,MAAM;AAAA,QACN,UAAU;AAAA,QACV,YAAY;AAAA,MACd,CAAC;AACD,YAAM;AAAA,IACR;AAEA,QAAI,SAAS,OAAO,GAAG;AACrB;AAAA,QACE;AAAA,UACE,SAAS;AAAA,UACT,QAAQ;AAAA,UACR,QAAQ;AAAA,UACR,SAAS;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,MACF;AACA;AAAA,IACF;AAEA,UAAM,SAAS,MAAM,UAAU,MAAM;AAErC,UAAM,SAAS,MAAM,0BAA0B,QAAQ,aAAa,MAAa,QAAQ,aAAa;AACtG,YAAQ,IAAI,aAAa,QAAQ,MAAM,CAAC;AAAA,EAC1C,CAAC;AAEH,SACG,QAAQ,UAAU,EAClB,YAAY,mCAAmC,EAC/C,OAAO,OAAO,OAAe;AAC5B,UAAM,SAAS,MAAM,WAAW;AAChC,UAAM,cAAc,mBAAmB,QAAQ,KAAK,EAAE,KAAK,GAAG,MAAM;AACpE,UAAM,SAAS,MAAM,UAAU,MAAM;AACrC,UAAM,SAAS,gBAAgB,SAAS,MAAM;AAE9C,UAAM,SAAS,MAAM,uBAAuB,QAAQ,aAAa,EAAE;AACnE,YAAQ,IAAI,aAAa,QAAQ,MAAM,CAAC;AAAA,EAC1C,CAAC;AAEH,SACG,QAAQ,aAAa,EACrB,YAAY,gCAAgC,EAC5C,OAAO,UAAU,aAAa,EAC9B,OAAO,6BAA6B,yDAAyD,EAC7F,OAAO,qBAAqB,6CAA6C,EACzE,OAAO,OAAO,IAAY,YAAY;AACrC,UAAM,SAAS,MAAM,WAAW;AAChC,UAAM,cAAc,mBAAmB,QAAQ,KAAK,EAAE,KAAK,GAAG,MAAM;AACpE,UAAM,SAAS,gBAAgB,SAAS,MAAM;AAE9C,UAAM,aAAsC,CAAC;AAC7C,QAAI,QAAQ,MAAM;AAChB,iBAAW,YAAY,IAAI,CAAC;AAAA,IAC9B,WAAW,QAAQ,eAAe;AAChC,iBAAW,eAAe,IAAI;AAAA,QAC5B,oBAAoB;AAAA,UAClB,aAAa,QAAQ;AAAA,UACrB,UAAU,QAAQ;AAAA,QACpB;AAAA,MACF;AAAA,IACF,OAAO;AACL,iBAAW,YAAY,IAAI,CAAC;AAAA,IAC9B;AAEA,UAAM,eAAe,gCAAgC,EAAE,MAAM,OAAO;AAEpE,QAAI,SAAS,OAAO,GAAG;AACrB;AAAA,QACE;AAAA,UACE,SAAS;AAAA,UACT,QAAQ;AAAA,UACR,QAAQ;AAAA,UACR,SAAS;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,MACF;AACA;AAAA,IACF;AAEA,UAAM,SAAS,MAAM,UAAU,MAAM;AAErC,UAAM,SAAS,MAAM,0BAA0B,QAAQ,aAAa,IAAI,UAAU;AAClF,YAAQ,IAAI,aAAa,QAAQ,MAAM,CAAC;AAAA,EAC1C,CAAC;AACL;","names":[]}
@@ -9,7 +9,7 @@ import { execFile } from "child_process";
9
9
  import { listAuditEvents } from "@gpc-cli/core";
10
10
  function registerFeedbackCommand(program) {
11
11
  program.command("feedback").description("Open a pre-filled GitHub issue with system diagnostics").option("--title <title>", "Issue title").option("--print", "Print the report to stdout instead of opening a browser").action(async (opts) => {
12
- const version = "0.9.74";
12
+ const version = "0.9.76";
13
13
  let lastCommand = "";
14
14
  try {
15
15
  const events = await listAuditEvents({ limit: 3 });
@@ -67,4 +67,4 @@ ${url}`);
67
67
  export {
68
68
  registerFeedbackCommand
69
69
  };
70
- //# sourceMappingURL=feedback-LS2B3NBT.js.map
70
+ //# sourceMappingURL=feedback-GUXVUAIA.js.map
File without changes