@walkeros/cli 2.0.1 → 2.1.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.
@@ -60,14 +60,14 @@ Feature Inventory and usage examples.
60
60
 
61
61
  ```bash
62
62
  # Web flow (opens browser with demo events)
63
- walkeros serve examples/flow-complete.json --flow web
63
+ walkeros run examples/flow-complete.json --flow web
64
64
 
65
65
  # Server flow (HTTP collection endpoint)
66
66
  walkeros run examples/flow-complete.json --flow server
67
67
 
68
68
  # Both (full pipeline)
69
69
  # Terminal 1: walkeros run examples/flow-complete.json --flow server
70
- # Terminal 2: walkeros serve examples/flow-complete.json --flow web
70
+ # Terminal 2: walkeros run examples/flow-complete.json --flow web
71
71
  ```
72
72
 
73
73
  ---
@@ -92,7 +92,7 @@ event flow testing
92
92
 
93
93
  ```bash
94
94
  walkeros bundle examples/web-serve.json
95
- walkeros run serve examples/web-serve.js -p 3000
95
+ walkeros run examples/web-serve.js -p 3000
96
96
  # Open http://localhost:3000 in browser
97
97
  ```
98
98
 
@@ -159,7 +159,7 @@ web-serve.json
159
159
 
160
160
  ```bash
161
161
  walkeros bundle examples/server-collect.json
162
- walkeros run collect examples/server-collect.mjs -p 8080
162
+ walkeros run examples/server-collect.mjs -p 8080
163
163
 
164
164
  # In another terminal, send test event:
165
165
  curl -X POST http://localhost:8080/collect \
@@ -199,7 +199,7 @@ export GTM_CONTAINER_ID="GTM-XXXXX"
199
199
  export GTM_SERVER_URL="https://your-gtm-server.com"
200
200
 
201
201
  # Run in Docker
202
- walkeros run collect examples/server-collection.json -p 8080
202
+ walkeros run examples/server-collection.json -p 8080
203
203
 
204
204
  # Send test event (in another terminal)
205
205
  curl -X POST http://localhost:8080/collect \
@@ -228,14 +228,14 @@ The simplest way to see the complete event flow:
228
228
 
229
229
  ```bash
230
230
  walkeros bundle examples/server-collect.json
231
- walkeros run collect examples/server-collect.mjs -p 8080
231
+ walkeros run examples/server-collect.mjs -p 8080
232
232
  ```
233
233
 
234
234
  **Terminal 2 - Start web server**:
235
235
 
236
236
  ```bash
237
237
  walkeros bundle examples/web-serve.json
238
- walkeros run serve examples/web-serve.js -p 3000
238
+ walkeros run examples/web-serve.js -p 3000
239
239
  ```
240
240
 
241
241
  **Browser**: Open http://localhost:3000
@@ -253,7 +253,7 @@ For production with real analytics platforms:
253
253
  **1. Start collection server**:
254
254
 
255
255
  ```bash
