windmill-cli 1.638.1 → 1.638.3

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.
@@ -32,7 +32,7 @@ export const OpenAPI = {
32
32
  PASSWORD: undefined,
33
33
  TOKEN: getEnv("WM_TOKEN"),
34
34
  USERNAME: undefined,
35
- VERSION: '1.638.1',
35
+ VERSION: '1.638.3',
36
36
  WITH_CREDENTIALS: true,
37
37
  interceptors: {
38
38
  request: new Interceptors(),
@@ -62,36 +62,35 @@ async function initAction(opts) {
62
62
  !opts.useDefault;
63
63
  const shouldSkip = opts.bindProfile != true &&
64
64
  (opts.useDefault || !dntShim.Deno.stdin.isTerminal());
65
- if (shouldSkip) {
66
- return;
67
- }
68
- // Show workspace info if we're binding or prompting
69
- if (shouldBind || shouldPrompt) {
70
- log.info(colors.yellow(`\nCurrent Git branch: ${colors.bold(currentBranch)}`));
71
- log.info(colors.yellow(`Active workspace profile: ${colors.bold(activeWorkspace.name)}`));
72
- log.info(colors.yellow(` ${activeWorkspace.workspaceId} on ${activeWorkspace.remote}`));
73
- }
74
- if (shouldBind ||
75
- (shouldPrompt &&
76
- (await Confirm.prompt({
77
- message: "Bind workspace profile to current Git branch?",
78
- default: true,
79
- })))) {
80
- // Update the config with workspace binding
81
- const currentConfig = await import("../../core/conf.js").then((m) => m.readConfigFile());
82
- if (!currentConfig.gitBranches) {
83
- currentConfig.gitBranches = {};
65
+ if (!shouldSkip) {
66
+ // Show workspace info if we're binding or prompting
67
+ if (shouldBind || shouldPrompt) {
68
+ log.info(colors.yellow(`\nCurrent Git branch: ${colors.bold(currentBranch)}`));
69
+ log.info(colors.yellow(`Active workspace profile: ${colors.bold(activeWorkspace.name)}`));
70
+ log.info(colors.yellow(` ${activeWorkspace.workspaceId} on ${activeWorkspace.remote}`));
84
71
  }
85
- if (!currentConfig.gitBranches[currentBranch]) {
86
- currentConfig.gitBranches[currentBranch] = { overrides: {} };
72
+ if (shouldBind ||
73
+ (shouldPrompt &&
74
+ (await Confirm.prompt({
75
+ message: "Bind workspace profile to current Git branch?",
76
+ default: true,
77
+ })))) {
78
+ // Update the config with workspace binding
79
+ const currentConfig = await import("../../core/conf.js").then((m) => m.readConfigFile());
80
+ if (!currentConfig.gitBranches) {
81
+ currentConfig.gitBranches = {};
82
+ }
83
+ if (!currentConfig.gitBranches[currentBranch]) {
84
+ currentConfig.gitBranches[currentBranch] = { overrides: {} };
85
+ }
86
+ log.info(`binding branch ${currentBranch} to workspace ${activeWorkspace.name} on ${activeWorkspace.remote}`);
87
+ currentConfig.gitBranches[currentBranch].baseUrl =
88
+ activeWorkspace.remote;
89
+ currentConfig.gitBranches[currentBranch].workspaceId =
90
+ activeWorkspace.workspaceId;
91
+ await dntShim.Deno.writeTextFile("wmill.yaml", yamlStringify(currentConfig));
92
+ log.info(colors.green(`✓ Bound branch '${currentBranch}' to workspace '${activeWorkspace.name}'`));
87
93
  }
88
- log.info(`binding branch ${currentBranch} to workspace ${activeWorkspace.name} on ${activeWorkspace.remote}`);
89
- currentConfig.gitBranches[currentBranch].baseUrl =
90
- activeWorkspace.remote;
91
- currentConfig.gitBranches[currentBranch].workspaceId =
92
- activeWorkspace.workspaceId;
93
- await dntShim.Deno.writeTextFile("wmill.yaml", yamlStringify(currentConfig));
94
- log.info(colors.green(`✓ Bound branch '${currentBranch}' to workspace '${activeWorkspace.name}'`));
95
94
  }
96
95
  }
97
96
  }
@@ -106,67 +105,68 @@ async function initAction(opts) {
106
105
  if (!activeWorkspace) {
107
106
  log.info("No workspace configured. Using default settings.");
108
107
  log.info("You can configure a workspace later with 'wmill workspace add'");
109
- return;
110
108
  }
111
- await requireLogin(opts);
112
- const workspace = await resolveWorkspace(opts);
113
- const wmill = await import("../../../gen/services.gen.js");
114
- const settings = await wmill.getSettings({
115
- workspace: workspace.workspaceId,
116
- });
117
- if (settings.git_sync?.repositories &&
118
- settings.git_sync.repositories.length > 0) {
119
- let useBackendSettings = opts.useBackend;
120
- // If repository is specified, implicitly use backend settings
121
- if (opts.repository && !opts.useDefault) {
122
- useBackendSettings = true;
123
- }
124
- if (useBackendSettings === undefined) {
125
- // Interactive prompt
126
- const { Select } = await import("../../../deps.js");
127
- const choice = await Select.prompt({
128
- message: "Git-sync settings found on backend. What would you like to do?",
129
- options: [
130
- {
131
- name: "Use backend git-sync settings",
132
- value: "backend",
133
- },
134
- {
135
- name: "Use default settings",
136
- value: "default",
137
- },
138
- {
139
- name: "Cancel",
140
- value: "cancel",
141
- },
142
- ],
143
- });
144
- if (choice === "cancel") {
145
- // Clean up the created files
146
- try {
147
- await dntShim.Deno.remove("wmill.yaml");
148
- await dntShim.Deno.remove("wmill-lock.yaml");
149
- }
150
- catch (e) {
151
- // Ignore cleanup errors
109
+ else {
110
+ await requireLogin(opts);
111
+ const workspace = await resolveWorkspace(opts);
112
+ const wmill = await import("../../../gen/services.gen.js");
113
+ const settings = await wmill.getSettings({
114
+ workspace: workspace.workspaceId,
115
+ });
116
+ if (settings.git_sync?.repositories &&
117
+ settings.git_sync.repositories.length > 0) {
118
+ let useBackendSettings = opts.useBackend;
119
+ // If repository is specified, implicitly use backend settings
120
+ if (opts.repository && !opts.useDefault) {
121
+ useBackendSettings = true;
122
+ }
123
+ if (useBackendSettings === undefined) {
124
+ // Interactive prompt
125
+ const { Select } = await import("../../../deps.js");
126
+ const choice = await Select.prompt({
127
+ message: "Git-sync settings found on backend. What would you like to do?",
128
+ options: [
129
+ {
130
+ name: "Use backend git-sync settings",
131
+ value: "backend",
132
+ },
133
+ {
134
+ name: "Use default settings",
135
+ value: "default",
136
+ },
137
+ {
138
+ name: "Cancel",
139
+ value: "cancel",
140
+ },
141
+ ],
142
+ });
143
+ if (choice === "cancel") {
144
+ // Clean up the created files
145
+ try {
146
+ await dntShim.Deno.remove("wmill.yaml");
147
+ await dntShim.Deno.remove("wmill-lock.yaml");
148
+ }
149
+ catch (e) {
150
+ // Ignore cleanup errors
151
+ }
152
+ log.info("Init cancelled");
153
+ dntShim.Deno.exit(0);
152
154
  }
153
- log.info("Init cancelled");
154
- dntShim.Deno.exit(0);
155
+ useBackendSettings = choice === "backend";
156
+ }
157
+ if (useBackendSettings) {
158
+ log.info("Applying git-sync settings from backend...");
159
+ // Import and run the pull git-sync settings logic
160
+ const { pullGitSyncSettings } = await import("../gitsync-settings/gitsync-settings.js");
161
+ await pullGitSyncSettings({
162
+ ...opts,
163
+ repository: opts.repository,
164
+ jsonOutput: false,
165
+ diff: false,
166
+ replace: true, // Auto-replace when using backend settings during init
167
+ });
168
+ log.info(colors.green("Git-sync settings applied from backend"));
155
169
  }
156
- useBackendSettings = choice === "backend";
157
- }
158
- if (useBackendSettings) {
159
- log.info("Applying git-sync settings from backend...");
160
- // Import and run the pull git-sync settings logic
161
- const { pullGitSyncSettings } = await import("../gitsync-settings/gitsync-settings.js");
162
- await pullGitSyncSettings({
163
- ...opts,
164
- repository: opts.repository,
165
- jsonOutput: false,
166
- diff: false,
167
- replace: true, // Auto-replace when using backend settings during init
168
- });
169
- log.info(colors.green("Git-sync settings applied from backend"));
170
170
  }
171
171
  }
172
172
  }
package/esm/src/main.js CHANGED
@@ -47,7 +47,7 @@ export { flow, app, script, workspace, resource, resourceType, user, variable, h
47
47
  // console.error(JSON.stringify(event.error, null, 4));
48
48
  // }
49
49
  // });
50
- export const VERSION = "1.638.1";
50
+ export const VERSION = "1.638.3";
51
51
  // Re-exported from constants.ts to maintain backwards compatibility
52
52
  export { WM_FORK_PREFIX } from "./core/constants.js";
53
53
  const command = new Command()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-cli",
3
- "version": "1.638.1",
3
+ "version": "1.638.3",
4
4
  "description": "CLI for Windmill",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/src/commands/init/init.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,OAAO,EAA+B,MAAM,kBAAkB,CAAC;AAqBhF,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAsTD,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;mBAae,CAAC;AAE7B,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/src/commands/init/init.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,OAAO,EAA+B,MAAM,kBAAkB,CAAC;AAqBhF,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAmTD,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;mBAae,CAAC;AAE7B,eAAe,OAAO,CAAC"}
@@ -23,7 +23,7 @@ import { pull as hubPull } from "./commands/hub/hub.js";
23
23
  import { pull, push } from "./commands/sync/sync.js";
24
24
  import { add as workspaceAdd } from "./commands/workspace/workspace.js";
25
25
  export { flow, app, script, workspace, resource, resourceType, user, variable, hub, folder, schedule, trigger, sync, lint, gitsyncSettings, instance, dev, hubPull, pull, push, workspaceAdd, };
26
- export declare const VERSION = "1.638.1";
26
+ export declare const VERSION = "1.638.3";
27
27
  export { WM_FORK_PREFIX } from "./core/constants.js";
28
28
  declare const command: Command<{
29
29
  workspace?: (import("../deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/mod.js").StringType & string) | undefined;