windmill-cli 1.673.0 → 1.674.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.
Files changed (2) hide show
  1. package/esm/main.js +204 -96
  2. package/package.json +1 -1
package/esm/main.js CHANGED
@@ -11812,7 +11812,7 @@ var init_OpenAPI = __esm(() => {
11812
11812
  PASSWORD: undefined,
11813
11813
  TOKEN: getEnv2("WM_TOKEN"),
11814
11814
  USERNAME: undefined,
11815
- VERSION: "1.673.0",
11815
+ VERSION: "1.674.1",
11816
11816
  WITH_CREDENTIALS: true,
11817
11817
  interceptors: {
11818
11818
  request: new Interceptors,
@@ -12139,6 +12139,7 @@ __export(exports_services_gen, {
12139
12139
  testKafkaConnection: () => testKafkaConnection,
12140
12140
  testGcpConnection: () => testGcpConnection,
12141
12141
  testCriticalChannels: () => testCriticalChannels,
12142
+ testAzureKvBackend: () => testAzureKvBackend,
12142
12143
  syncNativeTriggers: () => syncNativeTriggers,
12143
12144
  submitOnboardingData: () => submitOnboardingData,
12144
12145
  storeRawScriptTemp: () => storeRawScriptTemp,
@@ -12247,6 +12248,8 @@ __export(exports_services_gen, {
12247
12248
  moveCapturesAndConfigs: () => moveCapturesAndConfigs,
12248
12249
  migrateSecretsToVault: () => migrateSecretsToVault,
12249
12250
  migrateSecretsToDatabase: () => migrateSecretsToDatabase,
12251
+ migrateSecretsToAzureKv: () => migrateSecretsToAzureKv,
12252
+ migrateSecretsFromAzureKv: () => migrateSecretsFromAzureKv,
12250
12253
  mcpOauthCallback: () => mcpOauthCallback,
12251
12254
  logout: () => logout,
12252
12255
  loginWithOauth: () => loginWithOauth,
@@ -12359,7 +12362,9 @@ __export(exports_services_gen, {
12359
12362
  listAssets: () => listAssets,
12360
12363
  listApps: () => listApps,
12361
12364
  listAppPathsFromWorkspaceRunnable: () => listAppPathsFromWorkspaceRunnable,
12365
+ listAllWorkspaceDependencies: () => listAllWorkspaceDependencies,
12362
12366
  listAllTgoogleTopicSubscriptions: () => listAllTgoogleTopicSubscriptions,
12367
+ listAllDedicatedWithDeps: () => listAllDedicatedWithDeps,
12363
12368
  leaveWorkspace: () => leaveWorkspace,
12364
12369
  leaveInstance: () => leaveInstance,
12365
12370
  isValidPostgresConfiguration: () => isValidPostgresConfiguration,
@@ -13258,6 +13263,27 @@ var backendVersion = () => {
13258
13263
  body: data2.requestBody,
13259
13264
  mediaType: "application/json"
13260
13265
  });
13266
+ }, testAzureKvBackend = (data2) => {
13267
+ return request(OpenAPI, {
13268
+ method: "POST",
13269
+ url: "/settings/test_azure_kv_backend",
13270
+ body: data2.requestBody,
13271
+ mediaType: "application/json"
13272
+ });
13273
+ }, migrateSecretsToAzureKv = (data2) => {
13274
+ return request(OpenAPI, {
13275
+ method: "POST",
13276
+ url: "/settings/migrate_secrets_to_azure_kv",
13277
+ body: data2.requestBody,
13278
+ mediaType: "application/json"
13279
+ });
13280
+ }, migrateSecretsFromAzureKv = (data2) => {
13281
+ return request(OpenAPI, {
13282
+ method: "POST",
13283
+ url: "/settings/migrate_secrets_from_azure_kv",
13284
+ body: data2.requestBody,
13285
+ mediaType: "application/json"
13286
+ });
13261
13287
  }, getCurrentEmail = () => {
13262
13288
  return request(OpenAPI, {
13263
13289
  method: "GET",
@@ -14239,7 +14265,8 @@ var backendVersion = () => {
14239
14265
  value: data2.value,
14240
14266
  broad_filter: data2.broadFilter,
14241
14267
  page: data2.page,
14242
- per_page: data2.perPage
14268
+ per_page: data2.perPage,
14269
+ label: data2.label
14243
14270
  }
14244
14271
  });
14245
14272
  }, listContextualVariables = (data2) => {
@@ -14626,7 +14653,8 @@ var backendVersion = () => {
14626
14653
  path: data2.path,
14627
14654
  description: data2.description,
14628
14655
  value: data2.value,
14629
- broad_filter: data2.broadFilter
14656
+ broad_filter: data2.broadFilter,
14657
+ label: data2.label
14630
14658
  }
14631
14659
  });
14632
14660
  }, listSearchResource = (data2) => {
@@ -14910,7 +14938,8 @@ var backendVersion = () => {
14910
14938
  with_deployment_msg: data2.withDeploymentMsg,
14911
14939
  languages: data2.languages,
14912
14940
  without_description: data2.withoutDescription,
14913
- dedicated_worker: data2.dedicatedWorker
14941
+ dedicated_worker: data2.dedicatedWorker,
14942
+ label: data2.label
14914
14943
  }
14915
14944
  });
14916
14945
  }, listScriptPaths = (data2) => {
@@ -15580,7 +15609,8 @@ var backendVersion = () => {
15580
15609
  include_draft_only: data2.includeDraftOnly,
15581
15610
  with_deployment_msg: data2.withDeploymentMsg,
15582
15611
  without_description: data2.withoutDescription,
15583
- dedicated_worker: data2.dedicatedWorker
15612
+ dedicated_worker: data2.dedicatedWorker,
15613
+ label: data2.label
15584
15614
  }
15585
15615
  });
15586
15616
  }, getFlowHistory = (data2) => {
@@ -15796,7 +15826,8 @@ var backendVersion = () => {
15796
15826
  created_by: data2.createdBy,
15797
15827
  path_start: data2.pathStart,
15798
15828
  path_exact: data2.pathExact,
15799
- starred_only: data2.starredOnly
15829
+ starred_only: data2.starredOnly,
15830
+ label: data2.label
15800
15831
  }
15801
15832
  });
15802
15833
  }, getRawAppData = (data2) => {
@@ -15832,7 +15863,8 @@ var backendVersion = () => {
15832
15863
  path_exact: data2.pathExact,
15833
15864
  starred_only: data2.starredOnly,
15834
15865
  include_draft_only: data2.includeDraftOnly,
15835
- with_deployment_msg: data2.withDeploymentMsg
15866
+ with_deployment_msg: data2.withDeploymentMsg,
15867
+ label: data2.label
15836
15868
  }
15837
15869
  });
15838
15870
  }, createApp = (data2) => {
@@ -17117,7 +17149,8 @@ var backendVersion = () => {
17117
17149
  schedule_path: data2.schedulePath,
17118
17150
  description: data2.description,
17119
17151
  summary: data2.summary,
17120
- broad_filter: data2.broadFilter
17152
+ broad_filter: data2.broadFilter,
17153
+ label: data2.label
17121
17154
  }
17122
17155
  });
17123
17156
  }, listSchedulesWithJobs = (data2) => {
@@ -17223,7 +17256,8 @@ var backendVersion = () => {
17223
17256
  per_page: data2.perPage,
17224
17257
  path: data2.path,
17225
17258
  is_flow: data2.isFlow,
17226
- path_start: data2.pathStart
17259
+ path_start: data2.pathStart,
17260
+ label: data2.label
17227
17261
  }
17228
17262
  });
17229
17263
  }, existsHttpTrigger = (data2) => {
@@ -17307,7 +17341,8 @@ var backendVersion = () => {
17307
17341
  per_page: data2.perPage,
17308
17342
  path: data2.path,
17309
17343
  is_flow: data2.isFlow,
17310
- path_start: data2.pathStart
17344
+ path_start: data2.pathStart,
17345
+ label: data2.label
17311
17346
  }
17312
17347
  });
17313
17348
  }, existsWebsocketTrigger = (data2) => {
@@ -17391,7 +17426,8 @@ var backendVersion = () => {
17391
17426
  per_page: data2.perPage,
17392
17427
  path: data2.path,
17393
17428
  is_flow: data2.isFlow,
17394
- path_start: data2.pathStart
17429
+ path_start: data2.pathStart,
17430
+ label: data2.label
17395
17431
  }
17396
17432
  });
