windmill-cli 1.645.0 → 1.646.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 +92 -13
  2. package/package.json +1 -1
package/esm/main.js CHANGED
@@ -11785,7 +11785,7 @@ var init_OpenAPI = __esm(() => {
11785
11785
  PASSWORD: undefined,
11786
11786
  TOKEN: getEnv2("WM_TOKEN"),
11787
11787
  USERNAME: undefined,
11788
- VERSION: "1.645.0",
11788
+ VERSION: "1.646.0",
11789
11789
  WITH_CREDENTIALS: true,
11790
11790
  interceptors: {
11791
11791
  request: new Interceptors,
@@ -14104,6 +14104,7 @@ var backendVersion = () => {
14104
14104
  path: data2.path,
14105
14105
  description: data2.description,
14106
14106
  value: data2.value,
14107
+ broad_filter: data2.broadFilter,
14107
14108
  page: data2.page,
14108
14109
  per_page: data2.perPage
14109
14110
  }
@@ -14463,7 +14464,8 @@ var backendVersion = () => {
14463
14464
  path_start: data2.pathStart,
14464
14465
  path: data2.path,
14465
14466
  description: data2.description,
14466
- value: data2.value
14467
+ value: data2.value,
14468
+ broad_filter: data2.broadFilter
14467
14469
  }
14468
14470
  });
14469
14471
  }, listSearchResource = (data2) => {
@@ -16386,7 +16388,8 @@ var backendVersion = () => {
16386
16388
  has_null_parent: data2.hasNullParent,
16387
16389
  success: data2.success,
16388
16390
  all_workspaces: data2.allWorkspaces,
16389
- is_not_schedule: data2.isNotSchedule
16391
+ is_not_schedule: data2.isNotSchedule,
16392
+ broad_filter: data2.broadFilter
16390
16393
  }
16391
16394
  });
16392
16395
  }, getDbClock = () => {
@@ -16878,7 +16881,8 @@ var backendVersion = () => {
16878
16881
  path_start: data2.pathStart,
16879
16882
  schedule_path: data2.schedulePath,
16880
16883
  description: data2.description,
16881
- summary: data2.summary
16884
+ summary: data2.summary,
16885
+ broad_filter: data2.broadFilter
16882
16886
  }
16883
16887
  });
16884
16888
  }, listSchedulesWithJobs = (data2) => {
@@ -19139,7 +19143,8 @@ var backendVersion = () => {
19139
19143
  usage_path: data2.usagePath,
19140
19144
  asset_kinds: data2.assetKinds,
19141
19145
  path: data2.path,
19142
- columns: data2.columns
19146
+ columns: data2.columns,
19147
+ broad_filter: data2.broadFilter
19143
19148
  }
19144
19149
  });
