Skip to content

Commit c834989

Browse files
setConsent and on to utils
1 parent 1560821 commit c834989

File tree

22 files changed

+65
-117
lines changed

22 files changed

+65
-117
lines changed

packages/sources/node/src/lib/consent.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

packages/sources/node/src/lib/handle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import {
66
isObject,
77
isSameType,
88
pushToDestinations,
9+
setConsent,
910
} from '@elbwalker/utils';
1011
import { addDestination } from './destination';
1112
import { createResult } from './helper';
1213
import { run } from './run';
1314
import { getState } from './state';
14-
import { setConsent } from './consent';
1515

1616
export const handleCommand: SourceNode.HandleCommand = async (
1717
instance,

packages/sources/node/src/lib/push.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function createEventOrCommand(
111111
timing = Math.round((Date.now() - instance.timing) / 10) / 100,
112112
version = {
113113
source: instance.version,
114-
tagging: instance.config.tagging,
114+
tagging: instance.config.tagging || 0,
115115
},
116116
source = { type: 'node', id: '', previous_id: '' },
117117
} = partialEvent;
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
export * as DestinationNode from './destination';
22
export * as Elb from './elb';
3-
export * as On from './on';
43
export * as SourceNode from './source';

packages/sources/node/src/types/on.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

packages/sources/walkerjs/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Elb, SourceWalkerjs } from './types';
2+
import { onApply } from '@elbwalker/utils';
23
import { sessionStart } from '@elbwalker/utils/web';
34
import { addDestination } from './lib/destination';
4-
import { onApply } from './lib/on';
55
import { createPush, elbLayerInit } from './lib/push';
66
import { run } from './lib/run';
77
import { createSessionStart } from './lib/session';

packages/sources/walkerjs/src/lib/consent.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

packages/sources/walkerjs/src/lib/handle.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import type { Hooks, WalkerOS } from '@elbwalker/types';
2-
import type { On, SourceWalkerjs, DestinationWeb, Elb } from '../types';
1+
import type { Hooks, On, WalkerOS } from '@elbwalker/types';
2+
import type { SourceWalkerjs, DestinationWeb, Elb } from '../types';
33
import {
44
Const,
55
assign,
66
isArray,
77
isObject,
88
isSameType,
9+
on,
910
pushToDestinations,
11+
setConsent,
1012
tryCatchAsync,
1113
} from '@elbwalker/utils';
1214
import { isElementOrDocument } from './helper';
1315
import { initScopeTrigger, ready } from './trigger';
1416
import { getState } from './state';
1517
import { addDestination } from './destination';
16-
import { on } from './on';
1718
import { run } from './run';
1819
import { addHook } from './hooks';
19-
import { setConsent } from './consent';
2020

2121
export async function handleCommand(
2222
instance: SourceWalkerjs.Instance,

packages/sources/walkerjs/src/lib/push.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@ function createEventOrCommand(
183183
timestamp = Date.now(),
184184
group = instance.group,
185185
count = instance.count,
186-
version = { source: instance.version, tagging: instance.config.tagging },
186+
version = {
187+
source: instance.version,
188+
tagging: instance.config.tagging || 0,
189+
},
187190
source = {
188191
type: 'web',
189192
id: window.location.href,

packages/sources/walkerjs/src/lib/run.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { SourceWalkerjs } from '../types';
2-
import { assign, getId, tryCatch } from '@elbwalker/utils';
2+
import { assign, getId, onApply, tryCatch } from '@elbwalker/utils';
33
import { getGlobals } from './walker';
4-
import { onApply } from './on';
54
import { pushPredefined } from './push';
65
import { load } from './trigger';
76
import { sessionStart } from './session';

0 commit comments

Comments
 (0)