windmill-cli 1.858.0 → 1.860.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 +12 -5
  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.858.0",
16769
+ VERSION: "1.860.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.858.0";
20095
+ var WM_FORK_PREFIX = "wm-fork", VERSION = "1.860.0";
20096
20096
 
20097
20097
  // src/utils/resource_folders.ts
20098
20098
  import { existsSync } from "node:fs";
@@ -58855,7 +58855,7 @@ var init_openflow = __esm(() => {
58855
58855
  openflow_default = {
58856
58856
  openapi: "3.0.3",
58857
58857
  info: {
58858
- version: "1.858.0",
58858
+ version: "1.860.0",
58859
58859
  title: "OpenFlow Spec",
58860
58860
  contact: {
58861
58861
  name: "Ruben Fiszel",
@@ -75438,7 +75438,7 @@ var defaultTs = "bun", DEFAULT_PORT = 4000, DEFAULT_HOST = "localhost", createHT
75438
75438
  </div>
75439
75439
  </div>
75440
75440
  </div>
75441
- <script>window.ctx = ${JSON.stringify(appCtx).replace(/</g, "\\u003c")};</script>
75441
+ <script>window.ctx = ${JSON.stringify(appCtx).replace(/</g, "\\u003c")}; window.ctx.query = Object.fromEntries(new URLSearchParams(location.search));</script>
75442
75442
  <script src="${jsPath}"></script>
75443
75443
  <script>
75444
75444
  // Live reload via EventSource
@@ -77370,6 +77370,9 @@ async function get7(opts, path) {
77370
77370
  console.log(colors.bold("Enabled:") + " " + (s.enabled ? "true" : "false"));
77371
77371
  }
77372
77372
  }
77373
+ function canonicalTarget(path) {
77374
+ return path?.startsWith("/") && !path.startsWith("//") ? path.slice(1) : path;
77375
+ }
77373
77376
  async function pushSchedule(workspace, path, schedule, localSchedule, permissionedAsContext, enabledOwnedByParent) {
77374
77377
  path = removeType(path, "schedule").replaceAll(SEP17, "/");
77375
77378
  debug(`Processing local schedule ${path}`);
@@ -77380,6 +77383,7 @@ async function pushSchedule(workspace, path, schedule, localSchedule, permission
77380
77383
  debug(`Schedule ${path} does not exist on remote`);
77381
77384
  }
77382
77385
  delete localSchedule.has_permissioned_as;
77386
+ localSchedule.script_path = canonicalTarget(localSchedule.script_path);
77383
77387
  if (enabledOwnedByParent && schedule) {
77384
77388
  if (localSchedule.enabled !== undefined && localSchedule.enabled !== schedule.enabled) {
77385
77389
  warnAlways(`Schedule ${path} stays ${schedule.enabled ? "enabled" : "disabled"}: the file says ${localSchedule.enabled ? "enabled" : "disabled"}, but in a fork that flag is the parent workspace's`);
@@ -77397,7 +77401,8 @@ async function pushSchedule(workspace, path, schedule, localSchedule, permission
77397
77401
  }
77398
77402
  }
77399
77403
  if (schedule) {
77400
- if (isSuperset(localSchedule, schedule)) {
77404
+ const remote = { ...schedule, script_path: canonicalTarget(schedule.script_path) };
77405
+ if (isSuperset(localSchedule, remote)) {
77401
77406
  debug(`Schedule ${path} is up to date`);
77402
77407
  return;
77403
77408
  }
@@ -87343,6 +87348,8 @@ Svelte (\`index.ts\`): \`mount(App, { target: document.getElementById('root')! }
87343
87348
 
87344
87349
  **Set the browser tab title with \`document.title = '...'\`** (or a \`<title>\` the framework renders into \`<head>\`). The app has no \`index.html\` of its own, so a \`<title>\` written there is never served; the deployed app's page shows whatever \`document.title\` holds, and follows it when it changes.
87345
87350
 
87351
+ **Read the page's context from \`window.ctx\`**: \`ctx\` is the viewer (absent for anonymous visitors), \`workspace\` and \`path\` the app's (\`path\` is not set under \`wmill app dev\`), and \`query\` the page URL's query parameters as strings (\`…/apps/get/u/me/app?customer=42\` gives \`window.ctx.query.customer === '42'\`, and no query gives \`{}\`). Read it there, not from \`window.location\`, which in a sandboxed app is not the page's address. It is read once when the app loads.
87352
+
87346
87353
  **Always begin every React file (\`.tsx\`/\`.jsx\`) that uses JSX with \`import React from 'react'\`.** esbuild uses the classic JSX transform, so \`React\` must be in scope wherever JSX appears — a missing import compiles fine but throws \`React is not defined\` at runtime, leaving a blank screen.
87347
87354
 
87348
87355
  ### Generated bindings (\`wmill.d.ts\` / \`wmill.ts\`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-cli",
3
- "version": "1.858.0",
3
+ "version": "1.860.0",
4
4
  "description": "CLI for Windmill",
5
5
  "license": "Apache 2.0",
6
6
  "type": "module",