windmill-cli 1.855.0 → 1.856.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 +23 -13
  2. package/package.json +1 -1
package/esm/main.js CHANGED
@@ -16766,7 +16766,7 @@ var init_OpenAPI = __esm(() => {
16766
16766
  PASSWORD: undefined,
16767
16767
  TOKEN: getEnv3("WM_TOKEN"),
16768
16768
  USERNAME: undefined,
16769
- VERSION: "1.855.0",
16769
+ VERSION: "1.856.0",
16770
16770
  WITH_CREDENTIALS: true,
16771
16771
  interceptors: {
16772
16772
  request: new Interceptors,
@@ -20092,7 +20092,7 @@ var init_auth = __esm(async () => {
20092
20092
  });
20093
20093
 
20094
20094
  // src/core/constants.ts
20095
- var WM_FORK_PREFIX = "wm-fork", VERSION = "1.855.0";
20095
+ var WM_FORK_PREFIX = "wm-fork", VERSION = "1.856.0";
20096
20096
 
20097
20097
  // src/utils/resource_folders.ts
20098
20098
  import { existsSync } from "node:fs";
@@ -22115,11 +22115,18 @@ async function deployItem(provider, kind, path, workspaceFrom, workspaceTo, onBe
22115
22115
  }
22116
22116
  }
22117
22117
  } else if (kind === "variable") {
22118
- const variable = await provider.getVariable({
22118
+ let variable = await provider.getVariable({
22119
22119
  workspace: workspaceFrom,
22120
22120
  path,
22121
- decryptSecret: true
22121
+ decryptSecret: false
22122
22122
  });
22123
+ if (variable.is_secret && !variable.value?.startsWith("$external:")) {
22124
+ variable = await provider.getVariable({
22125
+ workspace: workspaceFrom,
22126
+ path,
22127
+ decryptSecret: true
22128
+ });
22129
+ }
22123
22130
  if (alreadyExists) {
22124
22131
  await provider.updateVariable({
22125
22132
  workspace: workspaceTo,
@@ -35274,16 +35281,18 @@ async function createToken2(opts) {
35274
35281
  async function pushWorkspaceUser(workspace, path, user, localUser) {
35275
35282
  const email = removePathPrefix(removeType(path, "user"), "users");
35276
35283
  debug(`Processing local user ${email}`);
35277
- if (!["operator", "developer", "admin"].includes(localUser.role)) {
35284
+ if (typeof localUser.role !== "string" || localUser.role.trim() === "") {
35278
35285
  throw new Error(`Invalid role for user ${email}: ${localUser.role}`);
35279
35286
  }
35287
+ const isAdmin = localUser.role === "admin";
35288
+ const role = isAdmin ? undefined : localUser.role;
35280
35289
  try {
35281
35290
  const remoteUser = await getUser({
35282
35291
  workspace,
35283
35292
  username: localUser.username
35284
35293
  });
35285
35294
  user = {
35286
- role: remoteUser.is_admin ? "admin" : remoteUser.operator ? "operator" : "developer",
35295
+ role: remoteUser.is_admin ? "admin" : remoteUser.role ?? (remoteUser.operator ? "operator" : "developer"),
35287
35296
  username: remoteUser.username,
35288
35297
  disabled: remoteUser.disabled
35289
35298
  };
@@ -35305,8 +35314,8 @@ async function pushWorkspaceUser(workspace, path, user, localUser) {
35305
35314
  workspace,
35306
35315
  username: localUser.username,
35307
35316
  requestBody: {
35308
- is_admin: localUser.role === "admin",
35309
- operator: localUser.role === "operator",
35317
+ is_admin: isAdmin,
35318
+ role,
35310
35319
  disabled: localUser.disabled
35311
35320
  }
35312
35321
  });
@@ -35324,8 +35333,8 @@ async function pushWorkspaceUser(workspace, path, user, localUser) {
35324
35333
  workspace,
35325
35334
  requestBody: {
35326
35335
  email,
35327
- is_admin: localUser.role === "admin",
35328
- operator: localUser.role === "operator",
35336
+ is_admin: isAdmin,
35337
+ role,
35329
35338
  username: !automatedUsernameCreation ? localUser.username : undefined
35330
35339
  }
35331
35340
  });
@@ -36799,7 +36808,8 @@ var init_settings2 = __esm(async () => {
36799
36808
  "guest_jwt_jwks_url",
36800
36809
  "error_handler_fallback_to_instance_alerts",
36801
36810
  "add_admins_and_developers_to_forks",
36802
- "variable_expiration_handler"
36811
+ "variable_expiration_handler",
36812
+ "role_overrides"
36803
36813
  ];
36804
36814
  RETIRED_SETTINGS = ["guest_access_enabled"];
36805
36815
  instanceSettingsPath = INSTANCE_SETTINGS_PATH;
@@ -58845,7 +58855,7 @@ var init_openflow = __esm(() => {
58845
58855
  openflow_default = {
58846
58856
  openapi: "3.0.3",
58847
58857
  info: {
58848
- version: "1.855.0",
58858
+ version: "1.856.0",
58849
58859
  title: "OpenFlow Spec",
58850
58860
  contact: {
58851
58861
  name: "Ruben Fiszel",
@@ -77133,7 +77143,7 @@ async function get6(opts, path) {
77133
77143
  }
77134
77144
  }
77135
77145
  function looksLikeWorkspaceCiphertext(value) {
77136
- if (value.startsWith("$vault:") || value.startsWith("$aws_sm:") || value.startsWith("$azure_kv:") || value.startsWith("$http_store:")) {
77146
+ if (value.startsWith("$vault:") || value.startsWith("$aws_sm:") || value.startsWith("$azure_kv:") || value.startsWith("$http_store:") || value.startsWith("$external:")) {
77137
77147
  return true;
77138
77148
  }
77139
77149
  if (value.length === 0 || value.length % 4 !== 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-cli",
3
- "version": "1.855.0",
3
+ "version": "1.856.0",
4
4
  "description": "CLI for Windmill",
5
5
  "license": "Apache 2.0",
6
6
  "type": "module",