@walkeros/cli 4.9.0-next-1793283841805 → 4.9.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.
@@ -17,5 +17,5 @@ needs the variables the setup in `flow-complete.md` exports (`GCP_SA`,
17
17
  `FINGERPRINT_SALT`, `EMAIL_SALT`, `META_ACCESS_TOKEN`).
18
18
 
19
19
  In production the store is swapped for a real one, e.g.
20
- `@walkeros/server-store-sheets` or a GCS store; the `loadUser` step does not
21
- change.
20
+ `@walkeros/server-store-sheets`, a GCS store, or `@walkeros/server-store-api`
21
+ for your CRM's API; the `loadUser` step does not change.
@@ -241,25 +241,25 @@
241
241
  "bundle": {
242
242
  "packages": {
243
243
  "@walkeros/collector": {
244
- "version": "4.9.0-next-1793283841805"
244
+ "version": "4.9.0"
245
245
  },
246
246
  "@walkeros/web-source-cmp-usercentrics": {
247
- "version": "4.9.0-next-1793283841805"
247
+ "version": "4.9.0"
248
248
  },
249
249
  "@walkeros/web-source-session": {
250
- "version": "4.9.0-next-1793283841805"
250
+ "version": "4.9.0"
251
251
  },
252
252
  "@walkeros/web-source-datalayer": {
253
- "version": "4.9.0-next-1793283841805"
253
+ "version": "4.9.0"
254
254
  },
255
255
  "@walkeros/web-source-browser": {
256
- "version": "4.9.0-next-1793283841805"
256
+ "version": "4.9.0"
257
257
  },
258
258
  "@walkeros/web-destination-gtag": {
259
- "version": "4.9.0-next-1793283841805"
259
+ "version": "4.9.0"
260
260
  },
261
261
  "@walkeros/web-destination-api": {
262
- "version": "4.9.0-next-1793283841805"
262
+ "version": "4.9.0"
263
263
  }
264
264
  },
265
265
  "env": {
@@ -1778,40 +1778,40 @@
1778
1778
  "bundle": {
1779
1779
  "packages": {
1780
1780
  "@walkeros/collector": {
1781
- "version": "4.9.0-next-1793283841805"
1781
+ "version": "4.9.0"
1782
1782
  },
1783
1783
  "@walkeros/server-source-express": {
1784
- "version": "4.9.0-next-1793283841805"
1784
+ "version": "4.9.0"
1785
1785
  },
1786
1786
  "@walkeros/transformer-ga4": {
1787
- "version": "4.9.0-next-1793283841805"
1787
+ "version": "4.9.0"
1788
1788
  },
1789
1789
  "@walkeros/transformer-validate": {
1790
- "version": "4.9.0-next-1793283841805"
1790
+ "version": "4.9.0"
1791
1791
  },
1792
1792
  "@walkeros/server-transformer-bot": {
1793
- "version": "4.9.0-next-1793283841805"
1793
+ "version": "4.9.0"
1794
1794
  },
1795
1795
  "@walkeros/server-transformer-fingerprint": {
1796
- "version": "4.9.0-next-1793283841805"
1796
+ "version": "4.9.0"
1797
1797
  },
1798
1798
  "@walkeros/server-transformer-file": {
1799
- "version": "4.9.0-next-1793283841805"
1799
+ "version": "4.9.0"
1800
1800
  },
1801
1801
  "@walkeros/server-store-fs": {
1802
- "version": "4.9.0-next-1793283841805"
1802
+ "version": "4.9.0"
1803
1803
  },
1804
1804
  "@walkeros/server-destination-gcp": {
1805
- "version": "4.9.0-next-1793283841805"
1805
+ "version": "4.9.0"
1806
1806
  },
1807
1807
  "@walkeros/server-destination-meta": {
1808
- "version": "4.9.0-next-1793283841805"
1808
+ "version": "4.9.0"
1809
1809
  },
1810
1810
  "@walkeros/server-destination-piwikpro": {
1811
- "version": "4.9.0-next-1793283841805"
1811
+ "version": "4.9.0"
1812
1812
  },
1813
1813
  "@walkeros/server-destination-datamanager": {
1814
- "version": "4.9.0-next-1793283841805"
1814
+ "version": "4.9.0"
1815
1815
  }
1816
1816
  }
1817
1817
  }
@@ -1881,6 +1881,10 @@
1881
1881
  {
1882
1882
  "path": "/walker.js",
1883
1883
  "methods": ["GET"]
1884
+ },
1885
+ {
1886
+ "path": "/demo/products/:id",
1887
+ "methods": ["GET"]
1884
1888
  }
1885
1889
  ],
1886
1890
  "cors": {
@@ -1942,6 +1946,14 @@
1942
1946
  "value": "/g/collect"
1943
1947
  },
1944
1948
  "stop": true
1949
+ },
1950
+ {
1951
+ "match": {
1952
+ "key": "ingest.path",
1953
+ "operator": "prefix",
1954
+ "value": "/demo/products/"
1955
+ },
1956
+ "next": "productApi"
1945
1957
  }
