@lafken/state-machine 0.11.7 → 0.11.9
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,4 +1,4 @@
|
|
|
1
|
-
import type { BucketNames, ClassResource, LambdaMetadata, LambdaProps, ResourceMetadata, ResourceOutputType, ResourceProps, ServicesValues, StateMachineNames } from '@lafken/common';
|
|
1
|
+
import type { BucketNames, ClassResource, LambdaMetadata, LambdaProps, ResourceMetadata, ResourceOutputType, ResourceProps, ServicesValues, StateMachineNames, StateMachineReferenceNames } from '@lafken/common';
|
|
2
2
|
import type { JsonAtaString } from '../param';
|
|
3
3
|
export declare enum StateMachineReflectKeys {
|
|
4
4
|
nested = "state_machine:nested"
|
|
@@ -179,6 +179,15 @@ interface StateMachineProps<T> extends StateMachineBaseProps<T> {
|
|
|
179
179
|
* }
|
|
180
180
|
*/
|
|
181
181
|
outputs?: ResourceOutputType<StateMachineOutputAttributes>;
|
|
182
|
+
/**
|
|
183
|
+
* Registers this State Machine as a named global reference, allowing other resources
|
|
184
|
+
* to access its attributes (e.g. execution ARN) by reference name.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* // Register the API under a reference name
|
|
188
|
+
* ref: 'my-state-machine'
|
|
189
|
+
*/
|
|
190
|
+
ref?: StateMachineReferenceNames;
|
|
182
191
|
}
|
|
183
192
|
interface WaitStateBase<T> {
|
|
184
193
|
/**
|
|
@@ -2,8 +2,8 @@ import { SfnStateMachine } from '@cdktn/provider-aws/lib/sfn-state-machine';
|
|
|
2
2
|
import { type AppModule } from '@lafken/resolver';
|
|
3
3
|
import type { StateMachineProps } from './state-machine.types';
|
|
4
4
|
declare const StateMachine_base: (new (...args: any[]) => {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
register(namespaces: import("@lafken/common").RegisterNamespaces | (string & {}), id: string): void;
|
|
6
|
+
onResolve(callback: () => void): void;
|
|
7
7
|
readonly node: import("constructs").Node;
|
|
8
8
|
with(...mixins: import("constructs").IMixin[]): import("constructs").IConstruct;
|
|
9
9
|
toString(): string;
|
|
@@ -22,7 +22,9 @@ class StateMachine extends resolver_1.lafkenResource.make(sfn_state_machine_1.Sf
|
|
|
22
22
|
: undefined,
|
|
23
23
|
});
|
|
24
24
|
this.props = props;
|
|
25
|
-
|
|
25
|
+
if (resourceMetadata.ref) {
|
|
26
|
+
this.register('state-machine', resourceMetadata.ref);
|
|
27
|
+
}
|
|
26
28
|
this.addLoggingConfiguration(resourceMetadata);
|
|
27
29
|
new resolver_1.ResourceOutput(this, resourceMetadata.outputs);
|
|
28
30
|
}
|
|
@@ -36,7 +38,7 @@ class StateMachine extends resolver_1.lafkenResource.make(sfn_state_machine_1.Sf
|
|
|
36
38
|
this.addDependency(...schema.resources);
|
|
37
39
|
}
|
|
38
40
|
else {
|
|
39
|
-
this.
|
|
41
|
+
this.onResolve(async () => {
|
|
40
42
|
this.overrideDefinition(await schema.resolveArguments(definition));
|
|
41
43
|
this.addDependency(...schema.resources);
|
|
42
44
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lafken/state-machine",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Build Step Functions workflows with TypeScript decorators - declarative orchestration with Lafken",
|
|
6
6
|
"keywords": [
|
|
@@ -50,26 +50,26 @@
|
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"reflect-metadata": "^0.2.2",
|
|
53
|
-
"@lafken/resolver": "0.11.
|
|
53
|
+
"@lafken/resolver": "0.11.9"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@cdktn/provider-aws": "^23.
|
|
57
|
-
"@swc/core": "^1.15.
|
|
58
|
-
"@swc/helpers": "^0.5.
|
|
59
|
-
"@vitest/runner": "^4.1.
|
|
56
|
+
"@cdktn/provider-aws": "^23.9.0",
|
|
57
|
+
"@swc/core": "^1.15.30",
|
|
58
|
+
"@swc/helpers": "^0.5.21",
|
|
59
|
+
"@vitest/runner": "^4.1.5",
|
|
60
60
|
"cdktn": "^0.22.1",
|
|
61
61
|
"cdktn-vitest": "^1.0.0",
|
|
62
62
|
"constructs": "^10.6.0",
|
|
63
|
-
"typescript": "6.0.
|
|
63
|
+
"typescript": "6.0.3",
|
|
64
64
|
"unplugin-swc": "^1.5.9",
|
|
65
|
-
"vitest": "^4.1.
|
|
66
|
-
"@lafken/common": "0.11.
|
|
65
|
+
"vitest": "^4.1.5",
|
|
66
|
+
"@lafken/common": "0.11.9"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@cdktn/provider-aws": ">=23.0.0",
|
|
70
70
|
"cdktn": ">=0.22.0",
|
|
71
71
|
"constructs": "^10.4.5",
|
|
72
|
-
"@lafken/common": "0.11.
|
|
72
|
+
"@lafken/common": "0.11.9"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=20.19"
|