256
- walkeros run collect examples/server-collection.json -p 8080
256
+ walkeros run examples/server-collection.json -p 8080
257
257
  ```
258
258
 
259
259
  **2. Bundle web tracking** (configured to send to localhost:8080):
@@ -318,6 +318,89 @@
318
318
  }
319
319
  }
320
320
  }
321
+ },
322
+ "examples": {
323
+ "page-view": {
324
+ "in": {
325
+ "name": "page view",
326
+ "data": { "title": "Home", "path": "/" },
327
+ "entity": "page",
328
+ "action": "view"
329
+ },
330
+ "mapping": {
331
+ "name": "page_view",
332
+ "data": {
333
+ "map": {
334
+ "page_title": "data.title",
335
+ "page_location": "data.path"
336
+ }
337
+ }
338
+ },
339
+ "out": [
340
+ "event",
341
+ "page_view",
342
+ { "page_title": "Home", "page_location": "/" }
343
+ ]
344
+ },
345
+ "product-add": {
346
+ "in": {
347
+ "name": "product add",
348
+ "data": {
349
+ "id": "SKU-001",
350
+ "name": "Blue Shirt",
351
+ "price": 49.99,
352
+ "currency": "EUR",
353
+ "quantity": 2
354
+ },
355
+ "entity": "product",
356
+ "action": "add"
357
+ },
358
+ "mapping": {
359
+ "name": "add_to_cart",
360
+ "data": {
361
+ "map": {
362
+ "currency": { "key": "data.currency", "value": "EUR" },
363
+ "value": "data.price",
364
+ "items": {
365
+ "loop": [
366
+ "this",
367
+ {
368
+ "map": {
369
+ "item_id": "data.id",
370
+ "item_name": "data.name",
371
+ "quantity": { "key": "data.quantity", "value": 1 }
372
+ }
373
+ }
374
+ ]
375
+ }
376
+ }
377
+ }
378
+ },
379
+ "out": [
380
+ "event",
381
+ "add_to_cart",
382
+ {
383
+ "currency": "EUR",
384
+ "value": 49.99,
385
+ "items": [
386
+ {
387
+ "item_id": "SKU-001",
388
+ "item_name": "Blue Shirt",
389
+ "quantity": 2
390
+ }
391
+ ]
392
+ }
393
+ ]
394
+ },
395
+ "test-ignored": {
396
+ "in": {
397
+ "name": "test debug",
398
+ "data": { "message": "This should be ignored" },
399
+ "entity": "test",
400
+ "action": "debug"
401
+ },
402
+ "out": false
403
+ }
321
404
  }
322
405
  },
323
406
  "api": {
@@ -417,6 +500,25 @@
417
500
  "context.language": "headers.accept-language",
418
501
  "context.referer": "headers.referer"
419
502
  }
503
+ },
504
+ "examples": {
505
+ "post-event": {
506
+ "in": {
507
+ "method": "POST",
508
+ "path": "/collect",
509
+ "headers": { "content-type": "application/json" },
510
+ "body": {
511
+ "name": "page view",
512
+ "data": { "title": "Home", "url": "https://example.com" }
513
+ }
514
+ },
515
+ "out": {
516
+ "name": "page view",
517
+ "data": { "title": "Home", "url": "https://example.com" },
518
+ "entity": "page",
519
+ "action": "view"
520
+ }
521
+ }
420
522
  }
421
523
  }
422
524
  },
@@ -427,7 +529,32 @@
427
529
  "push": "$code:(event) => event.name.startsWith('internal_') || event.name.startsWith('debug_') ? false : event"
428
530
  },
429
531
  "next": "fingerprint",
430
- "config": {}
532
+ "config": {},
533
+ "examples": {
534
+ "passes-normal": {
535
+ "in": {
536
+ "name": "page view",
537
+ "data": { "title": "Home" },
538
+ "entity": "page",
539
+ "action": "view"
540
+ },
541
+ "out": {
542
+ "name": "page view",
543
+ "data": { "title": "Home" },
544
+ "entity": "page",
545
+ "action": "view"
546
+ }
547
+ },
548
+ "filters-internal": {
549
+ "in": {
550
+ "name": "internal_heartbeat",
551
+ "data": {},
552
+ "entity": "internal",
553
+ "action": "heartbeat"
554
+ },
555
+ "out": false
556
+ }
557
+ }
431
558
  },
432
559
  "fingerprint": {
433
560
  "package": "@walkeros/server-transformer-fingerprint",
@@ -610,6 +737,42 @@
610
737
  }
611
738
  }
612
739
  }
740
+ },
741
+ "examples": {
742
+ "purchase": {
743
+ "in": {
744
+ "name": "order complete",
745
+ "data": {
746
+ "id": "ORD-123",
747
+ "total": 149.97,
748
+ "currency": "EUR"
749
+ },
750
+ "entity": "order",
751
+ "action": "complete"
752
+ },
753
+ "mapping": {
754
+ "name": "Purchase",
755
+ "data": {
756
+ "map": {
757
+ "value": "data.total",
758
+ "currency": { "key": "data.currency", "value": "EUR" },
759
+ "order_id": "data.id"
760
+ }
761
+ }
762
+ },
763
+ "out": {
764
+ "data": [
765
+ {
766
+ "event_name": "Purchase",
767
+ "custom_data": {
768
+ "value": 149.97,
769
+ "currency": "EUR",
770
+ "order_id": "ORD-123"
771
+ }
772
+ }
773
+ ]
774
+ }
775
+ }
613
776
  }
614
777
  },
615
778
  "demo": {
@@ -33,7 +33,7 @@ complete event tracking architecture.
33
33
 
34
34
  ```bash
