@multiplatform.one/logger 9.16.1 → 10.0.0
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/base.cjs +87 -98
- package/dist/cjs/base.native.cjs +190 -0
- package/dist/cjs/base.native.js +160 -162
- package/dist/cjs/base.native.js.map +1 -1
- package/dist/cjs/index.cjs +25 -31
- package/dist/cjs/index.native.cjs +106 -0
- package/dist/cjs/index.native.js +69 -78
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/index.tauri.cjs +28 -34
- package/dist/cjs/index.tauri.native.cjs +127 -0
- package/dist/cjs/index.tauri.native.js +85 -94
- package/dist/cjs/index.tauri.native.js.map +1 -1
- package/dist/cjs/transport/tauri.cjs +36 -42
- package/dist/cjs/transport/tauri.native.cjs +81 -0
- package/dist/cjs/transport/tauri.native.js +58 -64
- package/dist/cjs/transport/tauri.native.js.map +1 -1
- package/dist/cjs/transport/types.cjs +9 -11
- package/dist/cjs/transport/types.native.cjs +18 -0
- package/dist/cjs/transport/types.native.js +9 -10
- package/dist/cjs/transport/types.native.js.map +1 -1
- package/dist/cjs/types.cjs +28 -30
- package/dist/cjs/types.native.cjs +43 -0
- package/dist/cjs/types.native.js +30 -31
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/esm/base.mjs +72 -74
- package/dist/esm/base.mjs.map +1 -1
- package/dist/esm/base.native.js +144 -138
- package/dist/esm/base.native.js.map +1 -1
- package/dist/esm/index.mjs +16 -16
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +60 -64
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/index.tauri.mjs +19 -19
- package/dist/esm/index.tauri.mjs.map +1 -1
- package/dist/esm/index.tauri.native.js +76 -80
- package/dist/esm/index.tauri.native.js.map +1 -1
- package/dist/esm/transport/tauri.mjs +25 -25
- package/dist/esm/transport/tauri.mjs.map +1 -1
- package/dist/esm/transport/tauri.native.js +46 -47
- package/dist/esm/transport/tauri.native.js.map +1 -1
- package/dist/esm/transport/types.mjs +0 -2
- package/dist/esm/transport/types.native.js +0 -2
- package/dist/esm/types.mjs +14 -13
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +16 -15
- package/dist/esm/types.native.js.map +1 -1
- package/package.json +3 -3
- package/dist/esm/transport/types.mjs.map +0 -1
- package/dist/esm/transport/types.native.js.map +0 -1
package/dist/cjs/index.native.js
CHANGED
|
@@ -5,28 +5,26 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
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
22
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
23
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
24
|
-
value: true
|
|
25
|
-
}), mod);
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
24
|
var index_exports = {};
|
|
27
25
|
__export(index_exports, {
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
Logger: () => Logger,
|
|
27
|
+
logger: () => logger
|
|
30
28
|
});
|
|
31
29
|
module.exports = __toCommonJS(index_exports);
|
|
32
30
|
var import_platform = require("@multiplatform.one/platform");
|
|
@@ -34,84 +32,77 @@ var import_base = require("./base.native.js");
|
|
|
34
32
|
__reExport(index_exports, require("./types.native.js"), module.exports);
|
|
35
33
|
__reExport(index_exports, require("./base.native.js"), module.exports);
|
|
36
34
|
function _assert_this_initialized(self) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
if (self === void 0) {
|
|
36
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
37
|
+
}
|
|
38
|
+
return self;
|
|
41
39
|
}
|
|
42
40
|
function _call_super(_this, derived, args) {
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
derived = _get_prototype_of(derived);
|
|
42
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
45
43
|
}
|
|
46
44
|
function _class_call_check(instance, Constructor) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
if (!(instance instanceof Constructor)) {
|
|
46
|
+
throw new TypeError("Cannot call a class as a function");
|
|
47
|
+
}
|
|
50
48
|
}
|
|
51
49
|
function _get_prototype_of(o) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {
|
|
51
|
+
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
52
|
+
};
|
|
53
|
+
return _get_prototype_of(o);
|
|
56
54
|
}
|
|
57
55
|
function _inherits(subClass, superClass) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
});
|
|
68
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
56
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
57
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
58
|
+
}
|
|
59
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: {
|
|
60
|
+
value: subClass,
|
|
61
|
+
writable: true,
|
|
62
|
+
configurable: true
|
|
63
|
+
} });
|
|
64
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
69
65
|
}
|
|
70
66
|
function _possible_constructor_return(self, call) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
68
|
+
return call;
|
|
69
|
+
}
|
|
70
|
+
return _assert_this_initialized(self);
|
|
75
71
|
}
|
|
76
72
|
function _set_prototype_of(o, p) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
73
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {
|
|
74
|
+
o2.__proto__ = p2;
|
|
75
|
+
return o2;
|
|
76
|
+
};
|
|
77
|
+
return _set_prototype_of(o, p);
|
|
82
78
|
}
|
|
83
79
|
function _type_of(obj) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
80
|
+
"@swc/helpers - typeof";
|
|
81
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
87
82
|
}
|
|
88
83
|
function _is_native_reflect_construct() {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
84
|
+
try {
|
|
85
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
86
|
+
} catch (_) {}
|
|
87
|
+
return (_is_native_reflect_construct = function() {
|
|
88
|
+
return !!result;
|
|
89
|
+
})();
|
|
95
90
|
}
|
|
96
|
-
var Logger = /* @__PURE__ */
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
metadata
|
|
112
|
-
}]);
|
|
113
|
-
}
|
|
114
|
-
return Logger2;
|
|
115
|
-
}(import_base.BaseLogger);
|
|
91
|
+
var Logger = /* @__PURE__ */ (function(BaseLogger2) {
|
|
92
|
+
"use strict";
|
|
93
|
+
_inherits(Logger2, BaseLogger2);
|
|
94
|
+
function Logger2() {
|
|
95
|
+
var config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
96
|
+
_class_call_check(this, Logger2);
|
|
97
|
+
var metadata = { platform: import_platform.platform.preciseName };
|
|
98
|
+
return _call_super(this, Logger2, [{
|
|
99
|
+
name: metadata.platform,
|
|
100
|
+
...typeof config === "string" ? { name: config } : config,
|
|
101
|
+
metadata
|
|
102
|
+
}]);
|
|
103
|
+
}
|
|
104
|
+
return Logger2;
|
|
105
|
+
})(import_base.BaseLogger);
|
|
116
106
|
var logger = new Logger();
|
|
107
|
+
|
|
117
108
|
//# 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 __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n Logger: () => Logger,\n logger: () => logger\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_platform = require(\"@multiplatform.one/platform\");\nvar import_base = require(\"./base\");\n__reExport(index_exports, require(\"./types\"), module.exports);\n__reExport(index_exports, require(\"./base\"), module.exports);\nfunction _assert_this_initialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _call_super(_this, derived, args) {\n derived = _get_prototype_of(derived);\n return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));\n}\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _get_prototype_of(o) {\n _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {\n return o2.__proto__ || Object.getPrototypeOf(o2);\n };\n return _get_prototype_of(o);\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _set_prototype_of(subClass, superClass);\n}\nfunction _possible_constructor_return(self, call) {\n if (call && (_type_of(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assert_this_initialized(self);\n}\nfunction _set_prototype_of(o, p) {\n _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {\n o2.__proto__ = p2;\n return o2;\n };\n return _set_prototype_of(o, p);\n}\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction _is_native_reflect_construct() {\n try {\n var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {\n }));\n } catch (_) {\n }\n return (_is_native_reflect_construct = function() {\n return !!result;\n })();\n}\nvar Logger = /* @__PURE__ */ (function(BaseLogger2) {\n \"use strict\";\n _inherits(Logger2, BaseLogger2);\n function Logger2() {\n var config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n _class_call_check(this, Logger2);\n var metadata = {\n platform: import_platform.platform.preciseName\n };\n return _call_super(this, Logger2, [\n {\n name: metadata.platform,\n ...typeof config === \"string\" ? {\n name: config\n } : config,\n metadata\n }\n ]);\n }\n return Logger2;\n})(import_base.BaseLogger);\nvar logger = new Logger();\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,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,G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IAAI,OAAO"}
|
package/dist/cjs/index.tauri.cjs
CHANGED
|
@@ -3,28 +3,26 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
20
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
22
|
-
value: true
|
|
23
|
-
}), mod);
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
22
|
var index_tauri_exports = {};
|
|
25
23
|
__export(index_tauri_exports, {
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
Logger: () => Logger,
|
|
25
|
+
logger: () => logger
|
|
28
26
|
});
|
|
29
27
|
module.exports = __toCommonJS(index_tauri_exports);
|
|
30
28
|
var import_platform = require("@multiplatform.one/platform");
|
|
@@ -32,21 +30,17 @@ var import_base = require("./base.cjs");
|
|
|
32
30
|
var import_tauri = require("./transport/tauri.cjs");
|
|
33
31
|
__reExport(index_tauri_exports, require("./types.cjs"), module.exports);
|
|
34
32
|
__reExport(index_tauri_exports, require("./base.cjs"), module.exports);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (import_platform.platform.isTauri) return new import_tauri.TauriTransport();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
const logger = new Logger();
|
|
33
|
+
var Logger = class extends import_base.BaseLogger {
|
|
34
|
+
constructor(config = {}) {
|
|
35
|
+
const metadata = { platform: import_platform.platform.preciseName };
|
|
36
|
+
super({
|
|
37
|
+
name: metadata.platform,
|
|
38
|
+
...typeof config === "string" ? { name: config } : config,
|
|
39
|
+
metadata
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
createTransport() {
|
|
43
|
+
if (import_platform.platform.isTauri) return new import_tauri.TauriTransport();
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const logger = new Logger();
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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
|
+
};
|
|
22
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var index_tauri_exports = {};
|
|
25
|
+
__export(index_tauri_exports, {
|
|
26
|
+
Logger: () => Logger,
|
|
27
|
+
logger: () => logger
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(index_tauri_exports);
|
|
30
|
+
var import_platform = require("@multiplatform.one/platform");
|
|
31
|
+
var import_base = require("./base.native.js");
|
|
32
|
+
var import_tauri = require("./transport/tauri.native.js");
|
|
33
|
+
__reExport(index_tauri_exports, require("./types.native.js"), module.exports);
|
|
34
|
+
__reExport(index_tauri_exports, require("./base.native.js"), module.exports);
|
|
35
|
+
function _assert_this_initialized(self) {
|
|
36
|
+
if (self === void 0) {
|
|
37
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
38
|
+
}
|
|
39
|
+
return self;
|
|
40
|
+
}
|
|
41
|
+
function _call_super(_this, derived, args) {
|
|
42
|
+
derived = _get_prototype_of(derived);
|
|
43
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
44
|
+
}
|
|
45
|
+
function _class_call_check(instance, Constructor) {
|
|
46
|
+
if (!(instance instanceof Constructor)) {
|
|
47
|
+
throw new TypeError("Cannot call a class as a function");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function _defineProperties(target, props) {
|
|
51
|
+
for (var i = 0; i < props.length; i++) {
|
|
52
|
+
var descriptor = props[i];
|
|
53
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
54
|
+
descriptor.configurable = true;
|
|
55
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
56
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
60
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
61
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
62
|
+
return Constructor;
|
|
63
|
+
}
|
|
64
|
+
function _get_prototype_of(o) {
|
|
65
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {
|
|
66
|
+
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
67
|
+
};
|
|
68
|
+
return _get_prototype_of(o);
|
|
69
|
+
}
|
|
70
|
+
function _inherits(subClass, superClass) {
|
|
71
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
72
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
73
|
+
}
|
|
74
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: {
|
|
75
|
+
value: subClass,
|
|
76
|
+
writable: true,
|
|
77
|
+
configurable: true
|
|
78
|
+
} });
|
|
79
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
80
|
+
}
|
|
81
|
+
function _possible_constructor_return(self, call) {
|
|
82
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
83
|
+
return call;
|
|
84
|
+
}
|
|
85
|
+
return _assert_this_initialized(self);
|
|
86
|
+
}
|
|
87
|
+
function _set_prototype_of(o, p) {
|
|
88
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {
|
|
89
|
+
o2.__proto__ = p2;
|
|
90
|
+
return o2;
|
|
91
|
+
};
|
|
92
|
+
return _set_prototype_of(o, p);
|
|
93
|
+
}
|
|
94
|
+
function _type_of(obj) {
|
|
95
|
+
"@swc/helpers - typeof";
|
|
96
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
97
|
+
}
|
|
98
|
+
function _is_native_reflect_construct() {
|
|
99
|
+
try {
|
|
100
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
101
|
+
} catch (_) {}
|
|
102
|
+
return (_is_native_reflect_construct = function() {
|
|
103
|
+
return !!result;
|
|
104
|
+
})();
|
|
105
|
+
}
|
|
106
|
+
var Logger = /* @__PURE__ */ (function(BaseLogger2) {
|
|
107
|
+
"use strict";
|
|
108
|
+
_inherits(Logger2, BaseLogger2);
|
|
109
|
+
function Logger2() {
|
|
110
|
+
var config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
111
|
+
_class_call_check(this, Logger2);
|
|
112
|
+
var metadata = { platform: import_platform.platform.preciseName };
|
|
113
|
+
return _call_super(this, Logger2, [{
|
|
114
|
+
name: metadata.platform,
|
|
115
|
+
...typeof config === "string" ? { name: config } : config,
|
|
116
|
+
metadata
|
|
117
|
+
}]);
|
|
118
|
+
}
|
|
119
|
+
_create_class(Logger2, [{
|
|
120
|
+
key: "createTransport",
|
|
121
|
+
value: function createTransport() {
|
|
122
|
+
if (import_platform.platform.isTauri) return new import_tauri.TauriTransport();
|
|
123
|
+
}
|
|
124
|
+
}]);
|
|
125
|
+
return Logger2;
|
|
126
|
+
})(import_base.BaseLogger);
|
|
127
|
+
var logger = new Logger();
|