@workleap/logrocket 2.0.2 → 2.1.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @workleap/logrocket
2
2
 
3
+ ## 2.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#109](https://github.com/workleap/wl-telemetry/pull/109) [`0a423ff`](https://github.com/workleap/wl-telemetry/commit/0a423ffc47baea121607283fc23aacdad43e36f9) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Fix a typing issues with the React context providers.
8
+
9
+ ## 2.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#101](https://github.com/workleap/wl-telemetry/pull/101) [`107d7ef`](https://github.com/workleap/wl-telemetry/commit/107d7efecd77470c8d13ee2ca055cf27405b31a8) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Added "noop" clients for LogRocket, Honeycomb and Mixpanel.
14
+
3
15
  ## 2.0.2
4
16
 
5
17
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import type { TelemetryContext } from "@workleap-telemetry/core";
1
+ import type { LogRocketInstrumentationPartialClient, TelemetryContext } from "@workleap-telemetry/core";
2
2
  export type GetLogRocketSessionUrlListener = (sessionURL: string) => void;
3
3
  export declare const DeviceIdTrait = "Device Id";
4
4
  export declare const TelemetryIdTrait = "Telemetry Id";
@@ -80,7 +80,7 @@ export interface LogRocketWorkleapPlatformUserTraits extends Record<string, unkn
80
80
  /**
81
81
  * @see {@link https://workleap.github.io/wl-telemetry}
82
82
  */
