@vxrn/vite-native-hmr 1.25.4 → 1.25.5
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/package.json +1 -1
- package/dist/cjs/devServerClient.cjs +0 -154
- package/dist/cjs/devServerClient.native.js +0 -231
- package/dist/cjs/devServerClient.native.js.map +0 -1
- package/dist/cjs/getDevServerLocation.cjs +0 -59
- package/dist/cjs/getDevServerLocation.native.js +0 -62
- package/dist/cjs/getDevServerLocation.native.js.map +0 -1
- package/dist/cjs/hmr-client.cjs +0 -187
- package/dist/cjs/hmr-client.native.js +0 -247
- package/dist/cjs/hmr-client.native.js.map +0 -1
- package/dist/cjs/index.cjs +0 -31
- package/dist/cjs/index.native.js +0 -34
- package/dist/cjs/index.native.js.map +0 -1
- package/dist/esm/devServerClient.mjs +0 -113
- package/dist/esm/devServerClient.mjs.map +0 -1
- package/dist/esm/devServerClient.native.js +0 -187
- package/dist/esm/devServerClient.native.js.map +0 -1
- package/dist/esm/getDevServerLocation.mjs +0 -23
- package/dist/esm/getDevServerLocation.mjs.map +0 -1
- package/dist/esm/getDevServerLocation.native.js +0 -23
- package/dist/esm/getDevServerLocation.native.js.map +0 -1
- package/dist/esm/hmr-client.mjs +0 -162
- package/dist/esm/hmr-client.mjs.map +0 -1
- package/dist/esm/hmr-client.native.js +0 -219
- package/dist/esm/hmr-client.native.js.map +0 -1
- package/dist/esm/index.js +0 -5
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs +0 -5
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js +0 -5
- package/dist/esm/index.native.js.map +0 -1
- package/types/devServerClient.d.ts.map +0 -1
- package/types/getDevServerLocation.d.ts.map +0 -1
- package/types/hmr-client.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,154 +0,0 @@
|
|
|
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 devServerClient_exports = {};
|
|
35
|
-
__export(devServerClient_exports, {
|
|
36
|
-
client: () => client,
|
|
37
|
-
disable: () => disable,
|
|
38
|
-
enable: () => enable,
|
|
39
|
-
log: () => log,
|
|
40
|
-
registerBundle: () => registerBundle,
|
|
41
|
-
setup: () => setup
|
|
42
|
-
});
|
|
43
|
-
module.exports = __toCommonJS(devServerClient_exports);
|
|
44
|
-
var import_pretty_format = __toESM(require("pretty-format"));
|
|
45
|
-
var import_getDevServerLocation = require("./getDevServerLocation.cjs");
|
|
46
|
-
var import_hmr_client = require("./hmr-client.cjs");
|
|
47
|
-
(0, import_hmr_client.loadHMRClient)();
|
|
48
|
-
class DevServerClient {
|
|
49
|
-
socket;
|
|
50
|
-
buffer = [];
|
|
51
|
-
constructor() {
|
|
52
|
-
const initSocket = () => {
|
|
53
|
-
const address = `ws://${(0, import_getDevServerLocation.getDevServerLocation)().host}/__client`;
|
|
54
|
-
this.socket = new WebSocket(address);
|
|
55
|
-
const onClose = event => {
|
|
56
|
-
console.warn("Disconnected from the Dev Server:", event.message);
|
|
57
|
-
this.socket = void 0;
|
|
58
|
-
};
|
|
59
|
-
this.socket.onclose = onClose;
|
|
60
|
-
this.socket.onerror = onClose;
|
|
61
|
-
this.socket.onopen = () => {
|
|
62
|
-
this.flushBuffer();
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
if (process.env.NODE_ENV === "development") {
|
|
66
|
-
initSocket();
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
send(level, data) {
|
|
70
|
-
try {
|
|
71
|
-
this.socket?.send(JSON.stringify({
|
|
72
|
-
type: "client-log",
|
|
73
|
-
level,
|
|
74
|
-
data: data.map(item => typeof item === "string" ? item : (0, import_pretty_format.default)(item, {
|
|
75
|
-
escapeString: true,
|
|
76
|
-
highlight: true,
|
|
77
|
-
maxDepth: 3,
|
|
78
|
-
min: true,
|
|
79
|
-
plugins: [
|
|
80
|
-
// @ts-expect-error
|
|
81
|
-
import_pretty_format.default.plugins.ReactElement]
|
|
82
|
-
}))
|
|
83
|
-
}));
|
|
84
|
-
} catch {
|
|
85
|
-
try {
|
|
86
|
-
this.socket?.send(JSON.stringify({
|
|
87
|
-
type: "client-log",
|
|
88
|
-
level,
|
|
89
|
-
data: data.map((item, index) => {
|
|
90
|
-
try {
|
|
91
|
-
return typeof item === "string" ? item : JSON.stringify(item);
|
|
92
|
-
} catch (err) {
|
|
93
|
-
return `Error stringifying item at index ${index} - ${item} - ${err}`;
|
|
94
|
-
}
|
|
95
|
-
})
|
|
96
|
-
}));
|
|
97
|
-
} catch (err) {
|
|
98
|
-
try {
|
|
99
|
-
this.socket?.send(JSON.stringify({
|
|
100
|
-
type: "client-log",
|
|
101
|
-
level: "error",
|
|
102
|
-
data: ["error sending client log: " + err]
|
|
103
|
-
}));
|
|
104
|
-
} catch {}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
flushBuffer() {
|
|
109
|
-
if (globalThis["__vxrnTmpLogs"]) {
|
|
110
|
-
globalThis["__vxrnTmpLogs"].forEach(({
|
|
111
|
-
level,
|
|
112
|
-
data
|
|
113
|
-
}) => {
|
|
114
|
-
this.buffer.push({
|
|
115
|
-
level,
|
|
116
|
-
data
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
delete globalThis["__vxrnTmpLogs"];
|
|
120
|
-
}
|
|
121
|
-
for (const {
|
|
122
|
-
level,
|
|
123
|
-
data
|
|
124
|
-
} of this.buffer) {
|
|
125
|
-
this.send(level, data);
|
|
126
|
-
}
|
|
127
|
-
this.buffer = [];
|
|
128
|
-
}
|
|
129
|
-
log(level, data) {
|
|
130
|
-
if (level === "groupEnd") {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
if (this.socket && this.socket.readyState === WebSocket.OPEN) {
|
|
134
|
-
this.flushBuffer();
|
|
135
|
-
this.send(level, data);
|
|
136
|
-
} else {
|
|
137
|
-
if (globalThis["__vxrnTmpLogs"]) return;
|
|
138
|
-
this.buffer.push({
|
|
139
|
-
level,
|
|
140
|
-
data
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
// Mock for React Native 0.79 to prevent native error "getPropertyAsObject: property 'setup' is undefined, expected an Object"
|
|
145
|
-
setup() {}
|
|
146
|
-
}
|
|
147
|
-
const client = new DevServerClient();
|
|
148
|
-
const setup = () => {};
|
|
149
|
-
const enable = () => {};
|
|
150
|
-
const disable = () => {};
|
|
151
|
-
const registerBundle = () => {};
|
|
152
|
-
const log = (level, data) => {
|
|
153
|
-
client.log(level, data);
|
|
154
|
-
};
|
|
@@ -1,231 +0,0 @@
|
|
|
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 devServerClient_exports = {};
|
|
37
|
-
__export(devServerClient_exports, {
|
|
38
|
-
client: () => client,
|
|
39
|
-
disable: () => disable,
|
|
40
|
-
enable: () => enable,
|
|
41
|
-
log: () => log,
|
|
42
|
-
registerBundle: () => registerBundle,
|
|
43
|
-
setup: () => setup
|
|
44
|
-
});
|
|
45
|
-
module.exports = __toCommonJS(devServerClient_exports);
|
|
46
|
-
var import_pretty_format = __toESM(require("pretty-format"));
|
|
47
|
-
var import_getDevServerLocation = require("./getDevServerLocation.native.js");
|
|
48
|
-
var import_hmr_client = require("./hmr-client.native.js");
|
|
49
|
-
function _class_call_check(instance, Constructor) {
|
|
50
|
-
if (!(instance instanceof Constructor)) {
|
|
51
|
-
throw new TypeError("Cannot call a class as a function");
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function _defineProperties(target, props) {
|
|
55
|
-
for (var i = 0; i < props.length; i++) {
|
|
56
|
-
var descriptor = props[i];
|
|
57
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
58
|
-
descriptor.configurable = true;
|
|
59
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
60
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
64
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
65
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
66
|
-
return Constructor;
|
|
67
|
-
}
|
|
68
|
-
function _define_property(obj, key, value) {
|
|
69
|
-
if (key in obj) {
|
|
70
|
-
Object.defineProperty(obj, key, {
|
|
71
|
-
value,
|
|
72
|
-
enumerable: true,
|
|
73
|
-
configurable: true,
|
|
74
|
-
writable: true
|
|
75
|
-
});
|
|
76
|
-
} else {
|
|
77
|
-
obj[key] = value;
|
|
78
|
-
}
|
|
79
|
-
return obj;
|
|
80
|
-
}
|
|
81
|
-
(0, import_hmr_client.loadHMRClient)();
|
|
82
|
-
var DevServerClient = /* @__PURE__ */function () {
|
|
83
|
-
"use strict";
|
|
84
|
-
|
|
85
|
-
function DevServerClient2() {
|
|
86
|
-
var _this = this;
|
|
87
|
-
_class_call_check(this, DevServerClient2);
|
|
88
|
-
_define_property(this, "socket", void 0);
|
|
89
|
-
_define_property(this, "buffer", []);
|
|
90
|
-
var initSocket = function () {
|
|
91
|
-
var address = `ws://${(0, import_getDevServerLocation.getDevServerLocation)().host}/__client`;
|
|
92
|
-
_this.socket = new WebSocket(address);
|
|
93
|
-
var onClose = function (event) {
|
|
94
|
-
console.warn("Disconnected from the Dev Server:", event.message);
|
|
95
|
-
_this.socket = void 0;
|
|
96
|
-
};
|
|
97
|
-
_this.socket.onclose = onClose;
|
|
98
|
-
_this.socket.onerror = onClose;
|
|
99
|
-
_this.socket.onopen = function () {
|
|
100
|
-
_this.flushBuffer();
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
if (process.env.NODE_ENV === "development") {
|
|
104
|
-
initSocket();
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
_create_class(DevServerClient2, [{
|
|
108
|
-
key: "send",
|
|
109
|
-
value: function send(level, data) {
|
|
110
|
-
try {
|
|
111
|
-
var _this_socket;
|
|
112
|
-
(_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.send(JSON.stringify({
|
|
113
|
-
type: "client-log",
|
|
114
|
-
level,
|
|
115
|
-
data: data.map(function (item) {
|
|
116
|
-
return typeof item === "string" ? item : (0, import_pretty_format.default)(item, {
|
|
117
|
-
escapeString: true,
|
|
118
|
-
highlight: true,
|
|
119
|
-
maxDepth: 3,
|
|
120
|
-
min: true,
|
|
121
|
-
plugins: [
|
|
122
|
-
// @ts-expect-error
|
|
123
|
-
import_pretty_format.default.plugins.ReactElement]
|
|
124
|
-
});
|
|
125
|
-
})
|
|
126
|
-
}));
|
|
127
|
-
} catch (unused) {
|
|
128
|
-
try {
|
|
129
|
-
var _this_socket1;
|
|
130
|
-
(_this_socket1 = this.socket) === null || _this_socket1 === void 0 ? void 0 : _this_socket1.send(JSON.stringify({
|
|
131
|
-
type: "client-log",
|
|
132
|
-
level,
|
|
133
|
-
data: data.map(function (item, index) {
|
|
134
|
-
try {
|
|
135
|
-
return typeof item === "string" ? item : JSON.stringify(item);
|
|
136
|
-
} catch (err) {
|
|
137
|
-
return `Error stringifying item at index ${index} - ${item} - ${err}`;
|
|
138
|
-
}
|
|
139
|
-
})
|
|
140
|
-
}));
|
|
141
|
-
} catch (err) {
|
|
142
|
-
try {
|
|
143
|
-
var _this_socket2;
|
|
144
|
-
(_this_socket2 = this.socket) === null || _this_socket2 === void 0 ? void 0 : _this_socket2.send(JSON.stringify({
|
|
145
|
-
type: "client-log",
|
|
146
|
-
level: "error",
|
|
147
|
-
data: ["error sending client log: " + err]
|
|
148
|
-
}));
|
|
149
|
-
} catch (unused2) {}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}, {
|
|
154
|
-
// final err
|
|
155
|
-
// Ignore error
|
|
156
|
-
key: "flushBuffer",
|
|
157
|
-
value: function flushBuffer() {
|
|
158
|
-
var _this = this;
|
|
159
|
-
if (globalThis["__vxrnTmpLogs"]) {
|
|
160
|
-
globalThis["__vxrnTmpLogs"].forEach(function (param) {
|
|
161
|
-
var {
|
|
162
|
-
level: level2,
|
|
163
|
-
data: data2
|
|
164
|
-
} = param;
|
|
165
|
-
_this.buffer.push({
|
|
166
|
-
level: level2,
|
|
167
|
-
data: data2
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
delete globalThis["__vxrnTmpLogs"];
|
|
171
|
-
}
|
|
172
|
-
var _iteratorNormalCompletion = true,
|
|
173
|
-
_didIteratorError = false,
|
|
174
|
-
_iteratorError = void 0;
|
|
175
|
-
try {
|
|
176
|
-
for (var _iterator = this.buffer[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
177
|
-
var {
|
|
178
|
-
level,
|
|
179
|
-
data
|
|
180
|
-
} = _step.value;
|
|
181
|
-
this.send(level, data);
|
|
182
|
-
}
|
|
183
|
-
} catch (err) {
|
|
184
|
-
_didIteratorError = true;
|
|
185
|
-
_iteratorError = err;
|
|
186
|
-
} finally {
|
|
187
|
-
try {
|
|
188
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
189
|
-
_iterator.return();
|
|
190
|
-
}
|
|
191
|
-
} finally {
|
|
192
|
-
if (_didIteratorError) {
|
|
193
|
-
throw _iteratorError;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
this.buffer = [];
|
|
198
|
-
}
|
|
199
|
-
}, {
|
|
200
|
-
key: "log",
|
|
201
|
-
value: function log2(level, data) {
|
|
202
|
-
if (level === "groupEnd") {
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
if (this.socket && this.socket.readyState === WebSocket.OPEN) {
|
|
206
|
-
this.flushBuffer();
|
|
207
|
-
this.send(level, data);
|
|
208
|
-
} else {
|
|
209
|
-
if (globalThis["__vxrnTmpLogs"]) return;
|
|
210
|
-
this.buffer.push({
|
|
211
|
-
level,
|
|
212
|
-
data
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}, {
|
|
217
|
-
// Mock for React Native 0.79 to prevent native error "getPropertyAsObject: property 'setup' is undefined, expected an Object"
|
|
218
|
-
key: "setup",
|
|
219
|
-
value: function setup2() {}
|
|
220
|
-
}]);
|
|
221
|
-
return DevServerClient2;
|
|
222
|
-
}();
|
|
223
|
-
var client = new DevServerClient();
|
|
224
|
-
var setup = function () {};
|
|
225
|
-
var enable = function () {};
|
|
226
|
-
var disable = function () {};
|
|
227
|
-
var registerBundle = function () {};
|
|
228
|
-
var log = function (level, data) {
|
|
229
|
-
client.log(level, data);
|
|
230
|
-
};
|
|
231
|
-
//# sourceMappingURL=devServerClient.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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","devServerClient_exports","client","disable","enable","log","registerBundle","setup","module","exports","import_pretty_format","require","import_getDevServerLocation","import_hmr_client","_class_call_check","instance","Constructor","TypeError","_defineProperties","props","i","length","descriptor","configurable","writable","_create_class","protoProps","staticProps","_define_property","obj","loadHMRClient","DevServerClient","DevServerClient2","_this","initSocket","address","getDevServerLocation","host","socket","WebSocket","onClose","event","console","warn","message","onclose","onerror","onopen","flushBuffer","process","env","NODE_ENV","send","level","data","_this_socket","JSON","stringify","type","map","item","default","escapeString","highlight","maxDepth","min","plugins","ReactElement","unused","_this_socket1","index","err","_this_socket2","unused2","globalThis","forEach","param","level2","data2","buffer","push","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","return","log2","readyState","OPEN","setup2"],"sources":["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":"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,CAAC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,EAAE;QACxB;MACF;MACA,IAAI,IAAI,CAACf,MAAM,IAAI,IAAI,CAACA,MAAM,CAACsD,UAAU,KAAKrD,SAAS,CAACsD,IAAI,EAAE;QAC5D,IAAI,CAAC7C,WAAW,CAAC,CAAC;QAClB,IAAI,CAACI,IAAI,CAACC,KAAK,EAAEC,IAAI,CAAC;MACxB,CAAC,MAAM;QACL,IAAIoB,UAAU,CAAC,eAAe,CAAC,EAAE;QACjC,IAAI,CAACK,MAAM,CAACC,IAAI,CAAC;UACf3B,KAAK;UACLC;QACF,CAAC,CAAC;MACJ;IACF;EACF,CAAC,EACD;IACE;IACA7D,GAAG,EAAE,OAAO;IACZM,KAAK,EAAE,SAAS+F,MAAMA,CAAA,EAAG,CACzB;EACF,CAAC,CACF,CAAC;EACF,OAAO9D,gBAAgB;AACzB,CAAC,CAAE,CAAC;AACJ,IAAI9B,MAAM,GAAG,IAAI6B,eAAe,CAAC,CAAC;AAClC,IAAIxB,KAAK,GAAG,SAAAA,CAAA,EAAW,CACvB,CAAC;AACD,IAAIH,MAAM,GAAG,SAAAA,CAAA,EAAW,CACxB,CAAC;AACD,IAAID,OAAO,GAAG,SAAAA,CAAA,EAAW,CACzB,CAAC;AACD,IAAIG,cAAc,GAAG,SAAAA,CAAA,EAAW,CAChC,CAAC;AACD,IAAID,GAAG,GAAG,SAAAA,CAASgD,KAAK,EAAEC,IAAI,EAAE;EAC9BpD,MAAM,CAACG,GAAG,CAACgD,KAAK,EAAEC,IAAI,CAAC;AACzB,CAAC","ignoreList":[]}
|
|
@@ -1,59 +0,0 @@
|
|
|
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 getDevServerLocation_exports = {};
|
|
35
|
-
__export(getDevServerLocation_exports, {
|
|
36
|
-
getDevServerLocation: () => getDevServerLocation
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(getDevServerLocation_exports);
|
|
39
|
-
var import_getDevServer = __toESM(require("react-native/Libraries/Core/Devtools/getDevServer"));
|
|
40
|
-
let location;
|
|
41
|
-
function getDevServerLocation() {
|
|
42
|
-
if (!location) {
|
|
43
|
-
const {
|
|
44
|
-
url
|
|
45
|
-
} = (0, import_getDevServer.default)();
|
|
46
|
-
const origin = url.replace(/\/$/, "");
|
|
47
|
-
const host = origin.replace(/https?:\/\//, "");
|
|
48
|
-
location = {
|
|
49
|
-
host,
|
|
50
|
-
hostname: host.split(":")[0],
|
|
51
|
-
href: url,
|
|
52
|
-
origin,
|
|
53
|
-
pathname: url.split(host)[1],
|
|
54
|
-
port: host.split(":")[1],
|
|
55
|
-
protocol: (url.match(/^([a-z])+:\/\//) || [void 0, void 0])[1]
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
return location;
|
|
59
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
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 getDevServerLocation_exports = {};
|
|
37
|
-
__export(getDevServerLocation_exports, {
|
|
38
|
-
getDevServerLocation: () => getDevServerLocation
|
|
39
|
-
});
|
|
40
|
-
module.exports = __toCommonJS(getDevServerLocation_exports);
|
|
41
|
-
var import_getDevServer = __toESM(require("react-native/Libraries/Core/Devtools/getDevServer"));
|
|
42
|
-
var location;
|
|
43
|
-
function getDevServerLocation() {
|
|
44
|
-
if (!location) {
|
|
45
|
-
var {
|
|
46
|
-
url
|
|
47
|
-
} = (0, import_getDevServer.default)();
|
|
48
|
-
var origin = url.replace(/\/$/, "");
|
|
49
|
-
var host = origin.replace(/https?:\/\//, "");
|
|
50
|
-
location = {
|
|
51
|
-
host,
|
|
52
|
-
hostname: host.split(":")[0],
|
|
53
|
-
href: url,
|
|
54
|
-
origin,
|
|
55
|
-
pathname: url.split(host)[1],
|
|
56
|
-
port: host.split(":")[1],
|
|
57
|
-
protocol: (url.match(/^([a-z])+:\/\//) || [void 0, void 0])[1]
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
return location;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=getDevServerLocation.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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","getDevServerLocation_exports","getDevServerLocation","module","exports","import_getDevServer","require","location","url","default","origin","replace","host","hostname","split","href","pathname","port","protocol","match"],"sources":["getDevServerLocation.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 getDevServerLocation_exports = {};\n__export(getDevServerLocation_exports, {\n getDevServerLocation: () => getDevServerLocation\n});\nmodule.exports = __toCommonJS(getDevServerLocation_exports);\nvar import_getDevServer = __toESM(require(\"react-native/Libraries/Core/Devtools/getDevServer\"));\nvar location;\nfunction getDevServerLocation() {\n if (!location) {\n var { url } = (0, import_getDevServer.default)();\n var origin = url.replace(/\\/$/, \"\");\n var host = origin.replace(/https?:\\/\\//, \"\");\n location = {\n host,\n hostname: host.split(\":\")[0],\n href: url,\n origin,\n pathname: url.split(host)[1],\n port: host.split(\":\")[1],\n protocol: (url.match(/^([a-z])+:\\/\\//) || [\n void 0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