@applift/cli 0.1.5 → 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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as program } from "./src-DfD6njiP.mjs";
2
+ import { n as program } from "./src-CbzDCx0n.mjs";
3
3
  //#region src/bin.ts
4
4
  program.parseAsync().catch((e) => {
5
5
  process.stderr.write(`✗ ${e.message}\n`);
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { t as makeContext, n as program } from "./src-DfD6njiP.mjs";
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.toml,0600)",
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.toml(profile: ${pc.bold(profile)},0600)`);
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.toml 配置)");
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.toml 还没有 profile "${target}"(可用: ${available.join(", ") || "无"}),发版前记得补凭据`);
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();
@@ -855,7 +855,7 @@ program.command("doctor").description("体检:框架/凭据/渠道配置").opt
855
855
  const creds = loadCredentials();
856
856
  const profileNames = Object.keys(creds.profiles);
857
857
  if (profileNames.length > 0) p.log.success(`凭据 profiles: ${pc.bold(profileNames.join(", "))}`);
858
- else p.log.error("无凭据(~/.applift/credentials.toml)");
858
+ else p.log.error("无凭据(~/.applift/credentials.json)");
859
859
  if (profileNames.length === 0) healthy = false;
860
860
  const { config } = await loadProjectConfig(cmdOpts.cwd);
861
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.5",
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.1.3",
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"