19145
19150
  }, listAssetsByUsage = (data2) => {
@@ -78233,10 +78238,83 @@ var push12 = new Command().description("Push completed and queued jobs to worksp
78233
78238
  var command28 = new Command().description("Manage jobs (import/export)").command("pull", pull3).command("push", push12);
78234
78239
  var jobs_default = command28;
78235
78240
 
78241
+ // src/commands/docs/docs.ts
78242
+ init_mod3();
78243
+ init_colors2();
78244
+ init_log();
78245
+ await __promiseAll([
78246
+ init_auth(),
78247
+ init_context()
78248
+ ]);
78249
+ async function docs(opts, query) {
78250
+ await requireLogin(opts);
78251
+ const workspace = await resolveWorkspace(opts);
78252
+ const url = `${workspace.remote}api/inkeep`;
78253
+ console.log(colors.bold(`
78254
+ Searching Windmill docs...
78255
+ `));
78256
+ let res;
78257
+ try {
78258
+ res = await fetch(url, {
78259
+ method: "POST",
78260
+ headers: {
78261
+ "Content-Type": "application/json",
78262
+ Authorization: `Bearer ${workspace.token}`
78263
+ },
78264
+ body: JSON.stringify({ query })
78265
+ });
78266
+ } catch (e) {
78267
+ throw new Error(`Network error connecting to ${workspace.remote}: ${e}`);
78268
+ }
78269
+ if (res.status === 403) {
78270
+ info("Windmill documentation search is an Enterprise Edition feature. Please upgrade to use this command.");
78271
+ return;
78272
+ }
78273
+ if (!res.ok) {
78274
+ throw new Error(`Documentation search failed: ${res.status} ${res.statusText}
78275
+ ${await res.text()}`);
78276
+ }
78277
+ const data3 = await res.json();
78278
+ const raw = data3.choices?.[0]?.message?.content;
78279
+ if (!raw) {
78280
+ info("No documentation found for this query.");
78281
+ return;
78282
+ }
78283
+ let parsed;
78284
+ try {
78285
+ parsed = JSON.parse(raw);
78286
+ } catch {
78287
+ throw new Error("Failed to parse documentation response.");
78288
+ }
78289
+ const items = parsed.content ?? [];
78290
+ if (items.length === 0) {
78291
+ info("No documentation found for this query.");
78292
+ return;
78293
+ }
78294
+ if (opts.json) {
78295
+ console.log(JSON.stringify(items, null, 2));
78296
+ return;
78297
+ }
78298
+ for (const item of items) {
78299
+ console.log(colors.bold(colors.cyan(`\uD83D\uDCC4 ${item.title}`)));
78300
+ if (item.url) {
78301
+ console.log(` ${colors.underline(item.url)}`);
78302
+ }
78303
+ const text = item.source?.content?.[0]?.text;
78304
+ if (text) {
78305
+ const snippet = text.length > 500 ? text.slice(0, 500) + "..." : text;
78306
+ console.log(` ${snippet}`);
78307
+ }
78308
+ console.log();
78309
+ }
78310
+ }
78311
+ var command29 = new Command().name("docs").description("Search Windmill documentation. Requires Enterprise Edition.").arguments("<query:string>").option("--json", "Output results as JSON.").action(docs);
78312
+ var docs_default = command29;
78313
+
78236
78314
  // src/main.ts
78237
78315
  await init_context();
78238
- var VERSION = "1.645.0";
78239
- var command29 = 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("version --version", "Show version information").action(async (opts) => {
78316
+ var VERSION = "1.646.0";
78317
+ var command30 = 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("docs", docs_default).command("version --version", "Show version information").action(async (opts) => {
78240
78318
  console.log("CLI version: " + VERSION);
78241
78319
  try {
78242
78320
  const provider = new NpmProvider({ package: "windmill-cli" });
@@ -78266,20 +78344,20 @@ var command29 = new Command().name("wmill").action(() => info(`Welcome to Windmi
78266
78344
  error(e);
78267
78345
  info("Try running with sudo and otherwise check the result of the command: npm uninstall windmill-cli && npm install -g windmill-cli");
78268
78346
  })).command("completions", new Command().description("Generate shell completions.").command("bash", new Command().description("Generate bash completions.").action(() => {
78269
- process.stdout.write(generateShellCompletions(command29, "bash") + `
78347
+ process.stdout.write(generateShellCompletions(command30, "bash") + `
78270
78348
  `);
78271
78349
  })).command("zsh", new Command().description("Generate zsh completions.").action(() => {
78272
- process.stdout.write(generateShellCompletions(command29, "zsh") + `
78350
+ process.stdout.write(generateShellCompletions(command30, "zsh") + `
78273
78351
  `);
78274
78352
  })).command("fish", new Command().description("Generate fish completions.").action(() => {
78275
- process.stdout.write(generateShellCompletions(command29, "fish") + `
78353
+ process.stdout.write(generateShellCompletions(command30, "fish") + `
78276
78354
  `);
78277
78355
  })));
78278
78356
  async function main2() {
78279
78357
  try {
78280
78358
  const args = process.argv.slice(2);
78281
78359
  if (args.length === 0) {
78282
- command29.showHelp();
78360
+ command30.showHelp();
78283
78361
  }
78284
78362
  const LOG_LEVEL = args.includes("--verbose") || args.includes("--debug") ? "DEBUG" : "INFO";
78285
78363
  setShowDiffs(args.includes("--show-diffs"));
@@ -78289,7 +78367,7 @@ async function main2() {
78289
78367
  if (extraHeaders) {
78290
78368
  OpenAPI.HEADERS = extraHeaders;
78291
78369
  }
78292
- await command29.parse(args);
78370
+ await command30.parse(args);
78293
78371
  } catch (e) {
78294
78372
  if (e && typeof e === "object" && "name" in e && e.name === "ApiError") {
78295
78373
  console.log("Server failed. " + e.statusText + ": " + e.body);
@@ -78314,7 +78392,7 @@ if (isMain()) {
78314
78392
  process.stdin.destroy();
78315
78393
  });
78316
78394
  }
78317
- var main_default = command29;
78395
+ var main_default = command30;
78318
78396
  export {
78319
78397
  add as workspaceAdd,
78320
78398
  workspace_default as workspace,
@@ -78335,6 +78413,7 @@ export {
78335
78413
  gitsync_settings_default as gitsyncSettings,
78336
78414
  folder_default as folder,
78337
78415
  flow_default as flow,
78416
+ docs_default as docs,
78338
78417
  dev_default2 as dev,
78339
78418
  main_default as default,
78340
78419
  app_default as app,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-cli",
3
- "version": "1.645.0",
3
+ "version": "1.646.0",
4
4
  "description": "CLI for Windmill",
5
5
  "license": "Apache 2.0",
6
6
  "type": "module",