@walkeros/collector 0.4.1 → 0.4.2

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 (105) hide show
  1. package/dist/dev.d.mts +8 -4
  2. package/dist/dev.d.ts +8 -4
  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.js +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +1 -1
  10. package/dist/index.mjs.map +1 -1
  11. package/package.json +2 -2
  12. package/dist/__tests__/auto-run.test.d.ts +0 -2
  13. package/dist/__tests__/auto-run.test.d.ts.map +0 -1
  14. package/dist/__tests__/auto-run.test.js +0 -105
  15. package/dist/__tests__/auto-run.test.js.map +0 -1
  16. package/dist/__tests__/consent.test.d.ts +0 -2
  17. package/dist/__tests__/consent.test.d.ts.map +0 -1
  18. package/dist/__tests__/consent.test.js +0 -21
  19. package/dist/__tests__/consent.test.js.map +0 -1
  20. package/dist/__tests__/create-flow.test.d.ts +0 -2
  21. package/dist/__tests__/create-flow.test.d.ts.map +0 -1
  22. package/dist/__tests__/create-flow.test.js +0 -69
  23. package/dist/__tests__/create-flow.test.js.map +0 -1
  24. package/dist/__tests__/destination.test.d.ts +0 -2
  25. package/dist/__tests__/destination.test.d.ts.map +0 -1
  26. package/dist/__tests__/destination.test.js +0 -242
  27. package/dist/__tests__/destination.test.js.map +0 -1
  28. package/dist/__tests__/handle.test.d.ts +0 -2
  29. package/dist/__tests__/handle.test.d.ts.map +0 -1
  30. package/dist/__tests__/handle.test.js +0 -78
  31. package/dist/__tests__/handle.test.js.map +0 -1
  32. package/dist/__tests__/mapping.test.d.ts +0 -2
  33. package/dist/__tests__/mapping.test.d.ts.map +0 -1
  34. package/dist/__tests__/mapping.test.js +0 -310
  35. package/dist/__tests__/mapping.test.js.map +0 -1
  36. package/dist/__tests__/source.test.d.ts +0 -2
  37. package/dist/__tests__/source.test.d.ts.map +0 -1
  38. package/dist/__tests__/source.test.js +0 -306
  39. package/dist/__tests__/source.test.js.map +0 -1
  40. package/dist/__tests__/start-flow.test.d.ts +0 -2
  41. package/dist/__tests__/start-flow.test.d.ts.map +0 -1
  42. package/dist/__tests__/start-flow.test.js +0 -167
  43. package/dist/__tests__/start-flow.test.js.map +0 -1
  44. package/dist/__tests__/walker-entity.test.d.ts +0 -2
  45. package/dist/__tests__/walker-entity.test.d.ts.map +0 -1
  46. package/dist/__tests__/walker-entity.test.js +0 -52
  47. package/dist/__tests__/walker-entity.test.js.map +0 -1
  48. package/dist/collector.d.ts +0 -3
  49. package/dist/collector.d.ts.map +0 -1
  50. package/dist/collector.js +0 -59
  51. package/dist/collector.js.map +0 -1
  52. package/dist/command.d.ts +0 -12
  53. package/dist/command.d.ts.map +0 -1
  54. package/dist/command.js +0 -20
  55. package/dist/command.js.map +0 -1
  56. package/dist/consent.d.ts +0 -10
  57. package/dist/consent.d.ts.map +0 -1
  58. package/dist/consent.js +0 -30
  59. package/dist/consent.js.map +0 -1
  60. package/dist/constants.d.ts +0 -13
  61. package/dist/constants.d.ts.map +0 -1
  62. package/dist/constants.js +0 -35
  63. package/dist/constants.js.map +0 -1
  64. package/dist/destination.d.ts +0 -56
  65. package/dist/destination.d.ts.map +0 -1
  66. package/dist/destination.js +0 -289
  67. package/dist/destination.js.map +0 -1
  68. package/dist/dev.d.ts.map +0 -1
  69. package/dist/elb.d.ts +0 -11
  70. package/dist/elb.d.ts.map +0 -1
  71. package/dist/elb.js +0 -60
  72. package/dist/elb.js.map +0 -1
  73. package/dist/flow.d.ts +0 -4
  74. package/dist/flow.d.ts.map +0 -1
  75. package/dist/flow.js +0 -44
  76. package/dist/flow.js.map +0 -1
  77. package/dist/handle.d.ts +0 -29
  78. package/dist/handle.d.ts.map +0 -1
  79. package/dist/handle.js +0 -161
  80. package/dist/handle.js.map +0 -1
  81. package/dist/index.d.ts.map +0 -1
  82. package/dist/on.d.ts +0 -19
  83. package/dist/on.d.ts.map +0 -1
  84. package/dist/on.js +0 -116
  85. package/dist/on.js.map +0 -1
  86. package/dist/push.d.ts +0 -11
  87. package/dist/push.d.ts.map +0 -1
  88. package/dist/push.js +0 -43
  89. package/dist/push.js.map +0 -1
  90. package/dist/schemas.d.ts +0 -6
  91. package/dist/schemas.d.ts.map +0 -1
  92. package/dist/schemas.js +0 -37
  93. package/dist/schemas.js.map +0 -1
  94. package/dist/source.d.ts +0 -10
  95. package/dist/source.d.ts.map +0 -1
  96. package/dist/source.js +0 -40
  97. package/dist/source.js.map +0 -1
  98. package/dist/types/collector.d.ts +0 -19
  99. package/dist/types/collector.d.ts.map +0 -1
  100. package/dist/types/collector.js +0 -2
  101. package/dist/types/collector.js.map +0 -1
  102. package/dist/types/index.d.ts +0 -2
  103. package/dist/types/index.d.ts.map +0 -1
  104. package/dist/types/index.js +0 -2
  105. package/dist/types/index.js.map +0 -1
