windmill-cli 1.518.0 → 1.518.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/main.js +1 -1
- package/esm/metadata.js +2 -2
- package/esm/sync.js +77 -6
- package/esm/windmill-utils-internal/src/inline-scripts/extractor.js +9 -11
- package/esm/windmill-utils-internal/src/inline-scripts/replacer.js +20 -22
- package/package.json +1 -1
- package/types/main.d.ts +1 -1
- package/types/metadata.d.ts.map +1 -1
- package/types/sync.d.ts +5 -1
- package/types/sync.d.ts.map +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/main.js
CHANGED
|
@@ -39,7 +39,7 @@ export { flow, app, script, workspace, resource, resourceType, user, variable, h
|
|
|
39
39
|
// console.error(JSON.stringify(event.error, null, 4));
|
|
40
40
|
// }
|
|
41
41
|
// });
|
|
42
|
-
export const VERSION = "1.518.
|
|
42
|
+
export const VERSION = "1.518.1";
|
|
43
43
|
const command = new Command()
|
|
44
44
|
.name("wmill")
|
|
45
45
|
.action(() => log.info(`Welcome to Windmill CLI ${VERSION}. Use -h for help.`))
|
package/esm/metadata.js
CHANGED
|
@@ -5,7 +5,7 @@ import { defaultScriptMetadata, } from "./bootstrap/script_bootstrap.js";
|
|
|
5
5
|
import { languagesWithRawReqsSupport, } from "./script_common.js";
|
|
6
6
|
import { inferContentTypeFromFilePath } from "./script_common.js";
|
|
7
7
|
import { exts, findGlobalDeps } from "./script.js";
|
|
8
|
-
import { FSFSElement, findCodebase, yamlOptions } from "./sync.js";
|
|
8
|
+
import { FSFSElement, findCodebase, newPathAssigner, yamlOptions } from "./sync.js";
|
|
9
9
|
import { generateHash, readInlinePathSync } from "./utils.js";
|
|
10
10
|
import { replaceInlineScripts } from "./windmill-utils-internal/src/inline-scripts/replacer.js";
|
|
11
11
|
import { extractInlineScripts as extractInlineScriptsForFlows } from "./windmill-utils-internal/src/inline-scripts/extractor.js";
|
|
@@ -109,7 +109,7 @@ export async function generateFlowLockInternal(folder, dryRun, workspace, opts,
|
|
|
109
109
|
await replaceInlineScripts(flowValue.value.modules, async (path) => await dntShim.Deno.readTextFile(folder + SEP + path), log, folder + SEP, SEP, changedScripts, (path, newPath) => dntShim.Deno.renameSync(path, newPath), (path) => dntShim.Deno.removeSync(path));
|
|
110
110
|
//removeChangedLocks
|
|
111
111
|
flowValue.value = await updateFlow(workspace, flowValue.value, remote_path, rawReqs);
|
|
112
|
-
const inlineScripts = extractInlineScriptsForFlows(flowValue.value.modules, {}, SEP);
|
|
112
|
+
const inlineScripts = extractInlineScriptsForFlows(flowValue.value.modules, {}, SEP, opts.defaultTs, newPathAssigner(opts.defaultTs ?? "bun"));
|
|
113
113
|
inlineScripts
|
|
114
114
|
.filter((s) => s.path.endsWith(".lock"))
|
|
115
115
|
.forEach((s) => {
|
package/esm/sync.js
CHANGED
|
@@ -13,7 +13,6 @@ import { removePathPrefix } from "./types.js";
|
|
|
13
13
|
import { listSyncCodebases } from "./codebase.js";
|
|
14
14
|
import { generateFlowLockInternal, generateScriptMetadataInternal, readLockfile, } from "./metadata.js";
|
|
15
15
|
import { pushResource } from "./resource.js";
|
|
16
|
-
import { assignPath } from "./windmill-utils-internal/src/path-utils/path-assigner.js";
|
|
17
16
|
import { extractInlineScripts as extractInlineScriptsForFlows } from "./windmill-utils-internal/src/inline-scripts/extractor.js";
|
|
18
17
|
// Merge CLI options with effective settings, preserving CLI flags as overrides
|
|
19
18
|
function mergeCliWithEffectiveOptions(cliOpts, effectiveOpts) {
|
|
@@ -217,7 +216,7 @@ export const yamlOptions = {
|
|
|
217
216
|
noRefs: true,
|
|
218
217
|
skipInvalid: true,
|
|
219
218
|
};
|
|
220
|
-
export function extractInlineScriptsForApps(rec) {
|
|
219
|
+
export function extractInlineScriptsForApps(rec, pathAssigner) {
|
|
221
220
|
if (!rec) {
|
|
222
221
|
return [];
|
|
223
222
|
}
|
|
@@ -225,7 +224,8 @@ export function extractInlineScriptsForApps(rec) {
|
|
|
225
224
|
return Object.entries(rec).flatMap(([k, v]) => {
|
|
226
225
|
if (k == "inlineScript" && typeof v == "object") {
|
|
227
226
|
const o = v;
|
|
228
|
-
const
|
|
227
|
+
const name = rec["name"];
|
|
228
|
+
const [basePath, ext] = pathAssigner.assignPath(name, o["language"]);
|
|
229
229
|
const r = [];
|
|
230
230
|
if (o["content"]) {
|
|
231
231
|
const content = o["content"];
|
|
@@ -246,7 +246,7 @@ export function extractInlineScriptsForApps(rec) {
|
|
|
246
246
|
return r;
|
|
247
247
|
}
|
|
248
248
|
else {
|
|
249
|
-
return extractInlineScriptsForApps(v);
|
|
249
|
+
return extractInlineScriptsForApps(v, pathAssigner);
|
|
250
250
|
}
|
|
251
251
|
});
|
|
252
252
|
}
|
|
@@ -283,7 +283,7 @@ function ZipFSElement(zip, useYaml, defaultTs, resourceTypeToFormatExtension, ig
|
|
|
283
283
|
async *getChildren() {
|
|
284
284
|
if (kind == "flow") {
|
|
285
285
|
const flow = JSON.parse(await f.async("text"));
|
|
286
|
-
const inlineScripts = extractInlineScriptsForFlows(flow.value.modules, {}, SEP);
|
|
286
|
+
const inlineScripts = extractInlineScriptsForFlows(flow.value.modules, {}, SEP, defaultTs, newPathAssigner(defaultTs));
|
|
287
287
|
for (const s of inlineScripts) {
|
|
288
288
|
yield {
|
|
289
289
|
isDirectory: false,
|
|
@@ -307,7 +307,7 @@ function ZipFSElement(zip, useYaml, defaultTs, resourceTypeToFormatExtension, ig
|
|
|
307
307
|
}
|
|
308
308
|
else if (kind == "app") {
|
|
309
309
|
const app = JSON.parse(await f.async("text"));
|
|
310
|
-
const inlineScripts = extractInlineScriptsForApps(app?.["value"]);
|
|
310
|
+
const inlineScripts = extractInlineScriptsForApps(app?.["value"], newPathAssigner(defaultTs));
|
|
311
311
|
for (const s of inlineScripts) {
|
|
312
312
|
yield {
|
|
313
313
|
isDirectory: false,
|
|
@@ -1588,4 +1588,75 @@ const command = new Command()
|
|
|
1588
1588
|
.option("--repository <repo:string>", "Specify repository path (e.g., u/user/repo) when multiple repositories exist")
|
|
1589
1589
|
// deno-lint-ignore no-explicit-any
|
|
1590
1590
|
.action(push);
|
|
1591
|
+
const INLINE_SCRIPT = "inline_script";
|
|
1592
|
+
export function newPathAssigner(defaultTs) {
|
|
1593
|
+
let counter = 0;
|
|
1594
|
+
const seen_names = new Set();
|
|
1595
|
+
function assignPath(summary, language) {
|
|
1596
|
+
let name;
|
|
1597
|
+
name = summary?.toLowerCase()?.replaceAll(" ", "_") ?? "";
|
|
1598
|
+
let original_name = name;
|
|
1599
|
+
if (name == "") {
|
|
1600
|
+
original_name = INLINE_SCRIPT;
|
|
1601
|
+
name = `${INLINE_SCRIPT}_0`;
|
|
1602
|
+
}
|
|
1603
|
+
while (seen_names.has(name)) {
|
|
1604
|
+
counter++;
|
|
1605
|
+
name = `${original_name}_${counter}`;
|
|
1606
|
+
}
|
|
1607
|
+
seen_names.add(name);
|
|
1608
|
+
let ext;
|
|
1609
|
+
if (language == "python3")
|
|
1610
|
+
ext = "py";
|
|
1611
|
+
else if (language == defaultTs || language == "bunnative")
|
|
1612
|
+
ext = "ts";
|
|
1613
|
+
else if (language == "bun")
|
|
1614
|
+
ext = "bun.ts";
|
|
1615
|
+
else if (language == "deno")
|
|
1616
|
+
ext = "deno.ts";
|
|
1617
|
+
else if (language == "go")
|
|
1618
|
+
ext = "go";
|
|
1619
|
+
else if (language == "bash")
|
|
1620
|
+
ext = "sh";
|
|
1621
|
+
else if (language == "powershell")
|
|
1622
|
+
ext = "ps1";
|
|
1623
|
+
else if (language == "postgresql")
|
|
1624
|
+
ext = "pg.sql";
|
|
1625
|
+
else if (language == "mysql")
|
|
1626
|
+
ext = "my.sql";
|
|
1627
|
+
else if (language == "bigquery")
|
|
1628
|
+
ext = "bq.sql";
|
|
1629
|
+
else if (language == "oracledb")
|
|
1630
|
+
ext = "odb.sql";
|
|
1631
|
+
else if (language == "snowflake")
|
|
1632
|
+
ext = "sf.sql";
|
|
1633
|
+
else if (language == "mssql")
|
|
1634
|
+
ext = "ms.sql";
|
|
1635
|
+
else if (language == "graphql")
|
|
1636
|
+
ext = "gql";
|
|
1637
|
+
else if (language == "nativets")
|
|
1638
|
+
ext = "native.ts";
|
|
1639
|
+
else if (language == "frontend")
|
|
1640
|
+
ext = "frontend.js";
|
|
1641
|
+
else if (language == "php")
|
|
1642
|
+
ext = "php";
|
|
1643
|
+
else if (language == "rust")
|
|
1644
|
+
ext = "rs";
|
|
1645
|
+
else if (language == "csharp")
|
|
1646
|
+
ext = "cs";
|
|
1647
|
+
else if (language == "nu")
|
|
1648
|
+
ext = "nu";
|
|
1649
|
+
else if (language == "ansible")
|
|
1650
|
+
ext = "playbook.yml";
|
|
1651
|
+
else if (language == "java")
|
|
1652
|
+
ext = "java";
|
|
1653
|
+
else if (language == "duckdb")
|
|
1654
|
+
ext = "duckdb.sql";
|
|
1655
|
+
// for related places search: ADD_NEW_LANG
|
|
1656
|
+
else
|
|
1657
|
+
ext = "no_ext";
|
|
1658
|
+
return [`${name}.inline_script.`, ext];
|
|
1659
|
+
}
|
|
1660
|
+
return { assignPath };
|
|
1661
|
+
}
|
|
1591
1662
|
export default command;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { assignPath } from "../path-utils/path-assigner.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* and replacing the original content with file references.
|
|
5
|
-
*
|
|
6
|
-
* @param modules - Array of flow modules to process
|
|
7
|
-
* @param mapping - Optional mapping of module IDs to custom file paths
|
|
8
|
-
* @param defaultTs - Default TypeScript runtime to use ("bun" or "deno")
|
|
9
|
-
* @returns Array of inline scripts with their paths and content
|
|
10
|
-
*/
|
|
11
|
-
export function extractInlineScripts(modules, mapping = {}, separator = "/", defaultTs) {
|
|
2
|
+
const INLINE_SCRIPT = "inline_script";
|
|
3
|
+
export function extractInlineScripts(modules, mapping = {}, separator = "/", defaultTs, pathAssigner) {
|
|
12
4
|
return modules.flatMap((m) => {
|
|
13
5
|
if (m.value.type == "rawscript") {
|
|
14
|
-
|
|
6
|
+
let basePath, ext;
|
|
7
|
+
if (pathAssigner) {
|
|
8
|
+
[basePath, ext] = pathAssigner.assignPath(m.summary, m.value.language);
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
[basePath, ext] = assignPath(m.id, m.value.language, defaultTs);
|
|
12
|
+
}
|
|
15
13
|
const path = mapping[m.id] ?? basePath + ext;
|
|
16
14
|
const content = m.value.content;
|
|
17
15
|
const r = [{ path: path, content: content }];
|
|
@@ -37,32 +37,30 @@ export async function replaceInlineScripts(modules, fileReader, logger = {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
// rename the file if the prefix is different from the module id (fix old naming)
|
|
40
|
-
if (pathPrefix != module.id && renamer) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
40
|
+
// if (pathPrefix != module.id && renamer) {
|
|
41
|
+
// logger.info(`Renaming ${path} to ${module.id}.${pathSuffix}`);
|
|
42
|
+
// try {
|
|
43
|
+
// renamer(localPath + path, localPath + module.id + "." + pathSuffix);
|
|
44
|
+
// } catch {
|
|
45
|
+
// logger.info(`Failed to rename ${path} to ${module.id}.${pathSuffix}`);
|
|
46
|
+
// }
|
|
47
|
+
// }
|
|
49
48
|
const lock = module.value.lock;
|
|
50
49
|
if (removeLocks && removeLocks.includes(path)) {
|
|
51
50
|
module.value.lock = undefined;
|
|
52
51
|
// delete the file if the prefix is different from the module id (fix old naming)
|
|
53
|
-
if (lock && lock != "") {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
52
|
+
// if (lock && lock != "") {
|
|
53
|
+
// const path = lock.split(" ")[1];
|
|
54
|
+
// const pathPrefix = path.split(".")[0];
|
|
55
|
+
// if (pathPrefix != module.id && deleter) {
|
|
56
|
+
// logger.info(`Deleting ${path}`);
|
|
57
|
+
// try {
|
|
58
|
+
// deleter(localPath + path);
|
|
59
|
+
// } catch {
|
|
60
|
+
// logger.error(`Failed to delete ${path}`);
|
|
61
|
+
// }
|
|
62
|
+
// }
|
|
63
|
+
// }
|
|
66
64
|
}
|
|
67
65
|
else if (lock &&
|
|
68
66
|
typeof lock == "string" &&
|
package/package.json
CHANGED
package/types/main.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import { pull as hubPull } from "./hub.js";
|
|
|
22
22
|
import { pull, push } from "./sync.js";
|
|
23
23
|
import { add as workspaceAdd } from "./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.518.
|
|
25
|
+
export declare const VERSION = "1.518.1";
|
|
26
26
|
declare const command: Command<{
|
|
27
27
|
workspace?: (import("./deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/mod.js").StringType & string) | undefined;
|
|
28
28
|
} & {
|
package/types/metadata.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAa3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAGL,cAAc,EACf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAwB,MAAM,aAAa,CAAC;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAM7C,OAAO,EAAE,S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22
|
}
|
|
23
|
-
export declare function extractInlineScriptsForApps(rec: any): InlineScript[];
|
|
23
|
+
export declare function extractInlineScriptsForApps(rec: any, pathAssigner: PathAssigner): InlineScript[];
|
|
24
24
|
export declare function readDirRecursiveWithIgnore(ignore: (path: string, isDirectory: boolean) => boolean, root: DynFSElement): AsyncGenerator<{
|
|
25
25
|
path: string;
|
|
26
26
|
ignored: boolean;
|
|
@@ -122,5 +122,9 @@ declare const command: Command<void, void, {
|
|
|
122
122
|
boolean: boolean;
|
|
123
123
|
file: string;
|
|
124
124
|
}, void, undefined>>;
|
|
125
|
+
interface PathAssigner {
|
|
126
|
+
assignPath(summary: string | undefined, language: string): [string, string];
|
|
127
|
+
}
|
|
128
|
+
export declare function newPathAssigner(defaultTs: "bun" | "deno"): PathAssigner;
|
|
125
129
|
export default command;
|
|
126
130
|
//# sourceMappingURL=sync.d.ts.map
|
package/types/sync.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,OAAO,EAWR,MAAM,WAAW,CAAC;AAGnB,OAAO,EAEL,aAAa,EAKd,MAAM,YAAY,CAAC;AAcpB,OAAO,EAAE,WAAW,EAAwC,MAAM,WAAW,CAAC;AAG9E,OAAO,EAAE,YAAY,EAAqB,MAAM,eAAe,CAAC;AAiHhE,KAAK,YAAY,GAAG;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IAEb,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,WAAW,IAAI,aAAa,CAAC,YAAY,CAAC,CAAC;CAC5C,CAAC;AAEF,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,YAAY,EAAE,GACxB,YAAY,GAAG,SAAS,CAiC1B;AA4CD,wBAAsB,WAAW,CAC/B,CAAC,EAAE,MAAM,EACT,SAAS,EA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AAO,CAAC"}
|
|
@@ -17,7 +17,10 @@ interface InlineScript {
|
|
|
17
17
|
* @param defaultTs - Default TypeScript runtime to use ("bun" or "deno")
|
|
18
18
|
* @returns Array of inline scripts with their paths and content
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
interface PathAssigner {
|
|
21
|
+
assignPath(summary: string | undefined, language: string): [string, string];
|
|
22
|
+
}
|
|
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":"AACA,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;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../../../src/windmill-utils-internal/src/inline-scripts/extractor.ts"],"names":[],"mappings":"AACA,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;;;;;;;;GAQG;AAEH,UAAU,YAAY;IACpB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7E;AAED,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,CAiDhB;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"}
|