@walkeros/cli 2.0.1 → 2.1.1
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 +66 -0
- package/README.md +57 -46
- package/dist/cli.js +17006 -1330
- package/dist/dev.d.ts +20 -28
- package/dist/dev.js +19 -13
- package/dist/dev.js.map +1 -1
- package/dist/examples/README.md +8 -8
- package/dist/examples/flow-complete.json +164 -1
- package/dist/examples/flow-complete.md +2 -2
- package/dist/examples/flow-selfhost-test.json +24 -0
- package/dist/index.d.ts +182 -67
- package/dist/index.js +2321 -1020
- package/dist/index.js.map +1 -1
- package/dist/runtime/main.js +16129 -912
- package/examples/README.md +8 -8
- package/examples/flow-complete.json +164 -1
- package/examples/flow-complete.md +2 -2
- package/examples/flow-selfhost-test.json +24 -0
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# @walkeros/cli
|
|
2
2
|
|
|
3
|
+
## 2.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [fab477d]
|
|
8
|
+
- @walkeros/core@2.1.1
|
|
9
|
+
- @walkeros/server-core@2.1.1
|
|
10
|
+
|
|
11
|
+
## 2.1.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- cb2da05: Add data contracts for centralized event validation and documentation
|
|
16
|
+
- fed78f0: Replace deployment polling with SSE streaming for real-time status
|
|
17
|
+
updates
|
|
18
|
+
- 3eb6416: Add unified `env.respond` capability. Any step (transformer,
|
|
19
|
+
destination) can now customize HTTP responses via
|
|
20
|
+
`env.respond({ body, status?, headers? })`. Sources configure the response
|
|
21
|
+
handler — Express source uses createRespond for idempotent first-call-wins
|
|
22
|
+
semantics. CLI serve mode removed (superseded by response-capable flows).
|
|
23
|
+
- 39780b0: Add event usage counters to heartbeat reporting
|
|
24
|
+
- dd53425: Simplify `walkeros run collect` to `walkeros run` — the mode concept
|
|
25
|
+
has been removed
|
|
26
|
+
- 66aaf2d: Runner-owned health server: The runner now provides /health and
|
|
27
|
+
/ready endpoints independently of flow sources. Express source's `status`
|
|
28
|
+
setting and fetch source's `healthPath` setting have been removed — health
|
|
29
|
+
endpoints are no longer source responsibilities.
|
|
30
|
+
- 97df0b2: Simplify validate command: file-first argument, --type defaults to
|
|
31
|
+
flow, deep validation merged into flow, entry validation moved to --path
|
|
32
|
+
- 026c412: Unified simulation API: single simulate() function replaces
|
|
33
|
+
simulateSource/simulateDestination/simulateTransformer/simulateFlow. Built-in
|
|
34
|
+
call tracking for destinations via wrapEnv. No bundling required for
|
|
35
|
+
simulation.
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- fed78f0: Show logo only on bare `walkeros` call, not before every command
|
|
40
|
+
- 7b7e37b: Consolidate flow validation to use core's validateFlowSetup, adding
|
|
41
|
+
$var/$def reference checking and IntelliSense context extraction
|
|
42
|
+
- 5145662: Use os.tmpdir() as default temp directory to fix permission errors in
|
|
43
|
+
containers
|
|
44
|
+
- 02a7958: Add WARN log level (ERROR=0, WARN=1, INFO=2, DEBUG=3). Logger
|
|
45
|
+
instances expose `warn()` method routed to `console.warn` and `json()` method
|
|
46
|
+
for structured output. Config accepts optional `jsonHandler`. MockLogger
|
|
47
|
+
includes both as jest mocks. CLI logger unified with core logger via
|
|
48
|
+
`createCLILogger()` factory.
|
|
49
|
+
- 3bc32de: Surface mapping field in examples_list and ExampleLookupResult
|
|
50
|
+
- 5145662: Add --output URL support, -f shorthand for --flow, and lazy-load
|
|
51
|
+
esbuild in runtime
|
|
52
|
+
- 7fc4cee: Fix server bundle port forwarding from runtime context to source
|
|
53
|
+
configs
|
|
54
|
+
- 1876bb9: Remove unused bundle simulation path, CallTracker, and executor files
|
|
55
|
+
from simulate command. Simulate now only accepts Flow.Setup config JSON files.
|
|
56
|
+
- Updated dependencies [7fc4cee]
|
|
57
|
+
- Updated dependencies [7fc4cee]
|
|
58
|
+
- Updated dependencies [cb2da05]
|
|
59
|
+
- Updated dependencies [2bbe8c8]
|
|
60
|
+
- Updated dependencies [3eb6416]
|
|
61
|
+
- Updated dependencies [02a7958]
|
|
62
|
+
- Updated dependencies [97df0b2]
|
|
63
|
+
- Updated dependencies [97df0b2]
|
|
64
|
+
- Updated dependencies [026c412]
|
|
65
|
+
- Updated dependencies [7d38d9d]
|
|
66
|
+
- @walkeros/core@2.1.0
|
|
67
|
+
- @walkeros/server-core@2.1.0
|
|
68
|
+
|
|
3
69
|
## 2.0.1
|
|
4
70
|
|
|
5
71
|
## 2.0.0
|
package/README.md
CHANGED
|
@@ -48,14 +48,11 @@ walkeros bundle flow.json
|
|
|
48
48
|
# Test with simulated events (no real API calls)
|
|
49
49
|
walkeros simulate flow.json --event '{"name":"product view"}'
|
|
50
50
|
|
|
51
|
-
# Or test a pre-built bundle directly
|
|
52
|
-
walkeros simulate dist/bundle.mjs --event '{"name":"product view"}'
|
|
53
|
-
|
|
54
51
|
# Push real events to destinations
|
|
55
52
|
walkeros push flow.json --event '{"name":"product view"}'
|
|
56
53
|
|
|
57
54
|
# Run a collection server locally
|
|
58
|
-
walkeros run
|
|
55
|
+
walkeros run dist/bundle.mjs --port 3000
|
|
59
56
|
```
|
|
60
57
|
|
|
61
58
|
## Commands
|
|
@@ -100,25 +97,17 @@ walkeros bundle flow.json --dockerfile Dockerfile.custom
|
|
|
100
97
|
```
|
|
101
98
|
|
|
102
99
|
The output path uses convention-based defaults: `./dist/bundle.mjs` for server,
|
|
103
|
-
`./dist/walker.js` for web.
|
|
104
|
-
the correct `MODE` (collect/serve) based on flow type.
|
|
100
|
+
`./dist/walker.js` for web.
|
|
105
101
|
|
|
106
102
|
### simulate
|
|
107
103
|
|
|
108
|
-
Test event processing with simulated events.
|
|
109
|
-
|
|
104
|
+
Test event processing with simulated events. The config JSON gets bundled and
|
|
105
|
+
executed with destination mocking.
|
|
110
106
|
|
|
111
107
|
```bash
|
|
112
|
-
walkeros simulate <
|
|
108
|
+
walkeros simulate <config> --event '{"name":"page view"}' [options]
|
|
113
109
|
```
|
|
114
110
|
|
|
115
|
-
**Input types:**
|
|
116
|
-
|
|
117
|
-
- **Config JSON** - Bundled and executed with destination mocking
|
|
118
|
-
- **Pre-built bundle** (`.js`/`.mjs`) - Executed directly, no mocking
|
|
119
|
-
|
|
120
|
-
The CLI auto-detects the input type by attempting to parse as JSON.
|
|
121
|
-
|
|
122
111
|
**Options:**
|
|
123
112
|
|
|
124
113
|
- `-e, --event <json>` - Event to simulate (JSON string, file path, or URL)
|
|
@@ -138,23 +127,8 @@ walkeros simulate examples/web-serve.json \
|
|
|
138
127
|
|
|
139
128
|
# Simulate specific flow from multi-flow config
|
|
140
129
|
walkeros simulate flow.json --flow server --event '{"name":"test"}'
|
|
141
|
-
|
|
142
|
-
# Simulate with pre-built bundle
|
|
143
|
-
walkeros simulate dist/bundle.mjs --event '{"name":"page view"}'
|
|
144
|
-
|
|
145
|
-
# Override platform detection
|
|
146
|
-
walkeros simulate dist/bundle.js --platform server --event '{"name":"page view"}'
|
|
147
130
|
```
|
|
148
131
|
|
|
149
|
-
**Platform detection:**
|
|
150
|
-
|
|
151
|
-
When using pre-built bundles, platform is detected from file extension:
|
|
152
|
-
|
|
153
|
-
- `.mjs` → server (ESM, Node.js)
|
|
154
|
-
- `.js` → web (IIFE, JSDOM)
|
|
155
|
-
|
|
156
|
-
Use `--platform` to override if extension doesn't match intended runtime.
|
|
157
|
-
|
|
158
132
|
### push
|
|
159
133
|
|
|
160
134
|
Execute your flow with real API calls to configured destinations. Unlike
|
|
@@ -221,14 +195,9 @@ real integrations.
|
|
|
221
195
|
Run flows locally (no Docker daemon required).
|
|
222
196
|
|
|
223
197
|
```bash
|
|
224
|
-
walkeros run <
|
|
198
|
+
walkeros run <config-file> [options]
|
|
225
199
|
```
|
|
226
200
|
|
|
227
|
-
**Modes:**
|
|
228
|
-
|
|
229
|
-
- `collect` - HTTP event collection server
|
|
230
|
-
- `serve` - Static file server
|
|
231
|
-
|
|
232
201
|
**Options:**
|
|
233
202
|
|
|
234
203
|
- `-p, --port <number>` - Server port
|
|
@@ -241,13 +210,10 @@ walkeros run <mode> <config-file> [options]
|
|
|
241
210
|
|
|
242
211
|
```bash
|
|
243
212
|
# Run collection server (auto-bundles JSON)
|
|
244
|
-
walkeros run
|
|
213
|
+
walkeros run examples/server-collect.json --port 3000
|
|
245
214
|
|
|
246
215
|
# Run with pre-built bundle
|
|
247
|
-
walkeros run
|
|
248
|
-
|
|
249
|
-
# Serve static files
|
|
250
|
-
walkeros run serve flow.json --port 8080 --static-dir ./dist
|
|
216
|
+
walkeros run examples/server-collect.mjs --port 3000
|
|
251
217
|
```
|
|
252
218
|
|
|
253
219
|
**How it works:**
|
|
@@ -257,6 +223,51 @@ walkeros run serve flow.json --port 8080 --static-dir ./dist
|
|
|
257
223
|
3. Runs in current Node.js process
|
|
258
224
|
4. Press Ctrl+C for graceful shutdown
|
|
259
225
|
|
|
226
|
+
### validate
|
|
227
|
+
|
|
228
|
+
Validate flow configurations, events, mappings, or contracts.
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
walkeros validate <config-file> [options]
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
By default, validates a Flow.Setup file — checking schema, references, and
|
|
235
|
+
cross-step example compatibility.
|
|
236
|
+
|
|
237
|
+
**Options:**
|
|
238
|
+
|
|
239
|
+
- `--type <type>` - Validation type (default: `flow`). Also accepts: `event`,
|
|
240
|
+
`mapping`, `contract`
|
|
241
|
+
- `--path <path>` - Validate a specific entry against its package schema (e.g.,
|
|
242
|
+
`destinations.snowplow`, `sources.browser`)
|
|
243
|
+
- `--flow <name>` - Flow name for multi-flow configs
|
|
244
|
+
- `--strict` - Treat warnings as errors
|
|
245
|
+
- `--json` - Output as JSON
|
|
246
|
+
- `-v, --verbose` - Verbose output
|
|
247
|
+
- `-s, --silent` - Suppress output
|
|
248
|
+
|
|
249
|
+
**Exit codes:** `0` = valid, `1` = errors, `2` = warnings (with --strict), `3` =
|
|
250
|
+
input error
|
|
251
|
+
|
|
252
|
+
**Examples:**
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
# Validate flow config (schema + examples)
|
|
256
|
+
walkeros validate flow.json
|
|
257
|
+
|
|
258
|
+
# Validate specific flow
|
|
259
|
+
walkeros validate flow.json --flow analytics
|
|
260
|
+
|
|
261
|
+
# Validate a single event
|
|
262
|
+
walkeros validate event.json --type event
|
|
263
|
+
|
|
264
|
+
# Validate in CI
|
|
265
|
+
walkeros validate flow.json --json --strict || exit 1
|
|
266
|
+
|
|
267
|
+
# Validate entry against package schema
|
|
268
|
+
walkeros validate flow.json --path destinations.snowplow
|
|
269
|
+
```
|
|
270
|
+
|
|
260
271
|
### deploy
|
|
261
272
|
|
|
262
273
|
Deploy flows to walkerOS cloud.
|
|
@@ -508,7 +519,7 @@ const result = await simulate(
|
|
|
508
519
|
);
|
|
509
520
|
|
|
510
521
|
// Run
|
|
511
|
-
await runCommand(
|
|
522
|
+
await runCommand({
|
|
512
523
|
config: './flow.json',
|
|
513
524
|
port: 3000,
|
|
514
525
|
verbose: true,
|
|
@@ -536,7 +547,7 @@ walkeros simulate \
|
|
|
536
547
|
--event '{"name":"product view","data":{"id":"P123"}}'
|
|
537
548
|
|
|
538
549
|
# Run server
|
|
539
|
-
walkeros run
|
|
550
|
+
walkeros run examples/server-collect.json --port 3000
|
|
540
551
|
```
|
|
541
552
|
|
|
542
553
|
## Development Workflow
|
|
@@ -557,7 +568,7 @@ walkeros simulate \
|
|
|
557
568
|
walkeros bundle my-flow.json --stats
|
|
558
569
|
|
|
559
570
|
# 4. Run locally
|
|
560
|
-
walkeros run
|
|
571
|
+
walkeros run dist/bundle.mjs --port 3000
|
|
561
572
|
|
|
562
573
|
# 5. In another terminal, test it
|
|
563
574
|
curl -X POST http://localhost:3000/collect \
|
|
@@ -616,7 +627,7 @@ Run the bundle directly with the CLI:
|
|
|
616
627
|
walkeros bundle flow.json
|
|
617
628
|
|
|
618
629
|
# Run in production
|
|
619
|
-
walkeros run
|
|
630
|
+
walkeros run dist/bundle.mjs --port 8080
|
|
620
631
|
```
|
|
621
632
|
|
|
622
633
|
This runs the flow in the current Node.js process, suitable for deployment on
|