@walkeros/web-destination-amplitude 3.3.1 → 3.4.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.
@@ -199,9 +199,9 @@ var c = {};
199
199
  for (var o in n) e(t, o, { get: n[o], enumerable: true });
200
200
  })(c, { Level: () => u });
201
201
  var u = ((e2) => (e2[e2.ERROR = 0] = "ERROR", e2[e2.WARN = 1] = "WARN", e2[e2.INFO = 2] = "INFO", e2[e2.DEBUG = 3] = "DEBUG", e2))(u || {});
202
- var F = { merge: true, shallow: true, extend: true };
202
+ var W = { merge: true, shallow: true, extend: true };
203
203
  function L(e2, t = {}, n = {}) {
204
- n = { ...F, ...n };
204
+ n = { ...W, ...n };
205
205
  const o = Object.entries(t).reduce((t2, [o2, r]) => {
206
206
  const i = e2[o2];
207
207
  return n.merge && Array.isArray(i) && Array.isArray(r) ? t2[o2] = r.reduce((e3, t3) => e3.includes(t3) ? e3 : [...e3, t3], [...i]) : (n.extend || o2 in e2) && (t2[o2] = r), t2;
@@ -210,7 +210,7 @@ function L(e2, t = {}, n = {}) {
210
210
  }
211
211
  function fe(e2 = {}) {
212
212
  var _a;
213
- const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.3.1", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
213
+ const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.4.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
214
214
  if (e2.name) {
215
215
  const [t2, n2] = (_a = e2.name.split(" ")) != null ? _a : [];
216
216
  t2 && n2 && (r.entity = t2, r.action = n2);
@@ -225,7 +225,7 @@ function le(e2 = "entity action", t = {}) {
225
225
  // src/examples/step.ts
226
226
  var defaultEventForwarding = {
227
227
  in: le("product view", { timestamp: 1700000100 }),
228
- out: ["amplitude.track", "product view", {}]
228
+ out: [["amplitude.track", "product view", {}]]
229
229
  };
230
230
  var wildcardIgnored = {
231
231
  in: le("debug noise", { timestamp: 1700000101 }),
@@ -236,15 +236,17 @@ var destinationLevelInclude = {
236
236
  in: le("product view", { timestamp: 1700000102 }),
237
237
  configInclude: ["data"],
238
238
  out: [
239
- "amplitude.track",
240
- "product view",
241
- {
242
- data_id: "ers",
243
- data_name: "Everyday Ruck Snack",
244
- data_color: "black",
245
- data_size: "l",
246
- data_price: 420
247
- }
239
+ [
240
+ "amplitude.track",
241
+ "product view",
242
+ {
243
+ data_id: "ers",
244
+ data_name: "Everyday Ruck Snack",
245
+ data_color: "black",
246
+ data_size: "l",
247
+ data_price: 420
248
+ }
249
+ ]
248
250
  ]
249
251
  };
250
252
  var ruleIncludeReplaces = {
@@ -254,11 +256,13 @@ var ruleIncludeReplaces = {
254
256
  include: ["globals"]
255
257
  },
256
258
  out: [
257
- "amplitude.track",
258
- "order complete",
259
- {
260
- globals_pagegroup: "shop"
261
- }
259
+ [
260
+ "amplitude.track",
261
+ "order complete",
262
+ {
263
+ globals_pagegroup: "shop"
264
+ }
265
+ ]
262
266
  ]
263
267
  };
264
268
  var destinationLevelIdentify = {
@@ -344,7 +348,7 @@ var userLogoutReset = {
344
348
  reset: true
345
349
  }
346
350
  },
347
- out: ["amplitude.reset"]
351
+ out: [["amplitude.reset"]]
348
352
  };
349
353
  var subscriptionRenewRevenue = {
350
354
  in: le("subscription renew", {
@@ -368,13 +372,15 @@ var subscriptionRenewRevenue = {
368
372
  }
369
373
  },
370
374
  out: [
371
- "amplitude.revenue",
372
- {
373
- productId: "plan-pro",
374
- price: 9.99,
375
- revenueType: "renewal",
376
- currency: "EUR"
377
- }
375
+ [
376
+ "amplitude.revenue",
377
+ {
378
+ productId: "plan-pro",
379
+ price: 9.99,
380
+ revenueType: "renewal",
381
+ currency: "EUR"
382
+ }
383
+ ]
378
384
  ]
379
385
  };
380
386
  var orderCompleteMultiProduct = {
@@ -499,13 +505,13 @@ var consentRevokeOptOut = {
499
505
  command: "consent",
500
506
  in: { analytics: false },
501
507
  settings: {},
502
- out: ["amplitude.setOptOut", true]
508
+ out: [["amplitude.setOptOut", true]]
503
509
  };
504
510
  var consentGrantOptIn = {
505
511
  command: "consent",
506
512
  in: { analytics: true },
507
513
  settings: {},
508
- out: ["amplitude.setOptOut", false]
514
+ out: [["amplitude.setOptOut", false]]
509
515
  };
510
516
  // Annotate the CommonJS export names for ESM import in node:
511
517
  0 && (module.exports = {
@@ -178,9 +178,9 @@ var c = {};
178
178
  for (var o in n) e(t, o, { get: n[o], enumerable: true });
179
179
  })(c, { Level: () => u });
180
180
  var u = ((e2) => (e2[e2.ERROR = 0] = "ERROR", e2[e2.WARN = 1] = "WARN", e2[e2.INFO = 2] = "INFO", e2[e2.DEBUG = 3] = "DEBUG", e2))(u || {});
181
- var F = { merge: true, shallow: true, extend: true };
181
+ var W = { merge: true, shallow: true, extend: true };
182
182
  function L(e2, t = {}, n = {}) {
183
- n = { ...F, ...n };
183
+ n = { ...W, ...n };
184
184
  const o = Object.entries(t).reduce((t2, [o2, r]) => {
185
185
  const i = e2[o2];
186
186
  return n.merge && Array.isArray(i) && Array.isArray(r) ? t2[o2] = r.reduce((e3, t3) => e3.includes(t3) ? e3 : [...e3, t3], [...i]) : (n.extend || o2 in e2) && (t2[o2] = r), t2;
@@ -189,7 +189,7 @@ function L(e2, t = {}, n = {}) {
189
189
  }
190
190
  function fe(e2 = {}) {
191
191
  var _a;
192
- const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.3.1", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
192
+ const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.4.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
193
193
  if (e2.name) {
194
194
  const [t2, n2] = (_a = e2.name.split(" ")) != null ? _a : [];
195
195
  t2 && n2 && (r.entity = t2, r.action = n2);
@@ -204,7 +204,7 @@ function le(e2 = "entity action", t = {}) {
204
204
  // src/examples/step.ts
205
205
  var defaultEventForwarding = {
206
206
  in: le("product view", { timestamp: 1700000100 }),
207
- out: ["amplitude.track", "product view", {}]
207
+ out: [["amplitude.track", "product view", {}]]
208
208
  };
209
209
  var wildcardIgnored = {
210
210
  in: le("debug noise", { timestamp: 1700000101 }),
@@ -215,15 +215,17 @@ var destinationLevelInclude = {
215
215
  in: le("product view", { timestamp: 1700000102 }),
216
216
  configInclude: ["data"],
217
217
  out: [
218
- "amplitude.track",
219
- "product view",
220
- {
221
- data_id: "ers",
222
- data_name: "Everyday Ruck Snack",
223
- data_color: "black",
224
- data_size: "l",
225
- data_price: 420
226
- }
218
+ [
219
+ "amplitude.track",
220
+ "product view",
221
+ {
222
+ data_id: "ers",
223
+ data_name: "Everyday Ruck Snack",
224
+ data_color: "black",
225
+ data_size: "l",
226
+ data_price: 420
227
+ }
228
+ ]
227
229
  ]
228
230
  };
229
231
  var ruleIncludeReplaces = {
@@ -233,11 +235,13 @@ var ruleIncludeReplaces = {
233
235
  include: ["globals"]
234
236
  },
235
237
  out: [
236
- "amplitude.track",
237
- "order complete",
238
- {
239
- globals_pagegroup: "shop"
240
- }
238
+ [
239
+ "amplitude.track",
240
+ "order complete",
241
+ {
242
+ globals_pagegroup: "shop"
243
+ }
244
+ ]
241
245
  ]
242
246
  };
243
247
  var destinationLevelIdentify = {
@@ -323,7 +327,7 @@ var userLogoutReset = {
323
327
  reset: true
324
328
  }
325
329
  },
326
- out: ["amplitude.reset"]
330
+ out: [["amplitude.reset"]]
327
331
  };
328
332
  var subscriptionRenewRevenue = {
329
333
  in: le("subscription renew", {
@@ -347,13 +351,15 @@ var subscriptionRenewRevenue = {
347
351
  }
348
352
  },
349
353
  out: [
350
- "amplitude.revenue",
351
- {
352
- productId: "plan-pro",
353
- price: 9.99,
354
- revenueType: "renewal",
355
- currency: "EUR"
356
- }
354
+ [
355
+ "amplitude.revenue",
356
+ {
357
+ productId: "plan-pro",
358
+ price: 9.99,
359
+ revenueType: "renewal",
360
+ currency: "EUR"
361
+ }
362
+ ]
357
363
  ]
358
364
  };
359
365
  var orderCompleteMultiProduct = {
@@ -478,13 +484,13 @@ var consentRevokeOptOut = {
478
484
  command: "consent",
479
485
  in: { analytics: false },
480
486
  settings: {},
481
- out: ["amplitude.setOptOut", true]
487
+ out: [["amplitude.setOptOut", true]]
482
488
  };
483
489
  var consentGrantOptIn = {
484
490
  command: "consent",
485
491
  in: { analytics: true },
486
492
  settings: {},
487
- out: ["amplitude.setOptOut", false]
493
+ out: [["amplitude.setOptOut", false]]
488
494
  };
489
495
  export {
490
496
  env_exports as env,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$meta": {
3
3
  "package": "@walkeros/web-destination-amplitude",
4
- "version": "3.3.1",
4
+ "version": "3.4.0",
5
5
  "type": "destination",
6
6
  "platform": [
7
7
  "web"
@@ -225,8 +225,10 @@
225
225
  },
226
226
  "settings": {},
227
227
  "out": [
228
- "amplitude.setOptOut",
229
- false
228
+ [
229
+ "amplitude.setOptOut",
230
+ false
231
+ ]
230
232
  ]
231
233
  },
232
234
  "consentRevokeOptOut": {
@@ -236,8 +238,10 @@
236
238
  },
237
239
  "settings": {},
238
240
  "out": [
239
- "amplitude.setOptOut",
240
- true
241
+ [
242
+ "amplitude.setOptOut",
243
+ true
244
+ ]
241
245
  ]
242
246
  },
243
247
  "defaultEventForwarding": {
@@ -280,7 +284,7 @@
280
284
  "group": "gr0up",
281
285
  "count": 1,
282
286
  "version": {
283
- "source": "3.3.1",
287
+ "source": "3.4.0",
284
288
  "tagging": 1
285
289
  },
286
290
  "source": {
@@ -290,9 +294,11 @@
290
294
  }
291
295
  },
292
296
  "out": [
293
- "amplitude.track",
294
- "product view",
295
- {}
297
+ [
298
+ "amplitude.track",
299
+ "product view",
300
+ {}
301
+ ]
296
302
  ]
297
303
  },
298
304
  "destinationLevelIdentify": {
@@ -350,7 +356,7 @@
350
356
  "group": "gr0up",
351
357
  "count": 1,
352
358
  "version": {
353
- "source": "3.3.1",
359
+ "source": "3.4.0",
354
360
  "tagging": 1
355
361
  },
356
362
  "source": {
@@ -428,7 +434,7 @@
428
434
  "group": "gr0up",
429
435
  "count": 1,
430
436
  "version": {
431
- "source": "3.3.1",
437
+ "source": "3.4.0",
432
438
  "tagging": 1
433
439
  },
434
440
  "source": {
@@ -441,15 +447,17 @@
441
447
  "data"
442
448
  ],
443
449
  "out": [
444
- "amplitude.track",
445
- "product view",
446
- {
447
- "data_id": "ers",
448
- "data_name": "Everyday Ruck Snack",
449
- "data_color": "black",
450
- "data_size": "l",
451
- "data_price": 420
452
- }
450
+ [
451
+ "amplitude.track",
452
+ "product view",
453
+ {
454
+ "data_id": "ers",
455
+ "data_name": "Everyday Ruck Snack",
456
+ "data_color": "black",
457
+ "data_size": "l",
458
+ "data_price": 420
459
+ }
460
+ ]
453
461
  ]
454
462
  },
455
463
  "groupAssignmentWithProperties": {
@@ -505,7 +513,7 @@
505
513
  "group": "gr0up",
506
514
  "count": 1,
507
515
  "version": {
508
- "source": "3.3.1",
516
+ "source": "3.4.0",
509
517
  "tagging": 1
510
518
  },
511
519
  "source": {
@@ -655,7 +663,7 @@
655
663
  "group": "gr0up",
656
664
  "count": 1,
657
665
  "version": {
658
- "source": "3.3.1",
666
+ "source": "3.4.0",
659
667
  "tagging": 1
660
668
  },
661
669
  "source": {
@@ -819,7 +827,7 @@
819
827
  "group": "gr0up",
820
828
  "count": 1,
821
829
  "version": {
822
- "source": "3.3.1",
830
+ "source": "3.4.0",
823
831
  "tagging": 1
824
832
  },
825
833
  "source": {
@@ -837,11 +845,13 @@
837
845
  ]
838
846
  },
839
847
  "out": [
840
- "amplitude.track",
841
- "order complete",
842
- {
843
- "globals_pagegroup": "shop"
844
- }
848
+ [
849
+ "amplitude.track",
850
+ "order complete",
851
+ {
852
+ "globals_pagegroup": "shop"
853
+ }
854
+ ]
845
855
  ]
846
856
  },
847
857
  "subscriptionRenewRevenue": {
@@ -895,7 +905,7 @@
895
905
  "group": "gr0up",
896
906
  "count": 1,
897
907
  "version": {
898
- "source": "3.3.1",
908
+ "source": "3.4.0",
899
909
  "tagging": 1
900
910
  },
901
911
  "source": {
@@ -923,13 +933,15 @@
923
933
  }
924
934
  },
925
935
  "out": [
926
- "amplitude.revenue",
927
- {
928
- "productId": "plan-pro",
929
- "price": 9.99,
930
- "revenueType": "renewal",
931
- "currency": "EUR"
932
- }
936
+ [
937
+ "amplitude.revenue",
938
+ {
939
+ "productId": "plan-pro",
940
+ "price": 9.99,
941
+ "revenueType": "renewal",
942
+ "currency": "EUR"
943
+ }
944
+ ]
933
945
  ]
934
946
  },
935
947
  "userLoginIdentify": {
@@ -985,7 +997,7 @@
985
997
  "group": "gr0up",
986
998
  "count": 1,
987
999
  "version": {
988
- "source": "3.3.1",
1000
+ "source": "3.4.0",
989
1001
  "tagging": 1
990
1002
  },
991
1003
  "source": {
@@ -1103,7 +1115,7 @@
1103
1115
  "group": "gr0up",
1104
1116
  "count": 1,
1105
1117
  "version": {
1106
- "source": "3.3.1",
1118
+ "source": "3.4.0",
1107
1119
  "tagging": 1
1108
1120
  },
1109
1121
  "source": {
@@ -1119,7 +1131,9 @@
1119
1131
  }
1120
1132
  },
1121
1133
  "out": [
1122
- "amplitude.reset"
1134
+ [
1135
+ "amplitude.reset"
1136
+ ]
1123
1137
  ]
1124
1138
  },
1125
1139
  "wildcardIgnored": {
@@ -1179,7 +1193,7 @@
1179
1193
  "group": "gr0up",
1180
1194
  "count": 1,
1181
1195
  "version": {
1182
- "source": "3.3.1",
1196
+ "source": "3.4.0",
1183
1197
  "tagging": 1
1184
1198
  },
1185
1199
  "source": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/web-destination-amplitude",
3
3
  "description": "Amplitude web destination for walkerOS (analytics, session replay, experiments, guides & surveys)",
4
- "version": "3.3.1",
4
+ "version": "3.4.0",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -38,10 +38,10 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@amplitude/unified": "^1.0.16",
41
- "@walkeros/web-core": "3.3.1"
41
+ "@walkeros/web-core": "3.4.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@walkeros/collector": "3.3.1"
44
+ "@walkeros/collector": "3.4.0"
45
45
  },
46
46
  "repository": {
47
47
  "url": "git+https://github.com/elbwalker/walkerOS.git",