@toolproof-npm/shared 0.1.94 → 0.1.95
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 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { WorkStepJson, WhileStepJson, ForStepJson, JobJson } from '@toolproof-npm/schema';
|
|
2
|
+
export declare const makeWorkStepFromJob: (job: JobJson) => Promise<WorkStepJson>;
|
|
3
|
+
export declare const makeLoopStepFromJob: (job: JobJson, lessThanJob: JobJson, kind: "for" | "while") => Promise<ForStepJson | WhileStepJson>;
|
|
@@ -25,7 +25,7 @@ const makeExecutionFromJob = async (job, executionRef) => {
|
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
// DOC: Helper function to construct a WorkStep object from an jobMetaJson (does not append to statelessStrategy.steps)
|
|
28
|
-
const makeWorkStepFromJob = async (job) => {
|
|
28
|
+
export const makeWorkStepFromJob = async (job) => {
|
|
29
29
|
const workStepIdentity = await getNewIdentity(CONSTANTS.STEPS.work);
|
|
30
30
|
const executionRef = workStepIdentity.replace(CONSTANTS.STEPS.work.toUpperCase(), 'execution'.toUpperCase()); // ATTENTION: use function
|
|
31
31
|
const execution = await makeExecutionFromJob(job, executionRef);
|
|
@@ -37,7 +37,7 @@ 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
|
-
const makeLoopStepFromJob = async (job, lessThanJob, kind) => {
|
|
40
|
+
export const makeLoopStepFromJob = async (job, lessThanJob, 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
|