@xyo-network/shared 2.75.15 → 2.75.17
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/docs.json +58 -58
- package/package.json +4 -4
- package/dist/browser/IdLogger.cjs +0 -79
- package/dist/browser/IdLogger.cjs.map +0 -1
- package/dist/browser/IdLogger.js +0 -56
- package/dist/browser/IdLogger.js.map +0 -1
- package/dist/browser/Job/Job.cjs +0 -19
- package/dist/browser/Job/Job.cjs.map +0 -1
- package/dist/browser/Job/Job.js +0 -1
- package/dist/browser/Job/Job.js.map +0 -1
- package/dist/browser/Job/JobProvider.cjs +0 -19
- package/dist/browser/Job/JobProvider.cjs.map +0 -1
- package/dist/browser/Job/JobProvider.js +0 -1
- package/dist/browser/Job/JobProvider.js.map +0 -1
- package/dist/browser/Job/Task.cjs +0 -19
- package/dist/browser/Job/Task.cjs.map +0 -1
- package/dist/browser/Job/Task.js +0 -1
- package/dist/browser/Job/Task.js.map +0 -1
- package/dist/browser/Job/index.cjs +0 -19
- package/dist/browser/Job/index.cjs.map +0 -1
- package/dist/browser/Job/index.js +0 -1
- package/dist/browser/Job/index.js.map +0 -1
- package/dist/browser/Logger.cjs +0 -46
- package/dist/browser/Logger.cjs.map +0 -1
- package/dist/browser/Logger.js +0 -25
- package/dist/browser/Logger.js.map +0 -1
- package/dist/browser/dump.cjs +0 -42
- package/dist/browser/dump.cjs.map +0 -1
- package/dist/browser/dump.js +0 -21
- package/dist/browser/dump.js.map +0 -1
- package/dist/browser/is-ip/index.cjs +0 -67
- package/dist/browser/is-ip/index.cjs.map +0 -1
- package/dist/browser/is-ip/index.js +0 -44
- package/dist/browser/is-ip/index.js.map +0 -1
- package/dist/browser/is-ip/ip-regex.cjs +0 -48
- package/dist/browser/is-ip/ip-regex.cjs.map +0 -1
- package/dist/browser/is-ip/ip-regex.js +0 -27
- package/dist/browser/is-ip/ip-regex.js.map +0 -1
- package/dist/browser/is-ip/is-ip.cjs +0 -67
- package/dist/browser/is-ip/is-ip.cjs.map +0 -1
- package/dist/browser/is-ip/is-ip.js +0 -44
- package/dist/browser/is-ip/is-ip.js.map +0 -1
- package/dist/node/IdLogger.js +0 -89
- package/dist/node/IdLogger.js.map +0 -1
- package/dist/node/IdLogger.mjs +0 -62
- package/dist/node/IdLogger.mjs.map +0 -1
- package/dist/node/Job/Job.js +0 -19
- package/dist/node/Job/Job.js.map +0 -1
- package/dist/node/Job/Job.mjs +0 -1
- package/dist/node/Job/Job.mjs.map +0 -1
- package/dist/node/Job/JobProvider.js +0 -19
- package/dist/node/Job/JobProvider.js.map +0 -1
- package/dist/node/Job/JobProvider.mjs +0 -1
- package/dist/node/Job/JobProvider.mjs.map +0 -1
- package/dist/node/Job/Task.js +0 -19
- package/dist/node/Job/Task.js.map +0 -1
- package/dist/node/Job/Task.mjs +0 -1
- package/dist/node/Job/Task.mjs.map +0 -1
- package/dist/node/Job/index.js +0 -19
- package/dist/node/Job/index.js.map +0 -1
- package/dist/node/Job/index.mjs +0 -1
- package/dist/node/Job/index.mjs.map +0 -1
- package/dist/node/Logger.js +0 -51
- package/dist/node/Logger.js.map +0 -1
- package/dist/node/Logger.mjs +0 -26
- package/dist/node/Logger.mjs.map +0 -1
- package/dist/node/dump.js +0 -46
- package/dist/node/dump.js.map +0 -1
- package/dist/node/dump.mjs +0 -21
- package/dist/node/dump.mjs.map +0 -1
- package/dist/node/is-ip/index.js +0 -74
- package/dist/node/is-ip/index.js.map +0 -1
- package/dist/node/is-ip/index.mjs +0 -44
- package/dist/node/is-ip/index.mjs.map +0 -1
- package/dist/node/is-ip/ip-regex.js +0 -52
- package/dist/node/is-ip/ip-regex.js.map +0 -1
- package/dist/node/is-ip/ip-regex.mjs +0 -27
- package/dist/node/is-ip/ip-regex.mjs.map +0 -1
- package/dist/node/is-ip/is-ip.js +0 -74
- package/dist/node/is-ip/is-ip.js.map +0 -1
- package/dist/node/is-ip/is-ip.mjs +0 -44
- package/dist/node/is-ip/is-ip.mjs.map +0 -1
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
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
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/is-ip/is-ip.ts
|
|
21
|
-
var is_ip_exports = {};
|
|
22
|
-
__export(is_ip_exports, {
|
|
23
|
-
ipVersion: () => ipVersion,
|
|
24
|
-
isIP: () => isIP,
|
|
25
|
-
isIPv4: () => isIPv4,
|
|
26
|
-
isIPv6: () => isIPv6
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(is_ip_exports);
|
|
29
|
-
|
|
30
|
-
// src/is-ip/ip-regex.ts
|
|
31
|
-
var word = "[a-fA-F\\d:]";
|
|
32
|
-
var boundry = (options) => options && options.includeBoundaries ? `(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))` : "";
|
|
33
|
-
var v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
|
|
34
|
-
var v6segment = "[a-fA-F\\d]{1,4}";
|
|
35
|
-
var v6 = `
|
|
36
|
-
(?:
|
|
37
|
-
(?:${v6segment}:){7}(?:${v6segment}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
38
|
-
(?:${v6segment}:){6}(?:${v4}|:${v6segment}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
39
|
-
(?:${v6segment}:){5}(?::${v4}|(?::${v6segment}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
|
40
|
-
(?:${v6segment}:){4}(?:(?::${v6segment}){0,1}:${v4}|(?::${v6segment}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
|
41
|
-
(?:${v6segment}:){3}(?:(?::${v6segment}){0,2}:${v4}|(?::${v6segment}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
|
42
|
-
(?:${v6segment}:){2}(?:(?::${v6segment}){0,3}:${v4}|(?::${v6segment}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
43
|
-
(?:${v6segment}:){1}(?:(?::${v6segment}){0,4}:${v4}|(?::${v6segment}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
44
|
-
(?::(?:(?::${v6segment}){0,5}:${v4}|(?::${v6segment}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
45
|
-
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
46
|
-
`.replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
|
|
47
|
-
var v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`);
|
|
48
|
-
var v4exact = new RegExp(`^${v4}$`);
|
|
49
|
-
var v6exact = new RegExp(`^${v6}$`);
|
|
50
|
-
var ipRegex = (options) => options && options.exact ? v46Exact : new RegExp(`(?:${boundry(options)}${v4}${boundry(options)})|(?:${boundry(options)}${v6}${boundry(options)})`, "g");
|
|
51
|
-
ipRegex.v4 = (options) => options && options.exact ? v4exact : new RegExp(`${boundry(options)}${v4}${boundry(options)}`, "g");
|
|
52
|
-
ipRegex.v6 = (options) => options && options.exact ? v6exact : new RegExp(`${boundry(options)}${v6}${boundry(options)}`, "g");
|
|
53
|
-
|
|
54
|
-
// src/is-ip/is-ip.ts
|
|
55
|
-
function isIP(value) {
|
|
56
|
-
return ipRegex({ exact: true }).test(value);
|
|
57
|
-
}
|
|
58
|
-
function isIPv6(value) {
|
|
59
|
-
return ipRegex.v6({ exact: true }).test(value);
|
|
60
|
-
}
|
|
61
|
-
function isIPv4(value) {
|
|
62
|
-
return ipRegex.v4({ exact: true }).test(value);
|
|
63
|
-
}
|
|
64
|
-
function ipVersion(value) {
|
|
65
|
-
return isIP(value) ? isIPv6(value) ? 6 : 4 : void 0;
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=is-ip.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/is-ip/is-ip.ts","../../../src/is-ip/ip-regex.ts"],"sourcesContent":["import { ipRegex } from './ip-regex'\n\nexport function isIP(value: string) {\n return ipRegex({ exact: true }).test(value)\n}\n\nexport function isIPv6(value: string) {\n return ipRegex.v6({ exact: true }).test(value)\n}\n\nexport function isIPv4(value: string) {\n return ipRegex.v4({ exact: true }).test(value)\n}\n\nexport function ipVersion(value: string) {\n return isIP(value) ? (isIPv6(value) ? 6 : 4) : undefined\n}\n","const word = '[a-fA-F\\\\d:]'\n\nexport interface Options {\n readonly exact?: boolean\n readonly includeBoundaries?: boolean\n}\n\nconst boundry = (options: Options) => (options && options.includeBoundaries ? `(?:(?<=\\\\s|^)(?=${word})|(?<=${word})(?=\\\\s|$))` : '')\n\nconst v4 = '(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}'\n\nconst v6segment = '[a-fA-F\\\\d]{1,4}'\n\nconst v6 = `\n(?:\n(?:${v6segment}:){7}(?:${v6segment}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${v6segment}:){6}(?:${v4}|:${v6segment}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${v6segment}:){5}(?::${v4}|(?::${v6segment}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${v6segment}:){4}(?:(?::${v6segment}){0,1}:${v4}|(?::${v6segment}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${v6segment}:){3}(?:(?::${v6segment}){0,2}:${v4}|(?::${v6segment}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${v6segment}:){2}(?:(?::${v6segment}){0,3}:${v4}|(?::${v6segment}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${v6segment}:){1}(?:(?::${v6segment}){0,4}:${v4}|(?::${v6segment}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${v6segment}){0,5}:${v4}|(?::${v6segment}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`\n .replace(/\\s*\\/\\/.*$/gm, '')\n .replace(/\\n/g, '')\n .trim()\n\n// Pre-compile only the exact regexes because adding a global flag make regexes stateful\nconst v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`)\nconst v4exact = new RegExp(`^${v4}$`)\nconst v6exact = new RegExp(`^${v6}$`)\n\nexport const ipRegex = (options: Options) =>\n options && options.exact\n ? v46Exact\n : new RegExp(`(?:${boundry(options)}${v4}${boundry(options)})|(?:${boundry(options)}${v6}${boundry(options)})`, 'g')\n\nipRegex.v4 = (options: Options) => (options && options.exact ? v4exact : new RegExp(`${boundry(options)}${v4}${boundry(options)}`, 'g'))\nipRegex.v6 = (options: Options) => (options && options.exact ? v6exact : new RegExp(`${boundry(options)}${v6}${boundry(options)}`, 'g'))\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAM,OAAO;AAOb,IAAM,UAAU,CAAC,YAAsB,WAAW,QAAQ,oBAAoB,mBAAmB,IAAI,SAAS,IAAI,gBAAgB;AAElI,IAAM,KAAK;AAEX,IAAM,YAAY;AAElB,IAAM,KAAK;AAAA;AAAA,KAEN,SAAS,WAAW,SAAS;AAAA,KAC7B,SAAS,WAAW,EAAE,KAAK,SAAS;AAAA,KACpC,SAAS,YAAY,EAAE,QAAQ,SAAS;AAAA,KACxC,SAAS,eAAe,SAAS,UAAU,EAAE,QAAQ,SAAS;AAAA,KAC9D,SAAS,eAAe,SAAS,UAAU,EAAE,QAAQ,SAAS;AAAA,KAC9D,SAAS,eAAe,SAAS,UAAU,EAAE,QAAQ,SAAS;AAAA,KAC9D,SAAS,eAAe,SAAS,UAAU,EAAE,QAAQ,SAAS;AAAA,aACtD,SAAS,UAAU,EAAE,QAAQ,SAAS;AAAA;AAAA,EAGhD,QAAQ,gBAAgB,EAAE,EAC1B,QAAQ,OAAO,EAAE,EACjB,KAAK;AAGR,IAAM,WAAW,IAAI,OAAO,OAAO,EAAE,UAAU,EAAE,IAAI;AACrD,IAAM,UAAU,IAAI,OAAO,IAAI,EAAE,GAAG;AACpC,IAAM,UAAU,IAAI,OAAO,IAAI,EAAE,GAAG;AAE7B,IAAM,UAAU,CAAC,YACtB,WAAW,QAAQ,QACf,WACA,IAAI,OAAO,MAAM,QAAQ,OAAO,CAAC,GAAG,EAAE,GAAG,QAAQ,OAAO,CAAC,QAAQ,QAAQ,OAAO,CAAC,GAAG,EAAE,GAAG,QAAQ,OAAO,CAAC,KAAK,GAAG;AAEvH,QAAQ,KAAK,CAAC,YAAsB,WAAW,QAAQ,QAAQ,UAAU,IAAI,OAAO,GAAG,QAAQ,OAAO,CAAC,GAAG,EAAE,GAAG,QAAQ,OAAO,CAAC,IAAI,GAAG;AACtI,QAAQ,KAAK,CAAC,YAAsB,WAAW,QAAQ,QAAQ,UAAU,IAAI,OAAO,GAAG,QAAQ,OAAO,CAAC,GAAG,EAAE,GAAG,QAAQ,OAAO,CAAC,IAAI,GAAG;;;ADtC/H,SAAS,KAAK,OAAe;AAClC,SAAO,QAAQ,EAAE,OAAO,KAAK,CAAC,EAAE,KAAK,KAAK;AAC5C;AAEO,SAAS,OAAO,OAAe;AACpC,SAAO,QAAQ,GAAG,EAAE,OAAO,KAAK,CAAC,EAAE,KAAK,KAAK;AAC/C;AAEO,SAAS,OAAO,OAAe;AACpC,SAAO,QAAQ,GAAG,EAAE,OAAO,KAAK,CAAC,EAAE,KAAK,KAAK;AAC/C;AAEO,SAAS,UAAU,OAAe;AACvC,SAAO,KAAK,KAAK,IAAK,OAAO,KAAK,IAAI,IAAI,IAAK;AACjD;","names":[]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// src/is-ip/ip-regex.ts
|
|
2
|
-
var word = "[a-fA-F\\d:]";
|
|
3
|
-
var boundry = (options) => options && options.includeBoundaries ? `(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))` : "";
|
|
4
|
-
var v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
|
|
5
|
-
var v6segment = "[a-fA-F\\d]{1,4}";
|
|
6
|
-
var v6 = `
|
|
7
|
-
(?:
|
|
8
|
-
(?:${v6segment}:){7}(?:${v6segment}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
9
|
-
(?:${v6segment}:){6}(?:${v4}|:${v6segment}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
10
|
-
(?:${v6segment}:){5}(?::${v4}|(?::${v6segment}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
|
11
|
-
(?:${v6segment}:){4}(?:(?::${v6segment}){0,1}:${v4}|(?::${v6segment}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
|
12
|
-
(?:${v6segment}:){3}(?:(?::${v6segment}){0,2}:${v4}|(?::${v6segment}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
|
13
|
-
(?:${v6segment}:){2}(?:(?::${v6segment}){0,3}:${v4}|(?::${v6segment}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
14
|
-
(?:${v6segment}:){1}(?:(?::${v6segment}){0,4}:${v4}|(?::${v6segment}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
15
|
-
(?::(?:(?::${v6segment}){0,5}:${v4}|(?::${v6segment}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
16
|
-
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
17
|
-
`.replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
|
|
18
|
-
var v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`);
|
|
19
|
-
var v4exact = new RegExp(`^${v4}$`);
|
|
20
|
-
var v6exact = new RegExp(`^${v6}$`);
|
|
21
|
-
var ipRegex = (options) => options && options.exact ? v46Exact : new RegExp(`(?:${boundry(options)}${v4}${boundry(options)})|(?:${boundry(options)}${v6}${boundry(options)})`, "g");
|
|
22
|
-
ipRegex.v4 = (options) => options && options.exact ? v4exact : new RegExp(`${boundry(options)}${v4}${boundry(options)}`, "g");
|
|
23
|
-
ipRegex.v6 = (options) => options && options.exact ? v6exact : new RegExp(`${boundry(options)}${v6}${boundry(options)}`, "g");
|
|
24
|
-
|
|
25
|
-
// src/is-ip/is-ip.ts
|
|
26
|
-
function isIP(value) {
|
|
27
|
-
return ipRegex({ exact: true }).test(value);
|
|
28
|
-
}
|
|
29
|
-
function isIPv6(value) {
|
|
30
|
-
return ipRegex.v6({ exact: true }).test(value);
|
|
31
|
-
}
|
|
32
|
-
function isIPv4(value) {
|
|
33
|
-
return ipRegex.v4({ exact: true }).test(value);
|
|
34
|
-
}
|
|
35
|
-
function ipVersion(value) {
|
|
36
|
-
return isIP(value) ? isIPv6(value) ? 6 : 4 : void 0;
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
ipVersion,
|
|
40
|
-
isIP,
|
|
41
|
-
isIPv4,
|
|
42
|
-
isIPv6
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=is-ip.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/is-ip/ip-regex.ts","../../../src/is-ip/is-ip.ts"],"sourcesContent":["const word = '[a-fA-F\\\\d:]'\n\nexport interface Options {\n readonly exact?: boolean\n readonly includeBoundaries?: boolean\n}\n\nconst boundry = (options: Options) => (options && options.includeBoundaries ? `(?:(?<=\\\\s|^)(?=${word})|(?<=${word})(?=\\\\s|$))` : '')\n\nconst v4 = '(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}'\n\nconst v6segment = '[a-fA-F\\\\d]{1,4}'\n\nconst v6 = `\n(?:\n(?:${v6segment}:){7}(?:${v6segment}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${v6segment}:){6}(?:${v4}|:${v6segment}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${v6segment}:){5}(?::${v4}|(?::${v6segment}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${v6segment}:){4}(?:(?::${v6segment}){0,1}:${v4}|(?::${v6segment}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${v6segment}:){3}(?:(?::${v6segment}){0,2}:${v4}|(?::${v6segment}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${v6segment}:){2}(?:(?::${v6segment}){0,3}:${v4}|(?::${v6segment}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${v6segment}:){1}(?:(?::${v6segment}){0,4}:${v4}|(?::${v6segment}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${v6segment}){0,5}:${v4}|(?::${v6segment}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`\n .replace(/\\s*\\/\\/.*$/gm, '')\n .replace(/\\n/g, '')\n .trim()\n\n// Pre-compile only the exact regexes because adding a global flag make regexes stateful\nconst v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`)\nconst v4exact = new RegExp(`^${v4}$`)\nconst v6exact = new RegExp(`^${v6}$`)\n\nexport const ipRegex = (options: Options) =>\n options && options.exact\n ? v46Exact\n : new RegExp(`(?:${boundry(options)}${v4}${boundry(options)})|(?:${boundry(options)}${v6}${boundry(options)})`, 'g')\n\nipRegex.v4 = (options: Options) => (options && options.exact ? v4exact : new RegExp(`${boundry(options)}${v4}${boundry(options)}`, 'g'))\nipRegex.v6 = (options: Options) => (options && options.exact ? v6exact : new RegExp(`${boundry(options)}${v6}${boundry(options)}`, 'g'))\n","import { ipRegex } from './ip-regex'\n\nexport function isIP(value: string) {\n return ipRegex({ exact: true }).test(value)\n}\n\nexport function isIPv6(value: string) {\n return ipRegex.v6({ exact: true }).test(value)\n}\n\nexport function isIPv4(value: string) {\n return ipRegex.v4({ exact: true }).test(value)\n}\n\nexport function ipVersion(value: string) {\n return isIP(value) ? (isIPv6(value) ? 6 : 4) : undefined\n}\n"],"mappings":";AAAA,IAAM,OAAO;AAOb,IAAM,UAAU,CAAC,YAAsB,WAAW,QAAQ,oBAAoB,mBAAmB,IAAI,SAAS,IAAI,gBAAgB;AAElI,IAAM,KAAK;AAEX,IAAM,YAAY;AAElB,IAAM,KAAK;AAAA;AAAA,KAEN,SAAS,WAAW,SAAS;AAAA,KAC7B,SAAS,WAAW,EAAE,KAAK,SAAS;AAAA,KACpC,SAAS,YAAY,EAAE,QAAQ,SAAS;AAAA,KACxC,SAAS,eAAe,SAAS,UAAU,EAAE,QAAQ,SAAS;AAAA,KAC9D,SAAS,eAAe,SAAS,UAAU,EAAE,QAAQ,SAAS;AAAA,KAC9D,SAAS,eAAe,SAAS,UAAU,EAAE,QAAQ,SAAS;AAAA,KAC9D,SAAS,eAAe,SAAS,UAAU,EAAE,QAAQ,SAAS;AAAA,aACtD,SAAS,UAAU,EAAE,QAAQ,SAAS;AAAA;AAAA,EAGhD,QAAQ,gBAAgB,EAAE,EAC1B,QAAQ,OAAO,EAAE,EACjB,KAAK;AAGR,IAAM,WAAW,IAAI,OAAO,OAAO,EAAE,UAAU,EAAE,IAAI;AACrD,IAAM,UAAU,IAAI,OAAO,IAAI,EAAE,GAAG;AACpC,IAAM,UAAU,IAAI,OAAO,IAAI,EAAE,GAAG;AAE7B,IAAM,UAAU,CAAC,YACtB,WAAW,QAAQ,QACf,WACA,IAAI,OAAO,MAAM,QAAQ,OAAO,CAAC,GAAG,EAAE,GAAG,QAAQ,OAAO,CAAC,QAAQ,QAAQ,OAAO,CAAC,GAAG,EAAE,GAAG,QAAQ,OAAO,CAAC,KAAK,GAAG;AAEvH,QAAQ,KAAK,CAAC,YAAsB,WAAW,QAAQ,QAAQ,UAAU,IAAI,OAAO,GAAG,QAAQ,OAAO,CAAC,GAAG,EAAE,GAAG,QAAQ,OAAO,CAAC,IAAI,GAAG;AACtI,QAAQ,KAAK,CAAC,YAAsB,WAAW,QAAQ,QAAQ,UAAU,IAAI,OAAO,GAAG,QAAQ,OAAO,CAAC,GAAG,EAAE,GAAG,QAAQ,OAAO,CAAC,IAAI,GAAG;;;ACtC/H,SAAS,KAAK,OAAe;AAClC,SAAO,QAAQ,EAAE,OAAO,KAAK,CAAC,EAAE,KAAK,KAAK;AAC5C;AAEO,SAAS,OAAO,OAAe;AACpC,SAAO,QAAQ,GAAG,EAAE,OAAO,KAAK,CAAC,EAAE,KAAK,KAAK;AAC/C;AAEO,SAAS,OAAO,OAAe;AACpC,SAAO,QAAQ,GAAG,EAAE,OAAO,KAAK,CAAC,EAAE,KAAK,KAAK;AAC/C;AAEO,SAAS,UAAU,OAAe;AACvC,SAAO,KAAK,KAAK,IAAK,OAAO,KAAK,IAAI,IAAI,IAAK;AACjD;","names":[]}
|
package/dist/node/IdLogger.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
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
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/IdLogger.ts
|
|
21
|
-
var IdLogger_exports = {};
|
|
22
|
-
__export(IdLogger_exports, {
|
|
23
|
-
IdLogger: () => IdLogger
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(IdLogger_exports);
|
|
26
|
-
|
|
27
|
-
// src/Logger.ts
|
|
28
|
-
var import_error = require("@xyo-network/error");
|
|
29
|
-
var getFunctionName = (depth = 2) => {
|
|
30
|
-
try {
|
|
31
|
-
throw Error();
|
|
32
|
-
} catch (ex) {
|
|
33
|
-
return (0, import_error.handleError)(ex, (error) => {
|
|
34
|
-
var _a;
|
|
35
|
-
let newIndex = void 0;
|
|
36
|
-
const stackParts = (_a = error.stack) == null ? void 0 : _a.split("\n")[depth].split(" ");
|
|
37
|
-
const funcName = (stackParts == null ? void 0 : stackParts.find((item, index) => {
|
|
38
|
-
if (item.length > 0 && item !== "at") {
|
|
39
|
-
if (item === "new") {
|
|
40
|
-
newIndex = index;
|
|
41
|
-
}
|
|
42
|
-
return item;
|
|
43
|
-
}
|
|
44
|
-
})) ?? "<unknown>";
|
|
45
|
-
return newIndex ? `${funcName} ${stackParts == null ? void 0 : stackParts[newIndex + 1]}` : funcName;
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// src/IdLogger.ts
|
|
51
|
-
var IdLogger = class {
|
|
52
|
-
_id;
|
|
53
|
-
_logger;
|
|
54
|
-
constructor(logger, id) {
|
|
55
|
-
this._logger = logger;
|
|
56
|
-
this._id = id;
|
|
57
|
-
}
|
|
58
|
-
set id(id) {
|
|
59
|
-
this._id = () => id;
|
|
60
|
-
}
|
|
61
|
-
debug(message) {
|
|
62
|
-
var _a;
|
|
63
|
-
(_a = this._logger) == null ? void 0 : _a.debug(this.generate(message, getFunctionName(3)));
|
|
64
|
-
}
|
|
65
|
-
error(message) {
|
|
66
|
-
var _a;
|
|
67
|
-
(_a = this._logger) == null ? void 0 : _a.error(this.generate(message, getFunctionName(3)));
|
|
68
|
-
}
|
|
69
|
-
info(message) {
|
|
70
|
-
var _a;
|
|
71
|
-
(_a = this._logger) == null ? void 0 : _a.info(this.generate(message, getFunctionName(3)));
|
|
72
|
-
}
|
|
73
|
-
log(message) {
|
|
74
|
-
var _a;
|
|
75
|
-
(_a = this._logger) == null ? void 0 : _a.log(this.generate(message, getFunctionName(3)));
|
|
76
|
-
}
|
|
77
|
-
warn(message) {
|
|
78
|
-
var _a;
|
|
79
|
-
(_a = this._logger) == null ? void 0 : _a.warn(this.generate(message, getFunctionName(3)));
|
|
80
|
-
}
|
|
81
|
-
generate(message, tag) {
|
|
82
|
-
return `${tag} ${this._id ? `[${this._id}] ` : ""}${typeof message === "string" ? message : typeof message === "object" ? JSON.stringify(message, null, 2) : `${message}`}`;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
86
|
-
0 && (module.exports = {
|
|
87
|
-
IdLogger
|
|
88
|
-
});
|
|
89
|
-
//# sourceMappingURL=IdLogger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/IdLogger.ts","../../src/Logger.ts"],"sourcesContent":["import { getFunctionName, Logger } from './Logger'\n\nexport class IdLogger implements Logger {\n private _id?: () => string\n private _logger: Logger\n\n constructor(logger: Logger, id?: () => string) {\n this._logger = logger\n this._id = id\n }\n\n set id(id: string) {\n this._id = () => id\n }\n\n debug(message?: unknown) {\n this._logger?.debug(this.generate(message, getFunctionName(3)))\n }\n error(message?: unknown) {\n this._logger?.error(this.generate(message, getFunctionName(3)))\n }\n info(message?: unknown) {\n this._logger?.info(this.generate(message, getFunctionName(3)))\n }\n log(message?: unknown) {\n this._logger?.log(this.generate(message, getFunctionName(3)))\n }\n warn(message?: unknown) {\n this._logger?.warn(this.generate(message, getFunctionName(3)))\n }\n\n private generate(message?: unknown, tag?: string) {\n return `${tag} ${this._id ? `[${this._id}] ` : ''}${\n typeof message === 'string' ? message : typeof message === 'object' ? JSON.stringify(message, null, 2) : `${message}`\n }`\n }\n}\n","export type LogFunction = (message?: unknown) => void\nimport { handleError } from '@xyo-network/error'\n\n/**\n * Interface to handle overlap between Winston &\n * `console` with as much congruency as possible.\n */\nexport interface Logger {\n debug: LogFunction\n error: LogFunction\n info: LogFunction\n log: LogFunction\n // trace: LogFunction\n warn: LogFunction\n}\n\nexport const getFunctionName = (depth = 2) => {\n try {\n throw Error()\n } catch (ex) {\n return handleError(ex, (error) => {\n let newIndex: number | undefined = undefined\n const stackParts = error.stack?.split('\\n')[depth].split(' ')\n const funcName =\n stackParts?.find((item, index) => {\n if (item.length > 0 && item !== 'at') {\n //check if constructor\n if (item === 'new') {\n newIndex = index\n }\n return item\n }\n }) ?? '<unknown>'\n return newIndex ? `${funcName} ${stackParts?.[newIndex + 1]}` : funcName\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,mBAA4B;AAerB,IAAM,kBAAkB,CAAC,QAAQ,MAAM;AAC5C,MAAI;AACF,UAAM,MAAM;AAAA,EACd,SAAS,IAAI;AACX,eAAO,0BAAY,IAAI,CAAC,UAAU;AApBtC;AAqBM,UAAI,WAA+B;AACnC,YAAM,cAAa,WAAM,UAAN,mBAAa,MAAM,MAAM,OAAO,MAAM;AACzD,YAAM,YACJ,yCAAY,KAAK,CAAC,MAAM,UAAU;AAChC,YAAI,KAAK,SAAS,KAAK,SAAS,MAAM;AAEpC,cAAI,SAAS,OAAO;AAClB,uBAAW;AAAA,UACb;AACA,iBAAO;AAAA,QACT;AAAA,MACF,OAAM;AACR,aAAO,WAAW,GAAG,QAAQ,IAAI,yCAAa,WAAW,EAAE,KAAK;AAAA,IAClE,CAAC;AAAA,EACH;AACF;;;ADlCO,IAAM,WAAN,MAAiC;AAAA,EAC9B;AAAA,EACA;AAAA,EAER,YAAY,QAAgB,IAAmB;AAC7C,SAAK,UAAU;AACf,SAAK,MAAM;AAAA,EACb;AAAA,EAEA,IAAI,GAAG,IAAY;AACjB,SAAK,MAAM,MAAM;AAAA,EACnB;AAAA,EAEA,MAAM,SAAmB;AAf3B;AAgBI,eAAK,YAAL,mBAAc,MAAM,KAAK,SAAS,SAAS,gBAAgB,CAAC,CAAC;AAAA,EAC/D;AAAA,EACA,MAAM,SAAmB;AAlB3B;AAmBI,eAAK,YAAL,mBAAc,MAAM,KAAK,SAAS,SAAS,gBAAgB,CAAC,CAAC;AAAA,EAC/D;AAAA,EACA,KAAK,SAAmB;AArB1B;AAsBI,eAAK,YAAL,mBAAc,KAAK,KAAK,SAAS,SAAS,gBAAgB,CAAC,CAAC;AAAA,EAC9D;AAAA,EACA,IAAI,SAAmB;AAxBzB;AAyBI,eAAK,YAAL,mBAAc,IAAI,KAAK,SAAS,SAAS,gBAAgB,CAAC,CAAC;AAAA,EAC7D;AAAA,EACA,KAAK,SAAmB;AA3B1B;AA4BI,eAAK,YAAL,mBAAc,KAAK,KAAK,SAAS,SAAS,gBAAgB,CAAC,CAAC;AAAA,EAC9D;AAAA,EAEQ,SAAS,SAAmB,KAAc;AAChD,WAAO,GAAG,GAAG,IAAI,KAAK,MAAM,IAAI,KAAK,GAAG,OAAO,EAAE,GAC/C,OAAO,YAAY,WAAW,UAAU,OAAO,YAAY,WAAW,KAAK,UAAU,SAAS,MAAM,CAAC,IAAI,GAAG,OAAO,EACrH;AAAA,EACF;AACF;","names":[]}
|
package/dist/node/IdLogger.mjs
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// src/Logger.ts
|
|
2
|
-
import { handleError } from "@xyo-network/error";
|
|
3
|
-
var getFunctionName = (depth = 2) => {
|
|
4
|
-
try {
|
|
5
|
-
throw Error();
|
|
6
|
-
} catch (ex) {
|
|
7
|
-
return handleError(ex, (error) => {
|
|
8
|
-
var _a;
|
|
9
|
-
let newIndex = void 0;
|
|
10
|
-
const stackParts = (_a = error.stack) == null ? void 0 : _a.split("\n")[depth].split(" ");
|
|
11
|
-
const funcName = (stackParts == null ? void 0 : stackParts.find((item, index) => {
|
|
12
|
-
if (item.length > 0 && item !== "at") {
|
|
13
|
-
if (item === "new") {
|
|
14
|
-
newIndex = index;
|
|
15
|
-
}
|
|
16
|
-
return item;
|
|
17
|
-
}
|
|
18
|
-
})) ?? "<unknown>";
|
|
19
|
-
return newIndex ? `${funcName} ${stackParts == null ? void 0 : stackParts[newIndex + 1]}` : funcName;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
// src/IdLogger.ts
|
|
25
|
-
var IdLogger = class {
|
|
26
|
-
_id;
|
|
27
|
-
_logger;
|
|
28
|
-
constructor(logger, id) {
|
|
29
|
-
this._logger = logger;
|
|
30
|
-
this._id = id;
|
|
31
|
-
}
|
|
32
|
-
set id(id) {
|
|
33
|
-
this._id = () => id;
|
|
34
|
-
}
|
|
35
|
-
debug(message) {
|
|
36
|
-
var _a;
|
|
37
|
-
(_a = this._logger) == null ? void 0 : _a.debug(this.generate(message, getFunctionName(3)));
|
|
38
|
-
}
|
|
39
|
-
error(message) {
|
|
40
|
-
var _a;
|
|
41
|
-
(_a = this._logger) == null ? void 0 : _a.error(this.generate(message, getFunctionName(3)));
|
|
42
|
-
}
|
|
43
|
-
info(message) {
|
|
44
|
-
var _a;
|
|
45
|
-
(_a = this._logger) == null ? void 0 : _a.info(this.generate(message, getFunctionName(3)));
|
|
46
|
-
}
|
|
47
|
-
log(message) {
|
|
48
|
-
var _a;
|
|
49
|
-
(_a = this._logger) == null ? void 0 : _a.log(this.generate(message, getFunctionName(3)));
|
|
50
|
-
}
|
|
51
|
-
warn(message) {
|
|
52
|
-
var _a;
|
|
53
|
-
(_a = this._logger) == null ? void 0 : _a.warn(this.generate(message, getFunctionName(3)));
|
|
54
|
-
}
|
|
55
|
-
generate(message, tag) {
|
|
56
|
-
return `${tag} ${this._id ? `[${this._id}] ` : ""}${typeof message === "string" ? message : typeof message === "object" ? JSON.stringify(message, null, 2) : `${message}`}`;
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
export {
|
|
60
|
-
IdLogger
|
|
61
|
-
};
|
|
62
|
-
//# sourceMappingURL=IdLogger.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Logger.ts","../../src/IdLogger.ts"],"sourcesContent":["export type LogFunction = (message?: unknown) => void\nimport { handleError } from '@xyo-network/error'\n\n/**\n * Interface to handle overlap between Winston &\n * `console` with as much congruency as possible.\n */\nexport interface Logger {\n debug: LogFunction\n error: LogFunction\n info: LogFunction\n log: LogFunction\n // trace: LogFunction\n warn: LogFunction\n}\n\nexport const getFunctionName = (depth = 2) => {\n try {\n throw Error()\n } catch (ex) {\n return handleError(ex, (error) => {\n let newIndex: number | undefined = undefined\n const stackParts = error.stack?.split('\\n')[depth].split(' ')\n const funcName =\n stackParts?.find((item, index) => {\n if (item.length > 0 && item !== 'at') {\n //check if constructor\n if (item === 'new') {\n newIndex = index\n }\n return item\n }\n }) ?? '<unknown>'\n return newIndex ? `${funcName} ${stackParts?.[newIndex + 1]}` : funcName\n })\n }\n}\n","import { getFunctionName, Logger } from './Logger'\n\nexport class IdLogger implements Logger {\n private _id?: () => string\n private _logger: Logger\n\n constructor(logger: Logger, id?: () => string) {\n this._logger = logger\n this._id = id\n }\n\n set id(id: string) {\n this._id = () => id\n }\n\n debug(message?: unknown) {\n this._logger?.debug(this.generate(message, getFunctionName(3)))\n }\n error(message?: unknown) {\n this._logger?.error(this.generate(message, getFunctionName(3)))\n }\n info(message?: unknown) {\n this._logger?.info(this.generate(message, getFunctionName(3)))\n }\n log(message?: unknown) {\n this._logger?.log(this.generate(message, getFunctionName(3)))\n }\n warn(message?: unknown) {\n this._logger?.warn(this.generate(message, getFunctionName(3)))\n }\n\n private generate(message?: unknown, tag?: string) {\n return `${tag} ${this._id ? `[${this._id}] ` : ''}${\n typeof message === 'string' ? message : typeof message === 'object' ? JSON.stringify(message, null, 2) : `${message}`\n }`\n }\n}\n"],"mappings":";AACA,SAAS,mBAAmB;AAerB,IAAM,kBAAkB,CAAC,QAAQ,MAAM;AAC5C,MAAI;AACF,UAAM,MAAM;AAAA,EACd,SAAS,IAAI;AACX,WAAO,YAAY,IAAI,CAAC,UAAU;AApBtC;AAqBM,UAAI,WAA+B;AACnC,YAAM,cAAa,WAAM,UAAN,mBAAa,MAAM,MAAM,OAAO,MAAM;AACzD,YAAM,YACJ,yCAAY,KAAK,CAAC,MAAM,UAAU;AAChC,YAAI,KAAK,SAAS,KAAK,SAAS,MAAM;AAEpC,cAAI,SAAS,OAAO;AAClB,uBAAW;AAAA,UACb;AACA,iBAAO;AAAA,QACT;AAAA,MACF,OAAM;AACR,aAAO,WAAW,GAAG,QAAQ,IAAI,yCAAa,WAAW,EAAE,KAAK;AAAA,IAClE,CAAC;AAAA,EACH;AACF;;;AClCO,IAAM,WAAN,MAAiC;AAAA,EAC9B;AAAA,EACA;AAAA,EAER,YAAY,QAAgB,IAAmB;AAC7C,SAAK,UAAU;AACf,SAAK,MAAM;AAAA,EACb;AAAA,EAEA,IAAI,GAAG,IAAY;AACjB,SAAK,MAAM,MAAM;AAAA,EACnB;AAAA,EAEA,MAAM,SAAmB;AAf3B;AAgBI,eAAK,YAAL,mBAAc,MAAM,KAAK,SAAS,SAAS,gBAAgB,CAAC,CAAC;AAAA,EAC/D;AAAA,EACA,MAAM,SAAmB;AAlB3B;AAmBI,eAAK,YAAL,mBAAc,MAAM,KAAK,SAAS,SAAS,gBAAgB,CAAC,CAAC;AAAA,EAC/D;AAAA,EACA,KAAK,SAAmB;AArB1B;AAsBI,eAAK,YAAL,mBAAc,KAAK,KAAK,SAAS,SAAS,gBAAgB,CAAC,CAAC;AAAA,EAC9D;AAAA,EACA,IAAI,SAAmB;AAxBzB;AAyBI,eAAK,YAAL,mBAAc,IAAI,KAAK,SAAS,SAAS,gBAAgB,CAAC,CAAC;AAAA,EAC7D;AAAA,EACA,KAAK,SAAmB;AA3B1B;AA4BI,eAAK,YAAL,mBAAc,KAAK,KAAK,SAAS,SAAS,gBAAgB,CAAC,CAAC;AAAA,EAC9D;AAAA,EAEQ,SAAS,SAAmB,KAAc;AAChD,WAAO,GAAG,GAAG,IAAI,KAAK,MAAM,IAAI,KAAK,GAAG,OAAO,EAAE,GAC/C,OAAO,YAAY,WAAW,UAAU,OAAO,YAAY,WAAW,KAAK,UAAU,SAAS,MAAM,CAAC,IAAI,GAAG,OAAO,EACrH;AAAA,EACF;AACF;","names":[]}
|
package/dist/node/Job/Job.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/Job/Job.ts
|
|
17
|
-
var Job_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(Job_exports);
|
|
19
|
-
//# sourceMappingURL=Job.js.map
|
package/dist/node/Job/Job.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Job/Job.ts"],"sourcesContent":["import { Task } from './Task'\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type VoidFunction = (...args: any[]) => void\n\nexport interface Job {\n name: string\n onComplete?: VoidFunction\n onFail?: VoidFunction\n onStart?: VoidFunction\n onSuccess?: VoidFunction\n schedule: string\n task: Task\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/node/Job/Job.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=Job.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/Job/JobProvider.ts
|
|
17
|
-
var JobProvider_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(JobProvider_exports);
|
|
19
|
-
//# sourceMappingURL=JobProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Job/JobProvider.ts"],"sourcesContent":["import { Job } from './Job'\n\nexport interface JobProvider {\n get jobs(): Job[]\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=JobProvider.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/node/Job/Task.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/Job/Task.ts
|
|
17
|
-
var Task_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(Task_exports);
|
|
19
|
-
//# sourceMappingURL=Task.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Job/Task.ts"],"sourcesContent":["export type Task = () => Promise<void>\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/node/Job/Task.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=Task.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/node/Job/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/Job/index.ts
|
|
17
|
-
var Job_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(Job_exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Job/index.ts"],"sourcesContent":["export * from './Job'\nexport * from './JobProvider'\nexport * from './Task'\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/node/Job/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/node/Logger.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
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
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/Logger.ts
|
|
21
|
-
var Logger_exports = {};
|
|
22
|
-
__export(Logger_exports, {
|
|
23
|
-
getFunctionName: () => getFunctionName
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(Logger_exports);
|
|
26
|
-
var import_error = require("@xyo-network/error");
|
|
27
|
-
var getFunctionName = (depth = 2) => {
|
|
28
|
-
try {
|
|
29
|
-
throw Error();
|
|
30
|
-
} catch (ex) {
|
|
31
|
-
return (0, import_error.handleError)(ex, (error) => {
|
|
32
|
-
var _a;
|
|
33
|
-
let newIndex = void 0;
|
|
34
|
-
const stackParts = (_a = error.stack) == null ? void 0 : _a.split("\n")[depth].split(" ");
|
|
35
|
-
const funcName = (stackParts == null ? void 0 : stackParts.find((item, index) => {
|
|
36
|
-
if (item.length > 0 && item !== "at") {
|
|
37
|
-
if (item === "new") {
|
|
38
|
-
newIndex = index;
|
|
39
|
-
}
|
|
40
|
-
return item;
|
|
41
|
-
}
|
|
42
|
-
})) ?? "<unknown>";
|
|
43
|
-
return newIndex ? `${funcName} ${stackParts == null ? void 0 : stackParts[newIndex + 1]}` : funcName;
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
-
0 && (module.exports = {
|
|
49
|
-
getFunctionName
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=Logger.js.map
|
package/dist/node/Logger.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Logger.ts"],"sourcesContent":["export type LogFunction = (message?: unknown) => void\nimport { handleError } from '@xyo-network/error'\n\n/**\n * Interface to handle overlap between Winston &\n * `console` with as much congruency as possible.\n */\nexport interface Logger {\n debug: LogFunction\n error: LogFunction\n info: LogFunction\n log: LogFunction\n // trace: LogFunction\n warn: LogFunction\n}\n\nexport const getFunctionName = (depth = 2) => {\n try {\n throw Error()\n } catch (ex) {\n return handleError(ex, (error) => {\n let newIndex: number | undefined = undefined\n const stackParts = error.stack?.split('\\n')[depth].split(' ')\n const funcName =\n stackParts?.find((item, index) => {\n if (item.length > 0 && item !== 'at') {\n //check if constructor\n if (item === 'new') {\n newIndex = index\n }\n return item\n }\n }) ?? '<unknown>'\n return newIndex ? `${funcName} ${stackParts?.[newIndex + 1]}` : funcName\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAA4B;AAerB,IAAM,kBAAkB,CAAC,QAAQ,MAAM;AAC5C,MAAI;AACF,UAAM,MAAM;AAAA,EACd,SAAS,IAAI;AACX,eAAO,0BAAY,IAAI,CAAC,UAAU;AApBtC;AAqBM,UAAI,WAA+B;AACnC,YAAM,cAAa,WAAM,UAAN,mBAAa,MAAM,MAAM,OAAO,MAAM;AACzD,YAAM,YACJ,yCAAY,KAAK,CAAC,MAAM,UAAU;AAChC,YAAI,KAAK,SAAS,KAAK,SAAS,MAAM;AAEpC,cAAI,SAAS,OAAO;AAClB,uBAAW;AAAA,UACb;AACA,iBAAO;AAAA,QACT;AAAA,MACF,OAAM;AACR,aAAO,WAAW,GAAG,QAAQ,IAAI,yCAAa,WAAW,EAAE,KAAK;AAAA,IAClE,CAAC;AAAA,EACH;AACF;","names":[]}
|
package/dist/node/Logger.mjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// src/Logger.ts
|
|
2
|
-
import { handleError } from "@xyo-network/error";
|
|
3
|
-
var getFunctionName = (depth = 2) => {
|
|
4
|
-
try {
|
|
5
|
-
throw Error();
|
|
6
|
-
} catch (ex) {
|
|
7
|
-
return handleError(ex, (error) => {
|
|
8
|
-
var _a;
|
|
9
|
-
let newIndex = void 0;
|
|
10
|
-
const stackParts = (_a = error.stack) == null ? void 0 : _a.split("\n")[depth].split(" ");
|
|
11
|
-
const funcName = (stackParts == null ? void 0 : stackParts.find((item, index) => {
|
|
12
|
-
if (item.length > 0 && item !== "at") {
|
|
13
|
-
if (item === "new") {
|
|
14
|
-
newIndex = index;
|
|
15
|
-
}
|
|
16
|
-
return item;
|
|
17
|
-
}
|
|
18
|
-
})) ?? "<unknown>";
|
|
19
|
-
return newIndex ? `${funcName} ${stackParts == null ? void 0 : stackParts[newIndex + 1]}` : funcName;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
getFunctionName
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=Logger.mjs.map
|
package/dist/node/Logger.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Logger.ts"],"sourcesContent":["export type LogFunction = (message?: unknown) => void\nimport { handleError } from '@xyo-network/error'\n\n/**\n * Interface to handle overlap between Winston &\n * `console` with as much congruency as possible.\n */\nexport interface Logger {\n debug: LogFunction\n error: LogFunction\n info: LogFunction\n log: LogFunction\n // trace: LogFunction\n warn: LogFunction\n}\n\nexport const getFunctionName = (depth = 2) => {\n try {\n throw Error()\n } catch (ex) {\n return handleError(ex, (error) => {\n let newIndex: number | undefined = undefined\n const stackParts = error.stack?.split('\\n')[depth].split(' ')\n const funcName =\n stackParts?.find((item, index) => {\n if (item.length > 0 && item !== 'at') {\n //check if constructor\n if (item === 'new') {\n newIndex = index\n }\n return item\n }\n }) ?? '<unknown>'\n return newIndex ? `${funcName} ${stackParts?.[newIndex + 1]}` : funcName\n })\n }\n}\n"],"mappings":";AACA,SAAS,mBAAmB;AAerB,IAAM,kBAAkB,CAAC,QAAQ,MAAM;AAC5C,MAAI;AACF,UAAM,MAAM;AAAA,EACd,SAAS,IAAI;AACX,WAAO,YAAY,IAAI,CAAC,UAAU;AApBtC;AAqBM,UAAI,WAA+B;AACnC,YAAM,cAAa,WAAM,UAAN,mBAAa,MAAM,MAAM,OAAO,MAAM;AACzD,YAAM,YACJ,yCAAY,KAAK,CAAC,MAAM,UAAU;AAChC,YAAI,KAAK,SAAS,KAAK,SAAS,MAAM;AAEpC,cAAI,SAAS,OAAO;AAClB,uBAAW;AAAA,UACb;AACA,iBAAO;AAAA,QACT;AAAA,MACF,OAAM;AACR,aAAO,WAAW,GAAG,QAAQ,IAAI,yCAAa,WAAW,EAAE,KAAK;AAAA,IAClE,CAAC;AAAA,EACH;AACF;","names":[]}
|
package/dist/node/dump.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
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
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/dump.ts
|
|
21
|
-
var dump_exports = {};
|
|
22
|
-
__export(dump_exports, {
|
|
23
|
-
dump: () => dump
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(dump_exports);
|
|
26
|
-
var dump = (obj) => {
|
|
27
|
-
const cache = [];
|
|
28
|
-
return JSON.stringify(
|
|
29
|
-
obj,
|
|
30
|
-
(key, value) => {
|
|
31
|
-
if (typeof value === "object" && value !== null) {
|
|
32
|
-
if (cache.includes(value)) {
|
|
33
|
-
return "[circular]";
|
|
34
|
-
}
|
|
35
|
-
cache.push(value);
|
|
36
|
-
}
|
|
37
|
-
return value;
|
|
38
|
-
},
|
|
39
|
-
2
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
-
0 && (module.exports = {
|
|
44
|
-
dump
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=dump.js.map
|
package/dist/node/dump.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/dump.ts"],"sourcesContent":["export const dump = (obj: unknown) => {\n const cache: unknown[] = []\n return JSON.stringify(\n obj,\n (key, value) => {\n if (typeof value === 'object' && value !== null) {\n // Duplicate reference found, discard key\n if (cache.includes(value)) {\n return '[circular]'\n }\n\n // Store value in our collection\n cache.push(value)\n }\n return value\n },\n 2,\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,OAAO,CAAC,QAAiB;AACpC,QAAM,QAAmB,CAAC;AAC1B,SAAO,KAAK;AAAA,IACV;AAAA,IACA,CAAC,KAAK,UAAU;AACd,UAAI,OAAO,UAAU,YAAY,UAAU,MAAM;AAE/C,YAAI,MAAM,SAAS,KAAK,GAAG;AACzB,iBAAO;AAAA,QACT;AAGA,cAAM,KAAK,KAAK;AAAA,MAClB;AACA,aAAO;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
package/dist/node/dump.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// src/dump.ts
|
|
2
|
-
var dump = (obj) => {
|
|
3
|
-
const cache = [];
|
|
4
|
-
return JSON.stringify(
|
|
5
|
-
obj,
|
|
6
|
-
(key, value) => {
|
|
7
|
-
if (typeof value === "object" && value !== null) {
|
|
8
|
-
if (cache.includes(value)) {
|
|
9
|
-
return "[circular]";
|
|
10
|
-
}
|
|
11
|
-
cache.push(value);
|
|
12
|
-
}
|
|
13
|
-
return value;
|
|
14
|
-
},
|
|
15
|
-
2
|
|
16
|
-
);
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
dump
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=dump.mjs.map
|
package/dist/node/dump.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/dump.ts"],"sourcesContent":["export const dump = (obj: unknown) => {\n const cache: unknown[] = []\n return JSON.stringify(\n obj,\n (key, value) => {\n if (typeof value === 'object' && value !== null) {\n // Duplicate reference found, discard key\n if (cache.includes(value)) {\n return '[circular]'\n }\n\n // Store value in our collection\n cache.push(value)\n }\n return value\n },\n 2,\n )\n}\n"],"mappings":";AAAO,IAAM,OAAO,CAAC,QAAiB;AACpC,QAAM,QAAmB,CAAC;AAC1B,SAAO,KAAK;AAAA,IACV;AAAA,IACA,CAAC,KAAK,UAAU;AACd,UAAI,OAAO,UAAU,YAAY,UAAU,MAAM;AAE/C,YAAI,MAAM,SAAS,KAAK,GAAG;AACzB,iBAAO;AAAA,QACT;AAGA,cAAM,KAAK,KAAK;AAAA,MAClB;AACA,aAAO;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|