@vxrn/vite-native-hmr 2.0.0-beta.99.1 → 2.6.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/devServerClient.native.cjs +11 -15
- package/dist/cjs/devServerClient.native.js +11 -15
- package/dist/cjs/devServerClient.native.js.map +1 -1
- package/dist/cjs/hmr-client.native.cjs +8 -12
- package/dist/cjs/hmr-client.native.js +8 -12
- package/dist/cjs/hmr-client.native.js.map +1 -1
- package/dist/esm/devServerClient.native.js +11 -15
- package/dist/esm/devServerClient.native.js.map +1 -1
- package/dist/esm/hmr-client.native.js +8 -12
- package/dist/esm/hmr-client.native.js.map +1 -1
- package/package.json +8 -7
|
@@ -40,9 +40,7 @@ var import_pretty_format = __toESM(require("pretty-format"));
|
|
|
40
40
|
var import_getDevServerLocation = require("./getDevServerLocation.native.js");
|
|
41
41
|
var import_hmr_client = require("./hmr-client.native.js");
|
|
42
42
|
function _class_call_check(instance, Constructor) {
|
|
43
|
-
if (!(instance instanceof Constructor))
|
|
44
|
-
throw new TypeError("Cannot call a class as a function");
|
|
45
|
-
}
|
|
43
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
46
44
|
}
|
|
47
45
|
function _defineProperties(target, props) {
|
|
48
46
|
for (var i = 0; i < props.length; i++) {
|
|
@@ -66,9 +64,7 @@ function _define_property(obj, key, value) {
|
|
|
66
64
|
configurable: true,
|
|
67
65
|
writable: true
|
|
68
66
|
});
|
|
69
|
-
} else
|
|
70
|
-
obj[key] = value;
|
|
71
|
-
}
|
|
67
|
+
} else obj[key] = value;
|
|
72
68
|
return obj;
|
|
73
69
|
}
|
|
74
70
|
(0, import_hmr_client.loadHMRClient)();
|
|
@@ -79,10 +75,10 @@ var DevServerClient = /* @__PURE__ */ (function() {
|
|
|
79
75
|
_class_call_check(this, DevServerClient2);
|
|
80
76
|
_define_property(this, "socket", void 0);
|
|
81
77
|
_define_property(this, "buffer", []);
|
|
82
|
-
var initSocket = function() {
|
|
78
|
+
var initSocket = function initSocket2() {
|
|
83
79
|
var address = `ws://${(0, import_getDevServerLocation.getDevServerLocation)().host}/__client`;
|
|
84
80
|
_this.socket = new WebSocket(address);
|
|
85
|
-
var onClose = function(event) {
|
|
81
|
+
var onClose = function onClose2(event) {
|
|
86
82
|
console.warn("Disconnected from the Dev Server:", event.message);
|
|
87
83
|
_this.socket = void 0;
|
|
88
84
|
};
|
|
@@ -181,7 +177,7 @@ var DevServerClient = /* @__PURE__ */ (function() {
|
|
|
181
177
|
},
|
|
182
178
|
{
|
|
183
179
|
key: "log",
|
|
184
|
-
value: function
|
|
180
|
+
value: function log3(level, data) {
|
|
185
181
|
if (level === "groupEnd") {
|
|
186
182
|
return;
|
|
187
183
|
}
|
|
@@ -199,16 +195,16 @@ var DevServerClient = /* @__PURE__ */ (function() {
|
|
|
199
195
|
},
|
|
200
196
|
{
|
|
201
197
|
key: "setup",
|
|
202
|
-
value: function
|
|
198
|
+
value: function setup3() {}
|
|
203
199
|
}
|
|
204
200
|
]);
|
|
205
201
|
return DevServerClient2;
|
|
206
202
|
})();
|
|
207
203
|
var client = new DevServerClient();
|
|
208
|
-
var setup = function() {};
|
|
209
|
-
var enable = function() {};
|
|
210
|
-
var disable = function() {};
|
|
211
|
-
var registerBundle = function() {};
|
|
212
|
-
var log = function(level, data) {
|
|
204
|
+
var setup = function setup2() {};
|
|
205
|
+
var enable = function enable2() {};
|
|
206
|
+
var disable = function disable2() {};
|
|
207
|
+
var registerBundle = function registerBundle2() {};
|
|
208
|
+
var log = function log2(level, data) {
|
|
213
209
|
client.log(level, data);
|
|
214
210
|
};
|
|
@@ -40,9 +40,7 @@ var import_pretty_format = __toESM(require("pretty-format"));
|
|
|
40
40
|
var import_getDevServerLocation = require("./getDevServerLocation.native.js");
|
|
41
41
|
var import_hmr_client = require("./hmr-client.native.js");
|
|
42
42
|
function _class_call_check(instance, Constructor) {
|
|
43
|
-
if (!(instance instanceof Constructor))
|
|
44
|
-
throw new TypeError("Cannot call a class as a function");
|
|
45
|
-
}
|
|
43
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
46
44
|
}
|
|
47
45
|
function _defineProperties(target, props) {
|
|
48
46
|
for (var i = 0; i < props.length; i++) {
|
|
@@ -66,9 +64,7 @@ function _define_property(obj, key, value) {
|
|
|
66
64
|
configurable: true,
|
|
67
65
|
writable: true
|
|
68
66
|
});
|
|
69
|
-
} else
|
|
70
|
-
obj[key] = value;
|
|
71
|
-
}
|
|
67
|
+
} else obj[key] = value;
|
|
72
68
|
return obj;
|
|
73
69
|
}
|
|
74
70
|
(0, import_hmr_client.loadHMRClient)();
|
|
@@ -79,10 +75,10 @@ var DevServerClient = /* @__PURE__ */ (function() {
|
|
|
79
75
|
_class_call_check(this, DevServerClient2);
|
|
80
76
|
_define_property(this, "socket", void 0);
|
|
81
77
|
_define_property(this, "buffer", []);
|
|
82
|
-
var initSocket = function() {
|
|
78
|
+
var initSocket = function initSocket2() {
|
|
83
79
|
var address = `ws://${(0, import_getDevServerLocation.getDevServerLocation)().host}/__client`;
|
|
84
80
|
_this.socket = new WebSocket(address);
|
|
85
|
-
var onClose = function(event) {
|
|
81
|
+
var onClose = function onClose2(event) {
|
|
86
82
|
console.warn("Disconnected from the Dev Server:", event.message);
|
|
87
83
|
_this.socket = void 0;
|
|
88
84
|
};
|
|
@@ -181,7 +177,7 @@ var DevServerClient = /* @__PURE__ */ (function() {
|
|
|
181
177
|
},
|
|
182
178
|
{
|
|
183
179
|
key: "log",
|
|
184
|
-
value: function
|
|
180
|
+
value: function log3(level, data) {
|
|
185
181
|
if (level === "groupEnd") {
|
|
186
182
|
return;
|
|
187
183
|
}
|
|
@@ -199,17 +195,17 @@ var DevServerClient = /* @__PURE__ */ (function() {
|
|
|
199
195
|
},
|
|
200
196
|
{
|
|
201
197
|
key: "setup",
|
|
202
|
-
value: function
|
|
198
|
+
value: function setup3() {}
|
|
203
199
|
}
|
|
204
200
|
]);
|
|
205
201
|
return DevServerClient2;
|
|
206
202
|
})();
|
|
207
203
|
var client = new DevServerClient();
|
|
208
|
-
var setup = function() {};
|
|
209
|
-
var enable = function() {};
|
|
210
|
-
var disable = function() {};
|
|
211
|
-
var registerBundle = function() {};
|
|
212
|
-
var log = function(level, data) {
|
|
204
|
+
var setup = function setup2() {};
|
|
205
|
+
var enable = function enable2() {};
|
|
206
|
+
var disable = function disable2() {};
|
|
207
|
+
var registerBundle = function registerBundle2() {};
|
|
208
|
+
var log = function log2(level, data) {
|
|
213
209
|
client.log(level, data);
|
|
214
210
|
};
|
|
215
211
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devServerClient.native.js","names":[],"sources":["cjs/devServerClient.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 devServerClient_exports = {};\n__export(devServerClient_exports, {\n client: () => client,\n disable: () => disable,\n enable: () => enable,\n log: () => log,\n registerBundle: () => registerBundle,\n setup: () => setup\n});\nmodule.exports = __toCommonJS(devServerClient_exports);\nvar import_pretty_format = __toESM(require(\"pretty-format\"));\nvar import_getDevServerLocation = require(\"./getDevServerLocation\");\nvar import_hmr_client = require(\"./hmr-client\");\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}\n(0, import_hmr_client.loadHMRClient)();\nvar DevServerClient = /* @__PURE__ */ (function() {\n \"use strict\";\n function DevServerClient2() {\n var _this = this;\n _class_call_check(this, DevServerClient2);\n _define_property(this, \"socket\", void 0);\n _define_property(this, \"buffer\", []);\n var initSocket = function() {\n var address = `ws://${(0, import_getDevServerLocation.getDevServerLocation)().host}/__client`;\n _this.socket = new WebSocket(address);\n var onClose = function(event) {\n console.warn(\"Disconnected from the Dev Server:\", event.message);\n _this.socket = void 0;\n };\n _this.socket.onclose = onClose;\n _this.socket.onerror = onClose;\n _this.socket.onopen = function() {\n _this.flushBuffer();\n };\n };\n if (process.env.NODE_ENV === \"development\") {\n initSocket();\n }\n }\n _create_class(DevServerClient2, [\n {\n key: \"send\",\n value: function send(level, data) {\n try {\n var _this_socket;\n (_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.send(JSON.stringify({\n type: \"client-log\",\n level,\n data: data.map(function(item) {\n return typeof item === \"string\" ? item : (0, import_pretty_format.default)(item, {\n escapeString: true,\n highlight: true,\n maxDepth: 3,\n min: true,\n plugins: [\n // @ts-expect-error\n import_pretty_format.default.plugins.ReactElement\n ]\n });\n })\n }));\n } catch (unused) {\n try {\n var _this_socket1;\n (_this_socket1 = this.socket) === null || _this_socket1 === void 0 ? void 0 : _this_socket1.send(JSON.stringify({\n type: \"client-log\",\n level,\n data: data.map(function(item, index) {\n try {\n return typeof item === \"string\" ? item : JSON.stringify(item);\n } catch (err) {\n return `Error stringifying item at index ${index} - ${item} - ${err}`;\n }\n })\n }));\n } catch (err) {\n try {\n var _this_socket2;\n (_this_socket2 = this.socket) === null || _this_socket2 === void 0 ? void 0 : _this_socket2.send(JSON.stringify({\n type: \"client-log\",\n level: \"error\",\n data: [\n \"error sending client log: \" + err\n ]\n }));\n } catch (unused2) {\n }\n }\n }\n }\n },\n {\n // final err\n // Ignore error\n key: \"flushBuffer\",\n value: function flushBuffer() {\n var _this = this;\n if (globalThis[\"__vxrnTmpLogs\"]) {\n globalThis[\"__vxrnTmpLogs\"].forEach(function(param) {\n var { level: level2, data: data2 } = param;\n _this.buffer.push({\n level: level2,\n data: data2\n });\n });\n delete globalThis[\"__vxrnTmpLogs\"];\n }\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = this.buffer[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var { level, data } = _step.value;\n this.send(level, data);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n this.buffer = [];\n }\n },\n {\n key: \"log\",\n value: function log2(level, data) {\n if (level === \"groupEnd\") {\n return;\n }\n if (this.socket && this.socket.readyState === WebSocket.OPEN) {\n this.flushBuffer();\n this.send(level, data);\n } else {\n if (globalThis[\"__vxrnTmpLogs\"]) return;\n this.buffer.push({\n level,\n data\n });\n }\n }\n },\n {\n // Mock for React Native 0.79 to prevent native error \"getPropertyAsObject: property 'setup' is undefined, expected an Object\"\n key: \"setup\",\n value: function setup2() {\n }\n }\n ]);\n return DevServerClient2;\n})();\nvar client = new DevServerClient();\nvar setup = function() {\n};\nvar enable = function() {\n};\nvar disable = function() {\n};\nvar registerBundle = function() {\n};\nvar log = function(level, data) {\n client.log(level, data);\n};\n//# sourceMappingURL=devServerClient.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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AAK,YAAY;KACjB,KAAK,KAAK,OAAO,IAAI;IACvB,OAAO;KACL,IAAI,WAAW,kBAAkB;KACjC,KAAK,OAAO,KAAK;MACf;MACA;KACF,CAAC;IACH;GACF;EACF;EACA;GAEE,KAAK;GACL,OAAO,SAAS,SAAS,CACzB;EACF;CACF,CAAC;CACD,OAAO;AACT,EAAC,CAAE;AACH,IAAI,SAAS,IAAI,gBAAgB;AACjC,IAAI,QAAQ,WAAW,CACvB;AACA,IAAI,SAAS,WAAW,CACxB;AACA,IAAI,UAAU,WAAW,CACzB;AACA,IAAI,iBAAiB,WAAW,CAChC;AACA,IAAI,MAAM,SAAS,OAAO,MAAM;CAC9B,OAAO,IAAI,OAAO,IAAI;AACxB"}
|
|
1
|
+
{"version":3,"file":"devServerClient.native.js","names":[],"sources":["cjs/devServerClient.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 devServerClient_exports = {};\n__export(devServerClient_exports, {\n client: () => client,\n disable: () => disable,\n enable: () => enable,\n log: () => log,\n registerBundle: () => registerBundle,\n setup: () => setup\n});\nmodule.exports = __toCommonJS(devServerClient_exports);\nvar import_pretty_format = __toESM(require(\"pretty-format\"));\nvar import_getDevServerLocation = require(\"./getDevServerLocation\");\nvar import_hmr_client = require(\"./hmr-client\");\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\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 obj[key] = value;\n return obj;\n}\n(0, import_hmr_client.loadHMRClient)();\nvar DevServerClient = /* @__PURE__ */ (function() {\n \"use strict\";\n function DevServerClient2() {\n var _this = this;\n _class_call_check(this, DevServerClient2);\n _define_property(this, \"socket\", void 0);\n _define_property(this, \"buffer\", []);\n var initSocket = function initSocket2() {\n var address = `ws://${(0, import_getDevServerLocation.getDevServerLocation)().host}/__client`;\n _this.socket = new WebSocket(address);\n var onClose = function onClose2(event) {\n console.warn(\"Disconnected from the Dev Server:\", event.message);\n _this.socket = void 0;\n };\n _this.socket.onclose = onClose;\n _this.socket.onerror = onClose;\n _this.socket.onopen = function() {\n _this.flushBuffer();\n };\n };\n if (process.env.NODE_ENV === \"development\") {\n initSocket();\n }\n }\n _create_class(DevServerClient2, [\n {\n key: \"send\",\n value: function send(level, data) {\n try {\n var _this_socket;\n (_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.send(JSON.stringify({\n type: \"client-log\",\n level,\n data: data.map(function(item) {\n return typeof item === \"string\" ? item : (0, import_pretty_format.default)(item, {\n escapeString: true,\n highlight: true,\n maxDepth: 3,\n min: true,\n plugins: [\n // @ts-expect-error\n import_pretty_format.default.plugins.ReactElement\n ]\n });\n })\n }));\n } catch (unused) {\n try {\n var _this_socket1;\n (_this_socket1 = this.socket) === null || _this_socket1 === void 0 ? void 0 : _this_socket1.send(JSON.stringify({\n type: \"client-log\",\n level,\n data: data.map(function(item, index) {\n try {\n return typeof item === \"string\" ? item : JSON.stringify(item);\n } catch (err) {\n return `Error stringifying item at index ${index} - ${item} - ${err}`;\n }\n })\n }));\n } catch (err) {\n try {\n var _this_socket2;\n (_this_socket2 = this.socket) === null || _this_socket2 === void 0 ? void 0 : _this_socket2.send(JSON.stringify({\n type: \"client-log\",\n level: \"error\",\n data: [\n \"error sending client log: \" + err\n ]\n }));\n } catch (unused2) {\n }\n }\n }\n }\n },\n {\n // final err\n // Ignore error\n key: \"flushBuffer\",\n value: function flushBuffer() {\n var _this = this;\n if (globalThis[\"__vxrnTmpLogs\"]) {\n globalThis[\"__vxrnTmpLogs\"].forEach(function(param) {\n var { level: level2, data: data2 } = param;\n _this.buffer.push({\n level: level2,\n data: data2\n });\n });\n delete globalThis[\"__vxrnTmpLogs\"];\n }\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = this.buffer[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var { level, data } = _step.value;\n this.send(level, data);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n this.buffer = [];\n }\n },\n {\n key: \"log\",\n value: function log3(level, data) {\n if (level === \"groupEnd\") {\n return;\n }\n if (this.socket && this.socket.readyState === WebSocket.OPEN) {\n this.flushBuffer();\n this.send(level, data);\n } else {\n if (globalThis[\"__vxrnTmpLogs\"]) return;\n this.buffer.push({\n level,\n data\n });\n }\n }\n },\n {\n // Mock for React Native 0.79 to prevent native error \"getPropertyAsObject: property 'setup' is undefined, expected an Object\"\n key: \"setup\",\n value: function setup3() {\n }\n }\n ]);\n return DevServerClient2;\n})();\nvar client = new DevServerClient();\nvar setup = function setup2() {\n};\nvar enable = function enable2() {\n};\nvar disable = function disable2() {\n};\nvar registerBundle = function registerBundle2() {\n};\nvar log = function log2(level, data) {\n client.log(level, data);\n};\n//# sourceMappingURL=devServerClient.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,cAA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K,UAAU,KAAK,OAAO,eAAe,UAAU,MAAM;KAC5D,KAAK,YAAY;KACjB,KAAK,KAAK,OAAO,IAAI;IACvB,OAAO;KACL,IAAI,WAAW,kBAAkB;KACjC,KAAK,OAAO,KAAK;MACf;MACA;KACF,CAAC;IACH;GACF;EACF;EACA;GAEE,KAAK;GACL,OAAO,SAAS,SAAS,CACzB;EACF;CACF,CAAC;CACD,OAAO;AACT,EAAC,CAAE;AACH,IAAI,SAAS,IAAI,gBAAgB;AACjC,IAAI,QAAQ,SAAS,SAAS,CAC9B;AACA,IAAI,SAAS,SAAS,UAAU,CAChC;AACA,IAAI,UAAU,SAAS,WAAW,CAClC;AACA,IAAI,iBAAiB,SAAS,kBAAkB,CAChD;AACA,IAAI,MAAM,SAAS,KAAK,OAAO,MAAM;CACnC,OAAO,IAAI,OAAO,IAAI;AACxB"}
|
|
@@ -25,9 +25,7 @@ __export(hmr_client_exports, { loadHMRClient: () => loadHMRClient });
|
|
|
25
25
|
module.exports = __toCommonJS(hmr_client_exports);
|
|
26
26
|
var import_getDevServerLocation = require("./getDevServerLocation.native.js");
|
|
27
27
|
function _class_call_check(instance, Constructor) {
|
|
28
|
-
if (!(instance instanceof Constructor))
|
|
29
|
-
throw new TypeError("Cannot call a class as a function");
|
|
30
|
-
}
|
|
28
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
31
29
|
}
|
|
32
30
|
function _defineProperties(target, props) {
|
|
33
31
|
for (var i = 0; i < props.length; i++) {
|
|
@@ -51,9 +49,7 @@ function _define_property(obj, key, value) {
|
|
|
51
49
|
configurable: true,
|
|
52
50
|
writable: true
|
|
53
51
|
});
|
|
54
|
-
} else
|
|
55
|
-
obj[key] = value;
|
|
56
|
-
}
|
|
52
|
+
} else obj[key] = value;
|
|
57
53
|
return obj;
|
|
58
54
|
}
|
|
59
55
|
var HMRClient = /* @__PURE__ */ (function() {
|
|
@@ -166,7 +162,7 @@ var HMRClient = /* @__PURE__ */ (function() {
|
|
|
166
162
|
ignoreDeclined: true,
|
|
167
163
|
ignoreUnaccepted: false,
|
|
168
164
|
ignoreErrored: false,
|
|
169
|
-
onDeclined: function(data) {
|
|
165
|
+
onDeclined: function onDeclined(data) {
|
|
170
166
|
console.warn(" ⓵ [hmr] ignored an update due to declined module", { chain: data.chain });
|
|
171
167
|
}
|
|
172
168
|
}).then(function(renewedModules) {
|
|
@@ -202,16 +198,16 @@ var HMRClient = /* @__PURE__ */ (function() {
|
|
|
202
198
|
]);
|
|
203
199
|
return HMRClient2;
|
|
204
200
|
})();
|
|
205
|
-
var loadHMRClient = function() {
|
|
201
|
+
var loadHMRClient = function loadHMRClient2() {
|
|
206
202
|
var { DevSettings, Platform } = require("react-native");
|
|
207
203
|
var LoadingView = {
|
|
208
|
-
showMessage: function() {},
|
|
209
|
-
hide: function() {}
|
|
204
|
+
showMessage: function showMessage() {},
|
|
205
|
+
hide: function hide() {}
|
|
210
206
|
};
|
|
211
|
-
var reload = function() {
|
|
207
|
+
var reload = function reload2() {
|
|
212
208
|
return DevSettings.reload();
|
|
213
209
|
};
|
|
214
|
-
var dismissErrors = function() {
|
|
210
|
+
var dismissErrors = function dismissErrors2() {
|
|
215
211
|
if (Platform.OS === "ios") {
|
|
216
212
|
var _NativeRedBox_dismiss;
|
|
217
213
|
var NativeRedBox = require("react-native/Libraries/NativeModules/specs/NativeRedBox").default;
|
|
@@ -25,9 +25,7 @@ __export(hmr_client_exports, { loadHMRClient: () => loadHMRClient });
|
|
|
25
25
|
module.exports = __toCommonJS(hmr_client_exports);
|
|
26
26
|
var import_getDevServerLocation = require("./getDevServerLocation.native.js");
|
|
27
27
|
function _class_call_check(instance, Constructor) {
|
|
28
|
-
if (!(instance instanceof Constructor))
|
|
29
|
-
throw new TypeError("Cannot call a class as a function");
|
|
30
|
-
}
|
|
28
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
31
29
|
}
|
|
32
30
|
function _defineProperties(target, props) {
|
|
33
31
|
for (var i = 0; i < props.length; i++) {
|
|
@@ -51,9 +49,7 @@ function _define_property(obj, key, value) {
|
|
|
51
49
|
configurable: true,
|
|
52
50
|
writable: true
|
|
53
51
|
});
|
|
54
|
-
} else
|
|
55
|
-
obj[key] = value;
|
|
56
|
-
}
|
|
52
|
+
} else obj[key] = value;
|
|
57
53
|
return obj;
|
|
58
54
|
}
|
|
59
55
|
var HMRClient = /* @__PURE__ */ (function() {
|
|
@@ -166,7 +162,7 @@ var HMRClient = /* @__PURE__ */ (function() {
|
|
|
166
162
|
ignoreDeclined: true,
|
|
167
163
|
ignoreUnaccepted: false,
|
|
168
164
|
ignoreErrored: false,
|
|
169
|
-
onDeclined: function(data) {
|
|
165
|
+
onDeclined: function onDeclined(data) {
|
|
170
166
|
console.warn(" ⓵ [hmr] ignored an update due to declined module", { chain: data.chain });
|
|
171
167
|
}
|
|
172
168
|
}).then(function(renewedModules) {
|
|
@@ -202,16 +198,16 @@ var HMRClient = /* @__PURE__ */ (function() {
|
|
|
202
198
|
]);
|
|
203
199
|
return HMRClient2;
|
|
204
200
|
})();
|
|
205
|
-
var loadHMRClient = function() {
|
|
201
|
+
var loadHMRClient = function loadHMRClient2() {
|
|
206
202
|
var { DevSettings, Platform } = require("react-native");
|
|
207
203
|
var LoadingView = {
|
|
208
|
-
showMessage: function() {},
|
|
209
|
-
hide: function() {}
|
|
204
|
+
showMessage: function showMessage() {},
|
|
205
|
+
hide: function hide() {}
|
|
210
206
|
};
|
|
211
|
-
var reload = function() {
|
|
207
|
+
var reload = function reload2() {
|
|
212
208
|
return DevSettings.reload();
|
|
213
209
|
};
|
|
214
|
-
var dismissErrors = function() {
|
|
210
|
+
var dismissErrors = function dismissErrors2() {
|
|
215
211
|
if (Platform.OS === "ios") {
|
|
216
212
|
var _NativeRedBox_dismiss;
|
|
217
213
|
var NativeRedBox = require("react-native/Libraries/NativeModules/specs/NativeRedBox").default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmr-client.native.js","names":[],"sources":["cjs/hmr-client.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 __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar hmr_client_exports = {};\n__export(hmr_client_exports, {\n loadHMRClient: () => loadHMRClient\n});\nmodule.exports = __toCommonJS(hmr_client_exports);\nvar import_getDevServerLocation = require(\"./getDevServerLocation\");\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 HMRClient = /* @__PURE__ */ (function() {\n \"use strict\";\n function HMRClient2(app) {\n var _this = this;\n _class_call_check(this, HMRClient2);\n _define_property(this, \"app\", void 0);\n _define_property(this, \"url\", void 0);\n _define_property(this, \"socket\", void 0);\n _define_property(this, \"lastHash\", void 0);\n this.app = app;\n this.lastHash = \"\";\n var port = process.env.REACT_NATIVE_SERVER_PUBLIC_PORT || 8081;\n this.url = `ws://${(0, import_getDevServerLocation.getDevServerLocation)().hostname}:${port}/__hmr?platform=${process.env.REACT_NATIVE_PLATFORM || \"ios\"}`;\n this.socket = new WebSocket(this.url);\n console.info(\" \\u24F5 [hmr] connecting...\");\n this.socket.onopen = function() {\n console.info(\" \\u24F5 [hmr] connected\");\n };\n this.socket.onclose = function() {\n console.info(` \\u24F5 [hmr] disconnected ${_this.url}`);\n };\n this.socket.onerror = function(event) {\n console.error(\" \\u24F5 [hmr] error\", event);\n };\n this.socket.onmessage = function(event) {\n try {\n var data = JSON.parse(event.data.toString());\n _this.processMessage(data);\n } catch (error) {\n console.warn(\" \\u24F5 [hmr] invalid message\", error);\n }\n };\n }\n _create_class(HMRClient2, [\n {\n key: \"upToDate\",\n value: function upToDate(hash) {\n if (hash) {\n this.lastHash = hash;\n }\n return this.lastHash === __webpack_hash__;\n }\n },\n {\n key: \"processMessage\",\n value: function processMessage(message) {\n switch (message.action) {\n case \"building\":\n var _message_body;\n this.app.LoadingView.showMessage(\"Rebuilding...\", \"refresh\");\n console.info(\" \\u24F5 [hmr] bundle rebuilding\", {\n name: (_message_body = message.body) === null || _message_body === void 0 ? void 0 : _message_body.name\n });\n break;\n // biome-ignore lint/suspicious/noFallthroughSwitchClause: <explanation>\n case \"built\":\n var _message_body1, _message_body2;\n console.info(\" \\u24F5 [hmr] bundle rebuilt\", {\n name: (_message_body1 = message.body) === null || _message_body1 === void 0 ? void 0 : _message_body1.name,\n time: (_message_body2 = message.body) === null || _message_body2 === void 0 ? void 0 : _message_body2.time\n });\n // Fall through\n case \"sync\":\n var _message_body_errors, _message_body_warnings;\n if (!message.body) {\n console.warn(\" \\u24F5 [hmr] message body is empty\");\n return;\n }\n if ((_message_body_errors = message.body.errors) === null || _message_body_errors === void 0 ? void 0 : _message_body_errors.length) {\n message.body.errors.forEach(function(error) {\n console.error(\"Cannot apply update due to error:\", error);\n });\n this.app.LoadingView.hide();\n return;\n }\n if ((_message_body_warnings = message.body.warnings) === null || _message_body_warnings === void 0 ? void 0 : _message_body_warnings.length) {\n message.body.warnings.forEach(function(warning) {\n console.warn(\" \\u24F5 [hmr] bundle contains warnings:\", warning);\n });\n }\n this.applyUpdate(message.body);\n }\n }\n },\n {\n key: \"applyUpdate\",\n value: function applyUpdate(update) {\n if (!module.hot) {\n throw new Error(\" \\u24F5 [hmr] hot Module Replacement is disabled.\");\n }\n if (!this.upToDate(update.hash) && module.hot.status() === \"idle\") {\n console.info(\" \\u24F5 [hmr] checking for updates on the server...\");\n this.checkUpdates(update);\n }\n }\n },\n {\n key: \"checkUpdates\",\n value: function checkUpdates(update) {\n var _this = this;\n try {\n var _module_hot;\n this.app.LoadingView.showMessage(\"Refreshing...\", \"refresh\");\n (_module_hot = module.hot) === null || _module_hot === void 0 ? void 0 : _module_hot.check(false).then(function(updatedModules) {\n var _module_hot3;\n if (!updatedModules) {\n console.warn(\" \\u24F5 [hmr] cannot find update - full reload needed\");\n _this.app.reload();\n return;\n }\n (_module_hot3 = module.hot) === null || _module_hot3 === void 0 ? void 0 : _module_hot3.apply({\n ignoreDeclined: true,\n ignoreUnaccepted: false,\n ignoreErrored: false,\n onDeclined: function(data) {\n console.warn(\" \\u24F5 [hmr] ignored an update due to declined module\", {\n chain: data.chain\n });\n }\n }).then(function(renewedModules) {\n if (!_this.upToDate()) {\n _this.checkUpdates(update);\n }\n var unacceptedModules = updatedModules.filter(function(moduleId) {\n return renewedModules && renewedModules.indexOf(moduleId) < 0;\n });\n if (unacceptedModules.length) {\n console.warn(\" \\u24F5 [hmr] not every module was accepted - full reload needed\", {\n unacceptedModules\n });\n _this.app.reload();\n } else {\n console.info(\" \\u24F5 [hmr] renewed modules - app is up to date\", {\n renewedModules\n });\n _this.app.dismissErrors();\n }\n });\n });\n } catch (error) {\n var _module_hot1, _module_hot2;\n if (((_module_hot1 = module.hot) === null || _module_hot1 === void 0 ? void 0 : _module_hot1.status()) === \"fail\" || ((_module_hot2 = module.hot) === null || _module_hot2 === void 0 ? void 0 : _module_hot2.status()) === \"abort\") {\n console.warn(\" \\u24F5 [hmr] cannot check for update - full reload needed\");\n console.warn(\"[hmr]\", error);\n this.app.reload();\n } else {\n console.warn(\" \\u24F5 [hmr] update check failed\", {\n error\n });\n }\n } finally {\n this.app.LoadingView.hide();\n }\n }\n }\n ]);\n return HMRClient2;\n})();\nvar loadHMRClient = function() {\n var { DevSettings, Platform } = require(\"react-native\");\n var LoadingView = {\n showMessage: function() {\n },\n hide: function() {\n }\n };\n var reload = function() {\n return DevSettings.reload();\n };\n var dismissErrors = function() {\n if (Platform.OS === \"ios\") {\n var _NativeRedBox_dismiss;\n var NativeRedBox = require(\"react-native/Libraries/NativeModules/specs/NativeRedBox\").default;\n NativeRedBox === null || NativeRedBox === void 0 ? void 0 : (_NativeRedBox_dismiss = NativeRedBox.dismiss) === null || _NativeRedBox_dismiss === void 0 ? void 0 : _NativeRedBox_dismiss.call(NativeRedBox);\n } else {\n var NativeExceptionsManager = require(\"react-native/Libraries/Core/NativeExceptionsManager\").default;\n NativeExceptionsManager === null || NativeExceptionsManager === void 0 ? void 0 : NativeExceptionsManager.dismissRedbox();\n }\n var LogBoxData = require(\"react-native/Libraries/LogBox/Data/LogBoxData\");\n LogBoxData.clear();\n };\n new HMRClient({\n reload,\n dismissErrors,\n LoadingView\n });\n};\n//# sourceMappingURL=hmr-client.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,IA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L,QAAQ,KAAK,gCAAqC,EAChD,MACF,CAAC;KACH;IACF,UAAU;KACR,KAAK,IAAI,YAAY,KAAK;IAC5B;GACF;EACF;CACF,CAAC;CACD,OAAO;AACT,EAAC,CAAE;AACH,IAAI,gBAAgB,WAAW;CAC7B,IAAI,EAAE,aAAa,aAAa,QAAQ,cAAc;CACtD,IAAI,cAAc;EAChB,aAAa,WAAW,CACxB;EACA,MAAM,WAAW,CACjB;CACF;CACA,IAAI,SAAS,WAAW;EACtB,OAAO,YAAY,OAAO;CAC5B;CACA,IAAI,gBAAgB,WAAW;EAC7B,IAAI,SAAS,OAAO,OAAO;GACzB,IAAI;GACJ,IAAI,eAAe,QAAQ,yDAAyD,CAAC,CAAC;GACtF,iBAAiB,QAAQ,iBAAiB,KAAK,IAAI,KAAK,KAAK,wBAAwB,aAAa,aAAa,QAAQ,0BAA0B,KAAK,IAAI,KAAK,IAAI,sBAAsB,KAAK,YAAY;EAC5M,OAAO;GACL,IAAI,0BAA0B,QAAQ,qDAAqD,CAAC,CAAC;GAC7F,4BAA4B,QAAQ,4BAA4B,KAAK,IAAI,KAAK,IAAI,wBAAwB,cAAc;EAC1H;EACA,IAAI,aAAa,QAAQ,+CAA+C;EACxE,WAAW,MAAM;CACnB;CACA,IAAI,UAAU;EACZ;EACA;EACA;CACF,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"hmr-client.native.js","names":[],"sources":["cjs/hmr-client.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 __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar hmr_client_exports = {};\n__export(hmr_client_exports, {\n loadHMRClient: () => loadHMRClient\n});\nmodule.exports = __toCommonJS(hmr_client_exports);\nvar import_getDevServerLocation = require(\"./getDevServerLocation\");\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\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 obj[key] = value;\n return obj;\n}\nvar HMRClient = /* @__PURE__ */ (function() {\n \"use strict\";\n function HMRClient2(app) {\n var _this = this;\n _class_call_check(this, HMRClient2);\n _define_property(this, \"app\", void 0);\n _define_property(this, \"url\", void 0);\n _define_property(this, \"socket\", void 0);\n _define_property(this, \"lastHash\", void 0);\n this.app = app;\n this.lastHash = \"\";\n var port = process.env.REACT_NATIVE_SERVER_PUBLIC_PORT || 8081;\n this.url = `ws://${(0, import_getDevServerLocation.getDevServerLocation)().hostname}:${port}/__hmr?platform=${process.env.REACT_NATIVE_PLATFORM || \"ios\"}`;\n this.socket = new WebSocket(this.url);\n console.info(\" \\u24F5 [hmr] connecting...\");\n this.socket.onopen = function() {\n console.info(\" \\u24F5 [hmr] connected\");\n };\n this.socket.onclose = function() {\n console.info(` \\u24F5 [hmr] disconnected ${_this.url}`);\n };\n this.socket.onerror = function(event) {\n console.error(\" \\u24F5 [hmr] error\", event);\n };\n this.socket.onmessage = function(event) {\n try {\n var data = JSON.parse(event.data.toString());\n _this.processMessage(data);\n } catch (error) {\n console.warn(\" \\u24F5 [hmr] invalid message\", error);\n }\n };\n }\n _create_class(HMRClient2, [\n {\n key: \"upToDate\",\n value: function upToDate(hash) {\n if (hash) {\n this.lastHash = hash;\n }\n return this.lastHash === __webpack_hash__;\n }\n },\n {\n key: \"processMessage\",\n value: function processMessage(message) {\n switch (message.action) {\n case \"building\":\n var _message_body;\n this.app.LoadingView.showMessage(\"Rebuilding...\", \"refresh\");\n console.info(\" \\u24F5 [hmr] bundle rebuilding\", {\n name: (_message_body = message.body) === null || _message_body === void 0 ? void 0 : _message_body.name\n });\n break;\n // biome-ignore lint/suspicious/noFallthroughSwitchClause: <explanation>\n case \"built\":\n var _message_body1, _message_body2;\n console.info(\" \\u24F5 [hmr] bundle rebuilt\", {\n name: (_message_body1 = message.body) === null || _message_body1 === void 0 ? void 0 : _message_body1.name,\n time: (_message_body2 = message.body) === null || _message_body2 === void 0 ? void 0 : _message_body2.time\n });\n // Fall through\n case \"sync\":\n var _message_body_errors, _message_body_warnings;\n if (!message.body) {\n console.warn(\" \\u24F5 [hmr] message body is empty\");\n return;\n }\n if ((_message_body_errors = message.body.errors) === null || _message_body_errors === void 0 ? void 0 : _message_body_errors.length) {\n message.body.errors.forEach(function(error) {\n console.error(\"Cannot apply update due to error:\", error);\n });\n this.app.LoadingView.hide();\n return;\n }\n if ((_message_body_warnings = message.body.warnings) === null || _message_body_warnings === void 0 ? void 0 : _message_body_warnings.length) {\n message.body.warnings.forEach(function(warning) {\n console.warn(\" \\u24F5 [hmr] bundle contains warnings:\", warning);\n });\n }\n this.applyUpdate(message.body);\n }\n }\n },\n {\n key: \"applyUpdate\",\n value: function applyUpdate(update) {\n if (!module.hot) {\n throw new Error(\" \\u24F5 [hmr] hot Module Replacement is disabled.\");\n }\n if (!this.upToDate(update.hash) && module.hot.status() === \"idle\") {\n console.info(\" \\u24F5 [hmr] checking for updates on the server...\");\n this.checkUpdates(update);\n }\n }\n },\n {\n key: \"checkUpdates\",\n value: function checkUpdates(update) {\n var _this = this;\n try {\n var _module_hot;\n this.app.LoadingView.showMessage(\"Refreshing...\", \"refresh\");\n (_module_hot = module.hot) === null || _module_hot === void 0 ? void 0 : _module_hot.check(false).then(function(updatedModules) {\n var _module_hot3;\n if (!updatedModules) {\n console.warn(\" \\u24F5 [hmr] cannot find update - full reload needed\");\n _this.app.reload();\n return;\n }\n (_module_hot3 = module.hot) === null || _module_hot3 === void 0 ? void 0 : _module_hot3.apply({\n ignoreDeclined: true,\n ignoreUnaccepted: false,\n ignoreErrored: false,\n onDeclined: function onDeclined(data) {\n console.warn(\" \\u24F5 [hmr] ignored an update due to declined module\", {\n chain: data.chain\n });\n }\n }).then(function(renewedModules) {\n if (!_this.upToDate()) {\n _this.checkUpdates(update);\n }\n var unacceptedModules = updatedModules.filter(function(moduleId) {\n return renewedModules && renewedModules.indexOf(moduleId) < 0;\n });\n if (unacceptedModules.length) {\n console.warn(\" \\u24F5 [hmr] not every module was accepted - full reload needed\", {\n unacceptedModules\n });\n _this.app.reload();\n } else {\n console.info(\" \\u24F5 [hmr] renewed modules - app is up to date\", {\n renewedModules\n });\n _this.app.dismissErrors();\n }\n });\n });\n } catch (error) {\n var _module_hot1, _module_hot2;\n if (((_module_hot1 = module.hot) === null || _module_hot1 === void 0 ? void 0 : _module_hot1.status()) === \"fail\" || ((_module_hot2 = module.hot) === null || _module_hot2 === void 0 ? void 0 : _module_hot2.status()) === \"abort\") {\n console.warn(\" \\u24F5 [hmr] cannot check for update - full reload needed\");\n console.warn(\"[hmr]\", error);\n this.app.reload();\n } else {\n console.warn(\" \\u24F5 [hmr] update check failed\", {\n error\n });\n }\n } finally {\n this.app.LoadingView.hide();\n }\n }\n }\n ]);\n return HMRClient2;\n})();\nvar loadHMRClient = function loadHMRClient2() {\n var { DevSettings, Platform } = require(\"react-native\");\n var LoadingView = {\n showMessage: function showMessage() {\n },\n hide: function hide() {\n }\n };\n var reload = function reload2() {\n return DevSettings.reload();\n };\n var dismissErrors = function dismissErrors2() {\n if (Platform.OS === \"ios\") {\n var _NativeRedBox_dismiss;\n var NativeRedBox = require(\"react-native/Libraries/NativeModules/specs/NativeRedBox\").default;\n NativeRedBox === null || NativeRedBox === void 0 ? void 0 : (_NativeRedBox_dismiss = NativeRedBox.dismiss) === null || _NativeRedBox_dismiss === void 0 ? void 0 : _NativeRedBox_dismiss.call(NativeRedBox);\n } else {\n var NativeExceptionsManager = require(\"react-native/Libraries/Core/NativeExceptionsManager\").default;\n NativeExceptionsManager === null || NativeExceptionsManager === void 0 ? void 0 : NativeExceptionsManager.dismissRedbox();\n }\n var LogBoxData = require(\"react-native/Libraries/LogBox/Data/LogBoxData\");\n LogBoxData.clear();\n };\n new HMRClient({\n reload,\n dismissErrors,\n LoadingView\n });\n};\n//# sourceMappingURL=hmr-client.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,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU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AAI,gBAAgB,SAAS,iBAAiB;EAC5C,IAAI,SAAS,OAAO,OAAO;GACzB,IAAI;GACJ,IAAI,eAAe,QAAQ,yDAAyD,CAAC,CAAC;GACtF,iBAAiB,QAAQ,iBAAiB,KAAK,IAAI,KAAK,KAAK,wBAAwB,aAAa,aAAa,QAAQ,0BAA0B,KAAK,IAAI,KAAK,IAAI,sBAAsB,KAAK,YAAY;EAC5M,OAAO;GACL,IAAI,0BAA0B,QAAQ,qDAAqD,CAAC,CAAC;GAC7F,4BAA4B,QAAQ,4BAA4B,KAAK,IAAI,KAAK,IAAI,wBAAwB,cAAc;EAC1H;EACA,IAAI,aAAa,QAAQ,+CAA+C;EACxE,WAAW,MAAM;CACnB;CACA,IAAI,UAAU;EACZ;EACA;EACA;CACF,CAAC;AACH"}
|
|
@@ -3,9 +3,7 @@ import { getDevServerLocation } from "./getDevServerLocation.native.js";
|
|
|
3
3
|
import { loadHMRClient } from "./hmr-client.native.js";
|
|
4
4
|
|
|
5
5
|
function _class_call_check(instance, Constructor) {
|
|
6
|
-
if (!(instance instanceof Constructor))
|
|
7
|
-
throw new TypeError("Cannot call a class as a function");
|
|
8
|
-
}
|
|
6
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
9
7
|
}
|
|
10
8
|
function _defineProperties(target, props) {
|
|
11
9
|
for (var i = 0; i < props.length; i++) {
|
|
@@ -29,9 +27,7 @@ function _define_property(obj, key, value) {
|
|
|
29
27
|
configurable: true,
|
|
30
28
|
writable: true
|
|
31
29
|
});
|
|
32
|
-
} else
|
|
33
|
-
obj[key] = value;
|
|
34
|
-
}
|
|
30
|
+
} else obj[key] = value;
|
|
35
31
|
return obj;
|
|
36
32
|
}
|
|
37
33
|
loadHMRClient();
|
|
@@ -42,10 +38,10 @@ var DevServerClient = /* @__PURE__ */ (function() {
|
|
|
42
38
|
_class_call_check(this, DevServerClient2);
|
|
43
39
|
_define_property(this, "socket", void 0);
|
|
44
40
|
_define_property(this, "buffer", []);
|
|
45
|
-
var initSocket = function() {
|
|
41
|
+
var initSocket = function initSocket2() {
|
|
46
42
|
var address = `ws://${getDevServerLocation().host}/__client`;
|
|
47
43
|
_this.socket = new WebSocket(address);
|
|
48
|
-
var onClose = function(event) {
|
|
44
|
+
var onClose = function onClose2(event) {
|
|
49
45
|
console.warn("Disconnected from the Dev Server:", event.message);
|
|
50
46
|
_this.socket = void 0;
|
|
51
47
|
};
|
|
@@ -144,7 +140,7 @@ var DevServerClient = /* @__PURE__ */ (function() {
|
|
|
144
140
|
},
|
|
145
141
|
{
|
|
146
142
|
key: "log",
|
|
147
|
-
value: function
|
|
143
|
+
value: function log3(level, data) {
|
|
148
144
|
if (level === "groupEnd") {
|
|
149
145
|
return;
|
|
150
146
|
}
|
|
@@ -162,17 +158,17 @@ var DevServerClient = /* @__PURE__ */ (function() {
|
|
|
162
158
|
},
|
|
163
159
|
{
|
|
164
160
|
key: "setup",
|
|
165
|
-
value: function
|
|
161
|
+
value: function setup3() {}
|
|
166
162
|
}
|
|
167
163
|
]);
|
|
168
164
|
return DevServerClient2;
|
|
169
165
|
})();
|
|
170
166
|
var client = new DevServerClient();
|
|
171
|
-
var setup = function() {};
|
|
172
|
-
var enable = function() {};
|
|
173
|
-
var disable = function() {};
|
|
174
|
-
var registerBundle = function() {};
|
|
175
|
-
var log = function(level, data) {
|
|
167
|
+
var setup = function setup2() {};
|
|
168
|
+
var enable = function enable2() {};
|
|
169
|
+
var disable = function disable2() {};
|
|
170
|
+
var registerBundle = function registerBundle2() {};
|
|
171
|
+
var log = function log2(level, data) {
|
|
176
172
|
client.log(level, data);
|
|
177
173
|
};
|
|
178
174
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devServerClient.native.js","names":[],"sources":["esm/devServerClient.native.js"],"sourcesContent":["import prettyFormat from \"pretty-format\";\nimport { getDevServerLocation } from \"./getDevServerLocation\";\nimport { loadHMRClient } from \"./hmr-client\";\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor))
|
|
1
|
+
{"version":3,"file":"devServerClient.native.js","names":[],"sources":["esm/devServerClient.native.js"],"sourcesContent":["import prettyFormat from \"pretty-format\";\nimport { getDevServerLocation } from \"./getDevServerLocation\";\nimport { loadHMRClient } from \"./hmr-client\";\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\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 obj[key] = value;\n return obj;\n}\nloadHMRClient();\nvar DevServerClient = /* @__PURE__ */ (function() {\n \"use strict\";\n function DevServerClient2() {\n var _this = this;\n _class_call_check(this, DevServerClient2);\n _define_property(this, \"socket\", void 0);\n _define_property(this, \"buffer\", []);\n var initSocket = function initSocket2() {\n var address = `ws://${getDevServerLocation().host}/__client`;\n _this.socket = new WebSocket(address);\n var onClose = function onClose2(event) {\n console.warn(\"Disconnected from the Dev Server:\", event.message);\n _this.socket = void 0;\n };\n _this.socket.onclose = onClose;\n _this.socket.onerror = onClose;\n _this.socket.onopen = function() {\n _this.flushBuffer();\n };\n };\n if (process.env.NODE_ENV === \"development\") {\n initSocket();\n }\n }\n _create_class(DevServerClient2, [\n {\n key: \"send\",\n value: function send(level, data) {\n try {\n var _this_socket;\n (_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.send(JSON.stringify({\n type: \"client-log\",\n level,\n data: data.map(function(item) {\n return typeof item === \"string\" ? item : prettyFormat(item, {\n escapeString: true,\n highlight: true,\n maxDepth: 3,\n min: true,\n plugins: [\n // @ts-expect-error\n prettyFormat.plugins.ReactElement\n ]\n });\n })\n }));\n } catch (unused) {\n try {\n var _this_socket1;\n (_this_socket1 = this.socket) === null || _this_socket1 === void 0 ? void 0 : _this_socket1.send(JSON.stringify({\n type: \"client-log\",\n level,\n data: data.map(function(item, index) {\n try {\n return typeof item === \"string\" ? item : JSON.stringify(item);\n } catch (err) {\n return `Error stringifying item at index ${index} - ${item} - ${err}`;\n }\n })\n }));\n } catch (err) {\n try {\n var _this_socket2;\n (_this_socket2 = this.socket) === null || _this_socket2 === void 0 ? void 0 : _this_socket2.send(JSON.stringify({\n type: \"client-log\",\n level: \"error\",\n data: [\n \"error sending client log: \" + err\n ]\n }));\n } catch (unused2) {\n }\n }\n }\n }\n },\n {\n // final err\n // Ignore error\n key: \"flushBuffer\",\n value: function flushBuffer() {\n var _this = this;\n if (globalThis[\"__vxrnTmpLogs\"]) {\n globalThis[\"__vxrnTmpLogs\"].forEach(function(param) {\n var { level: level2, data: data2 } = param;\n _this.buffer.push({\n level: level2,\n data: data2\n });\n });\n delete globalThis[\"__vxrnTmpLogs\"];\n }\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = this.buffer[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var { level, data } = _step.value;\n this.send(level, data);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n this.buffer = [];\n }\n },\n {\n key: \"log\",\n value: function log3(level, data) {\n if (level === \"groupEnd\") {\n return;\n }\n if (this.socket && this.socket.readyState === WebSocket.OPEN) {\n this.flushBuffer();\n this.send(level, data);\n } else {\n if (globalThis[\"__vxrnTmpLogs\"]) return;\n this.buffer.push({\n level,\n data\n });\n }\n }\n },\n {\n // Mock for React Native 0.79 to prevent native error \"getPropertyAsObject: property 'setup' is undefined, expected an Object\"\n key: \"setup\",\n value: function setup3() {\n }\n }\n ]);\n return DevServerClient2;\n})();\nvar client = new DevServerClient();\nvar setup = function setup2() {\n};\nvar enable = function enable2() {\n};\nvar disable = function disable2() {\n};\nvar registerBundle = function registerBundle2() {\n};\nvar log = function log2(level, data) {\n client.log(level, data);\n};\nexport {\n client,\n disable,\n enable,\n log,\n registerBundle,\n setup\n};\n//# sourceMappingURL=devServerClient.js.map\n"],"mappings":";;;;;AAGA,SAAS,kBAAkB,UAAU,aAAa;CAChD,IAAI,EAAE,oBAAoB,cAAc,MAAM,IAAI,UAAU,mCAAmC;AACjG;AACA,SAAS,kBAAkB,QAAQ,OAAO;CACxC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;EACrC,IAAI,aAAa,MAAM;EACvB,WAAW,aAAa,WAAW,cAAc;EACjD,WAAW,eAAe;EAC1B,IAAI,WAAW,YAAY,WAAW,WAAW;EACjD,OAAO,eAAe,QAAQ,WAAW,KAAK,UAAU;CAC1D;AACF;AACA,SAAS,cAAc,aAAa,YAAY,aAAa;CAC3D,IAAI,YAAY,kBAAkB,YAAY,WAAW,UAAU;CACnE,IAAI,aAAa,kBAAkB,aAAa,WAAW;CAC3D,OAAO;AACT;AACA,SAAS,iBAAiB,KAAK,KAAK,OAAO;CACzC,IAAI,OAAO,KAAK;EACd,OAAO,eAAe,KAAK,KAAK;GAC9B;GACA,YAAY;GACZ,cAAc;GACd,UAAU;EACZ,CAAC;CACH,OAAO,IAAI,OAAO;CAClB,OAAO;AACT;AACA,cAAc;AACd,IAAI,kBAAkC,iBAAC,WAAW;CAChD;CACA,SAAS,mBAAmB;EAC1B,IAAI,QAAQ;EACZ,kBAAkB,MAAM,gBAAgB;EACxC,iBAAiB,MAAM,UAAU,KAAK,CAAC;EACvC,iB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;MACA;KACF,CAAC;IACH;GACF;EACF;EACA;GAEE,KAAK;GACL,OAAO,SAAS,SAAS,CACzB;EACF;CACF,CAAC;CACD,OAAO;AACT,EAAC,CAAE;AACH,IAAI,SAAS,IAAI,gBAAgB;AACjC,IAAI,QAAQ,SAAS,SAAS,CAC9B;AACA,IAAI,SAAS,SAAS,UAAU,CAChC;AACA,IAAI,UAAU,SAAS,WAAW,CAClC;AACA,IAAI,iBAAiB,SAAS,kBAAkB,CAChD;AACA,IAAI,MAAM,SAAS,KAAK,OAAO,MAAM;CACnC,OAAO,IAAI,OAAO,IAAI;AACxB"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { getDevServerLocation } from "./getDevServerLocation.native.js";
|
|
2
2
|
|
|
3
3
|
function _class_call_check(instance, Constructor) {
|
|
4
|
-
if (!(instance instanceof Constructor))
|
|
5
|
-
throw new TypeError("Cannot call a class as a function");
|
|
6
|
-
}
|
|
4
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
7
5
|
}
|
|
8
6
|
function _defineProperties(target, props) {
|
|
9
7
|
for (var i = 0; i < props.length; i++) {
|
|
@@ -27,9 +25,7 @@ function _define_property(obj, key, value) {
|
|
|
27
25
|
configurable: true,
|
|
28
26
|
writable: true
|
|
29
27
|
});
|
|
30
|
-
} else
|
|
31
|
-
obj[key] = value;
|
|
32
|
-
}
|
|
28
|
+
} else obj[key] = value;
|
|
33
29
|
return obj;
|
|
34
30
|
}
|
|
35
31
|
var HMRClient = /* @__PURE__ */ (function() {
|
|
@@ -142,7 +138,7 @@ var HMRClient = /* @__PURE__ */ (function() {
|
|
|
142
138
|
ignoreDeclined: true,
|
|
143
139
|
ignoreUnaccepted: false,
|
|
144
140
|
ignoreErrored: false,
|
|
145
|
-
onDeclined: function(data) {
|
|
141
|
+
onDeclined: function onDeclined(data) {
|
|
146
142
|
console.warn(" ⓵ [hmr] ignored an update due to declined module", { chain: data.chain });
|
|
147
143
|
}
|
|
148
144
|
}).then(function(renewedModules) {
|
|
@@ -178,16 +174,16 @@ var HMRClient = /* @__PURE__ */ (function() {
|
|
|
178
174
|
]);
|
|
179
175
|
return HMRClient2;
|
|
180
176
|
})();
|
|
181
|
-
var loadHMRClient = function() {
|
|
177
|
+
var loadHMRClient = function loadHMRClient2() {
|
|
182
178
|
var { DevSettings, Platform } = require("react-native");
|
|
183
179
|
var LoadingView = {
|
|
184
|
-
showMessage: function() {},
|
|
185
|
-
hide: function() {}
|
|
180
|
+
showMessage: function showMessage() {},
|
|
181
|
+
hide: function hide() {}
|
|
186
182
|
};
|
|
187
|
-
var reload = function() {
|
|
183
|
+
var reload = function reload2() {
|
|
188
184
|
return DevSettings.reload();
|
|
189
185
|
};
|
|
190
|
-
var dismissErrors = function() {
|
|
186
|
+
var dismissErrors = function dismissErrors2() {
|
|
191
187
|
if (Platform.OS === "ios") {
|
|
192
188
|
var _NativeRedBox_dismiss;
|
|
193
189
|
var NativeRedBox = require("react-native/Libraries/NativeModules/specs/NativeRedBox").default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmr-client.native.js","names":[],"sources":["esm/hmr-client.native.js"],"sourcesContent":["import { getDevServerLocation } from \"./getDevServerLocation\";\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 HMRClient = /* @__PURE__ */ (function() {\n \"use strict\";\n function HMRClient2(app) {\n var _this = this;\n _class_call_check(this, HMRClient2);\n _define_property(this, \"app\", void 0);\n _define_property(this, \"url\", void 0);\n _define_property(this, \"socket\", void 0);\n _define_property(this, \"lastHash\", void 0);\n this.app = app;\n this.lastHash = \"\";\n var port = process.env.REACT_NATIVE_SERVER_PUBLIC_PORT || 8081;\n this.url = `ws://${getDevServerLocation().hostname}:${port}/__hmr?platform=${process.env.REACT_NATIVE_PLATFORM || \"ios\"}`;\n this.socket = new WebSocket(this.url);\n console.info(\" \\u24F5 [hmr] connecting...\");\n this.socket.onopen = function() {\n console.info(\" \\u24F5 [hmr] connected\");\n };\n this.socket.onclose = function() {\n console.info(` \\u24F5 [hmr] disconnected ${_this.url}`);\n };\n this.socket.onerror = function(event) {\n console.error(\" \\u24F5 [hmr] error\", event);\n };\n this.socket.onmessage = function(event) {\n try {\n var data = JSON.parse(event.data.toString());\n _this.processMessage(data);\n } catch (error) {\n console.warn(\" \\u24F5 [hmr] invalid message\", error);\n }\n };\n }\n _create_class(HMRClient2, [\n {\n key: \"upToDate\",\n value: function upToDate(hash) {\n if (hash) {\n this.lastHash = hash;\n }\n return this.lastHash === __webpack_hash__;\n }\n },\n {\n key: \"processMessage\",\n value: function processMessage(message) {\n switch (message.action) {\n case \"building\":\n var _message_body;\n this.app.LoadingView.showMessage(\"Rebuilding...\", \"refresh\");\n console.info(\" \\u24F5 [hmr] bundle rebuilding\", {\n name: (_message_body = message.body) === null || _message_body === void 0 ? void 0 : _message_body.name\n });\n break;\n // biome-ignore lint/suspicious/noFallthroughSwitchClause: <explanation>\n case \"built\":\n var _message_body1, _message_body2;\n console.info(\" \\u24F5 [hmr] bundle rebuilt\", {\n name: (_message_body1 = message.body) === null || _message_body1 === void 0 ? void 0 : _message_body1.name,\n time: (_message_body2 = message.body) === null || _message_body2 === void 0 ? void 0 : _message_body2.time\n });\n // Fall through\n case \"sync\":\n var _message_body_errors, _message_body_warnings;\n if (!message.body) {\n console.warn(\" \\u24F5 [hmr] message body is empty\");\n return;\n }\n if ((_message_body_errors = message.body.errors) === null || _message_body_errors === void 0 ? void 0 : _message_body_errors.length) {\n message.body.errors.forEach(function(error) {\n console.error(\"Cannot apply update due to error:\", error);\n });\n this.app.LoadingView.hide();\n return;\n }\n if ((_message_body_warnings = message.body.warnings) === null || _message_body_warnings === void 0 ? void 0 : _message_body_warnings.length) {\n message.body.warnings.forEach(function(warning) {\n console.warn(\" \\u24F5 [hmr] bundle contains warnings:\", warning);\n });\n }\n this.applyUpdate(message.body);\n }\n }\n },\n {\n key: \"applyUpdate\",\n value: function applyUpdate(update) {\n if (!module.hot) {\n throw new Error(\" \\u24F5 [hmr] hot Module Replacement is disabled.\");\n }\n if (!this.upToDate(update.hash) && module.hot.status() === \"idle\") {\n console.info(\" \\u24F5 [hmr] checking for updates on the server...\");\n this.checkUpdates(update);\n }\n }\n },\n {\n key: \"checkUpdates\",\n value: function checkUpdates(update) {\n var _this = this;\n try {\n var _module_hot;\n this.app.LoadingView.showMessage(\"Refreshing...\", \"refresh\");\n (_module_hot = module.hot) === null || _module_hot === void 0 ? void 0 : _module_hot.check(false).then(function(updatedModules) {\n var _module_hot3;\n if (!updatedModules) {\n console.warn(\" \\u24F5 [hmr] cannot find update - full reload needed\");\n _this.app.reload();\n return;\n }\n (_module_hot3 = module.hot) === null || _module_hot3 === void 0 ? void 0 : _module_hot3.apply({\n ignoreDeclined: true,\n ignoreUnaccepted: false,\n ignoreErrored: false,\n onDeclined: function(data) {\n console.warn(\" \\u24F5 [hmr] ignored an update due to declined module\", {\n chain: data.chain\n });\n }\n }).then(function(renewedModules) {\n if (!_this.upToDate()) {\n _this.checkUpdates(update);\n }\n var unacceptedModules = updatedModules.filter(function(moduleId) {\n return renewedModules && renewedModules.indexOf(moduleId) < 0;\n });\n if (unacceptedModules.length) {\n console.warn(\" \\u24F5 [hmr] not every module was accepted - full reload needed\", {\n unacceptedModules\n });\n _this.app.reload();\n } else {\n console.info(\" \\u24F5 [hmr] renewed modules - app is up to date\", {\n renewedModules\n });\n _this.app.dismissErrors();\n }\n });\n });\n } catch (error) {\n var _module_hot1, _module_hot2;\n if (((_module_hot1 = module.hot) === null || _module_hot1 === void 0 ? void 0 : _module_hot1.status()) === \"fail\" || ((_module_hot2 = module.hot) === null || _module_hot2 === void 0 ? void 0 : _module_hot2.status()) === \"abort\") {\n console.warn(\" \\u24F5 [hmr] cannot check for update - full reload needed\");\n console.warn(\"[hmr]\", error);\n this.app.reload();\n } else {\n console.warn(\" \\u24F5 [hmr] update check failed\", {\n error\n });\n }\n } finally {\n this.app.LoadingView.hide();\n }\n }\n }\n ]);\n return HMRClient2;\n})();\nvar loadHMRClient = function() {\n var { DevSettings, Platform } = require(\"react-native\");\n var LoadingView = {\n showMessage: function() {\n },\n hide: function() {\n }\n };\n var reload = function() {\n return DevSettings.reload();\n };\n var dismissErrors = function() {\n if (Platform.OS === \"ios\") {\n var _NativeRedBox_dismiss;\n var NativeRedBox = require(\"react-native/Libraries/NativeModules/specs/NativeRedBox\").default;\n NativeRedBox === null || NativeRedBox === void 0 ? void 0 : (_NativeRedBox_dismiss = NativeRedBox.dismiss) === null || _NativeRedBox_dismiss === void 0 ? void 0 : _NativeRedBox_dismiss.call(NativeRedBox);\n } else {\n var NativeExceptionsManager = require(\"react-native/Libraries/Core/NativeExceptionsManager\").default;\n NativeExceptionsManager === null || NativeExceptionsManager === void 0 ? void 0 : NativeExceptionsManager.dismissRedbox();\n }\n var LogBoxData = require(\"react-native/Libraries/LogBox/Data/LogBoxData\");\n LogBoxData.clear();\n };\n new HMRClient({\n reload,\n dismissErrors,\n LoadingView\n });\n};\nexport {\n loadHMRClient\n};\n//# sourceMappingURL=hmr-client.js.map\n"],"mappings":";;;;;;;;;;AACA,SAAS,kBAAkB,UAAU,aAAa;CAChD,IAAI,EAAE,oBAAoB,cAAc;EACtC,MAAM,IAAI,UAAU,mCAAmC;CAC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K,IAAI,wBAAwB,cAAc;EAC1H;EACA,IAAI,uBAAqB,+CAA+C;EACxE,WAAW,MAAM;CACnB;CACA,IAAI,UAAU;EACZ;EACA;EACA;CACF,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"hmr-client.native.js","names":[],"sources":["esm/hmr-client.native.js"],"sourcesContent":["import { getDevServerLocation } from \"./getDevServerLocation\";\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\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 obj[key] = value;\n return obj;\n}\nvar HMRClient = /* @__PURE__ */ (function() {\n \"use strict\";\n function HMRClient2(app) {\n var _this = this;\n _class_call_check(this, HMRClient2);\n _define_property(this, \"app\", void 0);\n _define_property(this, \"url\", void 0);\n _define_property(this, \"socket\", void 0);\n _define_property(this, \"lastHash\", void 0);\n this.app = app;\n this.lastHash = \"\";\n var port = process.env.REACT_NATIVE_SERVER_PUBLIC_PORT || 8081;\n this.url = `ws://${getDevServerLocation().hostname}:${port}/__hmr?platform=${process.env.REACT_NATIVE_PLATFORM || \"ios\"}`;\n this.socket = new WebSocket(this.url);\n console.info(\" \\u24F5 [hmr] connecting...\");\n this.socket.onopen = function() {\n console.info(\" \\u24F5 [hmr] connected\");\n };\n this.socket.onclose = function() {\n console.info(` \\u24F5 [hmr] disconnected ${_this.url}`);\n };\n this.socket.onerror = function(event) {\n console.error(\" \\u24F5 [hmr] error\", event);\n };\n this.socket.onmessage = function(event) {\n try {\n var data = JSON.parse(event.data.toString());\n _this.processMessage(data);\n } catch (error) {\n console.warn(\" \\u24F5 [hmr] invalid message\", error);\n }\n };\n }\n _create_class(HMRClient2, [\n {\n key: \"upToDate\",\n value: function upToDate(hash) {\n if (hash) {\n this.lastHash = hash;\n }\n return this.lastHash === __webpack_hash__;\n }\n },\n {\n key: \"processMessage\",\n value: function processMessage(message) {\n switch (message.action) {\n case \"building\":\n var _message_body;\n this.app.LoadingView.showMessage(\"Rebuilding...\", \"refresh\");\n console.info(\" \\u24F5 [hmr] bundle rebuilding\", {\n name: (_message_body = message.body) === null || _message_body === void 0 ? void 0 : _message_body.name\n });\n break;\n // biome-ignore lint/suspicious/noFallthroughSwitchClause: <explanation>\n case \"built\":\n var _message_body1, _message_body2;\n console.info(\" \\u24F5 [hmr] bundle rebuilt\", {\n name: (_message_body1 = message.body) === null || _message_body1 === void 0 ? void 0 : _message_body1.name,\n time: (_message_body2 = message.body) === null || _message_body2 === void 0 ? void 0 : _message_body2.time\n });\n // Fall through\n case \"sync\":\n var _message_body_errors, _message_body_warnings;\n if (!message.body) {\n console.warn(\" \\u24F5 [hmr] message body is empty\");\n return;\n }\n if ((_message_body_errors = message.body.errors) === null || _message_body_errors === void 0 ? void 0 : _message_body_errors.length) {\n message.body.errors.forEach(function(error) {\n console.error(\"Cannot apply update due to error:\", error);\n });\n this.app.LoadingView.hide();\n return;\n }\n if ((_message_body_warnings = message.body.warnings) === null || _message_body_warnings === void 0 ? void 0 : _message_body_warnings.length) {\n message.body.warnings.forEach(function(warning) {\n console.warn(\" \\u24F5 [hmr] bundle contains warnings:\", warning);\n });\n }\n this.applyUpdate(message.body);\n }\n }\n },\n {\n key: \"applyUpdate\",\n value: function applyUpdate(update) {\n if (!module.hot) {\n throw new Error(\" \\u24F5 [hmr] hot Module Replacement is disabled.\");\n }\n if (!this.upToDate(update.hash) && module.hot.status() === \"idle\") {\n console.info(\" \\u24F5 [hmr] checking for updates on the server...\");\n this.checkUpdates(update);\n }\n }\n },\n {\n key: \"checkUpdates\",\n value: function checkUpdates(update) {\n var _this = this;\n try {\n var _module_hot;\n this.app.LoadingView.showMessage(\"Refreshing...\", \"refresh\");\n (_module_hot = module.hot) === null || _module_hot === void 0 ? void 0 : _module_hot.check(false).then(function(updatedModules) {\n var _module_hot3;\n if (!updatedModules) {\n console.warn(\" \\u24F5 [hmr] cannot find update - full reload needed\");\n _this.app.reload();\n return;\n }\n (_module_hot3 = module.hot) === null || _module_hot3 === void 0 ? void 0 : _module_hot3.apply({\n ignoreDeclined: true,\n ignoreUnaccepted: false,\n ignoreErrored: false,\n onDeclined: function onDeclined(data) {\n console.warn(\" \\u24F5 [hmr] ignored an update due to declined module\", {\n chain: data.chain\n });\n }\n }).then(function(renewedModules) {\n if (!_this.upToDate()) {\n _this.checkUpdates(update);\n }\n var unacceptedModules = updatedModules.filter(function(moduleId) {\n return renewedModules && renewedModules.indexOf(moduleId) < 0;\n });\n if (unacceptedModules.length) {\n console.warn(\" \\u24F5 [hmr] not every module was accepted - full reload needed\", {\n unacceptedModules\n });\n _this.app.reload();\n } else {\n console.info(\" \\u24F5 [hmr] renewed modules - app is up to date\", {\n renewedModules\n });\n _this.app.dismissErrors();\n }\n });\n });\n } catch (error) {\n var _module_hot1, _module_hot2;\n if (((_module_hot1 = module.hot) === null || _module_hot1 === void 0 ? void 0 : _module_hot1.status()) === \"fail\" || ((_module_hot2 = module.hot) === null || _module_hot2 === void 0 ? void 0 : _module_hot2.status()) === \"abort\") {\n console.warn(\" \\u24F5 [hmr] cannot check for update - full reload needed\");\n console.warn(\"[hmr]\", error);\n this.app.reload();\n } else {\n console.warn(\" \\u24F5 [hmr] update check failed\", {\n error\n });\n }\n } finally {\n this.app.LoadingView.hide();\n }\n }\n }\n ]);\n return HMRClient2;\n})();\nvar loadHMRClient = function loadHMRClient2() {\n var { DevSettings, Platform } = require(\"react-native\");\n var LoadingView = {\n showMessage: function showMessage() {\n },\n hide: function hide() {\n }\n };\n var reload = function reload2() {\n return DevSettings.reload();\n };\n var dismissErrors = function dismissErrors2() {\n if (Platform.OS === \"ios\") {\n var _NativeRedBox_dismiss;\n var NativeRedBox = require(\"react-native/Libraries/NativeModules/specs/NativeRedBox\").default;\n NativeRedBox === null || NativeRedBox === void 0 ? void 0 : (_NativeRedBox_dismiss = NativeRedBox.dismiss) === null || _NativeRedBox_dismiss === void 0 ? void 0 : _NativeRedBox_dismiss.call(NativeRedBox);\n } else {\n var NativeExceptionsManager = require(\"react-native/Libraries/Core/NativeExceptionsManager\").default;\n NativeExceptionsManager === null || NativeExceptionsManager === void 0 ? void 0 : NativeExceptionsManager.dismissRedbox();\n }\n var LogBoxData = require(\"react-native/Libraries/LogBox/Data/LogBoxData\");\n LogBoxData.clear();\n };\n new HMRClient({\n reload,\n dismissErrors,\n LoadingView\n });\n};\nexport {\n loadHMRClient\n};\n//# sourceMappingURL=hmr-client.js.map\n"],"mappings":";;;;;;;;;;AACA,SAAS,kBAAkB,UAAU,aAAa;CAChD,IAAI,EAAE,oBAAoB,cAAc,MAAM,IAAI,UAAU,mCAAmC;AACjG;AACA,SAAS,kBAAkB,QAAQ,OAAO;CACxC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;EACrC,IAAI,aAAa,MAAM;EACvB,WAAW,aAAa,WAAW,cAAc;EACjD,WAAW,eAAe;EAC1B,IAAI,WAAW,YAAY,WAAW,WAAW;EACjD,OAAO,eAAe,QAAQ,WAAW,KAAK,UAAU;CAC1D;AACF;AACA,SAAS,cAAc,aAAa,YAAY,aAAa;CAC3D,IAAI,YAAY,kBAAkB,YAAY,WAAW,UAAU;CACnE,IAAI,aAAa,kBAAkB,aAAa,WAAW;CAC3D,OAAO;AACT;AACA,SAAS,iBAAiB,KAAK,KAAK,OAAO;CACzC,IAAI,OAAO,KAAK;EACd,OAAO,eAAe,KAAK,KAAK;GAC9B;GACA,YAAY;GACZ,cAA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MAC3B,KAAK,IAAI,OAAO;KAClB,OAAO;MACL,QAAQ,KAAK,gCAAqC,EAChD,MACF,CAAC;KACH;IACF,UAAU;KACR,KAAK,IAAI,YAAY,KAAK;IAC5B;GACF;EACF;CACF,CAAC;CACD,OAAO;AACT,EAAC,CAAE;AACH,IAAI,gBAAgB,SAAS,iBAAiB;CAC5C,IAAI,EAAE,aAAa,uBAAqB,cAAc;CACtD,IAAI,cAAc;EAChB,aAAa,SAAS,cAAc,CACpC;EACA,MAAM,SAAS,OAAO,CACtB;CACF;CACA,IAAI,SAAS,SAAS,UAAU;EAC9B,OAAO,YAAY,OAAO;CAC5B;CACA,IAAI,gBAAgB,SAAS,iBAAiB;EAC5C,IAAI,SAAS,OAAO,OAAO;GACzB,IAAI;GACJ,IAAI,yBAAuB,yDAAyD,CAAC,CAAC;GACtF,iBAAiB,QAAQ,iBAAiB,KAAK,IAAI,KAAK,KAAK,wBAAwB,aAAa,aAAa,QAAQ,0BAA0B,KAAK,IAAI,KAAK,IAAI,sBAAsB,KAAK,YAAY;EAC5M,OAAO;GACL,IAAI,oCAAkC,qDAAqD,CAAC,CAAC;GAC7F,4BAA4B,QAAQ,4BAA4B,KAAK,IAAI,KAAK,IAAI,wBAAwB,cAAc;EAC1H;EACA,IAAI,uBAAqB,+CAA+C;EACxE,WAAW,MAAM;CACnB;CACA,IAAI,UAAU;EACZ;EACA;EACA;CACF,CAAC;AACH"}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxrn/vite-native-hmr",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"exports": {
|
|
5
5
|
"./package.json": "./package.json",
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./types/index.d.ts",
|
|
8
|
-
"import": "./dist/esm/index.
|
|
8
|
+
"import": "./dist/esm/index.mjs",
|
|
9
9
|
"require": "./dist/cjs/index.cjs"
|
|
10
10
|
},
|
|
11
11
|
"./hmr-client": {
|
|
12
12
|
"types": "./types/hmr-client.d.ts",
|
|
13
|
-
"import": "./dist/esm/hmr-client.
|
|
13
|
+
"import": "./dist/esm/hmr-client.mjs",
|
|
14
14
|
"require": "./dist/cjs/hmr-client.cjs"
|
|
15
15
|
},
|
|
16
16
|
"./hmr-vite": {
|
|
17
|
-
"types": "./types/
|
|
18
|
-
"import": "./dist/esm/
|
|
19
|
-
"require": "./dist/cjs/
|
|
17
|
+
"types": "./types/index.d.ts",
|
|
18
|
+
"import": "./dist/esm/index.mjs",
|
|
19
|
+
"require": "./dist/cjs/index.cjs"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"main": "dist/cjs",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"pretty-format": "^28.1.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tamagui/build": "3.0.
|
|
42
|
+
"@tamagui/build": "3.0.3",
|
|
43
43
|
"react-native": "0.87.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
+
"releaseSourceCommit": "9822993504bd9422425d1d6ee9bfbe96f84c909c",
|
|
51
52
|
"repository": {
|
|
52
53
|
"type": "git",
|
|
53
54
|
"url": "git+https://github.com/onejs/one.git",
|