83
- export declare class LogRocketInstrumentationClient {
83
+ export declare class LogRocketInstrumentationClient implements LogRocketInstrumentationPartialClient {
84
84
  #private;
85
85
  constructor(telemetryContext?: TelemetryContext);
86
86
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"js/LogRocketInstrumentationClient.js","sources":["webpack://@workleap/logrocket/./src/js/LogRocketInstrumentationClient.ts"],"sourcesContent":["import type { TelemetryContext } from \"@workleap-telemetry/core\";\nimport LogRocket from \"logrocket\";\nimport { isDefined } from \"./assertions.ts\";\n\nexport type GetLogRocketSessionUrlListener = (sessionURL: string) => void;\n\nexport const DeviceIdTrait = \"Device Id\";\nexport const TelemetryIdTrait = \"Telemetry Id\";\n\n///////////////////////////\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface LogRocketWorkleapPlatformIdentification {\n userId: string;\n organizationId: string;\n organizationName: string;\n isMigratedToWorkleap: boolean;\n isAdmin: boolean;\n isOrganizationCreator?: boolean;\n isExecutive?: {\n wov?: boolean;\n lms?: boolean;\n onb?: boolean;\n sks?: boolean;\n wpm?: boolean;\n pbd?: boolean;\n cmp?: boolean;\n };\n isCollaborator?: {\n wov?: boolean;\n lms?: boolean;\n onb?: boolean;\n sks?: boolean;\n wpm?: boolean;\n pbd?: boolean;\n cmp?: boolean;\n };\n isReportingManager?: boolean;\n isTeamManager?: boolean;\n planCode?: {\n wov?: string;\n lms?: string;\n onb?: string;\n sks?: string;\n wpm?: string;\n pbd?: string;\n cmp?: string;\n };\n}\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface LogRocketWorkleapPlatformUserTraits extends Record<string, unknown> {\n \"User Id\": string;\n \"Organization Id\": string;\n \"Organization Name\": string;\n \"Is Migrated To Workleap\": boolean;\n \"Is Admin\": boolean;\n [DeviceIdTrait]: string;\n [TelemetryIdTrait]: string;\n \"Is Organization Creator\"?: boolean;\n \"Is Executive\"?: boolean;\n \"Is Executive - Officevibe\"?: boolean;\n \"Is Executive - LMS\"?: boolean;\n \"Is Executive - Onboarding\"?: boolean;\n \"Is Executive - Skills\"?: boolean;\n \"Is Executive - Performance\"?: boolean;\n \"Is Executive - Pingboard\"?: boolean;\n \"Is Collaborator\"?: boolean;\n \"Is Collaborator - Officevibe\"?: boolean;\n \"Is Collaborator - LMS\"?: boolean;\n \"Is Collaborator - Onboarding\"?: boolean;\n \"Is Collaborator - Skills\"?: boolean;\n \"Is Collaborator - Performance\"?: boolean;\n \"Is Collaborator - Pingboard\"?: boolean;\n \"Is Reporting Manager\"?: boolean;\n \"Is Team Manager\"?: boolean;\n \"Plan Code - Officevibe\"?: string;\n \"Plan Code - LMS\"?: string;\n \"Plan Code - Onboarding\"?: string;\n \"Plan Code - Skills\"?: string;\n \"Plan Code - Performance\"?: string;\n \"Plan Code - Pingboard\"?: string;\n}\n\n///////////////////////////\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport class LogRocketInstrumentationClient {\n readonly #telemetryContext?: TelemetryContext;\n\n constructor(telemetryContext?: TelemetryContext) {\n this.#telemetryContext = telemetryContext;\n }\n\n // IMPORTANT: If you update this method, make sure to update the LogRocketInstrumentationPartialClient\n // interface as well in @workleap-telemetry/core.\n /**\n * Register a listener to receive the LogRocket session id when it's available.\n * This method is the equivalent of the LogRocket.getSessionURL function but is\n * particularly useful for third party libraries that doesn't want to take a dependency\n * on `logrocket`.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n registerGetSessionUrlListener(listener: GetLogRocketSessionUrlListener) {\n LogRocket.getSessionURL(listener);\n }\n\n /**\n * Create the default user traits for a Workleap Platform user.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n createWorkleapPlatformDefaultUserTraits(identification: LogRocketWorkleapPlatformIdentification) {\n const {\n userId,\n organizationId,\n organizationName,\n isMigratedToWorkleap,\n isOrganizationCreator,\n isAdmin,\n isExecutive,\n isCollaborator,\n isReportingManager,\n isTeamManager,\n planCode\n } = identification;\n\n const isExecutiveInAnyProduct = Boolean(\n isExecutive?.wov ||\n isExecutive?.lms ||\n isExecutive?.onb ||\n isExecutive?.sks ||\n isExecutive?.wpm ||\n isExecutive?.pbd ||\n isExecutive?.cmp\n );\n\n const isCollaboratorInAnyProduct = Boolean(\n isCollaborator?.wov ||\n isCollaborator?.lms ||\n isCollaborator?.onb ||\n isCollaborator?.sks ||\n isCollaborator?.wpm ||\n isCollaborator?.pbd ||\n isCollaborator?.cmp\n );\n\n return {\n \"User Id\": userId,\n \"Organization Id\": organizationId,\n \"Organization Name\": organizationName,\n \"Is Migrated To Workleap\": isMigratedToWorkleap,\n \"Is Admin\": isAdmin,\n [DeviceIdTrait]: this.#telemetryContext?.deviceId ?? \"N/A\",\n [TelemetryIdTrait]: this.#telemetryContext?.telemetryId ?? \"N/A\",\n ...(isDefined(isOrganizationCreator) && { \"Is Organization Creator\": isOrganizationCreator }),\n ...(isExecutiveInAnyProduct && { \"Is Executive\": true }),\n ...(isDefined(isExecutive?.wov) && { \"Is Executive - Officevibe\": isExecutive.wov }),\n ...(isDefined(isExecutive?.lms) && { \"Is Executive - LMS\": isExecutive.lms }),\n ...(isDefined(isExecutive?.onb) && { \"Is Executive - Onboarding\": isExecutive.onb }),\n ...(isDefined(isExecutive?.sks) && { \"Is Executive - Skills\": isExecutive.sks }),\n ...(isDefined(isExecutive?.wpm) && { \"Is Executive - Performance\": isExecutive.wpm }),\n ...(isDefined(isExecutive?.pbd) && { \"Is Executive - Pingboard\": isExecutive.pbd }),\n ...(isDefined(isExecutive?.cmp) && { \"Is Executive - Compensation\": isExecutive.cmp }),\n ...(isCollaboratorInAnyProduct && { \"Is Collaborator\": isCollaboratorInAnyProduct }),\n ...(isDefined(isCollaborator?.wov) && { \"Is Collaborator - Officevibe\": isCollaborator.wov }),\n ...(isDefined(isCollaborator?.lms) && { \"Is Collaborator - LMS\": isCollaborator.lms }),\n ...(isDefined(isCollaborator?.onb) && { \"Is Collaborator - Onboarding\": isCollaborator.onb }),\n ...(isDefined(isCollaborator?.sks) && { \"Is Collaborator - Skills\": isCollaborator.sks }),\n ...(isDefined(isCollaborator?.wpm) && { \"Is Collaborator - Performance\": isCollaborator.wpm }),\n ...(isDefined(isCollaborator?.pbd) && { \"Is Collaborator - Pingboard\": isCollaborator.pbd }),\n ...(isDefined(isCollaborator?.cmp) && { \"Is Collaborator - Compensation\": isCollaborator.cmp }),\n ...(isDefined(isReportingManager) && { \"Is Reporting Manager\": isReportingManager }),\n ...(isDefined(isTeamManager) && { \"Is Team Manager\": isTeamManager }),\n ...(isDefined(planCode?.wov) && { \"Plan Code - Officevibe\": planCode.wov }),\n ...(isDefined(planCode?.lms) && { \"Plan Code - LMS\": planCode.lms }),\n ...(isDefined(planCode?.onb) && { \"Plan Code - Onboarding\": planCode.onb }),\n ...(isDefined(planCode?.sks) && { \"Plan Code - Skills\": planCode.sks }),\n ...(isDefined(planCode?.wpm) && { \"Plan Code - Performance\": planCode.wpm }),\n ...(isDefined(planCode?.pbd) && { \"Plan Code - Pingboard\": planCode.pbd }),\n ...(isDefined(planCode?.cmp) && { \"Plan Code - Compensation\": planCode.cmp })\n } satisfies LogRocketWorkleapPlatformUserTraits;\n }\n}\n"],"names":["LogRocket","isDefined","DeviceIdTrait","TelemetryIdTrait","LogRocketInstrumentationClient","telemetryContext","listener","identification","userId","organizationId","organizationName","isMigratedToWorkleap","isOrganizationCreator","isAdmin","isExecutive","isCollaborator","isReportingManager","isTeamManager","planCode","isExecutiveInAnyProduct","Boolean","isCollaboratorInAnyProduct"],"mappings":";;;;;;;;AACkC;AACU;AAIrC,MAAME,gBAAgB,YAAY;AAClC,MAAMC,mBAAmB,eAAe;AAiF/C,2BAA2B;AAE3B;;CAEC,GACM,MAAMC;IACA,iBAAiB,CAAoB;IAE9C,YAAYC,gBAAmC,CAAE;QAC7C,IAAI,CAAC,iBAAiB,GAAGA;IAC7B;IAEA,sGAAsG;IACtG,iDAAiD;IACjD;;;;;;KAMC,GACD,8BAA8BC,QAAwC,EAAE;QACpEN,uBAAuB,CAACM;IAC5B;IAEA;;;KAGC,GACD,wCAAwCC,cAAuD,EAAE;QAC7F,MAAM,EACFC,MAAM,EACNC,cAAc,EACdC,gBAAgB,EAChBC,oBAAoB,EACpBC,qBAAqB,EACrBC,OAAO,EACPC,WAAW,EACXC,cAAc,EACdC,kBAAkB,EAClBC,aAAa,EACbC,QAAQ,EACX,GAAGX;QAEJ,MAAMY,0BAA0BC,QAC5B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InstrumentationClient.js","sources":["webpack://@workleap/logrocket/./src/js/LogRocketInstrumentationClient.ts"],"sourcesContent":["import type { LogRocketInstrumentationPartialClient, TelemetryContext } from \"@workleap-telemetry/core\";\nimport LogRocket from \"logrocket\";\nimport { isDefined } from \"./assertions.ts\";\n\nexport type GetLogRocketSessionUrlListener = (sessionURL: string) => void;\n\nexport const DeviceIdTrait = \"Device Id\";\nexport const TelemetryIdTrait = \"Telemetry Id\";\n\n///////////////////////////\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface LogRocketWorkleapPlatformIdentification {\n userId: string;\n organizationId: string;\n organizationName: string;\n isMigratedToWorkleap: boolean;\n isAdmin: boolean;\n isOrganizationCreator?: boolean;\n isExecutive?: {\n wov?: boolean;\n lms?: boolean;\n onb?: boolean;\n sks?: boolean;\n wpm?: boolean;\n pbd?: boolean;\n cmp?: boolean;\n };\n isCollaborator?: {\n wov?: boolean;\n lms?: boolean;\n onb?: boolean;\n sks?: boolean;\n wpm?: boolean;\n pbd?: boolean;\n cmp?: boolean;\n };\n isReportingManager?: boolean;\n isTeamManager?: boolean;\n planCode?: {\n wov?: string;\n lms?: string;\n onb?: string;\n sks?: string;\n wpm?: string;\n pbd?: string;\n cmp?: string;\n };\n}\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface LogRocketWorkleapPlatformUserTraits extends Record<string, unknown> {\n \"User Id\": string;\n \"Organization Id\": string;\n \"Organization Name\": string;\n \"Is Migrated To Workleap\": boolean;\n \"Is Admin\": boolean;\n [DeviceIdTrait]: string;\n [TelemetryIdTrait]: string;\n \"Is Organization Creator\"?: boolean;\n \"Is Executive\"?: boolean;\n \"Is Executive - Officevibe\"?: boolean;\n \"Is Executive - LMS\"?: boolean;\n \"Is Executive - Onboarding\"?: boolean;\n \"Is Executive - Skills\"?: boolean;\n \"Is Executive - Performance\"?: boolean;\n \"Is Executive - Pingboard\"?: boolean;\n \"Is Collaborator\"?: boolean;\n \"Is Collaborator - Officevibe\"?: boolean;\n \"Is Collaborator - LMS\"?: boolean;\n \"Is Collaborator - Onboarding\"?: boolean;\n \"Is Collaborator - Skills\"?: boolean;\n \"Is Collaborator - Performance\"?: boolean;\n \"Is Collaborator - Pingboard\"?: boolean;\n \"Is Reporting Manager\"?: boolean;\n \"Is Team Manager\"?: boolean;\n \"Plan Code - Officevibe\"?: string;\n \"Plan Code - LMS\"?: string;\n \"Plan Code - Onboarding\"?: string;\n \"Plan Code - Skills\"?: string;\n \"Plan Code - Performance\"?: string;\n \"Plan Code - Pingboard\"?: string;\n}\n\n///////////////////////////\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport class LogRocketInstrumentationClient implements LogRocketInstrumentationPartialClient {\n readonly #telemetryContext?: TelemetryContext;\n\n constructor(telemetryContext?: TelemetryContext) {\n this.#telemetryContext = telemetryContext;\n }\n\n // IMPORTANT: If you update this method, make sure to update the LogRocketInstrumentationPartialClient\n // interface as well in @workleap-telemetry/core.\n /**\n * Register a listener to receive the LogRocket session id when it's available.\n * This method is the equivalent of the LogRocket.getSessionURL function but is\n * particularly useful for third party libraries that doesn't want to take a dependency\n * on `logrocket`.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n registerGetSessionUrlListener(listener: GetLogRocketSessionUrlListener) {\n LogRocket.getSessionURL(listener);\n }\n\n /**\n * Create the default user traits for a Workleap Platform user.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\n createWorkleapPlatformDefaultUserTraits(identification: LogRocketWorkleapPlatformIdentification) {\n const {\n userId,\n organizationId,\n organizationName,\n isMigratedToWorkleap,\n isOrganizationCreator,\n isAdmin,\n isExecutive,\n isCollaborator,\n isReportingManager,\n isTeamManager,\n planCode\n } = identification;\n\n const isExecutiveInAnyProduct = Boolean(\n isExecutive?.wov ||\n isExecutive?.lms ||\n isExecutive?.onb ||\n isExecutive?.sks ||\n isExecutive?.wpm ||\n isExecutive?.pbd ||\n isExecutive?.cmp\n );\n\n const isCollaboratorInAnyProduct = Boolean(\n isCollaborator?.wov ||\n isCollaborator?.lms ||\n isCollaborator?.onb ||\n isCollaborator?.sks ||\n isCollaborator?.wpm ||\n isCollaborator?.pbd ||\n isCollaborator?.cmp\n );\n\n return {\n \"User Id\": userId,\n \"Organization Id\": organizationId,\n \"Organization Name\": organizationName,\n \"Is Migrated To Workleap\": isMigratedToWorkleap,\n \"Is Admin\": isAdmin,\n [DeviceIdTrait]: this.#telemetryContext?.deviceId ?? \"N/A\",\n [TelemetryIdTrait]: this.#telemetryContext?.telemetryId ?? \"N/A\",\n ...(isDefined(isOrganizationCreator) && { \"Is Organization Creator\": isOrganizationCreator }),\n ...(isExecutiveInAnyProduct && { \"Is Executive\": true }),\n ...(isDefined(isExecutive?.wov) && { \"Is Executive - Officevibe\": isExecutive.wov }),\n ...(isDefined(isExecutive?.lms) && { \"Is Executive - LMS\": isExecutive.lms }),\n ...(isDefined(isExecutive?.onb) && { \"Is Executive - Onboarding\": isExecutive.onb }),\n ...(isDefined(isExecutive?.sks) && { \"Is Executive - Skills\": isExecutive.sks }),\n ...(isDefined(isExecutive?.wpm) && { \"Is Executive - Performance\": isExecutive.wpm }),\n ...(isDefined(isExecutive?.pbd) && { \"Is Executive - Pingboard\": isExecutive.pbd }),\n ...(isDefined(isExecutive?.cmp) && { \"Is Executive - Compensation\": isExecutive.cmp }),\n ...(isCollaboratorInAnyProduct && { \"Is Collaborator\": isCollaboratorInAnyProduct }),\n ...(isDefined(isCollaborator?.wov) && { \"Is Collaborator - Officevibe\": isCollaborator.wov }),\n ...(isDefined(isCollaborator?.lms) && { \"Is Collaborator - LMS\": isCollaborator.lms }),\n ...(isDefined(isCollaborator?.onb) && { \"Is Collaborator - Onboarding\": isCollaborator.onb }),\n ...(isDefined(isCollaborator?.sks) && { \"Is Collaborator - Skills\": isCollaborator.sks }),\n ...(isDefined(isCollaborator?.wpm) && { \"Is Collaborator - Performance\": isCollaborator.wpm }),\n ...(isDefined(isCollaborator?.pbd) && { \"Is Collaborator - Pingboard\": isCollaborator.pbd }),\n ...(isDefined(isCollaborator?.cmp) && { \"Is Collaborator - Compensation\": isCollaborator.cmp }),\n ...(isDefined(isReportingManager) && { \"Is Reporting Manager\": isReportingManager }),\n ...(isDefined(isTeamManager) && { \"Is Team Manager\": isTeamManager }),\n ...(isDefined(planCode?.wov) && { \"Plan Code - Officevibe\": planCode.wov }),\n ...(isDefined(planCode?.lms) && { \"Plan Code - LMS\": planCode.lms }),\n ...(isDefined(planCode?.onb) && { \"Plan Code - Onboarding\": planCode.onb }),\n ...(isDefined(planCode?.sks) && { \"Plan Code - Skills\": planCode.sks }),\n ...(isDefined(planCode?.wpm) && { \"Plan Code - Performance\": planCode.wpm }),\n ...(isDefined(planCode?.pbd) && { \"Plan Code - Pingboard\": planCode.pbd }),\n ...(isDefined(planCode?.cmp) && { \"Plan Code - Compensation\": planCode.cmp })\n } satisfies LogRocketWorkleapPlatformUserTraits;\n }\n}\n"],"names":["LogRocket","isDefined","DeviceIdTrait","TelemetryIdTrait","LogRocketInstrumentationClient","telemetryContext","listener","identification","userId","organizationId","organizationName","isMigratedToWorkleap","isOrganizationCreator","isAdmin","isExecutive","isCollaborator","isReportingManager","isTeamManager","planCode","isExecutiveInAnyProduct","Boolean","isCollaboratorInAnyProduct"],"mappings":";;;;;;;;AACkC;AACU;AAIrC,MAAME,gBAAgB,YAAY;AAClC,MAAMC,mBAAmB,eAAe;AAiF/C,2BAA2B;AAE3B;;CAEC,GACM,MAAMC;IACA,iBAAiB,CAAoB;IAE9C,YAAYC,gBAAmC,CAAE;QAC7C,IAAI,CAAC,iBAAiB,GAAGA;IAC7B;IAEA,sGAAsG;IACtG,iDAAiD;IACjD;;;;;;KAMC,GACD,8BAA8BC,QAAwC,EAAE;QACpEN,uBAAuB,CAACM;IAC5B;IAEA;;;KAGC,GACD,wCAAwCC,cAAuD,EAAE;QAC7F,MAAM,EACFC,MAAM,EACNC,cAAc,EACdC,gBAAgB,EAChBC,oBAAoB,EACpBC,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;YACzE,GAAIjB,SAASA,CAACiB,UAAU,QAAQ;gBAAE,4BAA4BA,SAAS,GAAG;YAAC,CAAC;QAChF;IACJ;AACJ"}
@@ -0,0 +1,4 @@
1
+ import type { LogRocketInstrumentationPartialClient } from "@workleap-telemetry/core";
2
+ export declare class NoopLogRocketInstrumentationClient implements LogRocketInstrumentationPartialClient {
3
+ registerGetSessionUrlListener(): void;
4
+ }
@@ -0,0 +1,9 @@
1
+
2
+ ;// CONCATENATED MODULE: ./src/js/NoopLogRocketInstrumentationClient.ts
3
+ class NoopLogRocketInstrumentationClient {
4
+ registerGetSessionUrlListener() {}
5
+ }
6
+
7
+ export { NoopLogRocketInstrumentationClient };
8
+
9
+ //# sourceMappingURL=NoopLogRocketInstrumentationClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"js/NoopLogRocketInstrumentationClient.js","sources":["webpack://@workleap/logrocket/./src/js/NoopLogRocketInstrumentationClient.ts"],"sourcesContent":["import type { LogRocketInstrumentationPartialClient } from \"@workleap-telemetry/core\";\n\nexport class NoopLogRocketInstrumentationClient implements LogRocketInstrumentationPartialClient {\n registerGetSessionUrlListener() {}\n}\n"],"names":["NoopLogRocketInstrumentationClient"],"mappings":";;AAEO,MAAMA;IACT,gCAAgC,CAAC;AACrC"}
@@ -3,4 +3,5 @@ export type { LogRocketSdkOptionsTransformer } from "./applyTransformers.ts";
3
3
  export { LogRocketInstrumentationClient, type GetLogRocketSessionUrlListener, type LogRocketWorkleapPlatformIdentification, type LogRocketWorkleapPlatformUserTraits } from "./LogRocketInstrumentationClient.ts";
4
4
  export { LogRocketLogger, LogRocketLoggerScope } from "./LogRocketLogger.ts";
5
5
  export type * from "./logRocketTypes.ts";
6
+ export { NoopLogRocketInstrumentationClient } from "./NoopLogRocketInstrumentationClient.ts";
6
7
  export { registerLogRocketInstrumentation, type RegisterLogRocketInstrumentationOptions } from "./registerLogRocketInstrumentation.ts";
package/dist/js/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { createTelemetryContext } from "@workleap-telemetry/core";
2
2
  import { LogRocketInstrumentationClient } from "./LogRocketInstrumentationClient.js";
3
3
  import { LogRocketLogger, LogRocketLoggerScope } from "./LogRocketLogger.js";
4
+ import { NoopLogRocketInstrumentationClient } from "./NoopLogRocketInstrumentationClient.js";
4
5
  import { registerLogRocketInstrumentation } from "./registerLogRocketInstrumentation.js";
5
6
 
6
7
  ;// CONCATENATED MODULE: external "@workleap-telemetry/core"
@@ -9,6 +10,8 @@ import { registerLogRocketInstrumentation } from "./registerLogRocketInstrumenta
9
10
 
10
11
  ;// CONCATENATED MODULE: external "./LogRocketLogger.js"
11
12
 
13
+ ;// CONCATENATED MODULE: external "./NoopLogRocketInstrumentationClient.js"
14
+
12
15
  ;// CONCATENATED MODULE: external "./registerLogRocketInstrumentation.js"
13
16
 
14
17
  ;// CONCATENATED MODULE: ./src/js/index.ts
@@ -17,6 +20,7 @@ import { registerLogRocketInstrumentation } from "./registerLogRocketInstrumenta
17
20
 
18
21
 
19
22
 
20
- export { LogRocketInstrumentationClient, LogRocketLogger, LogRocketLoggerScope, createTelemetryContext, registerLogRocketInstrumentation };
23
+
24
+ export { LogRocketInstrumentationClient, LogRocketLogger, LogRocketLoggerScope, NoopLogRocketInstrumentationClient, createTelemetryContext, registerLogRocketInstrumentation };
21
25
 
22
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"js/index.js","sources":["webpack://@workleap/logrocket/./src/js/index.ts"],"sourcesContent":["export { createTelemetryContext, type CreateTelemetryContextOptions, type TelemetryContext } from \"@workleap-telemetry/core\";\nexport type { LogRocketSdkOptionsTransformer } from \"./applyTransformers.ts\";\nexport { LogRocketInstrumentationClient, type GetLogRocketSessionUrlListener, type LogRocketWorkleapPlatformIdentification, type LogRocketWorkleapPlatformUserTraits } from \"./LogRocketInstrumentationClient.ts\";\nexport { LogRocketLogger, LogRocketLoggerScope } from \"./LogRocketLogger.ts\";\nexport type * from \"./logRocketTypes.ts\";\nexport { registerLogRocketInstrumentation, type RegisterLogRocketInstrumentationOptions } from \"./registerLogRocketInstrumentation.ts\";\n\n\n"],"names":["createTelemetryContext","LogRocketInstrumentationClient","LogRocketLogger","LogRocketLoggerScope","registerLogRocketInstrumentation"],"mappings":";;;;;;;;;;;;;;AAA6H;AAEqF;AACrI;AAE0D"}
1
+ {"version":3,"file":"js/index.js","sources":["webpack://@workleap/logrocket/./src/js/index.ts"],"sourcesContent":["export { createTelemetryContext, type CreateTelemetryContextOptions, type TelemetryContext } from \"@workleap-telemetry/core\";\nexport type { LogRocketSdkOptionsTransformer } from \"./applyTransformers.ts\";\nexport { LogRocketInstrumentationClient, type GetLogRocketSessionUrlListener, type LogRocketWorkleapPlatformIdentification, type LogRocketWorkleapPlatformUserTraits } from \"./LogRocketInstrumentationClient.ts\";\nexport { LogRocketLogger, LogRocketLoggerScope } from \"./LogRocketLogger.ts\";\nexport type * from \"./logRocketTypes.ts\";\nexport { NoopLogRocketInstrumentationClient } from \"./NoopLogRocketInstrumentationClient.ts\";\nexport { registerLogRocketInstrumentation, type RegisterLogRocketInstrumentationOptions } from \"./registerLogRocketInstrumentation.ts\";\n\n\n"],"names":["createTelemetryContext","LogRocketInstrumentationClient","LogRocketLogger","LogRocketLoggerScope","NoopLogRocketInstrumentationClient","registerLogRocketInstrumentation"],"mappings":";;;;;;;;;;;;;;;;;AAA6H;AAEqF;AACrI;AAEgB;AAC0C"}
@@ -1,10 +1,10 @@
1
+ import type { LogRocketInstrumentationPartialClient } from "@workleap-telemetry/core";
1
2
  import { type PropsWithChildren } from "react";
