mano-coding 0.1.21 → 0.1.22

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.
Files changed (2) hide show
  1. package/dist/bin.js +36 -11
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -31959,6 +31959,8 @@ function interpolateString(template, ctx) {
31959
31959
  if (varName === "projectDir") return ctx.projectDir;
31960
31960
  if (varName === "projectParentDir") return ctx.projectParentDir;
31961
31961
  if (varName === "templateDir") return ctx.templateDir;
31962
+ if (varName === "target" || varName === "ide") return ctx.target ?? "";
31963
+ if (varName === "targets") return ctx.targets ? ctx.targets.join(",") : ctx.target ?? "";
31962
31964
  if (varName.startsWith("inputs.")) {
31963
31965
  const inputKey = varName.slice("inputs.".length);
31964
31966
  return ctx.inputs[inputKey] ?? "";
@@ -32015,20 +32017,35 @@ async function executeTasks(tasks, ctx, options = {}) {
32015
32017
  for (let i = 0; i < tasks.length; i++) {
32016
32018
  const task = tasks[i];
32017
32019
  const command = interpolateString(task.command, ctx);
32018
- const args = (task.args ?? []).map((arg) => interpolateString(arg, ctx));
32020
+ const rawArgs = (task.args ?? []).map((arg) => interpolateString(arg, ctx));
32019
32021
  const cwd = task.cwd ? interpolateString(task.cwd, ctx) : ctx.projectDir;
32022
+ const effectiveArgs = [...rawArgs];
32023
+ const isInstallMcpScript = command && command.includes("install-farris-vue-mcp") || effectiveArgs.some((arg) => typeof arg === "string" && arg.includes("install-farris-vue-mcp"));
32024
+ if (isInstallMcpScript && !effectiveArgs.includes("--ide")) {
32025
+ const targetIde = ctx.target ?? "codebuddy";
32026
+ effectiveArgs.push("--ide", targetIde);
32027
+ }
32020
32028
  const env = { ...process.env };
32029
+ if (ctx.target) {
32030
+ env.MANO_TARGET = ctx.target;
32031
+ env.MANO_IDE = ctx.target;
32032
+ env.TARGET = ctx.target;
32033
+ env.IDE = ctx.target;
32034
+ }
32035
+ if (ctx.targets) {
32036
+ env.MANO_TARGETS = ctx.targets.join(",");
32037
+ }
32021
32038
  if (task.env) {
32022
32039
  for (const [k2, v2] of Object.entries(task.env)) {
32023
32040
  env[k2] = interpolateString(v2, ctx);
32024
32041
  }
32025
32042
  }
32026
32043
  if (options.onProgress) {
32027
- options.onProgress(`\u6B63\u5728\u6267\u884C\u4EFB\u52A1 [${i + 1}/${tasks.length}] (${task.id}): ${command} ${args.join(" ")}`);
32044
+ options.onProgress(`\u6B63\u5728\u6267\u884C\u4EFB\u52A1 [${i + 1}/${tasks.length}] (${task.id}): ${command} ${effectiveArgs.join(" ")}`);
32028
32045
  }
32029
32046
  const executable = resolveTaskExecutable(command, process.platform, env.PATH);
32030
32047
  await new Promise((resolve22, reject) => {
32031
- const child = spawn(executable, args, {
32048
+ const child = spawn(executable, effectiveArgs, {
32032
32049
  cwd,
32033
32050
  env,
32034
32051
  stdio,
@@ -32181,11 +32198,11 @@ function getTargetMcpPath(target) {
32181
32198
  case "trae":
32182
32199
  return ".trae/mcp.json";
32183
32200
  case "codebuddy":
32184
- return ".codebuddy/mcp.json";
32201
+ return ".mcp.json";
32185
32202
  case "claude-code":
32186
- return ".claude/mcp.json";
32203
+ return ".mcp.json";
32187
32204
  case "opencode":
32188
- return ".opencode/mcp.json";
32205
+ return "opencode.json";
32189
32206
  case "deepseek-harness":
32190
32207
  return ".dsh/mcp.json";
32191
32208
  default:
@@ -39265,7 +39282,9 @@ ${taskValidation.missingInputs.map((k2) => `--set ${k2}=<value>`).join("\n")}`,
39265
39282
  projectDir: service.projectRoot,
39266
39283
  projectParentDir: dirname15(service.projectRoot),
39267
39284
  templateDir,
39268
- inputs: inputValues
39285
+ inputs: inputValues,
39286
+ target: projectTargets[0]?.id,
39287
+ targets: projectTargets.map((t2) => t2.id)
39269
39288
  };
39270
39289
  if (!output.json && i === 0) {
39271
39290
  writeHumanOutput("\n\u6B63\u5728\u6267\u884C\u524D\u7F6E\u521B\u5EFA\u4EFB\u52A1 (before:create):\n");
@@ -39379,7 +39398,9 @@ ${taskValidation.missingInputs.map((k2) => `--set ${k2}=<value>`).join("\n")}`,
39379
39398
  projectDir: service.projectRoot,
39380
39399
  projectParentDir: dirname15(service.projectRoot),
39381
39400
  templateDir,
39382
- inputs: inputValues
39401
+ inputs: inputValues,
39402
+ target: projectTargets[0]?.id,
39403
+ targets: projectTargets.map((t2) => t2.id)
39383
39404
  };
39384
39405
  if (!output.json && i === 0) {
39385
39406
  writeHumanOutput("\n\u6B63\u5728\u6267\u884C\u540E\u7F6E\u521D\u59CB\u5316\u4EFB\u52A1 (after:create):\n");
@@ -39691,7 +39712,9 @@ async function executeApply(packageSpec, options, cliVersion, events) {
39691
39712
  projectDir: service.projectRoot,
39692
39713
  projectParentDir: dirname15(service.projectRoot),
39693
39714
  templateDir,
39694
- inputs: inputValues
39715
+ inputs: inputValues,
39716
+ target: projectTargets[0]?.id,
39717
+ targets: projectTargets.map((t2) => t2.id)
39695
39718
  };
39696
39719
  if (!output.json && i === 0) {
39697
39720
  writeHumanOutput("\n\u6B63\u5728\u6267\u884C\u524D\u7F6E\u5E94\u7528\u4EFB\u52A1 (before:apply):\n");
@@ -39780,7 +39803,9 @@ async function executeApply(packageSpec, options, cliVersion, events) {
39780
39803
  projectDir: service.projectRoot,
39781
39804
  projectParentDir: dirname15(service.projectRoot),
39782
39805
  templateDir,
39783
- inputs: inputValues
39806
+ inputs: inputValues,
39807
+ target: projectTargets[0]?.id,
39808
+ targets: projectTargets.map((t2) => t2.id)
39784
39809
  };
39785
39810
  if (!output.json && i === 0) {
39786
39811
  writeHumanOutput("\n\u6B63\u5728\u6267\u884C\u540E\u7F6E\u5E94\u7528\u4EFB\u52A1 (after:apply):\n");
@@ -42076,7 +42101,7 @@ import { createRequire as createRequire2 } from "node:module";
42076
42101
  import { readFileSync as readFileSync4 } from "node:fs";
42077
42102
  import { fileURLToPath as fileURLToPath5 } from "node:url";
42078
42103
  function resolveVersion() {
42079
- if (true) return "0.1.21";
42104
+ if (true) return "0.1.22";
42080
42105
  const candidates = [
42081
42106
  new URL("../package.json", import.meta.url),
42082
42107
  new URL("../../package.json", import.meta.url),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mano-coding",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "Mano Coding CLI and toolchain",
5
5
  "type": "module",
6
6
  "main": "index.js",