35
35
  cd walkerOS
36
- npx walkeros serve packages/cli/examples/flow-complete.json --flow web
36
+ npx walkeros run packages/cli/examples/flow-complete.json --flow web
37
37
  # Open http://localhost:3000 - demo events fire automatically
38
38
  ```
39
39
 
@@ -64,7 +64,7 @@ curl -X POST http://localhost:8080/collect \
64
64
  npx walkeros run packages/cli/examples/flow-complete.json --flow server
65
65
 
66
66
  # Terminal 2: Start web (sends to server via API destination)
67
- npx walkeros serve packages/cli/examples/flow-complete.json --flow web
67
+ npx walkeros run packages/cli/examples/flow-complete.json --flow web
68
68
  ```
69
69
 
70
70
  ---
@@ -0,0 +1,24 @@
1
+ {
2
+ "version": 1,
3
+ "flows": {
4
+ "default": {
5
+ "server": {},
6
+ "packages": {
7
+ "@walkeros/collector": {}
8
+ },
9
+ "sources": {
10
+ "http": {
11
+ "package": "@walkeros/server-source-express",
12
+ "primary": true,
13
+ "config": {
14
+ "settings": {
15
+ "port": 8080,
16
+ "cors": true
17
+ }
18
+ }
19
+ }
20
+ },
21
+ "destinations": {}
22
+ }
23
+ }
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@walkeros/cli",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "walkerOS CLI - Bundle and deploy walkerOS components",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -29,8 +29,9 @@
29
29
  "build": "tsup",
30
30
  "dev": "tsx src/index.ts",
31
31
  "start": "node dist/index.js",
32
- "test": "jest --colors",
33
- "test:integration": "jest --colors --testPathPatterns='(cli\\.test|cli-e2e\\.test)'",
32
+ "test": "jest --colors --testPathIgnorePatterns '__tests__/e2e/'",
33
+ "test:debug": "jest --colors --detectOpenHandles --testPathIgnorePatterns '__tests__/e2e/'",
34
+ "test:integration": "jest --colors --testPathPatterns='__tests__/e2e/'",
34
35
  "generate:types": "openapi-typescript ${OPENAPI_SPEC:-./openapi/spec.json} -o src/types/api.gen.d.ts",
35
36
  "generate:types:local": "OPENAPI_SPEC=${WALKEROS_APP_URL:-http://localhost:3000}/api/openapi.json npm run generate:types",
36
37
  "typecheck": "tsc --noEmit",
@@ -42,7 +43,7 @@
42
43
  "docker:publish": "bash scripts/publish-docker.sh"
43
44
  },
44
45
  "dependencies": {
45
- "@walkeros/server-core": "^2.0.0",
46
+ "@walkeros/server-core": "^2.1.0",
46
47
  "ajv": "^8.17.1",
47
48
  "chalk": "^5.6.2",
48
49
  "commander": "^14.0.2",
@@ -54,7 +55,7 @@
54
55
  "open": "^11.0.0",
55
56
  "openapi-fetch": "^0.17.0",
56
57
  "pacote": "^21.0.4",
57
- "@walkeros/core": "^2.0.0"
58
+ "@walkeros/core": "^2.1.0"
58
59
  },
59
60
  "devDependencies": {
60
61
  "@types/cors": "^2.8.17",