@codeleap/analytics 6.3.0 → 7.0.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.
@@ -0,0 +1,19 @@
1
+ import { AnyRecord } from '@codeleap/types';
2
+ import { AnalyticsFunctions, AnalyticsOptions } from './types';
3
+ export * from './types';
4
+ /**
5
+ * Generic analytics dispatcher that merges shared context, obfuscates sensitive fields, and fans out to `onEvent` / `onInteraction` handlers.
6
+ * All tracking is silently skipped when `enabled` is false; errors are routed to `onError` rather than thrown.
7
+ */
8
+ export declare class Analytics<Events extends AnyRecord> {
9
+ private options;
10
+ private functions;
11
+ private enabled;
12
+ private prepareAnalyticsData;
13
+ private obfuscateAnalyticsData;
14
+ constructor(options: AnalyticsOptions, functions: AnalyticsFunctions);
15
+ event<T extends keyof Events>(name: T, data?: Events[T]): void;
16
+ interaction<T extends keyof Events>(name: T, data?: Events[T]): void;
17
+ private handle;
18
+ }
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Analytics/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAExD,OAAO,EAAE,kBAAkB,EAAmB,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/E,cAAc,SAAS,CAAA;AAEvB;;;GAGG;AACH,qBAAa,SAAS,CAAC,MAAM,SAAS,SAAS;IAiB3C,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,SAAS;IAjBnB,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,sBAAsB;gBASpB,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAE,kBAAkB;IASvC,KAAK,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAE,MAAM,CAAC,CAAC,CAAmB;IAIxE,WAAW,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAE,MAAM,CAAC,CAAC,CAAmB;IAI9E,OAAO,CAAC,MAAM;CAkBf"}
@@ -0,0 +1,26 @@
1
+ import { Matcher } from '@codeleap/types';
2
+ /** Normalized payload passed to `onEvent` and `onInteraction` handlers after data preparation and obfuscation. */
3
+ export type AnalyticsObject = {
4
+ name: string;
5
+ type: 'interaction' | 'event';
6
+ data: any;
7
+ };
8
+ /** Callbacks that back-end integrations must implement; all three are required — `onError` is the safety net for failed tracking calls. */
9
+ export type AnalyticsFunctions = {
10
+ onError: (err: any) => void;
11
+ onInteraction: (obj: AnalyticsObject) => void;
12
+ onEvent: (obj: AnalyticsObject) => void;
13
+ };
14
+ /**
15
+ * Configuration for an `Analytics` instance.
16
+ * `init` is called once at construction when `enabled` is true.
17
+ * `prepareData` is merged into every event payload, making it the right place for shared context (e.g. session id, app version).
18
+ */
19
+ export type AnalyticsOptions = {
20
+ enabled: boolean;
21
+ obfuscateKeys: Matcher<'key'>[];
22
+ obfuscateValues: Matcher<'value'>[];
23
+ init: () => void;
24
+ prepareData: () => any;
25
+ };
26
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/Analytics/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAEzC,kHAAkH;AAClH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,aAAa,GAAG,OAAO,CAAA;IAC7B,IAAI,EAAE,GAAG,CAAA;CACV,CAAA;AAED,2IAA2I;AAC3I,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;IAC3B,aAAa,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAA;IAC7C,OAAO,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAA;CACxC,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAA;IAC/B,eAAe,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAA;IACnC,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,WAAW,EAAE,MAAM,GAAG,CAAA;CACvB,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { SegmentUser, DefaultMode, SegmentMethods, SegmentConfig, AnyRecord } from './types';
2
+ export * from './types';
3
+ /**
4
+ * Platform-agnostic wrapper around a Segment analytics client.
5
+ * The underlying client is created via `createClient` at construction; all methods are no-ops until then or when `enabled` is false.
6
+ * Event names are automatically prefixed/suffixed per mode (e.g. `dev_` in dev) so staging traffic never pollutes prod workspaces.
7
+ * `identifyUser` is idempotent within a session — it calls `identify` at most once per instance.
8
+ */
9
+ export declare class Segment<C extends SegmentMethods, U extends SegmentUser = SegmentUser, M extends string = DefaultMode> {
10
+ private config;
11
+ private _enabled;
12
+ private apiKey;
13
+ client: C | null;
14
+ identifiedUser: boolean;
15
+ get enabled(): boolean;
16
+ private get eventPrefix();
17
+ private get eventSuffix();
18
+ constructor(config: SegmentConfig<C, U, M>);
19
+ private buildEventName;
20
+ track<T extends AnyRecord>(eventName: string, properties?: T | undefined): Promise<void>;
21
+ screen(name: string, options?: AnyRecord | undefined): Promise<void>;
22
+ group(groupId: string, groupTraits?: AnyRecord | undefined): Promise<void>;
23
+ alias(newUserId: string): Promise<void>;
24
+ reset(): Promise<void>;
25
+ identifyUser(user: U): Promise<void>;
26
+ setMode(newMode: M): void;
27
+ }
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Segment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAElH,cAAc,SAAS,CAAA;AAWvB;;;;;GAKG;AACH,qBAAa,OAAO,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,CAAC,SAAS,MAAM,GAAG,WAAW;IAChH,OAAO,CAAC,MAAM,CAA2F;IAEzG,OAAO,CAAC,QAAQ,CAAO;IAEvB,OAAO,CAAC,MAAM,CAAsB;IAE7B,MAAM,EAAE,CAAC,GAAG,IAAI,CAAO;IAEvB,cAAc,UAAQ;IAE7B,IAAW,OAAO,YAEjB;IAED,OAAO,KAAK,WAAW,GAGtB;IAED,OAAO,KAAK,WAAW,GAGtB;gBAEW,MAAM,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAqB1C,OAAO,CAAC,cAAc;IAIT,KAAK,CAAC,CAAC,SAAS,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAE,CAAC,GAAG,SAAqB;IAMnF,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,SAAS,GAAG,SAAqB;IAM/D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,GAAE,SAAS,GAAG,SAAqB;IAMrE,KAAK,CAAC,SAAS,EAAE,MAAM;IAMvB,KAAK;IAML,YAAY,CAAC,IAAI,EAAE,CAAC;IAU1B,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1B"}
@@ -0,0 +1,36 @@
1
+ /** Loose record type used for arbitrary Segment event properties and traits. */
2
+ export type AnyRecord = {
3
+ [x: string]: any;
4
+ };
5
+ /**
6
+ * Full constructor config for a `Segment` instance.
7
+ * `createClient` receives the write key and must return a platform-specific Segment client (e.g. `@segment/analytics-next` or the React Native SDK).
8
+ * `prefix` / `suffix` are keyed by mode so dev events can be namespaced without touching prod data.
9
+ */
10
+ export type SegmentConfig<C, U extends SegmentUser, M extends string = DefaultMode> = {
11
+ apiKey: string;
12
+ enabled?: boolean;
13
+ getUserTraits: (user: U) => AnyRecord;
14
+ mode: M;
15
+ prefix?: Record<M, string | null>;
16
+ suffix?: Record<M, string | null>;
17
+ createClient: (writeKey: string) => C;
18
+ };
19
+ /** Structural contract that the platform-specific Segment client must satisfy; lets `Segment<C>` stay platform-agnostic. */
20
+ export type SegmentMethods = {
21
+ track: (eventName: string, properties?: AnyRecord) => Promise<void>;
22
+ screen: (name: string, options?: AnyRecord) => Promise<void>;
23
+ group: (groupId: string, groupTraits?: AnyRecord) => Promise<void>;
24
+ alias: (newUserId: string) => Promise<void>;
25
+ reset: () => Promise<void>;
26
+ identify: (userId: string, userTraits?: AnyRecord) => Promise<void>;
27
+ };
28
+ /** Minimum shape required for a user object passed to `identifyUser`; extend this type to carry additional traits. */
29
+ export type SegmentUser = {
30
+ id: string;
31
+ };
32
+ /** The two built-in deployment modes; custom modes can be added by passing a wider string union as `M`. */
33
+ export type DefaultMode = 'dev' | 'prod';
34
+ /** Subset of `SegmentConfig` stored at runtime — excludes `apiKey`, `createClient`, and `enabled` which are consumed at construction. */
35
+ export type SegmentGeneralConfig<C, U extends SegmentUser, M extends string> = Omit<SegmentConfig<C, U, M>, 'apiKey' | 'createClient' | 'enabled'>;
36
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/Segment/types.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,MAAM,GAAG,WAAW,IAAI;IACpF,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,CAAA;IACrC,IAAI,EAAE,CAAC,CAAA;IACP,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,CAAA;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,CAAA;IACjC,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,CAAC,CAAA;CACtC,CAAA;AAED,4HAA4H;AAC5H,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACnE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5D,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAClE,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3C,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACpE,CAAA;AAED,sHAAsH;AACtH,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,2GAA2G;AAC3G,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,CAAA;AAExC,yIAAyI;AACzI,MAAM,MAAM,oBAAoB,CAAC,CAAC,EAAE,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,MAAM,IAAI,IAAI,CACjF,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EACtB,QAAQ,GAAG,cAAc,GAAG,SAAS,CACtC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './Segment';
2
+ export * from './Analytics';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { Matcher } from '@codeleap/types';
2
+ type ObfuscateArgs = {
3
+ object: any;
4
+ keys: (Matcher<'key'>)[];
5
+ values: (Matcher<'value'>)[];
6
+ };
7
+ /**
8
+ * Deep-clones `object` and replaces matched keys with `"[secret]"` and matched values with `"[secret]"` (or strips query strings from URLs).
9
+ * Handles circular references gracefully by returning a shallow copy with a `WARNING` flag instead of throwing.
10
+ */
11
+ export declare function obfuscate(args: ObfuscateArgs): any;
12
+ export {};
13
+ //# sourceMappingURL=obfuscate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"obfuscate.d.ts","sourceRoot":"","sources":["../src/obfuscate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAIzC,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,GAAG,CAAA;IACX,IAAI,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAA;IACxB,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAA;CAC7B,CAAA;AAkCD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,aAAa,OAgC5C"}
package/package.json CHANGED
@@ -1,7 +1,20 @@
1
1
  {
2
2
  "name": "@codeleap/analytics",
3
- "version": "6.3.0",
3
+ "version": "7.0.0",
4
4
  "main": "src/index.ts",
5
+ "types": "dist/index.d.ts",
6
+ "exports": {
7
+ ".": {
8
+ "source": "./src/index.ts",
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js",
11
+ "default": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "src"
17
+ ],
5
18
  "license": "UNLICENSED",
6
19
  "repository": {
7
20
  "url": "https://github.com/codeleap-uk/internal-libs-monorepo.git",
@@ -9,15 +22,18 @@
9
22
  "directory": "packages/analytics"
10
23
  },
11
24
  "devDependencies": {
12
- "@codeleap/config": "6.3.0",
25
+ "@codeleap/config": "7.0.0",
26
+ "@codeleap/types": "7.0.0",
27
+ "@codeleap/utils": "7.0.0",
13
28
  "ts-node-dev": "1.1.8"
14
29
  },
15
30
  "scripts": {
16
- "build": "echo 'No build needed'"
31
+ "build": "tsc --build tsconfig.build.json",
32
+ "typecheck": "bun tsc --noEmit -p ./tsconfig.json"
17
33
  },
18
34
  "peerDependencies": {
19
- "@codeleap/utils": "6.3.0",
20
- "@codeleap/types": "6.3.0",
35
+ "@codeleap/utils": "7.0.0",
36
+ "@codeleap/types": "7.0.0",
21
37
  "typescript": "5.5.2"
22
38
  }
23
- }
39
+ }
@@ -4,6 +4,10 @@ import { AnalyticsFunctions, AnalyticsObject, AnalyticsOptions } from './types'
4
4
 