17397
17433
  }, existsKafkaTrigger = (data2) => {
@@ -17495,7 +17531,8 @@ var backendVersion = () => {
17495
17531
  per_page: data2.perPage,
17496
17532
  path: data2.path,
17497
17533
  is_flow: data2.isFlow,
17498
- path_start: data2.pathStart
17534
+ path_start: data2.pathStart,
17535
+ label: data2.label
17499
17536
  }
17500
17537
  });
17501
17538
  }, existsNatsTrigger = (data2) => {
@@ -17579,7 +17616,8 @@ var backendVersion = () => {
17579
17616
  per_page: data2.perPage,
17580
17617
  path: data2.path,
17581
17618
  is_flow: data2.isFlow,
17582
- path_start: data2.pathStart
17619
+ path_start: data2.pathStart,
17620
+ label: data2.label
17583
17621
  }
17584
17622
  });
17585
17623
  }, existsSqsTrigger = (data2) => {
@@ -17746,7 +17784,8 @@ var backendVersion = () => {
17746
17784
  page: data2.page,
17747
17785
  per_page: data2.perPage,
17748
17786
  path: data2.path,
17749
- is_flow: data2.isFlow
17787
+ is_flow: data2.isFlow,
17788
+ label: data2.label
17750
17789
  }
17751
17790
  });
17752
17791
  }, existsNativeTrigger = (data2) => {
@@ -17869,7 +17908,8 @@ var backendVersion = () => {
17869
17908
  per_page: data2.perPage,
17870
17909
  path: data2.path,
17871
17910
  is_flow: data2.isFlow,
17872
- path_start: data2.pathStart
17911
+ path_start: data2.pathStart,
17912
+ label: data2.label
17873
17913
  }
17874
17914
  });
17875
17915
  }, existsMqttTrigger = (data2) => {
@@ -17953,7 +17993,8 @@ var backendVersion = () => {
17953
17993
  per_page: data2.perPage,
17954
17994
  path: data2.path,
17955
17995
  is_flow: data2.isFlow,
17956
- path_start: data2.pathStart
17996
+ path_start: data2.pathStart,
17997
+ label: data2.label
17957
17998
  }
17958
17999
  });
17959
18000
  }, existsGcpTrigger = (data2) => {
@@ -18189,7 +18230,8 @@ var backendVersion = () => {
18189
18230
  per_page: data2.perPage,
18190
18231
  path: data2.path,
18191
18232
  is_flow: data2.isFlow,
18192
- path_start: data2.pathStart
18233
+ path_start: data2.pathStart,
18234
+ label: data2.label
18193
18235
  }
18194
18236
  });
18195
18237
  }, existsPostgresTrigger = (data2) => {
@@ -18273,7 +18315,8 @@ var backendVersion = () => {
18273
18315
  per_page: data2.perPage,
18274
18316
  path: data2.path,
18275
18317
  is_flow: data2.isFlow,
18276
- path_start: data2.pathStart
18318
+ path_start: data2.pathStart,
18319
+ label: data2.label
18277
18320
  }
18278
18321
  });
18279
18322
  }, existsEmailTrigger = (data2) => {
@@ -18688,6 +18731,16 @@ var backendVersion = () => {
18688
18731
  method: "GET",
18689
18732
  url: "/configs/list_available_python_versions"
18690
18733
  });
18734
+ }, listAllWorkspaceDependencies = () => {
18735
+ return request(OpenAPI, {
18736
+ method: "GET",
18737
+ url: "/configs/list_all_workspace_dependencies"
18738
+ });
18739
+ }, listAllDedicatedWithDeps = () => {
18740
+ return request(OpenAPI, {
18741
+ method: "GET",
18742
+ url: "/configs/list_all_dedicated_with_deps"
18743
+ });
18691
18744
  }, createAgentToken = (data2) => {
18692
18745
  return request(OpenAPI, {
18693
18746
  method: "POST",
@@ -59226,6 +59279,12 @@ function isAppInlineScriptPath2(filePath) {
59226
59279
  function isFlowInlineScriptPath2(filePath) {
59227
59280
  return isFlowInlineScriptPath(filePath);
59228
59281
  }
59282
+ async function computePushMetadataHash(filePath, content) {
59283
+ const remotePath = removeExtensionToPath(filePath).replaceAll(SEP4, "/");
59284
+ const metadataWithType = await parseMetadataFile(remotePath, undefined);
59285
+ const metadataContent = await readFile5(metadataWithType.path, "utf-8");
59286
+ return await generateScriptHash({}, content, metadataContent);
59287
+ }
59229
59288
  async function push(opts, filePath) {
59230
59289
  opts = await mergeConfigWithConfigFile(opts);
59231
59290
  const workspace = await resolveWorkspace(opts);
@@ -59243,7 +59302,7 @@ async function push(opts, filePath) {
59243
59302
  try {
59244
59303
  const content = await readFile5(filePath, "utf-8");
59245
59304
  const remotePath = removeExtensionToPath(filePath).replaceAll(SEP4, "/");
59246
- const contentHash = await generateHash(content + remotePath);
59305
+ const contentHash = await computePushMetadataHash(filePath, content);
59247
59306
  const conf = await readLockfile();
59248
59307
  const hasLockEntry = conf.locks && (conf.locks[remotePath] !== undefined || conf.locks[`${remotePath}.ts`] !== undefined);
59249
59308
  if (!hasLockEntry) {
@@ -59435,7 +59494,8 @@ async function handleFile(path6, workspace, alreadySynced, message, opts, rawWor
59435
59494
  timeout: typed?.timeout,
59436
59495
  on_behalf_of_email: typed?.on_behalf_of_email,
59437
59496
  envs: typed?.envs,
59438
- modules
59497
+ modules,
59498
+ labels: typed?.labels
59439
59499
  };
59440
59500
  if (remote) {
59441
59501
  if (content === remote.content) {
@@ -59914,7 +59974,7 @@ async function bootstrap(opts, scriptPath, language) {
59914
59974
  }
59915
59975
  async function generateMetadata(opts, scriptPath) {
59916
59976
  warn(colors.yellow('This command is deprecated. Use "wmill generate-metadata" instead.'));
59917
- info("This command only works for workspace scripts, for flows inline scripts use `wmill flow generate-locks`");
59977
+ info("This command only works for workspace scripts. For flows or apps, run `wmill generate-metadata` from the affected folder.");
59918
59978
  if (scriptPath == "") {
59919
59979
  scriptPath = undefined;
59920
59980
  }
@@ -60214,7 +60274,7 @@ var init_script = __esm(async () => {
60214
60274
  languageAliases = {
60215
60275
  python: "python3"
60216
60276
  };
60217
- command3 = new Command().description("script related commands").option("--show-archived", "Show archived scripts instead of active ones").option("--json", "Output as JSON (for piping to jq)").action(list3).command("list", "list all scripts").option("--show-archived", "Show archived scripts instead of active ones").option("--json", "Output as JSON (for piping to jq)").action(list3).command("push", "push a local script spec. This overrides any remote versions. Use the script file (.ts, .js, .py, .sh)").arguments("<path:file>").option("--message <message:string>", "Deployment message").action(push).command("get", "get a script's details").arguments("<path:file>").option("--json", "Output as JSON (for piping to jq)").action(get).command("show", "show a script's content (alias for get)").arguments("<path:file>").action(show).command("run", "run a script by path").arguments("<path:file>").option("-d --data <data:file>", "Inputs specified as a JSON string or a file using @<filename> or stdin using @-.").option("-s --silent", "Do not output anything other then the final output. Useful for scripting.").action(run2).command("preview", "preview a local script without deploying it. Supports both regular and codebase scripts.").arguments("<path:file>").option("-d --data <data:file>", "Inputs specified as a JSON string or a file using @<filename> or stdin using @-.").option("-s --silent", "Do not output anything other than the final output. Useful for scripting.").action(preview).command("new", "create a new script").arguments("<path:file> <language:string>").option("--summary <summary:string>", "script summary").option("--description <description:string>", "script description").action(bootstrap).command("bootstrap", "create a new script (alias for new)").arguments("<path:file> <language:string>").option("--summary <summary:string>", "script summary").option("--description <description:string>", "script description").action(bootstrap).command("generate-metadata", "re-generate the metadata file updating the lock and the script schema (for flows, use `wmill flow generate-locks`)").arguments("[script:file]").option("--yes", "Skip confirmation prompt").option("--dry-run", "Perform a dry run without making changes").option("--lock-only", "re-generate only the lock").option("--schema-only", "re-generate only script schema").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account.").action(generateMetadata).command("history", "show version history for a script").arguments("<path:string>").option("--json", "Output as JSON (for piping to jq)").action(history);
60277
+ command3 = new Command().description("script related commands").option("--show-archived", "Show archived scripts instead of active ones").option("--json", "Output as JSON (for piping to jq)").action(list3).command("list", "list all scripts").option("--show-archived", "Show archived scripts instead of active ones").option("--json", "Output as JSON (for piping to jq)").action(list3).command("push", "push a local script spec. This overrides any remote versions. Use the script file (.ts, .js, .py, .sh)").arguments("<path:file>").option("--message <message:string>", "Deployment message").action(push).command("get", "get a script's details").arguments("<path:file>").option("--json", "Output as JSON (for piping to jq)").action(get).command("show", "show a script's content (alias for get)").arguments("<path:file>").action(show).command("run", "run a script by path").arguments("<path:file>").option("-d --data <data:file>", "Inputs specified as a JSON string or a file using @<filename> or stdin using @-.").option("-s --silent", "Do not output anything other then the final output. Useful for scripting.").action(run2).command("preview", "preview a local script without deploying it. Supports both regular and codebase scripts.").arguments("<path:file>").option("-d --data <data:file>", "Inputs specified as a JSON string or a file using @<filename> or stdin using @-.").option("-s --silent", "Do not output anything other than the final output. Useful for scripting.").action(preview).command("new", "create a new script").arguments("<path:file> <language:string>").option("--summary <summary:string>", "script summary").option("--description <description:string>", "script description").action(bootstrap).command("bootstrap", "create a new script (alias for new)").arguments("<path:file> <language:string>").option("--summary <summary:string>", "script summary").option("--description <description:string>", "script description").action(bootstrap).command("generate-metadata", 'DEPRECATED: re-generate script metadata. Use top-level "wmill generate-metadata" instead.').arguments("[script:file]").option("--yes", "Skip confirmation prompt").option("--dry-run", "Perform a dry run without making changes").option("--lock-only", "re-generate only the lock").option("--schema-only", "re-generate only script schema").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account.").action(generateMetadata).command("history", "show version history for a script").arguments("<path:string>").option("--json", "Output as JSON (for piping to jq)").action(history);
60218
60278
  script_default = command3;
60219
60279
  });
60220
60280
 
@@ -60402,7 +60462,7 @@ async function checkRawAppRunnables(backendDir, rawAppYamlPath, defaultTs) {
60402
60462
  path: rawAppYamlPath,
60403
60463
  target: "raw_app_inline_script",
60404
60464
  errors: [
60405
- `Missing lock for ${language} runnable '${runnableId}'. Run 'wmill app generate-locks' to generate locks.`
60465
+ `Missing lock for ${language} runnable '${runnableId}'. Run 'wmill generate-metadata' to generate locks.`
60406
60466
  ]
60407
60467
  });
60408
60468
  }
@@ -60446,7 +60506,7 @@ async function checkRawAppRunnables(backendDir, rawAppYamlPath, defaultTs) {
60446
60506
  path: rawAppYamlPath,
60447
60507
  target: "raw_app_inline_script",
60448
60508
  errors: [
60449
- `Missing lock for ${language} runnable '${runnableId}'. Run 'wmill app generate-locks' to generate locks.`
60509
+ `Missing lock for ${language} runnable '${runnableId}'. Run 'wmill generate-metadata' to generate locks.`
60450
60510
  ]
60451
60511
  });
60452
60512
  }
@@ -60514,7 +60574,7 @@ async function checkMissingLocks(opts, directory) {
60514
60574
  path: yamlPath,
60515
60575
  target: "script",
60516
60576
  errors: [
60517
- `Missing lock for ${language} script. Run 'wmill script generate-metadata' to generate locks.`
60577
+ `Missing lock for ${language} script. Run 'wmill generate-metadata' to generate locks.`
60518
60578
  ]
60519
60579
  });
60520
60580
  }
@@ -60539,7 +60599,7 @@ async function checkMissingLocks(opts, directory) {
60539
60599
  path: flowYamlPath,
60540
60600
  target: "flow_inline_script",
60541
60601
  errors: [
60542
- `Missing lock for ${script.language} inline script '${script.id}'. Run 'wmill flow generate-locks' to generate locks.`
60602
+ `Missing lock for ${script.language} inline script '${script.id}'. Run 'wmill generate-metadata' to generate locks.`
60543
60603
  ]
60544
60604
  });
60545
60605
  }
@@ -60564,7 +60624,7 @@ async function checkMissingLocks(opts, directory) {
60564
60624
  path: appYamlPath,
60565
60625
  target: "app_inline_script",
60566
60626
  errors: [
60567
- `Missing lock for ${script.language} inline script at '${script.path}'. Run 'wmill app generate-locks' to generate locks.`
60627
+ `Missing lock for ${script.language} inline script at '${script.path}'. Run 'wmill generate-metadata' to generate locks.`
60568
60628
  ]
60569
60629
  });
60570
60630
  }
@@ -61380,7 +61440,7 @@ async function generateFlowHash(rawWorkspaceDependencies, folder, defaultTs) {
61380
61440
  }
61381
61441
  return { ...hashes, [TOP_HASH]: await generateHash(JSON.stringify(hashes)) };
61382
61442
  }
