@walkeros/cli 0.5.1-next.1 → 0.6.1-next-1766186076625
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/CHANGELOG.md +40 -0
- package/README.md +104 -36
- package/dist/index.d.ts +22 -13
- package/dist/index.js +852 -813
- package/dist/index.js.map +1 -1
- package/dist/runtime/main.d.ts +2 -0
- package/dist/runtime/main.js +269 -0
- package/dist/runtime/main.js.map +1 -0
- package/package.json +8 -5
- package/dist/__tests__/bundle/bundler-helpers.test.d.ts +0 -2
- package/dist/__tests__/bundle/bundler-helpers.test.d.ts.map +0 -1
- package/dist/__tests__/bundle/bundler-helpers.test.js +0 -151
- package/dist/__tests__/bundle/bundler-helpers.test.js.map +0 -1
- package/dist/__tests__/bundle/bundler.test.d.ts +0 -2
- package/dist/__tests__/bundle/bundler.test.d.ts.map +0 -1
- package/dist/__tests__/bundle/bundler.test.js +0 -353
- package/dist/__tests__/bundle/bundler.test.js.map +0 -1
- package/dist/__tests__/bundle/programmatic.test.d.ts +0 -2
- package/dist/__tests__/bundle/programmatic.test.d.ts.map +0 -1
- package/dist/__tests__/bundle/programmatic.test.js +0 -148
- package/dist/__tests__/bundle/programmatic.test.js.map +0 -1
- package/dist/__tests__/cli-e2e.test.d.ts +0 -8
- package/dist/__tests__/cli-e2e.test.d.ts.map +0 -1
- package/dist/__tests__/cli-e2e.test.js +0 -130
- package/dist/__tests__/cli-e2e.test.js.map +0 -1
- package/dist/__tests__/cli.test.d.ts +0 -2
- package/dist/__tests__/cli.test.d.ts.map +0 -1
- package/dist/__tests__/cli.test.js +0 -180
- package/dist/__tests__/cli.test.js.map +0 -1
- package/dist/__tests__/config-loader.test.d.ts +0 -7
- package/dist/__tests__/config-loader.test.d.ts.map +0 -1
- package/dist/__tests__/config-loader.test.js +0 -414
- package/dist/__tests__/config-loader.test.js.map +0 -1
- package/dist/__tests__/core/asset-resolver.test.d.ts +0 -2
- package/dist/__tests__/core/asset-resolver.test.d.ts.map +0 -1
- package/dist/__tests__/core/asset-resolver.test.js +0 -14
- package/dist/__tests__/core/asset-resolver.test.js.map +0 -1
- package/dist/__tests__/core/build-cache.test.d.ts +0 -2
- package/dist/__tests__/core/build-cache.test.d.ts.map +0 -1
- package/dist/__tests__/core/build-cache.test.js +0 -55
- package/dist/__tests__/core/build-cache.test.js.map +0 -1
- package/dist/__tests__/core/cache-utils.test.d.ts +0 -2
- package/dist/__tests__/core/cache-utils.test.d.ts.map +0 -1
- package/dist/__tests__/core/cache-utils.test.js +0 -70
- package/dist/__tests__/core/cache-utils.test.js.map +0 -1
- package/dist/__tests__/core/config.test.d.ts +0 -2
- package/dist/__tests__/core/config.test.d.ts.map +0 -1
- package/dist/__tests__/core/config.test.js +0 -72
- package/dist/__tests__/core/config.test.js.map +0 -1
- package/dist/__tests__/core/logger.test.d.ts +0 -2
- package/dist/__tests__/core/logger.test.d.ts.map +0 -1
- package/dist/__tests__/core/logger.test.js +0 -53
- package/dist/__tests__/core/logger.test.js.map +0 -1
- package/dist/__tests__/integration/bundle-run.integration.test.d.ts +0 -8
- package/dist/__tests__/integration/bundle-run.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/bundle-run.integration.test.js +0 -54
- package/dist/__tests__/integration/bundle-run.integration.test.js.map +0 -1
- package/dist/__tests__/push/push.test.d.ts +0 -7
- package/dist/__tests__/push/push.test.d.ts.map +0 -1
- package/dist/__tests__/push/push.test.js +0 -197
- package/dist/__tests__/push/push.test.js.map +0 -1
- package/dist/__tests__/simulate/env-loader.test.d.ts +0 -2
- package/dist/__tests__/simulate/env-loader.test.d.ts.map +0 -1
- package/dist/__tests__/simulate/env-loader.test.js +0 -47
- package/dist/__tests__/simulate/env-loader.test.js.map +0 -1
- package/dist/__tests__/simulate/node-executor.test.d.ts +0 -5
- package/dist/__tests__/simulate/node-executor.test.d.ts.map +0 -1
- package/dist/__tests__/simulate/node-executor.test.js +0 -25
- package/dist/__tests__/simulate/node-executor.test.js.map +0 -1
- package/dist/__tests__/simulate/server-simulate.integration.test.d.ts +0 -5
- package/dist/__tests__/simulate/server-simulate.integration.test.d.ts.map +0 -1
- package/dist/__tests__/simulate/server-simulate.integration.test.js +0 -58
- package/dist/__tests__/simulate/server-simulate.integration.test.js.map +0 -1
- package/dist/__tests__/smoke/production.smoke.test.d.ts +0 -8
- package/dist/__tests__/smoke/production.smoke.test.d.ts.map +0 -1
- package/dist/__tests__/smoke/production.smoke.test.js +0 -65
- package/dist/__tests__/smoke/production.smoke.test.js.map +0 -1
- package/dist/commands/bundle/bundler.d.ts +0 -32
- package/dist/commands/bundle/bundler.d.ts.map +0 -1
- package/dist/commands/bundle/bundler.js +0 -583
- package/dist/commands/bundle/bundler.js.map +0 -1
- package/dist/commands/bundle/index.d.ts +0 -57
- package/dist/commands/bundle/index.d.ts.map +0 -1
- package/dist/commands/bundle/index.js +0 -200
- package/dist/commands/bundle/index.js.map +0 -1
- package/dist/commands/bundle/package-manager.d.ts +0 -8
- package/dist/commands/bundle/package-manager.d.ts.map +0 -1
- package/dist/commands/bundle/package-manager.js +0 -197
- package/dist/commands/bundle/package-manager.js.map +0 -1
- package/dist/commands/bundle/stats.d.ts +0 -23
- package/dist/commands/bundle/stats.d.ts.map +0 -1
- package/dist/commands/bundle/stats.js +0 -52
- package/dist/commands/bundle/stats.js.map +0 -1
- package/dist/commands/cache.d.ts +0 -3
- package/dist/commands/cache.d.ts.map +0 -1
- package/dist/commands/cache.js +0 -44
- package/dist/commands/cache.js.map +0 -1
- package/dist/commands/push/index.d.ts +0 -7
- package/dist/commands/push/index.d.ts.map +0 -1
- package/dist/commands/push/index.js +0 -257
- package/dist/commands/push/index.js.map +0 -1
- package/dist/commands/push/types.d.ts +0 -21
- package/dist/commands/push/types.d.ts.map +0 -1
- package/dist/commands/push/types.js +0 -2
- package/dist/commands/push/types.js.map +0 -1
- package/dist/commands/run/__tests__/run.integration.test.d.ts +0 -8
- package/dist/commands/run/__tests__/run.integration.test.d.ts.map +0 -1
- package/dist/commands/run/__tests__/run.integration.test.js +0 -52
- package/dist/commands/run/__tests__/run.integration.test.js.map +0 -1
- package/dist/commands/run/__tests__/validators.test.d.ts +0 -2
- package/dist/commands/run/__tests__/validators.test.d.ts.map +0 -1
- package/dist/commands/run/__tests__/validators.test.js +0 -80
- package/dist/commands/run/__tests__/validators.test.js.map +0 -1
- package/dist/commands/run/execution.d.ts +0 -14
- package/dist/commands/run/execution.d.ts.map +0 -1
- package/dist/commands/run/execution.js +0 -41
- package/dist/commands/run/execution.js.map +0 -1
- package/dist/commands/run/index.d.ts +0 -39
- package/dist/commands/run/index.d.ts.map +0 -1
- package/dist/commands/run/index.js +0 -191
- package/dist/commands/run/index.js.map +0 -1
- package/dist/commands/run/types.d.ts +0 -60
- package/dist/commands/run/types.d.ts.map +0 -1
- package/dist/commands/run/types.js +0 -7
- package/dist/commands/run/types.js.map +0 -1
- package/dist/commands/run/utils.d.ts +0 -29
- package/dist/commands/run/utils.d.ts.map +0 -1
- package/dist/commands/run/utils.js +0 -52
- package/dist/commands/run/utils.js.map +0 -1
- package/dist/commands/run/validators.d.ts +0 -33
- package/dist/commands/run/validators.d.ts.map +0 -1
- package/dist/commands/run/validators.js +0 -58
- package/dist/commands/run/validators.js.map +0 -1
- package/dist/commands/simulate/env-loader.d.ts +0 -19
- package/dist/commands/simulate/env-loader.d.ts.map +0 -1
- package/dist/commands/simulate/env-loader.js +0 -46
- package/dist/commands/simulate/env-loader.js.map +0 -1
- package/dist/commands/simulate/index.d.ts +0 -48
- package/dist/commands/simulate/index.d.ts.map +0 -1
- package/dist/commands/simulate/index.js +0 -116
- package/dist/commands/simulate/index.js.map +0 -1
- package/dist/commands/simulate/jsdom-executor.d.ts +0 -37
- package/dist/commands/simulate/jsdom-executor.d.ts.map +0 -1
- package/dist/commands/simulate/jsdom-executor.js +0 -137
- package/dist/commands/simulate/jsdom-executor.js.map +0 -1
- package/dist/commands/simulate/node-executor.d.ts +0 -28
- package/dist/commands/simulate/node-executor.d.ts.map +0 -1
- package/dist/commands/simulate/node-executor.js +0 -94
- package/dist/commands/simulate/node-executor.js.map +0 -1
- package/dist/commands/simulate/simulator.d.ts +0 -14
- package/dist/commands/simulate/simulator.d.ts.map +0 -1
- package/dist/commands/simulate/simulator.js +0 -162
- package/dist/commands/simulate/simulator.js.map +0 -1
- package/dist/commands/simulate/tracker.d.ts +0 -30
- package/dist/commands/simulate/tracker.d.ts.map +0 -1
- package/dist/commands/simulate/tracker.js +0 -96
- package/dist/commands/simulate/tracker.js.map +0 -1
- package/dist/commands/simulate/types.d.ts +0 -18
- package/dist/commands/simulate/types.d.ts.map +0 -1
- package/dist/commands/simulate/types.js +0 -2
- package/dist/commands/simulate/types.js.map +0 -1
- package/dist/config/build-defaults.d.ts +0 -49
- package/dist/config/build-defaults.d.ts.map +0 -1
- package/dist/config/build-defaults.js +0 -70
- package/dist/config/build-defaults.js.map +0 -1
- package/dist/config/index.d.ts +0 -13
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -15
- package/dist/config/index.js.map +0 -1
- package/dist/config/loader.d.ts +0 -81
- package/dist/config/loader.d.ts.map +0 -1
- package/dist/config/loader.js +0 -155
- package/dist/config/loader.js.map +0 -1
- package/dist/config/utils.d.ts +0 -114
- package/dist/config/utils.d.ts.map +0 -1
- package/dist/config/utils.js +0 -257
- package/dist/config/utils.js.map +0 -1
- package/dist/config/validators.d.ts +0 -52
- package/dist/config/validators.d.ts.map +0 -1
- package/dist/config/validators.js +0 -85
- package/dist/config/validators.js.map +0 -1
- package/dist/core/asset-resolver.d.ts +0 -34
- package/dist/core/asset-resolver.d.ts.map +0 -1
- package/dist/core/asset-resolver.js +0 -70
- package/dist/core/asset-resolver.js.map +0 -1
- package/dist/core/build-cache.d.ts +0 -23
- package/dist/core/build-cache.d.ts.map +0 -1
- package/dist/core/build-cache.js +0 -43
- package/dist/core/build-cache.js.map +0 -1
- package/dist/core/cache-utils.d.ts +0 -27
- package/dist/core/cache-utils.d.ts.map +0 -1
- package/dist/core/cache-utils.js +0 -60
- package/dist/core/cache-utils.js.map +0 -1
- package/dist/core/docker.d.ts +0 -99
- package/dist/core/docker.d.ts.map +0 -1
- package/dist/core/docker.js +0 -253
- package/dist/core/docker.js.map +0 -1
- package/dist/core/execution.d.ts +0 -34
- package/dist/core/execution.d.ts.map +0 -1
- package/dist/core/execution.js +0 -64
- package/dist/core/execution.js.map +0 -1
- package/dist/core/index.d.ts +0 -10
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -10
- package/dist/core/index.js.map +0 -1
- package/dist/core/local-packages.d.ts +0 -19
- package/dist/core/local-packages.d.ts.map +0 -1
- package/dist/core/local-packages.js +0 -60
- package/dist/core/local-packages.js.map +0 -1
- package/dist/core/logger.d.ts +0 -28
- package/dist/core/logger.d.ts.map +0 -1
- package/dist/core/logger.js +0 -88
- package/dist/core/logger.js.map +0 -1
- package/dist/core/output.d.ts +0 -30
- package/dist/core/output.d.ts.map +0 -1
- package/dist/core/output.js +0 -46
- package/dist/core/output.js.map +0 -1
- package/dist/core/temp-manager.d.ts +0 -51
- package/dist/core/temp-manager.d.ts.map +0 -1
- package/dist/core/temp-manager.js +0 -73
- package/dist/core/temp-manager.js.map +0 -1
- package/dist/core/timer.d.ts +0 -14
- package/dist/core/timer.d.ts.map +0 -1
- package/dist/core/timer.js +0 -29
- package/dist/core/timer.js.map +0 -1
- package/dist/core/utils.d.ts +0 -10
- package/dist/core/utils.d.ts.map +0 -1
- package/dist/core/utils.js +0 -12
- package/dist/core/utils.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/schemas/index.d.ts +0 -9
- package/dist/schemas/index.d.ts.map +0 -1
- package/dist/schemas/index.js +0 -9
- package/dist/schemas/index.js.map +0 -1
- package/dist/schemas/primitives.d.ts +0 -37
- package/dist/schemas/primitives.d.ts.map +0 -1
- package/dist/schemas/primitives.js +0 -43
- package/dist/schemas/primitives.js.map +0 -1
- package/dist/schemas/run.d.ts +0 -23
- package/dist/schemas/run.d.ts.map +0 -1
- package/dist/schemas/run.js +0 -20
- package/dist/schemas/run.js.map +0 -1
- package/dist/types/bundle.d.ts +0 -141
- package/dist/types/bundle.d.ts.map +0 -1
- package/dist/types/bundle.js +0 -10
- package/dist/types/bundle.js.map +0 -1
- package/dist/types/global.d.ts +0 -51
- package/dist/types/global.d.ts.map +0 -1
- package/dist/types/global.js +0 -30
- package/dist/types/global.js.map +0 -1
- package/dist/types/index.d.ts +0 -8
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -8
- package/dist/types/index.js.map +0 -1
- package/dist/walker.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# @walkeros/cli
|
|
2
2
|
|
|
3
|
+
## 0.6.1-next-1766186076625
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f6007dd: Fix consistent logger forwarding across CLI commands
|
|
8
|
+
- Remove duplicate `createCollectorLoggerConfig` from push command, import
|
|
9
|
+
from core
|
|
10
|
+
- Fix simulate command to use `collector.push` instead of `elb()` (same
|
|
11
|
+
pattern as push)
|
|
12
|
+
- Add logger forwarding to simulate command via `executeInNode`
|
|
13
|
+
- Add logger forwarding to run command via `runFlow`
|
|
14
|
+
|
|
15
|
+
## 0.0.0-next-20251219153324
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 42d06c8: CLI simplification - removed Docker mode for build commands, merged
|
|
20
|
+
runtime from @walkeros/docker into CLI, single walkeros/flow image for
|
|
21
|
+
production
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- 71b615f: Fix URL handling in resolveAsset - URLs are now passed through
|
|
26
|
+
unchanged instead of being mangled into invalid filesystem paths
|
|
27
|
+
- Updated dependencies [5163b01]
|
|
28
|
+
- @walkeros/core@0.0.0-next-20251219153324
|
|
29
|
+
- @walkeros/server-core@0.0.0-next-20251219153324
|
|
30
|
+
|
|
31
|
+
## 0.7.0-next.0
|
|
32
|
+
|
|
33
|
+
### Minor Changes
|
|
34
|
+
|
|
35
|
+
- 42d06c8: Fix Docker runtime version display - versions now read reliably from
|
|
36
|
+
package.json at runtime instead of fragile build-time injection
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Updated dependencies [42d06c8]
|
|
41
|
+
- @walkeros/docker@0.7.0-next.0
|
|
42
|
+
|
|
3
43
|
## 0.5.1-next.1
|
|
4
44
|
|
|
5
45
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -31,13 +31,16 @@ npm install @walkeros/cli
|
|
|
31
31
|
walkeros bundle flow.json
|
|
32
32
|
|
|
33
33
|
# Test with simulated events (no real API calls)
|
|
34
|
-
walkeros simulate flow.json --event '{"name":"
|
|
34
|
+
walkeros simulate flow.json --event '{"name":"product view"}'
|
|
35
|
+
|
|
36
|
+
# Or test a pre-built bundle directly
|
|
37
|
+
walkeros simulate dist/bundle.mjs --event '{"name":"product view"}'
|
|
35
38
|
|
|
36
39
|
# Push real events to destinations
|
|
37
|
-
walkeros push flow.json --event '{"name":"
|
|
40
|
+
walkeros push flow.json --event '{"name":"product view"}'
|
|
38
41
|
|
|
39
42
|
# Run a collection server locally
|
|
40
|
-
walkeros run collect
|
|
43
|
+
walkeros run collect dist/bundle.mjs --port 3000
|
|
41
44
|
```
|
|
42
45
|
|
|
43
46
|
## Commands
|
|
@@ -64,7 +67,6 @@ walkeros bundle https://example.com/config.json # Remote URL
|
|
|
64
67
|
- `-s, --stats` - Show bundle statistics
|
|
65
68
|
- `--json` - Output stats as JSON
|
|
66
69
|
- `--no-cache` - Disable package caching
|
|
67
|
-
- `--local` - Run locally without Docker
|
|
68
70
|
- `-v, --verbose` - Verbose output
|
|
69
71
|
|
|
70
72
|
**Example:**
|
|
@@ -79,47 +81,77 @@ The output path uses convention-based defaults: `./dist/bundle.mjs` for server,
|
|
|
79
81
|
|
|
80
82
|
### simulate
|
|
81
83
|
|
|
82
|
-
Test event processing with simulated events.
|
|
84
|
+
Test event processing with simulated events. Accepts either a config JSON (which
|
|
85
|
+
gets bundled) or a pre-built bundle (executed directly).
|
|
83
86
|
|
|
84
87
|
```bash
|
|
85
|
-
walkeros simulate <
|
|
88
|
+
walkeros simulate <input> --event '{"name":"page view"}' [options]
|
|
86
89
|
```
|
|
87
90
|
|
|
91
|
+
**Input types:**
|
|
92
|
+
|
|
93
|
+
- **Config JSON** - Bundled and executed with destination mocking
|
|
94
|
+
- **Pre-built bundle** (`.js`/`.mjs`) - Executed directly, no mocking
|
|
95
|
+
|
|
96
|
+
The CLI auto-detects the input type by attempting to parse as JSON.
|
|
97
|
+
|
|
88
98
|
**Options:**
|
|
89
99
|
|
|
90
100
|
- `-e, --event <json>` - Event JSON string (required)
|
|
101
|
+
- `-p, --platform <platform>` - Platform override (`web` or `server`)
|
|
91
102
|
- `--json` - Output results as JSON
|
|
92
|
-
- `--local` - Run locally without Docker
|
|
93
103
|
- `-v, --verbose` - Verbose output
|
|
94
104
|
|
|
95
|
-
**
|
|
105
|
+
**Examples:**
|
|
96
106
|
|
|
97
107
|
```bash
|
|
98
|
-
# Simulate
|
|
99
|
-
walkeros simulate \
|
|
100
|
-
examples/web-serve.json \
|
|
108
|
+
# Simulate with config (auto-bundled)
|
|
109
|
+
walkeros simulate examples/web-serve.json \
|
|
101
110
|
--event '{"name":"page view","data":{"title":"Home"}}' \
|
|
102
111
|
--json
|
|
112
|
+
|
|
113
|
+
# Simulate with pre-built bundle
|
|
114
|
+
walkeros simulate dist/bundle.mjs --event '{"name":"page view"}'
|
|
115
|
+
|
|
116
|
+
# Override platform detection
|
|
117
|
+
walkeros simulate dist/bundle.js --platform server --event '{"name":"page view"}'
|
|
103
118
|
```
|
|
104
119
|
|
|
120
|
+
**Platform detection:**
|
|
121
|
+
|
|
122
|
+
When using pre-built bundles, platform is detected from file extension:
|
|
123
|
+
|
|
124
|
+
- `.mjs` → server (ESM, Node.js)
|
|
125
|
+
- `.js` → web (IIFE, JSDOM)
|
|
126
|
+
|
|
127
|
+
Use `--platform` to override if extension doesn't match intended runtime.
|
|
128
|
+
|
|
105
129
|
### push
|
|
106
130
|
|
|
107
131
|
Execute your flow with real API calls to configured destinations. Unlike
|
|
108
|
-
`simulate` which mocks API calls, `push` performs actual HTTP requests.
|
|
132
|
+
`simulate` which mocks API calls, `push` performs actual HTTP requests. Accepts
|
|
133
|
+
either a config JSON (which gets bundled) or a pre-built bundle.
|
|
109
134
|
|
|
110
135
|
```bash
|
|
111
|
-
walkeros push <
|
|
136
|
+
walkeros push <input> --event '<json>' [options]
|
|
112
137
|
```
|
|
113
138
|
|
|
139
|
+
**Input types:**
|
|
140
|
+
|
|
141
|
+
- **Config JSON** - Bundled and executed
|
|
142
|
+
- **Pre-built bundle** (`.js`/`.mjs`) - Executed directly
|
|
143
|
+
|
|
144
|
+
The CLI auto-detects the input type by attempting to parse as JSON.
|
|
145
|
+
|
|
114
146
|
**Options:**
|
|
115
147
|
|
|
116
148
|
- `-e, --event <source>` - Event to push (JSON string, file path, or URL)
|
|
117
149
|
**Required**
|
|
118
150
|
- `--flow <name>` - Flow name (for multi-flow configs)
|
|
151
|
+
- `-p, --platform <platform>` - Platform override (`web` or `server`)
|
|
119
152
|
- `--json` - Output results as JSON
|
|
120
153
|
- `-v, --verbose` - Verbose output
|
|
121
154
|
- `-s, --silent` - Suppress output (for CI/CD)
|
|
122
|
-
- `--local` - Execute locally without Docker
|
|
123
155
|
|
|
124
156
|
**Event input formats:**
|
|
125
157
|
|
|
@@ -134,6 +166,16 @@ walkeros push flow.json --event ./events/order.json
|
|
|
134
166
|
walkeros push flow.json --event https://example.com/sample-event.json
|
|
135
167
|
```
|
|
136
168
|
|
|
169
|
+
**Bundle input:**
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Push with pre-built bundle
|
|
173
|
+
walkeros push dist/bundle.mjs --event '{"name":"order complete"}'
|
|
174
|
+
|
|
175
|
+
# Override platform detection
|
|
176
|
+
walkeros push dist/bundle.js --platform server --event '{"name":"order complete"}'
|
|
177
|
+
```
|
|
178
|
+
|
|
137
179
|
**Push vs Simulate:**
|
|
138
180
|
|
|
139
181
|
| Feature | `push` | `simulate` |
|
|
@@ -147,8 +189,7 @@ real integrations.
|
|
|
147
189
|
|
|
148
190
|
### run
|
|
149
191
|
|
|
150
|
-
Run flows locally
|
|
151
|
-
required).
|
|
192
|
+
Run flows locally (no Docker daemon required).
|
|
152
193
|
|
|
153
194
|
```bash
|
|
154
195
|
walkeros run <mode> <config-file> [options]
|
|
@@ -164,7 +205,6 @@ walkeros run <mode> <config-file> [options]
|
|
|
164
205
|
- `-p, --port <number>` - Server port
|
|
165
206
|
- `-h, --host <host>` - Server host
|
|
166
207
|
- `--static-dir <dir>` - Static directory (serve mode)
|
|
167
|
-
- `--local` - Run locally without Docker
|
|
168
208
|
- `--json` - JSON output
|
|
169
209
|
- `-v, --verbose` - Verbose output
|
|
170
210
|
|
|
@@ -183,9 +223,9 @@ walkeros run serve flow.json --port 8080 --static-dir ./dist
|
|
|
183
223
|
|
|
184
224
|
**How it works:**
|
|
185
225
|
|
|
186
|
-
1. JSON configs are bundled to temp `.mjs`
|
|
226
|
+
1. JSON configs are auto-bundled to temp `.mjs`
|
|
187
227
|
2. `.mjs` bundles are used directly
|
|
188
|
-
3. Runs in current Node.js process
|
|
228
|
+
3. Runs in current Node.js process
|
|
189
229
|
4. Press Ctrl+C for graceful shutdown
|
|
190
230
|
|
|
191
231
|
## Caching
|
|
@@ -444,17 +484,17 @@ Typical development cycle:
|
|
|
444
484
|
# 1. Create/edit config
|
|
445
485
|
vim my-flow.json
|
|
446
486
|
|
|
447
|
-
# 2.
|
|
448
|
-
walkeros bundle my-flow.json --stats
|
|
449
|
-
|
|
450
|
-
# 3. Test with simulation
|
|
487
|
+
# 2. Test with simulation (no real API calls)
|
|
451
488
|
walkeros simulate \
|
|
452
489
|
my-flow.json \
|
|
453
|
-
--event '{"name":"
|
|
490
|
+
--event '{"name":"product view"}' \
|
|
454
491
|
--verbose
|
|
455
492
|
|
|
493
|
+
# 3. Bundle and check stats
|
|
494
|
+
walkeros bundle my-flow.json --stats
|
|
495
|
+
|
|
456
496
|
# 4. Run locally
|
|
457
|
-
walkeros run collect
|
|
497
|
+
walkeros run collect dist/bundle.mjs --port 3000
|
|
458
498
|
|
|
459
499
|
# 5. In another terminal, test it
|
|
460
500
|
curl -X POST http://localhost:3000/collect \
|
|
@@ -468,26 +508,55 @@ curl -X POST http://localhost:3000/collect \
|
|
|
468
508
|
CLI (downloads packages + bundles with esbuild)
|
|
469
509
|
├─ Bundle → optimized .mjs file
|
|
470
510
|
├─ Simulate → test bundle with events
|
|
471
|
-
└─ Run →
|
|
511
|
+
└─ Run → execute bundle with built-in runtime
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
**Key principle**: CLI handles both build-time and runtime operations.
|
|
515
|
+
|
|
516
|
+
## Production Deployment
|
|
517
|
+
|
|
518
|
+
Deploy your flows using Docker or Node.js.
|
|
519
|
+
|
|
520
|
+
### Using Docker
|
|
521
|
+
|
|
522
|
+
The `walkeros/flow` image runs pre-built bundles in production:
|
|
523
|
+
|
|
524
|
+
```bash
|
|
525
|
+
# Build your flow
|
|
526
|
+
walkeros bundle flow.json
|
|
527
|
+
|
|
528
|
+
# Run with Docker
|
|
529
|
+
docker run -v ./dist:/flow -p 8080:8080 walkeros/flow
|
|
472
530
|
```
|
|
473
531
|
|
|
474
|
-
**
|
|
532
|
+
**Custom image:**
|
|
475
533
|
|
|
476
|
-
|
|
534
|
+
```dockerfile
|
|
535
|
+
FROM walkeros/flow
|
|
536
|
+
COPY dist/bundle.mjs /flow/
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
**Environment variables:**
|
|
477
540
|
|
|
478
|
-
|
|
541
|
+
- `MODE` - `collect` or `serve` (default: `collect`)
|
|
542
|
+
- `PORT` - Server port (default: `8080`)
|
|
543
|
+
- `FILE` - Bundle path (default: `/flow/bundle.mjs`)
|
|
479
544
|
|
|
480
|
-
|
|
481
|
-
- `walkeros/docker:0.1.4` - Production runtime
|
|
545
|
+
### Using Node.js
|
|
482
546
|
|
|
483
|
-
|
|
547
|
+
Run the bundle directly with the CLI:
|
|
484
548
|
|
|
485
549
|
```bash
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
550
|
+
# Build your flow
|
|
551
|
+
walkeros bundle flow.json
|
|
552
|
+
|
|
553
|
+
# Run in production
|
|
554
|
+
walkeros run collect dist/bundle.mjs --port 8080
|
|
489
555
|
```
|
|
490
556
|
|
|
557
|
+
This runs the flow in the current Node.js process, suitable for deployment on
|
|
558
|
+
platforms like AWS Lambda, Google Cloud Run, or any Node.js hosting.
|
|
559
|
+
|
|
491
560
|
## Requirements
|
|
492
561
|
|
|
493
562
|
- **Node.js**: 18+ or 22+
|
|
@@ -501,7 +570,6 @@ See [src/types.ts](./src/types.ts) for TypeScript interfaces.
|
|
|
501
570
|
|
|
502
571
|
- [Website Documentation](https://www.walkeros.io/docs/cli/)
|
|
503
572
|
- [Flow Configuration](https://www.walkeros.io/docs/getting-started/flow/)
|
|
504
|
-
- [Docker Package](../docker/) - Production runtime
|
|
505
573
|
|
|
506
574
|
## License
|
|
507
575
|
|
package/dist/index.d.ts
CHANGED
|
@@ -150,11 +150,6 @@ interface MinifyOptions {
|
|
|
150
150
|
* Global options available across all CLI commands
|
|
151
151
|
*/
|
|
152
152
|
interface GlobalOptions {
|
|
153
|
-
/**
|
|
154
|
-
* Execute using local Node.js environment (vs Docker container)
|
|
155
|
-
* @default false (Docker mode)
|
|
156
|
-
*/
|
|
157
|
-
local?: boolean;
|
|
158
153
|
/**
|
|
159
154
|
* Show detailed execution logs
|
|
160
155
|
* @default false
|
|
@@ -182,13 +177,16 @@ interface BundleStats {
|
|
|
182
177
|
treeshakingEffective: boolean;
|
|
183
178
|
}
|
|
184
179
|
|
|
185
|
-
interface BundleCommandOptions
|
|
180
|
+
interface BundleCommandOptions {
|
|
186
181
|
config: string;
|
|
187
182
|
flow?: string;
|
|
188
183
|
all?: boolean;
|
|
189
184
|
stats?: boolean;
|
|
190
185
|
json?: boolean;
|
|
191
186
|
cache?: boolean;
|
|
187
|
+
verbose?: boolean;
|
|
188
|
+
dryRun?: boolean;
|
|
189
|
+
silent?: boolean;
|
|
192
190
|
}
|
|
193
191
|
declare function bundleCommand(options: BundleCommandOptions): Promise<void>;
|
|
194
192
|
/**
|
|
@@ -245,10 +243,14 @@ interface ApiCall {
|
|
|
245
243
|
timestamp: number;
|
|
246
244
|
}
|
|
247
245
|
|
|
248
|
-
interface SimulateCommandOptions
|
|
246
|
+
interface SimulateCommandOptions {
|
|
249
247
|
config: string;
|
|
250
248
|
event?: string;
|
|
251
249
|
json?: boolean;
|
|
250
|
+
verbose?: boolean;
|
|
251
|
+
dryRun?: boolean;
|
|
252
|
+
silent?: boolean;
|
|
253
|
+
platform?: 'web' | 'server';
|
|
252
254
|
}
|
|
253
255
|
interface SimulationResult {
|
|
254
256
|
success: boolean;
|
|
@@ -307,11 +309,14 @@ declare function simulate(configOrPath: string | unknown, event: unknown, option
|
|
|
307
309
|
/**
|
|
308
310
|
* Push command options
|
|
309
311
|
*/
|
|
310
|
-
interface PushCommandOptions
|
|
312
|
+
interface PushCommandOptions {
|
|
311
313
|
config: string;
|
|
312
314
|
event: string;
|
|
313
315
|
flow?: string;
|
|
314
316
|
json?: boolean;
|
|
317
|
+
verbose?: boolean;
|
|
318
|
+
silent?: boolean;
|
|
319
|
+
platform?: 'web' | 'server';
|
|
315
320
|
}
|
|
316
321
|
|
|
317
322
|
/**
|
|
@@ -322,9 +327,8 @@ declare function pushCommand(options: PushCommandOptions): Promise<void>;
|
|
|
322
327
|
/**
|
|
323
328
|
* Run Command Types
|
|
324
329
|
*
|
|
325
|
-
* Types for running walkerOS flows via CLI using
|
|
330
|
+
* Types for running walkerOS flows via CLI using local runtime
|
|
326
331
|
*/
|
|
327
|
-
|
|
328
332
|
/**
|
|
329
333
|
* Run mode - determines which execution mode to use
|
|
330
334
|
*/
|
|
@@ -332,7 +336,7 @@ type RunMode = 'collect' | 'serve';
|
|
|
332
336
|
/**
|
|
333
337
|
* CLI command options for `walkeros run`
|
|
334
338
|
*/
|
|
335
|
-
interface RunCommandOptions
|
|
339
|
+
interface RunCommandOptions {
|
|
336
340
|
/** Flow configuration file path (.json or pre-built .mjs) */
|
|
337
341
|
config: string;
|
|
338
342
|
/** Server port (overrides flow config) */
|
|
@@ -345,6 +349,12 @@ interface RunCommandOptions extends GlobalOptions {
|
|
|
345
349
|
serveName?: string;
|
|
346
350
|
/** Enable JSON output */
|
|
347
351
|
json?: boolean;
|
|
352
|
+
/** Verbose logging */
|
|
353
|
+
verbose?: boolean;
|
|
354
|
+
/** Dry-run mode */
|
|
355
|
+
dryRun?: boolean;
|
|
356
|
+
/** Suppress output */
|
|
357
|
+
silent?: boolean;
|
|
348
358
|
}
|
|
349
359
|
/**
|
|
350
360
|
* Programmatic run options (subset of CLI options)
|
|
@@ -382,8 +392,7 @@ interface RunResult {
|
|
|
382
392
|
/**
|
|
383
393
|
* Run Command
|
|
384
394
|
*
|
|
385
|
-
* Runs walkerOS flows using
|
|
386
|
-
* No Docker daemon required - runs directly in Node.js
|
|
395
|
+
* Runs walkerOS flows using local runtime
|
|
387
396
|
*/
|
|
388
397
|
|
|
389
398
|
/**
|