@elliemae/pui-logrocket 1.0.0-next.2 → 1.0.0-next.4

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/dist/cjs/index.js CHANGED
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
6
10
  var __copyProps = (to, from, except, desc) => {
7
11
  if (from && typeof from === "object" || typeof from === "function") {
8
12
  for (let key of __getOwnPropNames(from))
@@ -11,8 +15,11 @@ var __copyProps = (to, from, except, desc) => {
11
15
  }
12
16
  return to;
13
17
  };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
19
  var index_exports = {};
20
+ __export(index_exports, {
21
+ LogRocket: () => import_logrocket.LogRocket,
22
+ initLogRocket: () => import_logrocket.initLogRocket
23
+ });
17
24
  module.exports = __toCommonJS(index_exports);
18
- __reExport(index_exports, require("./logrocket.js"), module.exports);
25
+ var import_logrocket = require("./logrocket.js");
@@ -28,11 +28,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var logrocket_exports = {};
30
30
  __export(logrocket_exports, {
31
- LogRocket: () => import_logrocket.default
31
+ LogRocket: () => import_logrocket.default,
32
+ initLogRocket: () => initLogRocket
32
33
  });
33
34
  module.exports = __toCommonJS(logrocket_exports);
34
35
  var import_logrocket = __toESM(require("logrocket"));
35
36
  var import_logrocket_react = __toESM(require("logrocket-react"));
37
+ const setupLogRocketReact = import_logrocket_react.default.default;
36
38
  const defaultOptions = {
37
39
  dom: {
38
40
  inputSanitizer: "lipsum"
@@ -63,15 +65,16 @@ const defaultOptions = {
63
65
  // app sdk based applications use this env variable to specify the app code version
64
66
  rootHostname: ".ice.com"
65
67
  };
66
- const originalInit = import_logrocket.default.init.bind(import_logrocket.default);
67
- import_logrocket.default.init = (id, options) => {
68
+ const initLogRocket = (id, options) => {
68
69
  const { isReact = true, ...rest } = options ?? {};
69
70
  if (window.location.hostname === "localhost" && process.env.LOGROCKET_ENABLE_ON_LOCALHOST !== "true") {
70
71
  console.info("LogRocket is not initialized in localhost");
71
72
  return;
72
73
  }
73
- originalInit(id, { ...defaultOptions, ...rest });
74
+ import_logrocket.default.init(id, { ...defaultOptions, ...rest });
74
75
  if (isReact) {
75
- (0, import_logrocket_react.default)(import_logrocket.default);
76
+ setupLogRocketReact(import_logrocket.default);
76
77
  }
77
78
  };
79
+ window.emui = window.emui || {};
80
+ window.emui.logRocket = import_logrocket.default;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";
package/dist/esm/index.js CHANGED
@@ -1 +1,5 @@
1
- export * from "./logrocket.js";
1
+ import { initLogRocket, LogRocket } from "./logrocket.js";
2
+ export {
3
+ LogRocket,
4
+ initLogRocket
5
+ };
@@ -1,5 +1,6 @@
1
1
  import LogRocket from "logrocket";
2
- import setupLogRocketReact from "logrocket-react";
2
+ import logRocketReact from "logrocket-react";
3
+ const setupLogRocketReact = logRocketReact.default;
3
4
  const defaultOptions = {
4
5
  dom: {
5
6
  inputSanitizer: "lipsum"
@@ -30,18 +31,20 @@ const defaultOptions = {
30
31
  // app sdk based applications use this env variable to specify the app code version
31
32
  rootHostname: ".ice.com"
32
33
  };
33
- const originalInit = LogRocket.init.bind(LogRocket);
34
- LogRocket.init = (id, options) => {
34
+ const initLogRocket = (id, options) => {
35
35
  const { isReact = true, ...rest } = options ?? {};
36
36
  if (window.location.hostname === "localhost" && process.env.LOGROCKET_ENABLE_ON_LOCALHOST !== "true") {
37
37
  console.info("LogRocket is not initialized in localhost");
38
38
  return;
39
39
  }
40
- originalInit(id, { ...defaultOptions, ...rest });
40
+ LogRocket.init(id, { ...defaultOptions, ...rest });
41
41
  if (isReact) {
42
42
  setupLogRocketReact(LogRocket);
43
43
  }
44
44
  };
45
+ window.emui = window.emui || {};
46
+ window.emui.logRocket = LogRocket;
45
47
  export {
46
- LogRocket
48
+ LogRocket,
49
+ initLogRocket
47
50
  };
File without changes
File without changes
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Library Boilerplate</title><script defer="defer" src="js/emuiLogrocket.6ad9571e5a26058d30f7.js"></script></head><body></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Library Boilerplate</title><script defer="defer" src="js/emuiLogrocket.c10e8c39d0b4c53d027f.js"></script></head><body></body></html>