mimi-seed 0.26.0 → 0.27.0
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.
|
@@ -1583,7 +1583,7 @@ import path7 from "path";
|
|
|
1583
1583
|
import { fileURLToPath } from "url";
|
|
1584
1584
|
|
|
1585
1585
|
// package.json
|
|
1586
|
-
var version = "0.
|
|
1586
|
+
var version = "0.27.0";
|
|
1587
1587
|
|
|
1588
1588
|
// src/lib/windows-path.ts
|
|
1589
1589
|
import path6 from "path";
|
|
@@ -3868,6 +3868,7 @@ export {
|
|
|
3868
3868
|
detectHints,
|
|
3869
3869
|
hasAnyProjectSignal,
|
|
3870
3870
|
findProjectLink,
|
|
3871
|
+
resolveLinkedAppId,
|
|
3871
3872
|
linkProject,
|
|
3872
3873
|
lookupProjectManifest,
|
|
3873
3874
|
manifestServiceEntries,
|
package/dist/index.js
CHANGED
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
obtainDataKey,
|
|
38
38
|
readBodyWithTimeout,
|
|
39
39
|
resolveLang,
|
|
40
|
+
resolveLinkedAppId,
|
|
40
41
|
rewriteCredentialFiles,
|
|
41
42
|
runMcpBin,
|
|
42
43
|
t,
|
|
@@ -47,7 +48,7 @@ import {
|
|
|
47
48
|
writeConfig,
|
|
48
49
|
writeCredentialFile,
|
|
49
50
|
writeSettings
|
|
50
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-JGAE2S3M.js";
|
|
51
52
|
|
|
52
53
|
// src/index.ts
|
|
53
54
|
import kleur12 from "kleur";
|
|
@@ -590,8 +591,35 @@ function isCommitRef(cwd, ref) {
|
|
|
590
591
|
return false;
|
|
591
592
|
}
|
|
592
593
|
}
|
|
594
|
+
function resolveCommit(cwd, ref) {
|
|
595
|
+
if (ref.startsWith("-")) return null;
|
|
596
|
+
try {
|
|
597
|
+
return git(cwd, ["rev-parse", "--verify", "--quiet", `${ref}^{commit}`]).trim() || null;
|
|
598
|
+
} catch {
|
|
599
|
+
return null;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
function countCommits(cwd, opts = {}) {
|
|
603
|
+
const { from, to = "HEAD" } = opts;
|
|
604
|
+
if (from?.startsWith("-") || to.startsWith("-")) return null;
|
|
605
|
+
try {
|
|
606
|
+
const n = Number(git(cwd, ["rev-list", "--count", from ? `${from}..${to}` : to, "--"]).trim());
|
|
607
|
+
return Number.isInteger(n) ? n : null;
|
|
608
|
+
} catch {
|
|
609
|
+
return null;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
function hasUncommittedChanges(cwd, opts = {}) {
|
|
613
|
+
try {
|
|
614
|
+
return git(cwd, ["status", "--porcelain", ...opts.here ? ["--", "."] : []]).trim().length > 0;
|
|
615
|
+
} catch {
|
|
616
|
+
return false;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
var DEFAULT_NOTES_LIMIT = 30;
|
|
620
|
+
var MAX_NOTES_LIMIT = 1e4;
|
|
593
621
|
function getGitLog(cwd, opts = {}) {
|
|
594
|
-
const { from, to = "HEAD", limit =
|
|
622
|
+
const { from, to = "HEAD", limit = DEFAULT_NOTES_LIMIT } = opts;
|
|
595
623
|
if (from?.startsWith("-") || to.startsWith("-")) return [];
|
|
596
624
|
const range = from ? `${from}..${to}` : to;
|
|
597
625
|
const format = "%H%s%ci%an";
|
|
@@ -818,6 +846,7 @@ var COPY = {
|
|
|
818
846
|
evidence: "\uADFC\uAC70",
|
|
819
847
|
action: "\uC870\uCE58",
|
|
820
848
|
source: "\uCD9C\uCC98",
|
|
849
|
+
checked: "\uC774\uBC88\uC5D0 \uAC80\uC0AC\uD55C \uD56D\uBAA9",
|
|
821
850
|
connected: "\uC2A4\uD1A0\uC5B4 \uC5F0\uACB0 \uD6C4 \uCD94\uAC00 \uAC80\uC0AC",
|
|
822
851
|
connectedChecks: [
|
|
823
852
|
"\uC2A4\uD1A0\uC5B4 \uB4F1\uB85D\uC815\uBCF4\uC640 \uC2A4\uD06C\uB9B0\uC0F7",
|
|
@@ -837,6 +866,7 @@ var COPY = {
|
|
|
837
866
|
evidence: "Evidence",
|
|
838
867
|
action: "Action",
|
|
839
868
|
source: "Source",
|
|
869
|
+
checked: "Checked in this run",
|
|
840
870
|
connected: "Checked after connecting stores",
|
|
841
871
|
connectedChecks: void 0,
|
|
842
872
|
ready: "No submission blocker was found by the local checks.",
|
|
@@ -844,6 +874,19 @@ var COPY = {
|
|
|
844
874
|
partial: "This report checks deterministic repository evidence only. Store state is checked separately after connection."
|
|
845
875
|
}
|
|
846
876
|
};
|
|
877
|
+
var CHECKED_KO = {
|
|
878
|
+
"mobile project and app identifier detection": "\uBAA8\uBC14\uC77C \uD504\uB85C\uC81D\uD2B8\uC640 \uC571 \uC2DD\uBCC4\uC790 \uAC10\uC9C0",
|
|
879
|
+
"Android targetSdk policy": "Android targetSdk \uC815\uCC45",
|
|
880
|
+
"Google Play Billing dependency policy": "Google Play Billing \uC758\uC874\uC131 \uC815\uCC45",
|
|
881
|
+
"App Store Connect Xcode / SDK minimum (pinned build tooling)": "App Store Connect Xcode / SDK \uCD5C\uC18C \uBC84\uC804 (\uACE0\uC815\uB41C \uBE4C\uB4DC \uB3C4\uAD6C \uAE30\uC900)",
|
|
882
|
+
"Firebase Cloud Messaging legacy API usage": "Firebase Cloud Messaging \uAD6C\uD615 API \uC0AC\uC6A9"
|
|
883
|
+
};
|
|
884
|
+
function checkedLabel(item, lang) {
|
|
885
|
+
if (lang === "en") return item;
|
|
886
|
+
const truncated = /^Firebase Cloud Messaging legacy API usage \(first (\d+) source files\)$/.exec(item);
|
|
887
|
+
if (truncated) return `Firebase Cloud Messaging \uAD6C\uD615 API \uC0AC\uC6A9 (\uC18C\uC2A4 \uD30C\uC77C \uC55E ${truncated[1]}\uAC1C\uB9CC)`;
|
|
888
|
+
return CHECKED_KO[item] ?? item;
|
|
889
|
+
}
|
|
847
890
|
function renderFinding(finding, copy, lang, unresolved) {
|
|
848
891
|
const localized = lang === "ko" ? finding.ko : void 0;
|
|
849
892
|
const label = finding.severity === "info" && unresolved.has(finding.code) ? copy.labels.unresolved : copy.labels[finding.severity];
|
|
@@ -868,6 +911,8 @@ function renderReleaseDoctor(report, lang) {
|
|
|
868
911
|
copy.summary(report.counts.blocker, report.counts.warning),
|
|
869
912
|
""
|
|
870
913
|
];
|
|
914
|
+
const checked = report.coverage.checked ?? [];
|
|
915
|
+
if (checked.length > 0) lines.push(`${copy.checked}:`, ...checked.map((item) => ` - ${checkedLabel(item, lang)}`), "");
|
|
871
916
|
for (const finding of report.findings) lines.push(...renderFinding(finding, copy, lang, unresolved), "");
|
|
872
917
|
if (report.counts.blocker === 0) {
|
|
873
918
|
lines.push(unresolved.size > 0 ? `! ${copy.incomplete(unresolved.size, [...unresolved].join(", "))}` : `\u2713 ${copy.ready}`, "");
|
|
@@ -4566,7 +4611,14 @@ CI\uC5D0\uC11C \uBC18\uBCF5 \uAC80\uC0AC: ${command}
|
|
|
4566
4611
|
preview: " \uBBF8\uB9AC\uBCF4\uAE30: mimi-seed deploy --dry-run\n\n",
|
|
4567
4612
|
ready: "\u2713 \uCD9C\uC2DC \uC900\uBE44 \uC644\uB8CC!\n",
|
|
4568
4613
|
notReady: (score) => `\uC544\uC9C1 ${score}/100 \u2014 \uC704 \uB2E4\uC74C \uB2E8\uACC4\uB97C \uC9C4\uD589\uD558\uC138\uC694.
|
|
4569
|
-
|
|
4614
|
+
`,
|
|
4615
|
+
rangeTitle: "\uACF5\uC9C0 \uCD08\uC548 \uBC94\uC704 (mimi-seed notes \uAE30\uC900):",
|
|
4616
|
+
rangeFromTag: (tag, from, head, count) => ` ${tag} (${from}) \u2192 HEAD (${head})${count === null ? "" : `, \uCEE4\uBC0B ${count}\uAC1C`}`,
|
|
4617
|
+
rangeOverLimit: (limit, count, canRaise) => ` ! notes \uB294 \uAE30\uBCF8\uC73C\uB85C \uCD5C\uADFC ${limit}\uAC1C\uB9CC \uC501\uB2C8\uB2E4. ${canRaise ? `${count}\uAC1C \uBAA8\uB450 \uC4F0\uB824\uBA74 --limit ${count}, \uC544\uB2C8\uBA74 ` : ""}--from \uC73C\uB85C \uBC94\uC704\uB97C \uC881\uD788\uC138\uC694.`,
|
|
4618
|
+
rangeNoTag: (head, limit) => ` \uD0DC\uADF8\uAC00 \uC5C6\uC5B4 HEAD (${head}) \uAE30\uC900 \uCD5C\uADFC \uCEE4\uBC0B\uC744 \uCD5C\uB300 ${limit}\uAC1C\uAE4C\uC9C0 \uC501\uB2C8\uB2E4. \uC9C0\uB09C \uCD9C\uC2DC \uC9C0\uC810\uC774 \uC788\uC73C\uBA74 --from \uC73C\uB85C \uC815\uD558\uC138\uC694.`,
|
|
4619
|
+
rangeDirty: " ! \uC774 \uD3F4\uB354\uC5D0 \uCEE4\uBC0B\uB418\uC9C0 \uC54A\uC740 \uBCC0\uACBD\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC704 \uC810\uAC80\uC740 \uC774 \uBCC0\uACBD\uAE4C\uC9C0 \uBD24\uC9C0\uB9CC \uACF5\uC9C0 \uCD08\uC548\uC740 \uCEE4\uBC0B\uB9CC \uBD05\uB2C8\uB2E4 \u2014 \uAC19\uC740 \uD6C4\uBCF4\uB97C \uBCF4\uB824\uBA74 \uBA3C\uC800 \uCEE4\uBC0B\uD558\uC138\uC694.",
|
|
4620
|
+
rangeNext: " \uCD08\uC548 \uB9CC\uB4E4\uAE30: mimi-seed notes",
|
|
4621
|
+
rangeNextAt: (dir) => ` \uCD08\uC548 \uB9CC\uB4E4\uAE30: \uC810\uAC80\uD55C \uD3F4\uB354(${dir})\uC5D0\uC11C mimi-seed notes`
|
|
4570
4622
|
},
|
|
4571
4623
|
{
|
|
4572
4624
|
noAccount: "For remote commands, set MIMI_SEED_WEB_BASE to your team console and run `mimi-seed init`.\n",
|
|
@@ -4609,7 +4661,14 @@ Score: ${bar}
|
|
|
4609
4661
|
preview: " Preview: mimi-seed deploy --dry-run\n\n",
|
|
4610
4662
|
ready: "\u2713 Ready to launch!\n",
|
|
4611
4663
|
notReady: (score) => `Still ${score}/100 \u2014 work through the next steps above.
|
|
4612
|
-
|
|
4664
|
+
`,
|
|
4665
|
+
rangeTitle: "Release-notes range (what mimi-seed notes would use):",
|
|
4666
|
+
rangeFromTag: (tag, from, head, count) => ` ${tag} (${from}) \u2192 HEAD (${head})${count === null ? "" : `, ${count} commit(s)`}`,
|
|
4667
|
+
rangeOverLimit: (limit, count, canRaise) => ` ! notes uses only the latest ${limit} by default. ${canRaise ? `To use all ${count}: --limit ${count}, or n` : "N"}arrow the range with --from.`,
|
|
4668
|
+
rangeNoTag: (head, limit) => ` No tag yet, so at most the latest ${limit} commits ending at HEAD (${head}) are used. Set the last release point with --from.`,
|
|
4669
|
+
rangeDirty: " ! This folder has uncommitted changes. The check above saw them, but release notes only see commits \u2014 commit first so both look at the same candidate.",
|
|
4670
|
+
rangeNext: " Draft them: mimi-seed notes",
|
|
4671
|
+
rangeNextAt: (dir) => ` Draft them: run mimi-seed notes in the checked folder (${dir})`
|
|
4613
4672
|
}
|
|
4614
4673
|
);
|
|
4615
4674
|
function declaresDevEngines(projectPath) {
|
|
@@ -4623,6 +4682,38 @@ function declaresDevEngines(projectPath) {
|
|
|
4623
4682
|
function devEnginesCheckCommand(platform) {
|
|
4624
4683
|
return platform === "win32" ? "$p = New-Item -ItemType Directory (Join-Path $env:TEMP ([guid]::NewGuid())); npx -y --prefix $p.FullName mimi-seed check --local --path . --fail-on-blocker" : 'npx -y --prefix "$(mktemp -d)" mimi-seed check --local --path . --fail-on-blocker';
|
|
4625
4684
|
}
|
|
4685
|
+
function sameFolder(a, b) {
|
|
4686
|
+
const norm = (p) => {
|
|
4687
|
+
let real = path14.resolve(p);
|
|
4688
|
+
try {
|
|
4689
|
+
real = fs11.realpathSync.native(real);
|
|
4690
|
+
} catch {
|
|
4691
|
+
}
|
|
4692
|
+
return process.platform === "win32" ? real.toLowerCase() : real;
|
|
4693
|
+
};
|
|
4694
|
+
return norm(a) === norm(b);
|
|
4695
|
+
}
|
|
4696
|
+
function renderNotesRange(projectPath, cwd = process.cwd()) {
|
|
4697
|
+
if (!isGitRepo(projectPath)) return "";
|
|
4698
|
+
const head = resolveCommit(projectPath, "HEAD");
|
|
4699
|
+
if (!head) return "";
|
|
4700
|
+
const m = M5();
|
|
4701
|
+
const tag = getLatestTag(projectPath);
|
|
4702
|
+
const lines = [m.rangeTitle];
|
|
4703
|
+
if (tag) {
|
|
4704
|
+
const from = resolveCommit(projectPath, `refs/tags/${tag}`);
|
|
4705
|
+
const count = countCommits(projectPath, { from: `refs/tags/${tag}`, to: "HEAD" });
|
|
4706
|
+
lines.push(m.rangeFromTag(tag, from ?? "?", head, count));
|
|
4707
|
+
if (count !== null && count > DEFAULT_NOTES_LIMIT) lines.push(m.rangeOverLimit(DEFAULT_NOTES_LIMIT, count, count <= MAX_NOTES_LIMIT));
|
|
4708
|
+
} else {
|
|
4709
|
+
lines.push(m.rangeNoTag(head, DEFAULT_NOTES_LIMIT));
|
|
4710
|
+
}
|
|
4711
|
+
if (hasUncommittedChanges(projectPath, { here: true })) lines.push(m.rangeDirty);
|
|
4712
|
+
lines.push(sameFolder(projectPath, cwd) ? m.rangeNext : m.rangeNextAt(projectPath));
|
|
4713
|
+
return `
|
|
4714
|
+
${lines.join("\n")}
|
|
4715
|
+
`;
|
|
4716
|
+
}
|
|
4626
4717
|
function parseCheckArgs(argv) {
|
|
4627
4718
|
const args = {
|
|
4628
4719
|
projectPath: process.cwd(),
|
|
@@ -4691,6 +4782,7 @@ async function cmdCheck(argv) {
|
|
|
4691
4782
|
process.stdout.write(args.json ? `${JSON.stringify(report, null, 2)}
|
|
4692
4783
|
` : renderReleaseDoctor(report, resolveLang()));
|
|
4693
4784
|
if (!args.json && !process.env.CI) {
|
|
4785
|
+
process.stdout.write(renderNotesRange(args.projectPath));
|
|
4694
4786
|
process.stdout.write((declaresDevEngines(args.projectPath) ? M5().localNextDevEngines(devEnginesCheckCommand(process.platform)) : M5().localNext) + telemetryNotice());
|
|
4695
4787
|
}
|
|
4696
4788
|
if (args.failOnBlocker && report.counts.blocker > 0) process.exitCode = 1;
|
|
@@ -4864,6 +4956,11 @@ ${items}
|
|
|
4864
4956
|
analyzing: (n) => `\uCEE4\uBC0B ${n}\uAC1C \uBD84\uC11D \uC911...
|
|
4865
4957
|
|
|
4866
4958
|
`,
|
|
4959
|
+
rangeShas: (from, to) => ` \uCEE4\uBC0B: ${from ?? "(\uC2DC\uC791)"} \u2192 ${to}
|
|
4960
|
+
`,
|
|
4961
|
+
truncated: (used, total, suggest) => `\uBC94\uC704\uC758 \uCEE4\uBC0B ${total}\uAC1C \uC911 \uCD5C\uADFC ${used}\uAC1C\uB9CC \uB178\uD2B8\uC5D0 \uC501\uB2C8\uB2E4. ${suggest === total ? `\uC804\uBD80 \uC4F0\uB824\uBA74 --limit ${total}` : `--limit \uCD5C\uB300\uAC12\uC740 ${suggest}\uC785\uB2C8\uB2E4 \u2014 --from \uC73C\uB85C \uBC94\uC704\uB97C \uC881\uD788\uC138\uC694`}
|
|
4962
|
+
`,
|
|
4963
|
+
dirtyTree: "\uCEE4\uBC0B\uB418\uC9C0 \uC54A\uC740 \uBCC0\uACBD\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC774 \uB178\uD2B8\uC5D0\uB294 \uB4E4\uC5B4\uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCD9C\uC2DC \uD6C4\uBCF4\uB77C\uBA74 \uBA3C\uC800 \uCEE4\uBC0B\uD558\uC138\uC694.\n",
|
|
4867
4964
|
generating: "\u{1F916} Claude AI\uB85C \uC0DD\uC131 \uC911...\n",
|
|
4868
4965
|
aiFailed: (msg) => `AI \uC0DD\uC131 \uC2E4\uD328, \uD15C\uD50C\uB9BF \uC0AC\uC6A9: ${msg}
|
|
4869
4966
|
`,
|
|
@@ -4879,6 +4976,11 @@ ${items}
|
|
|
4879
4976
|
listAppsFailed: (msg) => `\uC571 \uBAA9\uB85D \uC870\uD68C \uC2E4\uD328: ${msg}
|
|
4880
4977
|
`,
|
|
4881
4978
|
noApps: "\uB4F1\uB85D\uB41C \uC571\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.\n",
|
|
4979
|
+
invalidApp: (value) => `--app \uB4A4\uC5D0 \uC571 ID\uB97C \uC785\uB825\uD558\uC138\uC694: ${value || "(\uAC12 \uC5C6\uC74C)"}
|
|
4980
|
+
`,
|
|
4981
|
+
ambiguousApp: (n, rows) => `\uB4F1\uB85D\uB41C \uC571\uC774 ${n}\uAC1C\uB77C \uC5B4\uB290 \uC571\uC5D0 \uC801\uC6A9\uD560\uC9C0 \uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. --app <id> \uB85C \uACE0\uB974\uC138\uC694:
|
|
4982
|
+
${rows}
|
|
4983
|
+
`,
|
|
4882
4984
|
toneToAllLocales: "\uC120\uD0DD\uD55C \uD1A4\uC744 \uBAA8\uB4E0 \uB85C\uCF00\uC77C\uC5D0 \uC801\uC6A9\uD569\uB2C8\uB2E4 (\uC790\uB3D9 \uBC88\uC5ED \uBBF8\uC801\uC6A9).\n",
|
|
4883
4985
|
applying: "Play Store\uC5D0 \uC801\uC6A9 \uC911...\n",
|
|
4884
4986
|
applyFailed: (locale, msg) => `${locale} \uC801\uC6A9 \uC2E4\uD328: ${msg}
|
|
@@ -4925,6 +5027,11 @@ Update now.`,
|
|
|
4925
5027
|
analyzing: (n) => `Analyzing ${n} commit(s)...
|
|
4926
5028
|
|
|
4927
5029
|
`,
|
|
5030
|
+
rangeShas: (from, to) => ` Commits: ${from ?? "(start)"} \u2192 ${to}
|
|
5031
|
+
`,
|
|
5032
|
+
truncated: (used, total, suggest) => `Using only the latest ${used} of ${total} commits in the range. ${suggest === total ? `To use them all: --limit ${total}` : `--limit goes up to ${suggest} \u2014 narrow the range with --from`}
|
|
5033
|
+
`,
|
|
5034
|
+
dirtyTree: "There are uncommitted changes. They are not in these notes \u2014 commit them first if this is the release candidate.\n",
|
|
4928
5035
|
generating: "\u{1F916} Generating with Claude AI...\n",
|
|
4929
5036
|
aiFailed: (msg) => `AI generation failed, falling back to the template: ${msg}
|
|
4930
5037
|
`,
|
|
@@ -4940,6 +5047,11 @@ Update now.`,
|
|
|
4940
5047
|
listAppsFailed: (msg) => `Failed to list apps: ${msg}
|
|
4941
5048
|
`,
|
|
4942
5049
|
noApps: "No apps registered.\n",
|
|
5050
|
+
invalidApp: (value) => `Provide an app ID after --app: ${value || "(missing)"}
|
|
5051
|
+
`,
|
|
5052
|
+
ambiguousApp: (n, rows) => `${n} apps are registered, so the target app is ambiguous. Choose one with --app <id>:
|
|
5053
|
+
${rows}
|
|
5054
|
+
`,
|
|
4943
5055
|
toneToAllLocales: "Applying the selected tone to every locale (no automatic translation).\n",
|
|
4944
5056
|
applying: "Applying to Play Store...\n",
|
|
4945
5057
|
applyFailed: (locale, msg) => `${locale} failed to apply: ${msg}
|
|
@@ -4948,14 +5060,19 @@ Update now.`,
|
|
|
4948
5060
|
`
|
|
4949
5061
|
}
|
|
4950
5062
|
);
|
|
4951
|
-
var MAX_LIMIT =
|
|
5063
|
+
var MAX_LIMIT = MAX_NOTES_LIMIT;
|
|
4952
5064
|
function parseArgs(argv) {
|
|
4953
|
-
const args = { to: "HEAD", locales: ["ko", "en-US"], apply: false, noInteractive: false, limit:
|
|
5065
|
+
const args = { to: "HEAD", locales: ["ko", "en-US"], apply: false, noInteractive: false, limit: DEFAULT_NOTES_LIMIT };
|
|
4954
5066
|
for (let i = 0; i < argv.length; i++) {
|
|
4955
5067
|
if (argv[i] === "--from" && argv[i + 1]) args.from = argv[++i];
|
|
4956
5068
|
if (argv[i] === "--to" && argv[i + 1]) args.to = argv[++i];
|
|
4957
5069
|
if (argv[i] === "--locale" && argv[i + 1]) args.locales = argv[++i].split(",").map((l) => l.trim());
|
|
4958
5070
|
if (argv[i] === "--apply") args.apply = true;
|
|
5071
|
+
if (argv[i] === "--app") {
|
|
5072
|
+
const raw = argv[++i] ?? "";
|
|
5073
|
+
if (!raw || raw.startsWith("-")) return { error: M6().invalidApp(raw) };
|
|
5074
|
+
args.appId = raw;
|
|
5075
|
+
}
|
|
4959
5076
|
if (argv[i] === "--no-interactive") args.noInteractive = true;
|
|
4960
5077
|
if (argv[i] === "--limit") {
|
|
4961
5078
|
const raw = argv[++i] ?? "";
|
|
@@ -5014,13 +5131,32 @@ function generateTemplate(commits, locales) {
|
|
|
5014
5131
|
const localized = Object.fromEntries(locales.map((l) => [l, concise]));
|
|
5015
5132
|
return { concise, detailed, marketing, localized };
|
|
5016
5133
|
}
|
|
5017
|
-
function
|
|
5134
|
+
function pickSingleApp(text) {
|
|
5135
|
+
let apps;
|
|
5018
5136
|
try {
|
|
5019
|
-
|
|
5020
|
-
if (Array.isArray(apps) && apps.length > 0) return apps[0];
|
|
5137
|
+
apps = JSON.parse(text);
|
|
5021
5138
|
} catch {
|
|
5139
|
+
return { error: M6().noApps };
|
|
5022
5140
|
}
|
|
5023
|
-
return
|
|
5141
|
+
if (!Array.isArray(apps) || apps.length === 0) return { error: M6().noApps };
|
|
5142
|
+
if (apps.length > 1) {
|
|
5143
|
+
const rows = apps.map((a) => ` ${a.id} ${a.name ?? a.packageName ?? ""}`.trimEnd()).join("\n");
|
|
5144
|
+
return { error: M6().ambiguousApp(apps.length, rows) };
|
|
5145
|
+
}
|
|
5146
|
+
return { app: apps[0] };
|
|
5147
|
+
}
|
|
5148
|
+
async function resolveApplyApp(cfg, explicitAppId) {
|
|
5149
|
+
try {
|
|
5150
|
+
const linked = resolveLinkedAppId(await findProjectLink(process.cwd()), cfg.webBase, explicitAppId);
|
|
5151
|
+
if (linked) return { id: linked };
|
|
5152
|
+
} catch (e) {
|
|
5153
|
+
return { error: `${e.message}
|
|
5154
|
+
` };
|
|
5155
|
+
}
|
|
5156
|
+
const appsResult = await mcpCall(cfg.endpoint, cfg.token, "list_apps", {});
|
|
5157
|
+
if (appsResult.isError) return { error: M6().listAppsFailed(appsResult.text) };
|
|
5158
|
+
const picked = pickSingleApp(appsResult.text);
|
|
5159
|
+
return "error" in picked ? picked : { id: picked.app.id };
|
|
5024
5160
|
}
|
|
5025
5161
|
async function cmdNotes(argv) {
|
|
5026
5162
|
const parsed = parseArgs(argv);
|
|
@@ -5052,6 +5188,13 @@ async function cmdNotes(argv) {
|
|
|
5052
5188
|
process.stdout.write(kleur5.yellow(M6().noCommits));
|
|
5053
5189
|
process.exit(0);
|
|
5054
5190
|
}
|
|
5191
|
+
const toSha = resolveCommit(cwd, args.to);
|
|
5192
|
+
if (toSha) process.stdout.write(kleur5.dim(M6().rangeShas(fromForGit ? resolveCommit(cwd, fromForGit) : null, toSha)));
|
|
5193
|
+
const total = fromForGit ? countCommits(cwd, { from: fromForGit, to: args.to }) : null;
|
|
5194
|
+
if (total !== null && total > args.limit) {
|
|
5195
|
+
process.stdout.write(kleur5.yellow(M6().truncated(commits.length, total, Math.min(total, MAX_LIMIT))));
|
|
5196
|
+
}
|
|
5197
|
+
if (args.to === "HEAD" && hasUncommittedChanges(cwd)) process.stdout.write(kleur5.yellow(M6().dirtyTree));
|
|
5055
5198
|
process.stdout.write(kleur5.dim(M6().analyzing(commits.length)));
|
|
5056
5199
|
let result;
|
|
5057
5200
|
if (process.env.ANTHROPIC_API_KEY) {
|
|
@@ -5098,14 +5241,10 @@ async function cmdNotes(argv) {
|
|
|
5098
5241
|
else if (choice === "3") selectedText = result.marketing;
|
|
5099
5242
|
userSelectedTone = true;
|
|
5100
5243
|
}
|
|
5101
|
-
const
|
|
5102
|
-
if (
|
|
5103
|
-
process.stdout.write(kleur5.red(
|
|
5104
|
-
|
|
5105
|
-
}
|
|
5106
|
-
const app = parseFirstApp(appsResult.text);
|
|
5107
|
-
if (!app) {
|
|
5108
|
-
process.stdout.write(kleur5.yellow(M6().noApps));
|
|
5244
|
+
const app = await resolveApplyApp(cfg, args.appId);
|
|
5245
|
+
if ("error" in app) {
|
|
5246
|
+
process.stdout.write(kleur5.red(app.error));
|
|
5247
|
+
if (args.apply) process.exit(1);
|
|
5109
5248
|
return;
|
|
5110
5249
|
}
|
|
5111
5250
|
if (userSelectedTone && args.locales.length > 1) {
|
|
@@ -5141,7 +5280,7 @@ var M7 = catalog(
|
|
|
5141
5280
|
positive: "\uAE0D\uC815\uC801\uC778 \uB9AC\uBDF0. \uAC10\uC0AC \uC778\uC0AC\uC640 \uD568\uAED8 \uC55E\uC73C\uB85C\uB3C4 \uC88B\uC740 \uACBD\uD5D8\uC744 \uC81C\uACF5\uD558\uACA0\uB2E4\uB294 \uC758\uC9C0\uB97C \uD45C\uD604.",
|
|
5142
5281
|
negative: "\uBD80\uC815\uC801\uC778 \uB9AC\uBDF0. \uBA3C\uC800 \uBD88\uD3B8\uC744 \uC0AC\uACFC\uD558\uACE0, \uBB38\uC81C \uD574\uACB0 \uC758\uC9C0\uB97C \uBCF4\uC5EC\uC918. \uAC00\uB2A5\uD558\uBA74 \uC9C0\uC6D0 \uCC44\uB110\uB85C \uC720\uB3C4.",
|
|
5143
5282
|
neutral: "\uC911\uB9BD\uC801\uC778 \uB9AC\uBDF0. \uD53C\uB4DC\uBC31\uC5D0 \uAC10\uC0AC\uD558\uACE0 \uAC1C\uC120 \uB178\uB825\uC744 \uC57D\uC18D.",
|
|
5144
|
-
bug_report: "\uBC84\uADF8 \uB9AC\uD3EC\uD2B8. \
|
|
5283
|
+
bug_report: "\uBC84\uADF8 \uB9AC\uD3EC\uD2B8. \uC81C\uBCF4\uC5D0 \uAC10\uC0AC\uD558\uACE0 \uC0B4\uD3B4\uBCF4\uACA0\uB2E4\uACE0 \uC54C\uB824. \uC218\uC815\uD588\uB2E4\uAC70\uB098 \uC5B8\uC81C \uACE0\uCCD0\uC9C4\uB2E4\uACE0\uB294 \uC4F0\uC9C0 \uB9C8.",
|
|
5145
5284
|
feature_request: "\uAE30\uB2A5 \uC694\uCCAD. \uD53C\uB4DC\uBC31\uC5D0 \uAC10\uC0AC\uD558\uACE0, \uAC80\uD1A0\uD558\uACA0\uB2E4\uACE0 \uC57D\uC18D."
|
|
5146
5285
|
},
|
|
5147
5286
|
localeNames: { ko: "\uD55C\uAD6D\uC5B4", en: "\uC601\uC5B4", ja: "\uC77C\uBCF8\uC5B4", "en-US": "\uC601\uC5B4", "zh-TW": "\uBC88\uCCB4\uC911\uAD6D\uC5B4" },
|
|
@@ -5194,7 +5333,7 @@ JSON\uC73C\uB85C\uB9CC \uC751\uB2F5: { "reply": "\uB2F5\uBCC0 \uD14D\uC2A4\uD2B8
|
|
|
5194
5333
|
positive: "A positive review. Say thank you and commit to keeping the experience great.",
|
|
5195
5334
|
negative: "A negative review. Apologize for the trouble first, then show a commitment to fixing it. Point to a support channel if you can.",
|
|
5196
5335
|
neutral: "A neutral review. Thank them for the feedback and promise to keep improving.",
|
|
5197
|
-
bug_report: "A bug report.
|
|
5336
|
+
bug_report: "A bug report. Thank them for reporting it and say you will look into it. Do not say it is fixed or when a fix will ship.",
|
|
5198
5337
|
feature_request: "A feature request. Thank them for the feedback and promise to consider it."
|
|
5199
5338
|
},
|
|
5200
5339
|
localeNames: {
|
|
@@ -5495,12 +5634,12 @@ async function cmdAuth(args) {
|
|
|
5495
5634
|
if (sub === "tiktok") return void exitWith(await runMcpBin("mimi-seed-tiktok-business-auth", rest));
|
|
5496
5635
|
if (sub === "social") {
|
|
5497
5636
|
log2(kleur7.dim(M8().socialChecklist));
|
|
5498
|
-
const { cmdSetup: cmdSetup2 } = await import("./setup-
|
|
5637
|
+
const { cmdSetup: cmdSetup2 } = await import("./setup-TNM7VWKK.js");
|
|
5499
5638
|
await cmdSetup2(["--only", SOCIAL_CREDENTIALS.join(","), ...rest]);
|
|
5500
5639
|
return;
|
|
5501
5640
|
}
|
|
5502
5641
|
if (sub === "ci") {
|
|
5503
|
-
const { cmdSetup: cmdSetup2 } = await import("./setup-
|
|
5642
|
+
const { cmdSetup: cmdSetup2 } = await import("./setup-TNM7VWKK.js");
|
|
5504
5643
|
await cmdSetup2(["--only", "github,gitlab", "--reconnect", "github,gitlab"]);
|
|
5505
5644
|
return;
|
|
5506
5645
|
}
|
|
@@ -5636,9 +5775,10 @@ ${kleur9.dim("setup \uB9C8\uBC95\uC0AC\uAC00 \uCCAB \uC2E4\uD589 \uB54C \uBB3C\u
|
|
|
5636
5775
|
--from <ref> \uC2DC\uC791 \uCEE4\uBC0B/\uD0DC\uADF8 (\uAE30\uBCF8: \uCD5C\uC2E0 \uD0DC\uADF8)
|
|
5637
5776
|
--to <ref> \uB05D \uCEE4\uBC0B (\uAE30\uBCF8: HEAD)
|
|
5638
5777
|
--locale ko,en-US \uB300\uC0C1 \uB85C\uCF00\uC77C (\uC27C\uD45C \uAD6C\uBD84)
|
|
5639
|
-
--apply \uC0DD\uC131 \uD6C4 \
|
|
5778
|
+
--apply \uC0DD\uC131 \uD6C4 Play Store \uB9B4\uB9AC\uC988 \uB178\uD2B8\uC5D0 \uBC14\uB85C \uC801\uC6A9
|
|
5779
|
+
--app <id> \uC801\uC6A9\uD560 \uC571 (\uC5C6\uC73C\uBA74 \uD504\uB85C\uC81D\uD2B8 \uB9C1\uD06C, \uC571\uC774 \uD558\uB098\uBFD0\uC77C \uB54C\uB9CC \uC790\uB3D9 \uC120\uD0DD)
|
|
5640
5780
|
--no-interactive CI \uBAA8\uB4DC (\uD504\uB86C\uD504\uD2B8 \uC5C6\uC74C)
|
|
5641
|
-
--limit <n> \uCD5C\uB300 \uCEE4\uBC0B \uC218 (\uAE30\uBCF8: 30)`,
|
|
5781
|
+
--limit <n> \uCD5C\uB300 \uCEE4\uBC0B \uC218 (\uAE30\uBCF8: 30, \uBC94\uC704\uAC00 \uB354 \uAE38\uBA74 \uC798\uB838\uB2E4\uACE0 \uD45C\uC2DC)`,
|
|
5642
5782
|
check: `${kleur9.bold("mimi-seed check")} \u2014 \uCD9C\uC2DC \uC804 Readiness \uC810\uAC80
|
|
5643
5783
|
|
|
5644
5784
|
\uC635\uC158:
|
|
@@ -5789,9 +5929,10 @@ Options:
|
|
|
5789
5929
|
--from <ref> start commit/tag (default: latest tag)
|
|
5790
5930
|
--to <ref> end commit (default: HEAD)
|
|
5791
5931
|
--locale ko,en-US target locales (comma-separated)
|
|
5792
|
-
--apply push to the
|
|
5932
|
+
--apply push to the Play Store release notes right after generating
|
|
5933
|
+
--app <id> app to apply to (else the project link; auto-picked only when one app is registered)
|
|
5793
5934
|
--no-interactive CI mode (no prompts)
|
|
5794
|
-
--limit <n> max commits (default: 30)`,
|
|
5935
|
+
--limit <n> max commits (default: 30; the output says when the range was longer)`,
|
|
5795
5936
|
check: `${kleur9.bold("mimi-seed check")} \u2014 pre-release readiness check
|
|
5796
5937
|
|
|
5797
5938
|
Options:
|
package/package.json
CHANGED