@walkeros/cli 0.7.0-next.0 → 0.8.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 +123 -37
- package/dist/examples/flow-order-complete.json +0 -1
- package/dist/examples/flow-simple.json +0 -3
- package/dist/examples/flow.json +0 -1
- package/dist/index.d.ts +23 -13
- package/dist/index.js +882 -846
- package/dist/index.js.map +1 -1
- package/dist/runtime/main.d.ts +2 -0
- package/dist/runtime/main.js +271 -0
- package/dist/runtime/main.js.map +1 -0
- package/dist/walker.js +1 -1
- package/examples/flow-order-complete.json +0 -1
- package/examples/flow-simple.json +0 -3
- package/examples/flow.json +0 -1
- package/package.json +10 -7
- package/CHANGELOG.md +0 -159
- 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/docker-url.test.d.ts +0 -2
- package/dist/__tests__/core/docker-url.test.d.ts.map +0 -1
- package/dist/__tests__/core/docker-url.test.js +0 -54
- package/dist/__tests__/core/docker-url.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 -102
- package/dist/core/docker.d.ts.map +0 -1
- package/dist/core/docker.js +0 -278
- 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/version.d.ts +0 -3
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -27
- package/dist/version.js.map +0 -1
package/README.md
CHANGED
|
@@ -14,6 +14,21 @@ The walkerOS CLI is a developer tool that:
|
|
|
14
14
|
Think of it as your development toolchain for walkerOS - from config to running
|
|
15
15
|
production bundles.
|
|
16
16
|
|
|
17
|
+
### When to Use the CLI
|
|
18
|
+
|
|
19
|
+
The CLI is for **Bundled mode** — when you want config-as-code and separate
|
|
20
|
+
deployment:
|
|
21
|
+
|
|
22
|
+
| Use CLI When | Use Integrated Mode When |
|
|
23
|
+
| --------------------------- | ------------------------ |
|
|
24
|
+
| Static sites, landing pages | React/Next.js apps |
|
|
25
|
+
| Docker/server deployments | TypeScript projects |
|
|
26
|
+
| CI/CD versioned configs | Programmatic control |
|
|
27
|
+
| Marketing/GTM workflows | Build-time type safety |
|
|
28
|
+
|
|
29
|
+
For Integrated mode (importing directly into your app), see the
|
|
30
|
+
[Collector package](../collector/).
|
|
31
|
+
|
|
17
32
|
## Installation
|
|
18
33
|
|
|
19
34
|
```bash
|
|
@@ -31,13 +46,16 @@ npm install @walkeros/cli
|
|
|
31
46
|
walkeros bundle flow.json
|
|
32
47
|
|
|
33
48
|
# Test with simulated events (no real API calls)
|
|
34
|
-
walkeros simulate flow.json --event '{"name":"
|
|
49
|
+
walkeros simulate flow.json --event '{"name":"product view"}'
|
|
50
|
+
|
|
51
|
+
# Or test a pre-built bundle directly
|
|
52
|
+
walkeros simulate dist/bundle.mjs --event '{"name":"product view"}'
|
|
35
53
|
|
|
36
54
|
# Push real events to destinations
|
|
37
|
-
walkeros push flow.json --event '{"name":"
|
|
55
|
+
walkeros push flow.json --event '{"name":"product view"}'
|
|
38
56
|
|
|
39
57
|
# Run a collection server locally
|
|
40
|
-
walkeros run collect
|
|
58
|
+
walkeros run collect dist/bundle.mjs --port 3000
|
|
41
59
|
```
|
|
42
60
|
|
|
43
61
|
## Commands
|
|
@@ -64,7 +82,6 @@ walkeros bundle https://example.com/config.json # Remote URL
|
|
|
64
82
|
- `-s, --stats` - Show bundle statistics
|
|
65
83
|
- `--json` - Output stats as JSON
|
|
66
84
|
- `--no-cache` - Disable package caching
|
|
67
|
-
- `--local` - Run locally without Docker
|
|
68
85
|
- `-v, --verbose` - Verbose output
|
|
69
86
|
|
|
70
87
|
**Example:**
|
|
@@ -79,47 +96,77 @@ The output path uses convention-based defaults: `./dist/bundle.mjs` for server,
|
|
|
79
96
|
|
|
80
97
|
### simulate
|
|
81
98
|
|
|
82
|
-
Test event processing with simulated events.
|
|
99
|
+
Test event processing with simulated events. Accepts either a config JSON (which
|
|
100
|
+
gets bundled) or a pre-built bundle (executed directly).
|
|
83
101
|
|
|
84
102
|
```bash
|
|
85
|
-
walkeros simulate <
|
|
103
|
+
walkeros simulate <input> --event '{"name":"page view"}' [options]
|
|
86
104
|
```
|
|
87
105
|
|
|
106
|
+
**Input types:**
|
|
107
|
+
|
|
108
|
+
- **Config JSON** - Bundled and executed with destination mocking
|
|
109
|
+
- **Pre-built bundle** (`.js`/`.mjs`) - Executed directly, no mocking
|
|
110
|
+
|
|
111
|
+
The CLI auto-detects the input type by attempting to parse as JSON.
|
|
112
|
+
|
|
88
113
|
**Options:**
|
|
89
114
|
|
|
90
115
|
- `-e, --event <json>` - Event JSON string (required)
|
|
116
|
+
- `-p, --platform <platform>` - Platform override (`web` or `server`)
|
|
91
117
|
- `--json` - Output results as JSON
|
|
92
|
-
- `--local` - Run locally without Docker
|
|
93
118
|
- `-v, --verbose` - Verbose output
|
|
94
119
|
|
|
95
|
-
**
|
|
120
|
+
**Examples:**
|
|
96
121
|
|
|
97
122
|
```bash
|
|
98
|
-
# Simulate
|
|
99
|
-
walkeros simulate \
|
|
100
|
-
examples/web-serve.json \
|
|
123
|
+
# Simulate with config (auto-bundled)
|
|
124
|
+
walkeros simulate examples/web-serve.json \
|
|
101
125
|
--event '{"name":"page view","data":{"title":"Home"}}' \
|
|
102
126
|
--json
|
|
127
|
+
|
|
128
|
+
# Simulate with pre-built bundle
|
|
129
|
+
walkeros simulate dist/bundle.mjs --event '{"name":"page view"}'
|
|
130
|
+
|
|
131
|
+
# Override platform detection
|
|
132
|
+
walkeros simulate dist/bundle.js --platform server --event '{"name":"page view"}'
|
|
103
133
|
```
|
|
104
134
|
|
|
135
|
+
**Platform detection:**
|
|
136
|
+
|
|
137
|
+
When using pre-built bundles, platform is detected from file extension:
|
|
138
|
+
|
|
139
|
+
- `.mjs` → server (ESM, Node.js)
|
|
140
|
+
- `.js` → web (IIFE, JSDOM)
|
|
141
|
+
|
|
142
|
+
Use `--platform` to override if extension doesn't match intended runtime.
|
|
143
|
+
|
|
105
144
|
### push
|
|
106
145
|
|
|
107
146
|
Execute your flow with real API calls to configured destinations. Unlike
|
|
108
|
-
`simulate` which mocks API calls, `push` performs actual HTTP requests.
|
|
147
|
+
`simulate` which mocks API calls, `push` performs actual HTTP requests. Accepts
|
|
148
|
+
either a config JSON (which gets bundled) or a pre-built bundle.
|
|
109
149
|
|
|
110
150
|
```bash
|
|
111
|
-
walkeros push <
|
|
151
|
+
walkeros push <input> --event '<json>' [options]
|
|
112
152
|
```
|
|
113
153
|
|
|
154
|
+
**Input types:**
|
|
155
|
+
|
|
156
|
+
- **Config JSON** - Bundled and executed
|
|
157
|
+
- **Pre-built bundle** (`.js`/`.mjs`) - Executed directly
|
|
158
|
+
|
|
159
|
+
The CLI auto-detects the input type by attempting to parse as JSON.
|
|
160
|
+
|
|
114
161
|
**Options:**
|
|
115
162
|
|
|
116
163
|
- `-e, --event <source>` - Event to push (JSON string, file path, or URL)
|
|
117
164
|
**Required**
|
|
118
165
|
- `--flow <name>` - Flow name (for multi-flow configs)
|
|
166
|
+
- `-p, --platform <platform>` - Platform override (`web` or `server`)
|
|
119
167
|
- `--json` - Output results as JSON
|
|
120
168
|
- `-v, --verbose` - Verbose output
|
|
121
169
|
- `-s, --silent` - Suppress output (for CI/CD)
|
|
122
|
-
- `--local` - Execute locally without Docker
|
|
123
170
|
|
|
124
171
|
**Event input formats:**
|
|
125
172
|
|
|
@@ -134,6 +181,16 @@ walkeros push flow.json --event ./events/order.json
|
|
|
134
181
|
walkeros push flow.json --event https://example.com/sample-event.json
|
|
135
182
|
```
|
|
136
183
|
|
|
184
|
+
**Bundle input:**
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Push with pre-built bundle
|
|
188
|
+
walkeros push dist/bundle.mjs --event '{"name":"order complete"}'
|
|
189
|
+
|
|
190
|
+
# Override platform detection
|
|
191
|
+
walkeros push dist/bundle.js --platform server --event '{"name":"order complete"}'
|
|
192
|
+
```
|
|
193
|
+
|
|
137
194
|
**Push vs Simulate:**
|
|
138
195
|
|
|
139
196
|
| Feature | `push` | `simulate` |
|
|
@@ -147,8 +204,7 @@ real integrations.
|
|
|
147
204
|
|
|
148
205
|
### run
|
|
149
206
|
|
|
150
|
-
Run flows locally
|
|
151
|
-
required).
|
|
207
|
+
Run flows locally (no Docker daemon required).
|
|
152
208
|
|
|
153
209
|
```bash
|
|
154
210
|
walkeros run <mode> <config-file> [options]
|
|
@@ -164,7 +220,6 @@ walkeros run <mode> <config-file> [options]
|
|
|
164
220
|
- `-p, --port <number>` - Server port
|
|
165
221
|
- `-h, --host <host>` - Server host
|
|
166
222
|
- `--static-dir <dir>` - Static directory (serve mode)
|
|
167
|
-
- `--local` - Run locally without Docker
|
|
168
223
|
- `--json` - JSON output
|
|
169
224
|
- `-v, --verbose` - Verbose output
|
|
170
225
|
|
|
@@ -183,9 +238,9 @@ walkeros run serve flow.json --port 8080 --static-dir ./dist
|
|
|
183
238
|
|
|
184
239
|
**How it works:**
|
|
185
240
|
|
|
186
|
-
1. JSON configs are bundled to temp `.mjs`
|
|
241
|
+
1. JSON configs are auto-bundled to temp `.mjs`
|
|
187
242
|
2. `.mjs` bundles are used directly
|
|
188
|
-
3. Runs in current Node.js process
|
|
243
|
+
3. Runs in current Node.js process
|
|
189
244
|
4. Press Ctrl+C for graceful shutdown
|
|
190
245
|
|
|
191
246
|
## Caching
|
|
@@ -444,17 +499,17 @@ Typical development cycle:
|
|
|
444
499
|
# 1. Create/edit config
|
|
445
500
|
vim my-flow.json
|
|
446
501
|
|
|
447
|
-
# 2.
|
|
448
|
-
walkeros bundle my-flow.json --stats
|
|
449
|
-
|
|
450
|
-
# 3. Test with simulation
|
|
502
|
+
# 2. Test with simulation (no real API calls)
|
|
451
503
|
walkeros simulate \
|
|
452
504
|
my-flow.json \
|
|
453
|
-
--event '{"name":"
|
|
505
|
+
--event '{"name":"product view"}' \
|
|
454
506
|
--verbose
|
|
455
507
|
|
|
508
|
+
# 3. Bundle and check stats
|
|
509
|
+
walkeros bundle my-flow.json --stats
|
|
510
|
+
|
|
456
511
|
# 4. Run locally
|
|
457
|
-
walkeros run collect
|
|
512
|
+
walkeros run collect dist/bundle.mjs --port 3000
|
|
458
513
|
|
|
459
514
|
# 5. In another terminal, test it
|
|
460
515
|
curl -X POST http://localhost:3000/collect \
|
|
@@ -468,26 +523,55 @@ curl -X POST http://localhost:3000/collect \
|
|
|
468
523
|
CLI (downloads packages + bundles with esbuild)
|
|
469
524
|
├─ Bundle → optimized .mjs file
|
|
470
525
|
├─ Simulate → test bundle with events
|
|
471
|
-
└─ Run →
|
|
526
|
+
└─ Run → execute bundle with built-in runtime
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
**Key principle**: CLI handles both build-time and runtime operations.
|
|
530
|
+
|
|
531
|
+
## Production Deployment
|
|
532
|
+
|
|
533
|
+
Deploy your flows using Docker or Node.js.
|
|
534
|
+
|
|
535
|
+
### Using Docker
|
|
536
|
+
|
|
537
|
+
The `walkeros/flow` image runs pre-built bundles in production:
|
|
538
|
+
|
|
539
|
+
```bash
|
|
540
|
+
# Build your flow
|
|
541
|
+
walkeros bundle flow.json
|
|
542
|
+
|
|
543
|
+
# Run with Docker
|
|
544
|
+
docker run -v ./dist:/flow -p 8080:8080 walkeros/flow
|
|
472
545
|
```
|
|
473
546
|
|
|
474
|
-
**
|
|
547
|
+
**Custom image:**
|
|
475
548
|
|
|
476
|
-
|
|
549
|
+
```dockerfile
|
|
550
|
+
FROM walkeros/flow
|
|
551
|
+
COPY dist/bundle.mjs /app/flow/
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
**Environment variables:**
|
|
477
555
|
|
|
478
|
-
|
|
556
|
+
- `MODE` - `collect` or `serve` (default: `collect`)
|
|
557
|
+
- `PORT` - Server port (default: `8080`)
|
|
558
|
+
- `BUNDLE` - Bundle path (default: `/app/flow/bundle.mjs`)
|
|
479
559
|
|
|
480
|
-
|
|
481
|
-
- `walkeros/docker:0.1.4` - Production runtime
|
|
560
|
+
### Using Node.js
|
|
482
561
|
|
|
483
|
-
|
|
562
|
+
Run the bundle directly with the CLI:
|
|
484
563
|
|
|
485
564
|
```bash
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
565
|
+
# Build your flow
|
|
566
|
+
walkeros bundle flow.json
|
|
567
|
+
|
|
568
|
+
# Run in production
|
|
569
|
+
walkeros run collect dist/bundle.mjs --port 8080
|
|
489
570
|
```
|
|
490
571
|
|
|
572
|
+
This runs the flow in the current Node.js process, suitable for deployment on
|
|
573
|
+
platforms like AWS Lambda, Google Cloud Run, or any Node.js hosting.
|
|
574
|
+
|
|
491
575
|
## Requirements
|
|
492
576
|
|
|
493
577
|
- **Node.js**: 18+ or 22+
|
|
@@ -499,9 +583,11 @@ See [src/types.ts](./src/types.ts) for TypeScript interfaces.
|
|
|
499
583
|
|
|
500
584
|
## Related
|
|
501
585
|
|
|
502
|
-
- [Website Documentation](https://www.walkeros.io/docs/cli/)
|
|
586
|
+
- [Website Documentation](https://www.walkeros.io/docs/apps/cli/)
|
|
503
587
|
- [Flow Configuration](https://www.walkeros.io/docs/getting-started/flow/)
|
|
504
|
-
- [
|
|
588
|
+
- [Collector Package](../collector/) - For Integrated mode (direct imports)
|
|
589
|
+
- [Operating Modes](https://www.walkeros.io/docs/getting-started/modes/) -
|
|
590
|
+
Choosing between Integrated and Bundled
|
|
505
591
|
|
|
506
592
|
## License
|
|
507
593
|
|
package/dist/examples/flow.json
CHANGED
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,17 @@ 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;
|
|
190
|
+
dockerfile?: boolean;
|
|
192
191
|
}
|
|
193
192
|
declare function bundleCommand(options: BundleCommandOptions): Promise<void>;
|
|
194
193
|
/**
|
|
@@ -245,10 +244,14 @@ interface ApiCall {
|
|
|
245
244
|
timestamp: number;
|
|
246
245
|
}
|
|
247
246
|
|
|
248
|
-
interface SimulateCommandOptions
|
|
247
|
+
interface SimulateCommandOptions {
|
|
249
248
|
config: string;
|
|
250
249
|
event?: string;
|
|
251
250
|
json?: boolean;
|
|
251
|
+
verbose?: boolean;
|
|
252
|
+
dryRun?: boolean;
|
|
253
|
+
silent?: boolean;
|
|
254
|
+
platform?: 'web' | 'server';
|
|
252
255
|
}
|
|
253
256
|
interface SimulationResult {
|
|
254
257
|
success: boolean;
|
|
@@ -307,11 +310,14 @@ declare function simulate(configOrPath: string | unknown, event: unknown, option
|
|
|
307
310
|
/**
|
|
308
311
|
* Push command options
|
|
309
312
|
*/
|
|
310
|
-
interface PushCommandOptions
|
|
313
|
+
interface PushCommandOptions {
|
|
311
314
|
config: string;
|
|
312
315
|
event: string;
|
|
313
316
|
flow?: string;
|
|
314
317
|
json?: boolean;
|
|
318
|
+
verbose?: boolean;
|
|
319
|
+
silent?: boolean;
|
|
320
|
+
platform?: 'web' | 'server';
|
|
315
321
|
}
|
|
316
322
|
|
|
317
323
|
/**
|
|
@@ -322,9 +328,8 @@ declare function pushCommand(options: PushCommandOptions): Promise<void>;
|
|
|
322
328
|
/**
|
|
323
329
|
* Run Command Types
|
|
324
330
|
*
|
|
325
|
-
* Types for running walkerOS flows via CLI using
|
|
331
|
+
* Types for running walkerOS flows via CLI using local runtime
|
|
326
332
|
*/
|
|
327
|
-
|
|
328
333
|
/**
|
|
329
334
|
* Run mode - determines which execution mode to use
|
|
330
335
|
*/
|
|
@@ -332,7 +337,7 @@ type RunMode = 'collect' | 'serve';
|
|
|
332
337
|
/**
|
|
333
338
|
* CLI command options for `walkeros run`
|
|
334
339
|
*/
|
|
335
|
-
interface RunCommandOptions
|
|
340
|
+
interface RunCommandOptions {
|
|
336
341
|
/** Flow configuration file path (.json or pre-built .mjs) */
|
|
337
342
|
config: string;
|
|
338
343
|
/** Server port (overrides flow config) */
|
|
@@ -345,6 +350,12 @@ interface RunCommandOptions extends GlobalOptions {
|
|
|
345
350
|
serveName?: string;
|
|
346
351
|
/** Enable JSON output */
|
|
347
352
|
json?: boolean;
|
|
353
|
+
/** Verbose logging */
|
|
354
|
+
verbose?: boolean;
|
|
355
|
+
/** Dry-run mode */
|
|
356
|
+
dryRun?: boolean;
|
|
357
|
+
/** Suppress output */
|
|
358
|
+
silent?: boolean;
|
|
348
359
|
}
|
|
349
360
|
/**
|
|
350
361
|
* Programmatic run options (subset of CLI options)
|
|
@@ -382,8 +393,7 @@ interface RunResult {
|
|
|
382
393
|
/**
|
|
383
394
|
* Run Command
|
|
384
395
|
*
|
|
385
|
-
* Runs walkerOS flows using
|
|
386
|
-
* No Docker daemon required - runs directly in Node.js
|
|
396
|
+
* Runs walkerOS flows using local runtime
|
|
387
397
|
*/
|
|
388
398
|
|
|
389
399
|
/**
|