@applift/cli 0.1.4 → 0.1.6
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/dist/bin.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-9TREeM7q.mjs → src-CbzDCx0n.mjs} +12 -8
- package/package.json +2 -2
package/dist/bin.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as makeContext, n as program } from "./src-
|
|
1
|
+
export { t as makeContext, n as program } from "./src-CbzDCx0n.mjs";
|
|
@@ -190,7 +190,7 @@ export default defineConfig({
|
|
|
190
190
|
fs.writeFileSync(configPath, content);
|
|
191
191
|
p.log.success(`已生成 ${pc.bold("applift.config.ts")}`);
|
|
192
192
|
const doCreds = await p.confirm({
|
|
193
|
-
message: "现在配置凭据?(写入 ~/.applift/credentials.
|
|
193
|
+
message: "现在配置凭据?(写入 ~/.applift/credentials.json,0600)",
|
|
194
194
|
initialValue: false
|
|
195
195
|
});
|
|
196
196
|
if (p.isCancel(doCreds)) return;
|
|
@@ -272,7 +272,7 @@ export default defineConfig({
|
|
|
272
272
|
if (!p.isCancel(v) && String(v).trim()) creds.profiles[profile][key] = String(v).trim();
|
|
273
273
|
}
|
|
274
274
|
saveCredentials(creds);
|
|
275
|
-
p.log.success(`凭据已写入 ~/.applift/credentials.
|
|
275
|
+
p.log.success(`凭据已写入 ~/.applift/credentials.json(profile: ${pc.bold(profile)},0600)`);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
p.outro(`下一步: ${pc.cyan("applift doctor")} 体检 → ${pc.cyan("applift beta android")} 发内测`);
|
|
@@ -286,13 +286,13 @@ export default defineConfig({
|
|
|
286
286
|
const { config } = await loadProjectConfig(cwd);
|
|
287
287
|
const source = loadProjectProfileMap()[cwd] ? "个人选择 ~/.applift/projects.json" : config.profile !== "default" ? `项目默认 applift.config.ts → profile: ${config.profile}` : "全局默认";
|
|
288
288
|
p.log.message(`当前生效 profile: ${pc.bold(resolveProfileFor(cwd, config.profile))} ${pc.dim(`(来源: ${source})`)}`);
|
|
289
|
-
p.log.message(available.length > 0 ? `可用 profiles: ${available.join(", ")}` : "可用 profiles: (无 — 先在 ~/.applift/credentials.
|
|
289
|
+
p.log.message(available.length > 0 ? `可用 profiles: ${available.join(", ")}` : "可用 profiles: (无 — 先在 ~/.applift/credentials.json 配置)");
|
|
290
290
|
p.outro(`个人切换: ${pc.cyan("applift use <profile>")}(改团队默认 → applift.config.ts 的 profile 字段)`);
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
293
|
setProjectProfile(cwd, target);
|
|
294
294
|
p.log.success(`本项目已切换到 profile ${pc.bold(target)}(写 ~/.applift/projects.json,不进项目/git)`);
|
|
295
|
-
if (!available.includes(target)) p.log.warn(`~/.applift/credentials.
|
|
295
|
+
if (!available.includes(target)) p.log.warn(`~/.applift/credentials.json 还没有 profile "${target}"(可用: ${available.join(", ") || "无"}),发版前记得补凭据`);
|
|
296
296
|
});
|
|
297
297
|
program.command("status").description("查询各渠道审核状态").option("--stores <list>", "渠道列表(逗号分隔),缺省=项目配置全部").option("--cwd <dir>", "项目目录", process.cwd()).option("--json", "结构化输出(stdout 给机器)").action(async (cmdOpts) => {
|
|
298
298
|
registryRef.setup();
|
|
@@ -633,9 +633,11 @@ program.command("beta").description("内测分发(android/ios → 蒲公英扫
|
|
|
633
633
|
}, artifactPath, cmdOpts.note);
|
|
634
634
|
const r = await agc.stage({
|
|
635
635
|
...ctx,
|
|
636
|
-
emit: () => {
|
|
636
|
+
emit: (e) => {
|
|
637
|
+
if (e.type === "warn") s.message(pc.yellow(`⚠ ${e.message}`));
|
|
638
|
+
}
|
|
637
639
|
});
|
|
638
|
-
if (r.ok) s.stop(`AGC
|
|
640
|
+
if (r.ok) s.stop(`AGC 测试版本已就绪 ${pc.green("✓")}(未提交审核),到控制台「测试」提交并指定测试群组`);
|
|
639
641
|
else {
|
|
640
642
|
s.stop(`AGC 测试发布失败: ${r.error}`);
|
|
641
643
|
process.exitCode = 1;
|
|
@@ -648,7 +650,9 @@ program.command("beta").description("内测分发(android/ios → 蒲公英扫
|
|
|
648
650
|
const ctx = makeContext(pgyer, creds, resolveChannelTarget("pgyer", projCfg, detected), artifactPath, cmdOpts.note, { installPassword: cmdOpts.installPassword });
|
|
649
651
|
const r = await pgyer.stage({
|
|
650
652
|
...ctx,
|
|
651
|
-
emit: () => {
|
|
653
|
+
emit: (e) => {
|
|
654
|
+
if (e.type === "warn") s.message(pc.yellow(`⚠ ${e.message}`));
|
|
655
|
+
}
|
|
652
656
|
});
|
|
653
657
|
if (r.ok) s.stop(`蒲公英发布成功 ${pc.green("✓")} 扫码即装`);
|
|
654
658
|
else {
|
|
@@ -851,7 +855,7 @@ program.command("doctor").description("体检:框架/凭据/渠道配置").opt
|
|
|
851
855
|
const creds = loadCredentials();
|
|
852
856
|
const profileNames = Object.keys(creds.profiles);
|
|
853
857
|
if (profileNames.length > 0) p.log.success(`凭据 profiles: ${pc.bold(profileNames.join(", "))}`);
|
|
854
|
-
else p.log.error("无凭据(~/.applift/credentials.
|
|
858
|
+
else p.log.error("无凭据(~/.applift/credentials.json)");
|
|
855
859
|
if (profileNames.length === 0) healthy = false;
|
|
856
860
|
const { config } = await loadProjectConfig(cmdOpts.cwd);
|
|
857
861
|
const profile = resolveProfileFor(cmdOpts.cwd, config.profile);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applift/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/hcg1023/applift.git",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@applift/core": "0.
|
|
20
|
+
"@applift/core": "0.2.0",
|
|
21
21
|
"@clack/prompts": "^1.8.1",
|
|
22
22
|
"commander": "^15.0.0",
|
|
23
23
|
"picocolors": "^1.1.1"
|