windmill-cli 1.691.0 → 1.691.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/main.js +26 -20
- package/package.json +1 -1
package/esm/main.js
CHANGED
|
@@ -16701,7 +16701,7 @@ var init_OpenAPI = __esm(() => {
|
|
|
16701
16701
|
PASSWORD: undefined,
|
|
16702
16702
|
TOKEN: getEnv3("WM_TOKEN"),
|
|
16703
16703
|
USERNAME: undefined,
|
|
16704
|
-
VERSION: "1.691.
|
|
16704
|
+
VERSION: "1.691.1",
|
|
16705
16705
|
WITH_CREDENTIALS: true,
|
|
16706
16706
|
interceptors: {
|
|
16707
16707
|
request: new Interceptors,
|
|
@@ -63321,8 +63321,8 @@ function getLanguageFromExtension(ext2, defaultTs = "bun") {
|
|
|
63321
63321
|
return;
|
|
63322
63322
|
}
|
|
63323
63323
|
function sanitizeForFilesystem(summary) {
|
|
63324
|
-
const name = summary.
|
|
63325
|
-
return WINDOWS_RESERVED.test(name) ? `_${name}` : name;
|
|
63324
|
+
const name = summary.replaceAll(" ", "_").replace(/[/\\:*?"<>|\x00-\x1f\x7f]/g, "").replace(/_+/g, "_").replace(/^[._]+|[._]+$/g, "");
|
|
63325
|
+
return WINDOWS_RESERVED.test(name.toLowerCase()) ? `_${name}` : name;
|
|
63326
63326
|
}
|
|
63327
63327
|
function newPathAssigner(defaultTs, options) {
|
|
63328
63328
|
const resolvedOptions = typeof defaultTs === "object" ? defaultTs : { defaultTs, skipInlineScriptSuffix: options?.skipInlineScriptSuffix };
|
|
@@ -63337,11 +63337,11 @@ function newPathAssigner(defaultTs, options) {
|
|
|
63337
63337
|
original_name = INLINE_SCRIPT_PREFIX;
|
|
63338
63338
|
name = `${INLINE_SCRIPT_PREFIX}_0`;
|
|
63339
63339
|
}
|
|
63340
|
-
while (seen_names.has(name)) {
|
|
63340
|
+
while (seen_names.has(name.toLowerCase())) {
|
|
63341
63341
|
counter++;
|
|
63342
63342
|
name = `${original_name}_${counter}`;
|
|
63343
63343
|
}
|
|
63344
|
-
seen_names.add(name);
|
|
63344
|
+
seen_names.add(name.toLowerCase());
|
|
63345
63345
|
const ext2 = getLanguageExtension(language, tsRuntime);
|
|
63346
63346
|
const suffix = skipInlineScriptSuffix ? "." : ".inline_script.";
|
|
63347
63347
|
return [`${name}${suffix}`, ext2];
|
|
@@ -63359,11 +63359,11 @@ function newRawAppPathAssigner(defaultTs) {
|
|
|
63359
63359
|
original_name = "runnable";
|
|
63360
63360
|
name = `runnable_0`;
|
|
63361
63361
|
}
|
|
63362
|
-
while (seen_names.has(name)) {
|
|
63362
|
+
while (seen_names.has(name.toLowerCase())) {
|
|
63363
63363
|
counter++;
|
|
63364
63364
|
name = `${original_name}_${counter}`;
|
|
63365
63365
|
}
|
|
63366
|
-
seen_names.add(name);
|
|
63366
|
+
seen_names.add(name.toLowerCase());
|
|
63367
63367
|
const ext2 = getLanguageExtension(language, defaultTs);
|
|
63368
63368
|
return [`${name}.`, ext2];
|
|
63369
63369
|
}
|
|
@@ -67552,12 +67552,24 @@ __export(exports_raw_apps, {
|
|
|
67552
67552
|
import { sep as SEP10 } from "node:path";
|
|
67553
67553
|
import path12 from "node:path";
|
|
67554
67554
|
import { readdir as readdir6 } from "node:fs/promises";
|
|
67555
|
+
async function readSiblingLock(backendPath, runnableId, allFiles) {
|
|
67556
|
+
const target = `${runnableId.toLowerCase()}.lock`;
|
|
67557
|
+
const lockFile = allFiles.find((f) => f.toLowerCase() === target);
|
|
67558
|
+
if (!lockFile)
|
|
67559
|
+
return;
|
|
67560
|
+
try {
|
|
67561
|
+
return await readTextFile(path12.join(backendPath, lockFile));
|
|
67562
|
+
} catch {
|
|
67563
|
+
return;
|
|
67564
|
+
}
|
|
67565
|
+
}
|
|
67555
67566
|
async function findRunnableContentFile(backendPath, runnableId, allFiles) {
|
|
67567
|
+
const runnableIdLower = runnableId.toLowerCase();
|
|
67556
67568
|
for (const fileName of allFiles) {
|
|
67557
67569
|
if (fileName.endsWith(".yaml") || fileName.endsWith(".lock")) {
|
|
67558
67570
|
continue;
|
|
67559
67571
|
}
|
|
67560
|
-
if (!fileName.startsWith(
|
|
67572
|
+
if (!fileName.toLowerCase().startsWith(runnableIdLower + ".")) {
|
|
67561
67573
|
continue;
|
|
67562
67574
|
}
|
|
67563
67575
|
const ext2 = fileName.substring(runnableId.length + 1);
|
|
@@ -67599,17 +67611,14 @@ async function loadRunnablesFromBackend(backendPath, defaultTs = "bun") {
|
|
|
67599
67611
|
continue;
|
|
67600
67612
|
}
|
|
67601
67613
|
const runnableId = fileName.replace(".yaml", "");
|
|
67602
|
-
processedIds.add(runnableId);
|
|
67614
|
+
processedIds.add(runnableId.toLowerCase());
|
|
67603
67615
|
const filePath = path12.join(backendPath, fileName);
|
|
67604
67616
|
const runnable = await yamlParseFile(filePath);
|
|
67605
67617
|
if (runnable?.type === "inline") {
|
|
67606
67618
|
const contentFile = await findRunnableContentFile(backendPath, runnableId, allFiles);
|
|
67607
67619
|
if (contentFile) {
|
|
67608
67620
|
const language = getLanguageFromExtension(contentFile.ext, defaultTs);
|
|
67609
|
-
|
|
67610
|
-
try {
|
|
67611
|
-
lock = await readTextFile(path12.join(backendPath, `${runnableId}.lock`));
|
|
67612
|
-
} catch {}
|
|
67621
|
+
const lock = await readSiblingLock(backendPath, runnableId, allFiles);
|
|
67613
67622
|
runnable.inlineScript = {
|
|
67614
67623
|
content: contentFile.content,
|
|
67615
67624
|
language,
|
|
@@ -67630,17 +67639,14 @@ async function loadRunnablesFromBackend(backendPath, defaultTs = "bun") {
|
|
|
67630
67639
|
if (!runnableId) {
|
|
67631
67640
|
continue;
|
|
67632
67641
|
}
|
|
67633
|
-
if (processedIds.has(runnableId)) {
|
|
67642
|
+
if (processedIds.has(runnableId.toLowerCase())) {
|
|
67634
67643
|
continue;
|
|
67635
67644
|
}
|
|
67636
|
-
processedIds.add(runnableId);
|
|
67645
|
+
processedIds.add(runnableId.toLowerCase());
|
|
67637
67646
|
const contentFile = await findRunnableContentFile(backendPath, runnableId, allFiles);
|
|
67638
67647
|
if (contentFile) {
|
|
67639
67648
|
const language = getLanguageFromExtension(contentFile.ext, defaultTs);
|
|
67640
|
-
|
|
67641
|
-
try {
|
|
67642
|
-
lock = await readTextFile(path12.join(backendPath, `${runnableId}.lock`));
|
|
67643
|
-
} catch {}
|
|
67649
|
+
const lock = await readSiblingLock(backendPath, runnableId, allFiles);
|
|
67644
67650
|
runnables[runnableId] = {
|
|
67645
67651
|
type: "inline",
|
|
67646
67652
|
inlineScript: {
|
|
@@ -86141,7 +86147,7 @@ var config_default = command35;
|
|
|
86141
86147
|
|
|
86142
86148
|
// src/main.ts
|
|
86143
86149
|
await init_context();
|
|
86144
|
-
var VERSION = "1.691.
|
|
86150
|
+
var VERSION = "1.691.1";
|
|
86145
86151
|
async function checkVersionSafe(cmd) {
|
|
86146
86152
|
const mainCommand = cmd.getMainCommand();
|
|
86147
86153
|
const upgradeCommand = mainCommand.getCommand("upgrade");
|