@multiplatform.one/logger 7.83.1 → 7.83.2

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.
Files changed (43) hide show
  1. package/dist/cjs/base.cjs +118 -0
  2. package/dist/cjs/base.native.js +194 -0
  3. package/dist/cjs/base.native.js.map +1 -0
  4. package/dist/cjs/index.cjs +48 -0
  5. package/dist/cjs/index.native.js +117 -0
  6. package/dist/cjs/index.native.js.map +1 -0
  7. package/dist/cjs/index.tauri.cjs +52 -0
  8. package/dist/cjs/index.tauri.native.js +138 -0
  9. package/dist/cjs/index.tauri.native.js.map +1 -0
  10. package/dist/cjs/transport/tauri.cjs +57 -0
  11. package/dist/cjs/transport/tauri.native.js +89 -0
  12. package/dist/cjs/transport/tauri.native.js.map +1 -0
  13. package/dist/cjs/transport/types.cjs +18 -0
  14. package/dist/cjs/transport/types.native.js +21 -0
  15. package/dist/cjs/transport/types.native.js.map +1 -0
  16. package/dist/cjs/types.cjs +43 -0
  17. package/dist/cjs/types.native.js +46 -0
  18. package/dist/cjs/types.native.js.map +1 -0
  19. package/dist/esm/base.mjs +81 -0
  20. package/dist/esm/base.mjs.map +1 -0
  21. package/dist/esm/base.native.js +154 -0
  22. package/dist/esm/base.native.js.map +1 -0
  23. package/dist/esm/index.mjs +21 -0
  24. package/dist/esm/index.mjs.map +1 -0
  25. package/dist/esm/index.native.js +87 -0
  26. package/dist/esm/index.native.js.map +1 -0
  27. package/dist/esm/index.tauri.mjs +25 -0
  28. package/dist/esm/index.tauri.mjs.map +1 -0
  29. package/dist/esm/index.tauri.native.js +108 -0
  30. package/dist/esm/index.tauri.native.js.map +1 -0
  31. package/dist/esm/transport/tauri.mjs +32 -0
  32. package/dist/esm/transport/tauri.mjs.map +1 -0
  33. package/dist/esm/transport/tauri.native.js +61 -0
  34. package/dist/esm/transport/tauri.native.js.map +1 -0
  35. package/dist/esm/transport/types.mjs +2 -0
  36. package/dist/esm/transport/types.mjs.map +1 -0
  37. package/dist/esm/transport/types.native.js +2 -0
  38. package/dist/esm/transport/types.native.js.map +1 -0
  39. package/dist/esm/types.mjs +17 -0
  40. package/dist/esm/types.mjs.map +1 -0
  41. package/dist/esm/types.native.js +17 -0
  42. package/dist/esm/types.native.js.map +1 -0
  43. package/package.json +13 -4
