windmill-client 1.381.0 → 1.382.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.
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): Promise<string>;
34
+ export declare function runFlowAsync(path: string | null, args: Record<string, any> | null, scheduledInSeconds?: number | null, flowOutlivesParent?: 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
@@ -148,7 +148,7 @@ function runFlow() {
148
148
  if (verbose) {
149
149
  console.info(`running \`${path}\` synchronously with args:`, args);
150
150
  }
151
- const jobId = yield runFlowAsync(path, args);
151
+ const jobId = yield runFlowAsync(path, args, null, false);
152
152
  return yield waitJob(jobId, verbose);
153
153
  });
154
154
  }
@@ -265,16 +265,18 @@ 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) {
268
+ return __awaiter(this, arguments, void 0, function* (path, args, scheduledInSeconds = null, flowOutlivesParent = true) {
269
269
  // Create a script job and return its job id.
270
270
  args = args || {};
271
271
  const params = {};
272
272
  if (scheduledInSeconds) {
273
273
  params["scheduled_in_secs"] = scheduledInSeconds;
274
274
  }
275
- let parentJobId = getEnv("WM_JOB_ID");
276
- if (parentJobId !== undefined) {
277
- params["parent_job"] = parentJobId;
275
+ if (!flowOutlivesParent) {
276
+ let parentJobId = getEnv("WM_JOB_ID");
277
+ if (parentJobId !== undefined) {
278
+ params["parent_job"] = parentJobId;
279
+ }
278
280
  }
279
281
  let rootJobId = getEnv("WM_ROOT_FLOW_JOB_ID");
280
282
  if (rootJobId != undefined && rootJobId != "") {
@@ -39,7 +39,7 @@ exports.OpenAPI = {
39
39
  PASSWORD: undefined,
40
40
  TOKEN: getEnv("WM_TOKEN"),
41
41
  USERNAME: undefined,
42
- VERSION: '1.381.0',
42
+ VERSION: '1.382.0',
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.381.0",
4
+ "version": "1.382.0",
5
5
  "author": "Ruben Fiszel",
6
6
  "license": "Apache 2.0",
7
7
  "devDependencies": {