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 +1 -1
- package/dist/client.js +7 -5
- package/dist/core/OpenAPI.js +1 -1
- package/package.json +1 -1
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
|
-
|
|
276
|
-
|
|
277
|
-
|
|
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 != "") {
|
package/dist/core/OpenAPI.js
CHANGED