@brizz/sdk 0.1.29 → 0.1.30

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,11 @@
1
+ import {
2
+ InterruptPropagator,
3
+ _resetInterruptState,
4
+ createInterruptIntegration
5
+ } from "./chunk-MWX3GIJW.js";
6
+ import "./chunk-RORIBZEV.js";
7
+ export {
8
+ InterruptPropagator,
9
+ _resetInterruptState,
10
+ createInterruptIntegration
11
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+ var _chunkLTXMCGVQcjs = require('./chunk-LTXMCGVQ.cjs');
6
+ require('./chunk-GCORRK6B.cjs');
7
+
8
+
9
+
10
+
11
+ exports.InterruptPropagator = _chunkLTXMCGVQcjs.InterruptPropagator; exports._resetInterruptState = _chunkLTXMCGVQcjs._resetInterruptState; exports.createInterruptIntegration = _chunkLTXMCGVQcjs.createInterruptIntegration;
package/dist/loader.mjs CHANGED
@@ -8,7 +8,8 @@ var loaderDebug = (() => {
8
8
  if (!isDebug) {
9
9
  return;
10
10
  }
11
- const timestamp = (/* @__PURE__ */ new Date()).toISOString();
11
+ const now = /* @__PURE__ */ new Date();
12
+ const timestamp = now.toISOString();
12
13
  const dataStr = data ? ` ${JSON.stringify(data)}` : "";
13
14
  console.log(`[${timestamp}] [ESM-LOADER] ${msg}${dataStr}`);
14
15
  },
@@ -16,7 +17,8 @@ var loaderDebug = (() => {
16
17
  if (!isDebug) {
17
18
  return;
18
19
  }
19
- const timestamp = (/* @__PURE__ */ new Date()).toISOString();
20
+ const now = /* @__PURE__ */ new Date();
21
+ const timestamp = now.toISOString();
20
22
  const errorStr = error instanceof Error ? ` ${error.message}` : error ? ` ${JSON.stringify(error)}` : "";
21
23
  console.error(`[${timestamp}] [ESM-LOADER] ERROR: ${msg}${errorStr}`);
22
24
  }
@@ -41,7 +43,7 @@ function maybeRegisterESMLoader() {
41
43
  loaderDebug.log("ESM loader already registered, skipping");
42
44
  return false;
43
45
  }
44
- globalThis[LOADER_REGISTERED_KEY] = true;
46
+ Reflect.set(globalThis, LOADER_REGISTERED_KEY, true);
45
47
  loaderDebug.log("Starting ESM loader registration...");
46
48
  if (!checkLoaderAPISupport()) {
47
49
  loaderDebug.log("Node.js version does not support loader API, skipping");
@@ -49,28 +51,28 @@ function maybeRegisterESMLoader() {
49
51
  }
50
52
  if (import.meta === void 0 || !import.meta.url) {
51
53
  loaderDebug.log("import.meta.url not available, skipping loader registration");
52
- globalThis[LOADER_REGISTERED_KEY] = false;
54
+ Reflect.set(globalThis, LOADER_REGISTERED_KEY, false);
53
55
  return false;
54
56
  }
55
57
  const isTest = process.env["NODE_ENV"] === "test" || process.env["JEST_WORKER_ID"] !== void 0;
56
58
  if (isTest) {
57
59
  loaderDebug.log("Test environment detected, skipping ESM loader registration");
58
- globalThis[LOADER_REGISTERED_KEY] = false;
60
+ Reflect.set(globalThis, LOADER_REGISTERED_KEY, false);
59
61
  return false;
60
62
  }
61
63
  try {
62
64
  loaderDebug.log("Creating MessageChannel for import-in-the-middle...");
63
- const { addHookMessagePort } = createAddHookMessageChannel();
65
+ const { addHookMessagePort: hookMessagePort } = createAddHookMessageChannel();
64
66
  loaderDebug.log("Registering import-in-the-middle/hook.mjs...");
65
67
  module.register("import-in-the-middle/hook.mjs", import.meta.url, {
66
- data: { addHookMessagePort },
67
- transferList: [addHookMessagePort]
68
+ data: { addHookMessagePort: hookMessagePort },
69
+ transferList: [hookMessagePort]
68
70
  });
69
71
  loaderDebug.log("ESM loader successfully registered!");
70
72
  return true;
71
73
  } catch (error) {
72
74
  loaderDebug.error("Failed to register ESM loader:", error);
73
- globalThis[LOADER_REGISTERED_KEY] = false;
75
+ Reflect.set(globalThis, LOADER_REGISTERED_KEY, false);
74
76
  return false;
75
77
  }
76
78
  }