windmill-cli 1.729.0 → 1.730.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 +296 -17
  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.729.0",
16775
+ VERSION: "1.730.0",
16776
16776
  WITH_CREDENTIALS: true,
16777
16777
  interceptors: {
16778
16778
  request: new Interceptors,
@@ -17282,6 +17282,7 @@ __export(exports_services_gen, {
17282
17282
  listPostgresTriggers: () => listPostgresTriggers,
17283
17283
  listPostgresReplicationSlot: () => listPostgresReplicationSlot,
17284
17284
  listPostgresPublication: () => listPostgresPublication,
17285
+ listPipelineFolders: () => listPipelineFolders,
17285
17286
  listPendingInvites: () => listPendingInvites,
17286
17287
  listPathAutocompletePaths: () => listPathAutocompletePaths,
17287
17288
  listOauthLogins: () => listOauthLogins,
@@ -17326,6 +17327,7 @@ __export(exports_services_gen, {
17326
17327
  listEmailTriggers: () => listEmailTriggers,
17327
17328
  listDucklakes: () => listDucklakes,
17328
17329
  listDrafts: () => listDrafts,
17330
+ listDispatchEvents: () => listDispatchEvents,
17329
17331
  listDeploymentRequestEligibleDeployers: () => listDeploymentRequestEligibleDeployers,
17330
17332
  listDedicatedWithDeps: () => listDedicatedWithDeps,
17331
17333
  listDataTables: () => listDataTables,
@@ -17352,6 +17354,7 @@ __export(exports_services_gen, {
17352
17354
  listAuditLogs: () => listAuditLogs,
17353
17355
  listAssetsByUsage: () => listAssetsByUsage,
17354
17356
  listAssets: () => listAssets,
17357
+ listAssetDispatchEdges: () => listAssetDispatchEdges,
17355
17358
  listApps: () => listApps,
17356
17359
  listAppPathsFromWorkspaceRunnable: () => listAppPathsFromWorkspaceRunnable,
17357
17360
  listAllWorkspaceDependencies: () => listAllWorkspaceDependencies,
@@ -17441,6 +17444,7 @@ __export(exports_services_gen, {
17441
17444
  getPostgresVersion: () => getPostgresVersion,
17442
17445
  getPostgresTrigger: () => getPostgresTrigger,
17443
17446
  getPostgresPublication: () => getPostgresPublication,
17447
+ getOwnDraft: () => getOwnDraft,
17444
17448
  getOpenDeploymentRequest: () => getOpenDeploymentRequest,
17445
17449
  getOpenApiYaml: () => getOpenApiYaml,
17446
17450
  getOidcToken: () => getOidcToken,
@@ -17546,6 +17550,7 @@ __export(exports_services_gen, {
17546
17550
  getAzureTrigger: () => getAzureTrigger,
17547
17551
  getAuditLogsS3Status: () => getAuditLogsS3Status,
17548
17552
  getAuditLog: () => getAuditLog,
17553
+ getAssetsGraph: () => getAssetsGraph,
17549
17554
  getArgsFromHistoryOrSavedInput: () => getArgsFromHistoryOrSavedInput,
17550
17555
  getApprovalInfo: () => getApprovalInfo,
17551
17556
  getAppLiteByPath: () => getAppLiteByPath,
@@ -20351,6 +20356,16 @@ var backendVersion = () => {
20351
20356
  404: "no draft for that owner at that path"
20352
20357
  }
20353
20358
  });
20359
+ }, getOwnDraft = (data3) => {
20360
+ return request(OpenAPI, {
20361
+ method: "GET",
20362
+ url: "/w/{workspace}/drafts/get_own/{kind}/{path}",
20363
+ path: {
20364
+ workspace: data3.workspace,
20365
+ kind: data3.kind,
20366
+ path: data3.path
20367
+ }
20368
+ });
20354
20369
  }, updateDraft = (data3) => {
20355
20370
  return request(OpenAPI, {
20356
20371
  method: "POST",
@@ -22300,6 +22315,27 @@ var backendVersion = () => {
22300
22315
  id: data3.id
22301
22316
  }
22302
22317
  });
22318
+ }, listDispatchEvents = (data3) => {
22319
+ return request(OpenAPI, {
22320
+ method: "GET",
22321
+ url: "/w/{workspace}/jobs_u/dispatch_events/{id}",
22322
+ path: {
22323
+ workspace: data3.workspace,
22324
+ id: data3.id
22325
+ }
22326
+ });
22327
+ }, listAssetDispatchEdges = (data3) => {
22328
+ return request(OpenAPI, {
22329
+ method: "GET",
22330
+ url: "/w/{workspace}/jobs/asset_dispatch_edges",
22331
+ path: {
22332
+ workspace: data3.workspace
22333
+ },
22334
+ query: {
22335
+ path_start: data3.pathStart,
22336
+ created_after: data3.createdAfter
22337
+ }
22338
+ });
22303
22339
  }, deleteCompletedJob = (data3) => {
22304
22340
  return request(OpenAPI, {
22305
22341
  method: "POST",
@@ -25175,6 +25211,26 @@ var backendVersion = () => {
25175
25211
  workspace: data3.workspace
25176
25212
  }
25177
25213
  });
25214
+ }, getAssetsGraph = (data3) => {
25215
+ return request(OpenAPI, {
25216
+ method: "GET",
25217
+ url: "/w/{workspace}/assets/graph",
25218
+ path: {
25219
+ workspace: data3.workspace
25220
+ },
25221
+ query: {
25222
+ asset_kinds: data3.assetKinds,
25223
+ folder: data3.folder
25224
+ }
25225
+ });
25226
+ }, listPipelineFolders = (data3) => {
25227
+ return request(OpenAPI, {
25228
+ method: "GET",
25229
+ url: "/w/{workspace}/assets/pipelines",
25230
+ path: {
25231
+ workspace: data3.workspace
25232
+ }
25233
+ });
25178
25234
  }, listVolumes = (data3) => {
25179
25235
  return request(OpenAPI, {
25180
25236
  method: "GET",
@@ -25364,7 +25420,7 @@ var init_auth = __esm(async () => {
25364
25420
  });
25365
25421
 
25366
25422
  // src/core/constants.ts
25367
- var WM_FORK_PREFIX = "wm-fork", VERSION = "1.729.0";
25423
+ var WM_FORK_PREFIX = "wm-fork", VERSION = "1.730.0";
25368
25424
 
25369
25425
  // src/utils/git.ts
25370
25426
  var exports_git = {};
@@ -37288,7 +37344,14 @@ function inferContentTypeFromFilePath(contentPath, defaultTs) {
37288
37344
  } else if (contentPath.endsWith(".r")) {
37289
37345
  return "rlang";
37290
37346
  } else {
37291
- throw new Error("Invalid language: " + contentPath.substring(contentPath.lastIndexOf(".")));
37347
+ const ext = contentPath.substring(contentPath.lastIndexOf("."));
37348
+ let hint = "";
37349
+ if (ext === ".sql") {
37350
+ hint = `
37351
+ Bare .sql is ambiguous — use a dialect extension: .pg.sql (postgresql), .my.sql (mysql), .bq.sql (bigquery), .sf.sql (snowflake), .ms.sql (mssql), .odb.sql (oracledb), .duckdb.sql (duckdb)`;
37352
+ }
37353
+ throw new Error(`Cannot infer script language from extension '${ext}' (file ${contentPath}).` + hint + `
37354
+ Supported extensions: .ts (bun/deno), .py, .go, .sh, .ps1, .php, .rs, .cs, .nu, .java, .rb, .r, .gql, .playbook.yml, .pg.sql, .my.sql, .bq.sql, .sf.sql, .ms.sql, .odb.sql, .duckdb.sql`);
37292
37355
  }
37293
37356
  }
37294
37357
  var workspaceDependenciesLanguages;
@@ -84997,6 +85060,9 @@ datatable related commands
84997
85060
  - \`datatable run <sql:string>\` - run a SQL query on a datatable
84998
85061
  - \`-n --name <name:string>\` - Datatable name (default: main)
84999
85062
  - \`-s --silent\` - Output only the final result as JSON. Useful for scripting.
85063
+ - \`datatable create [name:string]\` - register a datatable database in the workspace (default: instance-backed 'main') so scripts can use datatable://<name>
85064
+ - \`--resource <resource:string>\` - Back the datatable with an existing postgresql resource path instead of the instance database
85065
+ - \`--force\` - Allow adding to a workspace that already has datatables (fork metadata on existing ones is not preserved)
85000
85066
  - \`datatable serve\` - Serve all datatables as a Postgres-wire endpoint (psql, DBeaver, pgAdmin); the client picks the datatable via the database name in its connection string
85001
85067
  - \`--port <port:number>\` - Port to listen on (default: first free port in 5433-5500)
85002
85068
  - \`--host <host:string>\` - Bind address (default: 127.0.0.1)
@@ -85326,6 +85392,17 @@ Object storage (S3) related commands. Operates on the workspace's default object
85326
85392
  - \`--csv-separator <csvSeparator:string>\` - CSV column separator (default ,)
85327
85393
  - \`--csv-header\` - Treat the first CSV row as a header
85328
85394
 
85395
+ ### pipeline
85396
+
85397
+ inspect asset-driven pipelines (scripts marked \`// pipeline\`, wired by \`// on <spec>\` annotations)
85398
+
85399
+ **Subcommands:**
85400
+
85401
+ - \`pipeline list\` - list pipeline folders in the workspace
85402
+ - \`--json\` - Output as JSON (for piping to jq)
85403
+ - \`pipeline show <folder:string>\` - render a pipeline folder's DAG (sources, lineage, subscriptions) in the terminal
85404
+ - \`--json\` - Output the raw asset graph as JSON
85405
+
85329
85406
  ### protection-rules
85330
85407
 
85331
85408
  Sync workspace protection rules between protection-rules.yaml and Windmill. The file is keyed by workspace name; keys must match wmill.yaml 'workspaces'.
@@ -94205,15 +94282,216 @@ async function run4(opts, sql) {
94205
94282
  const name = opts.name ?? DEFAULT_DATATABLE_NAME2;
94206
94283
  await runCatalogQuery(opts, "datatable", name, sql);
94207
94284
  }
94285
+ async function create3(opts, name) {
94286
+ const workspace = await resolveWorkspace(opts);
94287
+ await requireLogin(opts);
94288
+ const dtName = name ?? DEFAULT_DATATABLE_NAME2;
94289
+ const existing = await listDataTables({
94290
+ workspace: workspace.workspaceId
94291
+ });
94292
+ if (existing.some((d3) => d3.name === dtName)) {
94293
+ throw new Error(`Datatable '${dtName}' already exists in this workspace`);
94294
+ }
94295
+ if (existing.length > 0 && !opts.force) {
94296
+ throw new Error(`Workspace already has datatable(s): ${existing.map((d3) => d3.name).join(", ")}. Re-run with --force to add '${dtName}' ` + "(note: fork metadata on existing datatables is not preserved)");
94297
+ }
94298
+ const datatables = {};
94299
+ for (const d3 of existing) {
94300
+ datatables[d3.name] = {
94301
+ database: {
94302
+ resource_type: d3.resource_type,
94303
+ resource_path: d3.resource_path ?? undefined
94304
+ }
94305
+ };
94306
+ }
94307
+ datatables[dtName] = opts.resource ? { database: { resource_type: "postgresql", resource_path: opts.resource } } : { database: { resource_type: "instance", resource_path: "datatable_db" } };
94308
+ await editDataTableConfig({
94309
+ workspace: workspace.workspaceId,
94310
+ requestBody: { settings: { datatables } }
94311
+ });
94312
+ info(`Datatable '${dtName}' created (${opts.resource ? `postgresql resource ${opts.resource}` : "instance-backed"}). Scripts can now use datatable://${dtName}.`);
94313
+ }
94208
94314
  async function serve2(opts) {
94209
94315
  await serve(opts);
94210
94316
  }
94211
94317
  async function psql2(opts) {
94212
94318
  await psql(opts);
94213
94319
  }
94214
- var command40 = new Command().description("datatable related commands").command("list", "list all datatables in the workspace").option("--json", "Output as JSON (for piping to jq)").action(list17).command("run", "run a SQL query on a datatable").arguments("<sql:string>").option("-n --name <name:string>", "Datatable name (default: main)").option("-s --silent", "Output only the final result as JSON. Useful for scripting.").action(run4).command("serve", "Serve all datatables as a Postgres-wire endpoint (psql, DBeaver, pgAdmin); the client picks the datatable via the database name in its connection string").option("--port <port:number>", "Port to listen on (default: first free port in 5433-5500)").option("--host <host:string>", "Bind address (default: 127.0.0.1)").option("--password <password:string>", "Password for Postgres clients (default: generate a random password at startup)").action(serve2).command("psql", "Start a serve listener and launch psql connected to it").option("-n --name <name:string>", "Datatable to connect psql to (default: main)").option("--port <port:number>", "Port the proxy listens on (default: first free port in 5433-5500)").option("--host <host:string>", "Bind address for the proxy (default: 127.0.0.1)").option("--password <password:string>", "Password for the temporary Postgres proxy (default: generate a random password at startup)").action(psql2);
94320
+ var command40 = new Command().description("datatable related commands").command("list", "list all datatables in the workspace").option("--json", "Output as JSON (for piping to jq)").action(list17).command("run", "run a SQL query on a datatable").arguments("<sql:string>").option("-n --name <name:string>", "Datatable name (default: main)").option("-s --silent", "Output only the final result as JSON. Useful for scripting.").action(run4).command("create", "register a datatable database in the workspace (default: instance-backed 'main') so scripts can use datatable://<name>").arguments("[name:string]").option("--resource <resource:string>", "Back the datatable with an existing postgresql resource path instead of the instance database").option("--force", "Allow adding to a workspace that already has datatables (fork metadata on existing ones is not preserved)").action(create3).command("serve", "Serve all datatables as a Postgres-wire endpoint (psql, DBeaver, pgAdmin); the client picks the datatable via the database name in its connection string").option("--port <port:number>", "Port to listen on (default: first free port in 5433-5500)").option("--host <host:string>", "Bind address (default: 127.0.0.1)").option("--password <password:string>", "Password for Postgres clients (default: generate a random password at startup)").action(serve2).command("psql", "Start a serve listener and launch psql connected to it").option("-n --name <name:string>", "Datatable to connect psql to (default: main)").option("--port <port:number>", "Port the proxy listens on (default: first free port in 5433-5500)").option("--host <host:string>", "Bind address for the proxy (default: 127.0.0.1)").option("--password <password:string>", "Password for the temporary Postgres proxy (default: generate a random password at startup)").action(psql2);
94215
94321
  var datatable_default = command40;
94216
94322
 
94323
+ // src/commands/pipeline/pipeline.ts
94324
+ init_mod3();
94325
+ init_mod6();
94326
+ init_colors2();
94327
+ init_gen();
94328
+ init_services_gen();
94329
+ init_log();
94330
+ await __promiseAll([
94331
+ init_auth(),
94332
+ init_context()
94333
+ ]);
94334
+ async function apiGet(path23) {
94335
+ const response = await fetch(`${OpenAPI.BASE}${path23}`, {
94336
+ headers: { Authorization: `Bearer ${OpenAPI.TOKEN}` }
94337
+ });
94338
+ if (!response.ok) {
94339
+ const body = await response.text();
94340
+ throw new Error(`GET ${path23} -> ${response.status}: ${body}`);
94341
+ }
94342
+ return await response.json();
94343
+ }
94344
+ async function list18(opts) {
94345
+ if (opts.json)
94346
+ setSilent(true);
94347
+ const workspace = await resolveWorkspace(opts);
94348
+ await requireLogin(opts);
94349
+ const items = await apiGet(`/w/${workspace.workspaceId}/assets/pipelines`);
94350
+ if (opts.json) {
94351
+ console.log(JSON.stringify(items));
94352
+ } else if (items.length === 0) {
94353
+ info("No pipelines in this workspace. Mark scripts with a `// pipeline` comment (plus `// on <spec>` triggers) and push them into a folder.");
94354
+ } else {
94355
+ new Table2().header(["Folder", "Scripts"]).padding(2).border(true).body(items.map((p3) => [`f/${p3.folder}`, String(p3.script_count)])).render();
94356
+ }
94357
+ }
94358
+ var ASSET_KINDS = "s3object,ducklake,datatable,volume";
94359
+ function assetUri(kind, path23) {
94360
+ const prefix = kind === "s3object" ? "s3" : kind;
94361
+ return `${prefix}://${path23}`;
94362
+ }
94363
+ function shortName(scriptPath) {
94364
+ return scriptPath.split("/").pop() ?? scriptPath;
94365
+ }
94366
+ function pushTo(map, key, val) {
94367
+ (map.get(key) ?? map.set(key, []).get(key)).push(val);
94368
+ }
94369
+ async function show2(opts, folder) {
94370
+ if (opts.json)
94371
+ setSilent(true);
94372
+ const workspace = await resolveWorkspace(opts);
94373
+ await requireLogin(opts);
94374
+ const f3 = folder.replace(/^f\//, "").replace(/\/$/, "");
94375
+ const graph = await apiGet(`/w/${workspace.workspaceId}/assets/graph?folder=${encodeURIComponent(f3)}&asset_kinds=${ASSET_KINDS}`);
94376
+ if (opts.json) {
94377
+ console.log(JSON.stringify(graph));
94378
+ return;
94379
+ }
94380
+ if (graph.runnables.length === 0) {
94381
+ info(`No pipeline scripts in f/${f3}. Mark scripts with a \`// pipeline\` comment and push them.`);
94382
+ return;
94383
+ }
94384
+ const writesByScript = new Map;
94385
+ for (const e2 of graph.edges) {
94386
+ if (e2.access_type === "w" || e2.access_type === "rw") {
94387
+ const uri = assetUri(e2.asset_kind, e2.asset_path);
94388
+ pushTo(writesByScript, e2.runnable_path, uri);
94389
+ }
94390
+ }
94391
+ const subsByAsset = new Map;
94392
+ const subsByScript = new Map;
94393
+ const nativeByScript = new Map;
94394
+ for (const t2 of graph.triggers) {
94395
+ if (t2.trigger_kind === "asset") {
94396
+ const at = t2;
94397
+ const uri = assetUri(at.asset_kind, at.asset_path);
94398
+ pushTo(subsByAsset, uri, t2.runnable_path);
94399
+ pushTo(subsByScript, t2.runnable_path, uri);
94400
+ } else {
94401
+ const nt = t2;
94402
+ pushTo(nativeByScript, t2.runnable_path, {
94403
+ kind: nt.trigger_kind,
94404
+ path: nt.path,
94405
+ missing: nt.missing
94406
+ });
94407
+ }
94408
+ }
94409
+ function triggerBadges(script) {
94410
+ const out = [];
94411
+ for (const t2 of nativeByScript.get(script) ?? []) {
94412
+ if (t2.kind === "data_upload") {
94413
+ out.push(colors.magenta("[data upload]"));
94414
+ } else if (t2.missing) {
94415
+ out.push(colors.red(`[${t2.kind} ✗ missing]`));
94416
+ } else {
94417
+ out.push(colors.yellow(`[${t2.kind}${t2.path ? ` ${t2.path}` : ""}]`));
94418
+ }
94419
+ }
94420
+ return out.length > 0 ? " " + out.join(" ") : "";
94421
+ }
94422
+ const printed = new Set;
94423
+ const lines = [];
94424
+ function printScript(script, prefix, extraOn) {
94425
+ const alsoOn = extraOn && extraOn.length > 0 ? colors.dim(` (also on: ${extraOn.join(", ")})`) : "";
94426
+ if (printed.has(script)) {
94427
+ lines.push(`${prefix}${colors.bold(shortName(script))}${colors.dim(" ↻ shown above")}`);
94428
+ return;
94429
+ }
94430
+ printed.add(script);
94431
+ lines.push(`${prefix}${colors.bold(shortName(script))}${triggerBadges(script)}${alsoOn}`);
94432
+ const childPrefix = prefix.replace(/├─ $/, "│ ").replace(/└─ $/, " ");
94433
+ const writes = [...writesByScript.get(script) ?? []].sort();
94434
+ writes.forEach((uri, i) => {
94435
+ const lastAsset = i === writes.length - 1;
94436
+ const assetBranch = lastAsset ? "└─▶ " : "├─▶ ";
94437
+ lines.push(`${childPrefix}${assetBranch}${colors.cyan(uri)}`);
94438
+ const assetChildPrefix = childPrefix + (lastAsset ? " " : "│ ");
94439
+ const subs = [...subsByAsset.get(uri) ?? []].sort();
94440
+ subs.forEach((sub, j2) => {
94441
+ const branch = j2 === subs.length - 1 ? "└─ " : "├─ ";
94442
+ const otherOn = (subsByScript.get(sub) ?? []).filter((u2) => u2 !== uri);
94443
+ printScript(sub, assetChildPrefix + branch, otherOn);
94444
+ });
94445
+ });
94446
+ }
94447
+ const roots = graph.runnables.map((r2) => r2.path).filter((p3) => !subsByScript.get(p3)?.length).sort();
94448
+ const MARKER_KINDS = ["data_upload", "webhook", "email"];
94449
+ await Promise.all(roots.map(async (p3) => {
94450
+ const r2 = graph.runnables.find((x3) => x3.path === p3);
94451
+ if (r2?.usage_kind !== "script")
94452
+ return;
94453
+ try {
94454
+ const script = await getScriptByPath({
94455
+ workspace: workspace.workspaceId,
94456
+ path: p3
94457
+ });
94458
+ const existing = nativeByScript.get(p3) ?? [];
94459
+ for (const line of (script.content ?? "").split(`
94460
+ `)) {
94461
+ const m3 = line.match(/^\s*(?:\/\/|--|#)\s*on\s+(\w+)\s*$/);
94462
+ if (!m3)
94463
+ continue;
94464
+ const kind = m3[1];
94465
+ if (!MARKER_KINDS.includes(kind))
94466
+ continue;
94467
+ if (!existing.some((t2) => t2.kind === kind)) {
94468
+ existing.push({ kind });
94469
+ }
94470
+ }
94471
+ if (existing.length > 0)
94472
+ nativeByScript.set(p3, existing);
94473
+ } catch {}
94474
+ }));
94475
+ const scriptCount = graph.runnables.length;
94476
+ const assetCount = graph.assets.length;
94477
+ info(colors.bold(`Pipeline f/${f3}`) + colors.dim(` — ${scriptCount} script${scriptCount === 1 ? "" : "s"} · ${assetCount} asset${assetCount === 1 ? "" : "s"}`));
94478
+ lines.push("");
94479
+ for (const root of roots) {
94480
+ printScript(root, "");
94481
+ lines.push("");
94482
+ }
94483
+ for (const r2 of graph.runnables) {
94484
+ if (!printed.has(r2.path)) {
94485
+ printScript(r2.path, "");
94486
+ lines.push("");
94487
+ }
94488
+ }
94489
+ console.log(lines.join(`
94490
+ `));
94491
+ }
94492
+ var command41 = new Command().description("inspect asset-driven pipelines (scripts marked `// pipeline`, wired by `// on <spec>` annotations)").command("list", "list pipeline folders in the workspace").option("--json", "Output as JSON (for piping to jq)").action(list18).command("show", "render a pipeline folder's DAG (sources, lineage, subscriptions) in the terminal").arguments("<folder:string>").option("--json", "Output the raw asset graph as JSON").action(show2);
94493
+ var pipeline_default = command41;
94494
+
94217
94495
  // src/commands/ducklake/ducklake.ts
94218
94496
  init_mod3();
94219
94497
  init_mod6();
@@ -94224,7 +94502,7 @@ await __promiseAll([
94224
94502
  init_context()
94225
94503
  ]);
94226
94504
  var DEFAULT_DUCKLAKE_NAME = "main";
94227
- async function list18(opts) {
94505
+ async function list19(opts) {
94228
94506
  if (opts.json)
94229
94507
  setSilent(true);
94230
94508
  const workspace = await resolveWorkspace(opts);
@@ -94242,8 +94520,8 @@ async function run5(opts, sql) {
94242
94520
  const name = opts.name ?? DEFAULT_DUCKLAKE_NAME;
94243
94521
  await runCatalogQuery(opts, "ducklake", name, sql);
94244
94522
  }
94245
- var command41 = new Command().description("ducklake related commands").command("list", "list all ducklakes in the workspace").option("--json", "Output as JSON (for piping to jq)").action(list18).command("run", "run a SQL query on a ducklake").arguments("<sql:string>").option("-n --name <name:string>", "Ducklake name (default: main)").option("-s --silent", "Output only the final result as JSON. Useful for scripting.").action(run5);
94246
- var ducklake_default = command41;
94523
+ var command42 = new Command().description("ducklake related commands").command("list", "list all ducklakes in the workspace").option("--json", "Output as JSON (for piping to jq)").action(list19).command("run", "run a SQL query on a ducklake").arguments("<sql:string>").option("-n --name <name:string>", "Ducklake name (default: main)").option("-s --silent", "Output only the final result as JSON. Useful for scripting.").action(run5);
94524
+ var ducklake_default = command42;
94247
94525
 
94248
94526
  // src/commands/object-storage/object-storage.ts
94249
94527
  init_mod3();
@@ -94444,8 +94722,8 @@ async function preview3(opts, fileKey) {
94444
94722
  `);
94445
94723
  }
94446
94724
  }
94447
- var command42 = new Command().alias("s3").description("Object storage (S3) related commands. Operates on the workspace's default object storage; use --storage to target a configured secondary storage.").action(listStorages).command("list", "List configured object storages for the workspace (default + secondary).").option("--json", "Output as JSON (for piping to jq)").action(listStorages).command("files", "List files in an object storage. Optionally filter by prefix.").alias("ls").arguments("[prefix:string]").option("--json", "Output as JSON (for piping to jq)").option("--max-keys <maxKeys:number>", "Page size (default 100)").option("--marker <marker:string>", "Pagination marker from a previous response").option("--storage <storage:string>", "Secondary storage name (omit for the workspace default)").action(listFiles).command("upload", "Upload a local file to object storage at the given file key.").arguments("<local_path:string> <file_key:string>").option("--storage <storage:string>", "Secondary storage name").option("--content-type <contentType:string>", "Content-Type header to set on the object").option("--content-disposition <contentDisposition:string>", "Content-Disposition header to set on the object").action(upload).command("download", "Download an object to a local file (or stdout). Default output path is the basename of the file key in the current directory.").arguments("<file_key:string> [output_path:string]").option("--storage <storage:string>", "Secondary storage name").option("--stdout", "Write file contents to stdout instead of a file").action(download).command("delete", "Delete an object from object storage. Prompts for confirmation unless --yes is set.").arguments("<file_key:string>").option("--storage <storage:string>", "Secondary storage name").option("--yes", "Skip the confirmation prompt").action(del).command("move", "Move an object within the same storage (rename or relocate by key).").arguments("<src_file_key:string> <dest_file_key:string>").option("--storage <storage:string>", "Secondary storage name").action(move).command("info", "Show metadata (size, mime, last-modified) for an object.").arguments("<file_key:string>").option("--json", "Output as JSON (for piping to jq)").option("--storage <storage:string>", "Secondary storage name").action(info2).command("preview", "Preview the contents of an object (text/CSV). Use --bytes-from / --bytes-length to peek at a slice of binary files.").arguments("<file_key:string>").option("--storage <storage:string>", "Secondary storage name").option("--mime <mime:string>", "Override the detected mime type (e.g. text/csv)").option("--bytes-from <bytesFrom:number>", "Start offset in bytes").option("--bytes-length <bytesLength:number>", "Number of bytes to read").option("--csv-separator <csvSeparator:string>", "CSV column separator (default ,)").option("--csv-header", "Treat the first CSV row as a header").action(preview3);
94448
- var object_storage_default = command42;
94725
+ var command43 = new Command().alias("s3").description("Object storage (S3) related commands. Operates on the workspace's default object storage; use --storage to target a configured secondary storage.").action(listStorages).command("list", "List configured object storages for the workspace (default + secondary).").option("--json", "Output as JSON (for piping to jq)").action(listStorages).command("files", "List files in an object storage. Optionally filter by prefix.").alias("ls").arguments("[prefix:string]").option("--json", "Output as JSON (for piping to jq)").option("--max-keys <maxKeys:number>", "Page size (default 100)").option("--marker <marker:string>", "Pagination marker from a previous response").option("--storage <storage:string>", "Secondary storage name (omit for the workspace default)").action(listFiles).command("upload", "Upload a local file to object storage at the given file key.").arguments("<local_path:string> <file_key:string>").option("--storage <storage:string>", "Secondary storage name").option("--content-type <contentType:string>", "Content-Type header to set on the object").option("--content-disposition <contentDisposition:string>", "Content-Disposition header to set on the object").action(upload).command("download", "Download an object to a local file (or stdout). Default output path is the basename of the file key in the current directory.").arguments("<file_key:string> [output_path:string]").option("--storage <storage:string>", "Secondary storage name").option("--stdout", "Write file contents to stdout instead of a file").action(download).command("delete", "Delete an object from object storage. Prompts for confirmation unless --yes is set.").arguments("<file_key:string>").option("--storage <storage:string>", "Secondary storage name").option("--yes", "Skip the confirmation prompt").action(del).command("move", "Move an object within the same storage (rename or relocate by key).").arguments("<src_file_key:string> <dest_file_key:string>").option("--storage <storage:string>", "Secondary storage name").action(move).command("info", "Show metadata (size, mime, last-modified) for an object.").arguments("<file_key:string>").option("--json", "Output as JSON (for piping to jq)").option("--storage <storage:string>", "Secondary storage name").action(info2).command("preview", "Preview the contents of an object (text/CSV). Use --bytes-from / --bytes-length to peek at a slice of binary files.").arguments("<file_key:string>").option("--storage <storage:string>", "Secondary storage name").option("--mime <mime:string>", "Override the detected mime type (e.g. text/csv)").option("--bytes-from <bytesFrom:number>", "Start offset in bytes").option("--bytes-length <bytesLength:number>", "Number of bytes to read").option("--csv-separator <csvSeparator:string>", "CSV column separator (default ,)").option("--csv-header", "Treat the first CSV row as a header").action(preview3);
94726
+ var object_storage_default = command43;
94449
94727
 
94450
94728
  // src/main.ts
94451
94729
  await init_context();
@@ -94465,7 +94743,7 @@ async function checkVersionSafe(cmd) {
94465
94743
  }
94466
94744
  mainCommand.version(`${currentVersion} (New version available: ${latestVersion}. Run '${mainCommand.getName()} upgrade' to upgrade to the latest version!)`);
94467
94745
  }
94468
- var command43 = 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).helpOption("-h, --help", "Show this help.", {
94746
+ var command44 = 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).helpOption("-h, --help", "Show this help.", {
94469
94747
  action: async function() {
94470
94748
  const self2 = this;
94471
94749
  const long = self2.getRawArgs().includes(`--${self2.getHelpOption()?.name}`);
@@ -94477,7 +94755,7 @@ var command43 = new Command().name("wmill").action(() => info(`Welcome to Windmi
94477
94755
  self2.showHelp({ long });
94478
94756
  self2.exit();
94479
94757
  }
94480
- }).command("init", init_default).command("refresh", refresh_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("protection-rules", protection_rules_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("job", job_default).command("group", group_default).command("audit", audit_default).command("token", token_default).command("generate-metadata", generate_metadata_default).command("docs", docs_default).command("config", config_default).command("datatable", datatable_default).command("ducklake", ducklake_default).command("object-storage", object_storage_default).command("version --version", "Show version information").action(async (opts) => {
94758
+ }).command("init", init_default).command("refresh", refresh_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("protection-rules", protection_rules_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("job", job_default).command("group", group_default).command("audit", audit_default).command("token", token_default).command("generate-metadata", generate_metadata_default).command("docs", docs_default).command("config", config_default).command("datatable", datatable_default).command("pipeline", pipeline_default).command("ducklake", ducklake_default).command("object-storage", object_storage_default).command("version --version", "Show version information").action(async (opts) => {
94481
94759
  console.log("CLI version: " + VERSION);
94482
94760
  try {
94483
94761
  const provider2 = new NpmProvider({ package: "windmill-cli" });
@@ -94507,20 +94785,20 @@ var command43 = new Command().name("wmill").action(() => info(`Welcome to Windmi
94507
94785
  error(e2);
94508
94786
  info("Try running with sudo and otherwise check the result of the command: npm uninstall windmill-cli && npm install -g windmill-cli");
94509
94787
  })).command("completions", new Command().description("Generate shell completions.").command("bash", new Command().description("Generate bash completions.").action(() => {
94510
- process.stdout.write(generateShellCompletions(command43, "bash") + `
94788
+ process.stdout.write(generateShellCompletions(command44, "bash") + `
94511
94789
  `);
94512
94790
  })).command("zsh", new Command().description("Generate zsh completions.").action(() => {
94513
- process.stdout.write(generateShellCompletions(command43, "zsh") + `
94791
+ process.stdout.write(generateShellCompletions(command44, "zsh") + `
94514
94792
  `);
94515
94793
  })).command("fish", new Command().description("Generate fish completions.").action(() => {
94516
- process.stdout.write(generateShellCompletions(command43, "fish") + `
94794
+ process.stdout.write(generateShellCompletions(command44, "fish") + `
94517
94795
  `);
94518
94796
  })));
94519
94797
  async function main2() {
94520
94798
  try {
94521
94799
  const args = process.argv.slice(2);
94522
94800
  if (args.length === 0) {
94523
- command43.showHelp();
94801
+ command44.showHelp();
94524
94802
  }
94525
94803
  const LOG_LEVEL = args.includes("--verbose") || args.includes("--debug") ? "DEBUG" : "INFO";
94526
94804
  setShowDiffs(args.includes("--show-diffs"));
@@ -94540,7 +94818,7 @@ async function main2() {
94540
94818
  const { warnIfTsconfigStale: warnIfTsconfigStale2 } = await init_tsconfig().then(() => exports_tsconfig);
94541
94819
  await warnIfTsconfigStale2().catch(() => {});
94542
94820
  }
94543
- await command43.parse(args);
94821
+ await command44.parse(args);
94544
94822
  } catch (e2) {
94545
94823
  if (e2 && typeof e2 === "object" && "name" in e2 && e2.name === "ApiError") {
94546
94824
  const body = e2.body;
@@ -94576,7 +94854,7 @@ if (isMain()) {
94576
94854
  process.stdin.destroy();
94577
94855
  });
94578
94856
  }
94579
- var main_default = command43;
94857
+ var main_default = command44;
94580
94858
  export {
94581
94859
  add as workspaceAdd,
94582
94860
  workspace_default as workspace,
@@ -94592,6 +94870,7 @@ export {
94592
94870
  push4 as push,
94593
94871
  pull,
94594
94872
  protection_rules_default as protectionRules,
94873
+ pipeline_default as pipeline,
94595
94874
  object_storage_default as objectStorage,
94596
94875
  lint_default as lint,
94597
94876
  job_default as job,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-cli",
3
- "version": "1.729.0",
3
+ "version": "1.730.0",
4
4
  "description": "CLI for Windmill",
5
5
  "license": "Apache 2.0",
6
6
  "type": "module",