mimi-seed 0.19.8 → 0.19.9
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/index.js +49 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -263,6 +263,11 @@ import kleur2 from "kleur";
|
|
|
263
263
|
var M2 = catalog(
|
|
264
264
|
{
|
|
265
265
|
noAccount: "\uC5F0\uACB0\uB41C \uACC4\uC815 \uC5C6\uC74C. `mimi-seed init` \uC2E4\uD589.\n",
|
|
266
|
+
missingOptionValue: (option) => `${option} \uB4A4\uC5D0 \uAC12\uC744 \uC785\uB825\uD558\uC138\uC694.`,
|
|
267
|
+
unknownOption: (option) => `\uC54C \uC218 \uC5C6\uB294 check \uC635\uC158: ${option}`,
|
|
268
|
+
unexpectedArgument: (value) => `\uC608\uC0C1\uD558\uC9C0 \uC54A\uC740 check \uC778\uC790: ${value}`,
|
|
269
|
+
localAppConflict: "--app\uC740 \uC6D0\uACA9 \uAC80\uC0AC \uC804\uC6A9\uC774\uBBC0\uB85C --local, --path, --json\uACFC \uD568\uAED8 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n",
|
|
270
|
+
localStarting: "Release Doctor \uC2E4\uD589 \uC911\u2026 \uCCAB \uC2E4\uD589\uC740 \uAC80\uC0AC\uAE30 \uB2E4\uC6B4\uB85C\uB4DC\uB85C \uC2DC\uAC04\uC774 \uAC78\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n",
|
|
266
271
|
title: "mimi-seed check \u2014 \uCD9C\uC2DC \uC804 \uC810\uAC80\n\n",
|
|
267
272
|
appsFailed: (msg) => `\uC571 \uBAA9\uB85D \uC870\uD68C \uC2E4\uD328: ${msg}
|
|
268
273
|
`,
|
|
@@ -294,6 +299,11 @@ var M2 = catalog(
|
|
|
294
299
|
},
|
|
295
300
|
{
|
|
296
301
|
noAccount: "No account connected. Run `mimi-seed init`.\n",
|
|
302
|
+
missingOptionValue: (option) => `Provide a value after ${option}.`,
|
|
303
|
+
unknownOption: (option) => `Unknown check option: ${option}`,
|
|
304
|
+
unexpectedArgument: (value) => `Unexpected check argument: ${value}`,
|
|
305
|
+
localAppConflict: "--app is remote-only and cannot be combined with --local, --path, or --json.\n",
|
|
306
|
+
localStarting: "Running Release Doctor\u2026 the first run may take longer while the checker downloads.\n",
|
|
297
307
|
title: "mimi-seed check \u2014 pre-launch check\n\n",
|
|
298
308
|
appsFailed: (msg) => `Failed to list apps: ${msg}
|
|
299
309
|
`,
|
|
@@ -324,7 +334,7 @@ Score: ${bar}
|
|
|
324
334
|
`
|
|
325
335
|
}
|
|
326
336
|
);
|
|
327
|
-
function
|
|
337
|
+
function parseCheckArgs(argv) {
|
|
328
338
|
const args = {
|
|
329
339
|
projectPath: process.cwd(),
|
|
330
340
|
projectPathExplicit: false,
|
|
@@ -332,15 +342,22 @@ function parseArgs(argv) {
|
|
|
332
342
|
local: false,
|
|
333
343
|
json: false
|
|
334
344
|
};
|
|
345
|
+
const takeValue = (option, index) => {
|
|
346
|
+
const value = argv[index + 1];
|
|
347
|
+
if (!value || value.startsWith("--")) throw new Error(M2().missingOptionValue(option));
|
|
348
|
+
return value;
|
|
349
|
+
};
|
|
335
350
|
for (let i = 0; i < argv.length; i++) {
|
|
336
|
-
|
|
337
|
-
if (
|
|
338
|
-
|
|
351
|
+
const token = argv[i];
|
|
352
|
+
if (token === "--app") args.appId = takeValue(token, i++);
|
|
353
|
+
else if (token === "--path") {
|
|
354
|
+
args.projectPath = takeValue(token, i++);
|
|
339
355
|
args.projectPathExplicit = true;
|
|
340
|
-
}
|
|
341
|
-
if (
|
|
342
|
-
if (
|
|
343
|
-
if (
|
|
356
|
+
} else if (token === "--fail-on-blocker") args.failOnBlocker = true;
|
|
357
|
+
else if (token === "--local") args.local = true;
|
|
358
|
+
else if (token === "--json") args.json = true;
|
|
359
|
+
else if (token.startsWith("-")) throw new Error(M2().unknownOption(token));
|
|
360
|
+
else throw new Error(M2().unexpectedArgument(token));
|
|
344
361
|
}
|
|
345
362
|
return args;
|
|
346
363
|
}
|
|
@@ -357,13 +374,32 @@ var MODULE_LABELS = {
|
|
|
357
374
|
checklist: "Checklist"
|
|
358
375
|
};
|
|
359
376
|
async function cmdCheck(argv) {
|
|
360
|
-
|
|
377
|
+
let args;
|
|
378
|
+
try {
|
|
379
|
+
args = parseCheckArgs(argv);
|
|
380
|
+
} catch (error) {
|
|
381
|
+
process.stderr.write(kleur2.red(`${error instanceof Error ? error.message : String(error)}
|
|
382
|
+
`));
|
|
383
|
+
process.exitCode = 2;
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
361
386
|
const cfg = await getEffectiveConfig();
|
|
362
387
|
const localRequested = args.local || args.json || args.projectPathExplicit;
|
|
388
|
+
if (args.appId && localRequested) {
|
|
389
|
+
process.stderr.write(kleur2.red(M2().localAppConflict));
|
|
390
|
+
process.exitCode = 2;
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
if (args.appId && !cfg) {
|
|
394
|
+
process.stderr.write(kleur2.red(M2().noAccount));
|
|
395
|
+
process.exitCode = 1;
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
363
398
|
if (localRequested || !cfg) {
|
|
364
399
|
const doctorArgs = [args.projectPath];
|
|
365
400
|
if (args.json) doctorArgs.push("--json");
|
|
366
401
|
if (args.failOnBlocker) doctorArgs.push("--fail-on-blocker");
|
|
402
|
+
if (!args.json) process.stderr.write(kleur2.dim(M2().localStarting));
|
|
367
403
|
const exitCode = await runMcpBin("mimi-seed-release-doctor", doctorArgs);
|
|
368
404
|
if (exitCode !== 0) process.exit(exitCode);
|
|
369
405
|
return;
|
|
@@ -571,7 +607,7 @@ Update now.`,
|
|
|
571
607
|
`
|
|
572
608
|
}
|
|
573
609
|
);
|
|
574
|
-
function
|
|
610
|
+
function parseArgs(argv) {
|
|
575
611
|
const args = { to: "HEAD", locales: ["ko", "en-US"], apply: false, noInteractive: false, limit: 30 };
|
|
576
612
|
for (let i = 0; i < argv.length; i++) {
|
|
577
613
|
if (argv[i] === "--from" && argv[i + 1]) args.from = argv[++i];
|
|
@@ -628,7 +664,7 @@ function parseFirstApp(text) {
|
|
|
628
664
|
return null;
|
|
629
665
|
}
|
|
630
666
|
async function cmdNotes(argv) {
|
|
631
|
-
const args =
|
|
667
|
+
const args = parseArgs(argv);
|
|
632
668
|
const cwd = process.cwd();
|
|
633
669
|
process.stdout.write(kleur3.bold(M3().title));
|
|
634
670
|
if (!isGitRepo(cwd)) {
|
|
@@ -837,7 +873,7 @@ Respond with JSON only: { "reply": "the reply text" }`,
|
|
|
837
873
|
posted: "\u2713 Reply posted\n"
|
|
838
874
|
}
|
|
839
875
|
);
|
|
840
|
-
function
|
|
876
|
+
function parseArgs2(argv) {
|
|
841
877
|
const args = { tone: "friendly", language: "ko", apply: false, noInteractive: false };
|
|
842
878
|
for (let i = 0; i < argv.length; i++) {
|
|
843
879
|
if (argv[i] === "--text" && argv[i + 1]) args.text = argv[++i];
|
|
@@ -894,7 +930,7 @@ async function generateReply(opts) {
|
|
|
894
930
|
return parsed.reply;
|
|
895
931
|
}
|
|
896
932
|
async function cmdReview(argv) {
|
|
897
|
-
const args =
|
|
933
|
+
const args = parseArgs2(argv);
|
|
898
934
|
process.stdout.write(kleur4.bold(M4().title));
|
|
899
935
|
if (!process.env.ANTHROPIC_API_KEY) {
|
|
900
936
|
process.stdout.write(kleur4.red(M4().noApiKey));
|
package/package.json
CHANGED