@walkeros/collector 0.5.0 → 0.5.1-next.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.
Files changed (119) hide show
  1. package/dist/dev.d.mts +4 -9
  2. package/dist/dev.d.ts +4 -9
  3. package/dist/dev.js +1 -1
  4. package/dist/dev.js.map +1 -1
  5. package/dist/dev.mjs +1 -1
  6. package/dist/dev.mjs.map +1 -1
  7. package/dist/index.d.mts +1 -0
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.js +1 -1
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +1 -1
  12. package/dist/index.mjs.map +1 -1
  13. package/package.json +2 -2
  14. package/dist/__tests__/auto-run.test.d.ts +0 -2
  15. package/dist/__tests__/auto-run.test.d.ts.map +0 -1
  16. package/dist/__tests__/auto-run.test.js +0 -102
  17. package/dist/__tests__/auto-run.test.js.map +0 -1
  18. package/dist/__tests__/consent.test.d.ts +0 -2
  19. package/dist/__tests__/consent.test.d.ts.map +0 -1
  20. package/dist/__tests__/consent.test.js +0 -21
  21. package/dist/__tests__/consent.test.js.map +0 -1
  22. package/dist/__tests__/create-flow.test.d.ts +0 -2
  23. package/dist/__tests__/create-flow.test.d.ts.map +0 -1
  24. package/dist/__tests__/create-flow.test.js +0 -69
  25. package/dist/__tests__/create-flow.test.js.map +0 -1
  26. package/dist/__tests__/destination-code.test.d.ts +0 -2
  27. package/dist/__tests__/destination-code.test.d.ts.map +0 -1
  28. package/dist/__tests__/destination-code.test.js +0 -323
  29. package/dist/__tests__/destination-code.test.js.map +0 -1
  30. package/dist/__tests__/destination.test.d.ts +0 -2
  31. package/dist/__tests__/destination.test.d.ts.map +0 -1
  32. package/dist/__tests__/destination.test.js +0 -320
  33. package/dist/__tests__/destination.test.js.map +0 -1
  34. package/dist/__tests__/handle.test.d.ts +0 -2
  35. package/dist/__tests__/handle.test.d.ts.map +0 -1
  36. package/dist/__tests__/handle.test.js +0 -78
  37. package/dist/__tests__/handle.test.js.map +0 -1
  38. package/dist/__tests__/mapping.test.d.ts +0 -2
  39. package/dist/__tests__/mapping.test.d.ts.map +0 -1
  40. package/dist/__tests__/mapping.test.js +0 -310
  41. package/dist/__tests__/mapping.test.js.map +0 -1
  42. package/dist/__tests__/source.test.d.ts +0 -2
  43. package/dist/__tests__/source.test.d.ts.map +0 -1
  44. package/dist/__tests__/source.test.js +0 -306
  45. package/dist/__tests__/source.test.js.map +0 -1
  46. package/dist/__tests__/start-flow.test.d.ts +0 -2
  47. package/dist/__tests__/start-flow.test.d.ts.map +0 -1
  48. package/dist/__tests__/start-flow.test.js +0 -167
  49. package/dist/__tests__/start-flow.test.js.map +0 -1
  50. package/dist/__tests__/walker-entity.test.d.ts +0 -2
  51. package/dist/__tests__/walker-entity.test.d.ts.map +0 -1
  52. package/dist/__tests__/walker-entity.test.js +0 -52
  53. package/dist/__tests__/walker-entity.test.js.map +0 -1
  54. package/dist/collector.d.ts +0 -3
  55. package/dist/collector.d.ts.map +0 -1
  56. package/dist/collector.js +0 -60
  57. package/dist/collector.js.map +0 -1
  58. package/dist/command.d.ts +0 -12
  59. package/dist/command.d.ts.map +0 -1
  60. package/dist/command.js +0 -20
  61. package/dist/command.js.map +0 -1
  62. package/dist/consent.d.ts +0 -10
  63. package/dist/consent.d.ts.map +0 -1
  64. package/dist/consent.js +0 -30
  65. package/dist/consent.js.map +0 -1
  66. package/dist/constants.d.ts +0 -13
  67. package/dist/constants.d.ts.map +0 -1
  68. package/dist/constants.js +0 -35
  69. package/dist/constants.js.map +0 -1
  70. package/dist/destination-code.d.ts +0 -4
  71. package/dist/destination-code.d.ts.map +0 -1
  72. package/dist/destination-code.js +0 -60
  73. package/dist/destination-code.js.map +0 -1
  74. package/dist/destination.d.ts +0 -61
  75. package/dist/destination.d.ts.map +0 -1
  76. package/dist/destination.js +0 -314
  77. package/dist/destination.js.map +0 -1
  78. package/dist/dev.d.ts.map +0 -1
  79. package/dist/elb.d.ts +0 -11
  80. package/dist/elb.d.ts.map +0 -1
  81. package/dist/elb.js +0 -60
  82. package/dist/elb.js.map +0 -1
  83. package/dist/flow.d.ts +0 -4
  84. package/dist/flow.d.ts.map +0 -1
  85. package/dist/flow.js +0 -44
  86. package/dist/flow.js.map +0 -1
  87. package/dist/handle.d.ts +0 -29
  88. package/dist/handle.d.ts.map +0 -1
  89. package/dist/handle.js +0 -161
  90. package/dist/handle.js.map +0 -1
  91. package/dist/index.d.ts.map +0 -1
  92. package/dist/on.d.ts +0 -19
  93. package/dist/on.d.ts.map +0 -1
  94. package/dist/on.js +0 -127
  95. package/dist/on.js.map +0 -1
  96. package/dist/push.d.ts +0 -11
  97. package/dist/push.d.ts.map +0 -1
  98. package/dist/push.js +0 -43
  99. package/dist/push.js.map +0 -1
  100. package/dist/schemas.d.ts +0 -4
  101. package/dist/schemas.d.ts.map +0 -1
  102. package/dist/schemas.js +0 -35
  103. package/dist/schemas.js.map +0 -1
  104. package/dist/source.d.ts +0 -10
  105. package/dist/source.d.ts.map +0 -1
  106. package/dist/source.js +0 -47
  107. package/dist/source.js.map +0 -1
  108. package/dist/types/code.d.ts +0 -22
  109. package/dist/types/code.d.ts.map +0 -1
  110. package/dist/types/code.js +0 -2
  111. package/dist/types/code.js.map +0 -1
  112. package/dist/types/collector.d.ts +0 -19
  113. package/dist/types/collector.d.ts.map +0 -1
  114. package/dist/types/collector.js +0 -2
  115. package/dist/types/collector.js.map +0 -1
  116. package/dist/types/index.d.ts +0 -3
  117. package/dist/types/index.d.ts.map +0 -1
  118. package/dist/types/index.js +0 -4
  119. package/dist/types/index.js.map +0 -1
