@walkeros/cli 1.0.0 → 1.0.1-next-1768820936934

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @walkeros/cli
2
2
 
3
+ ## 1.0.1-next-1768820936934
4
+
5
+ ### Patch Changes
6
+
7
+ - eb878df: Improved CLI option consistency and added `--dockerfile` flag
8
+ improvements
9
+
10
+ **Option consistency:**
11
+ - Added `--flow` option to simulate command for multi-flow configs
12
+ - Standardized `-v/--verbose` and `-s/--silent` shortcuts across all commands
13
+ - Removed non-functional `--dry-run` option from all commands
14
+ - Removed `-f` shortcut from bundle (use `--flow` for consistency)
15
+ - Unified option description casing (lowercase)
16
+
17
+ **Dockerfile improvements:**
18
+ - Generate correct `MODE=serve` for web flows and `MODE=collect` for server
19
+ flows
20
+ - Support copying custom Dockerfiles with `--dockerfile path/to/Dockerfile`
21
+ - Respects `--flow` parameter for multi-flow configurations
22
+
3
23
  ## 1.0.0
4
24
 
5
25
  ### Major Changes
package/README.md CHANGED
@@ -77,22 +77,31 @@ walkeros bundle https://example.com/config.json # Remote URL
77
77
 
78
78
  **Options:**
79
79
 
80
- - `-f, --flow <name>` - Build specific flow (multi-flow configs)
81
- - `--all` - Build all flows
82
- - `-s, --stats` - Show bundle statistics
83
- - `--json` - Output stats as JSON
80
+ - `--flow <name>` - Flow name for multi-flow configs
81
+ - `--all` - Build all flows for multi-flow configs
82
+ - `--stats` - Show bundle statistics
83
+ - `--json` - Output as JSON (implies --stats)
84
84
  - `--no-cache` - Disable package caching
85
+ - `--dockerfile [file]` - Generate Dockerfile (or copy custom file) to dist/
85
86
  - `-v, --verbose` - Verbose output
87
+ - `-s, --silent` - Suppress output
86
88
 
87
- **Example:**
89
+ **Examples:**
88
90
 
89
91
  ```bash
90
92
  # Bundle with stats
91
93
  walkeros bundle examples/server-collect.json --stats
94
+
95
+ # Bundle with auto-generated Dockerfile
96
+ walkeros bundle flow.json --dockerfile
97
+
98
+ # Bundle with custom Dockerfile
99
+ walkeros bundle flow.json --dockerfile Dockerfile.custom
92
100
  ```
93
101
 
94
102
  The output path uses convention-based defaults: `./dist/bundle.mjs` for server,
95
- `./dist/walker.js` for web.
103
+ `./dist/walker.js` for web. The `--dockerfile` flag generates a Dockerfile with
104
+ the correct `MODE` (collect/serve) based on flow type.
96
105
 
97
106
  ### simulate
98
107
 
@@ -112,10 +121,12 @@ The CLI auto-detects the input type by attempting to parse as JSON.
112
121
 
113
122
  **Options:**
114
123
 
115
- - `-e, --event <json>` - Event JSON string (required)
124
+ - `-e, --event <json>` - Event to simulate (JSON string, file path, or URL)
125
+ - `--flow <name>` - Flow name for multi-flow configs
116
126
  - `-p, --platform <platform>` - Platform override (`web` or `server`)
117
- - `--json` - Output results as JSON
127
+ - `--json` - Output as JSON
118
128
  - `-v, --verbose` - Verbose output
129
+ - `-s, --silent` - Suppress output
119
130
 
120
131
  **Examples:**
121
132
 
@@ -125,6 +136,9 @@ walkeros simulate examples/web-serve.json \
125
136
  --event '{"name":"page view","data":{"title":"Home"}}' \
126
137
  --json
127
138
 
139
+ # Simulate specific flow from multi-flow config
140
+ walkeros simulate flow.json --flow server --event '{"name":"test"}'
141
+
128
142
  # Simulate with pre-built bundle
129
143
  walkeros simulate dist/bundle.mjs --event '{"name":"page view"}'
130
144
 
@@ -219,9 +233,9 @@ walkeros run <mode> <config-file> [options]
219
233
 
220
234
  - `-p, --port <number>` - Server port
221
235
  - `-h, --host <host>` - Server host
222
- - `--static-dir <dir>` - Static directory (serve mode)
223
- - `--json` - JSON output
236
+ - `--json` - Output as JSON
224
237
  - `-v, --verbose` - Verbose output
238
+ - `-s, --silent` - Suppress output
225
239
 
226
240
  **Examples:**
227
241
 
@@ -537,18 +551,24 @@ Deploy your flows using Docker or Node.js.
537
551
  The `walkeros/flow` image runs pre-built bundles in production:
538
552
 
539
553
  ```bash
540
- # Build your flow
541
- walkeros bundle flow.json
554
+ # Build your flow with Dockerfile
555
+ walkeros bundle flow.json --dockerfile
556
+
557
+ # Deploy (e.g., to Cloud Run)
558
+ gcloud run deploy my-service --source ./dist
559
+ ```
542
560
 
543
- # Run with Docker
561
+ Or run locally:
562
+
563
+ ```bash
544
564
  docker run -v ./dist:/flow -p 8080:8080 walkeros/flow
545
565
  ```
546
566
 
547
- **Custom image:**
567
+ **Custom Dockerfile:**
548
568
 
549
- ```dockerfile
550
- FROM walkeros/flow
551
- COPY dist/bundle.mjs /app/flow/
569
+ ```bash
570
+ # Use a custom Dockerfile with extra packages or configuration
571
+ walkeros bundle flow.json --dockerfile Dockerfile.custom
552
572
  ```
553
573
 
554
574
  **Environment variables:**
@@ -39,6 +39,39 @@ cp examples/web-serve.js ../docker/demos/demo-serve.mjs
39
39
  **Important**: Always use `--local` flag when rebuilding examples in the
40
40
  devcontainer.
41
41
 
42
+ ## Comprehensive Example
43
+
44
+ ### flow-complete.json
45
+
46
+ **Purpose**: Complete reference demonstrating ALL JSON-compatible walkerOS
47
+ features
48
+
49
+ **Features**: 51 features including variables, definitions, mapping (key, map,
50
+ loop, set), transformers (validator, fingerprint), consent gating, wildcards,
51
+ ingest metadata, and more.
52
+
53
+ **Architecture**: Two named flows (`web` and `server`) showing full event
54
+ pipeline from browser to server-side forwarding.
55
+
56
+ **Documentation**: See [flow-complete.md](./flow-complete.md) for the complete
57
+ Feature Inventory and usage examples.
58
+
59
+ **Try it**:
60
+
61
+ ```bash
62
+ # Web flow (opens browser with demo events)
63
+ walkeros serve examples/flow-complete.json --flow web
64
+
65
+ # Server flow (HTTP collection endpoint)
66
+ walkeros run examples/flow-complete.json --flow server
67
+
68
+ # Both (full pipeline)
69
+ # Terminal 1: walkeros run examples/flow-complete.json --flow server
70
+ # Terminal 2: walkeros serve examples/flow-complete.json --flow web
71
+ ```
72
+
73
+ ---
74
+
42
75
  ## Web Examples
43
76
 
44
77
  ### web-serve.json