windmill-cli 1.711.0 → 1.712.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 +45 -6
  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.711.0",
16775
+ VERSION: "1.712.0",
16776
16776
  WITH_CREDENTIALS: true,
16777
16777
  interceptors: {
16778
16778
  request: new Interceptors,
@@ -67379,6 +67379,14 @@ async function pull(opts) {
67379
67379
  checkoutGitSyncDeployBranch(deployBranch);
67380
67380
  }
67381
67381
  if (opts.onlyCreateBranch) {
67382
+ gitSyncDeployPush({
67383
+ items: deployItems,
67384
+ authorName: process.env["WM_USERNAME"] || "windmill",
67385
+ authorEmail: process.env["WM_EMAIL"] || "windmill@windmill.dev",
67386
+ committerName: opts.gitCommitterName,
67387
+ committerEmail: opts.gitCommitterEmail,
67388
+ onlyCreateBranch: true
67389
+ });
67382
67390
  return;
67383
67391
  }
67384
67392
  }
@@ -67662,9 +67670,12 @@ function prettyChanges(changes, specificItems, branchOverride, folderDefaultAnno
67662
67670
  } else if (change.name === "deleted") {
67663
67671
  info(colors.red(`- ${getTypeStrFromPath(change.path)} ` + displayPath + colors.gray(wsNote)));
67664
67672
  } else if (change.name === "edited") {
67665
- info(colors.yellow(`~ ${getTypeStrFromPath(change.path)} ` + displayPath + colors.gray(wsNote) + (change.codebase ? ` (codebase changed)` : "")));
67673
+ const changeType = getTypeStrFromPath(change.path);
67674
+ info(colors.yellow(`~ ${changeType} ` + displayPath + colors.gray(wsNote) + (change.codebase ? ` (codebase changed)` : "")));
67666
67675
  if (change.before != change.after) {
67667
- if (change.path.endsWith(".yaml")) {
67676
+ if (changeType === "encryption_key") {
67677
+ showDiff(redactEncryptionKey(change.before), redactEncryptionKey(change.after));
67678
+ } else if (change.path.endsWith(".yaml")) {
67668
67679
  try {
67669
67680
  showDiff(import_yaml11.stringify(yamlParseContent(change.path, change.before), yamlOptions), import_yaml11.stringify(yamlParseContent(change.path, change.after), yamlOptions));
67670
67681
  } catch {
@@ -75804,11 +75815,35 @@ function showDiff(local, remote) {
75804
75815
  }
75805
75816
  function showConflict(path21, local, remote) {
75806
75817
  info(colors.yellow(`- ${path21}`));
75807
- showDiff(local, remote);
75818
+ let isEncryptionKey = false;
75819
+ try {
75820
+ isEncryptionKey = getTypeStrFromPath(path21) === "encryption_key";
75821
+ } catch {}
75822
+ if (isEncryptionKey) {
75823
+ showDiff(redactEncryptionKey(local), redactEncryptionKey(remote));
75824
+ } else {
75825
+ showDiff(local, remote);
75826
+ }
75808
75827
  info("\x1B[31mlocal\x1B[31m - \x1B[32mremote\x1B[32m");
75809
75828
  info(`
75810
75829
  `);
75811
75830
  }
75831
+ function redactEncryptionKey(content) {
75832
+ if (!content)
75833
+ return content;
75834
+ try {
75835
+ const parsed = JSON.parse(content);
75836
+ if (typeof parsed === "string") {
75837
+ return JSON.stringify(redactString(parsed));
75838
+ }
75839
+ } catch {}
75840
+ return redactString(content);
75841
+ }
75842
+ function redactString(s) {
75843
+ if (s.length <= 5)
75844
+ return s;
75845
+ return s.slice(0, 5) + "*".repeat(s.length - 5);
75846
+ }
75812
75847
  async function pushObj(workspace, p, befObj, newObj, plainSecrets, alreadySynced3, message, originalLocalPath, permissionedAsContext, wsSpecific) {
75813
75848
  const typeEnding = getTypeStrFromPath(p);
75814
75849
  if (typeEnding === "app") {
@@ -90161,7 +90196,11 @@ ${options.includeLine}
90161
90196
  }
90162
90197
  function referencesIncludeLine(content, includeLine) {
90163
90198
  for (const line of content.split(/\r?\n/)) {
90164
- if (line.trim() === includeLine) {
90199
+ const trimmed = line.trim();
90200
+ if (trimmed.startsWith("<!--") || trimmed.endsWith("-->")) {
90201
+ continue;
90202
+ }
90203
+ if (trimmed.split(/\s+/).includes(includeLine)) {
90165
90204
  return true;
90166
90205
  }
90167
90206
  }
@@ -93620,7 +93659,7 @@ var object_storage_default = command41;
93620
93659
 
93621
93660
  // src/main.ts
93622
93661
  await init_context();
93623
- var VERSION = "1.711.0";
93662
+ var VERSION = "1.712.0";
93624
93663
  async function checkVersionSafe(cmd) {
93625
93664
  const mainCommand = cmd.getMainCommand();
93626
93665
  const upgradeCommand = mainCommand.getCommand("upgrade");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-cli",
3
- "version": "1.711.0",
3
+ "version": "1.712.0",
4
4
  "description": "CLI for Windmill",
5
5
  "license": "Apache 2.0",
6
6
  "type": "module",