windmill-cli 1.726.1 → 1.728.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.
Files changed (2) hide show
  1. package/esm/main.js +35 -10
  2. package/package.json +1 -1
package/esm/main.js CHANGED
@@ -16772,7 +16772,7 @@ var init_OpenAPI = __esm(() => {
16772
16772
  PASSWORD: undefined,
16773
16773
  TOKEN: getEnv3("WM_TOKEN"),
16774
16774
  USERNAME: undefined,
16775
- VERSION: "1.726.1",
16775
+ VERSION: "1.728.0",
16776
16776
  WITH_CREDENTIALS: true,
16777
16777
  interceptors: {
16778
16778
  request: new Interceptors,
@@ -25347,7 +25347,7 @@ var init_auth = __esm(async () => {
25347
25347
  });
25348
25348
 
25349
25349
  // src/core/constants.ts
25350
- var WM_FORK_PREFIX = "wm-fork", VERSION = "1.726.1";
25350
+ var WM_FORK_PREFIX = "wm-fork", VERSION = "1.728.0";
25351
25351
 
25352
25352
  // src/utils/git.ts
25353
25353
  var exports_git = {};
@@ -25535,7 +25535,7 @@ function gitSyncIncludePattern(pathType, path2) {
25535
25535
  case "emailtrigger":
25536
25536
  return `${path2}.email_trigger.*`;
25537
25537
  default:
25538
- return `${path2}.*`;
25538
+ return `${path2}.*,${path2}__mod/**`;
25539
25539
  }
25540
25540
  }
25541
25541
  function deriveGitSyncDeployIncludes(items, useIndividualBranch) {
@@ -62696,6 +62696,15 @@ class DoubleLinkedDependencyTree {
62696
62696
  });
62697
62697
  return result;
62698
62698
  }
62699
+ getAllTempScriptRefs() {
62700
+ const result = {};
62701
+ for (const [path6, node] of this.nodes.entries()) {
62702
+ if (node.contentHash) {
62703
+ result[path6] = node.contentHash;
62704
+ }
62705
+ }
62706
+ return result;
62707
+ }
62699
62708
  async persistDepsHashes(depsPaths) {
62700
62709
  for (const path6 of depsPaths) {
62701
62710
  const node = this.nodes.get(path6);
@@ -63318,12 +63327,15 @@ async function generateFlowLockInternal(folder, dryRun, workspace, opts, justUpd
63318
63327
  inlineScripts.forEach((s) => {
63319
63328
  writeIfChanged(process.cwd() + SEP4 + folder + SEP4 + s.path, s.content);
63320
63329
  });
63330
+ writeIfChanged(process.cwd() + SEP4 + folder + SEP4 + "flow.yaml", import_yaml6.stringify(flowValue, yamlOptions));
63321
63331
  for (const s of inlineScripts) {
63322
63332
  if (s.is_lock)
63323
63333
  continue;
63324
63334
  const legacyRelPath = legacyLockPathForContent(s.path, s.language);
63325
63335
  if (!legacyRelPath)
63326
63336
  continue;
63337
+ if (inlineScripts.some((other) => other.path === legacyRelPath))
63338
+ continue;
63327
63339
  const legacyAbsPath = process.cwd() + SEP4 + folder + SEP4 + legacyRelPath;
63328
63340
  if (existsSync4(legacyAbsPath)) {
63329
63341
  try {
@@ -63334,7 +63346,6 @@ async function generateFlowLockInternal(folder, dryRun, workspace, opts, justUpd
63334
63346
  }
63335
63347
  }
63336
63348
  }
63337
- writeIfChanged(process.cwd() + SEP4 + folder + SEP4 + "flow.yaml", import_yaml6.stringify(flowValue, yamlOptions));
63338
63349
  }
63339
63350
  const depsForHash = tree ? {} : filteredDeps;
63340
63351
  const finalHashes = await generateFlowHash(depsForHash, folder, opts.defaultTs);
@@ -63473,7 +63484,9 @@ async function buildPreviewTempScriptRefs(workspace, opts, codebases, target) {
63473
63484
  await generateScriptMetadataInternal(e, workspace, opts, true, true, rawWorkspaceDependencies, codebases, false, tree);
63474
63485
  }
63475
63486
  let nodePath;
63476
- if (target.kind === "script") {
63487
+ if (target.kind === "all") {
63488
+ nodePath = undefined;
63489
+ } else if (target.kind === "script") {
63477
63490
  nodePath = scriptPathToRemotePath(target.path);
63478
63491
  } else if (target.kind === "flow") {
63479
63492
  const folder = target.folder.endsWith(SEP5) ? target.folder.slice(0, -1) : target.folder;
@@ -63486,7 +63499,7 @@ async function buildPreviewTempScriptRefs(workspace, opts, codebases, target) {
63486
63499
  }
63487
63500
  tree.propagateStaleness();
63488
63501
  await uploadScripts(tree, workspace);
63489
- const refs = tree.getTempScriptRefs(nodePath);
63502
+ const refs = nodePath !== undefined ? tree.getTempScriptRefs(nodePath) : tree.getAllTempScriptRefs();
63490
63503
  return refs && Object.keys(refs).length > 0 ? refs : undefined;
63491
63504
  } catch (e) {
63492
63505
  const msg = e instanceof Error ? e.message : String(e);
@@ -89281,6 +89294,14 @@ async function dev2(opts) {
89281
89294
  const base = await realpath(".");
89282
89295
  const ignore = await ignoreF(opts);
89283
89296
  const codebases = await listSyncCodebases(opts);
89297
+ let tempScriptRefs = undefined;
89298
+ {
89299
+ const { buildPreviewTempScriptRefs: buildPreviewTempScriptRefs2 } = await init_generate_metadata().then(() => exports_generate_metadata);
89300
+ tempScriptRefs = await buildPreviewTempScriptRefs2(workspace, opts, codebases, { kind: "all" });
89301
+ if (tempScriptRefs) {
89302
+ info(`Resolved ${Object.keys(tempScriptRefs).length} locally-edited script(s) for preview relative imports (snapshot — restart wmill dev to refresh)`);
89303
+ }
89304
+ }
89284
89305
  const changesTimeouts = {};
89285
89306
  function watchChanges() {
89286
89307
  return new Promise((_resolve, _reject) => {
@@ -89340,7 +89361,8 @@ async function dev2(opts) {
89340
89361
  type: "flow",
89341
89362
  flow: localFlow,
89342
89363
  uriPath: localPath,
89343
- path: wmFlowPath
89364
+ path: wmFlowPath,
89365
+ temp_script_refs: tempScriptRefs
89344
89366
  };
89345
89367
  info("Updated " + wmFlowPath);
89346
89368
  broadcastChanges(currentLastEdit);
@@ -89356,7 +89378,8 @@ async function dev2(opts) {
89356
89378
  path: wmPath,
89357
89379
  language: lang,
89358
89380
  tag: typed?.tag,
89359
- lock: typed?.lock
89381
+ lock: typed?.lock,
89382
+ temp_script_refs: tempScriptRefs
89360
89383
  };
89361
89384
  info("Updated " + wmPath);
89362
89385
  broadcastChanges(currentLastEdit);
@@ -89393,7 +89416,8 @@ async function dev2(opts) {
89393
89416
  type: "flow",
89394
89417
  flow: localFlow,
89395
89418
  uriPath: flowDir,
89396
- path: wmPath
89419
+ path: wmPath,
89420
+ temp_script_refs: tempScriptRefs
89397
89421
  };
89398
89422
  currentLastEdit = edit;
89399
89423
  return edit;
@@ -89411,7 +89435,8 @@ async function dev2(opts) {
89411
89435
  path: wmPath,
89412
89436
  language: lang,
89413
89437
  tag: typed?.tag,
89414
- lock: typed?.lock
89438
+ lock: typed?.lock,
89439
+ temp_script_refs: tempScriptRefs
89415
89440
  };
89416
89441
  currentLastEdit = edit;
89417
89442
  return edit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-cli",
3
- "version": "1.726.1",
3
+ "version": "1.728.0",
4
4
  "description": "CLI for Windmill",
5
5
  "license": "Apache 2.0",
6
6
  "type": "module",