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