package/dist/collector.js DELETED
@@ -1,59 +0,0 @@
1
- import { assign, onLog } from '@walkeros/core';
2
- import { commonHandleCommand } from './handle';
3
- import { initDestinations } from './destination';
4
- import { createPush } from './push';
5
- import { createCommand } from './command';
6
- export async function collector(initConfig) {
7
- const version = __VERSION__;
8
- const defaultConfig = {
9
- globalsStatic: {},
10
- sessionStatic: {},
11
- tagging: 0,
12
- verbose: false,
13
- onLog: log,
14
- run: true,
15
- };
16
- const config = assign(defaultConfig, initConfig, {
17
- merge: false,
18
- extend: false,
19
- });
20
- function log(message, verbose) {
21
- onLog({ message }, verbose || config.verbose);
22
- }
23
- config.onLog = log;
24
- // Enhanced globals with static globals from config
25
- const finalGlobals = { ...config.globalsStatic, ...initConfig.globals };
26
- const collector = {
27
- allowed: false,
28
- config,
29
- consent: initConfig.consent || {},
30
- count: 0,
31
- custom: initConfig.custom || {},
32
- destinations: {},
33
- globals: finalGlobals,
34
- group: '',
35
- hooks: {},
36
- on: {},
37
- queue: [],
38
- round: 0,
39
- session: undefined,
40
- timing: Date.now(),
41
- user: initConfig.user || {},
42
- version,
43
- sources: {},
44
- push: undefined, // Placeholder, will be set below
45
- command: undefined, // Placeholder, will be set below
46
- };
47
- // Set the push and command functions with the collector reference
48
- collector.push = createPush(collector, (event) => ({
49
- timing: Math.round((Date.now() - collector.timing) / 10) / 100,
50
- source: { type: 'collector', id: '', previous_id: '' },
51
- ...event,
52
- }));
53
- collector.command = createCommand(collector, commonHandleCommand);
54
- // Initialize destinations after collector is fully created
55
- // Sources are initialized in startFlow after ELB source is created
56
- collector.destinations = await initDestinations(collector, initConfig.destinations || {});
57
- return collector;
58
- }
59
- //# sourceMappingURL=collector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collector.js","sourceRoot":"","sources":["../src/collector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAK1C,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,UAAgC;IAEhC,MAAM,OAAO,GAAG,WAAW,CAAC;IAE5B,MAAM,aAAa,GAAqB;QACtC,aAAa,EAAE,EAAE;QACjB,aAAa,EAAE,EAAE;QACjB,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,GAAG;QACV,GAAG,EAAE,IAAI;KACV,CAAC;IAEF,MAAM,MAAM,GAAqB,MAAM,CAAC,aAAa,EAAE,UAAU,EAAE;QACjE,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,KAAK;KACd,CAAC,CAAC;IAEH,SAAS,GAAG,CAAC,OAAe,EAAE,OAAiB;QAC7C,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,OAAO,IAAI,MA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E,2DAA2D;IAC3D,mEAAmE;IACnE,SAAS,CAAC,YAAY,GAAG,MAAM,gBAAgB,CAC7C,SAAS,EACT,UAAU,CAAC,YAAY,IAAI,EAAE,CAC9B,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/dist/command.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import type { Collector } from '@walkeros/core';
2
- import type { HandleCommandFn } from './types/collector';
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 declare function createCommand<T extends Collector.Instance>(collector: T, handleCommand: HandleCommandFn<T>): Collector.CommandFn;
12
- //# sourceMappingURL=command.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAO,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIzD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,SAAS,CAAC,QAAQ,EACxD,SAAS,EAAE,CAAC,EACZ,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC,GAChC,SAAS,CAAC,SAAS,CAmBrB"}
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,56 +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
- //# sourceMappingURL=destination.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"destination.d.ts","sourceRoot":"","sources":["../src/destination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAc5E;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,SAAS,EAAE,SAAS,CAAC,QAAQ,EAC7B,IAAI,EAAE,WAAW,CAAC,IAAI,EACtB,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,GAC3B,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CA0BzB;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,SAAS,CAAC,QAAQ,EAC7B,KAAK,CAAC,EAAE,QAAQ,CAAC,KAAK,EACtB,YAAY,CAAC,EAAE,SAAS,CAAC,YAAY,GACpC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAoIzB;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,WAAW,SAAS,WAAW,CAAC,QAAQ,EAC5E,SAAS,EAAE,SAAS,CAAC,QAAQ,EAC7B,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC,OAAO,CAAC,CA0BlB;AAED;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,WAAW,SAAS,WAAW,CAAC,QAAQ,EAC5E,SAAS,EAAE,SAAS,CAAC,QAAQ,EAC7B,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,QAAQ,CAAC,KAAK,GACpB,OAAO,CAAC,OAAO,CAAC,CA0DlB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,aAAa,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,GACtC,GAAG,CAAC,UAAU,CAUhB;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,SAAS,CAAC,QAAQ,EAC9B,YAAY,GAAE,WAAW,CAAC,gBAAqB,GAC9C,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,CAwBjC"}
@@ -1,289 +0,0 @@
1
- import { assign, clone, debounce, getId, getGrantedConsent, isDefined, isObject, processEventMapping, tryCatchAsync, useHooks, } 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 async function addDestination(collector, data, options) {
11
- const { code, config: dataConfig = {}, env = {} } = data;
12
- const config = options || dataConfig || { init: false };
13
- const destination = {
14
- ...code,
15
- config,
16
- env: mergeEnvironments(code.env, env),
17
- };
18
- let id = destination.config.id; // Use given id
19
- if (!id) {
20
- // Generate a new id if none was given
21
- do {
22
- id = getId(4);
23
- } while (collector.destinations[id]);
24
- }
25
- // Add the destination
26
- collector.destinations[id] = destination;
27
- // Process previous events if not disabled
28
- if (destination.config.queue !== false)
29
- destination.queue = [...collector.queue];
30
- return pushToDestinations(collector, undefined, { [id]: destination });
31
- }
32
- /**
33
- * Pushes an event to all or a subset of destinations.
34
- *
35
- * @param collector - The walkerOS collector instance.
36
- * @param event - The event to push.
37
- * @param destinations - The destinations to push to.
38
- * @returns The result of the push operation.
39
- */
40
- export async function pushToDestinations(collector, event, destinations) {
41
- const { allowed, consent, globals, user } = collector;
42
- // Check if collector is allowed to push
43
- if (!allowed)
44
- return createPushResult({ ok: false });
45
- // Add event to the collector queue
46
- if (event)
47
- collector.queue.push(event);
48
- // Use given destinations or use internal destinations
49
- if (!destinations)
50
- destinations = collector.destinations;
51
- const results = await Promise.all(
52
- // Process all destinations in parallel
53
- Object.entries(destinations || {}).map(async ([id, destination]) => {
54
- // Create a queue of events to be processed
55
- let currentQueue = (destination.queue || []).map((event) => ({
56
- ...event,
57
- consent,
58
- }));
59
- // Reset original queue while processing to enable async processing
60
- destination.queue = [];
61
- // Add event to queue stack
62
- if (event) {
63
- // Clone the event to avoid mutating the original event
64
- const currentEvent = clone(event);
65
- // Note: Policy is now applied in processEventMapping() within destinationPush()
66
- // Add event to queue stack
67
- currentQueue.push(currentEvent);
68
- }
69
- // Nothing to do here if the queue is empty
70
- if (!currentQueue.length)
71
- return { id, destination, skipped: true };
72
- const allowedEvents = [];
73
- const skippedEvents = currentQueue.filter((queuedEvent) => {
74
- const grantedConsent = getGrantedConsent(destination.config.consent, // Required
75
- consent, // Current collector state
76
- queuedEvent.consent);
77
- if (grantedConsent) {
78
- queuedEvent.consent = grantedConsent; // Save granted consent states only
79
- allowedEvents.push(queuedEvent); // Add to allowed queue
80
- return false; // Remove from destination queue
81
- }
82
- return true; // Keep denied events in the queue
83
- });
84
- // Add skipped events back to the queue
85
- destination.queue.concat(skippedEvents);
86
- // Execution shall not pass if no events are allowed
87
- if (!allowedEvents.length) {
88
- return { id, destination, queue: currentQueue }; // Don't push if not allowed
89
- }
90
- // Initialize the destination if needed
91
- const isInitialized = await tryCatchAsync(destinationInit)(collector, destination);
92
- if (!isInitialized)
93
- return { id, destination, queue: currentQueue };
94
- // Process the destinations event queue
95
- let error = false;
96
- if (!destination.dlq)
97
- destination.dlq = [];
98
- // Process allowed events and store failed ones in the dead letter queue (DLQ)
99
- await Promise.all(allowedEvents.map(async (event) => {
100
- // Merge event with collector state, prioritizing event properties
101
- event.globals = assign(globals, event.globals);
102
- event.user = assign(user, event.user);
103
- await tryCatchAsync(destinationPush, (err) => {
104
- // Call custom error handling if available
105
- if (collector.config.onError)
106
- collector.config.onError(err, collector);
107
- error = true; // oh no
108
- // Add failed event to destinations DLQ
109
- destination.dlq.push([event, err]);
110
- return false;
111
- })(collector, destination, event);
112
- return event;
113
- }));
114
- return { id, destination, error };
115
- }));
116
- const successful = [];
117
- const queued = [];
118
- const failed = [];
119
- for (const result of results) {
120
- if (result.skipped)
121
- continue;
122
- const destination = result.destination;
123
- const ref = { id: result.id, destination };
124
- if (result.error) {
125
- failed.push(ref);
126
- }
127
- else if (result.queue && result.queue.length) {
128
- // Merge queue with existing queue
129
- destination.queue = (destination.queue || []).concat(result.queue);
130
- queued.push(ref);
131
- }
132
- else {
133
- successful.push(ref);
134
- }
135
- }
136
- return createPushResult({
137
- ok: !failed.length,
138
- event,
139
- successful,
140
- queued,
141
- failed,
142
- });
143
- }
144
- /**
145
- * Initializes a destination.
146
- *
147
- * @template Destination
148
- * @param collector - The walkerOS collector instance.
149
- * @param destination - The destination to initialize.
150
- * @returns Whether the destination was initialized successfully.
151
- */
152
- export async function destinationInit(collector, destination) {
153
- // Check if the destination was initialized properly or try to do so
154
- if (destination.init && !destination.config.init) {
155
- const context = {
156
- collector,
157
- config: destination.config,
158
- env: mergeEnvironments(destination.env, destination.config.env),
159
- };
160
- const configResult = await useHooks(destination.init, 'DestinationInit', collector.hooks)(context);
161
- // Actively check for errors (when false)
162
- if (configResult === false)
163
- return configResult; // don't push if init is false
164
- // Update the destination config if it was returned
165
- destination.config = {
166
- ...(configResult || destination.config),
167
- init: true, // Remember that the destination was initialized
168
- };
169
- }
170
- return true; // Destination is ready to push
171
- }
172
- /**
173
- * Pushes an event to a single destination.
174
- * Handles mapping, batching, and consent checks.
175
- *
176
- * @template Destination
177
- * @param collector - The walkerOS collector instance.
178
- * @param destination - The destination to push to.
179
- * @param event - The event to push.
180
- * @returns Whether the event was pushed successfully.
181
- */
182
- export async function destinationPush(collector, destination, event) {
183
- const { config } = destination;
184
- const processed = await processEventMapping(event, config, collector);
185
- if (processed.ignore)
186
- return false;
187
- const context = {
188
- collector,
189
- config,
190
- data: processed.data,
191
- mapping: processed.mapping,
192
- env: mergeEnvironments(destination.env, config.env),
193
- };
194
- const eventMapping = processed.mapping;
195
- if (eventMapping?.batch && destination.pushBatch) {
196
- const batched = eventMapping.batched || {
197
- key: processed.mappingKey || '',
198
- events: [],
199
- data: [],
200
- };
201
- batched.events.push(processed.event);
202
- if (isDefined(processed.data))
203
- batched.data.push(processed.data);
204
- eventMapping.batchFn =
205
- eventMapping.batchFn ||
206
- debounce((destination, collector) => {
207
- const batchContext = {
208
- collector,
209
- config,
210
- data: processed.data,
211
- mapping: eventMapping,
212
- env: mergeEnvironments(destination.env, config.env),
213
- };
214
- useHooks(destination.pushBatch, 'DestinationPushBatch', collector.hooks)(batched, batchContext);
215
- batched.events = [];
216
- batched.data = [];
217
- }, eventMapping.batch);
218
- eventMapping.batched = batched;
219
- eventMapping.batchFn?.(destination, collector);
220
- }
221
- else {
222
- // It's time to go to the destination's side now
223
- await useHooks(destination.push, 'DestinationPush', collector.hooks)(processed.event, context);
224
- }
225
- return true;
226
- }
227
- /**
228
- * Creates a standardized result object for push operations.
229
- *
230
- * @param partialResult - A partial result to merge with the default result.
231
- * @returns The push result.
232
- */
233
- export function createPushResult(partialResult) {
234
- return assign({
235
- ok: !partialResult?.failed?.length,
236
- successful: [],
237
- queued: [],
238
- failed: [],
239
- }, partialResult);
240
- }
241
- /**
242
- * Initializes a map of destinations using ONLY the unified code/config/env pattern.
243
- * Does NOT call destination.init() - that happens later during push with proper consent checks.
244
- *
245
- * @param destinations - The destinations to initialize.
246
- * @param collector - The collector instance for destination init context.
247
- * @returns The initialized destinations.
248
- */
249
- export async function initDestinations(_collector, destinations = {}) {
250
- const result = {};
251
- for (const [name, destinationDef] of Object.entries(destinations)) {
252
- const { code, config = {}, env = {} } = destinationDef;
253
- // Merge config: destination default + provided config
254
- const mergedConfig = {
255
- ...code.config,
256
- ...config,
257
- };
258
- // Merge environment: destination default + provided env
259
- const mergedEnv = mergeEnvironments(code.env, env);
260
- // Create destination instance by spreading code and overriding config/env
261
- result[name] = {
262
- ...code,
263
- config: mergedConfig,
264
- env: mergedEnv,
265
- };
266
- }
267
- return result;
268
- }
269
- /**
270
- * Merges destination environment with config environment
271
- * Config env takes precedence over destination env for overrides
272
- */
273
- function mergeEnvironments(destinationEnv, configEnv) {
274
- // If neither environment exists, return empty object
275
- if (!destinationEnv && !configEnv)
276
- return {};
277
- // If only one exists, return it
278
- if (!configEnv)
279
- return destinationEnv;
280
- if (!destinationEnv)
281
- return configEnv;
282
- // Both exist - merge objects with configEnv taking precedence
283
- if (isObject(destinationEnv) && isObject(configEnv)) {
284
- return { ...destinationEnv, ...configEnv };
285
- }
286
- // If they're not both objects, config env overrides destination env
287
- return configEnv;
288
- }
289
- //# 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;AAExB;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,SAA6B,EAC7B,IAAsB,EACtB,OAA4B;IAE5B,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,GAAG,EAAE,EAAE,GAAG,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC;IACzD,MAAM,MAAM,GAAG,OAAO,IAAI,UAAU,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IAExD,MAAM,WAAW,GAAyB;QACxC,GAAG,IAAI;QACP,MAAM;QACN,GAAG,EAAE,iBAAiB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC;KACtC,CAAC;IAEF,IAAI,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe;IAC/C,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,sCAAsC;QACtC,GAAG,CAAC;YACF,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAChB,CAAC,QAAQ,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE;IACvC,CAAC;IAED,sBAAsB;IACtB,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC;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;IAE1C,KAAK,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QAClE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,EAAE,EAAE,GAAG,GAAG,EAAE,EAAE,GAAG,cAAc,CAAC;QAEvD,sDAAsD;QACtD,MAAM,YAAY,GAAG;YACnB,GAAG,IAAI,CAAC,MAAM;YACd,GAAG,MAAM;SACV,CAAC;QAEF,wDAAwD;QACxD,MAAM,SAAS,GAAG,iBAAiB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAEnD,0EAA0E;QAC1E,MAAM,CAAC,IAAI,CAAC,GAAG;YACb,GAAG,IAAI;YACP,MAAM,EAAE,YAAY;YACpB,GAAG,EAAE,SAAS;SACf,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,SAAS,iBAAiB,CACxB,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,cAAc,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"}