@decaf-ts/core 0.27.3 → 0.28.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/README.md +3 -3
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +1 -1
- package/dist/core.js.map +1 -1
- package/lib/cjs/index.cjs +3 -3
- package/lib/cjs/migrations/MigrationService.cjs +5 -5
- package/lib/cjs/migrations/MigrationService.cjs.map +1 -1
- package/lib/cjs/services/services.cjs +4 -0
- package/lib/cjs/services/services.cjs.map +1 -1
- package/lib/cjs/tasks/TaskEngine.cjs +25 -13
- package/lib/cjs/tasks/TaskEngine.cjs.map +1 -1
- package/lib/cjs/tasks/builder.cjs +22 -5
- package/lib/cjs/tasks/builder.cjs.map +1 -1
- package/lib/cjs/tasks/models/TaskStepSpecModel.cjs +6 -0
- package/lib/cjs/tasks/models/TaskStepSpecModel.cjs.map +1 -1
- package/lib/esm/index.js +3 -3
- package/lib/esm/migrations/MigrationService.js +5 -5
- package/lib/esm/migrations/MigrationService.js.map +1 -1
- package/lib/esm/services/services.js +4 -0
- package/lib/esm/services/services.js.map +1 -1
- package/lib/esm/tasks/TaskEngine.js +25 -13
- package/lib/esm/tasks/TaskEngine.js.map +1 -1
- package/lib/esm/tasks/builder.js +22 -5
- package/lib/esm/tasks/builder.js.map +1 -1
- package/lib/esm/tasks/models/TaskStepSpecModel.js +6 -0
- package/lib/esm/tasks/models/TaskStepSpecModel.js.map +1 -1
- package/lib/types/index.d.cts +3 -3
- package/lib/types/index.d.mts +3 -3
- package/lib/types/migrations/types.d.cts +2 -2
- package/lib/types/migrations/types.d.mts +2 -2
- package/lib/types/tasks/builder.d.cts +7 -0
- package/lib/types/tasks/builder.d.mts +7 -0
- package/lib/types/tasks/models/TaskStepSpecModel.d.cts +1 -0
- package/lib/types/tasks/models/TaskStepSpecModel.d.mts +1 -0
- package/lib/types/workers/WorkThreadEnvironment.d.cts +5 -1
- package/lib/types/workers/WorkThreadEnvironment.d.mts +5 -1
- package/package.json +3 -2
package/lib/types/index.d.cts
CHANGED
|
@@ -24,21 +24,21 @@ export * from "./persistence/index.d.cts";
|
|
|
24
24
|
* @const VERSION
|
|
25
25
|
* @memberOf module:core
|
|
26
26
|
*/
|
|
27
|
-
export declare const VERSION = "0.27.
|
|
27
|
+
export declare const VERSION = "0.27.5";
|
|
28
28
|
/**
|
|
29
29
|
* @description Represents the current commit hash of the module build.
|
|
30
30
|
* @summary Stores the current git commit hash for the package. The build replaces
|
|
31
31
|
* the placeholder with the actual commit hash at publish time.
|
|
32
32
|
* @const COMMIT
|
|
33
33
|
*/
|
|
34
|
-
export declare const COMMIT = "
|
|
34
|
+
export declare const COMMIT = "63a97aa";
|
|
35
35
|
/**
|
|
36
36
|
* @description Represents the full version string of the module.
|
|
37
37
|
* @summary Stores the semver version and commit hash for the package.
|
|
38
38
|
* The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
|
|
39
39
|
* @const FULL_VERSION
|
|
40
40
|
*/
|
|
41
|
-
export declare const FULL_VERSION = "0.27.
|
|
41
|
+
export declare const FULL_VERSION = "0.27.5-63a97aa";
|
|
42
42
|
/**
|
|
43
43
|
* @description Stores the current package version
|
|
44
44
|
* @summary A constant representing the version of the core package
|
package/lib/types/index.d.mts
CHANGED
|
@@ -24,21 +24,21 @@ export * from "./persistence/index.d.mts";
|
|
|
24
24
|
* @const VERSION
|
|
25
25
|
* @memberOf module:core
|
|
26
26
|
*/
|
|
27
|
-
export declare const VERSION = "0.27.
|
|
27
|
+
export declare const VERSION = "0.27.5";
|
|
28
28
|
/**
|
|
29
29
|
* @description Represents the current commit hash of the module build.
|
|
30
30
|
* @summary Stores the current git commit hash for the package. The build replaces
|
|
31
31
|
* the placeholder with the actual commit hash at publish time.
|
|
32
32
|
* @const COMMIT
|
|
33
33
|
*/
|
|
34
|
-
export declare const COMMIT = "
|
|
34
|
+
export declare const COMMIT = "63a97aa";
|
|
35
35
|
/**
|
|
36
36
|
* @description Represents the full version string of the module.
|
|
37
37
|
* @summary Stores the semver version and commit hash for the package.
|
|
38
38
|
* The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
|
|
39
39
|
* @const FULL_VERSION
|
|
40
40
|
*/
|
|
41
|
-
export declare const FULL_VERSION = "0.27.
|
|
41
|
+
export declare const FULL_VERSION = "0.27.5-63a97aa";
|
|
42
42
|
/**
|
|
43
43
|
* @description Stores the current package version
|
|
44
44
|
* @summary A constant representing the version of the core package
|
|
@@ -19,8 +19,8 @@ export type MigrationMetadata = {
|
|
|
19
19
|
flavour: string;
|
|
20
20
|
rules?: MigrationRule[];
|
|
21
21
|
};
|
|
22
|
-
export type RetrieveLastVersionHandler<A extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = (adapter
|
|
23
|
-
export type SetCurrentVersionHandler<A extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = (version: string, adapter
|
|
22
|
+
export type RetrieveLastVersionHandler<A extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = (adapter?: A, ...args: ContextualArgs<ContextOf<A>>) => Promise<string | undefined | null>;
|
|
23
|
+
export type SetCurrentVersionHandler<A extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = (version: string, adapter?: A, ...args: ContextualArgs<ContextOf<A>>) => Promise<void>;
|
|
24
24
|
export type AdapterMigrationHandlers<AD extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = {
|
|
25
25
|
retrieveLastVersion?: RetrieveLastVersionHandler<AD>;
|
|
26
26
|
setCurrentVersion?: SetCurrentVersionHandler<AD>;
|
|
@@ -19,8 +19,8 @@ export type MigrationMetadata = {
|
|
|
19
19
|
flavour: string;
|
|
20
20
|
rules?: MigrationRule[];
|
|
21
21
|
};
|
|
22
|
-
export type RetrieveLastVersionHandler<A extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = (adapter
|
|
23
|
-
export type SetCurrentVersionHandler<A extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = (version: string, adapter
|
|
22
|
+
export type RetrieveLastVersionHandler<A extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = (adapter?: A, ...args: ContextualArgs<ContextOf<A>>) => Promise<string | undefined | null>;
|
|
23
|
+
export type SetCurrentVersionHandler<A extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = (version: string, adapter?: A, ...args: ContextualArgs<ContextOf<A>>) => Promise<void>;
|
|
24
24
|
export type AdapterMigrationHandlers<AD extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = {
|
|
25
25
|
retrieveLastVersion?: RetrieveLastVersionHandler<AD>;
|
|
26
26
|
setCurrentVersion?: SetCurrentVersionHandler<AD>;
|
|
@@ -46,11 +46,14 @@ export declare class TaskStepSpecBuilder {
|
|
|
46
46
|
setInput(value: any): this;
|
|
47
47
|
setLock(value?: string): this;
|
|
48
48
|
setDependsOn(value?: string[]): this;
|
|
49
|
+
setCanFail(value: boolean): this;
|
|
49
50
|
setMaxAttempts(value?: number): this;
|
|
50
51
|
setBackoff(value?: TaskBackoffModel): this;
|
|
51
52
|
addStep(classification: string): TaskStepSpecBuilder;
|
|
52
53
|
addStep(classification: string, input: any): CompositeTaskBuilder;
|
|
54
|
+
addStep(classification: string, input: any, canFail: boolean): CompositeTaskBuilder;
|
|
53
55
|
addStep(classification: string, name: string, input?: any): CompositeTaskBuilder;
|
|
56
|
+
addStep(classification: string, name: string, input: any, canFail: boolean): CompositeTaskBuilder;
|
|
54
57
|
setSteps(value: TaskStepSpecModel[]): CompositeTaskBuilder;
|
|
55
58
|
build(): CompositeTaskBuilder;
|
|
56
59
|
}
|
|
@@ -64,11 +67,15 @@ export declare class CompositeTaskBuilder extends TaskBuilder {
|
|
|
64
67
|
* Backwards compatible:
|
|
65
68
|
* - addStep(classification, input?)
|
|
66
69
|
* - addStep(classification, name, input?)
|
|
70
|
+
* - addStep(classification, input, canFail)
|
|
71
|
+
* - addStep(classification, name, input, canFail)
|
|
67
72
|
*
|
|
68
73
|
* When called with only `classification`, returns a TaskStepSpecBuilder so
|
|
69
74
|
* callers can configure the step and then `.build()` back to this builder.
|
|
70
75
|
*/
|
|
71
76
|
addStep(classification: string): TaskStepSpecBuilder;
|
|
72
77
|
addStep(classification: string, input: any): this;
|
|
78
|
+
addStep(classification: string, input: any, canFail: boolean): this;
|
|
73
79
|
addStep(classification: string, name: string, input?: any): this;
|
|
80
|
+
addStep(classification: string, name: string, input: any, canFail?: boolean): this;
|
|
74
81
|
}
|
|
@@ -46,11 +46,14 @@ export declare class TaskStepSpecBuilder {
|
|
|
46
46
|
setInput(value: any): this;
|
|
47
47
|
setLock(value?: string): this;
|
|
48
48
|
setDependsOn(value?: string[]): this;
|
|
49
|
+
setCanFail(value: boolean): this;
|
|
49
50
|
setMaxAttempts(value?: number): this;
|
|
50
51
|
setBackoff(value?: TaskBackoffModel): this;
|
|
51
52
|
addStep(classification: string): TaskStepSpecBuilder;
|
|
52
53
|
addStep(classification: string, input: any): CompositeTaskBuilder;
|
|
54
|
+
addStep(classification: string, input: any, canFail: boolean): CompositeTaskBuilder;
|
|
53
55
|
addStep(classification: string, name: string, input?: any): CompositeTaskBuilder;
|
|
56
|
+
addStep(classification: string, name: string, input: any, canFail: boolean): CompositeTaskBuilder;
|
|
54
57
|
setSteps(value: TaskStepSpecModel[]): CompositeTaskBuilder;
|
|
55
58
|
build(): CompositeTaskBuilder;
|
|
56
59
|
}
|
|
@@ -64,11 +67,15 @@ export declare class CompositeTaskBuilder extends TaskBuilder {
|
|
|
64
67
|
* Backwards compatible:
|
|
65
68
|
* - addStep(classification, input?)
|
|
66
69
|
* - addStep(classification, name, input?)
|
|
70
|
+
* - addStep(classification, input, canFail)
|
|
71
|
+
* - addStep(classification, name, input, canFail)
|
|
67
72
|
*
|
|
68
73
|
* When called with only `classification`, returns a TaskStepSpecBuilder so
|
|
69
74
|
* callers can configure the step and then `.build()` back to this builder.
|
|
70
75
|
*/
|
|
71
76
|
addStep(classification: string): TaskStepSpecBuilder;
|
|
72
77
|
addStep(classification: string, input: any): this;
|
|
78
|
+
addStep(classification: string, input: any, canFail: boolean): this;
|
|
73
79
|
addStep(classification: string, name: string, input?: any): this;
|
|
80
|
+
addStep(classification: string, name: string, input: any, canFail?: boolean): this;
|
|
74
81
|
}
|
|
@@ -31,5 +31,9 @@ export interface WorkThreadEnvironmentShape {
|
|
|
31
31
|
modules: WorkThreadModulesConfig;
|
|
32
32
|
}
|
|
33
33
|
export declare const DefaultWorkThreadEnvironment: WorkThreadEnvironmentShape;
|
|
34
|
-
export declare const WorkThreadEnvironment:
|
|
34
|
+
export declare const WorkThreadEnvironment: import("@decaf-ts/logging").AccumulatedEnvironment<{
|
|
35
|
+
app: string | undefined;
|
|
36
|
+
} & import("@decaf-ts/logging").LoggingConfig<object> & {
|
|
37
|
+
env: any;
|
|
38
|
+
} & WorkThreadEnvironmentShape>;
|
|
35
39
|
export {};
|
|
@@ -31,5 +31,9 @@ export interface WorkThreadEnvironmentShape {
|
|
|
31
31
|
modules: WorkThreadModulesConfig;
|
|
32
32
|
}
|
|
33
33
|
export declare const DefaultWorkThreadEnvironment: WorkThreadEnvironmentShape;
|
|
34
|
-
export declare const WorkThreadEnvironment:
|
|
34
|
+
export declare const WorkThreadEnvironment: import("@decaf-ts/logging").AccumulatedEnvironment<{
|
|
35
|
+
app: string | undefined;
|
|
36
|
+
} & import("@decaf-ts/logging").LoggingConfig<object> & {
|
|
37
|
+
env: any;
|
|
38
|
+
} & WorkThreadEnvironmentShape>;
|
|
35
39
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decaf-ts/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Core persistence module for the decaf framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -168,7 +168,8 @@
|
|
|
168
168
|
"semver": "^7.7.2"
|
|
169
169
|
},
|
|
170
170
|
"overrides": {
|
|
171
|
-
"
|
|
171
|
+
"test-exclude": "^7.0.2",
|
|
172
|
+
"brace-expansion": "^5.0.8"
|
|
172
173
|
},
|
|
173
174
|
"main": "./lib/cjs/index.cjs",
|
|
174
175
|
"module": "./lib/esm/index.js",
|