@punks/backend-entity-manager 0.0.145 → 0.0.146
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/cjs/index.js +23 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/templates/pipelines/instance/index.d.ts +1 -0
- package/dist/cjs/types/templates/pipelines/utils/index.d.ts +4 -0
- package/dist/cjs/types/types/pipelines.d.ts +3 -0
- package/dist/esm/index.js +23 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/templates/pipelines/instance/index.d.ts +1 -0
- package/dist/esm/types/templates/pipelines/utils/index.d.ts +4 -0
- package/dist/esm/types/types/pipelines.d.ts +3 -0
- package/dist/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -15,6 +15,7 @@ export declare class PipelineInstance<TPipelineInput, TPipelineOutput, TContext>
|
|
|
15
15
|
private validateStepPrecondition;
|
|
16
16
|
private executeStep;
|
|
17
17
|
private executeOperation;
|
|
18
|
+
private shouldSkipOperation;
|
|
18
19
|
private rollbackOperations;
|
|
19
20
|
private rollbackOperation;
|
|
20
21
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PipelineOperationResultType, PipelineOperationRollbackResultType, PipelineStepResultType } from "../../../types";
|
|
2
|
+
export declare const isOperationSuccessStatus: (type: PipelineOperationResultType) => boolean;
|
|
3
|
+
export declare const isOperationRollbackErrorStatus: (type: PipelineOperationRollbackResultType) => boolean;
|
|
4
|
+
export declare const isStepSuccessStatus: (type: PipelineStepResultType) => boolean;
|
|
@@ -12,6 +12,7 @@ export type OperationDefinition<TOperationInput, TOperationOutput, TCurrentStepI
|
|
|
12
12
|
name: string;
|
|
13
13
|
action: (input: TOperationInput, state: PipelineCurrentStepState<TPipelineInput, TContext, TCurrentStepInput>) => Promise<TOperationOutput> | TOperationOutput;
|
|
14
14
|
precondition?: (input: TOperationInput, state: PipelineCurrentStepState<TPipelineInput, TContext, TCurrentStepInput>) => Promise<boolean> | boolean;
|
|
15
|
+
skipIf?: (input: TOperationInput, state: PipelineCurrentStepState<TPipelineInput, TContext, TCurrentStepInput>) => Promise<boolean> | boolean;
|
|
15
16
|
};
|
|
16
17
|
export type RollbackOperationDefinition<TOperationInput, TOperationOutput, TCurrentStepInput, TPipelineInput, TContext> = {
|
|
17
18
|
name: string;
|
|
@@ -39,6 +40,8 @@ export type PipelineOperationResult<TOperationInput, TOperationOutput> = {
|
|
|
39
40
|
} & ({
|
|
40
41
|
type: "success";
|
|
41
42
|
output: TOperationOutput;
|
|
43
|
+
} | {
|
|
44
|
+
type: "skipped";
|
|
42
45
|
} | {
|
|
43
46
|
type: "preconditionFailed";
|
|
44
47
|
} | {
|
package/dist/index.d.ts
CHANGED
|
@@ -370,6 +370,7 @@ type OperationDefinition<TOperationInput, TOperationOutput, TCurrentStepInput, T
|
|
|
370
370
|
name: string;
|
|
371
371
|
action: (input: TOperationInput, state: PipelineCurrentStepState<TPipelineInput, TContext, TCurrentStepInput>) => Promise<TOperationOutput> | TOperationOutput;
|
|
372
372
|
precondition?: (input: TOperationInput, state: PipelineCurrentStepState<TPipelineInput, TContext, TCurrentStepInput>) => Promise<boolean> | boolean;
|
|
373
|
+
skipIf?: (input: TOperationInput, state: PipelineCurrentStepState<TPipelineInput, TContext, TCurrentStepInput>) => Promise<boolean> | boolean;
|
|
373
374
|
};
|
|
374
375
|
type RollbackOperationDefinition<TOperationInput, TOperationOutput, TCurrentStepInput, TPipelineInput, TContext> = {
|
|
375
376
|
name: string;
|
|
@@ -397,6 +398,8 @@ type PipelineOperationResult<TOperationInput, TOperationOutput> = {
|
|
|
397
398
|
} & ({
|
|
398
399
|
type: "success";
|
|
399
400
|
output: TOperationOutput;
|
|
401
|
+
} | {
|
|
402
|
+
type: "skipped";
|
|
400
403
|
} | {
|
|
401
404
|
type: "preconditionFailed";
|
|
402
405
|
} | {
|