5
5
  export * from './types'
6
6
 
7
+ /**
8
+ * Generic analytics dispatcher that merges shared context, obfuscates sensitive fields, and fans out to `onEvent` / `onInteraction` handlers.
9
+ * All tracking is silently skipped when `enabled` is false; errors are routed to `onError` rather than thrown.
10
+ */
7
11
  export class Analytics<Events extends AnyRecord> {
8
12
  private enabled: boolean
9
13
 
@@ -1,17 +1,24 @@
1
1
  import { Matcher } from '@codeleap/types'
2
2
 
3
+ /** Normalized payload passed to `onEvent` and `onInteraction` handlers after data preparation and obfuscation. */
3
4
  export type AnalyticsObject = {
4
5
  name: string
5
6
  type: 'interaction' | 'event'
6
7
  data: any
7
8
  }
8
9
 
10
+ /** Callbacks that back-end integrations must implement; all three are required — `onError` is the safety net for failed tracking calls. */
9
11
  export type AnalyticsFunctions = {
10
12
  onError: (err: any) => void
11
13
  onInteraction: (obj: AnalyticsObject) => void
12
14
  onEvent: (obj: AnalyticsObject) => void
13
15
  }
14
16
 
17
+ /**
18
+ * Configuration for an `Analytics` instance.
19
+ * `init` is called once at construction when `enabled` is true.
20
+ * `prepareData` is merged into every event payload, making it the right place for shared context (e.g. session id, app version).
21
+ */
15
22
  export type AnalyticsOptions = {
16
23
  enabled: boolean
17
24
  obfuscateKeys: Matcher<'key'>[]
@@ -11,6 +11,12 @@ const defaultConfig: SegmentGeneralConfig<any, SegmentUser, DefaultMode> = {
11
11
  },
12
12
  }
13
13
 
14
+ /**
15
+ * Platform-agnostic wrapper around a Segment analytics client.
16
+ * The underlying client is created via `createClient` at construction; all methods are no-ops until then or when `enabled` is false.
17
+ * Event names are automatically prefixed/suffixed per mode (e.g. `dev_` in dev) so staging traffic never pollutes prod workspaces.
18
+ * `identifyUser` is idempotent within a session — it calls `identify` at most once per instance.
19
+ */
14
20
  export class Segment<C extends SegmentMethods, U extends SegmentUser = SegmentUser, M extends string = DefaultMode> {
15
21
  private config: SegmentGeneralConfig<C, U, M> = defaultConfig as unknown as SegmentGeneralConfig<C, U, M>
16
22
 
@@ -1,7 +1,13 @@
1
+ /** Loose record type used for arbitrary Segment event properties and traits. */
1
2
  export type AnyRecord = {
2
3
  [x: string]: any
3
4
  }
4
5
 
6
+ /**
7
+ * Full constructor config for a `Segment` instance.
8
+ * `createClient` receives the write key and must return a platform-specific Segment client (e.g. `@segment/analytics-next` or the React Native SDK).
9
+ * `prefix` / `suffix` are keyed by mode so dev events can be namespaced without touching prod data.
10
+ */
5
11
  export type SegmentConfig<C, U extends SegmentUser, M extends string = DefaultMode> = {
6
12
  apiKey: string
7
13
  enabled?: boolean
@@ -12,6 +18,7 @@ export type SegmentConfig<C, U extends SegmentUser, M extends string = DefaultMo
12
18
  createClient: (writeKey: string) => C
13
19
  }
14
20
 
21
+ /** Structural contract that the platform-specific Segment client must satisfy; lets `Segment<C>` stay platform-agnostic. */
15
22
  export type SegmentMethods = {
16
23
  track: (eventName: string, properties?: AnyRecord) => Promise<void>
17
24
  screen: (name: string, options?: AnyRecord) => Promise<void>
@@ -21,12 +28,15 @@ export type SegmentMethods = {
21
28
  identify: (userId: string, userTraits?: AnyRecord) => Promise<void>
22
29
  }
23
30
 
31
+ /** Minimum shape required for a user object passed to `identifyUser`; extend this type to carry additional traits. */
24
32
  export type SegmentUser = {
25
33
  id: string
26
34
  }
27
35
 
36
+ /** The two built-in deployment modes; custom modes can be added by passing a wider string union as `M`. */
28
37
  export type DefaultMode = 'dev' | 'prod'
29
38
 
39
+ /** Subset of `SegmentConfig` stored at runtime — excludes `apiKey`, `createClient`, and `enabled` which are consumed at construction. */
30
40
  export type SegmentGeneralConfig<C, U extends SegmentUser, M extends string> = Omit<
31
41
  SegmentConfig<C, U, M>,
32
42
  'apiKey' | 'createClient' | 'enabled'
package/src/obfuscate.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import { cloneDeep } from '@codeleap/utils'
2
3
  import { Matcher } from '@codeleap/types'
3
4
  import { inspect } from 'util'
@@ -9,7 +10,7 @@ type ObfuscateArgs = {
9
10
  values: (Matcher<'value'>)[]
10
11
  }
11
12
 
12
- function removeKey(obj, key) {
13
+ function removeKey(obj: Record<string, any>, key: any) {
13
14
  if (obj?.hasOwnProperty(key)) {
14
15
  obj[key] = '[secret]'
15
16
  }
@@ -20,7 +21,7 @@ function removeKey(obj, key) {
20
21
  }
21
22
  }
22
23
 
23
- function removeValue(obj, value) {
24
+ function removeValue(obj: Record<string, any>, value: any) {
24
25
  for (const subObj in obj) {
25
26
  const isString = typeof obj[subObj] == 'string'
26
27
  if (isString) {
@@ -41,6 +42,10 @@ function removeValue(obj, value) {
41
42
  }
42
43
  }
43
44
 
45
+ /**
46
+ * Deep-clones `object` and replaces matched keys with `"[secret]"` and matched values with `"[secret]"` (or strips query strings from URLs).
47
+ * Handles circular references gracefully by returning a shallow copy with a `WARNING` flag instead of throwing.
48
+ */
44
49
  export function obfuscate(args: ObfuscateArgs) {
45
50
  const { object, keys, values } = args
46
51
 
package/package.json.bak DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "name": "@codeleap/analytics",
3
- "version": "6.3.0",
4
- "main": "src/index.ts",
5
- "license": "UNLICENSED",
6
- "repository": {
7
- "url": "https://github.com/codeleap-uk/internal-libs-monorepo.git",
8
- "type": "git",
9
- "directory": "packages/analytics"
10
- },
11
- "devDependencies": {
12
- "@codeleap/config": "workspace:*",
13
- "ts-node-dev": "1.1.8"
14
- },
15
- "scripts": {
16
- "build": "echo 'No build needed'"
17
- },
18
- "peerDependencies": {
19
- "@codeleap/utils": "workspace:*",
20
- "@codeleap/types": "workspace:*",
21
- "typescript": "5.5.2"
22
- }
23
- }