windmill-cli 1.554.0 → 1.554.1
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/gen/core/OpenAPI.js +1 -1
- package/esm/src/main.js +1 -1
- package/esm/windmill-utils-internal/src/inline-scripts/extractor.js +11 -8
- package/package.json +1 -1
- package/types/src/main.d.ts +1 -1
- package/types/windmill-utils-internal/src/inline-scripts/extractor.d.ts +4 -1
- package/types/windmill-utils-internal/src/inline-scripts/extractor.d.ts.map +1 -1
package/esm/gen/core/OpenAPI.js
CHANGED
package/esm/src/main.js
CHANGED
|
@@ -38,7 +38,7 @@ export { flow, app, script, workspace, resource, resourceType, user, variable, h
|
|
|
38
38
|
// console.error(JSON.stringify(event.error, null, 4));
|
|
39
39
|
// }
|
|
40
40
|
// });
|
|
41
|
-
export const VERSION = "1.554.
|
|
41
|
+
export const VERSION = "1.554.1";
|
|
42
42
|
export const WM_FORK_PREFIX = "wm-fork";
|
|
43
43
|
const command = new Command()
|
|
44
44
|
.name("wmill")
|
|
@@ -5,15 +5,18 @@ import { newPathAssigner } from "../path-utils/path-assigner.js";
|
|
|
5
5
|
*
|
|
6
6
|
* @param modules - Array of flow modules to process
|
|
7
7
|
* @param mapping - Optional mapping of module IDs to custom file paths
|
|
8
|
+
* @param separator - Path separator to use
|
|
8
9
|
* @param defaultTs - Default TypeScript runtime to use ("bun" or "deno")
|
|
10
|
+
* @param pathAssigner - Optional path assigner to reuse (for nested calls)
|
|
9
11
|
* @returns Array of inline scripts with their paths and content
|
|
10
12
|
*/
|
|
11
|
-
export function extractInlineScripts(modules, mapping = {}, separator = "/", defaultTs) {
|
|
12
|
-
|
|
13
|
+
export function extractInlineScripts(modules, mapping = {}, separator = "/", defaultTs, pathAssigner) {
|
|
14
|
+
// Create pathAssigner only if not provided (top-level call), but reuse it for nested calls
|
|
15
|
+
const assigner = pathAssigner ?? newPathAssigner(defaultTs ?? "bun");
|
|
13
16
|
return modules.flatMap((m) => {
|
|
14
17
|
if (m.value.type == "rawscript") {
|
|
15
18
|
let basePath, ext;
|
|
16
|
-
[basePath, ext] =
|
|
19
|
+
[basePath, ext] = assigner.assignPath(m.summary, m.value.language);
|
|
17
20
|
const path = mapping[m.id] ?? basePath + ext;
|
|
18
21
|
const content = m.value.content;
|
|
19
22
|
const r = [{ path: path, content: content }];
|
|
@@ -27,18 +30,18 @@ export function extractInlineScripts(modules, mapping = {}, separator = "/", def
|
|
|
27
30
|
return r;
|
|
28
31
|
}
|
|
29
32
|
else if (m.value.type == "forloopflow") {
|
|
30
|
-
return extractInlineScripts(m.value.modules, mapping, separator, defaultTs);
|
|
33
|
+
return extractInlineScripts(m.value.modules, mapping, separator, defaultTs, assigner);
|
|
31
34
|
}
|
|
32
35
|
else if (m.value.type == "branchall") {
|
|
33
|
-
return m.value.branches.flatMap((b) => extractInlineScripts(b.modules, mapping, separator, defaultTs));
|
|
36
|
+
return m.value.branches.flatMap((b) => extractInlineScripts(b.modules, mapping, separator, defaultTs, assigner));
|
|
34
37
|
}
|
|
35
38
|
else if (m.value.type == "whileloopflow") {
|
|
36
|
-
return extractInlineScripts(m.value.modules, mapping, separator, defaultTs);
|
|
39
|
+
return extractInlineScripts(m.value.modules, mapping, separator, defaultTs, assigner);
|
|
37
40
|
}
|
|
38
41
|
else if (m.value.type == "branchone") {
|
|
39
42
|
return [
|
|
40
|
-
...m.value.branches.flatMap((b) => extractInlineScripts(b.modules, mapping, separator, defaultTs)),
|
|
41
|
-
...extractInlineScripts(m.value.default, mapping, separator, defaultTs),
|
|
43
|
+
...m.value.branches.flatMap((b) => extractInlineScripts(b.modules, mapping, separator, defaultTs, assigner)),
|
|
44
|
+
...extractInlineScripts(m.value.default, mapping, separator, defaultTs, assigner),
|
|
42
45
|
];
|
|
43
46
|
}
|
|
44
47
|
else {
|
package/package.json
CHANGED
package/types/src/main.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import { pull as hubPull } from "./commands/hub/hub.js";
|
|
|
22
22
|
import { pull, push } from "./commands/sync/sync.js";
|
|
23
23
|
import { add as workspaceAdd } from "./commands/workspace/workspace.js";
|
|
24
24
|
export { flow, app, script, workspace, resource, resourceType, user, variable, hub, folder, schedule, trigger, sync, gitsyncSettings, instance, dev, hubPull, pull, push, workspaceAdd, };
|
|
25
|
-
export declare const VERSION = "1.554.
|
|
25
|
+
export declare const VERSION = "1.554.1";
|
|
26
26
|
export declare const WM_FORK_PREFIX = "wm-fork";
|
|
27
27
|
declare const command: Command<{
|
|
28
28
|
workspace?: (import("../deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/mod.js").StringType & string) | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PathAssigner } from "../path-utils/path-assigner.js";
|
|
1
2
|
import { FlowModule } from "../gen/types.gen.js";
|
|
2
3
|
/**
|
|
3
4
|
* Represents an inline script extracted from a flow module
|
|
@@ -14,10 +15,12 @@ interface InlineScript {
|
|
|
14
15
|
*
|
|
15
16
|
* @param modules - Array of flow modules to process
|
|
16
17
|
* @param mapping - Optional mapping of module IDs to custom file paths
|
|
18
|
+
* @param separator - Path separator to use
|
|
17
19
|
* @param defaultTs - Default TypeScript runtime to use ("bun" or "deno")
|
|
20
|
+
* @param pathAssigner - Optional path assigner to reuse (for nested calls)
|
|
18
21
|
* @returns Array of inline scripts with their paths and content
|
|
19
22
|
*/
|
|
20
|
-
export declare function extractInlineScripts(modules: FlowModule[], mapping?: Record<string, string>, separator?: string, defaultTs?: "bun" | "deno"): InlineScript[];
|
|
23
|
+
export declare function extractInlineScripts(modules: FlowModule[], mapping?: Record<string, string>, separator?: string, defaultTs?: "bun" | "deno", pathAssigner?: PathAssigner): InlineScript[];
|
|
21
24
|
/**
|
|
22
25
|
* Extracts the current mapping of module IDs to file paths from flow modules
|
|
23
26
|
* by analyzing existing inline script references.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../../../src/windmill-utils-internal/src/inline-scripts/extractor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../../../src/windmill-utils-internal/src/inline-scripts/extractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;GAEG;AACH,UAAU,YAAY;IACpB,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,UAAU,EAAE,EACrB,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EACpC,SAAS,GAAE,MAAY,EACvB,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,EAC1B,YAAY,CAAC,EAAE,YAAY,GAC1B,YAAY,EAAE,CA8DhB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,UAAU,EAAE,GAAG,SAAS,EACjC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACnC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgCxB"}
|