windmill-cli 1.749.0 → 1.751.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.
- package/esm/main.js +83 -6
- package/package.json +2 -2
package/esm/main.js
CHANGED
|
@@ -16784,7 +16784,7 @@ var init_OpenAPI = __esm(() => {
|
|
|
16784
16784
|
PASSWORD: undefined,
|
|
16785
16785
|
TOKEN: getEnv3("WM_TOKEN"),
|
|
16786
16786
|
USERNAME: undefined,
|
|
16787
|
-
VERSION: "1.
|
|
16787
|
+
VERSION: "1.751.0",
|
|
16788
16788
|
WITH_CREDENTIALS: true,
|
|
16789
16789
|
interceptors: {
|
|
16790
16790
|
request: new Interceptors,
|
|
@@ -17151,6 +17151,7 @@ __export(exports_services_gen, {
|
|
|
17151
17151
|
setFlowUserState: () => setFlowUserState,
|
|
17152
17152
|
setEnvironmentVariable: () => setEnvironmentVariable,
|
|
17153
17153
|
setEmailTriggerMode: () => setEmailTriggerMode,
|
|
17154
|
+
setDevWorkspaceLabel: () => setDevWorkspaceLabel,
|
|
17154
17155
|
setDefaultErrorOrRecoveryHandler: () => setDefaultErrorOrRecoveryHandler,
|
|
17155
17156
|
setCaptureConfig: () => setCaptureConfig,
|
|
17156
17157
|
setAzureTriggerMode: () => setAzureTriggerMode,
|
|
@@ -18222,6 +18223,16 @@ var backendVersion = () => {
|
|
|
18222
18223
|
workspace: data3.workspace
|
|
18223
18224
|
}
|
|
18224
18225
|
});
|
|
18226
|
+
}, setDevWorkspaceLabel = (data3) => {
|
|
18227
|
+
return request(OpenAPI, {
|
|
18228
|
+
method: "POST",
|
|
18229
|
+
url: "/w/{workspace}/workspaces/set_dev_workspace_label",
|
|
18230
|
+
path: {
|
|
18231
|
+
workspace: data3.workspace
|
|
18232
|
+
},
|
|
18233
|
+
body: data3.requestBody,
|
|
18234
|
+
mediaType: "application/json"
|
|
18235
|
+
});
|
|
18225
18236
|
}, existsWorkspace = (data3) => {
|
|
18226
18237
|
return request(OpenAPI, {
|
|
18227
18238
|
method: "POST",
|
|
@@ -25649,6 +25660,7 @@ __export(exports_gen, {
|
|
|
25649
25660
|
setFlowUserState: () => setFlowUserState,
|
|
25650
25661
|
setEnvironmentVariable: () => setEnvironmentVariable,
|
|
25651
25662
|
setEmailTriggerMode: () => setEmailTriggerMode,
|
|
25663
|
+
setDevWorkspaceLabel: () => setDevWorkspaceLabel,
|
|
25652
25664
|
setDefaultErrorOrRecoveryHandler: () => setDefaultErrorOrRecoveryHandler,
|
|
25653
25665
|
setCaptureConfig: () => setCaptureConfig,
|
|
25654
25666
|
setAzureTriggerMode: () => setAzureTriggerMode,
|
|
@@ -26422,7 +26434,7 @@ var init_auth = __esm(async () => {
|
|
|
26422
26434
|
});
|
|
26423
26435
|
|
|
26424
26436
|
// src/core/constants.ts
|
|
26425
|
-
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.
|
|
26437
|
+
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.751.0";
|
|
26426
26438
|
|
|
26427
26439
|
// src/utils/git.ts
|
|
26428
26440
|
var exports_git = {};
|
|
@@ -28739,6 +28751,9 @@ var init_slack = __esm(async () => {
|
|
|
28739
28751
|
});
|
|
28740
28752
|
|
|
28741
28753
|
// src/utils/resource_types.ts
|
|
28754
|
+
function quotePropName(name) {
|
|
28755
|
+
return /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(name) ? name : JSON.stringify(name);
|
|
28756
|
+
}
|
|
28742
28757
|
function compileResourceTypeToTsType(schema) {
|
|
28743
28758
|
function rec(x, root = false) {
|
|
28744
28759
|
let res = `{
|
|
@@ -28750,15 +28765,15 @@ function compileResourceTypeToTsType(schema) {
|
|
|
28750
28765
|
let i = 0;
|
|
28751
28766
|
for (let [name, prop] of entries) {
|
|
28752
28767
|
if (prop.type == "object") {
|
|
28753
|
-
res += ` ${name}: ${rec(prop.properties ?? {})}`;
|
|
28768
|
+
res += ` ${quotePropName(name)}: ${rec(prop.properties ?? {})}`;
|
|
28754
28769
|
} else if (prop.type == "array") {
|
|
28755
|
-
res += ` ${name}: ${prop?.items?.type ?? "any"}[]`;
|
|
28770
|
+
res += ` ${quotePropName(name)}: ${prop?.items?.type ?? "any"}[]`;
|
|
28756
28771
|
} else {
|
|
28757
28772
|
let typ = prop?.type ?? "any";
|
|
28758
28773
|
if (typ == "integer") {
|
|
28759
28774
|
typ = "number";
|
|
28760
28775
|
}
|
|
28761
|
-
res += ` ${name}: ${typ}`;
|
|
28776
|
+
res += ` ${quotePropName(name)}: ${typ}`;
|
|
28762
28777
|
}
|
|
28763
28778
|
i++;
|
|
28764
28779
|
if (i < entries.length) {
|
|
@@ -95835,6 +95850,11 @@ function buildLineageDag(g2) {
|
|
|
95835
95850
|
const at = t2;
|
|
95836
95851
|
addEdge(dag, assetNodeId(at.asset_kind, at.asset_path), scriptNodeId(at.runnable_path));
|
|
95837
95852
|
}
|
|
95853
|
+
for (const t2 of g2.test_edges ?? []) {
|
|
95854
|
+
if (t2.runnable_kind !== "script")
|
|
95855
|
+
continue;
|
|
95856
|
+
addEdge(dag, assetNodeId(t2.asset_kind, t2.asset_path), scriptNodeId(t2.runnable_path));
|
|
95857
|
+
}
|
|
95838
95858
|
return dag;
|
|
95839
95859
|
}
|
|
95840
95860
|
function closure(adj, start) {
|
|
@@ -96474,8 +96494,13 @@ async function buildLocalPipelineGraph(args) {
|
|
|
96474
96494
|
const assetSet = new Map;
|
|
96475
96495
|
const derivedFromByKey = new Map;
|
|
96476
96496
|
const pipelineScripts = [];
|
|
96497
|
+
const dataTestsByPath = new Map;
|
|
96498
|
+
const readsByRunnable = new Map;
|
|
96477
96499
|
for (const s2 of all) {
|
|
96478
96500
|
const out = await inferScriptAssets(s2.content, s2.language);
|
|
96501
|
+
const reads = (out.assets ?? []).filter((a2) => a2.access_type == null || a2.access_type === "r" || a2.access_type === "rw").map((a2) => ({ kind: a2.kind, path: a2.path }));
|
|
96502
|
+
if (reads.length > 0)
|
|
96503
|
+
readsByRunnable.set(s2.path, reads);
|
|
96479
96504
|
const macroLibDefs = libMacros.get(s2.path);
|
|
96480
96505
|
if (macroLibDefs) {
|
|
96481
96506
|
runnables.push({
|
|
@@ -96493,6 +96518,9 @@ async function buildLocalPipelineGraph(args) {
|
|
|
96493
96518
|
}
|
|
96494
96519
|
if (!out.in_pipeline)
|
|
96495
96520
|
continue;
|
|
96521
|
+
if (out.data_tests && out.data_tests.length > 0) {
|
|
96522
|
+
dataTestsByPath.set(s2.path, out.data_tests);
|
|
96523
|
+
}
|
|
96496
96524
|
const retry = normalizeRetry(out.retry);
|
|
96497
96525
|
const nativeTriggers = recoverHeaderNativeTriggers(s2.content, s2.language);
|
|
96498
96526
|
pipelineScripts.push(out.tag ? { ...s2, tag: out.tag } : s2);
|
|
@@ -96584,6 +96612,7 @@ async function buildLocalPipelineGraph(args) {
|
|
|
96584
96612
|
}
|
|
96585
96613
|
}
|
|
96586
96614
|
const macroEdges = buildMacroEdges(all, libMacros, runnables);
|
|
96615
|
+
const testEdges = buildTestEdges(dataTestsByPath, readsByRunnable, edges);
|
|
96587
96616
|
const assets = [...assetSet.entries()].map(([key, a2]) => {
|
|
96588
96617
|
const derived_from = a2.derived_from ?? derivedFromByKey.get(key);
|
|
96589
96618
|
return derived_from ? { ...a2, derived_from } : a2;
|
|
@@ -96594,11 +96623,59 @@ async function buildLocalPipelineGraph(args) {
|
|
|
96594
96623
|
assets,
|
|
96595
96624
|
edges,
|
|
96596
96625
|
triggers,
|
|
96597
|
-
...macroEdges.length > 0 ? { macro_edges: macroEdges } : {}
|
|
96626
|
+
...macroEdges.length > 0 ? { macro_edges: macroEdges } : {},
|
|
96627
|
+
...testEdges.length > 0 ? { test_edges: testEdges } : {}
|
|
96598
96628
|
},
|
|
96599
96629
|
scripts: pipelineScripts
|
|
96600
96630
|
};
|
|
96601
96631
|
}
|
|
96632
|
+
function buildTestEdges(dataTestsByPath, readsByRunnable, edges) {
|
|
96633
|
+
const producersByAsset = new Map;
|
|
96634
|
+
for (const e2 of edges) {
|
|
96635
|
+
if (e2.access_type !== "w" && e2.access_type !== "rw")
|
|
96636
|
+
continue;
|
|
96637
|
+
const key = `${e2.asset_kind}\x00${e2.asset_path}`;
|
|
96638
|
+
(producersByAsset.get(key) ?? producersByAsset.set(key, []).get(key)).push({
|
|
96639
|
+
kind: e2.runnable_kind,
|
|
96640
|
+
path: e2.runnable_path
|
|
96641
|
+
});
|
|
96642
|
+
}
|
|
96643
|
+
const out = [];
|
|
96644
|
+
const seen = new Set;
|
|
96645
|
+
for (const [memberPath, dts] of dataTestsByPath) {
|
|
96646
|
+
for (const dt of dts) {
|
|
96647
|
+
let referenced = [];
|
|
96648
|
+
if (dt.type === "relationships") {
|
|
96649
|
+
referenced = [{ kind: dt.to_kind, path: dt.to_path }];
|
|
96650
|
+
} else if (dt.type === "custom") {
|
|
96651
|
+
referenced = readsByRunnable.get(dt.path) ?? [];
|
|
96652
|
+
}
|
|
96653
|
+
for (const ref of referenced) {
|
|
96654
|
+
const producers = producersByAsset.get(`${ref.kind}\x00${ref.path}`);
|
|
96655
|
+
if (!producers)
|
|
96656
|
+
continue;
|
|
96657
|
+
for (const p3 of producers) {
|
|
96658
|
+
if (p3.kind === "script" && p3.path === memberPath)
|
|
96659
|
+
continue;
|
|
96660
|
+
const key = [p3.path, memberPath, ref.kind, ref.path].join("\x00");
|
|
96661
|
+
if (seen.has(key))
|
|
96662
|
+
continue;
|
|
96663
|
+
seen.add(key);
|
|
96664
|
+
out.push({
|
|
96665
|
+
producer_kind: p3.kind,
|
|
96666
|
+
producer_path: p3.path,
|
|
96667
|
+
runnable_kind: "script",
|
|
96668
|
+
runnable_path: memberPath,
|
|
96669
|
+
asset_kind: ref.kind,
|
|
96670
|
+
asset_path: ref.path
|
|
96671
|
+
});
|
|
96672
|
+
}
|
|
96673
|
+
}
|
|
96674
|
+
}
|
|
96675
|
+
}
|
|
96676
|
+
out.sort((a2, b2) => a2.producer_path.localeCompare(b2.producer_path) || a2.runnable_path.localeCompare(b2.runnable_path) || a2.asset_kind.localeCompare(b2.asset_kind) || a2.asset_path.localeCompare(b2.asset_path));
|
|
96677
|
+
return out;
|
|
96678
|
+
}
|
|
96602
96679
|
function collectMacroLibraries(root) {
|
|
96603
96680
|
const out = new Map;
|
|
96604
96681
|
const walk = (dir) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "windmill-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.751.0",
|
|
4
4
|
"description": "CLI for Windmill",
|
|
5
5
|
"license": "Apache 2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"esbuild": "0.28.0",
|
|
20
|
-
"windmill-parser-wasm-asset": "1.
|
|
20
|
+
"windmill-parser-wasm-asset": "1.749.0",
|
|
21
21
|
"windmill-parser-wasm-csharp": "1.510.1",
|
|
22
22
|
"windmill-parser-wasm-go": "1.510.1",
|
|
23
23
|
"windmill-parser-wasm-java": "1.510.1",
|