61383
- async function generateFlowLockInternal(folder, dryRun, workspace, opts, justUpdateMetadataLock, noStaleMessage, legacyBehaviour, tree) {
61443
+ async function generateFlowLockInternal(folder, dryRun, workspace, opts, justUpdateMetadataLock, noStaleMessage, tree) {
61384
61444
  if (folder.endsWith(SEP7)) {
61385
61445
  folder = folder.substring(0, folder.length - 1);
61386
61446
  }
@@ -61393,7 +61453,7 @@ async function generateFlowLockInternal(folder, dryRun, workspace, opts, justUpd
61393
61453
  const inlineScriptsForTree = extractInlineScripts(structuredClone(flowValue.value.modules), {}, SEP7, opts.defaultTs).filter((s) => !s.is_lock);
61394
61454
  let filteredDeps = {};
61395
61455
  const conf = await readLockfile();
61396
- if (!legacyBehaviour && tree) {
61456
+ if (tree) {
61397
61457
  if (dryRun) {
61398
61458
  const inlineScriptPaths = [];
61399
61459
  for (const script of inlineScriptsForTree) {
@@ -61460,7 +61520,7 @@ async function generateFlowLockInternal(folder, dryRun, workspace, opts, justUpd
61460
61520
  }
61461
61521
  const fileReader = async (path8) => await readFile7(folder + SEP7 + path8, "utf-8");
61462
61522
  const currentMapping = extractCurrentMapping(flowValue.value.modules, {}, flowValue.value.failure_module, flowValue.value.preprocessor_module);
61463
- const locksToRemove = tree && !legacyBehaviour ? Object.keys(hashes).filter((k) => {
61523
+ const locksToRemove = tree ? Object.keys(hashes).filter((k) => {
61464
61524
  if (k === TOP_HASH)
61465
61525
  return false;
61466
61526
  const treePath = fileToTreePath.get(k) ?? folderNormalized + "/" + path7.basename(k, path7.extname(k));
@@ -61496,7 +61556,7 @@ async function generateFlowLockInternal(folder, dryRun, workspace, opts, justUpd
61496
61556
  });
61497
61557
  writeIfChanged(process.cwd() + SEP7 + folder + SEP7 + "flow.yaml", import_yaml8.stringify(flowValue, yamlOptions));
61498
61558
  }
61499
- const depsForHash = tree && !legacyBehaviour ? {} : filteredDeps;
61559
+ const depsForHash = tree ? {} : filteredDeps;
61500
61560
  const finalHashes = await generateFlowHash(depsForHash, folder, opts.defaultTs);
61501
61561
  await clearGlobalLock(folder);
61502
61562
  for (const [path8, hash2] of Object.entries(finalHashes)) {
@@ -61505,7 +61565,7 @@ async function generateFlowLockInternal(folder, dryRun, workspace, opts, justUpd
61505
61565
  if (!noStaleMessage) {
61506
61566
  info(colors.green(`Flow ${remote_path} lockfiles updated`));
61507
61567
  }
61508
- const relocked = tree && !legacyBehaviour ? Object.keys(finalHashes).filter((k) => {
61568
+ const relocked = tree ? Object.keys(finalHashes).filter((k) => {
61509
61569
  if (k === TOP_HASH)
61510
61570
  return false;
61511
61571
  const treePath = fileToTreePath.get(k) ?? folderNormalized + "/" + path7.basename(k, path7.extname(k));
@@ -61831,7 +61891,7 @@ ${tables3.length > 0 ? tables3.map((t) => ` - ${t}`).join(`
61831
61891
 
61832
61892
  ## Quick Reference
61833
61893
 
61834
- **Backend runnable:** Add \`backend/<name>.ts\` (or .py, etc.), then run \`wmill app generate-locks\`
61894
+ **Backend runnable:** Add \`backend/<name>.ts\` (or .py, etc.), then run \`wmill generate-metadata\`
61835
61895
 
61836
61896
  **Call from frontend:**
61837
61897
  \`\`\`typescript
@@ -63248,7 +63308,7 @@ Push aborted: ${lockIssues.length} script(s) missing locks.`));
63248
63308
  if (autoRegenerate) {
63249
63309
  info("Auto-regenerated metadata for stale scripts:");
63250
63310
  } else {
63251
- warn("Stale scripts metadata found, you may want to update them using 'wmill script generate-metadata' before pushing:");
63311
+ warn("Stale scripts metadata found, you may want to update them using 'wmill generate-metadata' before pushing:");
63252
63312
  }
63253
63313
  for (const stale of staleScripts) {
63254
63314
  if (autoRegenerate) {
@@ -63269,7 +63329,7 @@ Push aborted: ${lockIssues.length} script(s) missing locks.`));
63269
63329
  if (autoRegenerate) {
63270
63330
  info("Auto-regenerated locks for stale flows:");
63271
63331
  } else {
63272
- warn("Stale flows locks found, you may want to update them using 'wmill flow generate-locks' before pushing:");
63332
+ warn("Stale flows locks found, you may want to update them using 'wmill generate-metadata' before pushing:");
63273
63333
  }
63274
63334
  for (const stale of staleFlows) {
63275
63335
  if (autoRegenerate) {
@@ -63296,7 +63356,7 @@ Push aborted: ${lockIssues.length} script(s) missing locks.`));
63296
63356
  if (autoRegenerate) {
63297
63357
  info("Auto-regenerated locks for stale apps:");
63298
63358
  } else {
63299
- warn("Stale apps locks found, you may want to update them using 'wmill app generate-locks' before pushing:");
63359
+ warn("Stale apps locks found, you may want to update them using 'wmill generate-metadata' before pushing:");
63300
63360
  }
63301
63361
  for (const stale of staleApps) {
63302
63362
  if (autoRegenerate) {
@@ -64223,7 +64283,7 @@ async function blueColor() {
64223
64283
  const isWin2 = await getIsWin();
64224
64284
  return isWin2 ? colors.black : colors.blue;
64225
64285
  }
64226
- async function generateScriptMetadataInternal(scriptPath, workspace, opts, dryRun, noStaleMessage, rawWorkspaceDependencies, codebases, justUpdateMetadataLock, legacyBehaviour, tree) {
64286
+ async function generateScriptMetadataInternal(scriptPath, workspace, opts, dryRun, noStaleMessage, rawWorkspaceDependencies, codebases, justUpdateMetadataLock, tree) {
64227
64287
  const isFolderLayout = isModuleEntryPoint(scriptPath);
64228
64288
  const remotePath = isFolderLayout ? getScriptBasePathFromModulePath(scriptPath).replaceAll(SEP9, "/") : scriptPath.substring(0, scriptPath.indexOf(".")).replaceAll(SEP9, "/");
64229
64289
  const language = inferContentTypeFromFilePath(scriptPath, opts.defaultTs);
@@ -64233,11 +64293,11 @@ async function generateScriptMetadataInternal(scriptPath, workspace, opts, dryRu
64233
64293
  const filteredRawWorkspaceDependencies = filterWorkspaceDependencies(rawWorkspaceDependencies, scriptContent, language);
64234
64294
  const moduleFolderPath = isFolderLayout ? path9.dirname(scriptPath) : scriptPath.substring(0, scriptPath.indexOf(".")) + getModuleFolderSuffix();
64235
64295
  const hasModules = existsSync4(moduleFolderPath) && statSync(moduleFolderPath).isDirectory();
64236
- const depsForHash = !legacyBehaviour && tree ? {} : filteredRawWorkspaceDependencies;
64296
+ const depsForHash = tree ? {} : filteredRawWorkspaceDependencies;
64237
64297
  let hash2 = await generateScriptHash(depsForHash, scriptContent, metadataContent);
64238
64298
  let moduleHashes = {};
64239
64299
  if (hasModules) {
64240
- moduleHashes = await computeModuleHashes(moduleFolderPath, opts.defaultTs, !legacyBehaviour && tree ? {} : rawWorkspaceDependencies, isFolderLayout);
64300
+ moduleHashes = await computeModuleHashes(moduleFolderPath, opts.defaultTs, tree ? {} : rawWorkspaceDependencies, isFolderLayout);
64241
64301
  }
64242
64302
  const hasModuleHashes = Object.keys(moduleHashes).length > 0;
64243
64303
  let checkHash = hash2;
@@ -64249,7 +64309,7 @@ async function generateScriptMetadataInternal(scriptPath, workspace, opts, dryRu
64249
64309
  }
64250
64310
  const conf = await readLockfile();
64251
64311
  const isDirectlyStale = !await checkifMetadataUptodate(remotePath, checkHash, conf, checkSubpath);
64252
- if (!legacyBehaviour && tree) {
64312
+ if (tree) {
64253
64313
  if (dryRun) {
64254
64314
  const imports = await extractRelativeImports(scriptContent, remotePath, language);
64255
64315
  await tree.addNode(remotePath, scriptContent, language, metadataContent, imports, "script", remotePath, scriptPath, isDirectlyStale);
@@ -65277,7 +65337,7 @@ async function generateAppHash(rawReqs, folder, rawApp, defaultTs) {
65277
65337
  }
65278
65338
  return { ...hashes, [TOP_HASH2]: await generateHash(JSON.stringify(hashes)) };
65279
65339
  }
65280
- async function generateAppLocksInternal(appFolder, rawApp, dryRun, workspace, opts, justUpdateMetadataLock, noStaleMessage, legacyBehaviour, tree) {
65340
+ async function generateAppLocksInternal(appFolder, rawApp, dryRun, workspace, opts, justUpdateMetadataLock, noStaleMessage, tree) {
65281
65341
  if (appFolder.endsWith(SEP11)) {
65282
65342
  appFolder = appFolder.substring(0, appFolder.length - 1);
65283
65343
  }
@@ -65291,7 +65351,7 @@ async function generateAppLocksInternal(appFolder, rawApp, dryRun, workspace, op
65291
65351
  const folderNormalized = appFolder.replaceAll(SEP11, "/");
65292
65352
  let filteredDeps = {};
65293
65353
  const conf = await readLockfile();
65294
- if (!legacyBehaviour && tree) {
65354
+ if (tree) {
65295
65355
  if (dryRun) {
65296
65356
  const hashes = await generateAppHash({}, appFolder, rawApp, opts.defaultTs);
65297
65357
  const isDirectlyStale = !await checkifMetadataUptodate(appFolder, hashes[TOP_HASH2], conf, TOP_HASH2);
@@ -65358,7 +65418,7 @@ async function generateAppLocksInternal(appFolder, rawApp, dryRun, workspace, op
65358
65418
  }
65359
65419
  }
65360
65420
  const tempScriptRefs = tree?.getTempScriptRefs(folderNormalized);
65361
- if (changedScripts.length > 0 || tree && !legacyBehaviour) {
65421
+ if (changedScripts.length > 0 || tree) {
65362
65422
  if (!noStaleMessage) {
65363
65423
  info(`Recomputing locks of ${changedScripts.join(", ")} in ${appFolder}`);
65364
65424
  }
@@ -65383,7 +65443,7 @@ async function generateAppLocksInternal(appFolder, rawApp, dryRun, workspace, op
65383
65443
  info(colors.gray(`No scripts changed in ${appFolder}`));
65384
65444
  }
65385
65445
  }
65386
- const depsForHash = tree && !legacyBehaviour ? {} : filteredDeps;
65446
+ const depsForHash = tree ? {} : filteredDeps;
65387
65447
  const finalHashes = await generateAppHash(depsForHash, appFolder, rawApp, opts.defaultTs);
65388
65448
  await clearGlobalLock(appFolder);
65389
65449
  for (const [scriptPath, hash2] of Object.entries(finalHashes)) {
@@ -67884,7 +67944,7 @@ var init_app = __esm(async () => {
67884
67944
  init_generate_agents()
67885
67945
  ]);
67886
67946
  alreadySynced2 = [];
67887
- command11 = new Command().description("app related commands").option("--json", "Output as JSON (for piping to jq)").action(list5).command("list", "list all apps").option("--json", "Output as JSON (for piping to jq)").action(list5).command("get", "get an app's details").arguments("<path:string>").option("--json", "Output as JSON (for piping to jq)").action(get3).command("push", "push a local app ").arguments("<file_path:string> <remote_path:string>").action(push4).command("dev", dev_default).command("lint", lint_default2).command("new", new_default).command("generate-agents", generate_agents_default).command("generate-locks", "re-generate the lockfiles for app runnables inline scripts that have changed").arguments("[app_folder:string]").option("--yes", "Skip confirmation prompt").option("--dry-run", "Perform a dry run without making changes").option("--default-ts <runtime:string>", "Default TypeScript runtime (bun or deno)").action(async (opts, appFolder) => {
67947
+ command11 = new Command().description("app related commands").option("--json", "Output as JSON (for piping to jq)").action(list5).command("list", "list all apps").option("--json", "Output as JSON (for piping to jq)").action(list5).command("get", "get an app's details").arguments("<path:string>").option("--json", "Output as JSON (for piping to jq)").action(get3).command("push", "push a local app ").arguments("<file_path:string> <remote_path:string>").action(push4).command("dev", dev_default).command("lint", lint_default2).command("new", new_default).command("generate-agents", generate_agents_default).command("generate-locks", 'DEPRECATED: re-generate app lockfiles. Use "wmill generate-metadata" instead.').arguments("[app_folder:string]").option("--yes", "Skip confirmation prompt").option("--dry-run", "Perform a dry run without making changes").option("--default-ts <runtime:string>", "Default TypeScript runtime (bun or deno)").action(async (opts, appFolder) => {
67888
67948
  warn(colors.yellow('This command is deprecated. Use "wmill generate-metadata" instead.'));
67889
67949
  const { generateLocksCommand: generateLocksCommand2 } = await init_app_metadata().then(() => exports_app_metadata);
67890
67950
  await generateLocksCommand2(opts, appFolder);
@@ -71571,7 +71631,7 @@ var init_flow = __esm(async () => {
71571
71631
  ]);
71572
71632
  import_yaml36 = __toESM(require_dist(), 1);
71573
71633
  alreadySynced3 = [];
71574
- command21 = new Command().description("flow related commands").option("--show-archived", "Enable archived flows in output").option("--json", "Output as JSON (for piping to jq)").action(list12).command("list", "list all flows").option("--show-archived", "Enable archived flows in output").option("--json", "Output as JSON (for piping to jq)").action(list12).command("get", "get a flow's details").arguments("<path:string>").option("--json", "Output as JSON (for piping to jq)").action(get9).command("push", "push a local flow spec. This overrides any remote versions.").arguments("<file_path:string> <remote_path:string>").option("--message <message:string>", "Deployment message").action(push11).command("run", "run a flow by path.").arguments("<path:string>").option("-d --data <data:string>", "Inputs specified as a JSON string or a file using @<filename> or stdin using @-.").option("-s --silent", "Do not ouput anything other then the final output. Useful for scripting.").action(run3).command("preview", "preview a local flow without deploying it. Runs the flow definition from local files and uses local PathScripts by default.").arguments("<flow_path:string>").option("-d --data <data:string>", "Inputs specified as a JSON string or a file using @<filename> or stdin using @-.").option("-s --silent", "Do not output anything other then the final output. Useful for scripting.").option("--remote", "Use deployed workspace scripts for PathScript steps instead of local files.").action(preview2).command("generate-locks", "re-generate the lock files of all inline scripts of all updated flows").arguments("[flow:file]").option("--yes", "Skip confirmation prompt").option("--dry-run", "Perform a dry run without making changes").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account.").action(generateLocks).command("new", "create a new empty flow").arguments("<flow_path:string>").option("--summary <summary:string>", "flow summary").option("--description <description:string>", "flow description").action(bootstrap2).command("bootstrap", "create a new empty flow (alias for new)").arguments("<flow_path:string>").option("--summary <summary:string>", "flow summary").option("--description <description:string>", "flow description").action(bootstrap2).command("history", "Show version history for a flow").arguments("<path:string>").option("--json", "Output as JSON (for piping to jq)").action(history2).command("show-version", "Show a specific version of a flow").arguments("<path:string> <version:string>").option("--json", "Output as JSON (for piping to jq)").action(showVersion);
71634
+ command21 = new Command().description("flow related commands").option("--show-archived", "Enable archived flows in output").option("--json", "Output as JSON (for piping to jq)").action(list12).command("list", "list all flows").option("--show-archived", "Enable archived flows in output").option("--json", "Output as JSON (for piping to jq)").action(list12).command("get", "get a flow's details").arguments("<path:string>").option("--json", "Output as JSON (for piping to jq)").action(get9).command("push", "push a local flow spec. This overrides any remote versions.").arguments("<file_path:string> <remote_path:string>").option("--message <message:string>", "Deployment message").action(push11).command("run", "run a flow by path.").arguments("<path:string>").option("-d --data <data:string>", "Inputs specified as a JSON string or a file using @<filename> or stdin using @-.").option("-s --silent", "Do not ouput anything other then the final output. Useful for scripting.").action(run3).command("preview", "preview a local flow without deploying it. Runs the flow definition from local files and uses local PathScripts by default.").arguments("<flow_path:string>").option("-d --data <data:string>", "Inputs specified as a JSON string or a file using @<filename> or stdin using @-.").option("-s --silent", "Do not output anything other then the final output. Useful for scripting.").option("--remote", "Use deployed workspace scripts for PathScript steps instead of local files.").action(preview2).command("generate-locks", 'DEPRECATED: re-generate flow lock files. Use "wmill generate-metadata" instead.').arguments("[flow:file]").option("--yes", "Skip confirmation prompt").option("--dry-run", "Perform a dry run without making changes").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account.").action(generateLocks).command("new", "create a new empty flow").arguments("<flow_path:string>").option("--summary <summary:string>", "flow summary").option("--description <description:string>", "flow description").action(bootstrap2).command("bootstrap", "create a new empty flow (alias for new)").arguments("<flow_path:string>").option("--summary <summary:string>", "flow summary").option("--description <description:string>", "flow description").action(bootstrap2).command("history", "Show version history for a flow").arguments("<path:string>").option("--json", "Output as JSON (for piping to jq)").action(history2).command("show-version", "Show a specific version of a flow").arguments("<path:string> <version:string>").option("--json", "Output as JSON (for piping to jq)").action(showVersion);
71575
71635
  flow_default = command21;
71576
71636
  });
71577
71637
 
@@ -74524,7 +74584,7 @@ description: MUST use when writing Bash scripts.
74524
74584
  ## CLI Commands
74525
74585
 
74526
74586
  Place scripts in a folder. After writing, tell the user they can run:
74527
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
74587
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
74528
74588
  - \`wmill sync push\` - Deploy to Windmill
74529
74589
 
74530
74590
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -74589,7 +74649,7 @@ description: MUST use when writing BigQuery queries.
74589
74649
  ## CLI Commands
74590
74650
 
74591
74651
  Place scripts in a folder. After writing, tell the user they can run:
74592
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
74652
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
74593
74653
  - \`wmill sync push\` - Deploy to Windmill
74594
74654
 
74595
74655
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -74616,7 +74676,7 @@ description: MUST use when writing Bun/TypeScript scripts.
74616
74676
  ## CLI Commands
74617
74677
 
74618
74678
  Place scripts in a folder. After writing, tell the user they can run:
74619
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
74679
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
74620
74680
  - \`wmill sync push\` - Deploy to Windmill
74621
74681
 
74622
74682
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -74741,6 +74801,8 @@ const result: S3Object = await wmill.writeS3File(
74741
74801
 
74742
74802
  Import: import * as wmill from 'windmill-client'
74743
74803
 
74804
+ workerHasInternalServer(): boolean
74805
+
74744
74806
  /**
74745
74807
  * Initialize the Windmill client with authentication token and base URL
74746
74808
  * @param token - Authentication token (defaults to WM_TOKEN env variable)
@@ -75281,7 +75343,7 @@ description: MUST use when writing Bun Native scripts.
75281
75343
  ## CLI Commands
75282
75344
 
75283
75345
  Place scripts in a folder. After writing, tell the user they can run:
75284
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
75346
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
75285
75347
  - \`wmill sync push\` - Deploy to Windmill
75286
75348
 
75287
75349
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -75404,6 +75466,8 @@ const result: S3Object = await wmill.writeS3File(
75404
75466
 
75405
75467
  Import: import * as wmill from 'windmill-client'
75406
75468
 
75469
+ workerHasInternalServer(): boolean
75470
+
75407
75471
  /**
75408
75472
  * Initialize the Windmill client with authentication token and base URL
75409
75473
  * @param token - Authentication token (defaults to WM_TOKEN env variable)
@@ -75944,7 +76008,7 @@ description: MUST use when writing C# scripts.
75944
76008
  ## CLI Commands
75945
76009
 
75946
76010
  Place scripts in a folder. After writing, tell the user they can run:
75947
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
76011
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
75948
76012
  - \`wmill sync push\` - Deploy to Windmill
75949
76013
 
75950
76014
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -76001,7 +76065,7 @@ description: MUST use when writing Deno/TypeScript scripts.
76001
76065
  ## CLI Commands
76002
76066
 
76003
76067
  Place scripts in a folder. After writing, tell the user they can run:
76004
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
76068
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
76005
76069
  - \`wmill sync push\` - Deploy to Windmill
76006
76070
 
76007
76071
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -76130,6 +76194,8 @@ const result: S3Object = await wmill.writeS3File(
76130
76194
 
76131
76195
  Import: import * as wmill from 'windmill-client'
76132
76196
 
76197
+ workerHasInternalServer(): boolean
76198
+
76133
76199
  /**
76134
76200
  * Initialize the Windmill client with authentication token and base URL
76135
76201
  * @param token - Authentication token (defaults to WM_TOKEN env variable)
@@ -76670,7 +76736,7 @@ description: MUST use when writing DuckDB queries.
76670
76736
  ## CLI Commands
76671
76737
 
76672
76738
  Place scripts in a folder. After writing, tell the user they can run:
76673
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
76739
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
76674
76740
  - \`wmill sync push\` - Deploy to Windmill
76675
76741
 
76676
76742
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -76737,7 +76803,7 @@ description: MUST use when writing Go scripts.
76737
76803
  ## CLI Commands
76738
76804
 
76739
76805
  Place scripts in a folder. After writing, tell the user they can run:
76740
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
76806
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
76741
76807
  - \`wmill sync push\` - Deploy to Windmill
76742
76808
 
76743
76809
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -76811,7 +76877,7 @@ description: MUST use when writing GraphQL queries.
76811
76877
  ## CLI Commands
76812
76878
 
76813
76879
  Place scripts in a folder. After writing, tell the user they can run:
76814
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
76880
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
76815
76881
  - \`wmill sync push\` - Deploy to Windmill
76816
76882
 
76817
76883
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -76872,7 +76938,7 @@ description: MUST use when writing Java scripts.
76872
76938
  ## CLI Commands
76873
76939
 
76874
76940
  Place scripts in a folder. After writing, tell the user they can run:
76875
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
76941
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
76876
76942
  - \`wmill sync push\` - Deploy to Windmill
76877
76943
 
76878
76944
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -76926,7 +76992,7 @@ description: MUST use when writing MS SQL Server queries.
76926
76992
  ## CLI Commands
76927
76993
 
76928
76994
  Place scripts in a folder. After writing, tell the user they can run:
76929
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
76995
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
76930
76996
  - \`wmill sync push\` - Deploy to Windmill
76931
76997
 
76932
76998
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -76953,7 +77019,7 @@ description: MUST use when writing MySQL queries.
76953
77019
  ## CLI Commands
76954
77020
 
76955
77021
  Place scripts in a folder. After writing, tell the user they can run:
76956
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
77022
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
76957
77023
  - \`wmill sync push\` - Deploy to Windmill
76958
77024
 
76959
77025
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -76980,7 +77046,7 @@ description: MUST use when writing Native TypeScript scripts.
76980
77046
  ## CLI Commands
76981
77047
 
76982
77048
  Place scripts in a folder. After writing, tell the user they can run:
76983
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
77049
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
76984
77050
  - \`wmill sync push\` - Deploy to Windmill
76985
77051
 
76986
77052
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -77070,6 +77136,8 @@ export async function preprocessor(event: Event) {
77070
77136
 
77071
77137
  Import: import * as wmill from 'windmill-client'
77072
77138
 
77139
+ workerHasInternalServer(): boolean
77140
+
77073
77141
  /**
77074
77142
  * Initialize the Windmill client with authentication token and base URL
77075
77143
  * @param token - Authentication token (defaults to WM_TOKEN env variable)
@@ -77610,7 +77678,7 @@ description: MUST use when writing PHP scripts.
77610
77678
  ## CLI Commands
77611
77679
 
77612
77680
  Place scripts in a folder. After writing, tell the user they can run:
77613
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
77681
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
77614
77682
  - \`wmill sync push\` - Deploy to Windmill
77615
77683
 
77616
77684
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -77683,7 +77751,7 @@ description: MUST use when writing PostgreSQL queries.
77683
77751
  ## CLI Commands
77684
77752
 
77685
77753
  Place scripts in a folder. After writing, tell the user they can run:
77686
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
77754
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
77687
77755
  - \`wmill sync push\` - Deploy to Windmill
77688
77756
 
77689
77757
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -77710,7 +77778,7 @@ description: MUST use when writing PowerShell scripts.
77710
77778
  ## CLI Commands
77711
77779
 
77712
77780
  Place scripts in a folder. After writing, tell the user they can run:
77713
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
77781
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
77714
77782
  - \`wmill sync push\` - Deploy to Windmill
77715
77783
 
77716
77784
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -77781,7 +77849,7 @@ description: MUST use when writing Python scripts.
77781
77849
  ## CLI Commands
77782
77850
 
77783
77851
  Place scripts in a folder. After writing, tell the user they can run:
77784
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
77852
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
77785
77853
  - \`wmill sync push\` - Deploy to Windmill
77786
77854
 
77787
77855
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -77912,6 +77980,8 @@ result: S3Object = wmill.write_s3_file(
77912
77980
 
77913
77981
  Import: import wmill
77914
77982
 
77983
+ def worker_has_internal_server() -> bool
77984
+
77915
77985
  def get_mocked_api() -> Optional[dict]
77916
77986
 
77917
77987
  # Get the HTTP client instance.
@@ -77976,7 +78046,10 @@ def run_script_by_path(path: str, args: dict = None, timeout: dt.timedelta | int
77976
78046
  # Run script by hash synchronously and return its result.
77977
78047
  def run_script_by_hash(hash_: str, args: dict = None, timeout: dt.timedelta | int | float | None = None, verbose: bool = False, cleanup: bool = True, assert_result_is_not_none: bool = False) -> Any
77978
78048
 
77979
- # Run a script on the current worker without creating a job
78049
+ # Run a script on the current worker without creating a job.
78050
+ #
78051
+ # On agent workers (no internal server), falls back to running a normal
78052
+ # preview job and waiting for the result.
77980
78053
  def run_inline_script_preview(content: str, language: str, args: dict = None) -> Any
77981
78054
 
77982
78055
  # Wait for a job to complete and return its result.
@@ -78602,7 +78675,7 @@ description: MUST use when writing R scripts.
78602
78675
  ## CLI Commands
78603
78676
 
78604
78677
  Place scripts in a folder. After writing, tell the user they can run:
78605
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
78678
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
78606
78679
  - \`wmill sync push\` - Deploy to Windmill
78607
78680
 
78608
78681
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -78703,7 +78776,7 @@ description: MUST use when writing Rust scripts.
78703
78776
  ## CLI Commands
78704
78777
 
78705
78778
  Place scripts in a folder. After writing, tell the user they can run:
78706
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
78779
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
78707
78780
  - \`wmill sync push\` - Deploy to Windmill
78708
78781
 
78709
78782
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -78794,7 +78867,7 @@ description: MUST use when writing Snowflake queries.
78794
78867
  ## CLI Commands
78795
78868
 
78796
78869
  Place scripts in a folder. After writing, tell the user they can run:
78797
- - \`wmill script generate-metadata\` - Generate .script.yaml and .lock files
78870
+ - \`wmill generate-metadata\` - Generate .script.yaml and .lock files
78798
78871
  - \`wmill sync push\` - Deploy to Windmill
78799
78872
 
78800
78873
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -78825,7 +78898,7 @@ description: MUST use when creating flows.
78825
78898
  Create a folder ending with \`{{FLOW_SUFFIX}}\` and add a \`flow.yaml\` file with the flow definition.
78826
78899
  For rawscript modules, use \`!inline path/to/script.ts\` for the content key. {{INLINE_SCRIPT_NAMING}}
78827
78900
  After writing, tell the user they can run:
78828
- - \`wmill flow generate-locks <path_to_flow_folder> --yes\` - Generate lock files for the specific flow you modified (e.g. \`wmill flow generate-locks f/my_folder/my_flow{{FLOW_SUFFIX}} --yes\`)
78901
+ - \`wmill generate-metadata\` - Generate lock files for the flow you modified
78829
78902
  - \`wmill sync push\` - Deploy to Windmill
78830
78903
 
78831
78904
  Do NOT run these commands yourself. Instead, inform the user that they should run them.
@@ -78973,7 +79046,7 @@ my_app{{RAW_APP_SUFFIX}}/
78973
79046
  ├── backend/ # Backend runnables (server-side scripts)
78974
79047
  │ ├── <id>.<ext> # Code file (e.g., get_user.ts)
78975
79048
  │ ├── <id>.yaml # Optional: config for fields, or to reference existing scripts
78976
- │ └── <id>.lock # Lock file (run 'wmill app generate-locks' to create)
79049
+ │ └── <id>.lock # Lock file (run 'wmill generate-metadata' to create/update)
78977
79050
  └── sql_to_apply/ # SQL migrations (dev only, not synced)
78978
79051
  └── *.sql # SQL files to apply via dev server
78979
79052
  \`\`\`
@@ -79029,7 +79102,7 @@ export async function main(user_id: string) {
79029
79102
 
79030
79103
  After creating, tell the user they can generate lock files by running:
79031
79104
  \`\`\`bash
79032
- wmill app generate-locks
79105
+ wmill generate-metadata
79033
79106
  \`\`\`
79034
79107
 
79035
79108
  ### Optional YAML Configuration
@@ -79187,7 +79260,7 @@ Tell the user they can run these commands (do NOT run them yourself):
79187
79260
  | \`wmill app new\` | Create a new raw app interactively |
79188
79261
  | \`wmill app dev\` | Start dev server with live reload |
79189
79262
  | \`wmill app generate-agents\` | Refresh AGENTS.md and DATATABLES.md |
79190
- | \`wmill app generate-locks\` | Generate lock files for backend runnables |
79263
+ | \`wmill generate-metadata\` | Generate lock files for backend runnables |
79191
79264
  | \`wmill sync push\` | Deploy app to Windmill |
79192
79265
  | \`wmill sync pull\` | Pull latest from Windmill |
79193
79266
 
@@ -79198,7 +79271,7 @@ Tell the user they can run these commands (do NOT run them yourself):
79198
79271
  3. **Keep runnables focused** - one function per file
79199
79272
  4. **Use descriptive IDs** - \`get_user.ts\` not \`a.ts\`
79200
79273
  5. **Always whitelist tables** - add to \`data.tables\` before querying
79201
- 6. **Generate locks** - tell the user to run \`wmill app generate-locks\` after adding/modifying backend runnables
79274
+ 6. **Generate locks** - tell the user to run \`wmill generate-metadata\` after adding/modifying backend runnables
79202
79275
  `,
79203
79276
  triggers: `---
79204
79277
  name: triggers
@@ -79575,10 +79648,6 @@ app related commands
79575
79648
  - \`--fix\` - Attempt to fix common issues (not implemented yet)
79576
79649
  - \`app new\` - create a new raw app from a template
79577
79650
  - \`app generate-agents [app_folder:string]\` - regenerate AGENTS.md and DATATABLES.md from remote workspace
79578
- - \`app generate-locks [app_folder:string]\` - re-generate the lockfiles for app runnables inline scripts that have changed
79579
- - \`--yes\` - Skip confirmation prompt
79580
- - \`--dry-run\` - Perform a dry run without making changes
79581
- - \`--default-ts <runtime:string>\` - Default TypeScript runtime (bun or deno)
79582
79651
 
79583
79652
  ### audit
79584
79653
 
@@ -79647,11 +79716,6 @@ flow related commands
79647
79716
  - \`-d --data <data:string>\` - Inputs specified as a JSON string or a file using @<filename> or stdin using @-.
79648
79717
  - \`-s --silent\` - Do not output anything other then the final output. Useful for scripting.
79649
79718
  - \`--remote\` - Use deployed workspace scripts for PathScript steps instead of local files.
79650
- - \`flow generate-locks [flow:file]\` - re-generate the lock files of all inline scripts of all updated flows
79651
- - \`--yes\` - Skip confirmation prompt
79652
- - \`--dry-run\` - Perform a dry run without making changes
79653
- - \`-i --includes <patterns:file[]>\` - Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)
79654
- - \`-e --excludes <patterns:file[]>\` - Comma separated patterns to specify which file to NOT take into account.
79655
79719
  - \`flow new <flow_path:string>\` - create a new empty flow
79656
79720
  - \`--summary <summary:string>\` - flow summary
79657
79721
  - \`--description <description:string>\` - flow description
@@ -79935,13 +79999,6 @@ script related commands
79935
79999
  - \`script bootstrap <path:file> <language:string>\` - create a new script (alias for new)
79936
80000
  - \`--summary <summary:string>\` - script summary
79937
80001
  - \`--description <description:string>\` - script description
79938
- - \`script generate-metadata [script:file]\` - re-generate the metadata file updating the lock and the script schema (for flows, use \`wmill flow generate-locks\`)
79939
- - \`--yes\` - Skip confirmation prompt
79940
- - \`--dry-run\` - Perform a dry run without making changes
79941
- - \`--lock-only\` - re-generate only the lock
79942
- - \`--schema-only\` - re-generate only script schema
79943
- - \`-i --includes <patterns:file[]>\` - Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)
79944
- - \`-e --excludes <patterns:file[]>\` - Comma separated patterns to specify which file to NOT take into account.
79945
80002
  - \`script history <path:string>\` - show version history for a script
79946
80003
  - \`--json\` - Output as JSON (for piping to jq)
79947
80004
 
@@ -80153,6 +80210,10 @@ properties:
80153
80210
  is_flow:
80154
80211
  type: boolean
80155
80212
  description: True if script_path points to a flow, false if it points to a script
80213
+ labels:
80214
+ type: array
80215
+ items:
80216
+ type: string
80156
80217
  gcp_resource_path:
80157
80218
  type: string
80158
80219
  description: Path to the GCP resource containing service account credentials for
@@ -80250,6 +80311,10 @@ properties:
80250
80311
  is_flow:
80251
80312
  type: boolean
80252
80313
  description: True if script_path points to a flow, false if it points to a script
80314
+ labels:
80315
+ type: array
80316
+ items:
80317
+ type: string
80253
80318
  route_path:
80254
80319
  type: string
80255
80320
  description: The URL route path that will trigger this endpoint (e.g., 'api/myendpoint').
@@ -80380,6 +80445,10 @@ properties:
80380
80445
  is_flow:
80381
80446
  type: boolean
80382
80447
  description: True if script_path points to a flow, false if it points to a script
80448
+ labels:
80449
+ type: array
80450
+ items:
80451
+ type: string
80383
80452
  kafka_resource_path:
80384
80453
  type: string
80385
80454
  description: Path to the Kafka resource containing connection configuration
@@ -80479,6 +80548,10 @@ properties:
80479
80548
  is_flow:
80480
80549
  type: boolean
80481
80550
  description: True if script_path points to a flow, false if it points to a script
80551
+ labels:
80552
+ type: array
80553
+ items:
80554
+ type: string
80482
80555
  mqtt_resource_path:
80483
80556
  type: string
80484
80557
  description: Path to the MQTT resource containing broker connection configuration
@@ -80569,6 +80642,10 @@ properties:
80569
80642
  is_flow:
80570
80643
  type: boolean
80571
80644
  description: True if script_path points to a flow, false if it points to a script
80645
+ labels:
80646
+ type: array
80647
+ items:
80648
+ type: string
80572
80649
  nats_resource_path:
80573
80650
  type: string
80574
80651
  description: Path to the NATS resource containing connection configuration
@@ -80646,6 +80723,10 @@ properties:
80646
80723
  is_flow:
80647
80724
  type: boolean
80648
80725
  description: True if script_path points to a flow, false if it points to a script
80726
+ labels:
80727
+ type: array
80728
+ items:
80729
+ type: string
80649
80730
  postgres_resource_path:
80650
80731
  type: string
80651
80732
  description: Path to the PostgreSQL resource containing connection configuration
@@ -80824,6 +80905,10 @@ properties:
80824
80905
  type: string
80825
80906
  description: Path to a script that validates scheduled datetimes. Receives scheduled_for
80826
80907
  datetime and returns boolean to skip (true) or run (false)
80908
+ labels:
80909
+ type: array
80910
+ items:
80911
+ type: string
80827
80912
  required:
80828
80913
  - schedule
80829
80914
  - script_path
@@ -80843,6 +80928,10 @@ properties:
80843
80928
  is_flow:
80844
80929
  type: boolean
80845
80930
  description: True if script_path points to a flow, false if it points to a script
80931
+ labels:
80932
+ type: array
80933
+ items:
80934
+ type: string
80846
80935
  queue_url:
80847
80936
  type: string
80848
80937
  description: The full URL of the AWS SQS queue to poll for messages
@@ -80919,6 +81008,10 @@ properties:
80919
81008
  is_flow:
80920
81009
  type: boolean
80921
81010
  description: True if script_path points to a flow, false if it points to a script
81011
+ labels:
81012
+ type: array
81013
+ items:
81014
+ type: string
80922
81015
  url:
80923
81016
  type: string
80924
81017
  description: The WebSocket URL to connect to (can be a static URL or computed
@@ -80956,6 +81049,21 @@ properties:
80956
81049
  can_return_error_result:
80957
81050
  type: boolean
80958
81051
  description: If true, error results are sent back through the WebSocket
81052
+ heartbeat:
81053
+ type: object
81054
+ properties:
81055
+ interval_secs:
81056
+ type: integer
81057
+ minimum: 1
81058
+ description: Interval in seconds between heartbeat messages
81059
+ message:
81060
+ type: string
81061
+ description: Message to send as heartbeat. Use {{state}} as a placeholder
81062
+ for a value extracted from incoming messages (see state_field).
81063
+ state_field:
81064
+ type: string
81065
+ description: Optional. Top-level JSON field to extract from incoming messages.
81066
+ The extracted value replaces {{state}} in the heartbeat message.
80959
81067
  error_handler_path:
80960
81068
  type: string
80961
81069
  description: Path to a script or flow to run when the triggered job fails
@@ -82416,7 +82524,7 @@ async function generateMetadata2(opts, folder) {
82416
82524
  return !isD && !exts.some((ext2) => p.endsWith(ext2)) || ignore(p, isD) || isFolderResourcePathAnyFormat(p) || isScriptModulePath(p) && !isModuleEntryPoint(p);
82417
82525
  }, false, {});
82418
82526
  for (const e of Object.keys(scriptElems)) {
82419
- await generateScriptMetadataInternal(e, workspace, opts, true, true, rawWorkspaceDependencies, codebases, false, false, tree);
82527
+ await generateScriptMetadataInternal(e, workspace, opts, true, true, rawWorkspaceDependencies, codebases, false, tree);
82420
82528
  }
82421
82529
  }
82422
82530
  if (!skipFlows) {
@@ -82424,7 +82532,7 @@ async function generateMetadata2(opts, folder) {
82424
82532
  return ignore(p, isD) || !isD && !p.endsWith(SEP21 + "flow.yaml") && !p.endsWith(SEP21 + "flow.json");
82425
82533
  }, false, {})).map((x) => x.substring(0, x.lastIndexOf(SEP21)));
82426
82534
  for (const flowFolder of flowElems) {
82427
- await generateFlowLockInternal(flowFolder, true, workspace, opts, false, true, false, tree);
82535
+ await generateFlowLockInternal(flowFolder, true, workspace, opts, false, true, tree);
82428
82536
  }
82429
82537
  }
82430
82538
  if (!skipApps) {
@@ -82434,10 +82542,10 @@ async function generateMetadata2(opts, folder) {
82434
82542
  const rawAppFolders = getAppFolders(elems, "raw_app.yaml");
82435
82543
  const appFolders = getAppFolders(elems, "app.yaml");
82436
82544
  for (const appFolder of rawAppFolders) {
82437
- await generateAppLocksInternal(appFolder, true, true, workspace, opts, false, true, false, tree);
82545
+ await generateAppLocksInternal(appFolder, true, true, workspace, opts, false, true, tree);
82438
82546
  }
82439
82547
  for (const appFolder of appFolders) {
82440
- await generateAppLocksInternal(appFolder, false, true, workspace, opts, false, true, false, tree);
82548
+ await generateAppLocksInternal(appFolder, false, true, workspace, opts, false, true, tree);
82441
82549
  }
82442
82550
  }
82443
82551
  tree.propagateStaleness();
@@ -82558,7 +82666,7 @@ async function generateMetadata2(opts, folder) {
82558
82666
  current++;
82559
82667
  info(`${formatProgress(current)} script ${item.path}`);
82560
82668
  try {
82561
- await generateScriptMetadataInternal(item.path, workspace, opts, false, true, mismatchedWorkspaceDeps, codebases, false, false, tree);
82669
+ await generateScriptMetadataInternal(item.path, workspace, opts, false, true, mismatchedWorkspaceDeps, codebases, false, tree);
82562
82670
  } catch (e) {
82563
82671
  const msg = e instanceof Error ? e.message : String(e);
82564
82672
  errors.push({ path: item.path, error: msg });
@@ -82568,7 +82676,7 @@ async function generateMetadata2(opts, folder) {
82568
82676
  for (const item of flows) {
82569
82677
  current++;
82570
82678
  try {
82571
- const result2 = await generateFlowLockInternal(item.folder.replaceAll("/", SEP21), false, workspace, opts, false, true, false, tree);
82679
+ const result2 = await generateFlowLockInternal(item.folder.replaceAll("/", SEP21), false, workspace, opts, false, true, tree);
82572
82680
  const flowResult = result2;
82573
82681
  const scriptsInfo = flowResult?.updatedScripts?.length ? colors.dim(colors.white(`: ${flowResult.updatedScripts.join(", ")}`)) : "";
82574
82682
  info(`${formatProgress(current)} flow ${item.path}${scriptsInfo}`);
@@ -82582,7 +82690,7 @@ async function generateMetadata2(opts, folder) {
82582
82690
  for (const item of apps2) {
82583
82691
  current++;
82584
82692
  try {
82585
- const result2 = await generateAppLocksInternal(item.folder.replaceAll("/", SEP21), item.isRawApp, false, workspace, opts, false, true, false, tree);
82693
+ const result2 = await generateAppLocksInternal(item.folder.replaceAll("/", SEP21), item.isRawApp, false, workspace, opts, false, true, tree);
82586
82694
  const appResult = result2;
82587
82695
  const scriptsInfo = appResult?.updatedScripts?.length ? colors.dim(colors.white(`: ${appResult.updatedScripts.join(", ")}`)) : "";
82588
82696
  info(`${formatProgress(current)} app ${item.path}${scriptsInfo}`);
@@ -82698,7 +82806,7 @@ var config_default = command35;
82698
82806
 
82699
82807
  // src/main.ts
82700
82808
  await init_context();
82701
- var VERSION = "1.673.0";
82809
+ var VERSION = "1.674.1";
82702
82810
  var command36 = new Command().name("wmill").action(() => info(`Welcome to Windmill CLI ${VERSION}. Use -h for help.`)).description("Windmill CLI").globalOption("--workspace <workspace:string>", "Specify the target workspace. This overrides the default workspace.").globalOption("--debug --verbose", "Show debug/verbose logs").globalOption("--show-diffs", "Show diff informations when syncing (may show sensitive informations)").globalOption("--token <token:string>", "Specify an API token. This will override any stored token.").globalOption("--base-url <baseUrl:string>", "Specify the base URL of the API. If used, --token and --workspace are required and no local remote/workspace already set will be used.").globalOption("--config-dir <configDir:string>", "Specify a custom config directory. Overrides WMILL_CONFIG_DIR environment variable and default ~/.config location.").env("HEADERS <headers:string>", `Specify headers to use for all requests. e.g: "HEADERS='h1: v1, h2: v2'"`).version(VERSION).versionOption(false).command("init", init_default).command("app", app_default).command("flow", flow_default).command("script", script_default).command("workspace", workspace_default).command("resource", resource_default).command("resource-type", resource_type_default).command("user", user_default).command("variable", variable_default).command("hub", hub_default).command("folder", folder_default).command("schedule", schedule_default).command("trigger", trigger_default).command("dev", dev_default2).command("sync", sync_default).command("lint", lint_default).command("gitsync-settings", gitsync_settings_default).command("instance", instance_default).command("worker-groups", worker_groups_default).command("workers", workers_default).command("queues", queues_default).command("dependencies", dependencies_default).command("jobs", jobs_default).command("job", job_default).command("group", group_default).command("audit", audit_default).command("token", token_default).command("generate-metadata", generate_metadata_default).command("docs", docs_default).command("config", config_default).command("version --version", "Show version information").action(async (opts) => {
82703
82811
  console.log("CLI version: " + VERSION);
82704
82812
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-cli",
3
- "version": "1.673.0",
3
+ "version": "1.674.1",
4
4
  "description": "CLI for Windmill",
5
5
  "license": "Apache 2.0",
6
6
  "type": "module",