@walkeros/cli 3.3.1 → 3.4.0-next-1776749829492

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.
@@ -514,7 +514,8 @@
514
514
  "config": {
515
515
  "settings": {
516
516
  "url": "$var.apiUrl",
517
- "batch": 5
517
+ "batch": 5,
518
+ "transform": "$code:(data) => JSON.stringify(data)"
518
519
  },
519
520
  "data": {
520
521
  "map": {
@@ -557,9 +558,7 @@
557
558
  "push": "$code:(event, ctx) => { ctx.logger.info('[DEBUG]', event.name, event.data); }"
558
559
  },
559
560
  "config": {
560
- "consent": {
561
- "functional": true
562
- }
561
+ "consent": {}
563
562
  }
564
563
  }
565
564
  },
@@ -613,6 +612,7 @@
613
612
  "http": {
614
613
  "package": "@walkeros/server-source-express",
615
614
  "primary": true,
615
+ "next": ["filter"],
616
616
  "cache": {
617
617
  "store": "cache",
618
618
  "rules": [
@@ -643,7 +643,11 @@
643
643
  "context.ip": "ip",
644
644
  "context.userAgent": "headers.user-agent",
645
645
  "context.language": "headers.accept-language",
646
- "context.referer": "headers.referer"
646
+ "context.referer": "headers.referer",
647
+ "context.anonymizedIp": {
648
+ "key": "ip",
649
+ "fn": "$code:(ip) => ip ? ip.replace(/\\.\\d+$/, '.0') : ''"
650
+ }
647
651
  }
648
652
  },
649
653
  "examples": {
@@ -682,6 +686,9 @@
682
686
  "push": "$code:(event) => event.name.startsWith('internal_') || event.name.startsWith('debug_') ? false : event"
683
687
  },
684
688
  "next": "fingerprint",
689
+ "env": {
690
+ "store": "$store:cache"
691
+ },
685
692
  "config": {},
686
693
  "examples": {
687
694
  "passes-normal": {
@@ -746,7 +753,7 @@
746
753
  "destinations": {
747
754
  "meta": {
748
755
  "package": "@walkeros/server-destination-meta",
749
- "before": "fingerprint",
756
+ "before": ["fingerprint", "serverValidator"],
750
757
  "config": {
751
758
  "settings": {
752
759
  "pixelId": "$var.metaPixelId",
@@ -918,7 +925,8 @@
918
925
  "globals": {
919
926
  "environment": "demo",
920
927
  "version": "$var.flowVersion",
921
- "platform": "server"
928
+ "platform": "server",
929
+ "startedAt": "$code:Date.now()"
922
930
  }
923
931
  },
924
932
  "bundle": {
@@ -11,19 +11,24 @@ complete event tracking architecture.
11
11
  │ WEB FLOW │
12
12
  │ │
13
13
  │ Browser Source ─┐ │
14
- │ DataLayer Source ──▶ [Validator] ──▶ Collector ──▶ GA4 Destination
15
- │ Demo Source ────┘ └──▶ API Destination
16
-
17
- └──────────────────────────────────────────────────────────────│──────────────┘
18
-
14
+ │ DataLayer Source ──▶ [Enricher] ──▶ [Validator] ──▶ Collector ──▶ GA4
15
+ │ Demo Source ────┘ ├──▶ API
16
+ └──▶ Debug
17
+ └─────────────────────────────────────────────────────────────────────────────┘
18
+
19
19
  ┌─────────────────────────────────────────────────────────────────────────────┐
20
20
  │ SERVER FLOW │
21
21
  │ │
22
- │ HTTP Request ──▶ Express Source ──▶ Collector ──▶ [Fingerprint] ──────┐
23
- [Validator]
24
-
25
- └── ingest: IP, user-agent ────────▶ Meta Destination
26
- language, referer Demo Destination
22
+ │ HTTP Source ──▶ [Filter] ──▶ [Fingerprint] ──▶ [Validator] ──▶ Collector
23
+ │ │
24
+ ingest: │ env: before:
25
+ IP, UA, │ $store:cache [Fingerprint]+[Validator] │
26
+ │ lang, ref, │ │
27
+ │ │ anon-IP(fn) │ ▼ │
28
+ │ │ │ Meta Destination │
29
+ │ └──────────────┘ Demo Destination │
30
+ │ │
31
+ │ Store: cache (memory, 10MB, 1000 entries) │
27
32
  └─────────────────────────────────────────────────────────────────────────────┘
28
33
  ```
29
34
 
@@ -71,7 +76,7 @@ npx walkeros run packages/cli/examples/flow-complete.json --flow web
71
76
 
72
77
  ## Feature Inventory
73
78
 
74
- ### Features Used (55)
79
+ ### Features Used (68)
75
80
 
76
81
  #### Mapping - Value Extraction
77
82
 
@@ -106,67 +111,81 @@ npx walkeros run packages/cli/examples/flow-complete.json --flow web
106
111
 
107
112
  #### Definitions & Variables
108
113
 
109
- | Feature | Location | Example |
110
- | -------------------- | ------------------ | -------------------------------------------- |
111
- | Root-level variables | Root | `"currency": "EUR"` |
112
- | Flow-level variables | server.variables | `"metaPixelId": "${META_PIXEL_ID:...}"` |
113
- | Environment variable | Variables | `"${GA4_MEASUREMENT_ID:G-DEMO123456}"` |
114
- | Env with default | Variables | `"${API_URL:http://localhost:8080/collect}"` |
115
- | $variables reference | GA4 settings | `"$variables.ga4MeasurementId"` |
116
- | Definition (complex) | Root definitions | `"ga4ItemsLoop": { "loop": [...] }` |
117
- | $ref reference | GA4 purchase items | `{ "$ref": "#/definitions/ga4ItemsLoop" }` |
114
+ | Feature | Location | Example |
115
+ | -------------------- | ------------------ | ---------------------------------------------- |
116
+ | Root-level variables | Root | `"currency": "EUR"` |
117
+ | Flow-level variables | server.variables | `"metaPixelId": "$env.META_PIXEL_ID:..."` |
118
+ | Environment variable | Variables | `"$env.GA4_MEASUREMENT_ID:G-DEMO123456"` |
119
+ | Env with default | Variables | `"$env.API_URL:http://localhost:8080/collect"` |
120
+ | $var reference | GA4 settings | `"$var.ga4MeasurementId"` |
121
+ | Definition (complex) | Root definitions | `"ga4ItemsLoop": { "loop": [...] }` |
122
+ | $def reference | GA4 purchase items | `"$def.ga4ItemsLoop"` |
123
+ | $contract reference | serverValidator | `"$contract.default.events"` |
124
+ | $store reference | filter transformer | `"env": { "store": "$store:cache" }` |
118
125
 
119
126
  #### Sources
120
127
 
121
- | Feature | Location | Example |
122
- | ----------------------- | --------- | ------------------------------------- |
123
- | Primary source | browser | `"primary": true` |
124
- | Multiple sources | web flow | browser + dataLayer + demo |
125
- | Source-level mapping | dataLayer | `"mapping": { "add_to_cart": {...} }` |
126
- | Pre-collector chain | dataLayer | `"next": "dataLayerValidator"` |
127
- | Require (deferred init) | dataLayer | `"require": ["session"]` |
128
- | Demo source events | demo | Pre-configured test events |
128
+ | Feature | Location | Example |
129
+ | ----------------------- | ------------- | ------------------------------------- |
130
+ | Primary source | browser | `"primary": true` |
131
+ | Multiple sources | web flow | browser + dataLayer + demo |
132
+ | Source-level mapping | dataLayer | `"mapping": { "add_to_cart": {...} }` |
133
+ | Pre-collector chain | dataLayer | `"next": "enricher"` |
134
+ | Pre-collector array | http (server) | `"next": ["filter"]` (array form) |
135
+ | Require (deferred init) | dataLayer | `"require": ["session"]` |
136
+ | Demo source events | demo | Pre-configured test events |
129
137
 
130
138
  #### Transformers
131
139
 
132
- | Feature | Location | Example |
133
- | ----------------------- | ------------------ | ---------------------------------- |
134
- | Validator transformer | dataLayerValidator | JSON Schema validation |
135
- | Fingerprint transformer | server | Hash context fields to `user.hash` |
136
- | Transformer chaining | server | `"next": "serverValidator"` |
137
- | Post-collector chain | Meta | `"before": "fingerprint"` |
138
- | Contract validation | serverValidator | Entity/action schemas |
139
- | Format option | serverValidator | `"format": true` |
140
+ | Feature | Location | Example |
141
+ | ----------------------- | ------------------ | ---------------------------------------------- |
142
+ | Validator transformer | dataLayerValidator | JSON Schema validation |
143
+ | Fingerprint transformer | server | Hash context fields to `user.hash` |
144
+ | Transformer chaining | server | `"next": "serverValidator"` |
145
+ | Post-collector chain | Meta | `"before": ["fingerprint", "serverValidator"]` |
146
+ | Contract validation | serverValidator | Entity/action schemas |
147
+ | Format option | serverValidator | `"format": true` |
140
148
 
141
149
  #### Destinations
142
150
 
143
- | Feature | Location | Example |
144
- | ----------------------- | ---------------- | ---------------------------------- |
145
- | Require (deferred init) | GA4 | `"require": ["consent", "user"]` |
146
- | Destination consent | GA4 | `"consent": { "marketing": true }` |
147
- | Destination mapping | All destinations | Entity/action to vendor events |
148
- | Multiple destinations | Both flows | GA4 + API, Meta + Demo |
149
- | Batch option | API | `"batch": 5` |
151
+ | Feature | Location | Example |
152
+ | ----------------------- | ---------------- | --------------------------------------- |
153
+ | Require (deferred init) | GA4 | `"require": ["consent", "user"]` |
154
+ | Destination consent | GA4 | `"consent": { "marketing": true }` |
155
+ | Destination mapping | All destinations | Entity/action to vendor events |
156
+ | Multiple destinations | Both flows | GA4 + API, Meta + Demo |
157
+ | Batch option | API | `"batch": 5` |
158
+ | Transform function | API | `"transform": "$code:(data) => ..."` |
159
+ | Empty consent (always) | debug | `"consent": {}` (fires without consent) |
150
160
 
151
161
  #### Collector
152
162
 
153
- | Feature | Location | Example |
154
- | ----------------- | --------------- | --------------------------------------- |
155
- | Tagging | Both collectors | `"tagging": 1` |
156
- | Consent defaults | Both collectors | `"consent": { "functional": true }` |
157
- | Globals | Both collectors | `"environment": "demo"` |
158
- | Custom properties | web collector | `"custom": { "campaign": "flow-demo" }` |
159
- | User defaults | web collector | `"user": { "id": "anonymous" }` |
163
+ | Feature | Location | Example |
164
+ | ----------------- | ---------------- | --------------------------------------- |
165
+ | Tagging | Both collectors | `"tagging": 1` |
166
+ | Consent defaults | Both collectors | `"consent": { "functional": true }` |
167
+ | Globals | Both collectors | `"environment": "demo"` |
168
+ | Custom properties | web collector | `"custom": { "campaign": "flow-demo" }` |
169
+ | User defaults | web collector | `"user": { "id": "anonymous" }` |
170
+ | Dynamic global | server collector | `"startedAt": "$code:Date.now()"` |
160
171
 
161
172
  #### Server-Specific
162
173
 
163
- | Feature | Location | Example |
164
- | -------------------- | ----------- | ----------------------------------------------- |
165
- | Ingest metadata | http source | `"context.ip": "ip"` |
166
- | Language header | ingest | `"context.language": "headers.accept-language"` |
167
- | Policy | Meta | Pre-processing field transformation |
168
- | Policy consent-gated | Meta | `"user_data.em"` with consent |
169
- | Policy nested map | Meta | `"custom_data.request_meta": { "map": {...} }` |
174
+ | Feature | Location | Example |
175
+ | --------------------- | --------------- | ----------------------------------------------------------------------- |
176
+ | Ingest metadata | http source | `"context.ip": "ip"` |
177
+ | Language header | ingest | `"context.language": "headers.accept-language"` |
178
+ | Ingest computed field | http source | `"fn": "$code:(ip) => ip.replace(...)"` |
179
+ | Policy | Meta | Pre-processing field transformation |
180
+ | Policy consent-gated | Meta | `"user_data.em"` with consent |
181
+ | Policy nested map | Meta | `"custom_data.request_meta": { "map": {...} }` |
182
+ | Local package path | server packages | `"path": "../../core"` (resolve from filesystem) |
183
+ | Source cache | http source | `"cache": { "store": "cache", "rules": [...] }` |
184
+ | Cache match rule | http source | `"match": { "key": "ingest.method", "operator": "eq", "value": "GET" }` |
185
+ | Cache TTL | http source | `"ttl": 300` (seconds) |
186
+ | Cache response update | http source | `"update": { "headers.X-Cache": { "key": "cache.status" } }` |
187
+ | Store definition | server stores | `"cache": { "package": "@walkeros/store-memory", ... }` |
188
+ | Store settings | cache store | `"maxSize": 10485760, "maxEntries": 1000` |
170
189
 
171
190
  #### Browser Source
172
191
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@walkeros/cli",
3
- "version": "3.3.1",
3
+ "version": "3.4.0-next-1776749829492",
4
4
  "description": "walkerOS CLI - Bundle and deploy walkerOS components",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -44,8 +44,8 @@
44
44
  "docker:publish": "bash scripts/publish-docker.sh"
45
45
  },
46
46
  "dependencies": {
47
- "@walkeros/core": "3.3.1",
48
- "@walkeros/server-core": "3.3.1",
47
+ "@walkeros/core": "3.4.0-next-1776749829492",
48
+ "@walkeros/server-core": "3.4.0-next-1776749829492",
49
49
  "ajv": "^8.17.1",
50
50
  "chalk": "^5.6.2",
51
51
  "commander": "^14.0.2",
@@ -66,8 +66,8 @@
66
66
  "@types/jsdom": "^21.1.7",
67
67
  "@types/pacote": "^11.1.8",
68
68
  "@types/semver": "^7.7.1",
69
- "@walkeros/config": "3.3.1",
70
- "@walkeros/core": "3.3.1",
69
+ "@walkeros/config": "3.4.0-next-1776749829492",
70
+ "@walkeros/core": "3.4.0-next-1776749829492",
71
71
  "msw": "^2.12.10",
72
72
  "openapi-typescript": "^7.13.0",
73
73
  "tsx": "^4.21.0"