2
- import type { LogRocketInstrumentationClient } from "../js/LogRocketInstrumentationClient.ts";
3
3
  /**
4
4
  * @see {@link https://workleap.github.io/wl-telemetry}
5
5
  */
6
6
  export interface LogRocketInstrumentationProviderProps extends PropsWithChildren {
7
- client: LogRocketInstrumentationClient;
7
+ client: LogRocketInstrumentationPartialClient;
8
8
  }
9
9
  /**
10
10
  * @see {@link https://workleap.github.io/wl-telemetry}
@@ -14,4 +14,4 @@ export declare function LogRocketInstrumentationProvider(props: LogRocketInstrum
14
14
  * Retrieve the LogRocket instrumentation client.
15
15
  * @see {@link https://workleap.github.io/wl-telemetry}
16
16
  */
17
- export declare function useLogRocketInstrumentationClient(): LogRocketInstrumentationClient;
17
+ export declare function useLogRocketInstrumentationClient(): LogRocketInstrumentationPartialClient;
@@ -1 +1 @@
1
- {"version":3,"file":"react/LogRocketInstrumentationContext.js","sources":["webpack://@workleap/logrocket/./src/react/LogRocketInstrumentationContext.tsx"],"sourcesContent":["import { createContext, type PropsWithChildren, useContext } from \"react\";\nimport type { LogRocketInstrumentationClient } from \"../js/LogRocketInstrumentationClient.ts\";\n\nconst LogRocketInstrumentationContext = createContext<LogRocketInstrumentationClient | undefined>(undefined);\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface LogRocketInstrumentationProviderProps extends PropsWithChildren {\n client: LogRocketInstrumentationClient;\n}\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function LogRocketInstrumentationProvider(props: LogRocketInstrumentationProviderProps) {\n const {\n client,\n children\n } = props;\n\n return (\n <LogRocketInstrumentationContext.Provider value={client}>\n {children}\n </LogRocketInstrumentationContext.Provider>\n );\n}\n\n/**\n * Retrieve the LogRocket instrumentation client.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function useLogRocketInstrumentationClient() {\n const client = useContext(LogRocketInstrumentationContext);\n\n if (!client) {\n throw new Error(\"[logrocket] The useLogRocketInstrumentationClient function is called before an LogRocketInstrumentationClient instance has been provided.\");\n }\n\n return client;\n}\n"],"names":["createContext","useContext","LogRocketInstrumentationContext","undefined","LogRocketInstrumentationProvider","props","client","children","useLogRocketInstrumentationClient","Error"],"mappings":";;;;;;;;;AAA0E;AAG1E,MAAME,gDAAkCF,aAAaA,CAA6CG;AASlG;;CAEC,GACM,SAASC,iCAAiCC,KAA4C;IACzF,MAAM,EACFC,MAAM,EACNC,QAAQ,EACX,GAAGF;IAEJ,qBACI,IAACH,gCAAgC,QAAQ;QAAC,OAAOI;kBAC5CC;;AAGb;AAEA;;;CAGC,GACM,SAASC;IACZ,MAAMF,SAASL,UAAUA,CAACC;IAE1B,IAAI,CAACI,QAAQ;QACT,MAAM,IAAIG,MAAM;IACpB;IAEA,OAAOH;AACX"}
1
+ {"version":3,"file":"react/LogRocketInstrumentationContext.js","sources":["webpack://@workleap/logrocket/./src/react/LogRocketInstrumentationContext.tsx"],"sourcesContent":["import type { LogRocketInstrumentationPartialClient } from \"@workleap-telemetry/core\";\nimport { createContext, type PropsWithChildren, useContext } from \"react\";\n\nconst LogRocketInstrumentationContext = createContext<LogRocketInstrumentationPartialClient | undefined>(undefined);\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface LogRocketInstrumentationProviderProps extends PropsWithChildren {\n client: LogRocketInstrumentationPartialClient;\n}\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function LogRocketInstrumentationProvider(props: LogRocketInstrumentationProviderProps) {\n const {\n client,\n children\n } = props;\n\n return (\n <LogRocketInstrumentationContext.Provider value={client}>\n {children}\n </LogRocketInstrumentationContext.Provider>\n );\n}\n\n/**\n * Retrieve the LogRocket instrumentation client.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function useLogRocketInstrumentationClient() {\n const client = useContext(LogRocketInstrumentationContext);\n\n if (!client) {\n throw new Error(\"[logrocket] The useLogRocketInstrumentationClient function is called before an LogRocketInstrumentationClient instance has been provided.\");\n }\n\n return client;\n}\n"],"names":["createContext","useContext","LogRocketInstrumentationContext","undefined","LogRocketInstrumentationProvider","props","client","children","useLogRocketInstrumentationClient","Error"],"mappings":";;;;;;;;;AAC0E;AAE1E,MAAME,gDAAkCF,aAAaA,CAAoDG;AASzG;;CAEC,GACM,SAASC,iCAAiCC,KAA4C;IACzF,MAAM,EACFC,MAAM,EACNC,QAAQ,EACX,GAAGF;IAEJ,qBACI,IAACH,gCAAgC,QAAQ;QAAC,OAAOI;kBAC5CC;;AAGb;AAEA;;;CAGC,GACM,SAASC;IACZ,MAAMF,SAASL,UAAUA,CAACC;IAE1B,IAAI,CAACI,QAAQ;QACT,MAAM,IAAIG,MAAM;IACpB;IAEA,OAAOH;AACX"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@workleap/logrocket",
3
3
  "author": "Workleap",
4
- "version": "2.0.2",
4
+ "version": "2.1.1",
5
5
  "description": "A package containing utilities for LogRocket.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -1,4 +1,4 @@
1
- import type { TelemetryContext } from "@workleap-telemetry/core";
1
+ import type { LogRocketInstrumentationPartialClient, TelemetryContext } from "@workleap-telemetry/core";
2
2
  import LogRocket from "logrocket";
3
3
  import { isDefined } from "./assertions.ts";
4
4
 
@@ -91,7 +91,7 @@ export interface LogRocketWorkleapPlatformUserTraits extends Record<string, unkn
91
91
  /**
92
92
  * @see {@link https://workleap.github.io/wl-telemetry}
93
93
  */
94
- export class LogRocketInstrumentationClient {
94
+ export class LogRocketInstrumentationClient implements LogRocketInstrumentationPartialClient {
95
95
  readonly #telemetryContext?: TelemetryContext;
96
96
 
97
97
  constructor(telemetryContext?: TelemetryContext) {
@@ -0,0 +1,5 @@
1
+ import type { LogRocketInstrumentationPartialClient } from "@workleap-telemetry/core";
2
+
3
+ export class NoopLogRocketInstrumentationClient implements LogRocketInstrumentationPartialClient {
4
+ registerGetSessionUrlListener() {}
5
+ }
package/src/js/index.ts CHANGED
@@ -3,6 +3,7 @@ export type { LogRocketSdkOptionsTransformer } from "./applyTransformers.ts";
3
3
  export { LogRocketInstrumentationClient, type GetLogRocketSessionUrlListener, type LogRocketWorkleapPlatformIdentification, type LogRocketWorkleapPlatformUserTraits } from "./LogRocketInstrumentationClient.ts";
4
4
  export { LogRocketLogger, LogRocketLoggerScope } from "./LogRocketLogger.ts";
5
5
  export type * from "./logRocketTypes.ts";
6
+ export { NoopLogRocketInstrumentationClient } from "./NoopLogRocketInstrumentationClient.ts";
6
7
  export { registerLogRocketInstrumentation, type RegisterLogRocketInstrumentationOptions } from "./registerLogRocketInstrumentation.ts";
7
8
 
8
9
 
@@ -1,13 +1,13 @@
1
+ import type { LogRocketInstrumentationPartialClient } from "@workleap-telemetry/core";
1
2
  import { createContext, type PropsWithChildren, useContext } from "react";
2
- import type { LogRocketInstrumentationClient } from "../js/LogRocketInstrumentationClient.ts";
3
3
 
4
- const LogRocketInstrumentationContext = createContext<LogRocketInstrumentationClient | undefined>(undefined);
4
+ const LogRocketInstrumentationContext = createContext<LogRocketInstrumentationPartialClient | undefined>(undefined);
5
5
 
6
6
  /**
7
7
  * @see {@link https://workleap.github.io/wl-telemetry}
8
8
  */
9
9
  export interface LogRocketInstrumentationProviderProps extends PropsWithChildren {
10
- client: LogRocketInstrumentationClient;
10
+ client: LogRocketInstrumentationPartialClient;
11
11
  }
12
12
 
13
13
  /**