package/dist/command.js DELETED
@@ -1,20 +0,0 @@
1
- import { useHooks, tryCatchAsync } from '@walkeros/core';
2
- import { createPushResult } from './destination';
3
- /**
4
- * Creates the command function for the collector.
5
- * Handles walker commands (config, consent, destination, etc.)
6
- *
7
- * @param collector - The walkerOS collector instance
8
- * @param handleCommand - Command handler function
9
- * @returns The command function
10
- */
11
- export function createCommand(collector, handleCommand) {
12
- return useHooks(async (command, data, options) => {
13
- return await tryCatchAsync(async () => {
14
- return await handleCommand(collector, command, data, options);
15
- }, () => {
16
- return createPushResult({ ok: false });
17
- })();
18
- }, 'Command', collector.hooks);
19
- }
20
- //# sourceMappingURL=command.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAC3B,SAAY,EACZ,aAAiC;IAEjC,OAAO,QAAQ,CACb,KAAK,EACH,OAAe,EACf,IAAc,EACd,OAAiB,EACQ,EAAE;QAC3B,OAAO,MAAM,aAAa,CACxB,KAAK,IAA6B,EAAE;YAClC,OAAO,MAAM,aAAa,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAChE,CAAC,EACD,GAAG,EAAE;YACH,OAAO,gBAAgB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QACzC,CAAC,CACF,EAAE,CAAC;IACN,CAAC,EACD,SAAS,EACT,SAAS,CAAC,KAAK,CACO,CAAC;AAC3B,CAAC"}
package/dist/consent.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import type { Collector, WalkerOS, Elb } from '@walkeros/core';
2
- /**
3
- * Sets the consent state and processes the queue.
4
- *
5
- * @param collector - The walkerOS collector instance.
6
- * @param data - The consent data to set.
7
- * @returns The result of the push operation.
8
- */
9
- export declare function setConsent(collector: Collector.Instance, data: WalkerOS.Consent): Promise<Elb.PushResult>;
10
- //# sourceMappingURL=consent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"consent.d.ts","sourceRoot":"","sources":["../src/consent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAK/D;;;;;;GAMG;AACH,wBAAsB,UAAU,CAC9B,SAAS,EAAE,SAAS,CAAC,QAAQ,EAC7B,IAAI,EAAE,QAAQ,CAAC,OAAO,GACrB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAwBzB"}
package/dist/consent.js DELETED
@@ -1,30 +0,0 @@
1
- import { assign } from '@walkeros/core';
2
- import { pushToDestinations, createPushResult } from './destination';
3
- import { onApply } from './on';
4
- /**
5
- * Sets the consent state and processes the queue.
6
- *
7
- * @param collector - The walkerOS collector instance.
8
- * @param data - The consent data to set.
9
- * @returns The result of the push operation.
10
- */
11
- export async function setConsent(collector, data) {
12
- const { consent } = collector;
13
- let runQueue = false;
14
- const update = {};
15
- Object.entries(data).forEach(([name, granted]) => {
16
- const state = !!granted;
17
- update[name] = state;
18
- // Only run queue if state was set to true
19
- runQueue = runQueue || state;
20
- });
21
- // Update consent state
22
- collector.consent = assign(consent, update);
23
- // Run on consent events
24
- onApply(collector, 'consent', undefined, update);
25
- // Process previous events if not disabled
26
- return runQueue
27
- ? pushToDestinations(collector)
28
- : createPushResult({ ok: true });
29
- }
30
- //# sourceMappingURL=consent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"consent.js","sourceRoot":"","sources":["../src/consent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,SAA6B,EAC7B,IAAsB;IAEtB,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;IAE9B,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,MAAM,MAAM,GAAqB,EAAE,CAAC;IACpC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE;QAC/C,MAAM,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC;QAExB,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QAErB,0CAA0C;QAC1C,QAAQ,GAAG,QAAQ,IAAI,KAAK,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,uBAAuB;IACvB,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAE5C,wBAAwB;IACxB,OAAO,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAEjD,0CAA0C;IAC1C,OAAO,QAAQ;QACb,CAAC,CAAC,kBAAkB,CAAC,SAAS,CAAC;QAC/B,CAAC,CAAC,gBAAgB,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;AACrC,CAAC"}
@@ -1,13 +0,0 @@
1
- import type { Collector } from '@walkeros/core';
2
- import type { CommandTypes, StorageType } from './types/collector';
3
- export declare const Commands: Record<CommandTypes, Collector.CommandType>;
4
- export declare const Const: {
5
- Commands: Record<CommandTypes, string>;
6
- Utils: {
7
- Storage: {
8
- [key: string]: StorageType;
9
- };
10
- };
11
- };
12
- export default Const;
13
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEnE,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,WAAW,CAoBvD,CAAC;AAYX,eAAO,MAAM,KAAK;;;;;;;CAGjB,CAAC;AAEF,eAAe,KAAK,CAAC"}
package/dist/constants.js DELETED
@@ -1,35 +0,0 @@
1
- export const Commands = {
2
- Action: 'action',
3
- Actions: 'actions',
4
- Config: 'config',
5
- Consent: 'consent',
6
- Context: 'context',
7
- Custom: 'custom',
8
- Destination: 'destination',
9
- Elb: 'elb',
10
- Globals: 'globals',
11
- Hook: 'hook',
12
- Init: 'init',
13
- Link: 'link',
14
- On: 'on',
15
- Prefix: 'data-elb',
16
- Ready: 'ready',
17
- Run: 'run',
18
- Session: 'session',
19
- User: 'user',
20
- Walker: 'walker',
21
- };
22
- const UtilsStorage = {
23
- Cookie: 'cookie',
24
- Local: 'local',
25
- Session: 'session',
26
- };
27
- const Utils = {
28
- Storage: UtilsStorage,
29
- };
30
- export const Const = {
31
- Commands,
32
- Utils,
33
- };
34
- export default Const;
35
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,QAAQ,GAAgD;IACnE,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,aAAa;IAC1B,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;CACR,CAAC;AAEX,MAAM,YAAY,GAAmC;IACnD,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;CACV,CAAC;AAEX,MAAM,KAAK,GAAG;IACZ,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,QAAQ;IACR,KAAK;CACN,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { Destination } from '@walkeros/core';
2
- export declare const destinationCode: Destination.Instance;
3
- export default destinationCode;
4
- //# sourceMappingURL=destination-code.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"destination-code.d.ts","sourceRoot":"","sources":["../src/destination-code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,QAuDzC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,60 +0,0 @@
1
- export const destinationCode = {
2
- type: 'code',
3
- config: {},
4
- init(context) {
5
- const { config, logger } = context;
6
- const initCode = config.settings?.init;
7
- if (!initCode)
8
- return;
9
- try {
10
- const fn = new Function('context', initCode);
11
- fn(context);
12
- }
13
- catch (e) {
14
- logger.error('Code destination init error:', e);
15
- }
16
- },
17
- push(event, context) {
18
- const { mapping, config, logger } = context;
19
- const pushCode = mapping?.push ??
20
- config.settings?.push;
21
- if (!pushCode)
22
- return;
23
- try {
24
- const fn = new Function('event', 'context', pushCode);
25
- fn(event, context);
26
- }
27
- catch (e) {
28
- logger.error('Code destination push error:', e);
29
- }
30
- },
31
- pushBatch(batch, context) {
32
- const { mapping, config, logger } = context;
33
- const pushBatchCode = mapping?.pushBatch ??
34
- config.settings?.pushBatch;
35
- if (!pushBatchCode)
36
- return;
37
- try {
38
- const fn = new Function('batch', 'context', pushBatchCode);
39
- fn(batch, context);
40
- }
41
- catch (e) {
42
- logger.error('Code destination pushBatch error:', e);
43
- }
44
- },
45
- on(type, context) {
46
- const { config, logger } = context;
47
- const onCode = config.settings?.on;
48
- if (!onCode)
49
- return;
50
- try {
51
- const fn = new Function('type', 'context', onCode);
52
- fn(type, context);
53
- }
54
- catch (e) {
55
- logger.error('Code destination on error:', e);
56
- }
57
- },
58
- };
59
- export default destinationCode;
60
- //# sourceMappingURL=destination-code.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"destination-code.js","sourceRoot":"","sources":["../src/destination-code.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,EAAE;IAEV,IAAI,CAAC,OAAO;QACV,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QACnC,MAAM,QAAQ,GAAI,MAAM,CAAC,QAAiC,EAAE,IAAI,CAAC;QACjE,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;YAC7C,EAAE,CAAC,OAAO,CAAC,CAAC;QACd,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,KAAK,CAAC,8BAA8B,EAAE,CAAC,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;IAED,IAAI,CAAC,KAAK,EAAE,OAAO;QACjB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAC5C,MAAM,QAAQ,GACX,OAAmC,EAAE,IAAI;YACzC,MAAM,CAAC,QAAiC,EAAE,IAAI,CAAC;QAClD,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;YACtD,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACrB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,KAAK,CAAC,8BAA8B,EAAE,CAAC,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;IAED,SAAS,CAAC,KAAK,EAAE,OAAO;QACtB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAC5C,MAAM,aAAa,GAChB,OAAmC,EAAE,SAAS;YAC9C,MAAM,CAAC,QAAiC,EAAE,SAAS,CAAC;QACvD,IAAI,CAAC,aAAa;YAAE,OAAO;QAC3B,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;YAC3D,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACrB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,KAAK,CAAC,mCAAmC,EAAE,CAAC,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;IAED,EAAE,CAAC,IAAI,EAAE,OAAO;QACd,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QACnC,MAAM,MAAM,GAAI,MAAM,CAAC,QAAiC,EAAE,EAAE,CAAC;QAC7D,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;YACnD,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACpB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;CACF,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,61 +0,0 @@
1
- import type { Collector, WalkerOS, Elb, Destination } from '@walkeros/core';
2
- /**
3
- * Adds a new destination to the collector.
4
- *
5
- * @param collector - The walkerOS collector instance.
6
- * @param data - The destination's init data.
7
- * @param options - The destination's config.
8
- * @returns The result of the push operation.
9
- */
10
- export declare function addDestination(collector: Collector.Instance, data: Destination.Init, options?: Destination.Config): Promise<Elb.PushResult>;
11
- /**
12
- * Pushes an event to all or a subset of destinations.
13
- *
14
- * @param collector - The walkerOS collector instance.
15
- * @param event - The event to push.
16
- * @param destinations - The destinations to push to.
17
- * @returns The result of the push operation.
18
- */
19
- export declare function pushToDestinations(collector: Collector.Instance, event?: WalkerOS.Event, destinations?: Collector.Destinations): Promise<Elb.PushResult>;
20
- /**
21
- * Initializes a destination.
22
- *
23
- * @template Destination
24
- * @param collector - The walkerOS collector instance.
25
- * @param destination - The destination to initialize.
26
- * @returns Whether the destination was initialized successfully.
27
- */
28
- export declare function destinationInit<Destination extends Destination.Instance>(collector: Collector.Instance, destination: Destination): Promise<boolean>;
29
- /**
30
- * Pushes an event to a single destination.
31
- * Handles mapping, batching, and consent checks.
32
- *
33
- * @template Destination
34
- * @param collector - The walkerOS collector instance.
35
- * @param destination - The destination to push to.
36
- * @param event - The event to push.
37
- * @returns Whether the event was pushed successfully.
38
- */
39
- export declare function destinationPush<Destination extends Destination.Instance>(collector: Collector.Instance, destination: Destination, event: WalkerOS.Event): Promise<boolean>;
40
- /**
41
- * Creates a standardized result object for push operations.
42
- *
43
- * @param partialResult - A partial result to merge with the default result.
44
- * @returns The push result.
45
- */
46
- export declare function createPushResult(partialResult?: Partial<Elb.PushResult>): Elb.PushResult;
47
- /**
48
- * Initializes a map of destinations using ONLY the unified code/config/env pattern.
49
- * Does NOT call destination.init() - that happens later during push with proper consent checks.
50
- *
51
- * @param destinations - The destinations to initialize.
52
- * @param collector - The collector instance for destination init context.
53
- * @returns The initialized destinations.
54
- */
55
- export declare function initDestinations(_collector: Collector.Instance, destinations?: Destination.InitDestinations): Promise<Collector.Destinations>;
56
- /**
57
- * Merges destination environment with config environment
58
- * Config env takes precedence over destination env for overrides
59
- */
60
- export declare function mergeEnvironments(destinationEnv?: Destination.Env, configEnv?: Destination.Env): Destination.Env;
61
- //# sourceMappingURL=destination.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"destination.d.ts","s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CAAC,CAsBjC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,cAAc,CAAC,EAAE,WAAW,CAAC,GAAG,EAChC,SAAS,CAAC,EAAE,WAAW,CAAC,GAAG,GAC1B,WAAW,CAAC,GAAG,CAejB"}
@@ -1,314 +0,0 @@
1
- import { assign, clone, debounce, getId, getGrantedConsent, isDefined, isObject, processEventMapping, tryCatchAsync, useHooks, } from '@walkeros/core';
2
- import { destinationCode } from './destination-code';
3
- function resolveCode(code) {
4
- return code === true ? destinationCode : code;
5
- }
6
- /**
7
- * Adds a new destination to the collector.
8
- *
9
- * @param collector - The walkerOS collector instance.
10
- * @param data - The destination's init data.
11
- * @param options - The destination's config.
12
- * @returns The result of the push operation.
13
- */
14
- export async function addDestination(collector, data, options) {
15
- const { code, config: dataConfig = {}, env = {} } = data;
16
- const config = options || dataConfig || { init: false };
17
- const resolved = resolveCode(code);
18
- const destination = {
19
- ...resolved,
20
- config,
21
- env: mergeEnvironments(resolved.env, env),
22
- };
23
- let id = destination.config.id; // Use given id
24
- if (!id) {
25
- // Generate a new id if none was given
26
- do {
27
- id = getId(4);
28
- } while (collector.destinations[id]);
29
- }
30
- // Add the destination
31
- collector.destinations[id] = destination;
32
- // Process previous events if not disabled
33
- if (destination.config.queue !== false)
34
- destination.queue = [...collector.queue];
35
- return pushToDestinations(collector, undefined, { [id]: destination });
36
- }
37
- /**
38
- * Pushes an event to all or a subset of destinations.
39
- *
40
- * @param collector - The walkerOS collector instance.
41
- * @param event - The event to push.
42
- * @param destinations - The destinations to push to.
43
- * @returns The result of the push operation.
44
- */
45
- export async function pushToDestinations(collector, event, destinations) {
46
- const { allowed, consent, globals, user } = collector;
47
- // Check if collector is allowed to push
48
- if (!allowed)
49
- return createPushResult({ ok: false });
50
- // Add event to the collector queue
51
- if (event)
52
- collector.queue.push(event);
53
- // Use given destinations or use internal destinations
54
- if (!destinations)
55
- destinations = collector.destinations;
56
- const results = await Promise.all(
57
- // Process all destinations in parallel
58
- Object.entries(destinations || {}).map(async ([id, destination]) => {
59
- // Create a queue of events to be processed
60
- let currentQueue = (destination.queue || []).map((event) => ({
61
- ...event,
62
- consent,
63
- }));
64
- // Reset original queue while processing to enable async processing
65
- destination.queue = [];
66
- // Add event to queue stack
67
- if (event) {
68
- // Clone the event to avoid mutating the original event
69
- const currentEvent = clone(event);
70
- // Note: Policy is now applied in processEventMapping() within destinationPush()
71
- // Add event to queue stack
72
- currentQueue.push(currentEvent);
73
- }
74
- // Nothing to do here if the queue is empty
75
- if (!currentQueue.length)
76
- return { id, destination, skipped: true };
77
- const allowedEvents = [];
78
- const skippedEvents = currentQueue.filter((queuedEvent) => {
79
- const grantedConsent = getGrantedConsent(destination.config.consent, // Required
80
- consent, // Current collector state
81
- queuedEvent.consent);
82
- if (grantedConsent) {
83
- queuedEvent.consent = grantedConsent; // Save granted consent states only
84
- allowedEvents.push(queuedEvent); // Add to allowed queue
85
- return false; // Remove from destination queue
86
- }
87
- return true; // Keep denied events in the queue
88
- });
89
- // Add skipped events back to the queue
90
- destination.queue.concat(skippedEvents);
91
- // Execution shall not pass if no events are allowed
92
- if (!allowedEvents.length) {
93
- return { id, destination, queue: currentQueue }; // Don't push if not allowed
94
- }
95
- // Initialize the destination if needed
96
- const isInitialized = await tryCatchAsync(destinationInit)(collector, destination);
97
- if (!isInitialized)
98
- return { id, destination, queue: currentQueue };
99
- // Process the destinations event queue
100
- let error = false;
101
- if (!destination.dlq)
102
- destination.dlq = [];
103
- // Process allowed events and store failed ones in the dead letter queue (DLQ)
104
- await Promise.all(allowedEvents.map(async (event) => {
105
- // Merge event with collector state, prioritizing event properties
106
- event.globals = assign(globals, event.globals);
107
- event.user = assign(user, event.user);
108
- await tryCatchAsync(destinationPush, (err) => {
109
- // Log the error with destination scope
110
- const destType = destination.type || 'unknown';
111
- collector.logger.scope(destType).error('Push failed', {
112
- error: err,
113
- event: event.name,
114
- });
115
- error = true; // oh no
116
- // Add failed event to destinations DLQ
117
- destination.dlq.push([event, err]);
118
- return false;
119
- })(collector, destination, event);
120
- return event;
121
- }));
122
- return { id, destination, error };
123
- }));
124
- const successful = [];
125
- const queued = [];
126
- const failed = [];
127
- for (const result of results) {
128
- if (result.skipped)
129
- continue;
130
- const destination = result.destination;
131
- const ref = { id: result.id, destination };
132
- if (result.error) {
133
- failed.push(ref);
134
- }
135
- else if (result.queue && result.queue.length) {
136
- // Merge queue with existing queue
137
- destination.queue = (destination.queue || []).concat(result.queue);
138
- queued.push(ref);
139
- }
140
- else {
141
- successful.push(ref);
142
- }
143
- }
144
- return createPushResult({
145
- ok: !failed.length,
146
- event,
147
- successful,
148
- queued,
149
- failed,
150
- });
151
- }
152
- /**
153
- * Initializes a destination.
154
- *
155
- * @template Destination
156
- * @param collector - The walkerOS collector instance.
157
- * @param destination - The destination to initialize.
158
- * @returns Whether the destination was initialized successfully.
159
- */
160
- export async function destinationInit(collector, destination) {
161
- // Check if the destination was initialized properly or try to do so
162
- if (destination.init && !destination.config.init) {
163
- // Create scoped logger for this destination: [type:id] or [unknown:id]
164
- const destType = destination.type || 'unknown';
165
- const destLogger = collector.logger.scope(destType);
166
- const context = {
167
- collector,
168
- config: destination.config,
169
- env: mergeEnvironments(destination.env, destination.config.env),
170
- logger: destLogger,
171
- };
172
- destLogger.debug('init');
173
- const configResult = await useHooks(destination.init, 'DestinationInit', collector.hooks)(context);
174
- // Actively check for errors (when false)
175
- if (configResult === false)
176
- return configResult; // don't push if init is false
177
- // Update the destination config if it was returned
178
- destination.config = {
179
- ...(configResult || destination.config),
180
- init: true, // Remember that the destination was initialized
181
- };
182
- destLogger.debug('init done');
183
- }
184
- return true; // Destination is ready to push
185
- }
186
- /**
187
- * Pushes an event to a single destination.
188
- * Handles mapping, batching, and consent checks.
189
- *
190
- * @template Destination
191
- * @param collector - The walkerOS collector instance.
192
- * @param destination - The destination to push to.
193
- * @param event - The event to push.
194
- * @returns Whether the event was pushed successfully.
195
- */
196
- export async function destinationPush(collector, destination, event) {
197
- const { config } = destination;
198
- const processed = await processEventMapping(event, config, collector);
199
- if (processed.ignore)
200
- return false;
201
- // Create scoped logger for this destination: [type] or [unknown]
202
- const destType = destination.type || 'unknown';
203
- const destLogger = collector.logger.scope(destType);
204
- const context = {
205
- collector,
206
- config,
207
- data: processed.data,
208
- mapping: processed.mapping,
209
- env: mergeEnvironments(destination.env, config.env),
210
- logger: destLogger,
211
- };
212
- const eventMapping = processed.mapping;
213
- if (eventMapping?.batch && destination.pushBatch) {
214
- const batched = eventMapping.batched || {
215
- key: processed.mappingKey || '',
216
- events: [],
217
- data: [],
218
- };
219
- batched.events.push(processed.event);
220
- if (isDefined(processed.data))
221
- batched.data.push(processed.data);
222
- eventMapping.batchFn =
223
- eventMapping.batchFn ||
224
- debounce((destination, collector) => {
225
- const batchDestType = destination.type || 'unknown';
226
- const batchLogger = collector.logger.scope(batchDestType);
227
- const batchContext = {
228
- collector,
229
- config,
230
- data: processed.data,
231
- mapping: eventMapping,
232
- env: mergeEnvironments(destination.env, config.env),
233
- logger: batchLogger,
234
- };
235
- batchLogger.debug('push batch', {
236
- events: batched.events.length,
237
- });
238
- useHooks(destination.pushBatch, 'DestinationPushBatch', collector.hooks)(batched, batchContext);
239
- batchLogger.debug('push batch done');
240
- batched.events = [];
241
- batched.data = [];
242
- }, eventMapping.batch);
243
- eventMapping.batched = batched;
244
- eventMapping.batchFn?.(destination, collector);
245
- }
246
- else {
247
- destLogger.debug('push', { event: processed.event.name });
248
- // It's time to go to the destination's side now
249
- await useHooks(destination.push, 'DestinationPush', collector.hooks)(processed.event, context);
250
- destLogger.debug('push done');
251
- }
252
- return true;
253
- }
254
- /**
255
- * Creates a standardized result object for push operations.
256
- *
257
- * @param partialResult - A partial result to merge with the default result.
258
- * @returns The push result.
259
- */
260
- export function createPushResult(partialResult) {
261
- return assign({
262
- ok: !partialResult?.failed?.length,
263
- successful: [],
264
- queued: [],
265
- failed: [],
266
- }, partialResult);
267
- }
268
- /**
269
- * Initializes a map of destinations using ONLY the unified code/config/env pattern.
270
- * Does NOT call destination.init() - that happens later during push with proper consent checks.
271
- *
272
- * @param destinations - The destinations to initialize.
273
- * @param collector - The collector instance for destination init context.
274
- * @returns The initialized destinations.
275
- */
276
- export async function initDestinations(_collector, destinations = {}) {
277
- const result = {};
278
- for (const [name, destinationDef] of Object.entries(destinations)) {
279
- const { code, config = {}, env = {} } = destinationDef;
280
- const resolved = resolveCode(code);
281
- const mergedConfig = {
282
- ...resolved.config,
283
- ...config,
284
- };
285
- const mergedEnv = mergeEnvironments(resolved.env, env);
286
- result[name] = {
287
- ...resolved,
288
- config: mergedConfig,
289
- env: mergedEnv,
290
- };
291
- }
292
- return result;
293
- }
294
- /**
295
- * Merges destination environment with config environment
296
- * Config env takes precedence over destination env for overrides
297
- */
298
- export function mergeEnvironments(destinationEnv, configEnv) {
299
- // If neither environment exists, return empty object
300
- if (!destinationEnv && !configEnv)
301
- return {};
302
- // If only one exists, return it
303
- if (!configEnv)
304
- return destinationEnv;
305
- if (!destinationEnv)
306
- return configEnv;
307
- // Both exist - merge objects with configEnv taking precedence
308
- if (isObject(destinationEnv) && isObject(configEnv)) {
309
- return { ...destinationEnv, ...configEnv };
310
- }
311
- // If they're not both objects, config env overrides destination env
312
- return configEnv;
313
- }
314
- //# sourceMappingURL=destination.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"destination.js","sourceRoot":"","sources":["../src/destination.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,KAAK,EACL,QAAQ,EACR,KAAK,EACL,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACR,mBAAmB,EACnB,aAAa,EACb,QAAQ,GACT,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,SAAS,WAAW,CAAC,IAAiC;IACpD,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC;AAChD,CAAC;AAED;;;;;;;GAOG;AACH,M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U,iBAAiB,CAC/B,cAAgC,EAChC,SAA2B;IAE3B,qDAAqD;IACrD,IAAI,CAAC,cAAc,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAE7C,gCAAgC;IAChC,IAAI,CAAC,SAAS;QAAE,OAAO,cAAe,CAAC;IACvC,IAAI,CAAC,cAAc;QAAE,OAAO,SAAS,CAAC;IAEtC,8DAA8D;IAC9D,IAAI,QAAQ,CAAC,cAAc,CAAC,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QACpD,OAAO,EAAE,GAAG,cAAc,EAAE,GAAG,SAAS,EAAE,CAAC;IAC7C,CAAC;IAED,oEAAoE;IACpE,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/dist/dev.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../src/dev.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC"}
package/dist/elb.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import type { Collector, Source } from '@walkeros/core';
2
- /**
3
- * Creates the default ELB source.
4
- * Routes between collector.push and collector.command based on input.
5
- * Provides backward-compatible flexible argument interface.
6
- *
7
- * @param collector - The walkerOS collector instance
8
- * @returns ELB source instance
9
- */
10
- export declare function createElbSource(collector: Collector.Instance): Source.Instance;
11
- //# sourceMappingURL=elb.d.ts.map
package/dist/elb.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"elb.d.ts","sourceRoot":"","sources":["../src/elb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAiB,MAAM,gBAAgB,CAAC;AAEvE;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,SAAS,CAAC,QAAQ,GAC5B,MAAM,CAAC,QAAQ,CA8DjB"}