@walkeros/cli 1.1.2 → 1.2.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/CHANGELOG.md +22 -0
- package/dist/examples/flow-complete.json +10 -1
- package/dist/examples/flow-complete.md +23 -24
- package/dist/index.d.ts +29 -1
- package/dist/index.js +325 -30
- package/dist/index.js.map +1 -1
- package/examples/flow-complete.json +10 -1
- package/examples/flow-complete.md +23 -24
- package/package.json +1 -1
|
@@ -250,7 +250,10 @@
|
|
|
250
250
|
"this",
|
|
251
251
|
{
|
|
252
252
|
"map": {
|
|
253
|
-
"item_id":
|
|
253
|
+
"item_id": [
|
|
254
|
+
{ "key": "data.sku" },
|
|
255
|
+
{ "key": "data.id" }
|
|
256
|
+
],
|
|
254
257
|
"item_name": "data.name",
|
|
255
258
|
"item_category": "data.category",
|
|
256
259
|
"price": "data.price"
|
|
@@ -322,6 +325,12 @@
|
|
|
322
325
|
"url": "$var.apiUrl",
|
|
323
326
|
"batch": 5
|
|
324
327
|
},
|
|
328
|
+
"data": {
|
|
329
|
+
"map": {
|
|
330
|
+
"sent_at": { "fn": "$code:() => Date.now()" },
|
|
331
|
+
"flow_version": "$var.flowVersion"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
325
334
|
"mapping": {
|
|
326
335
|
"order": {
|
|
327
336
|
"complete": {
|
|
@@ -71,7 +71,7 @@ npx walkeros serve packages/cli/examples/flow-complete.json --flow web
|
|
|
71
71
|
|
|
72
72
|
## Feature Inventory
|
|
73
73
|
|
|
74
|
-
### Features Used (
|
|
74
|
+
### Features Used (53)
|
|
75
75
|
|
|
76
76
|
#### Mapping - Value Extraction
|
|
77
77
|
|
|
@@ -81,6 +81,7 @@ npx walkeros serve packages/cli/examples/flow-complete.json --flow web
|
|
|
81
81
|
| Static value | Meta ViewContent | `"content_type": { "value": "product" }` |
|
|
82
82
|
| Key with fallback | GA4 add_to_cart | `{ "key": "data.currency", "value": "$variables.currency" }` |
|
|
83
83
|
| Nested key (deep) | dataLayer mapping | `"items.0.item_id"` |
|
|
84
|
+
| Fallback array | GA4 view_item | `[{ "key": "data.sku" }, { "key": "data.id" }]` |
|
|
84
85
|
|
|
85
86
|
#### Mapping - Structure
|
|
86
87
|
|
|
@@ -92,6 +93,7 @@ npx walkeros serve packages/cli/examples/flow-complete.json --flow web
|
|
|
92
93
|
| Set (single value) | Meta ViewContent | `"content_ids": { "set": ["data.id"] }` |
|
|
93
94
|
| Set (multiple values) | Meta settings | `"external_id": { "set": ["user.device", "user.session"] }` |
|
|
94
95
|
| Direct passthrough | Meta PageView | `"data": "data"` |
|
|
96
|
+
| Config-level data | API destination | `"data": { "map": { "sent_at": {...} } }` |
|
|
95
97
|
|
|
96
98
|
#### Mapping - Control
|
|
97
99
|
|
|
@@ -175,36 +177,33 @@ npx walkeros serve packages/cli/examples/flow-complete.json --flow web
|
|
|
175
177
|
|
|
176
178
|
---
|
|
177
179
|
|
|
178
|
-
### Features NOT Used (
|
|
180
|
+
### Features NOT Used (6)
|
|
179
181
|
|
|
180
|
-
####
|
|
182
|
+
#### Now Available via $code: Prefix ✅
|
|
181
183
|
|
|
182
|
-
These features
|
|
184
|
+
These features are now fully supported in JSON via `$code:` prefix (and ARE used
|
|
185
|
+
in this example):
|
|
183
186
|
|
|
184
|
-
| Feature |
|
|
185
|
-
| --------------------------- |
|
|
186
|
-
| `fn:` function |
|
|
187
|
-
| `condition:` |
|
|
188
|
-
| Conditional mapping (array) |
|
|
189
|
-
| Custom transformer code |
|
|
190
|
-
| Custom
|
|
191
|
-
| Custom destination code | Requires JavaScript |
|
|
192
|
-
| Event handler callbacks | Requires JavaScript |
|
|
187
|
+
| Feature | Status |
|
|
188
|
+
| --------------------------- | ----------------------------------- |
|
|
189
|
+
| `fn:` function | ✅ Used via `$code:` in GA4 value |
|
|
190
|
+
| `condition:` | ✅ Used via `$code:` in definitions |
|
|
191
|
+
| Conditional mapping (array) | ✅ Used in serverValidator |
|
|
192
|
+
| Custom transformer code | ✅ Used in enricher, filter |
|
|
193
|
+
| Custom destination code | ✅ Used in debug logger |
|
|
193
194
|
|
|
194
|
-
#### Omitted for Clarity (
|
|
195
|
+
#### Omitted for Clarity (6)
|
|
195
196
|
|
|
196
197
|
These features could be added but were omitted to keep the example focused:
|
|
197
198
|
|
|
198
|
-
| Feature | Why Omitted
|
|
199
|
-
| ------------------------- |
|
|
200
|
-
| Multiple named flows (3+) | Two flows sufficient for demo
|
|
201
|
-
| Queue config | Advanced batching scenario
|
|
202
|
-
| Retry config | Advanced error handling
|
|
203
|
-
| Custom fetch options | API destination advanced
|
|
204
|
-
|
|
|
205
|
-
|
|
|
206
|
-
| Custom headers in API | Would add complexity |
|
|
207
|
-
| Multiple validators | One per flow sufficient |
|
|
199
|
+
| Feature | Why Omitted |
|
|
200
|
+
| ------------------------- | ------------------------------ |
|
|
201
|
+
| Multiple named flows (3+) | Two flows sufficient for demo |
|
|
202
|
+
| Queue config | Advanced batching scenario |
|
|
203
|
+
| Retry config | Advanced error handling |
|
|
204
|
+
| Custom fetch options | API destination advanced |
|
|
205
|
+
| Custom headers in API | Would add complexity |
|
|
206
|
+
| `validate:` function | Could add via $code: if needed |
|
|
208
207
|
|
|
209
208
|
---
|
|
210
209
|
|