mano-coding 0.1.28 → 0.1.29
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.js +57 -36
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -3417,6 +3417,7 @@ var init_zh = __esm({
|
|
|
3417
3417
|
"create.missingInputsHint": "\u7F3A\u5C11\u5FC5\u586B\u8F93\u5165\uFF1A{0}\u3002\u8BF7\u901A\u8FC7 --set <name>=<value> \u63D0\u4F9B",
|
|
3418
3418
|
"create.chooseTargets": "\u9009\u62E9\u8981\u521D\u59CB\u5316\u7684 IDE \u76EE\u6807",
|
|
3419
3419
|
"create.targetSelectionCancelled": "\u76EE\u6807\u9009\u62E9\u5DF2\u53D6\u6D88",
|
|
3420
|
+
"create.targetRequired": "\u7F3A\u5C11\u76EE\u6807 IDE \u53C2\u6570\uFF0C\u8BF7\u4F7F\u7528 --target <ide...>",
|
|
3420
3421
|
"create.planConflict": "Plan \u5B58\u5728\u51B2\u7A81",
|
|
3421
3422
|
"create.needsConfirmation": "\u6267\u884C Plan \u9700\u8981 --yes\u3002\u4F7F\u7528 --dry-run \u9884\u89C8\u3002",
|
|
3422
3423
|
"create.userDeclined": "\u7528\u6237\u62D2\u7EDD\u4E86 Plan \u786E\u8BA4",
|
|
@@ -38678,23 +38679,16 @@ function printPlanSummary(s3) {
|
|
|
38678
38679
|
\u63D2\u4EF6\uFF1A${s3.pluginCount}
|
|
38679
38680
|
`);
|
|
38680
38681
|
}
|
|
38681
|
-
function computeProjectTargets(
|
|
38682
|
-
|
|
38683
|
-
return cliTargets.map((id) => ({ id, scope: "project" }));
|
|
38684
|
-
}
|
|
38682
|
+
function computeProjectTargets(manifestsOrCliTargets, maybeCliTargets) {
|
|
38683
|
+
const cliTargets = Array.isArray(maybeCliTargets) ? maybeCliTargets : Array.isArray(manifestsOrCliTargets) && (manifestsOrCliTargets.length === 0 || typeof manifestsOrCliTargets[0] === "string") ? manifestsOrCliTargets : [];
|
|
38685
38684
|
const seen = /* @__PURE__ */ new Set();
|
|
38686
38685
|
const targets = [];
|
|
38687
|
-
for (const
|
|
38688
|
-
|
|
38689
|
-
|
|
38690
|
-
|
|
38691
|
-
targets.push({ id: t2.id, scope: "project" });
|
|
38692
|
-
}
|
|
38686
|
+
for (const id of cliTargets) {
|
|
38687
|
+
if (id && !seen.has(id)) {
|
|
38688
|
+
seen.add(id);
|
|
38689
|
+
targets.push({ id, scope: "project" });
|
|
38693
38690
|
}
|
|
38694
38691
|
}
|
|
38695
|
-
if (targets.length === 0) {
|
|
38696
|
-
targets.push({ id: "cursor", scope: "project" });
|
|
38697
|
-
}
|
|
38698
38692
|
return targets;
|
|
38699
38693
|
}
|
|
38700
38694
|
function collectInputDefs(manifests) {
|
|
@@ -38854,12 +38848,22 @@ function toRequestedSource(resolution) {
|
|
|
38854
38848
|
if (source.type === "npm") return { type: "npm", registry: source.registry };
|
|
38855
38849
|
return { type: "git", url: source.url, ref: "commit" in source ? source.commit : source.ref, ...source.subdirectory ? { subdirectory: source.subdirectory } : {} };
|
|
38856
38850
|
}
|
|
38851
|
+
var OFFICIAL_TARGET_CHOICES;
|
|
38857
38852
|
var init_plan_execution = __esm({
|
|
38858
38853
|
"packages/cli/src/commands/plan-execution.ts"() {
|
|
38859
38854
|
"use strict";
|
|
38860
38855
|
init_src2();
|
|
38861
38856
|
init_cli_output();
|
|
38862
38857
|
init_i18n();
|
|
38858
|
+
OFFICIAL_TARGET_CHOICES = [
|
|
38859
|
+
{ id: "codebuddy", label: "CodeBuddy" },
|
|
38860
|
+
{ id: "cursor", label: "Cursor" },
|
|
38861
|
+
{ id: "claude-code", label: "Claude Code" },
|
|
38862
|
+
{ id: "trae", label: "Trae" },
|
|
38863
|
+
{ id: "opencode", label: "OpenCode" },
|
|
38864
|
+
{ id: "codex", label: "Codex" },
|
|
38865
|
+
{ id: "deepseek-harness", label: "DeepSeek Harness" }
|
|
38866
|
+
];
|
|
38863
38867
|
}
|
|
38864
38868
|
});
|
|
38865
38869
|
|
|
@@ -39316,11 +39320,16 @@ ${taskValidation.missingInputs.map((k2) => `--set ${k2}=<value>`).join("\n")}`,
|
|
|
39316
39320
|
}
|
|
39317
39321
|
await recoverIncompleteJournals(service, output);
|
|
39318
39322
|
let cliTargets = options.target;
|
|
39319
|
-
if (cliTargets.length === 0
|
|
39320
|
-
|
|
39321
|
-
if (candidates.length > 1) {
|
|
39323
|
+
if (cliTargets.length === 0) {
|
|
39324
|
+
if (isInteractive) {
|
|
39322
39325
|
try {
|
|
39323
|
-
const selected = await selectSearchableMulti({
|
|
39326
|
+
const selected = await selectSearchableMulti({
|
|
39327
|
+
message: t("create.chooseTargets"),
|
|
39328
|
+
choices: OFFICIAL_TARGET_CHOICES
|
|
39329
|
+
});
|
|
39330
|
+
if (selected.length === 0) {
|
|
39331
|
+
throw new CliError(t("create.targetSelectionCancelled"), ExitCode.NeedsInputOrDenied, "PERMISSION_DENIED");
|
|
39332
|
+
}
|
|
39324
39333
|
cliTargets = selected.map((choice) => choice.id);
|
|
39325
39334
|
} catch (error) {
|
|
39326
39335
|
if (error instanceof SearchableSelectCancelled) {
|
|
@@ -39328,12 +39337,11 @@ ${taskValidation.missingInputs.map((k2) => `--set ${k2}=<value>`).join("\n")}`,
|
|
|
39328
39337
|
}
|
|
39329
39338
|
throw error;
|
|
39330
39339
|
}
|
|
39340
|
+
} else {
|
|
39341
|
+
cliTargets = ["codebuddy"];
|
|
39331
39342
|
}
|
|
39332
39343
|
}
|
|
39333
|
-
const projectTargets = computeProjectTargets(
|
|
39334
|
-
allResolutions.map((r) => r.manifest),
|
|
39335
|
-
cliTargets
|
|
39336
|
-
);
|
|
39344
|
+
const projectTargets = computeProjectTargets(cliTargets);
|
|
39337
39345
|
await service.registerThirdPartyAdapters(
|
|
39338
39346
|
allResolutions.map((r) => ({ manifest: r.manifest, resolution: r }))
|
|
39339
39347
|
);
|
|
@@ -39641,19 +39649,6 @@ async function resolvePackageWith(service, spec, options, cliVersion) {
|
|
|
39641
39649
|
throw err;
|
|
39642
39650
|
});
|
|
39643
39651
|
}
|
|
39644
|
-
function collectTargetCandidates(manifests) {
|
|
39645
|
-
const seen = /* @__PURE__ */ new Set();
|
|
39646
|
-
const candidates = [];
|
|
39647
|
-
for (const manifest of manifests) {
|
|
39648
|
-
for (const target of manifest?.targets ?? []) {
|
|
39649
|
-
if (target?.id && !seen.has(target.id)) {
|
|
39650
|
-
seen.add(target.id);
|
|
39651
|
-
candidates.push({ id: target.id, label: target.id });
|
|
39652
|
-
}
|
|
39653
|
-
}
|
|
39654
|
-
}
|
|
39655
|
-
return candidates;
|
|
39656
|
-
}
|
|
39657
39652
|
var init_create = __esm({
|
|
39658
39653
|
"packages/cli/src/commands/create.ts"() {
|
|
39659
39654
|
"use strict";
|
|
@@ -39702,6 +39697,7 @@ async function executeApply(packageSpec, options, cliVersion, events) {
|
|
|
39702
39697
|
noColor: options.noColor
|
|
39703
39698
|
};
|
|
39704
39699
|
const jsonEvents = () => options.json && options.verbose ? getRedactedEvents(events) : void 0;
|
|
39700
|
+
const isInteractive = !options.noInput && !options.json && Boolean(process.stdin.isTTY);
|
|
39705
39701
|
const service = new ServiceLocator({
|
|
39706
39702
|
cliVersion,
|
|
39707
39703
|
projectRoot: options.project,
|
|
@@ -39785,7 +39781,31 @@ async function executeApply(packageSpec, options, cliVersion, events) {
|
|
|
39785
39781
|
{ inputs: missingInputs }
|
|
39786
39782
|
);
|
|
39787
39783
|
}
|
|
39788
|
-
|
|
39784
|
+
let cliTargets = options.target;
|
|
39785
|
+
if (cliTargets.length === 0) {
|
|
39786
|
+
if (existingLock?.desired.targets && existingLock.desired.targets.length > 0) {
|
|
39787
|
+
cliTargets = existingLock.desired.targets.map((t2) => t2.id);
|
|
39788
|
+
} else if (isInteractive) {
|
|
39789
|
+
try {
|
|
39790
|
+
const selected = await selectSearchableMulti({
|
|
39791
|
+
message: t("create.chooseTargets"),
|
|
39792
|
+
choices: OFFICIAL_TARGET_CHOICES
|
|
39793
|
+
});
|
|
39794
|
+
if (selected.length === 0) {
|
|
39795
|
+
throw new CliError(t("create.targetSelectionCancelled"), ExitCode.NeedsInputOrDenied, "PERMISSION_DENIED");
|
|
39796
|
+
}
|
|
39797
|
+
cliTargets = selected.map((choice) => choice.id);
|
|
39798
|
+
} catch (error) {
|
|
39799
|
+
if (error instanceof SearchableSelectCancelled) {
|
|
39800
|
+
throw new CliError(t("create.targetSelectionCancelled"), ExitCode.NeedsInputOrDenied, "PERMISSION_DENIED");
|
|
39801
|
+
}
|
|
39802
|
+
throw error;
|
|
39803
|
+
}
|
|
39804
|
+
} else {
|
|
39805
|
+
cliTargets = ["codebuddy"];
|
|
39806
|
+
}
|
|
39807
|
+
}
|
|
39808
|
+
const projectTargets = computeProjectTargets(cliTargets);
|
|
39789
39809
|
await service.registerThirdPartyAdapters(
|
|
39790
39810
|
allResolutions.map((r) => ({ manifest: r.manifest, resolution: r }))
|
|
39791
39811
|
);
|
|
@@ -40071,6 +40091,7 @@ var init_apply = __esm({
|
|
|
40071
40091
|
init_spinner();
|
|
40072
40092
|
init_i18n();
|
|
40073
40093
|
init_plan_execution();
|
|
40094
|
+
init_searchable_select();
|
|
40074
40095
|
}
|
|
40075
40096
|
});
|
|
40076
40097
|
|
|
@@ -42304,7 +42325,7 @@ import { createRequire as createRequire2 } from "node:module";
|
|
|
42304
42325
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
42305
42326
|
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
42306
42327
|
function resolveVersion() {
|
|
42307
|
-
if (true) return "0.1.
|
|
42328
|
+
if (true) return "0.1.29";
|
|
42308
42329
|
const candidates = [
|
|
42309
42330
|
new URL("../package.json", import.meta.url),
|
|
42310
42331
|
new URL("../../package.json", import.meta.url),
|