@gpc-cli/cli 0.9.61 → 0.9.62
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/bin.js +2 -2
- package/dist/{changelog-PPTJ7BHJ.js → changelog-OHZ4M7D6.js} +77 -5
- package/dist/changelog-OHZ4M7D6.js.map +1 -0
- package/dist/{chunk-CWJJ2BNH.js → chunk-QM5RTQ6R.js} +8 -8
- package/dist/{config-FNZAEO4G.js → config-B76LNM7C.js} +2 -2
- package/dist/{doctor-2DWDH7FC.js → doctor-6SNZEFME.js} +2 -2
- package/dist/{feedback-O4HR6XLM.js → feedback-JRTQBJUP.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{update-HIJOMQGO.js → update-6AGIO5DW.js} +2 -2
- package/dist/{version-55ADSAN4.js → version-JL66BIVI.js} +2 -2
- package/package.json +4 -4
- package/dist/changelog-PPTJ7BHJ.js.map +0 -1
- /package/dist/{chunk-CWJJ2BNH.js.map → chunk-QM5RTQ6R.js.map} +0 -0
- /package/dist/{config-FNZAEO4G.js.map → config-B76LNM7C.js.map} +0 -0
- /package/dist/{doctor-2DWDH7FC.js.map → doctor-6SNZEFME.js.map} +0 -0
- /package/dist/{feedback-O4HR6XLM.js.map → feedback-JRTQBJUP.js.map} +0 -0
- /package/dist/{update-HIJOMQGO.js.map → update-6AGIO5DW.js.map} +0 -0
- /package/dist/{version-55ADSAN4.js.map → version-JL66BIVI.js.map} +0 -0
package/README.md
CHANGED
|
@@ -87,7 +87,7 @@ curl -fsSL https://raw.githubusercontent.com/yasserstudio/gpc/main/scripts/insta
|
|
|
87
87
|
- [Commands reference](https://yasserstudio.github.io/gpc/commands/)
|
|
88
88
|
- [CI/CD recipes](https://yasserstudio.github.io/gpc/ci-cd/)
|
|
89
89
|
|
|
90
|
-
Free to use. 1,
|
|
90
|
+
Free to use. 1,999 tests. 90%+ coverage. Every write operation supports `--dry-run`.
|
|
91
91
|
|
|
92
92
|
## Licensing
|
|
93
93
|
|
package/dist/bin.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
createProgram,
|
|
4
4
|
handleCliError,
|
|
5
5
|
loadPlugins
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QM5RTQ6R.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.
|
|
60
|
+
var currentVersion = "0.9.62";
|
|
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);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
getClient,
|
|
4
|
+
resolvePackageName
|
|
5
|
+
} from "./chunk-JDRY7HK5.js";
|
|
2
6
|
import {
|
|
3
7
|
dim,
|
|
4
8
|
yellow
|
|
@@ -13,10 +17,14 @@ import {
|
|
|
13
17
|
formatChangelogEntry,
|
|
14
18
|
formatOutput,
|
|
15
19
|
generateChangelog,
|
|
16
|
-
RENDERERS
|
|
20
|
+
RENDERERS,
|
|
21
|
+
renderPlayStore,
|
|
22
|
+
resolveLocales,
|
|
23
|
+
GpcError
|
|
17
24
|
} from "@gpc-cli/core";
|
|
18
25
|
import { loadConfig } from "@gpc-cli/config";
|
|
19
26
|
var VALID_OUTPUT_MODES = ["md", "json", "prompt"];
|
|
27
|
+
var VALID_TARGETS = ["github", "play-store"];
|
|
20
28
|
var REPO_RE = /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/;
|
|
21
29
|
function registerChangelogCommand(program) {
|
|
22
30
|
const changelog = 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) => {
|
|
@@ -52,7 +60,7 @@ function registerChangelogCommand(program) {
|
|
|
52
60
|
`Showing ${entries.length} releases. Use --tag <tag> for details, or --all for full history.`
|
|
53
61
|
);
|
|
54
62
|
});
|
|
55
|
-
changelog.command("generate").description("Generate release notes from local git commits").option("--from <ref>", "Starting ref (default: latest v* tag)").option("--to <ref>", "Ending ref (default: HEAD)").option("--format <mode>", "Renderer: md, json, or prompt", "md").option("--repo <owner/name>", "Override auto-detected repo (e.g., yasserstudio/gpc)").option("--strict", "Exit non-zero if linter warnings are emitted").action(
|
|
63
|
+
changelog.command("generate").description("Generate release notes from local git commits").option("--from <ref>", "Starting ref (default: latest v* tag)").option("--to <ref>", "Ending ref (default: HEAD)").option("--format <mode>", "Renderer: md, json, or prompt", "md").option("--repo <owner/name>", "Override auto-detected repo (e.g., yasserstudio/gpc)").option("--target <mode>", "Output target: github or play-store", "github").option("--locales <csv|auto>", "Comma-separated BCP 47 locales, or 'auto' (play-store target only)").option("--strict", "Exit non-zero if linter warnings or locale overflows are emitted").action(
|
|
56
64
|
async (opts) => {
|
|
57
65
|
const mode = opts.format;
|
|
58
66
|
if (!VALID_OUTPUT_MODES.includes(mode)) {
|
|
@@ -63,6 +71,15 @@ function registerChangelogCommand(program) {
|
|
|
63
71
|
process.exitCode = 2;
|
|
64
72
|
return;
|
|
65
73
|
}
|
|
74
|
+
if (!VALID_TARGETS.includes(opts.target)) {
|
|
75
|
+
process.stderr.write(
|
|
76
|
+
`Invalid --target "${opts.target}". Valid: ${VALID_TARGETS.join(", ")}
|
|
77
|
+
`
|
|
78
|
+
);
|
|
79
|
+
process.exitCode = 2;
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const target = opts.target;
|
|
66
83
|
if (opts.repo && !REPO_RE.test(opts.repo)) {
|
|
67
84
|
process.stderr.write(
|
|
68
85
|
`Invalid --repo "${opts.repo}". Expected "owner/name" (e.g., yasserstudio/gpc).
|
|
@@ -71,6 +88,21 @@ function registerChangelogCommand(program) {
|
|
|
71
88
|
process.exitCode = 2;
|
|
72
89
|
return;
|
|
73
90
|
}
|
|
91
|
+
if (target === "github" && opts.locales) {
|
|
92
|
+
process.stderr.write(
|
|
93
|
+
`--locales only applies to --target play-store (current target: github)
|
|
94
|
+
`
|
|
95
|
+
);
|
|
96
|
+
process.exitCode = 2;
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (target === "play-store" && !opts.locales) {
|
|
100
|
+
process.stderr.write(
|
|
101
|
+
"--target play-store requires --locales <csv|auto>\n Example: --locales en-US,fr-FR,de-DE\n Example: --locales auto (reads current Play Store listing \u2014 requires --app)\n"
|
|
102
|
+
);
|
|
103
|
+
process.exitCode = 2;
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
74
106
|
const generated = await generateChangelog({
|
|
75
107
|
from: opts.from,
|
|
76
108
|
to: opts.to,
|
|
@@ -86,9 +118,49 @@ function registerChangelogCommand(program) {
|
|
|
86
118
|
`
|
|
87
119
|
);
|
|
88
120
|
}
|
|
89
|
-
|
|
121
|
+
if (target === "github") {
|
|
122
|
+
const output2 = RENDERERS[mode](generated);
|
|
123
|
+
console.log(output2);
|
|
124
|
+
if (opts.strict && generated.warnings.length > 0) {
|
|
125
|
+
process.exitCode = 1;
|
|
126
|
+
}
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
let locales;
|
|
130
|
+
try {
|
|
131
|
+
if (opts.locales === "auto") {
|
|
132
|
+
const config = await loadConfig();
|
|
133
|
+
const packageName = resolvePackageName(program.opts()["app"], config);
|
|
134
|
+
const client = await getClient(config);
|
|
135
|
+
locales = await resolveLocales("auto", { client, packageName });
|
|
136
|
+
} else {
|
|
137
|
+
locales = await resolveLocales(opts.locales);
|
|
138
|
+
}
|
|
139
|
+
} catch (error) {
|
|
140
|
+
if (error instanceof GpcError) {
|
|
141
|
+
process.stderr.write(`${error.message}
|
|
142
|
+
`);
|
|
143
|
+
if (error.suggestion) process.stderr.write(`${dim(error.suggestion)}
|
|
144
|
+
`);
|
|
145
|
+
process.exitCode = error.exitCode;
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
throw error;
|
|
149
|
+
}
|
|
150
|
+
const { output, bundle } = renderPlayStore(generated, {
|
|
151
|
+
locales,
|
|
152
|
+
format: mode
|
|
153
|
+
});
|
|
90
154
|
console.log(output);
|
|
91
|
-
|
|
155
|
+
for (const lang of bundle.overflows) {
|
|
156
|
+
process.stderr.write(
|
|
157
|
+
`${yellow("warn:")} ${lang} exceeds ${bundle.limit} chars (truncated)
|
|
158
|
+
`
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
const hasOverflow = bundle.overflows.length > 0;
|
|
162
|
+
const hasWarnings = generated.warnings.length > 0;
|
|
163
|
+
if (opts.strict && (hasWarnings || hasOverflow)) {
|
|
92
164
|
process.exitCode = 1;
|
|
93
165
|
}
|
|
94
166
|
}
|
|
@@ -97,4 +169,4 @@ function registerChangelogCommand(program) {
|
|
|
97
169
|
export {
|
|
98
170
|
registerChangelogCommand
|
|
99
171
|
};
|
|
100
|
-
//# sourceMappingURL=changelog-
|
|
172
|
+
//# sourceMappingURL=changelog-OHZ4M7D6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/changelog.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport {\n fetchChangelog,\n formatChangelogEntry,\n formatOutput,\n generateChangelog,\n RENDERERS,\n renderPlayStore,\n resolveLocales,\n GpcError,\n type OutputMode,\n type PlayStoreFormat,\n} from \"@gpc-cli/core\";\nimport { loadConfig } from \"@gpc-cli/config\";\nimport { getOutputFormat } from \"../format.js\";\nimport { yellow, dim } from \"../colors.js\";\nimport { resolvePackageName, getClient } from \"../resolve.js\";\n\nconst VALID_OUTPUT_MODES: OutputMode[] = [\"md\", \"json\", \"prompt\"];\nconst VALID_TARGETS = [\"github\", \"play-store\"] as const;\ntype ChangelogTarget = (typeof VALID_TARGETS)[number];\nconst REPO_RE = /^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/;\n\nexport function registerChangelogCommand(program: Command): void {\n const changelog = 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 if (opts.tag || entries.length === 1) {\n console.log(formatChangelogEntry(entries[0]!));\n return;\n }\n\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 changelog\n .command(\"generate\")\n .description(\"Generate release notes from local git commits\")\n .option(\"--from <ref>\", \"Starting ref (default: latest v* tag)\")\n .option(\"--to <ref>\", \"Ending ref (default: HEAD)\")\n .option(\"--format <mode>\", \"Renderer: md, json, or prompt\", \"md\")\n .option(\"--repo <owner/name>\", \"Override auto-detected repo (e.g., yasserstudio/gpc)\")\n .option(\"--target <mode>\", \"Output target: github or play-store\", \"github\")\n .option(\"--locales <csv|auto>\", \"Comma-separated BCP 47 locales, or 'auto' (play-store target only)\")\n .option(\"--strict\", \"Exit non-zero if linter warnings or locale overflows are emitted\")\n .action(\n async (opts: {\n from?: string;\n to?: string;\n format: string;\n repo?: string;\n target: string;\n locales?: string;\n strict?: boolean;\n }) => {\n const mode = opts.format as OutputMode;\n if (!VALID_OUTPUT_MODES.includes(mode)) {\n process.stderr.write(\n `Invalid --format \"${opts.format}\". Valid: ${VALID_OUTPUT_MODES.join(\", \")}\\n`,\n );\n process.exitCode = 2;\n return;\n }\n if (!VALID_TARGETS.includes(opts.target as ChangelogTarget)) {\n process.stderr.write(\n `Invalid --target \"${opts.target}\". Valid: ${VALID_TARGETS.join(\", \")}\\n`,\n );\n process.exitCode = 2;\n return;\n }\n const target = opts.target as ChangelogTarget;\n if (opts.repo && !REPO_RE.test(opts.repo)) {\n process.stderr.write(\n `Invalid --repo \"${opts.repo}\". Expected \"owner/name\" (e.g., yasserstudio/gpc).\\n`,\n );\n process.exitCode = 2;\n return;\n }\n if (target === \"github\" && opts.locales) {\n process.stderr.write(\n `--locales only applies to --target play-store (current target: github)\\n`,\n );\n process.exitCode = 2;\n return;\n }\n if (target === \"play-store\" && !opts.locales) {\n process.stderr.write(\n \"--target play-store requires --locales <csv|auto>\\n\" +\n \" Example: --locales en-US,fr-FR,de-DE\\n\" +\n \" Example: --locales auto (reads current Play Store listing — requires --app)\\n\",\n );\n process.exitCode = 2;\n return;\n }\n\n const generated = await generateChangelog({\n from: opts.from,\n to: opts.to,\n repo: opts.repo,\n });\n\n for (const w of generated.warnings) {\n process.stderr.write(`${yellow(\"warn:\")} ${w}\\n`);\n }\n if (generated.warnings.length > 0) {\n process.stderr.write(\n `${dim(`(${generated.warnings.length} warning${generated.warnings.length === 1 ? \"\" : \"s\"} — review before publishing)`)}\\n`,\n );\n }\n\n if (target === \"github\") {\n const output = RENDERERS[mode](generated);\n console.log(output);\n if (opts.strict && generated.warnings.length > 0) {\n process.exitCode = 1;\n }\n return;\n }\n\n // target === \"play-store\"\n let locales: string[];\n try {\n if (opts.locales === \"auto\") {\n const config = await loadConfig();\n const packageName = resolvePackageName(program.opts()[\"app\"], config);\n const client = await getClient(config);\n locales = await resolveLocales(\"auto\", { client, packageName });\n } else {\n locales = await resolveLocales(opts.locales!);\n }\n } catch (error) {\n if (error instanceof GpcError) {\n process.stderr.write(`${error.message}\\n`);\n if (error.suggestion) process.stderr.write(`${dim(error.suggestion)}\\n`);\n process.exitCode = error.exitCode;\n return;\n }\n throw error;\n }\n\n const { output, bundle } = renderPlayStore(generated, {\n locales,\n format: mode as PlayStoreFormat,\n });\n console.log(output);\n\n for (const lang of bundle.overflows) {\n process.stderr.write(\n `${yellow(\"warn:\")} ${lang} exceeds ${bundle.limit} chars (truncated)\\n`,\n );\n }\n\n const hasOverflow = bundle.overflows.length > 0;\n const hasWarnings = generated.warnings.length > 0;\n if (opts.strict && (hasWarnings || hasOverflow)) {\n process.exitCode = 1;\n }\n },\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,kBAAkB;AAK3B,IAAM,qBAAmC,CAAC,MAAM,QAAQ,QAAQ;AAChE,IAAM,gBAAgB,CAAC,UAAU,YAAY;AAE7C,IAAM,UAAU;AAET,SAAS,yBAAyB,SAAwB;AAC/D,QAAM,YAAY,QACf,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;AACx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BAAM,cAAc,mBAAmB,QAAQ,KAAK,EAAE,KAAK,GAAG,MAAM;AACpE,gBAAM,SAAS,MAAM,UAAU,MAAM;AACrC,oBAAU,MAAM,eAAe,QAAQ,EAAE,QAAQ,YAAY,CAAC;AAAA,QAChE,OAAO;AACL,oBAAU,MAAM,eAAe,KAAK,OAAQ;AAAA,QAC9C;AAAA,MACF,SAAS,OAAO;AACd,YAAI,iBAAiB,UAAU;AAC7B,kBAAQ,OAAO,MAAM,GAAG,MAAM,OAAO;AAAA,CAAI;AACzC,cAAI,MAAM,WAAY,SAAQ,OAAO,MAAM,GAAG,IAAI,MAAM,UAAU,CAAC;AAAA,CAAI;AACvE,kBAAQ,WAAW,MAAM;AACzB;AAAA,QACF;AACA,cAAM;AAAA,MACR;AAEA,YAAM,EAAE,QAAQ,OAAO,IAAI,gBAAgB,WAAW;AAAA,QACpD;AAAA,QACA,QAAQ;AAAA,MACV,CAAC;AACD,cAAQ,IAAI,MAAM;AAElB,iBAAW,QAAQ,OAAO,WAAW;AACnC,gBAAQ,OAAO;AAAA,UACb,GAAG,OAAO,OAAO,CAAC,IAAI,IAAI,YAAY,OAAO,KAAK;AAAA;AAAA,QACpD;AAAA,MACF;AAEA,YAAM,cAAc,OAAO,UAAU,SAAS;AAC9C,YAAM,cAAc,UAAU,SAAS,SAAS;AAChD,UAAI,KAAK,WAAW,eAAe,cAAc;AAC/C,gBAAQ,WAAW;AAAA,MACrB;AAAA,IACF;AAAA,EACF;AACJ;","names":["output"]}
|
|
@@ -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.
|
|
70
|
+
program.name("gpc").description("GPC \u2014 Google Play Console CLI").version("0.9.62", "-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-4DRT7ZH2.js")).registerAuthCommands(program);
|
|
74
74
|
},
|
|
75
75
|
config: async () => {
|
|
76
|
-
(await import("./config-
|
|
76
|
+
(await import("./config-B76LNM7C.js")).registerConfigCommands(program);
|
|
77
77
|
},
|
|
78
78
|
doctor: async () => {
|
|
79
|
-
(await import("./doctor-
|
|
79
|
+
(await import("./doctor-6SNZEFME.js")).registerDoctorCommand(program);
|
|
80
80
|
},
|
|
81
81
|
update: async () => {
|
|
82
|
-
(await import("./update-
|
|
82
|
+
(await import("./update-6AGIO5DW.js")).registerUpdateCommand(program);
|
|
83
83
|
},
|
|
84
84
|
docs: async () => {
|
|
85
85
|
(await import("./docs-GP6AEX4N.js")).registerDocsCommand(program);
|
|
86
86
|
},
|
|
87
87
|
changelog: async () => {
|
|
88
|
-
(await import("./changelog-
|
|
88
|
+
(await import("./changelog-OHZ4M7D6.js")).registerChangelogCommand(program);
|
|
89
89
|
},
|
|
90
90
|
completion: async () => {
|
|
91
91
|
(await import("./completion-4I3IJK3M.js")).registerCompletionCommand(program, async () => {
|
|
@@ -193,13 +193,13 @@ async function createProgram(pluginManager) {
|
|
|
193
193
|
(await import("./verify-H4ZUVHMZ.js")).registerVerifyCommand(program);
|
|
194
194
|
},
|
|
195
195
|
version: async () => {
|
|
196
|
-
(await import("./version-
|
|
196
|
+
(await import("./version-JL66BIVI.js")).registerVersionCommand(program);
|
|
197
197
|
},
|
|
198
198
|
cache: async () => {
|
|
199
199
|
(await import("./cache-FGNP7Y37.js")).registerCacheCommand(program);
|
|
200
200
|
},
|
|
201
201
|
feedback: async () => {
|
|
202
|
-
(await import("./feedback-
|
|
202
|
+
(await import("./feedback-JRTQBJUP.js")).registerFeedbackCommand(program);
|
|
203
203
|
},
|
|
204
204
|
quickstart: async () => {
|
|
205
205
|
(await import("./quickstart-FOWM3OKT.js")).registerQuickstartCommand(program);
|
|
@@ -467,4 +467,4 @@ export {
|
|
|
467
467
|
createProgram,
|
|
468
468
|
handleCliError
|
|
469
469
|
};
|
|
470
|
-
//# sourceMappingURL=chunk-
|
|
470
|
+
//# sourceMappingURL=chunk-QM5RTQ6R.js.map
|
|
@@ -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-6SNZEFME.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-B76LNM7C.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.62";
|
|
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-6SNZEFME.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.62";
|
|
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-JRTQBJUP.js.map
|
package/dist/index.js
CHANGED
|
@@ -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.62";
|
|
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-6AGIO5DW.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.62";
|
|
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-JL66BIVI.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.62",
|
|
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": {
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"commander": "^14.0.3",
|
|
22
22
|
"@gpc-cli/api": "1.0.36",
|
|
23
|
-
"@gpc-cli/auth": "0.9.14",
|
|
24
23
|
"@gpc-cli/config": "0.9.14",
|
|
25
|
-
"@gpc-cli/
|
|
26
|
-
"@gpc-cli/plugin-sdk": "0.9.10"
|
|
24
|
+
"@gpc-cli/auth": "0.9.14",
|
|
25
|
+
"@gpc-cli/plugin-sdk": "0.9.10",
|
|
26
|
+
"@gpc-cli/core": "0.9.52"
|
|
27
27
|
},
|
|
28
28
|
"keywords": [
|
|
29
29
|
"google-play",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/changelog.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport {\n fetchChangelog,\n formatChangelogEntry,\n formatOutput,\n generateChangelog,\n RENDERERS,\n type OutputMode,\n} from \"@gpc-cli/core\";\nimport { loadConfig } from \"@gpc-cli/config\";\nimport { getOutputFormat } from \"../format.js\";\nimport { yellow, dim } from \"../colors.js\";\n\nconst VALID_OUTPUT_MODES: OutputMode[] = [\"md\", \"json\", \"prompt\"];\nconst REPO_RE = /^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/;\n\nexport function registerChangelogCommand(program: Command): void {\n const changelog = 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 if (opts.tag || entries.length === 1) {\n console.log(formatChangelogEntry(entries[0]!));\n return;\n }\n\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 changelog\n .command(\"generate\")\n .description(\"Generate release notes from local git commits\")\n .option(\"--from <ref>\", \"Starting ref (default: latest v* tag)\")\n .option(\"--to <ref>\", \"Ending ref (default: HEAD)\")\n .option(\"--format <mode>\", \"Renderer: md, json, or prompt\", \"md\")\n .option(\"--repo <owner/name>\", \"Override auto-detected repo (e.g., yasserstudio/gpc)\")\n .option(\"--strict\", \"Exit non-zero if linter warnings are emitted\")\n .action(\n async (opts: {\n from?: string;\n to?: string;\n format: string;\n repo?: string;\n strict?: boolean;\n }) => {\n const mode = opts.format as OutputMode;\n if (!VALID_OUTPUT_MODES.includes(mode)) {\n process.stderr.write(\n `Invalid --format \"${opts.format}\". Valid: ${VALID_OUTPUT_MODES.join(\", \")}\\n`,\n );\n process.exitCode = 2;\n return;\n }\n if (opts.repo && !REPO_RE.test(opts.repo)) {\n process.stderr.write(\n `Invalid --repo \"${opts.repo}\". Expected \"owner/name\" (e.g., yasserstudio/gpc).\\n`,\n );\n process.exitCode = 2;\n return;\n }\n\n const generated = await generateChangelog({\n from: opts.from,\n to: opts.to,\n repo: opts.repo,\n });\n\n for (const w of generated.warnings) {\n process.stderr.write(`${yellow(\"warn:\")} ${w}\\n`);\n }\n if (generated.warnings.length > 0) {\n process.stderr.write(\n `${dim(`(${generated.warnings.length} warning${generated.warnings.length === 1 ? \"\" : \"s\"} — review before publishing)`)}\\n`,\n );\n }\n\n const output = RENDERERS[mode](generated);\n console.log(output);\n\n if (opts.strict && generated.warnings.length > 0) {\n process.exitCode = 1;\n }\n },\n );\n}\n"],"mappings":";;;;;;;;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,kBAAkB;AAI3B,IAAM,qBAAmC,CAAC,MAAM,QAAQ,QAAQ;AAChE,IAAM,UAAU;AAET,SAAS,yBAAyB,SAAwB;AAC/D,QAAM,YAAY,QACf,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,W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W;AACnB;AAAA,MACF;AAEA,YAAM,YAAY,MAAM,kBAAkB;AAAA,QACxC,MAAM,KAAK;AAAA,QACX,IAAI,KAAK;AAAA,QACT,MAAM,KAAK;AAAA,MACb,CAAC;AAED,iBAAW,KAAK,UAAU,UAAU;AAClC,gBAAQ,OAAO,MAAM,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAAA,CAAI;AAAA,MAClD;AACA,UAAI,UAAU,SAAS,SAAS,GAAG;AACjC,gBAAQ,OAAO;AAAA,UACb,GAAG,IAAI,IAAI,UAAU,SAAS,MAAM,WAAW,UAAU,SAAS,WAAW,IAAI,KAAK,GAAG,mCAA8B,CAAC;AAAA;AAAA,QAC1H;AAAA,MACF;AAEA,YAAM,SAAS,UAAU,IAAI,EAAE,SAAS;AACxC,cAAQ,IAAI,MAAM;AAElB,UAAI,KAAK,UAAU,UAAU,SAAS,SAAS,GAAG;AAChD,gBAAQ,WAAW;AAAA,MACrB;AAAA,IACF;AAAA,EACF;AACJ;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|