@@ -0,0 +1,118 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
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
30
+ }) : target, mod));
31
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: true
33
+ }), mod);
34
+ var base_exports = {};
35
+ __export(base_exports, {
36
+ BaseLogger: () => BaseLogger,
37
+ defaultLoggerConfig: () => defaultLoggerConfig
38
+ });
39
+ module.exports = __toCommonJS(base_exports);
40
+ var import_loglevel = __toESM(require("loglevel"));
41
+ var import_platform = require("@multiplatform.one/platform");
42
+ var import_types = require("./types.cjs");
43
+ const defaultLoggerConfig = {
44
+ name: "default",
45
+ type: "pretty",
46
+ level: process.env.NODE_ENV === "development" ? import_types.LogLevel.Debug : import_types.LogLevel.Info
47
+ };
48
+ class BaseLogger {
49
+ transport;
50
+ metadata;
51
+ logger;
52
+ name;
53
+ constructor(config = {}) {
54
+ const {
55
+ metadata,
56
+ name,
57
+ level
58
+ } = typeof config === "string" ? {
59
+ metadata: void 0,
60
+ name: config,
61
+ level: void 0
62
+ } : config;
63
+ this.metadata = metadata || {};
64
+ this.name = name || "default";
65
+ this.logger = name ? import_loglevel.default.getLogger(name) : import_loglevel.default;
66
+ if (level !== void 0) this.logger.setLevel(level);
67
+ this.transport = this.createTransport?.();
68
+ }
69
+ trace(...args) {
70
+ this.logger.trace(...args);
71
+ this.sendToTransport(import_types.LogLevel.Trace, args);
72
+ }
73
+ debug(...args) {
74
+ this.logger.debug(...args);
75
+ this.sendToTransport(import_types.LogLevel.Debug, args);
76
+ }
77
+ info(...args) {
78
+ this.logger.info(...args);
79
+ this.sendToTransport(import_types.LogLevel.Info, args);
80
+ }
81
+ warn(...args) {
82
+ this.logger.warn(...args);
83
+ this.sendToTransport(import_types.LogLevel.Warn, args);
84
+ }
85
+ error(...args) {
86
+ this.logger.error(...args);
87
+ this.sendToTransport(import_types.LogLevel.Error, args);
88
+ }
89
+ log(...args) {
90
+ this.logger.debug(...args);
91
+ this.sendToTransport(import_types.LogLevel.Debug, args);
92
+ }
93
+ sendToTransport(level, args) {
94
+ if (this.transport) {
95
+ this.transport.send({
96
+ level,
97
+ message: args[0],
98
+ args: args.slice(1),
99
+ platform: import_platform.platform.preciseName,
100
+ timestamp: (/* @__PURE__ */new Date()).toISOString()
101
+ });
102
+ }
103
+ }
104
+ getSubLogger(input) {
105
+ const subConfig = typeof input === "string" ? {
106
+ name: input,
107
+ metadata: this.metadata,
108
+ level: this.logger.getLevel()
109
+ } : {
110
+ ...input,
111
+ metadata: {
112
+ ...this.metadata,
113
+ ...input.metadata
114
+ }
115
+ };
116
+ return new this.constructor(subConfig);
117
+ }
118
+ }
@@ -0,0 +1,194 @@
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(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
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
32
+ }) : target, mod));
33
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
+ value: true
35
+ }), mod);
36
+ var base_exports = {};
37
+ __export(base_exports, {
38
+ BaseLogger: () => BaseLogger,
39
+ defaultLoggerConfig: () => defaultLoggerConfig
40
+ });
41
+ module.exports = __toCommonJS(base_exports);
42
+ var import_loglevel = __toESM(require("loglevel"));
43
+ var import_platform = require("@multiplatform.one/platform");
44
+ var import_types = require("./types.native.js");
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 _define_property(obj, key, value) {
65
+ if (key in obj) {
66
+ Object.defineProperty(obj, key, {
67
+ value,
68
+ enumerable: true,
69
+ configurable: true,
70
+ writable: true
71
+ });
72
+ } else {
73
+ obj[key] = value;
74
+ }
75
+ return obj;
76
+ }
77
+ var defaultLoggerConfig = {
78
+ name: "default",
79
+ type: "pretty",
80
+ level: process.env.NODE_ENV === "development" ? import_types.LogLevel.Debug : import_types.LogLevel.Info
81
+ };
82
+ var BaseLogger = /* @__PURE__ */function () {
83
+ "use strict";
84
+
85
+ function BaseLogger2() {
86
+ var config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
87
+ _class_call_check(this, BaseLogger2);
88
+ var _this_createTransport, _this;
89
+ _define_property(this, "transport", void 0);
90
+ _define_property(this, "metadata", void 0);
91
+ _define_property(this, "logger", void 0);
92
+ _define_property(this, "name", void 0);
93
+ var {
94
+ metadata,
95
+ name,
96
+ level
97
+ } = typeof config === "string" ? {
98
+ metadata: void 0,
99
+ name: config,
100
+ level: void 0
101
+ } : config;
102
+ this.metadata = metadata || {};
103
+ this.name = name || "default";
104
+ this.logger = name ? import_loglevel.default.getLogger(name) : import_loglevel.default;
105
+ if (level !== void 0) this.logger.setLevel(level);
106
+ this.transport = (_this_createTransport = (_this = this).createTransport) === null || _this_createTransport === void 0 ? void 0 : _this_createTransport.call(_this);
107
+ }
108
+ _create_class(BaseLogger2, [{
109
+ key: "trace",
110
+ value: function trace() {
111
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
112
+ args[_key] = arguments[_key];
113
+ }
114
+ this.logger.trace(...args);
115
+ this.sendToTransport(import_types.LogLevel.Trace, args);
116
+ }
117
+ }, {
118
+ key: "debug",
119
+ value: function debug() {
120
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
121
+ args[_key] = arguments[_key];
122
+ }
123
+ this.logger.debug(...args);
124
+ this.sendToTransport(import_types.LogLevel.Debug, args);
125
+ }
126
+ }, {
127
+ key: "info",
128
+ value: function info() {
129
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
130
+ args[_key] = arguments[_key];
131
+ }
132
+ this.logger.info(...args);
133
+ this.sendToTransport(import_types.LogLevel.Info, args);
134
+ }
135
+ }, {
136
+ key: "warn",
137
+ value: function warn() {
138
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
139
+ args[_key] = arguments[_key];
140
+ }
141
+ this.logger.warn(...args);
142
+ this.sendToTransport(import_types.LogLevel.Warn, args);
143
+ }
144
+ }, {
145
+ key: "error",
146
+ value: function error() {
147
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
148
+ args[_key] = arguments[_key];
149
+ }
150
+ this.logger.error(...args);
151
+ this.sendToTransport(import_types.LogLevel.Error, args);
152
+ }
153
+ }, {
154
+ key: "log",
155
+ value: function log2() {
156
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
157
+ args[_key] = arguments[_key];
158
+ }
159
+ this.logger.debug(...args);
160
+ this.sendToTransport(import_types.LogLevel.Debug, args);
161
+ }
162
+ }, {
163
+ key: "sendToTransport",
164
+ value: function sendToTransport(level, args) {
165
+ if (this.transport) {
166
+ this.transport.send({
167
+ level,
168
+ message: args[0],
169
+ args: args.slice(1),
170
+ platform: import_platform.platform.preciseName,
171
+ timestamp: (/* @__PURE__ */new Date()).toISOString()
172
+ });
173
+ }
174
+ }
175
+ }, {
176
+ key: "getSubLogger",
177
+ value: function getSubLogger(input) {
178
+ var subConfig = typeof input === "string" ? {
179
+ name: input,
180
+ metadata: this.metadata,
181
+ level: this.logger.getLevel()
182
+ } : {
183
+ ...input,
184
+ metadata: {
185
+ ...this.metadata,
186
+ ...input.metadata
187
+ }
188
+ };
189
+ return new this.constructor(subConfig);
190
+ }
191
+ }]);
192
+ return BaseLogger2;
193
+ }();
194
+ //# sourceMappingURL=base.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","base_exports","BaseLogger","defaultLoggerConfig","module","exports","import_loglevel","require","import_platform","import_types","_class_call_check","instance","Constructor","TypeError","_defineProperties","props","i","length","descriptor","configurable","writable","_create_class","protoProps","staticProps","_define_property","obj","type","level","process","env","NODE_ENV","LogLevel","Debug","Info","BaseLogger2","config","arguments","_this_createTransport","_this","metadata","logger","default","getLogger","setLevel","transport","createTransport","trace","_len","args","Array","_key","sendToTransport","Trace","debug","info","warn","Warn","error","Error","log2","send","message","slice","platform","preciseName","timestamp","Date","toISOString","getSubLogger","input","subConfig","getLevel","constructor"],"sources":["base.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 base_exports = {};\n__export(base_exports, {\n BaseLogger: () => BaseLogger,\n defaultLoggerConfig: () => defaultLoggerConfig\n});\nmodule.exports = __toCommonJS(base_exports);\nvar import_loglevel = __toESM(require(\"loglevel\"));\nvar import_platform = require(\"@multiplatform.one/platform\");\nvar import_types = require(\"./types\");\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 _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _create_class(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nvar defaultLoggerConfig = {\n name: \"default\",\n type: \"pretty\",\n level: process.env.NODE_ENV === \"development\" ? import_types.LogLevel.Debug : import_types.LogLevel.Info\n};\nvar BaseLogger = /* @__PURE__ */ (function() {\n \"use strict\";\n function BaseLogger2() {\n var config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n _class_call_check(this, BaseLogger2);\n var _this_createTransport, _this;\n _define_property(this, \"transport\", void 0);\n _define_property(this, \"metadata\", void 0);\n _define_property(this, \"logger\", void 0);\n _define_property(this, \"name\", void 0);\n var { metadata, name, level } = typeof config === \"string\" ? {\n metadata: void 0,\n name: config,\n level: void 0\n } : config;\n this.metadata = metadata || {};\n this.name = name || \"default\";\n this.logger = name ? import_loglevel.default.getLogger(name) : import_loglevel.default;\n if (level !== void 0) this.logger.setLevel(level);\n this.transport = (_this_createTransport = (_this = this).createTransport) === null || _this_createTransport === void 0 ? void 0 : _this_createTransport.call(_this);\n }\n _create_class(BaseLogger2, [\n {\n key: \"trace\",\n value: function trace() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n this.logger.trace(...args);\n this.sendToTransport(import_types.LogLevel.Trace, args);\n }\n },\n {\n key: \"debug\",\n value: function debug() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n this.logger.debug(...args);\n this.sendToTransport(import_types.LogLevel.Debug, args);\n }\n },\n {\n key: \"info\",\n value: function info() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n this.logger.info(...args);\n this.sendToTransport(import_types.LogLevel.Info, args);\n }\n },\n {\n key: \"warn\",\n value: function warn() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n this.logger.warn(...args);\n this.sendToTransport(import_types.LogLevel.Warn, args);\n }\n },\n {\n key: \"error\",\n value: function error() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n this.logger.error(...args);\n this.sendToTransport(import_types.LogLevel.Error, args);\n }\n },\n {\n key: \"log\",\n value: function log2() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n this.logger.debug(...args);\n this.sendToTransport(import_types.LogLevel.Debug, args);\n }\n },\n {\n key: \"sendToTransport\",\n value: function sendToTransport(level, args) {\n if (this.transport) {\n this.transport.send({\n level,\n message: args[0],\n args: args.slice(1),\n platform: import_platform.platform.preciseName,\n timestamp: (/* @__PURE__ */ new Date()).toISOString()\n });\n }\n }\n },\n {\n key: \"getSubLogger\",\n value: function getSubLogger(input) {\n var subConfig = typeof input === \"string\" ? {\n name: input,\n metadata: this.metadata,\n level: this.logger.getLevel()\n } : {\n ...input,\n metadata: {\n ...this.metadata,\n ...input.metadata\n }\n };\n return new this.constructor(subConfig);\n }\n }\n ]);\n return BaseLogger2;\n})();\n//# sourceMappingURL=base.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,QAAQ,GAAGC,MAAM,CAACC,MAAM;AAC5B,IAAIC,SAAS,GAAGF,MAAM,CAACG,cAAc;AACrC,IAAIC,gBAAgB,GAAGJ,MAAM,CAACK,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGN,MAAM,CAACO,mBAAmB;AAClD,IAAIC,YAAY,GAAGR,MAAM,CAACS,cAAc;AACxC,IAAIC,YAAY,GAAGV,MAAM,CAACW,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBb,SAAS,CAACY,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C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I,CAACA,SAAS,CAACgB,IAAI,CAAC;UAClBjC,KAAK;UACLkC,OAAO,EAAEb,IAAI,CAAC,CAAC,CAAC;UAChBA,IAAI,EAAEA,IAAI,CAACc,KAAK,CAAC,CAAC,CAAC;UACnBC,QAAQ,EAAEvD,eAAe,CAACuD,QAAQ,CAACC,WAAW;UAC9CC,SAAS,EAAE,CAAC,eAAgB,IAAIC,IAAI,CAAC,CAAC,EAAEC,WAAW,CAAC;QACtD,CAAC,CAAC;MACJ;IACF;EACF,CAAC,EACD;IACE1E,GAAG,EAAE,cAAc;IACnBM,KAAK,EAAE,SAASqE,YAAYA,CAACC,KAAK,EAAE;MAClC,IAAIC,SAAS,GAAG,OAAOD,KAAK,KAAK,QAAQ,GAAG;QAC1CpF,IAAI,EAAEoF,KAAK;QACX9B,QAAQ,EAAE,IAAI,CAACA,QAAQ;QACvBZ,KAAK,EAAE,IAAI,CAACa,MAAM,CAAC+B,QAAQ,CAAC;MAC9B,CAAC,GAAG;QACF,GAAGF,KAAK;QACR9B,QAAQ,EAAE;UACR,GAAG,IAAI,CAACA,QAAQ;UAChB,GAAG8B,KAAK,CAAC9B;QACX;MACF,CAAC;MACD,OAAO,IAAI,IAAI,CAACiC,WAAW,CAACF,SAAS,CAAC;IACxC;EACF,CAAC,CACF,CAAC;EACF,OAAOpC,WAAW;AACpB,CAAC,CAAE,CAAC","ignoreList":[]}
@@ -0,0 +1,48 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
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
+ };
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);
24
+ var index_exports = {};
25
+ __export(index_exports, {
26
+ Logger: () => Logger,
27
+ logger: () => logger
28
+ });
29
+ module.exports = __toCommonJS(index_exports);
30
+ var import_platform = require("@multiplatform.one/platform");
31
+ var import_base = require("./base.cjs");
32
+ __reExport(index_exports, require("./types.cjs"), module.exports);
33
+ __reExport(index_exports, require("./base.cjs"), module.exports);
34
+ class Logger extends import_base.BaseLogger {
35
+ constructor(config = {}) {
36
+ const metadata = {
37
+ platform: import_platform.platform.preciseName
38
+ };
39
+ super({
40
+ name: metadata.platform,
41
+ ...(typeof config === "string" ? {
42
+ name: config
43
+ } : config),
44
+ metadata
45
+ });
46
+ }
47
+ }
48
+ const logger = new Logger();
@@ -0,0 +1,117 @@
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", {
24
+ value: true
25
+ }), mod);
26
+ var index_exports = {};
27
+ __export(index_exports, {
28
+ Logger: () => Logger,
29
+ logger: () => logger
30
+ });
31
+ module.exports = __toCommonJS(index_exports);
32
+ var import_platform = require("@multiplatform.one/platform");
33
+ var import_base = require("./base.native.js");
34
+ __reExport(index_exports, require("./types.native.js"), module.exports);
35
+ __reExport(index_exports, require("./base.native.js"), module.exports);
36
+ function _assert_this_initialized(self) {
37
+ if (self === void 0) {
38
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
39
+ }
40
+ return self;
41
+ }
42
+ function _call_super(_this, derived, args) {
43
+ derived = _get_prototype_of(derived);
44
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
45
+ }
46
+ function _class_call_check(instance, Constructor) {
47
+ if (!(instance instanceof Constructor)) {
48
+ throw new TypeError("Cannot call a class as a function");
49
+ }
50
+ }
51
+ function _get_prototype_of(o) {
52
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {
53
+ return o2.__proto__ || Object.getPrototypeOf(o2);
54
+ };
55
+ return _get_prototype_of(o);
56
+ }
57
+ function _inherits(subClass, superClass) {
58
+ if (typeof superClass !== "function" && superClass !== null) {
59
+ throw new TypeError("Super expression must either be null or a function");
60
+ }
61
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
62
+ constructor: {
63
+ value: subClass,
64
+ writable: true,
65
+ configurable: true
66
+ }
67
+ });
68
+ if (superClass) _set_prototype_of(subClass, superClass);
69
+ }
70
+ function _possible_constructor_return(self, call) {
71
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
72
+ return call;
73
+ }
74
+ return _assert_this_initialized(self);
75
+ }
76
+ function _set_prototype_of(o, p) {
77
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {
78
+ o2.__proto__ = p2;
79
+ return o2;
80
+ };
81
+ return _set_prototype_of(o, p);
82
+ }
83
+ function _type_of(obj) {
84
+ "@swc/helpers - typeof";
85
+
86
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
87
+ }
88
+ function _is_native_reflect_construct() {
89
+ try {
90
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
91
+ } catch (_) {}
92
+ return (_is_native_reflect_construct = function () {
93
+ return !!result;
94
+ })();
95
+ }
96
+ var Logger = /* @__PURE__ */function (BaseLogger2) {
97
+ "use strict";
98
+
99
+ _inherits(Logger2, BaseLogger2);
100
+ function Logger2() {
101
+ var config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
102
+ _class_call_check(this, Logger2);
103
+ var metadata = {
104
+ platform: import_platform.platform.preciseName
105
+ };
106
+ return _call_super(this, Logger2, [{
107
+ name: metadata.platform,
108
+ ...(typeof config === "string" ? {
109
+ name: config
110
+ } : config),
111
+ metadata
112
+ }]);
113
+ }
114
+ return Logger2;
115
+ }(import_base.BaseLogger);
116
+ var logger = new Logger();
117
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__reExport","mod","secondTarget","__toCommonJS","value","index_exports","Logger","logger","module","exports","import_platform","require","import_base","_assert_this_initialized","self","ReferenceError","_call_super","_this","derived","args","_get_prototype_of","_possible_constructor_return","_is_native_reflect_construct","Reflect","construct","constructor","apply","_class_call_check","instance","Constructor","TypeError","o","setPrototypeOf","getPrototypeOf","o2","__proto__","_inherits","subClass","superClass","create","writable","configurable","_set_prototype_of","_type_of","p","p2","obj","Symbol","result","Boolean","valueOf","_","BaseLogger2","Logger2","config","arguments","length","metadata","platform","preciseName","BaseLogger"],"sources":["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":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,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p = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
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
+ };
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);
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.cjs");
32
+ var import_tauri = require("./transport/tauri.cjs");
33
+ __reExport(index_tauri_exports, require("./types.cjs"), module.exports);
34
+ __reExport(index_tauri_exports, require("./base.cjs"), module.exports);
35
+ class Logger extends import_base.BaseLogger {
36
+ constructor(config = {}) {
37
+ const metadata = {
38
+ platform: import_platform.platform.preciseName
39
+ };
40
+ super({
41
+ name: metadata.platform,
42
+ ...(typeof config === "string" ? {
43
+ name: config
44
+ } : config),
45
+ metadata
46
+ });
47
+ }
48
+ createTransport() {
49
+ if (import_platform.platform.isTauri) return new import_tauri.TauriTransport();
50
+ }
51
+ }
52
+ const logger = new Logger();