@golemio/core 1.2.23 → 1.2.24

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,10 @@
1
+ /**
2
+ * Utils for the Node.js inspector
3
+ * @see https://nodejs.org/docs/latest-v18.x/api/inspector.html
4
+ */
5
+ export declare class InspectorUtils {
6
+ private static DEFAULT_HOST;
7
+ private static DEFAULT_PORT;
8
+ activateInspector(host?: string, port?: number): void;
9
+ deactivateInspector(): void;
10
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.InspectorUtils = void 0;
7
+ const node_inspector_1 = __importDefault(require("node:inspector"));
8
+ /**
9
+ * Utils for the Node.js inspector
10
+ * @see https://nodejs.org/docs/latest-v18.x/api/inspector.html
11
+ */
12
+ class InspectorUtils {
13
+ activateInspector(host = InspectorUtils.DEFAULT_HOST, port = InspectorUtils.DEFAULT_PORT) {
14
+ if (!node_inspector_1.default) {
15
+ return;
16
+ }
17
+ try {
18
+ node_inspector_1.default.open(port, host);
19
+ }
20
+ catch (err) {
21
+ if (err.code === "ERR_INSPECTOR_ALREADY_ACTIVATED" && node_inspector_1.default.url()) {
22
+ console.log(`Debugger listening on ${node_inspector_1.default.url()}`);
23
+ return;
24
+ }
25
+ throw err;
26
+ }
27
+ }
28
+ deactivateInspector() {
29
+ if (!node_inspector_1.default) {
30
+ return;
31
+ }
32
+ node_inspector_1.default.close();
33
+ }
34
+ }
35
+ exports.InspectorUtils = InspectorUtils;
36
+ InspectorUtils.DEFAULT_HOST = "127.0.0.1";
37
+ InspectorUtils.DEFAULT_PORT = 9229;
38
+ //# sourceMappingURL=InspectorUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InspectorUtils.js","sourceRoot":"","sources":["../../../src/helpers/inspector/InspectorUtils.ts"],"names":[],"mappings":";;;;;;AAAA,oEAAuC;AAEvC;;;GAGG;AACH,MAAa,cAAc;IAIhB,iBAAiB,CAAC,IAAI,GAAG,cAAc,CAAC,YAAY,EAAE,IAAI,GAAG,cAAc,CAAC,YAAY;QAC3F,IAAI,CAAC,wBAAS,EAAE;YACZ,OAAO;SACV;QAED,IAAI;YACA,wBAAS,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SAC9B;QAAC,OAAO,GAAG,EAAE;YACV,IAAI,GAAG,CAAC,IAAI,KAAK,iCAAiC,IAAI,wBAAS,CAAC,GAAG,EAAE,EAAE;gBACnE,OAAO,CAAC,GAAG,CAAC,yBAAyB,wBAAS,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;gBACxD,OAAO;aACV;YAED,MAAM,GAAG,CAAC;SACb;IACL,CAAC;IAEM,mBAAmB;QACtB,IAAI,CAAC,wBAAS,EAAE;YACZ,OAAO;SACV;QAED,wBAAS,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;;AA3BL,wCA4BC;AA3BkB,2BAAY,GAAG,WAAW,CAAC;AAC3B,2BAAY,GAAG,IAAI,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./InspectorUtils";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./InspectorUtils"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/inspector/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/core",
3
- "version": "1.2.23",
3
+ "version": "1.2.24",
4
4
  "description": "Golemio Core Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",