You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The inline `workflow` pattern requires a TypeScript transformer that extracts `Steps.createFunction()` calls from CDK construct props, compiles them to ASL, and injects the result back at build time. Choose one of the following build setups:
14
+
15
+
### ts-patch (recommended for CDK projects)
16
+
17
+
```bash
18
+
npm install -D ts-patch typescript
19
+
```
20
+
21
+
Add scripts to `package.json`:
22
+
23
+
```json
24
+
{
25
+
"scripts": {
26
+
"prepare": "ts-patch install -s",
27
+
"build": "tspc"
28
+
}
29
+
}
30
+
```
31
+
32
+
Add the transformer plugin to `tsconfig.json`:
33
+
34
+
```json
35
+
{
36
+
"compilerOptions": {
37
+
"plugins": [
38
+
{ "transform": "@simplesteps/core/transformer" }
39
+
]
40
+
}
41
+
}
42
+
```
43
+
44
+
Run `npm install` to activate — the `prepare` script runs `ts-patch install` automatically. Then use `tspc` (ts-patch compiler) instead of `tsc` for builds.
Both the Vite and esbuild plugins read `tsconfig.json` from the project root by default. Pass `{ tsconfig: './path/to/tsconfig.json' }` to override.
68
+
69
+
> **Note:** The `sourceFile` + `bindings` pattern (see [Alternative: Separate Workflow Files](#alternative-separate-workflow-files)) does not require the transformer — the compiler reads the file directly at synth time.
70
+
11
71
## `SimpleStepsStateMachine`
12
72
13
73
An L3 CDK construct that compiles a `Steps.createFunction()` workflow to a Step Functions state machine at synth time. Define your workflow inline — service bindings reference CDK resources directly:
- You want to compile and inspect ASL via the CLI without CDK
238
298
- Team preference for separating business logic from infrastructure
239
299
240
-
## CDK Auto-Detection (SS705)
241
-
242
-
When using the **inline workflow** pattern, the compiler automatically detects CDK construct property accesses (like `myLambda.functionArn` or `myTable.tableName`) and resolves them as synth-time values. This happens transparently — CDK Tokens flow into ASL as-is.
243
-
244
-
If the compiler recognizes a variable as a CDK synth-time expression via pattern matching (rather than explicit `declare const` binding), it emits warning **SS705**:
auto-detected for variable 'validateOrderArn'. It will be resolved at CDK synth time.
249
-
```
250
-
251
-
This warning is informational — the compiled output is correct. The compiler detects common CDK property names (`functionArn`, `tableName`, `queueUrl`, `topicArn`, `bucketName`, etc.) and treats them as synth-time constants rather than raising an unresolvable variable error.
252
-
253
-
To suppress the warning, use the **file-based** pattern with explicit `bindings` instead.
254
-
255
300
## Starter Project
256
301
257
302
See [`examples/starters/cdk/`](../examples/starters/cdk/) for a complete, runnable CDK project using inline workflows.
Copy file name to clipboardExpand all lines: docs/services.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Services
2
2
3
-
SimpleSteps provides typed bindings for 64 AWS services — 16 with optimized integrations (including HTTPS Endpoints), 48 SDK-generated with full type signatures, plus Activity tasks, a callback pattern (`.waitForTaskToken`), and a generic escape hatch (`Steps.awsSdk()`) for any AWS service.
3
+
SimpleSteps provides typed bindings for 66 AWS services — 17 with optimized integrations (including HTTPS Endpoints and Activity tasks), 48 SDK-generated with full type signatures, plus a callback pattern (`.waitForTaskToken`) and a generic escape hatch (`Steps.awsSdk()`) for any AWS service.
4
4
5
5
All service bindings are compile-time markers. They provide TypeScript types for the compiler and throw if called at runtime.
0 commit comments