@workleap/logrocket 2.0.1 → 2.1.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.
- package/CHANGELOG.md +15 -0
- package/dist/js/LogRocketInstrumentationClient.js +2 -0
- package/dist/js/LogRocketInstrumentationClient.js.map +1 -1
- package/dist/js/NoopLogRocketInstrumentationClient.d.ts +4 -0
- package/dist/js/NoopLogRocketInstrumentationClient.js +9 -0
- package/dist/js/NoopLogRocketInstrumentationClient.js.map +1 -0
- package/dist/js/index.d.ts +1 -0
- package/dist/js/index.js +5 -1
- package/dist/js/index.js.map +1 -1
- package/package.json +2 -2
- package/src/js/LogRocketInstrumentationClient.ts +2 -0
- package/src/js/NoopLogRocketInstrumentationClient.ts +5 -0
- package/src/js/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @workleap/logrocket
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#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.
|
|
8
|
+
|
|
9
|
+
## 2.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#99](https://github.com/workleap/wl-telemetry/pull/99) [`0fc78f2`](https://github.com/workleap/wl-telemetry/commit/0fc78f29c914075ced4d96c916edcb78e8033983) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Added a MixpanelPartialClient to the core package.
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`0fc78f2`](https://github.com/workleap/wl-telemetry/commit/0fc78f29c914075ced4d96c916edcb78e8033983)]:
|
|
16
|
+
- @workleap-telemetry/core@1.0.2
|
|
17
|
+
|
|
3
18
|
## 2.0.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -18,6 +18,8 @@ const TelemetryIdTrait = "Telemetry Id";
|
|
|
18
18
|
constructor(telemetryContext){
|
|
19
19
|
this.#telemetryContext = telemetryContext;
|
|
20
20
|
}
|
|
21
|
+
// IMPORTANT: If you update this method, make sure to update the LogRocketInstrumentationPartialClient
|
|
22
|
+
// interface as well in @workleap-telemetry/core.
|
|
21
23
|
/**
|
|
22
24
|
* Register a listener to receive the LogRocket session id when it's available.
|
|
23
25
|
* This method is the equivalent of the LogRocket.getSessionURL function but is
|
|
@@ -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 /**\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,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QAAQ;gBAAE,0BAA0BA,SAAS,GAAG;YAAC,CAAC;YAC1E,GAAIjB,SAASA,CAACiB,UAAU,QAAQ;gBAAE,sBAAsBA,SAAS,GAAG;YAAC,CAAC;YACtE,GAAIjB,SAASA,CAACiB,UAAU,QAAQ;gBAAE,2BAA2BA,SAAS,GAAG;YAAC,CAAC;YAC3E,GAAIjB,SAASA,CAACiB,UAAU,QAAQ;gBAAE,yBAAyBA,SAAS,GAAG;YAAC,CAAC;YACzE,GAAIjB,SAASA,CAACiB,UAAU,QAAQ;gBAAE,4BAA4BA,SAAS,GAAG;YAAC,CAAC;QAChF;IACJ;AACJ"}
|
|
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,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AACiB,UAAU,QAAQ;gBAAE,mBAAmBA,SAAS,GAAG;YAAC,CAAC;YACnE,GAAIjB,SAASA,CAACiB,UAAU,QAAQ;gBAAE,0BAA0BA,SAAS,GAAG;YAAC,CAAC;YAC1E,GAAIjB,SAASA,CAACiB,UAAU,QAAQ;gBAAE,sBAAsBA,SAAS,GAAG;YAAC,CAAC;YACtE,GAAIjB,SAASA,CAACiB,UAAU,QAAQ;gBAAE,2BAA2BA,SAAS,GAAG;YAAC,CAAC;YAC3E,GAAIjB,SAASA,CAACiB,UAAU,QAAQ;gBAAE,yBAAyBA,SAAS,GAAG;YAAC,CAAC;YACzE,GAAIjB,SAASA,CAACiB,UAAU,QAAQ;gBAAE,4BAA4BA,SAAS,GAAG;YAAC,CAAC;QAChF;IACJ;AACJ"}
|
|
@@ -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"}
|
package/dist/js/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
23
|
+
|
|
24
|
+
export { LogRocketInstrumentationClient, LogRocketLogger, LogRocketLoggerScope, NoopLogRocketInstrumentationClient, createTelemetryContext, registerLogRocketInstrumentation };
|
|
21
25
|
|
|
22
26
|
//# sourceMappingURL=index.js.map
|
package/dist/js/index.js.map
CHANGED
|
@@ -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":"
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workleap/logrocket",
|
|
3
3
|
"author": "Workleap",
|
|
4
|
-
"version": "2.0
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"description": "A package containing utilities for LogRocket.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@workleap/logging": "^1.3.0",
|
|
50
50
|
"logrocket-fuzzy-search-sanitizer": "0.0.2",
|
|
51
|
-
"@workleap-telemetry/core": "1.0.
|
|
51
|
+
"@workleap-telemetry/core": "1.0.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@rsbuild/core": "1.5.13",
|
|
@@ -98,6 +98,8 @@ export class LogRocketInstrumentationClient {
|
|
|
98
98
|
this.#telemetryContext = telemetryContext;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
// IMPORTANT: If you update this method, make sure to update the LogRocketInstrumentationPartialClient
|
|
102
|
+
// interface as well in @workleap-telemetry/core.
|
|
101
103
|
/**
|
|
102
104
|
* Register a listener to receive the LogRocket session id when it's available.
|
|
103
105
|
* This method is the equivalent of the LogRocket.getSessionURL function but is
|
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
|
|