@vxrn/debug 1.27.0 → 1.27.1-1789509973946
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.cjs +39 -50
- package/dist/cjs/index.native.cjs +67 -0
- package/dist/cjs/index.native.js +47 -57
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/index.js +24 -24
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +24 -24
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +32 -32
- package/dist/esm/index.native.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -5,64 +5,53 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
12
|
};
|
|
13
13
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
21
|
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
-
value: mod,
|
|
29
|
-
enumerable: true
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
30
25
|
}) : target, mod));
|
|
31
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
}), mod);
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
27
|
var index_exports = {};
|
|
35
|
-
__export(index_exports, {
|
|
36
|
-
createDebugger: () => createDebugger
|
|
37
|
-
});
|
|
28
|
+
__export(index_exports, { createDebugger: () => createDebugger });
|
|
38
29
|
module.exports = __toCommonJS(index_exports);
|
|
39
30
|
var import_debug = __toESM(require("debug"), 1);
|
|
40
31
|
const DEBUG = process.env.DEBUG;
|
|
41
32
|
function createDebugger(namespacePartial, options = {}) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
return {
|
|
34
|
+
debug: createSingleDebugger(namespacePartial, options),
|
|
35
|
+
debugDetails: createSingleDebugger(namespacePartial, options)
|
|
36
|
+
};
|
|
46
37
|
}
|
|
47
38
|
function createSingleDebugger(namespacePartial, options = {}) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
}
|
|
39
|
+
const namespace = namespacePartial.includes(":") ? namespacePartial : `vxrn:${namespacePartial}`;
|
|
40
|
+
const log = (0, import_debug.default)(namespace);
|
|
41
|
+
const { onlyWhenFocused } = options;
|
|
42
|
+
let enabled = log.enabled;
|
|
43
|
+
if (enabled && onlyWhenFocused) {
|
|
44
|
+
const ns = typeof onlyWhenFocused === "string" ? onlyWhenFocused : namespace;
|
|
45
|
+
enabled = !!DEBUG?.includes(ns);
|
|
46
|
+
}
|
|
47
|
+
const filter = void 0;
|
|
48
|
+
if (enabled) {
|
|
49
|
+
const fn = (...args) => {
|
|
50
|
+
if (!filter || args.some((a) => a?.includes?.(filter))) {
|
|
51
|
+
log(...args);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
fn.namespace = namespace;
|
|
55
|
+
return fn;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
+
get: () => from[key],
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
25
|
+
value: mod,
|
|
26
|
+
enumerable: true
|
|
27
|
+
}) : target, mod));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var index_exports = {};
|
|
30
|
+
__export(index_exports, { createDebugger: () => createDebugger });
|
|
31
|
+
module.exports = __toCommonJS(index_exports);
|
|
32
|
+
var import_debug = __toESM(require("debug"), 1);
|
|
33
|
+
var DEBUG = process.env.DEBUG;
|
|
34
|
+
function createDebugger(namespacePartial) {
|
|
35
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
36
|
+
return {
|
|
37
|
+
debug: createSingleDebugger(namespacePartial, options),
|
|
38
|
+
debugDetails: createSingleDebugger(namespacePartial, options)
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function createSingleDebugger(namespacePartial) {
|
|
42
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
43
|
+
var namespace = namespacePartial.includes(":") ? namespacePartial : `vxrn:${namespacePartial}`;
|
|
44
|
+
var log = (0, import_debug.default)(namespace);
|
|
45
|
+
var { onlyWhenFocused } = options;
|
|
46
|
+
var enabled = log.enabled;
|
|
47
|
+
if (enabled && onlyWhenFocused) {
|
|
48
|
+
var ns = typeof onlyWhenFocused === "string" ? onlyWhenFocused : namespace;
|
|
49
|
+
enabled = !!(DEBUG === null || DEBUG === void 0 ? void 0 : DEBUG.includes(ns));
|
|
50
|
+
}
|
|
51
|
+
var filter = void 0;
|
|
52
|
+
if (enabled) {
|
|
53
|
+
var fn = function() {
|
|
54
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
55
|
+
args[_key] = arguments[_key];
|
|
56
|
+
}
|
|
57
|
+
if (!filter || args.some(function(a) {
|
|
58
|
+
var _a_includes;
|
|
59
|
+
return a === null || a === void 0 ? void 0 : (_a_includes = a.includes) === null || _a_includes === void 0 ? void 0 : _a_includes.call(a, filter);
|
|
60
|
+
})) {
|
|
61
|
+
log(...args);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
fn.namespace = namespace;
|
|
65
|
+
return fn;
|
|
66
|
+
}
|
|
67
|
+
}
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -7,73 +7,63 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
14
|
};
|
|
15
15
|
var __copyProps = (to, from, except, desc) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
+
get: () => from[key],
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
23
|
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
-
value: mod,
|
|
31
|
-
enumerable: true
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
25
|
+
value: mod,
|
|
26
|
+
enumerable: true
|
|
32
27
|
}) : target, mod));
|
|
33
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
-
value: true
|
|
35
|
-
}), mod);
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
29
|
var index_exports = {};
|
|
37
|
-
__export(index_exports, {
|
|
38
|
-
createDebugger: () => createDebugger
|
|
39
|
-
});
|
|
30
|
+
__export(index_exports, { createDebugger: () => createDebugger });
|
|
40
31
|
module.exports = __toCommonJS(index_exports);
|
|
41
32
|
var import_debug = __toESM(require("debug"), 1);
|
|
42
33
|
var DEBUG = process.env.DEBUG;
|
|
43
34
|
function createDebugger(namespacePartial) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
35
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
36
|
+
return {
|
|
37
|
+
debug: createSingleDebugger(namespacePartial, options),
|
|
38
|
+
debugDetails: createSingleDebugger(namespacePartial, options)
|
|
39
|
+
};
|
|
49
40
|
}
|
|
50
41
|
function createSingleDebugger(namespacePartial) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return fn;
|
|
77
|
-
}
|
|
42
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
43
|
+
var namespace = namespacePartial.includes(":") ? namespacePartial : `vxrn:${namespacePartial}`;
|
|
44
|
+
var log = (0, import_debug.default)(namespace);
|
|
45
|
+
var { onlyWhenFocused } = options;
|
|
46
|
+
var enabled = log.enabled;
|
|
47
|
+
if (enabled && onlyWhenFocused) {
|
|
48
|
+
var ns = typeof onlyWhenFocused === "string" ? onlyWhenFocused : namespace;
|
|
49
|
+
enabled = !!(DEBUG === null || DEBUG === void 0 ? void 0 : DEBUG.includes(ns));
|
|
50
|
+
}
|
|
51
|
+
var filter = void 0;
|
|
52
|
+
if (enabled) {
|
|
53
|
+
var fn = function() {
|
|
54
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
55
|
+
args[_key] = arguments[_key];
|
|
56
|
+
}
|
|
57
|
+
if (!filter || args.some(function(a) {
|
|
58
|
+
var _a_includes;
|
|
59
|
+
return a === null || a === void 0 ? void 0 : (_a_includes = a.includes) === null || _a_includes === void 0 ? void 0 : _a_includes.call(a, filter);
|
|
60
|
+
})) {
|
|
61
|
+
log(...args);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
fn.namespace = namespace;
|
|
65
|
+
return fn;
|
|
66
|
+
}
|
|
78
67
|
}
|
|
68
|
+
|
|
79
69
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n createDebugger: () => createDebugger\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_debug = __toESM(require(\"debug\"), 1);\nvar DEBUG = process.env.DEBUG;\nfunction createDebugger(namespacePartial) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n return {\n debug: createSingleDebugger(namespacePartial, options),\n debugDetails: createSingleDebugger(namespacePartial, options)\n };\n}\nfunction createSingleDebugger(namespacePartial) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var namespace = namespacePartial.includes(\":\") ? namespacePartial : `vxrn:${namespacePartial}`;\n var log = (0, import_debug.default)(namespace);\n var { onlyWhenFocused } = options;\n var enabled = log.enabled;\n if (enabled && onlyWhenFocused) {\n var ns = typeof onlyWhenFocused === \"string\" ? onlyWhenFocused : namespace;\n enabled = !!(DEBUG === null || DEBUG === void 0 ? void 0 : DEBUG.includes(ns));\n }\n var filter = void 0;\n if (enabled) {\n var fn = function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (!filter || args.some(function(a) {\n var _a_includes;\n return a === null || a === void 0 ? void 0 : (_a_includes = a.includes) === null || _a_includes === void 0 ? void 0 : _a_includes.call(a, filter);\n })) {\n log(...args);\n }\n };\n fn.namespace = namespace;\n return fn;\n }\n}\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,SAAS,eAAe,EACtB,sBAAsB,eACxB,CAAC;AACD,OAAO,UAAU,aAAa,aAAa;AAC3C,IAAI,eAAe,QAAQ,QAAQ,OAAO,GAAG,CAAC;AAC9C,IAAI,QAAQ,QAAQ,IAAI;AACxB,SAAS,eAAe,kBAAkB;CACxC,IAAI,UAAU,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CAChF,OAAO;EACL,OAAO,qBAAqB,kBAAkB,OAAO;EACrD,cAAc,qBAAqB,kBAAkB,OAAO;CAC9D;AACF;AACA,SAAS,qBAAqB,kBAAkB;CAC9C,IAAI,UAAU,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CAChF,IAAI,YAAY,iBAAiB,SAAS,GAAG,IAAI,mBAAmB,QAAQ;CAC5E,IAAI,OAAO,GAAG,aAAa,QAAO,CAAE,SAAS;CAC7C,IAAI,EAAE,oBAAoB;CAC1B,IAAI,UAAU,IAAI;CAClB,IAAI,WAAW,iBAAiB;EAC9B,IAAI,KAAK,OAAO,oBAAoB,WAAW,kBAAkB;EACjE,UAAU,CAAC,EAAE,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM,SAAS,EAAE;CAC9E;CACA,IAAI,SAAS,KAAK;CAClB,IAAI,SAAS;EACX,IAAI,KAAK,WAAW;GAClB,KAAK,IAAI,OAAO,UAAU,QAAQ,OAAO,IAAI,MAAM,IAAI,GAAG,OAAO,GAAG,OAAO,MAAM,QAAQ;IACvF,KAAK,QAAQ,UAAU;GACzB;GACA,IAAI,CAAC,UAAU,KAAK,KAAK,SAAS,GAAG;IACnC,IAAI;IACJ,OAAO,MAAM,QAAQ,MAAM,KAAK,IAAI,KAAK,KAAK,cAAc,EAAE,cAAc,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,KAAK,GAAG,MAAM;GAClJ,CAAC,GAAG;IACF,IAAI,GAAG,IAAI;GACb;EACF;EACA,GAAG,YAAY;EACf,OAAO;CACT;AACF"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import debug from "debug";
|
|
2
|
+
|
|
2
3
|
const DEBUG = process.env.DEBUG;
|
|
3
4
|
function createDebugger(namespacePartial, options = {}) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
return {
|
|
6
|
+
debug: createSingleDebugger(namespacePartial, options),
|
|
7
|
+
debugDetails: createSingleDebugger(namespacePartial, options)
|
|
8
|
+
};
|
|
8
9
|
}
|
|
9
10
|
function createSingleDebugger(namespacePartial, options = {}) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return fn;
|
|
29
|
-
}
|
|
11
|
+
const namespace = namespacePartial.includes(":") ? namespacePartial : `vxrn:${namespacePartial}`;
|
|
12
|
+
const log = debug(namespace);
|
|
13
|
+
const { onlyWhenFocused } = options;
|
|
14
|
+
let enabled = log.enabled;
|
|
15
|
+
if (enabled && onlyWhenFocused) {
|
|
16
|
+
const ns = typeof onlyWhenFocused === "string" ? onlyWhenFocused : namespace;
|
|
17
|
+
enabled = !!DEBUG?.includes(ns);
|
|
18
|
+
}
|
|
19
|
+
const filter = void 0;
|
|
20
|
+
if (enabled) {
|
|
21
|
+
const fn = (...args) => {
|
|
22
|
+
if (!filter || args.some((a) => a?.includes?.(filter))) {
|
|
23
|
+
log(...args);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
fn.namespace = namespace;
|
|
27
|
+
return fn;
|
|
28
|
+
}
|
|
30
29
|
}
|
|
30
|
+
|
|
31
31
|
export { createDebugger };
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import debug from \"debug\";\nconst DEBUG = process.env.DEBUG;\nfunction createDebugger(namespacePartial, options = {}) {\n return {\n debug: createSingleDebugger(namespacePartial, options),\n debugDetails: createSingleDebugger(namespacePartial, options)\n };\n}\nfunction createSingleDebugger(namespacePartial, options = {}) {\n const namespace = namespacePartial.includes(\":\") ? namespacePartial : `vxrn:${namespacePartial}`;\n const log = debug(namespace);\n const { onlyWhenFocused } = options;\n let enabled = log.enabled;\n if (enabled && onlyWhenFocused) {\n const ns = typeof onlyWhenFocused === \"string\" ? onlyWhenFocused : namespace;\n enabled = !!DEBUG?.includes(ns);\n }\n const filter = void 0;\n if (enabled) {\n const fn = (...args) => {\n if (!filter || args.some((a) => a?.includes?.(filter))) {\n log(...args);\n }\n };\n fn.namespace = namespace;\n return fn;\n }\n}\nexport {\n createDebugger\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,MAAM,QAAQ,QAAQ,IAAI;AAC1B,SAAS,eAAe,kBAAkB,UAAU,CAAC,GAAG;CACtD,OAAO;EACL,OAAO,qBAAqB,kBAAkB,OAAO;EACrD,cAAc,qBAAqB,kBAAkB,OAAO;CAC9D;AACF;AACA,SAAS,qBAAqB,kBAAkB,UAAU,CAAC,GAAG;CAC5D,MAAM,YAAY,iBAAiB,SAAS,GAAG,IAAI,mBAAmB,QAAQ;CAC9E,MAAM,MAAM,MAAM,SAAS;CAC3B,MAAM,EAAE,oBAAoB;CAC5B,IAAI,UAAU,IAAI;CAClB,IAAI,WAAW,iBAAiB;EAC9B,MAAM,KAAK,OAAO,oBAAoB,WAAW,kBAAkB;EACnE,UAAU,CAAC,CAAC,OAAO,SAAS,EAAE;CAChC;CACA,MAAM,SAAS,KAAK;CACpB,IAAI,SAAS;EACX,MAAM,MAAM,GAAG,SAAS;GACtB,IAAI,CAAC,UAAU,KAAK,MAAM,MAAM,GAAG,WAAW,MAAM,CAAC,GAAG;IACtD,IAAI,GAAG,IAAI;GACb;EACF;EACA,GAAG,YAAY;EACf,OAAO;CACT;AACF"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import debug from "debug";
|
|
2
|
+
|
|
2
3
|
const DEBUG = process.env.DEBUG;
|
|
3
4
|
function createDebugger(namespacePartial, options = {}) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
return {
|
|
6
|
+
debug: createSingleDebugger(namespacePartial, options),
|
|
7
|
+
debugDetails: createSingleDebugger(namespacePartial, options)
|
|
8
|
+
};
|
|
8
9
|
}
|
|
9
10
|
function createSingleDebugger(namespacePartial, options = {}) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return fn;
|
|
29
|
-
}
|
|
11
|
+
const namespace = namespacePartial.includes(":") ? namespacePartial : `vxrn:${namespacePartial}`;
|
|
12
|
+
const log = debug(namespace);
|
|
13
|
+
const { onlyWhenFocused } = options;
|
|
14
|
+
let enabled = log.enabled;
|
|
15
|
+
if (enabled && onlyWhenFocused) {
|
|
16
|
+
const ns = typeof onlyWhenFocused === "string" ? onlyWhenFocused : namespace;
|
|
17
|
+
enabled = !!DEBUG?.includes(ns);
|
|
18
|
+
}
|
|
19
|
+
const filter = void 0;
|
|
20
|
+
if (enabled) {
|
|
21
|
+
const fn = (...args) => {
|
|
22
|
+
if (!filter || args.some((a) => a?.includes?.(filter))) {
|
|
23
|
+
log(...args);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
fn.namespace = namespace;
|
|
27
|
+
return fn;
|
|
28
|
+
}
|
|
30
29
|
}
|
|
30
|
+
|
|
31
31
|
export { createDebugger };
|
|
32
32
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import debug from \"debug\";\nconst DEBUG = process.env.DEBUG;\nfunction createDebugger(namespacePartial, options = {}) {\n return {\n debug: createSingleDebugger(namespacePartial, options),\n debugDetails: createSingleDebugger(namespacePartial, options)\n };\n}\nfunction createSingleDebugger(namespacePartial, options = {}) {\n const namespace = namespacePartial.includes(\":\") ? namespacePartial : `vxrn:${namespacePartial}`;\n const log = debug(namespace);\n const { onlyWhenFocused } = options;\n let enabled = log.enabled;\n if (enabled && onlyWhenFocused) {\n const ns = typeof onlyWhenFocused === \"string\" ? onlyWhenFocused : namespace;\n enabled = !!DEBUG?.includes(ns);\n }\n const filter = void 0;\n if (enabled) {\n const fn = (...args) => {\n if (!filter || args.some((a) => a?.includes?.(filter))) {\n log(...args);\n }\n };\n fn.namespace = namespace;\n return fn;\n }\n}\nexport {\n createDebugger\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,MAAM,QAAQ,QAAQ,IAAI;AAC1B,SAAS,eAAe,kBAAkB,UAAU,CAAC,GAAG;CACtD,OAAO;EACL,OAAO,qBAAqB,kBAAkB,OAAO;EACrD,cAAc,qBAAqB,kBAAkB,OAAO;CAC9D;AACF;AACA,SAAS,qBAAqB,kBAAkB,UAAU,CAAC,GAAG;CAC5D,MAAM,YAAY,iBAAiB,SAAS,GAAG,IAAI,mBAAmB,QAAQ;CAC9E,MAAM,MAAM,MAAM,SAAS;CAC3B,MAAM,EAAE,oBAAoB;CAC5B,IAAI,UAAU,IAAI;CAClB,IAAI,WAAW,iBAAiB;EAC9B,MAAM,KAAK,OAAO,oBAAoB,WAAW,kBAAkB;EACnE,UAAU,CAAC,CAAC,OAAO,SAAS,EAAE;CAChC;CACA,MAAM,SAAS,KAAK;CACpB,IAAI,SAAS;EACX,MAAM,MAAM,GAAG,SAAS;GACtB,IAAI,CAAC,UAAU,KAAK,MAAM,MAAM,GAAG,WAAW,MAAM,CAAC,GAAG;IACtD,IAAI,GAAG,IAAI;GACb;EACF;EACA,GAAG,YAAY;EACf,OAAO;CACT;AACF"}
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import debug from "debug";
|
|
2
|
+
|
|
2
3
|
var DEBUG = process.env.DEBUG;
|
|
3
4
|
function createDebugger(namespacePartial) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6
|
+
return {
|
|
7
|
+
debug: createSingleDebugger(namespacePartial, options),
|
|
8
|
+
debugDetails: createSingleDebugger(namespacePartial, options)
|
|
9
|
+
};
|
|
9
10
|
}
|
|
10
11
|
function createSingleDebugger(namespacePartial) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return fn;
|
|
37
|
-
}
|
|
12
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
13
|
+
var namespace = namespacePartial.includes(":") ? namespacePartial : `vxrn:${namespacePartial}`;
|
|
14
|
+
var log = debug(namespace);
|
|
15
|
+
var { onlyWhenFocused } = options;
|
|
16
|
+
var enabled = log.enabled;
|
|
17
|
+
if (enabled && onlyWhenFocused) {
|
|
18
|
+
var ns = typeof onlyWhenFocused === "string" ? onlyWhenFocused : namespace;
|
|
19
|
+
enabled = !!(DEBUG === null || DEBUG === void 0 ? void 0 : DEBUG.includes(ns));
|
|
20
|
+
}
|
|
21
|
+
var filter = void 0;
|
|
22
|
+
if (enabled) {
|
|
23
|
+
var fn = function() {
|
|
24
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25
|
+
args[_key] = arguments[_key];
|
|
26
|
+
}
|
|
27
|
+
if (!filter || args.some(function(a) {
|
|
28
|
+
var _a_includes;
|
|
29
|
+
return a === null || a === void 0 ? void 0 : (_a_includes = a.includes) === null || _a_includes === void 0 ? void 0 : _a_includes.call(a, filter);
|
|
30
|
+
})) {
|
|
31
|
+
log(...args);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
fn.namespace = namespace;
|
|
35
|
+
return fn;
|
|
36
|
+
}
|
|
38
37
|
}
|
|
38
|
+
|
|
39
39
|
export { createDebugger };
|
|
40
40
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["esm/index.native.js"],"sourcesContent":["import debug from \"debug\";\nvar DEBUG = process.env.DEBUG;\nfunction createDebugger(namespacePartial) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n return {\n debug: createSingleDebugger(namespacePartial, options),\n debugDetails: createSingleDebugger(namespacePartial, options)\n };\n}\nfunction createSingleDebugger(namespacePartial) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var namespace = namespacePartial.includes(\":\") ? namespacePartial : `vxrn:${namespacePartial}`;\n var log = debug(namespace);\n var { onlyWhenFocused } = options;\n var enabled = log.enabled;\n if (enabled && onlyWhenFocused) {\n var ns = typeof onlyWhenFocused === \"string\" ? onlyWhenFocused : namespace;\n enabled = !!(DEBUG === null || DEBUG === void 0 ? void 0 : DEBUG.includes(ns));\n }\n var filter = void 0;\n if (enabled) {\n var fn = function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (!filter || args.some(function(a) {\n var _a_includes;\n return a === null || a === void 0 ? void 0 : (_a_includes = a.includes) === null || _a_includes === void 0 ? void 0 : _a_includes.call(a, filter);\n })) {\n log(...args);\n }\n };\n fn.namespace = namespace;\n return fn;\n }\n}\nexport {\n createDebugger\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,QAAQ,QAAQ,IAAI;AACxB,SAAS,eAAe,kBAAkB;CACxC,IAAI,UAAU,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CAChF,OAAO;EACL,OAAO,qBAAqB,kBAAkB,OAAO;EACrD,cAAc,qBAAqB,kBAAkB,OAAO;CAC9D;AACF;AACA,SAAS,qBAAqB,kBAAkB;CAC9C,IAAI,UAAU,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CAChF,IAAI,YAAY,iBAAiB,SAAS,GAAG,IAAI,mBAAmB,QAAQ;CAC5E,IAAI,MAAM,MAAM,SAAS;CACzB,IAAI,EAAE,oBAAoB;CAC1B,IAAI,UAAU,IAAI;CAClB,IAAI,WAAW,iBAAiB;EAC9B,IAAI,KAAK,OAAO,oBAAoB,WAAW,kBAAkB;EACjE,UAAU,CAAC,EAAE,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM,SAAS,EAAE;CAC9E;CACA,IAAI,SAAS,KAAK;CAClB,IAAI,SAAS;EACX,IAAI,KAAK,WAAW;GAClB,KAAK,IAAI,OAAO,UAAU,QAAQ,OAAO,IAAI,MAAM,IAAI,GAAG,OAAO,GAAG,OAAO,MAAM,QAAQ;IACvF,KAAK,QAAQ,UAAU;GACzB;GACA,IAAI,CAAC,UAAU,KAAK,KAAK,SAAS,GAAG;IACnC,IAAI;IACJ,OAAO,MAAM,QAAQ,MAAM,KAAK,IAAI,KAAK,KAAK,cAAc,EAAE,cAAc,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,KAAK,GAAG,MAAM;GAClJ,CAAC,GAAG;IACF,IAAI,GAAG,IAAI;GACb;EACF;EACA,GAAG,YAAY;EACf,OAAO;CACT;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxrn/debug",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.1-1789509973946",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"debug": "^4.3.7"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@tamagui/build": "
|
|
36
|
+
"@tamagui/build": "3.0.0-beta.1309.1",
|
|
37
37
|
"@types/debug": "^4"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|