windmill-cli 1.869.0 → 1.871.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 +149 -5
  2. package/package.json +1 -1
package/esm/main.js CHANGED
@@ -16806,7 +16806,7 @@ var init_OpenAPI = __esm(() => {
16806
16806
  PASSWORD: undefined,
16807
16807
  TOKEN: getEnv3("WM_TOKEN"),
16808
16808
  USERNAME: undefined,
16809
- VERSION: "1.869.0",
16809
+ VERSION: "1.871.0",
16810
16810
  WITH_CREDENTIALS: true,
16811
16811
  interceptors: {
16812
16812
  request: new Interceptors,
@@ -20157,7 +20157,7 @@ var init_auth = __esm(async () => {
20157
20157
  });
20158
20158
 
20159
20159
  // src/core/constants.ts
20160
- var WM_FORK_PREFIX = "wm-fork", VERSION = "1.869.0";
20160
+ var WM_FORK_PREFIX = "wm-fork", VERSION = "1.871.0";
20161
20161
 
20162
20162
  // src/utils/resource_folders.ts
20163
20163
  import { existsSync } from "node:fs";
@@ -59279,7 +59279,7 @@ var init_openflow = __esm(() => {
59279
59279
  openflow_default = {
59280
59280
  openapi: "3.0.3",
59281
59281
  info: {
59282
- version: "1.869.0",
59282
+ version: "1.871.0",
59283
59283
  title: "OpenFlow Spec",
59284
59284
  contact: {
59285
59285
  name: "Ruben Fiszel",
@@ -70786,7 +70786,7 @@ function countDatatableMigrationRecords(changes) {
70786
70786
  return records.size;
70787
70787
  }
70788
70788
  function untrackedDatatableMigrationDeletions(changes, recorded) {
70789
- return changes.filter((c) => c.name === "deleted" && isDatatableMigrationPath(c.path) && !(recorded.kind === "known" && recorded.paths.has(c.path)));
70789
+ return changes.filter((c) => c.name === "deleted" && isDatatableMigrationPath(c.path) && !(recorded.kind === "known" && recorded.paths.has(c.path.replaceAll("\\", "/"))));
70790
70790
  }
70791
70791
  function secretBearingObjectKind(p) {
70792
70792
  if (isFilesetResource(p))
@@ -80160,7 +80160,7 @@ function parseFromFile(p) {
80160
80160
  }
80161
80161
  }
80162
80162
  function parseDatatableMigrationPath(p) {
80163
- const parts = p.split("/");
80163
+ const parts = p.split(/[\\/]/);
80164
80164
  if (parts[0] !== "migrations" || parts[1] !== "datatable" || parts.length !== 4)
80165
80165
  return;
80166
80166
  const m = parts[3].match(/^(\d+)_(.*)\.(up|down)\.sql$/);
@@ -82482,6 +82482,7 @@ var init_skills_gen = __esm(() => {
82482
82482
  { name: "write-pipeline", description: "MUST use when creating or modifying a data pipeline, a set of scripts marked `pipeline` and wired together by `on` / `materialize` annotations." },
82483
82483
  { name: "datatables", description: "MUST use when changing a data table's schema, writing or running its migrations, or working with its roles and permissions." },
82484
82484
  { name: "workspace-settings", description: "MUST use when reading or changing workspace settings, or the settings.yaml file `wmill sync` keeps." },
82485
+ { name: "rich-results", description: "MUST use when a script or flow should return a table, chart, markdown, image, file or map instead of plain JSON." },
82485
82486
  { name: "cli-commands", description: "MUST use when using the CLI, including debugging job failures and inspecting run history via `wmill job`." },
82486
82487
  { name: "preview", description: "MUST use when opening the Windmill dev page / visual preview of a flow, script, or app. Triggers on words like preview, open, navigate to, visualize, see the flow/app/script, and after writing a flow/script/app for visual verification." }
82487
82488
  ];
@@ -90997,6 +90998,149 @@ instance groups, and the keys \`ducklake\`, \`dbt_warehouses\`, \`deploy_ui\`, \
90997
90998
  \`datatable_permissions\` is pushed only with \`includeDatatablePermissions: true\` (or
90998
90999
  \`--include-datatable-permissions\`). A push ignores \`protection_rules\`: \`protection-rules.yaml\` and
90999
91000
  \`wmill protection-rules push\` sync them.
91001
+ `,
91002
+ "rich-results": `---
91003
+ name: rich-results
91004
+ description: MUST use when a script or flow should return a table, chart, markdown, image, file or map instead of plain JSON.
91005
+ ---
91006
+
91007
+ # Rich results
91008
+
91009
+ Windmill renders a script's or flow's return value according to its shape: on run pages, in the
91010
+ script and flow editors, in app result displays and in AI chat run cards. Anything that matches none
91011
+ of the shapes below is shown as JSON.
91012
+
91013
+ ## Shapes
91014
+
91015
+ - \`{ "table-row-object": [{...}, ...] }\`, or a bare array of objects: a table whose columns are the
91016
+ union of the objects' keys.
91017
+ - \`{ "table-col": { "col": [...], ... } }\`, or a bare object of equal-length arrays: a table built
91018
+ column by column.
91019
+ - \`{ "table-row": [["col", ...], [v, ...], ...] }\`: a table whose first row holds the column names.
91020
+ - \`{ "chart": {...} }\`: a bar, line, pie or scatter chart drawn from rows (schema below). A \`chart\`
91021
+ value the schema rejects is shown as JSON, not as a broken chart.
91022
+ - \`{ "markdown": "..." }\` (or \`md\`): rendered markdown.
91023
+ - \`{ "html": "..." }\`: sanitized HTML.
91024
+ - \`{ "png": "<base64>" }\`, likewise \`jpeg\`, \`gif\`, \`svg\`: an image. \`{ "pdf": "<base64>" }\`: a PDF.
91025
+ - \`{ "file": "<base64>", "filename": "report.csv" }\`: a download.
91026
+ - \`{ "map": { "lat": 0, "lon": 0, "zoom": 3, "markers": [{ "lat": 0, "lon": 0, "title": "..." }] } }\`:
91027
+ a map.
91028
+ - \`{ "s3": "path/to/key" }\`: an object in the workspace storage, previewed by type.
91029
+ - \`{ "render_all": [ ... ] }\`: each item rendered in turn with the rules above.
91030
+
91031
+ Each shape is an object with that one key (plus \`filename\` for a file, and an optional \`storage\` for
91032
+ \`s3\`). A result carrying any other key beside it is shown as JSON.
91033
+
91034
+ ## Choosing one
91035
+
91036
+ A chart answers a question at a glance: a trend over time (line), a comparison across categories
91037
+ (bar), parts of a whole with few parts (pie), or a relation between two numbers (scatter). A table
91038
+ answers lookups and holds the exact values. When both help, return both in a \`render_all\`: the chart
91039
+ first, then the table of the same rows.
91040
+
91041
+ Keep a chart to what it shows well: at most 8 series. A pie with more than 8 slices keeps the 7
91042
+ largest and folds the rest into "Other", so prefer a bar chart for many categories. Aggregate before
91043
+ charting: a chart of thousands of raw points says less than one of the totals per day.
91044
+
91045
+ ### Chart and table schema
91046
+
91047
+ A chart or table value, as JSON Schema. Beyond it: \`x\` and every \`y\` must be columns of \`data\`, \`y\` columns hold numbers, a scatter chart's \`x\` column holds numbers, and a pie chart takes exactly one \`y\`.
91048
+
91049
+ \`\`\`json
91050
+ {"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"anyOf":[{"type":"object","properties":{"chart":{"type":"object","properties":{"type":{"description":"bar or line for categories or time, pie for parts of a whole, scatter for two numeric columns","type":"string","enum":["bar","line","pie","scatter"]},"title":{"type":"string"},"data":{"description":"The rows to plot, the same shape as a table-row-object result","minItems":1,"maxItems":5000,"type":"array","items":{"description":"One row: column name to value (string, number, boolean or null)","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"x":{"description":"Column holding the category, label or date of each row (bar, line, pie), or the numeric x value (scatter)","type":"string"},"y":{"description":"Numeric column, or columns, to plot: one series each. A pie takes exactly one","anyOf":[{"type":"string"},{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}}]},"stacked":{"description":"bar and line: stack the series","type":"boolean"},"horizontal":{"description":"bar: draw the bars horizontally","type":"boolean"},"x_label":{"type":"string"},"y_label":{"type":"string"}},"required":["type","data","x","y"],"additionalProperties":false}},"required":["chart"],"additionalProperties":false},{"type":"object","properties":{"table-row-object":{"description":"Rows as objects; the columns are the union of their keys","minItems":1,"maxItems":5000,"type":"array","items":{"description":"One row: column name to value (string, number, boolean or null)","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["table-row-object"],"additionalProperties":false},{"type":"object","properties":{"table-col":{"description":"Columns: column name to its values, all the same length","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"maxItems":5000,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["table-col"],"additionalProperties":false},{"type":"object","properties":{"table-row":{"description":"Rows as arrays; the first row holds the column names","minItems":2,"maxItems":5000,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["table-row"],"additionalProperties":false}]},{"type":"object","properties":{"render_all":{"description":"Several items shown one after another","minItems":1,"maxItems":10,"type":"array","items":{"anyOf":[{"type":"object","properties":{"chart":{"type":"object","properties":{"type":{"description":"bar or line for categories or time, pie for parts of a whole, scatter for two numeric columns","type":"string","enum":["bar","line","pie","scatter"]},"title":{"type":"string"},"data":{"description":"The rows to plot, the same shape as a table-row-object result","minItems":1,"maxItems":5000,"type":"array","items":{"description":"One row: column name to value (string, number, boolean or null)","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"x":{"description":"Column holding the category, label or date of each row (bar, line, pie), or the numeric x value (scatter)","type":"string"},"y":{"description":"Numeric column, or columns, to plot: one series each. A pie takes exactly one","anyOf":[{"type":"string"},{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}}]},"stacked":{"description":"bar and line: stack the series","type":"boolean"},"horizontal":{"description":"bar: draw the bars horizontally","type":"boolean"},"x_label":{"type":"string"},"y_label":{"type":"string"}},"required":["type","data","x","y"],"additionalProperties":false}},"required":["chart"],"additionalProperties":false},{"type":"object","properties":{"table-row-object":{"description":"Rows as objects; the columns are the union of their keys","minItems":1,"maxItems":5000,"type":"array","items":{"description":"One row: column name to value (string, number, boolean or null)","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["table-row-object"],"additionalProperties":false},{"type":"object","properties":{"table-col":{"description":"Columns: column name to its values, all the same length","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"maxItems":5000,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["table-col"],"additionalProperties":false},{"type":"object","properties":{"table-row":{"description":"Rows as arrays; the first row holds the column names","minItems":2,"maxItems":5000,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["table-row"],"additionalProperties":false}]}}},"required":["render_all"],"additionalProperties":false}]}
91051
+ \`\`\`
91052
+
91053
+ Bar chart, one series per y column:
91054
+
91055
+ \`\`\`json
91056
+ {
91057
+ "chart": {
91058
+ "type": "bar",
91059
+ "title": "Runs per day",
91060
+ "data": [
91061
+ {
91062
+ "day": "2026-11-10",
91063
+ "success": 42,
91064
+ "failure": 3
91065
+ },
91066
+ {
91067
+ "day": "2026-11-11",
91068
+ "success": 51,
91069
+ "failure": 1
91070
+ }
91071
+ ],
91072
+ "x": "day",
91073
+ "y": [
91074
+ "success",
91075
+ "failure"
91076
+ ],
91077
+ "stacked": true
91078
+ }
91079
+ }
91080
+ \`\`\`
91081
+
91082
+ Pie chart (exactly one y column):
91083
+
91084
+ \`\`\`json
91085
+ {
91086
+ "chart": {
91087
+ "type": "pie",
91088
+ "data": [
91089
+ {
91090
+ "language": "python3",
91091
+ "scripts": 18
91092
+ },
91093
+ {
91094
+ "language": "bun",
91095
+ "scripts": 25
91096
+ }
91097
+ ],
91098
+ "x": "language",
91099
+ "y": "scripts"
91100
+ }
91101
+ }
91102
+ \`\`\`
91103
+
91104
+ A chart and a table together:
91105
+
91106
+ \`\`\`json
91107
+ {
91108
+ "render_all": [
91109
+ {
91110
+ "chart": {
91111
+ "type": "line",
91112
+ "data": [
91113
+ {
91114
+ "hour": "10:00",
91115
+ "p95_ms": 120
91116
+ },
91117
+ {
91118
+ "hour": "11:00",
91119
+ "p95_ms": 180
91120
+ }
91121
+ ],
91122
+ "x": "hour",
91123
+ "y": "p95_ms",
91124
+ "y_label": "ms"
91125
+ }
91126
+ },
91127
+ {
91128
+ "table-row-object": [
91129
+ {
91130
+ "hour": "10:00",
91131
+ "p95_ms": 120,
91132
+ "jobs": 310
91133
+ },
91134
+ {
91135
+ "hour": "11:00",
91136
+ "p95_ms": 180,
91137
+ "jobs": 402
91138
+ }
91139
+ ]
91140
+ }
91141
+ ]
91142
+ }
91143
+ \`\`\`
91000
91144
  `,
91001
91145
  "cli-commands": `---
91002
91146
  name: cli-commands
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-cli",
3
- "version": "1.869.0",
3
+ "version": "1.871.0",
4
4
  "description": "CLI for Windmill",
5
5
  "license": "Apache 2.0",
6
6
  "type": "module",