@dazitech/cli 3.0.3 → 3.0.5
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/README.md +1 -1
- package/dist/clis/dazi-app.js +1 -1
- package/dist/clis/dazi-flow.js +24 -5
- package/dist/clis/dazi-onto.js +2 -2
- package/dist/clis/dazi.js +3 -3
- package/dist/docs/flow/flow-project-guide.md +1 -1
- package/dist/docs/guides/troubleshooting.md +1 -1
- package/dist/docs/index.json +1 -1
- package/dist/examples/index.json +1 -1
- package/dist/prompts/index.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/clis/dazi-app.js
CHANGED
|
@@ -16753,7 +16753,7 @@ function registerLegacyCompatCommands(program3) {
|
|
|
16753
16753
|
var program2 = new Command();
|
|
16754
16754
|
program2.name("dazi-app").description(
|
|
16755
16755
|
"\u642D\u5B50 App CLI \u2014 DRAP \u524D\u7AEF\u5E94\u7528\uFF08manifest / build / upload / preview\uFF09"
|
|
16756
|
-
).version("3.0.
|
|
16756
|
+
).version("3.0.5", "-v, --version");
|
|
16757
16757
|
registerAuth(program2);
|
|
16758
16758
|
registerBuild(program2);
|
|
16759
16759
|
registerDev(program2);
|
package/dist/clis/dazi-flow.js
CHANGED
|
@@ -4512,7 +4512,23 @@ var require_flowDirResolve = __commonJS({
|
|
|
4512
4512
|
function isWorkspaceRootCandidate(dir) {
|
|
4513
4513
|
return fs_1.default.existsSync(path_1.default.join(dir, "\u9879\u76EE")) || fs_1.default.existsSync(path_1.default.join(dir, "scripts", "dazi.ps1"));
|
|
4514
4514
|
}
|
|
4515
|
-
function
|
|
4515
|
+
function isValidFlowTargetDir(dir) {
|
|
4516
|
+
if (isWorkspaceRootCandidate(dir))
|
|
4517
|
+
return false;
|
|
4518
|
+
const norm = path_1.default.resolve(dir).replace(/\\/g, "/");
|
|
4519
|
+
const base = path_1.default.basename(norm.replace(/\/$/, ""));
|
|
4520
|
+
if (["flows", "\u89C4\u5212", "\u6D41\u7A0B", "\u9879\u76EE", "\u8282\u70B9", "\u53D8\u91CF", "_run"].includes(base))
|
|
4521
|
+
return false;
|
|
4522
|
+
if (/(?:^|\/)项目\/[^/]+\/流程\/flows\/[^/]+(?:\/|$)/.test(norm))
|
|
4523
|
+
return true;
|
|
4524
|
+
const legacy = norm.match(/(?:^|\/)项目\/([^/]+)\/流程\/([^/]+)(?:\/|$)/);
|
|
4525
|
+
if (legacy && legacy[2] !== "flows" && legacy[2] !== "\u89C4\u5212")
|
|
4526
|
+
return true;
|
|
4527
|
+
if (/(?:^|\/)项目\/flow_[^/]+\/流程\/[^/]+(?:\/|$)/.test(norm))
|
|
4528
|
+
return true;
|
|
4529
|
+
return false;
|
|
4530
|
+
}
|
|
4531
|
+
function resolveFlowDirForCli(dir, opts) {
|
|
4516
4532
|
const requested = path_1.default.resolve(dir ?? process.cwd());
|
|
4517
4533
|
const warnings = [];
|
|
4518
4534
|
if (fs_1.default.existsSync(path_1.default.join(requested, exports2.FLOW_JSON))) {
|
|
@@ -4525,6 +4541,9 @@ var require_flowDirResolve = __commonJS({
|
|
|
4525
4541
|
}
|
|
4526
4542
|
return { flowDir: found, resolvedFromParent: found !== requested, warnings };
|
|
4527
4543
|
}
|
|
4544
|
+
if (opts?.allowMissingFlowJson && isValidFlowTargetDir(requested)) {
|
|
4545
|
+
return { flowDir: requested, resolvedFromParent: false, warnings };
|
|
4546
|
+
}
|
|
4528
4547
|
const hasMetaOnly = fs_1.default.existsSync(path_1.default.join(requested, exports2.FLOW_META_JSON)) && !fs_1.default.existsSync(path_1.default.join(requested, exports2.FLOW_JSON));
|
|
4529
4548
|
if (hasMetaOnly || isWorkspaceRootCandidate(requested) && !fs_1.default.existsSync(path_1.default.join(requested, exports2.FLOW_JSON))) {
|
|
4530
4549
|
return {
|
|
@@ -4543,7 +4562,7 @@ var require_flowDirResolve = __commonJS({
|
|
|
4543
4562
|
}
|
|
4544
4563
|
exports2.resolveFlowDirForCli = resolveFlowDirForCli;
|
|
4545
4564
|
function resolveFlowDir5(dir, opts) {
|
|
4546
|
-
const result = resolveFlowDirForCli(dir);
|
|
4565
|
+
const result = resolveFlowDirForCli(dir, opts);
|
|
4547
4566
|
if (!opts?.json) {
|
|
4548
4567
|
for (const w of result.warnings)
|
|
4549
4568
|
console.warn(`\u26A0\uFE0F ${w}`);
|
|
@@ -5618,9 +5637,9 @@ function makeProjectCommand() {
|
|
|
5618
5637
|
handleError(err);
|
|
5619
5638
|
}
|
|
5620
5639
|
});
|
|
5621
|
-
cmd.command("pull").description("\u4ECE\u5E73\u53F0\u62C9\u53D6\u6D41\u7A0B\u5FEB\u7167\u5E76\u62C6\u5206\u4E3A\u672C\u5730\u6587\u4EF6\uFF08flow.json + \u8282\u70B9/<\u540D>/code.*\uFF09").requiredOption("--flow <flowId>", "Flow ID").option("--dir <dir>", "\u6D41\u7A0B\u76EE\u5F55\uFF08\
|
|
5640
|
+
cmd.command("pull").description("\u4ECE\u5E73\u53F0\u62C9\u53D6\u6D41\u7A0B\u5FEB\u7167\u5E76\u62C6\u5206\u4E3A\u672C\u5730\u6587\u4EF6\uFF08flow.json + \u8282\u70B9/<\u540D>/code.*\uFF09").requiredOption("--flow <flowId>", "Flow ID").option("--dir <dir>", "\u76EE\u6807\u6D41\u7A0B\u76EE\u5F55\uFF08\u53EF\u65E0 flow.json\uFF0Cpull \u4F1A\u521B\u5EFA\uFF1B\u63A8\u8350\u7EDD\u5BF9\u8DEF\u5F84\uFF09").option("--json", "\u8F93\u51FA JSON").action(async (opts) => {
|
|
5622
5641
|
try {
|
|
5623
|
-
const flowDir = (0, import_flowDirResolve.resolveFlowDir)(opts.dir, { json: opts.json });
|
|
5642
|
+
const flowDir = (0, import_flowDirResolve.resolveFlowDir)(opts.dir, { json: opts.json, allowMissingFlowJson: true });
|
|
5624
5643
|
import_fs8.default.mkdirSync(flowDir, { recursive: true });
|
|
5625
5644
|
const localCount = readLocalCanvasNodeCount(flowDir);
|
|
5626
5645
|
const preAudit = localCount > 0 ? (0, import_flowWorkspaceAudit.auditFlowWorkspace)(flowDir) : null;
|
|
@@ -7218,7 +7237,7 @@ function makeManagedFilesCommand() {
|
|
|
7218
7237
|
|
|
7219
7238
|
// cli/dazi-flow/src/index.ts
|
|
7220
7239
|
var program2 = new Command();
|
|
7221
|
-
program2.name("dazi-flow").description("\u642D\u5B50 Flow CLI \u2014 \u5DE5\u4F5C\u6D41\u7BA1\u7406").version("3.0.
|
|
7240
|
+
program2.name("dazi-flow").description("\u642D\u5B50 Flow CLI \u2014 \u5DE5\u4F5C\u6D41\u7BA1\u7406").version("3.0.5", "-v, --version");
|
|
7222
7241
|
program2.addCommand(makeFlowsCommand());
|
|
7223
7242
|
program2.addCommand(makeSnapshotCommand());
|
|
7224
7243
|
program2.addCommand(makeProjectCommand());
|
package/dist/clis/dazi-onto.js
CHANGED
|
@@ -3978,7 +3978,7 @@ function makeMcpCommand() {
|
|
|
3978
3978
|
result: {
|
|
3979
3979
|
protocolVersion: "2024-11-05",
|
|
3980
3980
|
capabilities: { tools: {} },
|
|
3981
|
-
serverInfo: { name: "dazi-onto", version: "3.0.
|
|
3981
|
+
serverInfo: { name: "dazi-onto", version: "3.0.5" }
|
|
3982
3982
|
}
|
|
3983
3983
|
};
|
|
3984
3984
|
process.stdout.write(JSON.stringify(response) + "\n");
|
|
@@ -4001,7 +4001,7 @@ function makeMcpCommand() {
|
|
|
4001
4001
|
|
|
4002
4002
|
// cli/dazi-onto/src/index.ts
|
|
4003
4003
|
var program2 = new Command();
|
|
4004
|
-
program2.name("dazi-onto").description("\u642D\u5B50 Onto CLI \u2014 \u672C\u4F53\uFF08Ontology\uFF09\u7BA1\u7406").version("3.0.
|
|
4004
|
+
program2.name("dazi-onto").description("\u642D\u5B50 Onto CLI \u2014 \u672C\u4F53\uFF08Ontology\uFF09\u7BA1\u7406").version("3.0.5", "-v, --version");
|
|
4005
4005
|
program2.addCommand(makeSpaceCommand());
|
|
4006
4006
|
program2.addCommand(makeFunctionCommand());
|
|
4007
4007
|
program2.addCommand(makeActionCommand());
|
package/dist/clis/dazi.js
CHANGED
|
@@ -4024,7 +4024,7 @@ function makeEnvCommand() {
|
|
|
4024
4024
|
return new Command("env").description("\u663E\u793A\u73AF\u5883\u4FE1\u606F").action(() => {
|
|
4025
4025
|
const auth = tryLoadAuth();
|
|
4026
4026
|
const env = {
|
|
4027
|
-
version: "3.0.
|
|
4027
|
+
version: "3.0.5",
|
|
4028
4028
|
node: process.version,
|
|
4029
4029
|
platform: `${import_os5.default.type()} ${import_os5.default.arch()}`,
|
|
4030
4030
|
serverUrl: getServerUrl(),
|
|
@@ -5694,7 +5694,7 @@ function dispatch(msg) {
|
|
|
5694
5694
|
result: {
|
|
5695
5695
|
protocolVersion: "2024-11-05",
|
|
5696
5696
|
capabilities: { tools: {} },
|
|
5697
|
-
serverInfo: { name: "dazi", version: "3.0.
|
|
5697
|
+
serverInfo: { name: "dazi", version: "3.0.5" }
|
|
5698
5698
|
}
|
|
5699
5699
|
};
|
|
5700
5700
|
case "initialized":
|
|
@@ -5817,7 +5817,7 @@ function forwardToCli(cliName, extraArgs) {
|
|
|
5817
5817
|
process.exit(result.status ?? 1);
|
|
5818
5818
|
}
|
|
5819
5819
|
var program2 = new Command();
|
|
5820
|
-
program2.name("dazi").description("\u642D\u5B50 v3 \u2014 Onto / Flow / App \u7EDF\u4E00 CLI").version("3.0.
|
|
5820
|
+
program2.name("dazi").description("\u642D\u5B50 v3 \u2014 Onto / Flow / App \u7EDF\u4E00 CLI").version("3.0.5", "-v, --version");
|
|
5821
5821
|
program2.addCommand(makeAuthCommand());
|
|
5822
5822
|
program2.addCommand(makeDoctorCommand());
|
|
5823
5823
|
program2.addCommand(makeEnvCommand());
|
|
@@ -84,7 +84,7 @@ dazi doctor --workspace-root D:\path\to\dazi-work
|
|
|
84
84
|
检查 `.cursor/mcp.json` 配置。MCP 需能调用 bundled CLI,示例:
|
|
85
85
|
|
|
86
86
|
```powershell
|
|
87
|
-
$env:DAZI_BUNDLED_DIR = "$env:USERPROFILE\.cursor\extensions\dazitech.dazi-vscode-3.0.
|
|
87
|
+
$env:DAZI_BUNDLED_DIR = "$env:USERPROFILE\.cursor\extensions\dazitech.dazi-vscode-3.0.4\bundled\clis"
|
|
88
88
|
node "$env:DAZI_BUNDLED_DIR\dazi.js" mcp stdio
|
|
89
89
|
```
|
|
90
90
|
|
package/dist/docs/index.json
CHANGED
package/dist/examples/index.json
CHANGED
package/dist/prompts/index.json
CHANGED