1946
1958
  ]
1947
1959
  },
@@ -2412,6 +2424,7 @@
2412
2424
  },
2413
2425
  "config": {
2414
2426
  "settings": {
2427
+ "prefix": "/",
2415
2428
  "headers": {
2416
2429
  "Cache-Control": "public, max-age=300",
2417
2430
  "Cross-Origin-Resource-Policy": "same-site"
@@ -2422,6 +2435,23 @@
2422
2435
  "stop": true
2423
2436
  }
2424
2437
  },
2438
+ "productApi": {
2439
+ "package": "@walkeros/server-transformer-file",
2440
+ "env": {
2441
+ "store": "$store.assets"
2442
+ },
2443
+ "config": {
2444
+ "settings": {
2445
+ "prefix": "/demo/",
2446
+ "headers": {
2447
+ "Content-Type": "application/json; charset=utf-8"
2448
+ }
2449
+ }
2450
+ },
2451
+ "next": {
2452
+ "stop": true
2453
+ }
2454
+ },
2425
2455
  "dedup": {
2426
2456
  "cache": {
2427
2457
  "stop": true,
@@ -4852,13 +4882,13 @@
4852
4882
  "bundle": {
4853
4883
  "packages": {
4854
4884
  "@walkeros/collector": {
4855
- "version": "4.9.0-next-1793283841805"
4885
+ "version": "4.9.0"
4856
4886
  },
4857
4887
  "@walkeros/server-source-gcp": {
4858
- "version": "4.9.0-next-1793283841805"
4888
+ "version": "4.9.0"
4859
4889
  },
4860
4890
  "@walkeros/server-destination-gcp": {
4861
- "version": "4.9.0-next-1793283841805"
4891
+ "version": "4.9.0"
4862
4892
  }
4863
4893
  }
4864
4894
  }
@@ -39,8 +39,8 @@ web usercentrics, session, dataLayer, browser
39
39
  -> collector.next: opt-out stop, pageGroup
40
40
  -> ga4 (to Google, main property) gtm (dataLayer) collect (to server)
41
41
 
42
- server express /collect /g/collect /walker.js
43
- before: one [ G-SUBSITE hit -> ga4Decode -> ga4Consent | *.js -> file (stop) | other /g/collect (stop) ]
42
+ server express /collect /g/collect /walker.js /demo/products/:id
43
+ before: one [ G-SUBSITE hit -> ga4Decode -> ga4Consent | *.js -> file (stop) | other /g/collect (stop) | /demo/products/ -> productApi (stop) ]
44
44
  next: opt-out stop, dedup
45
45
  -> collector.next: fingerprint, bot, not impression -> enrich [ loadUser, sessionSave, sessionLoad, validate ]
46
46
  -> pubsub (every event, email pseudonymized)
@@ -140,13 +140,14 @@ walkeros push packages/cli/examples/flow-complete.json -f web -e '{"name":"page
140
140
  ## server-entry: A first-party endpoint, and a GA4 migration path
141
141
 
142
142
  - **Purpose:** one express source answers the browser (`/collect`), GA4 hits of
143
- a sub-site (`/g/collect`) and script requests (`/walker.js`).
143
+ a sub-site (`/g/collect`), script requests (`/walker.js`) and product lookups
144
+ (`/demo/products/:id`).
144
145
  - **Features:**
145
146
  - `server-url` at `/flows/server/config/url`: The full collect endpoint, local
146
147
  by default, SERVER_URL in production.
147
148
  - `express-paths` at `/flows/server/sources/express/config/settings/paths`:
148
149
  One route per job, each with its own methods: /collect, /g/collect,
149
- /walker.js.
150
+ /walker.js, /demo/products/:id.
150
151
  - `express-cors` at `/flows/server/sources/express/config/settings/cors`: CORS
151
152
  response headers for the shop origin; express adds X-Content-Type-Options
152
153
  itself.
@@ -740,6 +741,15 @@ walkeros push packages/cli/examples/flow-complete.json -f server -e '{"name":"pa
740
741
  first party from the server flow.
741
742
  - `file-headers` at `/flows/server/transformers/file/config/settings/headers`:
742
743
  Default response headers for served files: caching and resource policy.
744
+ - `file-prefix` at `/flows/server/transformers/file/config/settings/prefix`:
745
+ prefix / makes the step own every script request: a missing walker.js
746
+ answers 404 instead of the tracking pixel.
747
+ - `products-case` at `/flows/server/sources/express/before/one/3`: The last
748
+ case sends product lookups (/demo/products/<id>) to productApi.
749
+ - `product-api` at `/flows/server/transformers/productApi`: A lookup route:
750
+ GET /demo/products/<id> answers the product as JSON from the assets store
751
+ (prefix /demo/ is stripped to the key products/<id>; headers sets the JSON
752
+ Content-Type), 404 for an unknown id, and never becomes an event.
743
753
  - `gclid-to-ads` at
744
754
  `/flows/server/destinations/datamanager/config/mapping/order/complete/data/map/gclid`:
745
755
  The gclid saved at session start reaches Google Ads with the purchase.
@@ -752,12 +762,27 @@ walkeros push packages/cli/examples/flow-complete.json -f server -e '{"name":"pa
752
762
  (`packages/cli/examples/customers`, one JSON record per customer id), outside
753
763
  root `include`, so no customer data ships in a bundle. `basePath` is relative
754
764
  to the working directory, so `CUSTOMERS_DIR` holds it as an absolute path (the
755
- setup block at the top exports it). In production a Sheets or GCS store takes
756
- its place; `loadUser` does not change.
765
+ setup block at the top exports it). In production a Sheets or GCS store, or
766
+ `@walkeros/server-store-api` for your CRM's API, takes its place; `loadUser`
767
+ does not change.
757
768
  - **walker.js first party:** the `file` transformer answers `GET /walker.js`
758
769
  from the `assets` store with `settings.headers` (`Cache-Control`,
759
770
  `Cross-Origin-Resource-Policy`) and ends with `next: { stop: true }`. Express
760
- `settings.cors` adds the CORS headers.
771
+ `settings.cors` adds the CORS headers. With `prefix: "/"` the step owns every
772
+ script request: a missing `walker.js` answers 404 with
773
+ `Cache-Control: no-store` instead of the tracking pixel.
774
+ - **A lookup route:** `productApi` is a second `file` step on the same `assets`
775
+ store. `GET /demo/products/SKU-1` answers 200 with the product as JSON
776
+ (`shared/products/SKU-1`; `settings.headers` sets the JSON `Content-Type`,
777
+ since the step serves bytes as stored), an unknown id answers 404 with
778
+ `Cache-Control: no-store`, and `next: { stop: true }` keeps every lookup from
779
+ becoming an event. A failing store read answers 503 and is logged at ERROR.
780
+
781
+ ```bash
782
+ curl -i http://localhost:8080/demo/products/SKU-1
783
+ curl -i http://localhost:8080/demo/products/SKU-9
784
+ ```
785
+
761
786
  - **Why `X-Content-Type-Options: nosniff` is not in the file:** express sets it
762
787
  on every response itself.
763
788
  - The `file` example is proven over HTTP in the integration test; its simulation
@@ -1700,6 +1700,30 @@ declare const teaching: {
1700
1700
  page: string;
1701
1701
  }[];
1702
1702
  };
1703
+ 'file-prefix': {
1704
+ pointer: string;
1705
+ chapter: "state-stores";
1706
+ level: "intermediate";
1707
+ useCases: "script-serving"[];
1708
+ note: string;
1709
+ docs: never[];
1710
+ };
1711
+ 'products-case': {
1712
+ pointer: string;
1713
+ chapter: "state-stores";
1714
+ level: "intermediate";
1715
+ useCases: never[];
1716
+ note: string;
1717
+ docs: never[];
1718
+ };
1719
+ 'product-api': {
1720
+ pointer: string;
1721
+ chapter: "state-stores";
1722
+ level: "intermediate";
1723
+ useCases: never[];
1724
+ note: string;
1725
+ docs: never[];
1726
+ };
1703
1727
  'gclid-to-ads': {
1704
1728
  pointer: string;
1705
1729
  chapter: "state-stores";
@@ -264,25 +264,25 @@ var flow_complete_default = {
264
264
  bundle: {
265
265
  packages: {
266
266
  "@walkeros/collector": {
267
- version: "4.9.0-next-1793283841805"
267
+ version: "4.9.0"
268
268
  },
269
269
  "@walkeros/web-source-cmp-usercentrics": {
270
- version: "4.9.0-next-1793283841805"
270
+ version: "4.9.0"
271
271
  },
272
272
  "@walkeros/web-source-session": {
273
- version: "4.9.0-next-1793283841805"
273
+ version: "4.9.0"
274
274
  },
275
275
  "@walkeros/web-source-datalayer": {
276
- version: "4.9.0-next-1793283841805"
276
+ version: "4.9.0"
277
277
  },
278
278
  "@walkeros/web-source-browser": {
279
- version: "4.9.0-next-1793283841805"
279
+ version: "4.9.0"
280
280
  },
281
281
  "@walkeros/web-destination-gtag": {
282
- version: "4.9.0-next-1793283841805"
282
+ version: "4.9.0"
283
283
  },
284
284
  "@walkeros/web-destination-api": {
285
- version: "4.9.0-next-1793283841805"
285
+ version: "4.9.0"
286
286
  }
287
287
  },
288
288
  env: {
@@ -1801,40 +1801,40 @@ var flow_complete_default = {
1801
1801
  bundle: {
1802
1802
  packages: {
1803
1803
  "@walkeros/collector": {
1804
- version: "4.9.0-next-1793283841805"
1804
+ version: "4.9.0"
1805
1805
  },
1806
1806
  "@walkeros/server-source-express": {
1807
- version: "4.9.0-next-1793283841805"
1807
+ version: "4.9.0"
1808
1808
  },
1809
1809
  "@walkeros/transformer-ga4": {
1810
- version: "4.9.0-next-1793283841805"
1810
+ version: "4.9.0"
1811
1811
  },
1812
1812
  "@walkeros/transformer-validate": {
1813
- version: "4.9.0-next-1793283841805"
1813
+ version: "4.9.0"
1814
1814
  },
1815
1815
  "@walkeros/server-transformer-bot": {
1816
- version: "4.9.0-next-1793283841805"
1816
+ version: "4.9.0"
1817
1817
  },
1818
1818
  "@walkeros/server-transformer-fingerprint": {
1819
- version: "4.9.0-next-1793283841805"
1819
+ version: "4.9.0"
1820
1820
  },
1821
1821
  "@walkeros/server-transformer-file": {
1822
- version: "4.9.0-next-1793283841805"
1822
+ version: "4.9.0"
1823
1823
  },
1824
1824
  "@walkeros/server-store-fs": {
1825
- version: "4.9.0-next-1793283841805"
1825
+ version: "4.9.0"
1826
1826
  },
1827
1827
  "@walkeros/server-destination-gcp": {
1828
- version: "4.9.0-next-1793283841805"
1828
+ version: "4.9.0"
1829
1829
  },
1830
1830
  "@walkeros/server-destination-meta": {
1831
- version: "4.9.0-next-1793283841805"
1831
+ version: "4.9.0"
1832
1832
  },
1833
1833
  "@walkeros/server-destination-piwikpro": {
1834
- version: "4.9.0-next-1793283841805"
1834
+ version: "4.9.0"
1835
1835
  },
1836
1836
  "@walkeros/server-destination-datamanager": {
1837
- version: "4.9.0-next-1793283841805"
1837
+ version: "4.9.0"
1838
1838
  }
1839
1839
  }
1840
1840
  }
@@ -1904,6 +1904,10 @@ var flow_complete_default = {
1904
1904
  {
1905
1905
  path: "/walker.js",
1906
1906
  methods: ["GET"]
1907
+ },
1908
+ {
1909
+ path: "/demo/products/:id",
1910
+ methods: ["GET"]
1907
1911
  }
1908
1912
  ],
1909
1913
  cors: {
@@ -1965,6 +1969,14 @@ var flow_complete_default = {
1965
1969
  value: "/g/collect"
1966
1970
  },
1967
1971
  stop: true
1972
+ },
1973
+ {
1974
+ match: {
1975
+ key: "ingest.path",
1976
+ operator: "prefix",
1977
+ value: "/demo/products/"
1978
+ },
1979
+ next: "productApi"
1968
1980
  }
1969
1981
  ]
1970
1982
  },
@@ -2435,6 +2447,7 @@ var flow_complete_default = {
2435
2447
  },
2436
2448
  config: {
2437
2449
  settings: {
2450
+ prefix: "/",
2438
2451
  headers: {
2439
2452
  "Cache-Control": "public, max-age=300",
2440
2453
  "Cross-Origin-Resource-Policy": "same-site"
@@ -2445,6 +2458,23 @@ var flow_complete_default = {
2445
2458
  stop: true
2446
2459
  }
2447
2460
  },
2461
+ productApi: {
2462
+ package: "@walkeros/server-transformer-file",
2463
+ env: {
2464
+ store: "$store.assets"
2465
+ },
2466
+ config: {
2467
+ settings: {
2468
+ prefix: "/demo/",
2469
+ headers: {
2470
+ "Content-Type": "application/json; charset=utf-8"
2471
+ }
2472
+ }
2473
+ },
2474
+ next: {
2475
+ stop: true
2476
+ }
2477
+ },
2448
2478
  dedup: {
2449
2479
  cache: {
2450
2480
  stop: true,
@@ -4875,13 +4905,13 @@ var flow_complete_default = {
4875
4905
  bundle: {
4876
4906
  packages: {
4877
4907
  "@walkeros/collector": {
4878
- version: "4.9.0-next-1793283841805"
4908
+ version: "4.9.0"
4879
4909
  },
4880
4910
  "@walkeros/server-source-gcp": {
4881
- version: "4.9.0-next-1793283841805"
4911
+ version: "4.9.0"
4882
4912
  },
4883
4913
  "@walkeros/server-destination-gcp": {
4884
- version: "4.9.0-next-1793283841805"
4914
+ version: "4.9.0"
4885
4915
  }
4886
4916
  }
4887
4917
  }
@@ -5395,7 +5425,7 @@ var teaching = {
5395
5425
  chapter: "server-entry",
5396
5426
  level: "beginner",
5397
5427
  useCases: ["script-serving", "ga4-migration"],
5398
- note: "One route per job, each with its own methods: /collect, /g/collect, /walker.js.",
5428
+ note: "One route per job, each with its own methods: /collect, /g/collect, /walker.js, /demo/products/:id.",
5399
5429
  docs: [],
5400
5430
  example: { step: "express", name: "postCollect" }
5401
5431
  },
@@ -6540,6 +6570,30 @@ var teaching = {
6540
6570
  note: "Default response headers for served files: caching and resource policy.",
6541
6571
  docs: [{ page: "transformers/file" }]
6542
6572
  },
6573
+ "file-prefix": {
6574
+ pointer: "/flows/server/transformers/file/config/settings/prefix",
6575
+ chapter: "state-stores",
6576
+ level: "intermediate",
6577
+ useCases: ["script-serving"],
6578
+ note: "prefix / makes the step own every script request: a missing walker.js answers 404 instead of the tracking pixel.",
6579
+ docs: []
6580
+ },
6581
+ "products-case": {
6582
+ pointer: "/flows/server/sources/express/before/one/3",
6583
+ chapter: "state-stores",
6584
+ level: "intermediate",
6585
+ useCases: [],
6586
+ note: "The last case sends product lookups (/demo/products/<id>) to productApi.",
6587
+ docs: []
6588
+ },
6589
+ "product-api": {
6590
+ pointer: "/flows/server/transformers/productApi",
6591
+ chapter: "state-stores",
6592
+ level: "intermediate",
6593
+ useCases: [],
6594
+ note: "A lookup route: GET /demo/products/<id> answers the product as JSON from the assets store (prefix /demo/ is stripped to the key products/<id>; headers sets the JSON Content-Type), 404 for an unknown id, and never becomes an event.",
6595
+ docs: []
6596
+ },
6543
6597
  "gclid-to-ads": {
6544
6598
  pointer: "/flows/server/destinations/datamanager/config/mapping/order/complete/data/map/gclid",
6545
6599
  chapter: "state-stores",
@@ -7039,7 +7093,7 @@ var flowCompleteCoverage = {
7039
7093
  batch: "rule-batch",
7040
7094
  condition: "rule-condition",
7041
7095
  consent: {
7042
- excluded: "rule consent is not enforced yet; destination consent is the gate in this file"
7096
+ excluded: "destination consent is the gate in this file; the consent guide shows a rule's consent"
7043
7097
  },
7044
7098
  settings: "rule-settings",
7045
7099
  data: "rule-data",