windmill-client 1.394.2 → 1.394.4

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.
package/dist/client.d.ts CHANGED
@@ -31,7 +31,7 @@ export declare function getResult(jobId: string): Promise<any>;
31
31
  export declare function getResultMaybe(jobId: string): Promise<any>;
32
32
  export declare function task<P, T>(f: (_: P) => T): (_: P) => Promise<T>;
33
33
  export declare function runScriptAsync(path: string | null, hash_: string | null, args: Record<string, any> | null, scheduledInSeconds?: number | null): Promise<string>;
34
- export declare function runFlowAsync(path: string | null, args: Record<string, any> | null, scheduledInSeconds?: number | null, flowOutlivesParent?: boolean): Promise<string>;
34
+ export declare function runFlowAsync(path: string | null, args: Record<string, any> | null, scheduledInSeconds?: number | null, doNotTrackInParent?: boolean): Promise<string>;
35
35
  /**
36
36
  * Resolve a resource value in case the default value was picked because the input payload was undefined
37
37
  * @param obj resource value or path of the resource under the format `$res:path`
package/dist/client.js CHANGED
@@ -265,22 +265,26 @@ function runScriptAsync(path_1, hash_1, args_1) {
265
265
  });
266
266
  }
267
267
  function runFlowAsync(path_1, args_1) {
268
- return __awaiter(this, arguments, void 0, function* (path, args, scheduledInSeconds = null, flowOutlivesParent = true) {
268
+ return __awaiter(this, arguments, void 0, function* (path, args, scheduledInSeconds = null,
269
+ // can only be set to false if this the job will be fully await and not concurrent with any other job
270
+ // as otherwise the child flow and its own child will store their state in the parent job which will
271
+ // lead to incorrectness and failures
272
+ doNotTrackInParent = true) {
269
273
  // Create a script job and return its job id.
270
274
  args = args || {};
271
275
  const params = {};
272
276
  if (scheduledInSeconds) {
273
277
  params["scheduled_in_secs"] = scheduledInSeconds;
274
278
  }
275
- if (!flowOutlivesParent) {
279
+ if (!doNotTrackInParent) {
276
280
  let parentJobId = getEnv("WM_JOB_ID");
277
281
  if (parentJobId !== undefined) {
278
282
  params["parent_job"] = parentJobId;
279
283
  }
280
- }
281
- let rootJobId = getEnv("WM_ROOT_FLOW_JOB_ID");
282
- if (rootJobId != undefined && rootJobId != "") {
283
- params["root_job"] = rootJobId;
284
+ let rootJobId = getEnv("WM_ROOT_FLOW_JOB_ID");
285
+ if (rootJobId != undefined && rootJobId != "") {
286
+ params["root_job"] = rootJobId;
287
+ }
284
288
  }
285
289
  let endpoint;
286
290
  if (path) {
@@ -39,7 +39,7 @@ exports.OpenAPI = {
39
39
  PASSWORD: undefined,
40
40
  TOKEN: getEnv("WM_TOKEN"),
41
41
  USERNAME: undefined,
42
- VERSION: '1.394.2',
42
+ VERSION: '1.394.4',
43
43
  WITH_CREDENTIALS: true,
44
44
  interceptors: {
45
45
  request: new Interceptors(),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "windmill-client",
3
3
  "description": "Windmill SDK client for browsers and Node.js",
4
- "version": "1.394.2",
4
+ "version": "1.394.4",
5
5
  "author": "Ruben Fiszel",
6
6
  "license": "Apache 2.0",
7
7
  "devDependencies": {