@toolproof-npm/shared 0.1.95 → 0.1.97
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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { WorkStepJson, WhileStepJson, ForStepJson, JobJson } from '@toolproof-npm/schema';
|
|
2
2
|
export declare const makeWorkStepFromJob: (job: JobJson) => Promise<WorkStepJson>;
|
|
3
|
-
export declare const makeLoopStepFromJob: (job: JobJson,
|
|
3
|
+
export declare const makeLoopStepFromJob: (job: JobJson, whenJob: JobJson, kind: "for" | "while") => Promise<ForStepJson | WhileStepJson>;
|
|
@@ -37,11 +37,11 @@ export const makeWorkStepFromJob = async (job) => {
|
|
|
37
37
|
return newWorkStep;
|
|
38
38
|
};
|
|
39
39
|
// DOC: Helper function to construct a ForStep or WhileStep from a job
|
|
40
|
-
export const makeLoopStepFromJob = async (job,
|
|
40
|
+
export const makeLoopStepFromJob = async (job, whenJob, kind) => {
|
|
41
41
|
// Create the "what" WorkStep from the provided job
|
|
42
42
|
const whatWorkStep = await makeWorkStepFromJob(job);
|
|
43
43
|
// Create the "when" WorkStep from the LessThan job
|
|
44
|
-
const whenWorkStep = await makeWorkStepFromJob(
|
|
44
|
+
const whenWorkStep = await makeWorkStepFromJob(whenJob);
|
|
45
45
|
// Generate loop step identity based on kind
|
|
46
46
|
const stepIdentity = (kind === 'for'
|
|
47
47
|
? await getNewIdentity(CONSTANTS.STEPS.for)
|
package/dist/constants.d.ts
CHANGED
|
@@ -47,7 +47,9 @@ export declare const CONSTANTS: {
|
|
|
47
47
|
readonly TYPE_StatelessStrategy: "TYPE-StatelessStrategy";
|
|
48
48
|
readonly TYPE_StatefulStrategy: "TYPE-StatefulStrategy";
|
|
49
49
|
readonly ROLE_Manual: "ROLE-Manual";
|
|
50
|
+
readonly ROLE_Dynamic_Source: "ROLE-u4vW7PDlX6V9IGJoNxhl";
|
|
50
51
|
readonly JOB_Engine: "JOB-Engine";
|
|
52
|
+
readonly JOB_LESS_THAN: "JOB-LessThan";
|
|
51
53
|
readonly BOOLEAN_false: "RESOURCE-VqJIcOpv9E3zFuGVpN7J";
|
|
52
54
|
readonly BOOLEAN_true: "RESOURCE-iZX1cxZ9ImJRzty9Ob4G";
|
|
53
55
|
};
|
package/dist/constants.js
CHANGED
|
@@ -47,7 +47,9 @@ export const CONSTANTS = {
|
|
|
47
47
|
TYPE_StatelessStrategy: 'TYPE-StatelessStrategy',
|
|
48
48
|
TYPE_StatefulStrategy: 'TYPE-StatefulStrategy',
|
|
49
49
|
ROLE_Manual: 'ROLE-Manual',
|
|
50
|
+
ROLE_Dynamic_Source: 'ROLE-u4vW7PDlX6V9IGJoNxhl',
|
|
50
51
|
JOB_Engine: 'JOB-Engine',
|
|
52
|
+
JOB_LESS_THAN: 'JOB-LessThan',
|
|
51
53
|
BOOLEAN_false: 'RESOURCE-VqJIcOpv9E3zFuGVpN7J',
|
|
52
54
|
BOOLEAN_true: 'RESOURCE-iZX1cxZ9ImJRzty9Ob4G',
|
|
53
55
|
},
|