windmill-cli 1.697.0 → 1.699.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 +164 -69
- package/package.json +1 -1
package/esm/main.js
CHANGED
|
@@ -16752,7 +16752,7 @@ var init_OpenAPI = __esm(() => {
|
|
|
16752
16752
|
PASSWORD: undefined,
|
|
16753
16753
|
TOKEN: getEnv3("WM_TOKEN"),
|
|
16754
16754
|
USERNAME: undefined,
|
|
16755
|
-
VERSION: "1.
|
|
16755
|
+
VERSION: "1.699.0",
|
|
16756
16756
|
WITH_CREDENTIALS: true,
|
|
16757
16757
|
interceptors: {
|
|
16758
16758
|
request: new Interceptors,
|
|
@@ -22008,6 +22008,7 @@ var backendVersion = () => {
|
|
|
22008
22008
|
success: data3.success,
|
|
22009
22009
|
all_workspaces: data3.allWorkspaces,
|
|
22010
22010
|
is_not_schedule: data3.isNotSchedule,
|
|
22011
|
+
excludes_entrypoint_override: data3.excludesEntrypointOverride,
|
|
22011
22012
|
broad_filter: data3.broadFilter
|
|
22012
22013
|
}
|
|
22013
22014
|
});
|
|
@@ -62509,6 +62510,7 @@ async function readModulesFromDisk(moduleFolderPath, defaultTs, folderLayout = f
|
|
|
62509
62510
|
async function createScript2(bundleContent, workspaceId, body, workspace) {
|
|
62510
62511
|
const start = performance.now();
|
|
62511
62512
|
const skipIfNoop = "skip_if_noop=true";
|
|
62513
|
+
const extraHeaders = getHeaders2();
|
|
62512
62514
|
if (!bundleContent) {
|
|
62513
62515
|
try {
|
|
62514
62516
|
const url = workspace.remote + "api/w/" + workspaceId + "/scripts/create?" + skipIfNoop;
|
|
@@ -62516,10 +62518,12 @@ async function createScript2(bundleContent, workspaceId, body, workspace) {
|
|
|
62516
62518
|
method: "POST",
|
|
62517
62519
|
headers: {
|
|
62518
62520
|
Authorization: `Bearer ${workspace.token}`,
|
|
62519
|
-
"Content-Type": "application/json"
|
|
62521
|
+
"Content-Type": "application/json",
|
|
62522
|
+
...extraHeaders
|
|
62520
62523
|
},
|
|
62521
62524
|
body: JSON.stringify(body)
|
|
62522
62525
|
});
|
|
62526
|
+
await detectAuthGatewayChallenge(req, url);
|
|
62523
62527
|
if (req.status != 201) {
|
|
62524
62528
|
throw Error(`${req.status} - ${req.statusText} - ${await req.text()}`);
|
|
62525
62529
|
}
|
|
@@ -62533,9 +62537,13 @@ async function createScript2(bundleContent, workspaceId, body, workspace) {
|
|
|
62533
62537
|
const url = workspace.remote + "api/w/" + workspace.workspaceId + "/scripts/create_snapshot?" + skipIfNoop;
|
|
62534
62538
|
const req = await fetch(url, {
|
|
62535
62539
|
method: "POST",
|
|
62536
|
-
headers: {
|
|
62540
|
+
headers: {
|
|
62541
|
+
Authorization: `Bearer ${workspace.token} `,
|
|
62542
|
+
...extraHeaders
|
|
62543
|
+
},
|
|
62537
62544
|
body: form
|
|
62538
62545
|
});
|
|
62546
|
+
await detectAuthGatewayChallenge(req, url);
|
|
62539
62547
|
if (req.status != 201) {
|
|
62540
62548
|
throw Error(`Script snapshot creation was not successful: ${req.status} - ${req.statusText} - ${await req.text()} `);
|
|
62541
62549
|
}
|
|
@@ -63080,11 +63088,16 @@ async function preview(opts, filePath) {
|
|
|
63080
63088
|
form.append("preview", JSON.stringify(previewPayload));
|
|
63081
63089
|
form.append("file", typeof bundledContent === "string" ? new Blob([bundledContent], { type: "application/javascript" }) : bundledContent);
|
|
63082
63090
|
const url = workspace.remote + "api/w/" + workspace.workspaceId + "/jobs/run/preview_bundle";
|
|
63091
|
+
const extraHeaders = getHeaders2();
|
|
63083
63092
|
const response = await fetch(url, {
|
|
63084
63093
|
method: "POST",
|
|
63085
|
-
headers: {
|
|
63094
|
+
headers: {
|
|
63095
|
+
Authorization: `Bearer ${workspace.token}`,
|
|
63096
|
+
...extraHeaders
|
|
63097
|
+
},
|
|
63086
63098
|
body: form
|
|
63087
63099
|
});
|
|
63100
|
+
await detectAuthGatewayChallenge(response, url);
|
|
63088
63101
|
if (!response.ok) {
|
|
63089
63102
|
throw new Error(`Preview failed: ${response.status} - ${response.statusText} - ${await response.text()}`);
|
|
63090
63103
|
}
|
|
@@ -63192,6 +63205,7 @@ var init_script = __esm(async () => {
|
|
|
63192
63205
|
init_mod3();
|
|
63193
63206
|
init_mod6();
|
|
63194
63207
|
init_log();
|
|
63208
|
+
init_http_guards();
|
|
63195
63209
|
init_services_gen();
|
|
63196
63210
|
init_git();
|
|
63197
63211
|
init_script_bootstrap();
|
|
@@ -64981,6 +64995,7 @@ async function rehashOnly(opts, folder, rehashFilter) {
|
|
|
64981
64995
|
}
|
|
64982
64996
|
const stubWorkspace = {};
|
|
64983
64997
|
const rehashOpts = { ...opts, rehashOnly: true };
|
|
64998
|
+
const queue = [];
|
|
64984
64999
|
if (!rehashFilter?.skipScripts) {
|
|
64985
65000
|
for (const e of scriptPaths) {
|
|
64986
65001
|
const remotePath = scriptPathToRemotePath(e);
|
|
@@ -64990,12 +65005,7 @@ async function rehashOnly(opts, folder, rehashFilter) {
|
|
|
64990
65005
|
if (skipIfExisting(remotePath) || skipIfExisting(remotePath, "__script_hash"))
|
|
64991
65006
|
continue;
|
|
64992
65007
|
}
|
|
64993
|
-
|
|
64994
|
-
await generateScriptMetadataInternal(e, stubWorkspace, rehashOpts, false, true, {}, codebases, false);
|
|
64995
|
-
counts.scripts++;
|
|
64996
|
-
} catch (err) {
|
|
64997
|
-
warn(`Skipping ${e}: ${err instanceof Error ? err.message : err}`);
|
|
64998
|
-
}
|
|
65008
|
+
queue.push({ kind: "script", scriptPath: e });
|
|
64999
65009
|
}
|
|
65000
65010
|
}
|
|
65001
65011
|
if (!rehashFilter?.skipFlows) {
|
|
@@ -65007,12 +65017,7 @@ async function rehashOnly(opts, folder, rehashFilter) {
|
|
|
65007
65017
|
if (skipIfExisting(folderNormalized, "__flow_hash"))
|
|
65008
65018
|
continue;
|
|
65009
65019
|
}
|
|
65010
|
-
|
|
65011
|
-
await generateFlowLockInternal(f, false, stubWorkspace, rehashOpts, false, true);
|
|
65012
|
-
counts.flows++;
|
|
65013
|
-
} catch (err) {
|
|
65014
|
-
warn(`Skipping ${f}: ${err instanceof Error ? err.message : err}`);
|
|
65015
|
-
}
|
|
65020
|
+
queue.push({ kind: "flow", folder: f });
|
|
65016
65021
|
}
|
|
65017
65022
|
}
|
|
65018
65023
|
if (!rehashFilter?.skipApps) {
|
|
@@ -65024,13 +65029,47 @@ async function rehashOnly(opts, folder, rehashFilter) {
|
|
|
65024
65029
|
if (skipIfExisting(folderNormalized, "__app_hash"))
|
|
65025
65030
|
continue;
|
|
65026
65031
|
}
|
|
65027
|
-
|
|
65028
|
-
|
|
65029
|
-
|
|
65030
|
-
|
|
65031
|
-
|
|
65032
|
+
queue.push({ kind: "app", folder: appFolder, rawApp });
|
|
65033
|
+
}
|
|
65034
|
+
}
|
|
65035
|
+
let parallelism = Number(opts.parallel ?? 1);
|
|
65036
|
+
if (!Number.isFinite(parallelism) || parallelism <= 0)
|
|
65037
|
+
parallelism = 1;
|
|
65038
|
+
if (parallelism > 1) {
|
|
65039
|
+
info(`Parallelizing ${parallelism} items at a time`);
|
|
65040
|
+
}
|
|
65041
|
+
await beginLockfileBatch();
|
|
65042
|
+
try {
|
|
65043
|
+
const pool = new Set;
|
|
65044
|
+
while (queue.length > 0 || pool.size > 0) {
|
|
65045
|
+
while (pool.size < parallelism && queue.length > 0) {
|
|
65046
|
+
const task = queue.shift();
|
|
65047
|
+
const p = (async () => {
|
|
65048
|
+
try {
|
|
65049
|
+
if (task.kind === "script") {
|
|
65050
|
+
await generateScriptMetadataInternal(task.scriptPath, stubWorkspace, rehashOpts, false, true, {}, codebases, false);
|
|
65051
|
+
counts.scripts++;
|
|
65052
|
+
} else if (task.kind === "flow") {
|
|
65053
|
+
await generateFlowLockInternal(task.folder, false, stubWorkspace, rehashOpts, false, true);
|
|
65054
|
+
counts.flows++;
|
|
65055
|
+
} else {
|
|
65056
|
+
await generateAppLocksInternal(task.folder, task.rawApp, false, stubWorkspace, rehashOpts, false, true);
|
|
65057
|
+
counts.apps++;
|
|
65058
|
+
}
|
|
65059
|
+
} catch (err) {
|
|
65060
|
+
const label = task.kind === "script" ? task.scriptPath : task.folder;
|
|
65061
|
+
warn(`Skipping ${label}: ${err instanceof Error ? err.message : err}`);
|
|
65062
|
+
}
|
|
65063
|
+
})();
|
|
65064
|
+
pool.add(p);
|
|
65065
|
+
p.then(() => pool.delete(p));
|
|
65066
|
+
}
|
|
65067
|
+
if (pool.size > 0) {
|
|
65068
|
+
await Promise.race(pool);
|
|
65032
65069
|
}
|
|
65033
65070
|
}
|
|
65071
|
+
} finally {
|
|
65072
|
+
await flushLockfileBatch();
|
|
65034
65073
|
}
|
|
65035
65074
|
if (counts.scripts + counts.flows + counts.apps > 0 || !rehashFilter?.missingOnly) {
|
|
65036
65075
|
info(`Rehashed ${colors.bold(String(counts.scripts))} script(s), ` + `${colors.bold(String(counts.flows))} flow(s), ` + `${colors.bold(String(counts.apps))} app(s) from disk.`);
|
|
@@ -65193,47 +65232,75 @@ async function generateMetadata2(opts, folder) {
|
|
|
65193
65232
|
return colors.dim(colors.white(`[${n}/${total}]`.padEnd(maxWidth, " ")));
|
|
65194
65233
|
};
|
|
65195
65234
|
const errors = [];
|
|
65196
|
-
|
|
65197
|
-
|
|
65198
|
-
|
|
65199
|
-
|
|
65200
|
-
|
|
65201
|
-
|
|
65202
|
-
|
|
65203
|
-
|
|
65204
|
-
|
|
65205
|
-
}
|
|
65206
|
-
|
|
65207
|
-
|
|
65208
|
-
|
|
65209
|
-
|
|
65210
|
-
|
|
65211
|
-
|
|
65212
|
-
|
|
65213
|
-
|
|
65214
|
-
|
|
65215
|
-
|
|
65216
|
-
|
|
65217
|
-
|
|
65218
|
-
|
|
65219
|
-
|
|
65220
|
-
|
|
65221
|
-
|
|
65222
|
-
|
|
65223
|
-
|
|
65224
|
-
|
|
65225
|
-
|
|
65226
|
-
|
|
65227
|
-
|
|
65228
|
-
|
|
65229
|
-
|
|
65230
|
-
|
|
65231
|
-
|
|
65232
|
-
|
|
65235
|
+
let parallelism = Number(opts.parallel ?? 1);
|
|
65236
|
+
if (!Number.isFinite(parallelism) || parallelism <= 0)
|
|
65237
|
+
parallelism = 1;
|
|
65238
|
+
if (parallelism > 1) {
|
|
65239
|
+
info(`Parallelizing ${parallelism} items at a time`);
|
|
65240
|
+
}
|
|
65241
|
+
const queue = [
|
|
65242
|
+
...scripts.map((item) => ({ kind: "script", item })),
|
|
65243
|
+
...flows.map((item) => ({ kind: "flow", item })),
|
|
65244
|
+
...apps2.map((item) => ({ kind: "app", item }))
|
|
65245
|
+
];
|
|
65246
|
+
await beginLockfileBatch();
|
|
65247
|
+
try {
|
|
65248
|
+
const pool = new Set;
|
|
65249
|
+
while (queue.length > 0 || pool.size > 0) {
|
|
65250
|
+
while (pool.size < parallelism && queue.length > 0) {
|
|
65251
|
+
const task = queue.shift();
|
|
65252
|
+
const taskNumber = ++current;
|
|
65253
|
+
const p = (async () => {
|
|
65254
|
+
if (task.kind === "script") {
|
|
65255
|
+
const item = task.item;
|
|
65256
|
+
info(`${formatProgress(taskNumber)} script ${item.path}`);
|
|
65257
|
+
try {
|
|
65258
|
+
await generateScriptMetadataInternal(item.path, workspace, opts, false, true, mismatchedWorkspaceDeps, codebases, false, tree);
|
|
65259
|
+
} catch (e) {
|
|
65260
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
65261
|
+
errors.push({ path: item.path, error: msg });
|
|
65262
|
+
error(` Failed: ${msg}`);
|
|
65263
|
+
}
|
|
65264
|
+
} else if (task.kind === "flow") {
|
|
65265
|
+
const item = task.item;
|
|
65266
|
+
try {
|
|
65267
|
+
const result = await generateFlowLockInternal(item.folder.replaceAll("/", SEP8), false, workspace, opts, false, true, tree);
|
|
65268
|
+
const flowResult = result;
|
|
65269
|
+
const scriptsInfo = flowResult?.updatedScripts?.length ? colors.dim(colors.white(`: ${flowResult.updatedScripts.join(", ")}`)) : "";
|
|
65270
|
+
info(`${formatProgress(taskNumber)} flow ${item.path}${scriptsInfo}`);
|
|
65271
|
+
} catch (e) {
|
|
65272
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
65273
|
+
errors.push({ path: item.path, error: msg });
|
|
65274
|
+
info(`${formatProgress(taskNumber)} flow ${item.path}`);
|
|
65275
|
+
error(` Failed: ${msg}`);
|
|
65276
|
+
}
|
|
65277
|
+
} else {
|
|
65278
|
+
const item = task.item;
|
|
65279
|
+
try {
|
|
65280
|
+
const result = await generateAppLocksInternal(item.folder.replaceAll("/", SEP8), item.isRawApp, false, workspace, opts, false, true, tree);
|
|
65281
|
+
const appResult = result;
|
|
65282
|
+
const scriptsInfo = appResult?.updatedScripts?.length ? colors.dim(colors.white(`: ${appResult.updatedScripts.join(", ")}`)) : "";
|
|
65283
|
+
info(`${formatProgress(taskNumber)} app ${item.path}${scriptsInfo}`);
|
|
65284
|
+
} catch (e) {
|
|
65285
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
65286
|
+
errors.push({ path: item.path, error: msg });
|
|
65287
|
+
info(`${formatProgress(taskNumber)} app ${item.path}`);
|
|
65288
|
+
error(` Failed: ${msg}`);
|
|
65289
|
+
}
|
|
65290
|
+
}
|
|
65291
|
+
})();
|
|
65292
|
+
pool.add(p);
|
|
65293
|
+
p.then(() => pool.delete(p));
|
|
65294
|
+
}
|
|
65295
|
+
if (pool.size > 0) {
|
|
65296
|
+
await Promise.race(pool);
|
|
65297
|
+
}
|
|
65233
65298
|
}
|
|
65299
|
+
const allStaleDeps = staleItems.filter((i) => i.type === "dependencies");
|
|
65300
|
+
await tree.persistDepsHashes(allStaleDeps.map((d) => d.path));
|
|
65301
|
+
} finally {
|
|
65302
|
+
await flushLockfileBatch();
|
|
65234
65303
|
}
|
|
65235
|
-
const allStaleDeps = staleItems.filter((i) => i.type === "dependencies");
|
|
65236
|
-
await tree.persistDepsHashes(allStaleDeps.map((d) => d.path));
|
|
65237
65304
|
const succeeded = total - errors.length;
|
|
65238
65305
|
info("");
|
|
65239
65306
|
if (errors.length > 0) {
|
|
@@ -65275,7 +65342,7 @@ var init_generate_metadata = __esm(async () => {
|
|
|
65275
65342
|
init_codebase(),
|
|
65276
65343
|
init_dependency_tree()
|
|
65277
65344
|
]);
|
|
65278
|
-
command7 = new Command().description("Generate metadata (locks, schemas) for all scripts, flows, and apps").arguments("[folder:string]").option("--yes", "Skip confirmation prompt").option("--dry-run", "Show what would be updated without making changes").option("--lock-only", "Re-generate only the lock files").option("--schema-only", "Re-generate only script schemas (skips flows and apps)").option("--skip-scripts", "Skip processing scripts").option("--skip-flows", "Skip processing flows").option("--skip-apps", "Skip processing apps").option("--strict-folder-boundaries", "Only update items inside the specified folder (requires folder argument)").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which files to include").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which files to exclude").action(generateMetadata2).command("rehash", new Command().description("Trust on-disk content; rewrite wmill-lock.yaml hashes without backend " + "trips or yaml/lock rewrites. Useful for bootstrapping missing lockfile " + "entries or recovering from older-CLI hash drift.").arguments("[folder:string]").option("--skip-scripts", "Skip processing scripts").option("--skip-flows", "Skip processing flows").option("--skip-apps", "Skip processing apps").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which files to include").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which files to exclude").action(rehashCommand));
|
|
65345
|
+
command7 = new Command().description("Generate metadata (locks, schemas) for all scripts, flows, and apps").arguments("[folder:string]").option("--yes", "Skip confirmation prompt").option("--dry-run", "Show what would be updated without making changes").option("--lock-only", "Re-generate only the lock files").option("--schema-only", "Re-generate only script schemas (skips flows and apps)").option("--skip-scripts", "Skip processing scripts").option("--skip-flows", "Skip processing flows").option("--skip-apps", "Skip processing apps").option("--strict-folder-boundaries", "Only update items inside the specified folder (requires folder argument)").option("--parallel <n:number>", "Number of items to process in parallel").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which files to include").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which files to exclude").action(generateMetadata2).command("rehash", new Command().description("Trust on-disk content; rewrite wmill-lock.yaml hashes without backend " + "trips or yaml/lock rewrites. Useful for bootstrapping missing lockfile " + "entries or recovering from older-CLI hash drift.").arguments("[folder:string]").option("--skip-scripts", "Skip processing scripts").option("--skip-flows", "Skip processing flows").option("--skip-apps", "Skip processing apps").option("--parallel <n:number>", "Number of items to process in parallel").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which files to include").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which files to exclude").action(rehashCommand));
|
|
65279
65346
|
generate_metadata_default = command7;
|
|
65280
65347
|
});
|
|
65281
65348
|
|
|
@@ -68951,7 +69018,20 @@ function normalizeLockPath(p) {
|
|
|
68951
69018
|
n = n.slice(2);
|
|
68952
69019
|
return n;
|
|
68953
69020
|
}
|
|
69021
|
+
async function beginLockfileBatch() {
|
|
69022
|
+
if (inMemoryLock)
|
|
69023
|
+
return;
|
|
69024
|
+
inMemoryLock = await readLockfile();
|
|
69025
|
+
}
|
|
69026
|
+
async function flushLockfileBatch() {
|
|
69027
|
+
if (!inMemoryLock)
|
|
69028
|
+
return;
|
|
69029
|
+
await writeFile8(WMILL_LOCKFILE, import_yaml13.stringify(inMemoryLock, yamlOptions), "utf-8");
|
|
69030
|
+
inMemoryLock = null;
|
|
69031
|
+
}
|
|
68954
69032
|
async function readLockfile() {
|
|
69033
|
+
if (inMemoryLock)
|
|
69034
|
+
return inMemoryLock;
|
|
68955
69035
|
let parsed;
|
|
68956
69036
|
try {
|
|
68957
69037
|
parsed = await yamlParseFile(WMILL_LOCKFILE);
|
|
@@ -69044,7 +69124,9 @@ async function clearGlobalLock(path13) {
|
|
|
69044
69124
|
}
|
|
69045
69125
|
});
|
|
69046
69126
|
}
|
|
69047
|
-
|
|
69127
|
+
if (!inMemoryLock) {
|
|
69128
|
+
await writeFile8(WMILL_LOCKFILE, import_yaml13.stringify(conf, yamlOptions), "utf-8");
|
|
69129
|
+
}
|
|
69048
69130
|
}
|
|
69049
69131
|
}
|
|
69050
69132
|
async function updateMetadataGlobalLock(path13, hash2, subpath) {
|
|
@@ -69067,9 +69149,11 @@ async function updateMetadataGlobalLock(path13, hash2, subpath) {
|
|
|
69067
69149
|
conf.locks[path13] = hash2;
|
|
69068
69150
|
}
|
|
69069
69151
|
}
|
|
69070
|
-
|
|
69152
|
+
if (!inMemoryLock) {
|
|
69153
|
+
await writeFile8(WMILL_LOCKFILE, import_yaml13.stringify(conf, yamlOptions), "utf-8");
|
|
69154
|
+
}
|
|
69071
69155
|
}
|
|
69072
|
-
var import_yaml13, _require, _parserCache, LockfileGenerationError, UnknownLockVersionError, MalformedLockfileError, LANG_ANNOTATION_CONFIG, lockCache, WMILL_LOCKFILE = "wmill-lock.yaml", CURRENT_LOCK_VERSION = "v2", KNOWN_LOCK_VERSIONS, SCRIPT_TOP_HASH = "__script_hash";
|
|
69156
|
+
var import_yaml13, _require, _parserCache, LockfileGenerationError, UnknownLockVersionError, MalformedLockfileError, LANG_ANNOTATION_CONFIG, lockCache, WMILL_LOCKFILE = "wmill-lock.yaml", CURRENT_LOCK_VERSION = "v2", KNOWN_LOCK_VERSIONS, SCRIPT_TOP_HASH = "__script_hash", inMemoryLock = null;
|
|
69073
69157
|
var init_metadata = __esm(async () => {
|
|
69074
69158
|
init_colors2();
|
|
69075
69159
|
init_log();
|
|
@@ -70967,12 +71051,15 @@ async function getJobStatus(workspace, jobId) {
|
|
|
70967
71051
|
}
|
|
70968
71052
|
async function streamJobWithSSE(workspace, jobId, reqId, ws, baseUrl2, token) {
|
|
70969
71053
|
const sseUrl = `${baseUrl2}api/w/${workspace}/jobs_u/getupdate_sse/${jobId}?fast=true`;
|
|
71054
|
+
const extraHeaders = getHeaders2();
|
|
70970
71055
|
const response = await fetch(sseUrl, {
|
|
70971
71056
|
headers: {
|
|
70972
71057
|
Accept: "text/event-stream",
|
|
70973
|
-
Authorization: `Bearer ${token}
|
|
71058
|
+
Authorization: `Bearer ${token}`,
|
|
71059
|
+
...extraHeaders
|
|
70974
71060
|
}
|
|
70975
71061
|
});
|
|
71062
|
+
await detectAuthGatewayChallenge(response, sseUrl);
|
|
70976
71063
|
if (!response.ok) {
|
|
70977
71064
|
throw new Error(`SSE request failed: ${response.status} ${response.statusText}`);
|
|
70978
71065
|
}
|
|
@@ -71331,6 +71418,7 @@ var init_dev = __esm(async () => {
|
|
|
71331
71418
|
init_get_port();
|
|
71332
71419
|
init_port_probe();
|
|
71333
71420
|
init_open();
|
|
71421
|
+
init_http_guards();
|
|
71334
71422
|
init_wrapper();
|
|
71335
71423
|
init_services_gen();
|
|
71336
71424
|
init_job_polling();
|
|
@@ -72091,7 +72179,7 @@ var init_new = __esm(async () => {
|
|
|
72091
72179
|
"/index.css": indexCss,
|
|
72092
72180
|
"/package.json": `{
|
|
72093
72181
|
"dependencies": {
|
|
72094
|
-
"svelte": "5.
|
|
72182
|
+
"svelte": "^5.55.5",
|
|
72095
72183
|
"windmill-client": "^1"
|
|
72096
72184
|
}
|
|
72097
72185
|
}`
|
|
@@ -86103,6 +86191,7 @@ Generate metadata (locks, schemas) for all scripts, flows, and apps
|
|
|
86103
86191
|
- \`--skip-flows\` - Skip processing flows
|
|
86104
86192
|
- \`--skip-apps\` - Skip processing apps
|
|
86105
86193
|
- \`--strict-folder-boundaries\` - Only update items inside the specified folder (requires folder argument)
|
|
86194
|
+
- \`--parallel <n:number>\` - Number of items to process in parallel
|
|
86106
86195
|
- \`-i --includes <patterns:file[]>\` - Comma separated patterns to specify which files to include
|
|
86107
86196
|
- \`-e --excludes <patterns:file[]>\` - Comma separated patterns to specify which files to exclude
|
|
86108
86197
|
|
|
@@ -86112,6 +86201,7 @@ Generate metadata (locks, schemas) for all scripts, flows, and apps
|
|
|
86112
86201
|
- \`--skip-scripts\` - Skip processing scripts
|
|
86113
86202
|
- \`--skip-flows\` - Skip processing flows
|
|
86114
86203
|
- \`--skip-apps\` - Skip processing apps
|
|
86204
|
+
- \`--parallel <n:number>\` - Number of items to process in parallel
|
|
86115
86205
|
- \`-i --includes <patterns:file[]>\` - Comma separated patterns to specify which files to include
|
|
86116
86206
|
- \`-e --excludes <patterns:file[]>\` - Comma separated patterns to specify which files to exclude
|
|
86117
86207
|
|
|
@@ -89329,9 +89419,11 @@ await init_generate_metadata();
|
|
|
89329
89419
|
init_mod3();
|
|
89330
89420
|
init_colors2();
|
|
89331
89421
|
init_log();
|
|
89422
|
+
init_http_guards();
|
|
89332
89423
|
await __promiseAll([
|
|
89333
89424
|
init_auth(),
|
|
89334
|
-
init_context()
|
|
89425
|
+
init_context(),
|
|
89426
|
+
init_utils()
|
|
89335
89427
|
]);
|
|
89336
89428
|
async function docs(opts, query) {
|
|
89337
89429
|
await requireLogin(opts);
|
|
@@ -89340,19 +89432,22 @@ async function docs(opts, query) {
|
|
|
89340
89432
|
console.log(colors.bold(`
|
|
89341
89433
|
Searching Windmill docs...
|
|
89342
89434
|
`));
|
|
89435
|
+
const extraHeaders = getHeaders2();
|
|
89343
89436
|
let res;
|
|
89344
89437
|
try {
|
|
89345
89438
|
res = await fetch(url, {
|
|
89346
89439
|
method: "POST",
|
|
89347
89440
|
headers: {
|
|
89348
89441
|
"Content-Type": "application/json",
|
|
89349
|
-
Authorization: `Bearer ${workspace.token}
|
|
89442
|
+
Authorization: `Bearer ${workspace.token}`,
|
|
89443
|
+
...extraHeaders
|
|
89350
89444
|
},
|
|
89351
89445
|
body: JSON.stringify({ query })
|
|
89352
89446
|
});
|
|
89353
89447
|
} catch (e) {
|
|
89354
89448
|
throw new Error(`Network error connecting to ${workspace.remote}: ${e}`);
|
|
89355
89449
|
}
|
|
89450
|
+
await detectAuthGatewayChallenge(res, url);
|
|
89356
89451
|
if (res.status === 403) {
|
|
89357
89452
|
info("Windmill documentation search is an Enterprise Edition feature. Please upgrade to use this command.");
|
|
89358
89453
|
return;
|
|
@@ -89471,7 +89566,7 @@ var config_default = command35;
|
|
|
89471
89566
|
|
|
89472
89567
|
// src/main.ts
|
|
89473
89568
|
await init_context();
|
|
89474
|
-
var VERSION = "1.
|
|
89569
|
+
var VERSION = "1.699.0";
|
|
89475
89570
|
async function checkVersionSafe(cmd) {
|
|
89476
89571
|
const mainCommand = cmd.getMainCommand();
|
|
89477
89572
|
const upgradeCommand = mainCommand.getCommand("upgrade");
|