@gpc-cli/cli 0.9.59 → 0.9.61
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.
- package/README.md +1 -1
- package/dist/__complete-QFD3SUAO.js +146 -0
- package/dist/__complete-QFD3SUAO.js.map +1 -0
- package/dist/bin.js +14 -11
- package/dist/bin.js.map +1 -1
- package/dist/changelog-PPTJ7BHJ.js +100 -0
- package/dist/changelog-PPTJ7BHJ.js.map +1 -0
- package/dist/{chunk-2AM4XW7Q.js → chunk-CWJJ2BNH.js} +15 -12
- package/dist/chunk-CWJJ2BNH.js.map +1 -0
- package/dist/{completion-KRZLHV7V.js → completion-4I3IJK3M.js} +80 -21
- package/dist/completion-4I3IJK3M.js.map +1 -0
- package/dist/{config-ZLXFAFMN.js → config-FNZAEO4G.js} +2 -2
- package/dist/{doctor-PACXOJZ2.js → doctor-2DWDH7FC.js} +2 -2
- package/dist/{feedback-RO76QRIZ.js → feedback-O4HR6XLM.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{listings-MOHHHNE6.js → listings-2Z6DSO3D.js} +4 -4
- package/dist/{publish-26SSZ2W3.js → publish-5HZAJEDZ.js} +4 -4
- package/dist/{testers-QUWZHO6M.js → testers-FGLBJAXL.js} +4 -4
- package/dist/{update-PDYA3B45.js → update-HIJOMQGO.js} +2 -2
- package/dist/{version-FGBT5A7I.js → version-55ADSAN4.js} +2 -2
- package/package.json +6 -6
- package/dist/changelog-QLDFG5TV.js +0 -48
- package/dist/changelog-QLDFG5TV.js.map +0 -1
- package/dist/chunk-2AM4XW7Q.js.map +0 -1
- package/dist/completion-KRZLHV7V.js.map +0 -1
- /package/dist/{config-ZLXFAFMN.js.map → config-FNZAEO4G.js.map} +0 -0
- /package/dist/{doctor-PACXOJZ2.js.map → doctor-2DWDH7FC.js.map} +0 -0
- /package/dist/{feedback-RO76QRIZ.js.map → feedback-O4HR6XLM.js.map} +0 -0
- /package/dist/{listings-MOHHHNE6.js.map → listings-2Z6DSO3D.js.map} +0 -0
- /package/dist/{publish-26SSZ2W3.js.map → publish-5HZAJEDZ.js.map} +0 -0
- /package/dist/{testers-QUWZHO6M.js.map → testers-FGLBJAXL.js.map} +0 -0
- /package/dist/{update-PDYA3B45.js.map → update-HIJOMQGO.js.map} +0 -0
- /package/dist/{version-FGBT5A7I.js.map → version-55ADSAN4.js.map} +0 -0
|
@@ -319,6 +319,9 @@ function optionToDef(opt) {
|
|
|
319
319
|
takesValue
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
|
+
function isHidden(cmd) {
|
|
323
|
+
return cmd._hidden === true;
|
|
324
|
+
}
|
|
322
325
|
function commandToDef(cmd) {
|
|
323
326
|
const def = {
|
|
324
327
|
description: cmd.description() ?? ""
|
|
@@ -327,7 +330,7 @@ function commandToDef(cmd) {
|
|
|
327
330
|
if (options.length > 0) {
|
|
328
331
|
def.options = options;
|
|
329
332
|
}
|
|
330
|
-
const subs = cmd.commands.filter((c) => c.name() !== "help");
|
|
333
|
+
const subs = cmd.commands.filter((c) => c.name() !== "help" && !isHidden(c));
|
|
331
334
|
if (subs.length > 0) {
|
|
332
335
|
def.subcommands = {};
|
|
333
336
|
for (const sub of subs) {
|
|
@@ -339,7 +342,7 @@ function commandToDef(cmd) {
|
|
|
339
342
|
function buildCommandTreeFromProgram(program) {
|
|
340
343
|
const tree = {};
|
|
341
344
|
for (const cmd of program.commands) {
|
|
342
|
-
if (cmd.name() === "help") continue;
|
|
345
|
+
if (cmd.name() === "help" || isHidden(cmd)) continue;
|
|
343
346
|
tree[cmd.name()] = commandToDef(cmd);
|
|
344
347
|
}
|
|
345
348
|
return tree;
|
|
@@ -379,11 +382,27 @@ function completableOptions(options) {
|
|
|
379
382
|
return true;
|
|
380
383
|
});
|
|
381
384
|
}
|
|
385
|
+
var DYNAMIC_FLAG_CONTEXTS = [
|
|
386
|
+
{ flags: ["--profile", "-p"], context: "profiles" },
|
|
387
|
+
{ flags: ["--app", "-a"], context: "packages" },
|
|
388
|
+
{ flags: ["--apps"], context: "packages" },
|
|
389
|
+
{ flags: ["--track"], context: "tracks-for-app" }
|
|
390
|
+
];
|
|
382
391
|
function generateBashCompletions(tree = getCommandTree(), globals = []) {
|
|
383
392
|
const topLevelNames = Object.keys(tree).join(" ");
|
|
384
393
|
const globalFlags = completableOptions(globals).map((o) => o.long ?? "").filter(Boolean).join(" ");
|
|
385
394
|
const caseEntries = [];
|
|
386
395
|
const flagCases = [];
|
|
396
|
+
for (const { flags, context } of DYNAMIC_FLAG_CONTEXTS) {
|
|
397
|
+
for (const flag of flags) {
|
|
398
|
+
flagCases.push(
|
|
399
|
+
` ${flag})
|
|
400
|
+
COMPREPLY=( $(compgen -W "$(gpc __complete ${context} 2>/dev/null)" -- "\${cur}") )
|
|
401
|
+
return 0
|
|
402
|
+
;;`
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
387
406
|
const allCommandNames = /* @__PURE__ */ new Set();
|
|
388
407
|
const collectNames = (defs) => {
|
|
389
408
|
for (const [name, def] of Object.entries(defs)) {
|
|
@@ -418,7 +437,7 @@ function generateBashCompletions(tree = getCommandTree(), globals = []) {
|
|
|
418
437
|
if (opt.choices && opt.long) {
|
|
419
438
|
flagCases.push(
|
|
420
439
|
` ${opt.long})
|
|
421
|
-
COMPREPLY=( $(compgen -W "${opt.choices
|
|
440
|
+
COMPREPLY=( $(compgen -W "${joinBashChoices(opt.choices)}" -- "\${cur}") )
|
|
422
441
|
return 0
|
|
423
442
|
;;`
|
|
424
443
|
);
|
|
@@ -432,7 +451,7 @@ function generateBashCompletions(tree = getCommandTree(), globals = []) {
|
|
|
432
451
|
if (opt.choices && opt.long) {
|
|
433
452
|
flagCases.push(
|
|
434
453
|
` ${opt.long})
|
|
435
|
-
COMPREPLY=( $(compgen -W "${opt.choices
|
|
454
|
+
COMPREPLY=( $(compgen -W "${joinBashChoices(opt.choices)}" -- "\${cur}") )
|
|
436
455
|
return 0
|
|
437
456
|
;;`
|
|
438
457
|
);
|
|
@@ -530,33 +549,57 @@ ${subEntries}
|
|
|
530
549
|
}
|
|
531
550
|
}
|
|
532
551
|
const localDecls = varNames.map((v) => ` local -a ${v}`).join("\n");
|
|
533
|
-
const
|
|
534
|
-
const
|
|
535
|
-
for (const
|
|
552
|
+
const choiceSpecs = /* @__PURE__ */ new Set();
|
|
553
|
+
const walkChoices = (defs) => {
|
|
554
|
+
for (const def of Object.values(defs)) {
|
|
536
555
|
for (const opt of completableOptions(def.options)) {
|
|
537
|
-
if (opt.choices) {
|
|
538
|
-
|
|
539
|
-
|
|
556
|
+
if (opt.choices && opt.long) {
|
|
557
|
+
choiceSpecs.add(
|
|
558
|
+
`'${opt.long}[${escapeZsh(opt.description)}]:value:(${opt.choices.join(" ")})'`
|
|
540
559
|
);
|
|
541
560
|
}
|
|
542
561
|
}
|
|
543
|
-
if (def.subcommands)
|
|
562
|
+
if (def.subcommands) walkChoices(def.subcommands);
|
|
544
563
|
}
|
|
545
564
|
};
|
|
546
|
-
|
|
565
|
+
walkChoices(tree);
|
|
547
566
|
for (const opt of completableOptions(globals)) {
|
|
548
|
-
if (opt.choices) {
|
|
549
|
-
|
|
550
|
-
|
|
567
|
+
if (opt.choices && opt.long) {
|
|
568
|
+
choiceSpecs.add(
|
|
569
|
+
`'${opt.long}[${escapeZsh(opt.description)}]:value:(${opt.choices.join(" ")})'`
|
|
551
570
|
);
|
|
552
571
|
}
|
|
553
572
|
}
|
|
573
|
+
const dynamicSpecs = [];
|
|
574
|
+
for (const { flags, context } of DYNAMIC_FLAG_CONTEXTS) {
|
|
575
|
+
for (const flag of flags) {
|
|
576
|
+
const fn = `_gpc_${context.replace(/-/g, "_")}`;
|
|
577
|
+
dynamicSpecs.push(`'${flag}[]:value:${fn}'`);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
const helperFns = `
|
|
581
|
+
_gpc_profiles() {
|
|
582
|
+
local -a items
|
|
583
|
+
items=(\${(f)"$(gpc __complete profiles 2>/dev/null)"})
|
|
584
|
+
compadd -a items
|
|
585
|
+
}
|
|
586
|
+
_gpc_packages() {
|
|
587
|
+
local -a items
|
|
588
|
+
items=(\${(f)"$(gpc __complete packages 2>/dev/null)"})
|
|
589
|
+
compadd -a items
|
|
590
|
+
}
|
|
591
|
+
_gpc_tracks_for_app() {
|
|
592
|
+
local -a items
|
|
593
|
+
items=(\${(f)"$(gpc __complete tracks-for-app 2>/dev/null)"})
|
|
594
|
+
compadd -a items
|
|
595
|
+
}`;
|
|
596
|
+
const allSpecs = [...choiceSpecs, ...dynamicSpecs];
|
|
597
|
+
const extraArgs = allSpecs.length > 0 ? ` \\
|
|
598
|
+
${allSpecs.join(" \\\n ")}` : "";
|
|
554
599
|
return `#compdef gpc
|
|
555
600
|
# Install: gpc completion zsh > ~/.zsh/completions/_gpc
|
|
556
|
-
${
|
|
557
|
-
|
|
558
|
-
${flagHints.join("\n")}
|
|
559
|
-
` : ""}
|
|
601
|
+
${helperFns}
|
|
602
|
+
|
|
560
603
|
_gpc() {
|
|
561
604
|
${localDecls}
|
|
562
605
|
|
|
@@ -566,7 +609,7 @@ ${arrayDefs.join("\n\n")}
|
|
|
566
609
|
'1: :->command' \\
|
|
567
610
|
'2: :->subcommand' \\
|
|
568
611
|
'3: :->subsubcommand' \\
|
|
569
|
-
'*::arg:->args'
|
|
612
|
+
'*::arg:->args'${extraArgs}
|
|
570
613
|
|
|
571
614
|
case "$state" in
|
|
572
615
|
command)
|
|
@@ -655,6 +698,19 @@ function generateFishCompletions(tree = getCommandTree(), globals = []) {
|
|
|
655
698
|
}
|
|
656
699
|
};
|
|
657
700
|
walkFlags(tree);
|
|
701
|
+
lines.push("");
|
|
702
|
+
lines.push("# Dynamic values (shell out to __complete)");
|
|
703
|
+
for (const { flags, context } of DYNAMIC_FLAG_CONTEXTS) {
|
|
704
|
+
for (const flag of flags) {
|
|
705
|
+
if (flag.startsWith("--")) {
|
|
706
|
+
const longName = flag.slice(2);
|
|
707
|
+
lines.push(`complete -c gpc -l ${longName} -x -a '(gpc __complete ${context} 2>/dev/null)'`);
|
|
708
|
+
} else if (flag.startsWith("-")) {
|
|
709
|
+
const shortName = flag.slice(1);
|
|
710
|
+
lines.push(`complete -c gpc -s ${shortName} -x -a '(gpc __complete ${context} 2>/dev/null)'`);
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
658
714
|
return lines.join("\n");
|
|
659
715
|
}
|
|
660
716
|
function generatePowerShellCompletions(tree = getCommandTree(), globals = []) {
|
|
@@ -720,6 +776,9 @@ ${level3Cases.join("\n")}
|
|
|
720
776
|
}
|
|
721
777
|
}`;
|
|
722
778
|
}
|
|
779
|
+
function joinBashChoices(choices) {
|
|
780
|
+
return choices.map((c) => c.replace(/([\\"$`])/g, "\\$1").replace(/ /g, "\\ ")).join(" ");
|
|
781
|
+
}
|
|
723
782
|
function escapeZsh(str) {
|
|
724
783
|
return str.replace(/'/g, "'\\''");
|
|
725
784
|
}
|
|
@@ -740,4 +799,4 @@ export {
|
|
|
740
799
|
getCommandTree,
|
|
741
800
|
registerCompletionCommand
|
|
742
801
|
};
|
|
743
|
-
//# sourceMappingURL=completion-
|
|
802
|
+
//# sourceMappingURL=completion-4I3IJK3M.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/completion.ts"],"sourcesContent":["import type { Command, Option } from \"commander\";\n\nexport type ShellType = \"bash\" | \"zsh\" | \"fish\" | \"powershell\";\n\nexport const SUPPORTED_SHELLS: readonly ShellType[] = [\n \"bash\",\n \"zsh\",\n \"fish\",\n \"powershell\",\n] as const;\n\nexport interface OptionDef {\n flags: string;\n long?: string;\n short?: string;\n description: string;\n choices?: string[];\n takesValue: boolean;\n}\n\nexport interface CommandDef {\n description: string;\n subcommands?: Record<string, CommandDef>;\n options?: OptionDef[];\n}\n\n/**\n * Hand-maintained fallback tree. Used by unit tests and as a safety net when\n * the walker cannot introspect the program (e.g. when the generator is called\n * without a live Command instance). Runtime `gpc completion <shell>` uses the\n * introspected tree from `buildCommandTreeFromProgram` so new commands and\n * plugins auto-complete without requiring edits here.\n */\nexport function getCommandTree(): Record<string, CommandDef> {\n return {\n auth: {\n description: \"Manage authentication\",\n subcommands: {\n login: { description: \"Authenticate with Google Play Developer API\" },\n status: { description: \"Show current authentication status\" },\n logout: { description: \"Remove stored credentials\" },\n whoami: { description: \"Show the authenticated account\" },\n },\n },\n config: {\n description: \"Manage configuration\",\n subcommands: {\n init: { description: \"Create a configuration file\" },\n show: { description: \"Show current configuration\" },\n set: { description: \"Set a configuration value\" },\n path: { description: \"Show the configuration file path\" },\n },\n },\n apps: {\n description: \"Manage applications\",\n subcommands: {\n info: { description: \"Show app details\" },\n update: { description: \"Update app details\" },\n list: { description: \"List configured applications\" },\n },\n },\n releases: {\n description: \"Manage releases and rollouts\",\n subcommands: {\n upload: { description: \"Upload AAB/APK and assign to a track\" },\n status: { description: \"Show current release status across tracks\" },\n promote: { description: \"Promote a release from one track to another\" },\n rollout: {\n description: \"Manage staged rollouts\",\n subcommands: {\n increase: { description: \"Increase a staged rollout\" },\n halt: { description: \"Halt a staged rollout\" },\n resume: { description: \"Resume a staged rollout\" },\n complete: { description: \"Complete a staged rollout\" },\n },\n },\n notes: { description: \"Set release notes\" },\n },\n },\n tracks: {\n description: \"Manage tracks\",\n subcommands: {\n list: { description: \"List all tracks\" },\n },\n },\n status: { description: \"Cross-track release overview\" },\n listings: {\n description: \"Manage store listings and metadata\",\n subcommands: {\n get: { description: \"Get store listing(s)\" },\n update: { description: \"Update a store listing\" },\n delete: { description: \"Delete a store listing for a language\" },\n pull: { description: \"Download listings to Fastlane-format directory\" },\n push: { description: \"Upload listings from Fastlane-format directory\" },\n images: {\n description: \"Manage listing images\",\n subcommands: {\n list: { description: \"List images for a language and type\" },\n upload: { description: \"Upload an image\" },\n delete: { description: \"Delete an image\" },\n },\n },\n availability: { description: \"Get country availability for a track\" },\n },\n },\n reviews: {\n description: \"Manage user reviews and ratings\",\n subcommands: {\n list: { description: \"List user reviews\" },\n get: { description: \"Get a single review\" },\n reply: { description: \"Reply to a review\" },\n export: { description: \"Export reviews to JSON or CSV\" },\n },\n },\n vitals: {\n description: \"Monitor app vitals and performance metrics\",\n subcommands: {\n overview: { description: \"Dashboard summary of all vital metrics\" },\n crashes: { description: \"Query crash rate metrics\" },\n anr: { description: \"Query ANR rate metrics\" },\n startup: { description: \"Query slow startup metrics\" },\n rendering: { description: \"Query slow rendering metrics\" },\n battery: { description: \"Query excessive wakeup metrics\" },\n memory: { description: \"Query stuck wakelock metrics\" },\n anomalies: { description: \"Detect anomalies in app vitals\" },\n errors: {\n description: \"Search and view error issues\",\n subcommands: {\n search: { description: \"Search error issues\" },\n },\n },\n compare: { description: \"Compare metric trend between periods\" },\n },\n },\n subscriptions: {\n description: \"Manage subscriptions and base plans\",\n subcommands: {\n list: { description: \"List subscriptions\" },\n get: { description: \"Get a subscription\" },\n create: { description: \"Create a subscription from JSON file\" },\n update: { description: \"Update a subscription from JSON file\" },\n delete: { description: \"Delete a subscription\" },\n \"base-plans\": {\n description: \"Manage base plans\",\n subcommands: {\n activate: { description: \"Activate a base plan\" },\n deactivate: { description: \"Deactivate a base plan\" },\n delete: { description: \"Delete a base plan\" },\n \"migrate-prices\": { description: \"Migrate base plan prices\" },\n },\n },\n offers: {\n description: \"Manage subscription offers\",\n subcommands: {\n list: { description: \"List offers for a base plan\" },\n get: { description: \"Get an offer\" },\n create: { description: \"Create an offer from JSON file\" },\n update: { description: \"Update an offer from JSON file\" },\n delete: { description: \"Delete an offer\" },\n activate: { description: \"Activate an offer\" },\n deactivate: { description: \"Deactivate an offer\" },\n },\n },\n },\n },\n iap: {\n description: \"Manage in-app products\",\n subcommands: {\n list: { description: \"List in-app products\" },\n get: { description: \"Get an in-app product\" },\n create: { description: \"Create an in-app product from JSON file\" },\n update: { description: \"Update an in-app product from JSON file\" },\n delete: { description: \"Delete an in-app product\" },\n sync: { description: \"Sync in-app products from a directory\" },\n },\n },\n purchases: {\n description: \"Manage purchases and orders\",\n subcommands: {\n get: { description: \"Get a product purchase\" },\n acknowledge: { description: \"Acknowledge a product purchase\" },\n consume: { description: \"Consume a product purchase\" },\n subscription: {\n description: \"Manage subscription purchases\",\n subcommands: {\n get: { description: \"Get a subscription purchase\" },\n cancel: { description: \"Cancel a subscription\" },\n defer: { description: \"Defer a subscription expiry\" },\n revoke: { description: \"Revoke a subscription\" },\n },\n },\n voided: { description: \"List voided purchases\" },\n orders: {\n description: \"Manage orders\",\n subcommands: {\n refund: { description: \"Refund an order\" },\n },\n },\n },\n },\n pricing: {\n description: \"Pricing and regional price conversion\",\n subcommands: {\n convert: { description: \"Convert a price to all regional prices\" },\n },\n },\n reports: {\n description: \"Download financial and stats reports\",\n subcommands: {\n list: { description: \"List available report buckets\" },\n download: {\n description: \"Download a report\",\n subcommands: {\n financial: { description: \"Download a financial report\" },\n stats: { description: \"Download a stats report\" },\n },\n },\n },\n },\n users: {\n description: \"Manage developer account users and permissions\",\n subcommands: {\n list: { description: \"List all users in the developer account\" },\n get: { description: \"Get user details\" },\n invite: { description: \"Invite a user to the developer account\" },\n update: { description: \"Update user permissions\" },\n remove: { description: \"Remove a user from the developer account\" },\n },\n },\n testers: {\n description: \"Manage testers and tester groups\",\n subcommands: {\n list: { description: \"List testers for a track\" },\n add: { description: \"Add testers to a track\" },\n remove: { description: \"Remove testers from a track\" },\n import: { description: \"Import testers from a CSV file\" },\n },\n },\n recovery: {\n description: \"Manage app recovery actions\",\n subcommands: {\n list: { description: \"List app recovery actions\" },\n cancel: { description: \"Cancel a recovery action\" },\n deploy: { description: \"Deploy a recovery action\" },\n create: { description: \"Create a recovery action\" },\n \"add-targeting\": { description: \"Add targeting to a recovery action\" },\n },\n },\n \"data-safety\": {\n description: \"Manage data safety declarations\",\n subcommands: {\n get: { description: \"Get data safety declaration\" },\n update: { description: \"Update data safety declaration\" },\n export: { description: \"Export data safety declaration\" },\n },\n },\n \"external-transactions\": {\n description: \"Manage external transactions\",\n subcommands: {\n create: { description: \"Create an external transaction\" },\n get: { description: \"Get an external transaction\" },\n refund: { description: \"Refund an external transaction\" },\n },\n },\n \"device-tiers\": {\n description: \"Manage device tier configurations\",\n subcommands: {\n list: { description: \"List device tier configurations\" },\n get: { description: \"Get a device tier configuration\" },\n create: { description: \"Create a device tier configuration\" },\n },\n },\n \"one-time-products\": {\n description: \"Manage one-time products\",\n subcommands: {\n list: { description: \"List one-time products\" },\n get: { description: \"Get a one-time product\" },\n create: { description: \"Create a one-time product\" },\n update: { description: \"Update a one-time product\" },\n delete: { description: \"Delete a one-time product\" },\n offers: {\n description: \"Manage one-time product offers\",\n subcommands: {\n list: { description: \"List offers for a one-time product\" },\n get: { description: \"Get a one-time product offer\" },\n create: { description: \"Create a one-time product offer\" },\n update: { description: \"Update a one-time product offer\" },\n delete: { description: \"Delete a one-time product offer\" },\n },\n },\n },\n },\n \"internal-sharing\": {\n description: \"Manage internal app sharing\",\n subcommands: {\n upload: { description: \"Upload an artifact for internal sharing\" },\n },\n },\n \"generated-apks\": {\n description: \"Manage generated APKs from app bundles\",\n subcommands: {\n list: { description: \"List generated APKs for a version\" },\n download: { description: \"Download a generated APK\" },\n },\n },\n doctor: { description: \"Verify setup and connectivity\" },\n docs: { description: \"Open documentation in browser\" },\n validate: { description: \"Pre-submission validation checks\" },\n publish: { description: \"Validate, upload, and release in one step\" },\n completion: {\n description: \"Generate shell completions\",\n subcommands: {\n bash: { description: \"Generate bash completions\" },\n zsh: { description: \"Generate zsh completions\" },\n fish: { description: \"Generate fish completions\" },\n powershell: { description: \"Generate PowerShell completions\" },\n },\n },\n plugins: {\n description: \"Manage plugins\",\n subcommands: {\n list: { description: \"List loaded plugins\" },\n init: { description: \"Scaffold a new plugin project\" },\n approve: { description: \"Approve a third-party plugin for loading\" },\n revoke: { description: \"Revoke approval for a third-party plugin\" },\n },\n },\n };\n}\n\n/** Map a Commander Option to an OptionDef used by the shell generators. */\nfunction optionToDef(opt: Option): OptionDef {\n const flags = opt.flags;\n // Commander exposes parsed long/short on the Option; fall back to parsing `.flags` if missing.\n const long = opt.long ?? undefined;\n const short = opt.short ?? undefined;\n // `takesValue` is true when the raw flags contain <placeholder> or [placeholder].\n const takesValue = /[<[][^>\\]]+[>\\]]/.test(flags);\n // Commander 14 exposes `.argChoices`; fall back gracefully if absent.\n const rawChoices = (opt as unknown as { argChoices?: readonly string[] }).argChoices;\n const choices = rawChoices && rawChoices.length > 0 ? Array.from(rawChoices) : undefined;\n return {\n flags,\n long: long ?? undefined,\n short: short ?? undefined,\n description: opt.description ?? \"\",\n choices,\n takesValue,\n };\n}\n\n/** Whether a Commander command was registered with `{ hidden: true }`. */\nfunction isHidden(cmd: Command): boolean {\n return (cmd as unknown as { _hidden?: boolean })._hidden === true;\n}\n\n/** Recursively walk a Commander Command into the completion tree shape. */\nfunction commandToDef(cmd: Command): CommandDef {\n const def: CommandDef = {\n description: cmd.description() ?? \"\",\n };\n const options = cmd.options\n .filter((o) => !o.hidden)\n .map(optionToDef)\n .filter((o) => o.long || o.short);\n if (options.length > 0) {\n def.options = options;\n }\n const subs = cmd.commands.filter((c) => c.name() !== \"help\" && !isHidden(c));\n if (subs.length > 0) {\n def.subcommands = {};\n for (const sub of subs) {\n def.subcommands[sub.name()] = commandToDef(sub);\n }\n }\n return def;\n}\n\n/** Build a completion tree by introspecting a fully-loaded Commander program. */\nexport function buildCommandTreeFromProgram(program: Command): Record<string, CommandDef> {\n const tree: Record<string, CommandDef> = {};\n for (const cmd of program.commands) {\n if (cmd.name() === \"help\" || isHidden(cmd)) continue;\n tree[cmd.name()] = commandToDef(cmd);\n }\n return tree;\n}\n\n/** Collect global options declared on the root program. */\nexport function collectGlobalOptions(program: Command): OptionDef[] {\n return program.options\n .filter((o) => !o.hidden)\n .map(optionToDef)\n .filter((o) => o.long || o.short);\n}\n\nexport function registerCompletionCommand(\n program: Command,\n ensureAllCommandsLoaded?: () => Promise<void>,\n): void {\n const completion = program.command(\"completion\").description(\"Generate shell completions\");\n\n const generate = async (\n shell: ShellType,\n gen: (tree: Record<string, CommandDef>, globals: OptionDef[]) => string,\n ): Promise<void> => {\n if (ensureAllCommandsLoaded) {\n await ensureAllCommandsLoaded();\n }\n const tree = ensureAllCommandsLoaded ? buildCommandTreeFromProgram(program) : getCommandTree();\n const globals = collectGlobalOptions(program);\n // Suppress unused-shell warning; shell type reserved for future per-shell tuning.\n void shell;\n console.log(gen(tree, globals));\n };\n\n completion\n .command(\"bash\")\n .description(\"Generate bash completions\")\n .action(async () => {\n await generate(\"bash\", generateBashCompletions);\n });\n\n completion\n .command(\"zsh\")\n .description(\"Generate zsh completions\")\n .action(async () => {\n await generate(\"zsh\", generateZshCompletions);\n });\n\n completion\n .command(\"fish\")\n .description(\"Generate fish completions\")\n .action(async () => {\n await generate(\"fish\", generateFishCompletions);\n });\n\n completion\n .command(\"powershell\")\n .description(\"Generate PowerShell completions\")\n .action(async () => {\n await generate(\"powershell\", generatePowerShellCompletions);\n });\n}\n\n/**\n * Return only options that have choices or long flags useful for completion\n * suggestion. `-V/--version` and `-h/--help` are filtered out to avoid noise.\n */\nfunction completableOptions(options: OptionDef[] | undefined): OptionDef[] {\n if (!options) return [];\n return options.filter((o) => {\n if (!o.long) return false;\n if (o.long === \"--help\" || o.long === \"--version\") return false;\n return true;\n });\n}\n\n/**\n * Shell-completion flag slots that carry dynamic values (profiles, package\n * names, track names). Generated scripts shell out to `gpc __complete <ctx>`\n * to resolve these at TAB time. Shared across bash / zsh / fish generators.\n */\nconst DYNAMIC_FLAG_CONTEXTS: Array<{ flags: string[]; context: string }> = [\n { flags: [\"--profile\", \"-p\"], context: \"profiles\" },\n { flags: [\"--app\", \"-a\"], context: \"packages\" },\n { flags: [\"--apps\"], context: \"packages\" },\n { flags: [\"--track\"], context: \"tracks-for-app\" },\n];\n\nexport function generateBashCompletions(\n tree: Record<string, CommandDef> = getCommandTree(),\n globals: OptionDef[] = [],\n): string {\n const topLevelNames = Object.keys(tree).join(\" \");\n\n const globalFlags = completableOptions(globals)\n .map((o) => o.long ?? \"\")\n .filter(Boolean)\n .join(\" \");\n\n // Build case entries for each command that has subcommands (up to 3 levels)\n // and emit flag completion branches for commands with options.\n const caseEntries: string[] = [];\n const flagCases: string[] = [];\n\n // Dynamic flag-value completion: shell out to `gpc __complete <ctx>`.\n for (const { flags, context } of DYNAMIC_FLAG_CONTEXTS) {\n for (const flag of flags) {\n flagCases.push(\n ` ${flag})\\n COMPREPLY=( $(compgen -W \"$(gpc __complete ${context} 2>/dev/null)\" -- \"\\${cur}\") )\\n return 0\\n ;;`,\n );\n }\n }\n\n const allCommandNames = new Set<string>();\n const collectNames = (defs: Record<string, CommandDef>) => {\n for (const [name, def] of Object.entries(defs)) {\n allCommandNames.add(name);\n if (def.subcommands) collectNames(def.subcommands);\n }\n };\n collectNames(tree);\n\n for (const [cmd, def] of Object.entries(tree)) {\n if (def.subcommands) {\n const subNames = Object.keys(def.subcommands).join(\" \");\n caseEntries.push(\n ` ${cmd})\\n COMPREPLY=( $(compgen -W \"${subNames}\" -- \"\\${cur}\") )\\n return 0\\n ;;`,\n );\n\n for (const [sub, subDef] of Object.entries(def.subcommands)) {\n if (subDef.subcommands) {\n const subSubNames = Object.keys(subDef.subcommands).join(\" \");\n caseEntries.push(\n ` ${sub})\\n COMPREPLY=( $(compgen -W \"${subSubNames}\" -- \"\\${cur}\") )\\n return 0\\n ;;`,\n );\n }\n }\n }\n\n // Collect flags that carry choices from this command + its subtree.\n const walk = (d: CommandDef) => {\n for (const opt of completableOptions(d.options)) {\n if (opt.choices && opt.long) {\n flagCases.push(\n ` ${opt.long})\\n COMPREPLY=( $(compgen -W \"${joinBashChoices(opt.choices)}\" -- \"\\${cur}\") )\\n return 0\\n ;;`,\n );\n }\n }\n if (d.subcommands) for (const s of Object.values(d.subcommands)) walk(s);\n };\n walk(def);\n }\n\n // Global-option choices (e.g. --output table|json|yaml|markdown|junit).\n for (const opt of completableOptions(globals)) {\n if (opt.choices && opt.long) {\n flagCases.push(\n ` ${opt.long})\\n COMPREPLY=( $(compgen -W \"${joinBashChoices(opt.choices)}\" -- \"\\${cur}\") )\\n return 0\\n ;;`,\n );\n }\n }\n\n return `# bash completion for gpc\n# Install: gpc completion bash >> ~/.bashrc\n_gpc() {\n local cur prev commands globals\n COMPREPLY=()\n cur=\"\\${COMP_WORDS[COMP_CWORD]}\"\n prev=\"\\${COMP_WORDS[COMP_CWORD-1]}\"\n\n commands=\"${topLevelNames}\"\n globals=\"${globalFlags}\"\n\n # Flag-value completion (choices)\n case \"\\${prev}\" in\n${flagCases.join(\"\\n\")}\n esac\n\n # When the current word starts with '-', complete known flags\n if [[ \"\\${cur}\" == -* ]]; then\n COMPREPLY=( $(compgen -W \"\\${globals}\" -- \"\\${cur}\") )\n return 0\n fi\n\n case \"\\${prev}\" in\n gpc)\n COMPREPLY=( $(compgen -W \"\\${commands}\" -- \"\\${cur}\") )\n return 0\n ;;\n${caseEntries.join(\"\\n\")}\n esac\n\n COMPREPLY=( $(compgen -W \"\\${commands}\" -- \"\\${cur}\") )\n return 0\n}\n\ncomplete -F _gpc gpc`;\n}\n\nexport function generateZshCompletions(\n tree: Record<string, CommandDef> = getCommandTree(),\n globals: OptionDef[] = [],\n): string {\n const arrayDefs: string[] = [];\n const caseBranches: string[] = [];\n\n const topEntries = Object.entries(tree)\n .map(([name, def]) => ` '${name}:${escapeZsh(def.description)}'`)\n .join(\"\\n\");\n arrayDefs.push(` commands=(\\n${topEntries}\\n )`);\n\n for (const [cmd, def] of Object.entries(tree)) {\n if (def.subcommands) {\n const varName = `${cmd.replace(/-/g, \"_\")}_commands`;\n const entries = Object.entries(def.subcommands)\n .map(([name, sub]) => ` '${name}:${escapeZsh(sub.description)}'`)\n .join(\"\\n\");\n arrayDefs.push(` ${varName}=(\\n${entries}\\n )`);\n caseBranches.push(\n ` ${cmd})\\n _describe -t ${varName} '${cmd} commands' ${varName}\\n ;;`,\n );\n\n for (const [sub, subDef] of Object.entries(def.subcommands)) {\n if (subDef.subcommands) {\n const subVarName = `${cmd.replace(/-/g, \"_\")}_${sub.replace(/-/g, \"_\")}_commands`;\n const subEntries = Object.entries(subDef.subcommands)\n .map(([name, s]) => ` '${name}:${escapeZsh(s.description)}'`)\n .join(\"\\n\");\n arrayDefs.push(` ${subVarName}=(\\n${subEntries}\\n )`);\n }\n }\n }\n }\n\n const level3Cases: string[] = [];\n for (const [cmd, def] of Object.entries(tree)) {\n if (!def.subcommands) continue;\n for (const [sub, subDef] of Object.entries(def.subcommands)) {\n if (subDef.subcommands) {\n const subVarName = `${cmd.replace(/-/g, \"_\")}_${sub.replace(/-/g, \"_\")}_commands`;\n level3Cases.push(\n ` ${sub})\\n _describe -t ${subVarName} '${sub} commands' ${subVarName}\\n ;;`,\n );\n }\n }\n }\n\n const varNames: string[] = [\"commands\"];\n for (const [cmd, def] of Object.entries(tree)) {\n if (def.subcommands) {\n varNames.push(`${cmd.replace(/-/g, \"_\")}_commands`);\n for (const [sub, subDef] of Object.entries(def.subcommands)) {\n if (subDef.subcommands) {\n varNames.push(`${cmd.replace(/-/g, \"_\")}_${sub.replace(/-/g, \"_\")}_commands`);\n }\n }\n }\n }\n\n const localDecls = varNames.map((v) => ` local -a ${v}`).join(\"\\n\");\n\n // Static flag-choice option specs (e.g. --output table|json|yaml) harvested\n // from Commander's `.choices()` across the entire tree. Emitted into the\n // main _arguments call so zsh menu-completes them.\n const choiceSpecs = new Set<string>();\n const walkChoices = (defs: Record<string, CommandDef>) => {\n for (const def of Object.values(defs)) {\n for (const opt of completableOptions(def.options)) {\n if (opt.choices && opt.long) {\n choiceSpecs.add(\n `'${opt.long}[${escapeZsh(opt.description)}]:value:(${opt.choices.join(\" \")})'`,\n );\n }\n }\n if (def.subcommands) walkChoices(def.subcommands);\n }\n };\n walkChoices(tree);\n for (const opt of completableOptions(globals)) {\n if (opt.choices && opt.long) {\n choiceSpecs.add(\n `'${opt.long}[${escapeZsh(opt.description)}]:value:(${opt.choices.join(\" \")})'`,\n );\n }\n }\n\n // Dynamic-value option specs: each dynamic flag gets wired to a helper\n // function that shells out to `gpc __complete <ctx>`.\n const dynamicSpecs: string[] = [];\n for (const { flags, context } of DYNAMIC_FLAG_CONTEXTS) {\n for (const flag of flags) {\n const fn = `_gpc_${context.replace(/-/g, \"_\")}`;\n dynamicSpecs.push(`'${flag}[]:value:${fn}'`);\n }\n }\n\n const helperFns = `\n_gpc_profiles() {\n local -a items\n items=(\\${(f)\"$(gpc __complete profiles 2>/dev/null)\"})\n compadd -a items\n}\n_gpc_packages() {\n local -a items\n items=(\\${(f)\"$(gpc __complete packages 2>/dev/null)\"})\n compadd -a items\n}\n_gpc_tracks_for_app() {\n local -a items\n items=(\\${(f)\"$(gpc __complete tracks-for-app 2>/dev/null)\"})\n compadd -a items\n}`;\n\n const allSpecs = [...choiceSpecs, ...dynamicSpecs];\n const extraArgs = allSpecs.length > 0 ? ` \\\\\\n ${allSpecs.join(\" \\\\\\n \")}` : \"\";\n\n return `#compdef gpc\n# Install: gpc completion zsh > ~/.zsh/completions/_gpc\n${helperFns}\n\n_gpc() {\n${localDecls}\n\n${arrayDefs.join(\"\\n\\n\")}\n\n _arguments -C \\\\\n '1: :->command' \\\\\n '2: :->subcommand' \\\\\n '3: :->subsubcommand' \\\\\n '*::arg:->args'${extraArgs}\n\n case \"$state\" in\n command)\n _describe -t commands 'gpc commands' commands\n ;;\n subcommand)\n case \"$words[2]\" in\n${caseBranches.join(\"\\n\")}\n esac\n ;;\n subsubcommand)\n case \"$words[3]\" in\n${level3Cases.join(\"\\n\")}\n esac\n ;;\n esac\n}\n\n_gpc \"$@\"`;\n}\n\nexport function generateFishCompletions(\n tree: Record<string, CommandDef> = getCommandTree(),\n globals: OptionDef[] = [],\n): string {\n const lines: string[] = [\n \"# fish completions for gpc\",\n \"# Install: gpc completion fish > ~/.config/fish/completions/gpc.fish\",\n \"\",\n \"# Disable file completions by default\",\n \"complete -c gpc -f\",\n \"\",\n \"# Top-level commands\",\n ];\n\n for (const [cmd, def] of Object.entries(tree)) {\n lines.push(\n `complete -c gpc -n '__fish_use_subcommand' -a ${cmd} -d '${escapeFish(def.description)}'`,\n );\n }\n\n // Level 2 subcommands\n for (const [cmd, def] of Object.entries(tree)) {\n if (!def.subcommands) continue;\n lines.push(\"\");\n lines.push(`# ${cmd} subcommands`);\n for (const [sub, subDef] of Object.entries(def.subcommands)) {\n lines.push(\n `complete -c gpc -n '__fish_seen_subcommand_from ${cmd}; and not __fish_seen_subcommand_from ${Object.keys(def.subcommands).join(\" \")}' -a ${sub} -d '${escapeFish(subDef.description)}'`,\n );\n }\n\n // Level 3 subcommands\n for (const [sub, subDef] of Object.entries(def.subcommands)) {\n if (!subDef.subcommands) continue;\n lines.push(\"\");\n lines.push(`# ${cmd} ${sub} subcommands`);\n for (const [subsub, subsubDef] of Object.entries(subDef.subcommands)) {\n lines.push(\n `complete -c gpc -n '__fish_seen_subcommand_from ${sub}; and not __fish_seen_subcommand_from ${Object.keys(subDef.subcommands).join(\" \")}' -a ${subsub} -d '${escapeFish(subsubDef.description)}'`,\n );\n }\n }\n }\n\n // Global + per-command flag completions with choice lists.\n lines.push(\"\");\n lines.push(\"# Global flags\");\n for (const opt of completableOptions(globals)) {\n if (!opt.long) continue;\n const longName = opt.long.replace(/^--/, \"\");\n const shortName = opt.short ? opt.short.replace(/^-/, \"\") : undefined;\n const choiceArg = opt.choices ? ` -a '${opt.choices.join(\" \")}'` : \"\";\n const shortArg = shortName ? ` -s ${shortName}` : \"\";\n lines.push(\n `complete -c gpc -l ${longName}${shortArg} -d '${escapeFish(opt.description)}'${choiceArg}`,\n );\n }\n\n const walkFlags = (defs: Record<string, CommandDef>) => {\n for (const [name, def] of Object.entries(defs)) {\n const flags = completableOptions(def.options);\n if (flags.length > 0) {\n lines.push(\"\");\n lines.push(`# ${name} flags`);\n for (const opt of flags) {\n if (!opt.long) continue;\n const longName = opt.long.replace(/^--/, \"\");\n const shortName = opt.short ? opt.short.replace(/^-/, \"\") : undefined;\n const choiceArg = opt.choices ? ` -a '${opt.choices.join(\" \")}'` : \"\";\n const shortArg = shortName ? ` -s ${shortName}` : \"\";\n lines.push(\n `complete -c gpc -n '__fish_seen_subcommand_from ${name}' -l ${longName}${shortArg} -d '${escapeFish(opt.description)}'${choiceArg}`,\n );\n }\n }\n if (def.subcommands) walkFlags(def.subcommands);\n }\n };\n walkFlags(tree);\n\n // Dynamic flag-value completion: shell out to `gpc __complete <ctx>`.\n // Fish merges multiple `complete` directives for the same flag, so these\n // layer on top of the description-only lines emitted above.\n lines.push(\"\");\n lines.push(\"# Dynamic values (shell out to __complete)\");\n for (const { flags, context } of DYNAMIC_FLAG_CONTEXTS) {\n for (const flag of flags) {\n if (flag.startsWith(\"--\")) {\n const longName = flag.slice(2);\n lines.push(`complete -c gpc -l ${longName} -x -a '(gpc __complete ${context} 2>/dev/null)'`);\n } else if (flag.startsWith(\"-\")) {\n const shortName = flag.slice(1);\n lines.push(`complete -c gpc -s ${shortName} -x -a '(gpc __complete ${context} 2>/dev/null)'`);\n }\n }\n }\n\n return lines.join(\"\\n\");\n}\n\nexport function generatePowerShellCompletions(\n tree: Record<string, CommandDef> = getCommandTree(),\n globals: OptionDef[] = [],\n): string {\n const completionEntries: string[] = [];\n\n // Top-level completions\n for (const [cmd, def] of Object.entries(tree)) {\n completionEntries.push(\n ` [CompletionResult]::new('${cmd}', '${cmd}', [CompletionResultType]::ParameterValue, '${escapePowerShell(def.description)}')`,\n );\n }\n\n // Global flag completions (as parameters available from any state)\n for (const opt of completableOptions(globals)) {\n if (!opt.long) continue;\n completionEntries.push(\n ` [CompletionResult]::new('${opt.long}', '${opt.long}', [CompletionResultType]::ParameterName, '${escapePowerShell(opt.description)}')`,\n );\n }\n\n const subcommandCases: string[] = [];\n const level3Cases: string[] = [];\n\n for (const [cmd, def] of Object.entries(tree)) {\n if (!def.subcommands) continue;\n const subEntries = Object.entries(def.subcommands)\n .map(\n ([sub, subDef]) =>\n ` [CompletionResult]::new('${sub}', '${sub}', [CompletionResultType]::ParameterValue, '${escapePowerShell(subDef.description)}')`,\n )\n .join(\"\\n\");\n subcommandCases.push(` '${cmd}' {\\n${subEntries}\\n }`);\n\n for (const [sub, subDef] of Object.entries(def.subcommands)) {\n if (!subDef.subcommands) continue;\n const subSubEntries = Object.entries(subDef.subcommands)\n .map(\n ([subsub, subsubDef]) =>\n ` [CompletionResult]::new('${subsub}', '${subsub}', [CompletionResultType]::ParameterValue, '${escapePowerShell(subsubDef.description)}')`,\n )\n .join(\"\\n\");\n level3Cases.push(` '${sub}' {\\n${subSubEntries}\\n }`);\n }\n }\n\n return `# PowerShell completions for gpc\n# Install: gpc completion powershell >> $PROFILE\n\nusing namespace System.Management.Automation\n\nRegister-ArgumentCompleter -CommandName gpc -Native -ScriptBlock {\n param($wordToComplete, $commandAst, $cursorPosition)\n\n $tokens = $commandAst.ToString().Substring(0, $cursorPosition).Trim() -split '\\\\s+'\n $tokenCount = $tokens.Count\n\n # Determine context\n if ($tokenCount -le 1 -or ($tokenCount -eq 2 -and $wordToComplete)) {\n # Top-level commands\n${completionEntries.join(\"\\n\")}\n } elseif ($tokenCount -eq 2 -or ($tokenCount -eq 3 -and $wordToComplete)) {\n # Subcommands\n $command = $tokens[1]\n switch ($command) {\n${subcommandCases.join(\"\\n\")}\n }\n } elseif ($tokenCount -eq 3 -or ($tokenCount -eq 4 -and $wordToComplete)) {\n # Sub-subcommands\n $subcommand = $tokens[2]\n switch ($subcommand) {\n${level3Cases.join(\"\\n\")}\n }\n }\n}`;\n}\n\n/**\n * Escape a `.choices()` value for safe inclusion in a bash `compgen -W \"...\"`\n * list. Choices in practice come from CLI source (not user input), but we\n * defend anyway so a future `.choices([\"yes\", \"no thanks\"])` doesn't split on\n * whitespace or interpolate a stray `$var`.\n */\nfunction joinBashChoices(choices: readonly string[]): string {\n return choices\n .map((c) => c.replace(/([\\\\\"$`])/g, \"\\\\$1\").replace(/ /g, \"\\\\ \"))\n .join(\" \");\n}\n\nfunction escapeZsh(str: string): string {\n return str.replace(/'/g, \"'\\\\''\");\n}\n\nfunction escapeFish(str: string): string {\n return str.replace(/'/g, \"\\\\'\");\n}\n\nfunction escapePowerShell(str: string): string {\n return str.replace(/'/g, \"''\");\n}\n"],"mappings":";;;AAIO,IAAM,mBAAyC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAwBO,SAAS,iBAA6C;AAC3D,SAAO;AAAA,IACL,MAAM;AAAA,MACJ,aAAa;AAAA,MACb,aAAa;AAAA,QACX,OAAO,EAAE,aAAa,8CAA8C;AAAA,QACpE,QAAQ,EAAE,aAAa,qCAAqC;AAAA,QAC5D,QAAQ,EAAE,aAAa,4BAA4B;AAAA,QACnD,QAAQ,EAAE,aAAa,iCAAiC;AAAA,MAC1D;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,MACN,aAAa;AAAA,MACb,aAAa;AAAA,QACX,MAAM,EAAE,aAAa,8BAA8B;AAAA,QACnD,MAAM,EAAE,aAAa,6BAA6B;AAAA,QAClD,KAAK,EAAE,aAAa,4BAA4B;AAAA,QAChD,MAAM,EAAE,aAAa,mCAAmC;AAAA,MAC1D;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ,aAAa;AAAA,MACb,aAAa;AAAA,QACX,MAAM,EAAE,aAAa,mBAAmB;AAAA,QACxC,QAAQ,EAAE,aAAa,qBAAqB;AAAA,QAC5C,MAAM,EAAE,aAAa,+BAA+B;AAAA,MACtD;AAAA,IACF;AAAA,IACA,UAAU;AAAA,MACR,aAAa;AAAA,MACb,aAAa;AAAA,QACX,QAAQ,EAAE,aAAa,uCAAuC;AAAA,QAC9D,QAAQ,EAAE,aAAa,4CAA4C;AAAA,QACnE,SAAS,EAAE,aAAa,8CAA8C;AAAA,QACtE,SAAS;AAAA,UACP,aAAa;AAAA,UACb,aAAa;AAAA,YACX,UAAU,EAAE,aAAa,4BAA4B;AAAA,YACrD,MAAM,EAAE,aAAa,wBAAwB;AAAA,YAC7C,QAAQ,EAAE,aAAa,0BAA0B;AAAA,YACjD,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,YAAa;AACzB,YAAM,gBAAgB,OAAO,QAAQ,OAAO,WAAW,EACpD;AAAA,QACC,CAAC,CAAC,QAAQ,SAAS,MACjB,wCAAwC,MAAM,OAAO,MAAM,+CAA+C,iBAAiB,UAAU,WAAW,CAAC;AAAA,MACrJ,EACC,KAAK,IAAI;AACZ,kBAAY,KAAK,YAAY,GAAG;AAAA,EAAQ,aAAa;AAAA,UAAa;AAAA,IACpE;AAAA,EACF;AAEA,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcP,kBAAkB,KAAK,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAK5B,gBAAgB,KAAK,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1B,YAAY,KAAK,IAAI,CAAC;AAAA;AAAA;AAAA;AAIxB;AAQA,SAAS,gBAAgB,SAAoC;AAC3D,SAAO,QACJ,IAAI,CAAC,MAAM,EAAE,QAAQ,cAAc,MAAM,EAAE,QAAQ,MAAM,KAAK,CAAC,EAC/D,KAAK,GAAG;AACb;AAEA,SAAS,UAAU,KAAqB;AACtC,SAAO,IAAI,QAAQ,MAAM,OAAO;AAClC;AAEA,SAAS,WAAW,KAAqB;AACvC,SAAO,IAAI,QAAQ,MAAM,KAAK;AAChC;AAEA,SAAS,iBAAiB,KAAqB;AAC7C,SAAO,IAAI,QAAQ,MAAM,IAAI;AAC/B;","names":[]}
|
|
@@ -78,7 +78,7 @@ Configuration file created: ${path}`);
|
|
|
78
78
|
});
|
|
79
79
|
console.log("\nVerifying setup...");
|
|
80
80
|
try {
|
|
81
|
-
const { registerDoctorCommand } = await import("./doctor-
|
|
81
|
+
const { registerDoctorCommand } = await import("./doctor-2DWDH7FC.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-
|
|
110
|
+
//# sourceMappingURL=config-FNZAEO4G.js.map
|
|
@@ -141,7 +141,7 @@ function checkCiEnvironment() {
|
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
async function checkGpcVersion() {
|
|
144
|
-
const currentVersion = "0.9.
|
|
144
|
+
const currentVersion = "0.9.61";
|
|
145
145
|
if (currentVersion === "0.0.0") {
|
|
146
146
|
return { name: "version", status: "info", message: "GPC development build" };
|
|
147
147
|
}
|
|
@@ -800,4 +800,4 @@ export {
|
|
|
800
800
|
checkVerificationDeadline,
|
|
801
801
|
registerDoctorCommand
|
|
802
802
|
};
|
|
803
|
-
//# sourceMappingURL=doctor-
|
|
803
|
+
//# sourceMappingURL=doctor-2DWDH7FC.js.map
|
|
@@ -9,7 +9,7 @@ import { execFile } from "child_process";
|
|
|
9
9
|
import { listAuditEvents } from "@gpc-cli/core";
|
|
10
10
|
function registerFeedbackCommand(program) {
|
|
11
11
|
program.command("feedback").description("Open a pre-filled GitHub issue with system diagnostics").option("--title <title>", "Issue title").option("--print", "Print the report to stdout instead of opening a browser").action(async (opts) => {
|
|
12
|
-
const version = "0.9.
|
|
12
|
+
const version = "0.9.61";
|
|
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-
|
|
70
|
+
//# sourceMappingURL=feedback-O4HR6XLM.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
buildCommitOptions
|
|
4
|
-
} from "./chunk-WSLFHX5X.js";
|
|
5
2
|
import {
|
|
6
3
|
getClient,
|
|
7
4
|
resolvePackageName
|
|
8
5
|
} from "./chunk-JDRY7HK5.js";
|
|
6
|
+
import {
|
|
7
|
+
buildCommitOptions
|
|
8
|
+
} from "./chunk-WSLFHX5X.js";
|
|
9
9
|
import {
|
|
10
10
|
isDryRun,
|
|
11
11
|
printDryRun
|
|
@@ -448,4 +448,4 @@ Missing locales: ${missingLocales.join(", ")}`);
|
|
|
448
448
|
export {
|
|
449
449
|
registerListingsCommands
|
|
450
450
|
};
|
|
451
|
-
//# sourceMappingURL=listings-
|
|
451
|
+
//# sourceMappingURL=listings-2Z6DSO3D.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
buildCommitOptions
|
|
4
|
-
} from "./chunk-WSLFHX5X.js";
|
|
5
2
|
import {
|
|
6
3
|
resolvePackageName
|
|
7
4
|
} from "./chunk-JDRY7HK5.js";
|
|
5
|
+
import {
|
|
6
|
+
buildCommitOptions
|
|
7
|
+
} from "./chunk-WSLFHX5X.js";
|
|
8
8
|
import {
|
|
9
9
|
isDryRun
|
|
10
10
|
} from "./chunk-Y3QZDAKS.js";
|
|
@@ -227,4 +227,4 @@ function registerPublishCommand(program) {
|
|
|
227
227
|
export {
|
|
228
228
|
registerPublishCommand
|
|
229
229
|
};
|
|
230
|
-
//# sourceMappingURL=publish-
|
|
230
|
+
//# sourceMappingURL=publish-5HZAJEDZ.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
buildCommitOptions
|
|
4
|
-
} from "./chunk-WSLFHX5X.js";
|
|
5
2
|
import {
|
|
6
3
|
getClient,
|
|
7
4
|
resolvePackageName
|
|
8
5
|
} from "./chunk-JDRY7HK5.js";
|
|
6
|
+
import {
|
|
7
|
+
buildCommitOptions
|
|
8
|
+
} from "./chunk-WSLFHX5X.js";
|
|
9
9
|
import {
|
|
10
10
|
isDryRun,
|
|
11
11
|
printDryRun
|
|
@@ -188,4 +188,4 @@ function registerTestersCommands(program) {
|
|
|
188
188
|
export {
|
|
189
189
|
registerTestersCommands
|
|
190
190
|
};
|
|
191
|
-
//# sourceMappingURL=testers-
|
|
191
|
+
//# sourceMappingURL=testers-FGLBJAXL.js.map
|
|
@@ -17,7 +17,7 @@ function registerUpdateCommand(program) {
|
|
|
17
17
|
program.command("update").description("Update gpc to the latest version").option("--check", "Check for updates without installing (exits 0 always)").option("--force", "Update even if already on the latest version").action(async (opts, cmd) => {
|
|
18
18
|
const parentOpts = cmd.parent?.opts() ?? {};
|
|
19
19
|
const jsonMode = !!(parentOpts["json"] || parentOpts["output"] === "json");
|
|
20
|
-
const currentVersion = "0.9.
|
|
20
|
+
const currentVersion = "0.9.61";
|
|
21
21
|
if (currentVersion === "0.0.0") {
|
|
22
22
|
if (jsonMode) {
|
|
23
23
|
console.log(
|
|
@@ -172,4 +172,4 @@ Run: gpc update`);
|
|
|
172
172
|
export {
|
|
173
173
|
registerUpdateCommand
|
|
174
174
|
};
|
|
175
|
-
//# sourceMappingURL=update-
|
|
175
|
+
//# sourceMappingURL=update-HIJOMQGO.js.map
|
|
@@ -7,7 +7,7 @@ import "./chunk-3SJ6OXCZ.js";
|
|
|
7
7
|
// src/commands/version.ts
|
|
8
8
|
function registerVersionCommand(program) {
|
|
9
9
|
program.command("version").description("Show version information").action(() => {
|
|
10
|
-
const version = "0.9.
|
|
10
|
+
const version = "0.9.61";
|
|
11
11
|
if (program.opts()["output"] === "json") {
|
|
12
12
|
console.log(
|
|
13
13
|
JSON.stringify({
|
|
@@ -25,4 +25,4 @@ function registerVersionCommand(program) {
|
|
|
25
25
|
export {
|
|
26
26
|
registerVersionCommand
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=version-
|
|
28
|
+
//# sourceMappingURL=version-55ADSAN4.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gpc-cli/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.61",
|
|
4
4
|
"description": "GPC — Google Play Console CLI. 217 API endpoints including Managed Google Play. Upload AABs, manage releases, monitor vitals, publish private enterprise apps. Fastlane alternative for Android.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"commander": "^14.0.3",
|
|
22
|
-
"@gpc-cli/api": "1.0.
|
|
23
|
-
"@gpc-cli/auth": "0.9.
|
|
24
|
-
"@gpc-cli/config": "0.9.
|
|
25
|
-
"@gpc-cli/core": "0.9.
|
|
26
|
-
"@gpc-cli/plugin-sdk": "0.9.
|
|
22
|
+
"@gpc-cli/api": "1.0.36",
|
|
23
|
+
"@gpc-cli/auth": "0.9.14",
|
|
24
|
+
"@gpc-cli/config": "0.9.14",
|
|
25
|
+
"@gpc-cli/core": "0.9.51",
|
|
26
|
+
"@gpc-cli/plugin-sdk": "0.9.10"
|
|
27
27
|
},
|
|
28
28
|
"keywords": [
|
|
29
29
|
"google-play",
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
getOutputFormat
|
|
4
|
-
} from "./chunk-ELXAK7GI.js";
|
|
5
|
-
|
|
6
|
-
// src/commands/changelog.ts
|
|
7
|
-
import { fetchChangelog, formatChangelogEntry } from "@gpc-cli/core";
|
|
8
|
-
import { formatOutput } from "@gpc-cli/core";
|
|
9
|
-
import { loadConfig } from "@gpc-cli/config";
|
|
10
|
-
function registerChangelogCommand(program) {
|
|
11
|
-
program.command("changelog").description("Show release history").option("-n, --limit <count>", "Number of releases to show", parseInt, 5).option("--tag <tag>", "Show a specific release (e.g., v0.9.43)").option("--all", "Show all releases").action(async (opts) => {
|
|
12
|
-
const config = await loadConfig();
|
|
13
|
-
const format = getOutputFormat(program, config);
|
|
14
|
-
const entries = await fetchChangelog({
|
|
15
|
-
limit: opts.all ? 100 : opts.limit,
|
|
16
|
-
version: opts.tag
|
|
17
|
-
});
|
|
18
|
-
if (entries.length === 0) {
|
|
19
|
-
console.log("No releases found.");
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
if (format === "json") {
|
|
23
|
-
console.log(formatOutput(entries, "json"));
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (opts.tag || entries.length === 1) {
|
|
27
|
-
console.log(formatChangelogEntry(entries[0]));
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const header = "VERSION DATE TITLE";
|
|
31
|
-
const separator = "\u2500".repeat(header.length);
|
|
32
|
-
console.log(header);
|
|
33
|
-
console.log(separator);
|
|
34
|
-
for (const entry of entries) {
|
|
35
|
-
const version = entry.version.padEnd(12);
|
|
36
|
-
const date = entry.date.padEnd(12);
|
|
37
|
-
console.log(`${version} ${date} ${entry.title}`);
|
|
38
|
-
}
|
|
39
|
-
console.log("");
|
|
40
|
-
console.log(
|
|
41
|
-
`Showing ${entries.length} releases. Use --tag <tag> for details, or --all for full history.`
|
|
42
|
-
);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
registerChangelogCommand
|
|
47
|
-
};
|
|
48
|
-
//# sourceMappingURL=changelog-QLDFG5TV.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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":[]}
|