vxrn 1.14.4 → 1.15.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/cli.mjs +263 -248
- package/dist/cli.mjs.map +1 -1
- package/dist/cli.native.js +267 -252
- package/dist/cli.native.js.map +1 -1
- package/dist/config/getAdditionalViteConfig.mjs +8 -8
- package/dist/config/getAdditionalViteConfig.mjs.map +1 -1
- package/dist/config/getAdditionalViteConfig.native.js +8 -8
- package/dist/config/getAdditionalViteConfig.native.js.map +1 -1
- package/dist/config/getBaseViteConfigOnly.mjs +14 -12
- package/dist/config/getBaseViteConfigOnly.mjs.map +1 -1
- package/dist/config/getBaseViteConfigOnly.native.js +16 -14
- package/dist/config/getBaseViteConfigOnly.native.js.map +1 -1
- package/dist/config/getBaseVitePlugins.mjs +34 -19
- package/dist/config/getBaseVitePlugins.mjs.map +1 -1
- package/dist/config/getBaseVitePlugins.native.js +47 -32
- package/dist/config/getBaseVitePlugins.native.js.map +1 -1
- package/dist/config/getOptimizeDeps.mjs +12 -9
- package/dist/config/getOptimizeDeps.mjs.map +1 -1
- package/dist/config/getOptimizeDeps.native.js +12 -9
- package/dist/config/getOptimizeDeps.native.js.map +1 -1
- package/dist/config/getOptionsFilled.mjs +47 -41
- package/dist/config/getOptionsFilled.mjs.map +1 -1
- package/dist/config/getOptionsFilled.native.js +53 -50
- package/dist/config/getOptionsFilled.native.js.map +1 -1
- package/dist/config/getReactNativePlugins.mjs +5 -2
- package/dist/config/getReactNativePlugins.mjs.map +1 -1
- package/dist/config/getReactNativePlugins.native.js +8 -5
- package/dist/config/getReactNativePlugins.native.js.map +1 -1
- package/dist/config/getServerOptionsFilled.mjs +21 -14
- package/dist/config/getServerOptionsFilled.mjs.map +1 -1
- package/dist/config/getServerOptionsFilled.native.js +25 -21
- package/dist/config/getServerOptionsFilled.native.js.map +1 -1
- package/dist/config/getViteServerConfig.mjs +25 -16
- package/dist/config/getViteServerConfig.mjs.map +1 -1
- package/dist/config/getViteServerConfig.native.js +37 -28
- package/dist/config/getViteServerConfig.native.js.map +1 -1
- package/dist/config/mergeUserConfig.mjs +25 -7
- package/dist/config/mergeUserConfig.mjs.map +1 -1
- package/dist/config/mergeUserConfig.native.js +32 -14
- package/dist/config/mergeUserConfig.native.js.map +1 -1
- package/dist/config/mergeUserConfig.test.mjs +53 -26
- package/dist/config/mergeUserConfig.test.mjs.map +1 -1
- package/dist/config/mergeUserConfig.test.native.js +94 -74
- package/dist/config/mergeUserConfig.test.native.js.map +1 -1
- package/dist/constants.mjs +6 -6
- package/dist/constants.mjs.map +1 -1
- package/dist/constants.native.js +6 -6
- package/dist/constants.native.js.map +1 -1
- package/dist/exports/build.mjs +241 -191
- package/dist/exports/build.mjs.map +1 -1
- package/dist/exports/build.native.js +257 -221
- package/dist/exports/build.native.js.map +1 -1
- package/dist/exports/clean.mjs +17 -12
- package/dist/exports/clean.mjs.map +1 -1
- package/dist/exports/clean.native.js +22 -13
- package/dist/exports/clean.native.js.map +1 -1
- package/dist/exports/createServer.mjs +49 -35
- package/dist/exports/createServer.mjs.map +1 -1
- package/dist/exports/createServer.native.js +50 -34
- package/dist/exports/createServer.native.js.map +1 -1
- package/dist/exports/dev.mjs +119 -74
- package/dist/exports/dev.mjs.map +1 -1
- package/dist/exports/dev.native.js +131 -90
- package/dist/exports/dev.native.js.map +1 -1
- package/dist/exports/loadEnv.mjs +28 -19
- package/dist/exports/loadEnv.mjs.map +1 -1
- package/dist/exports/loadEnv.native.js +33 -28
- package/dist/exports/loadEnv.native.js.map +1 -1
- package/dist/exports/patch.mjs +4 -1
- package/dist/exports/patch.mjs.map +1 -1
- package/dist/exports/patch.native.js +4 -1
- package/dist/exports/patch.native.js.map +1 -1
- package/dist/exports/prebuild.mjs +106 -42
- package/dist/exports/prebuild.mjs.map +1 -1
- package/dist/exports/prebuild.native.js +116 -63
- package/dist/exports/prebuild.native.js.map +1 -1
- package/dist/exports/prebuildWithoutExpo.mjs +44 -39
- package/dist/exports/prebuildWithoutExpo.mjs.map +1 -1
- package/dist/exports/prebuildWithoutExpo.native.js +45 -42
- package/dist/exports/prebuildWithoutExpo.native.js.map +1 -1
- package/dist/exports/runAndroid.mjs +8 -5
- package/dist/exports/runAndroid.mjs.map +1 -1
- package/dist/exports/runAndroid.native.js +2 -1
- package/dist/exports/runAndroid.native.js.map +1 -1
- package/dist/exports/runIos.mjs +8 -5
- package/dist/exports/runIos.mjs.map +1 -1
- package/dist/exports/runIos.native.js +2 -1
- package/dist/exports/runIos.native.js.map +1 -1
- package/dist/exports/serve.mjs +14 -6
- package/dist/exports/serve.mjs.map +1 -1
- package/dist/exports/serve.native.js +21 -13
- package/dist/exports/serve.native.js.map +1 -1
- package/dist/exports/serveStaticAssets.mjs +37 -22
- package/dist/exports/serveStaticAssets.mjs.map +1 -1
- package/dist/exports/serveStaticAssets.native.js +65 -41
- package/dist/exports/serveStaticAssets.native.js.map +1 -1
- package/dist/patches/builtInDepPatches.mjs +145 -62
- package/dist/patches/builtInDepPatches.mjs.map +1 -1
- package/dist/patches/builtInDepPatches.native.js +116 -70
- package/dist/patches/builtInDepPatches.native.js.map +1 -1
- package/dist/plugins/autoDepOptimizePlugin.mjs +66 -42
- package/dist/plugins/autoDepOptimizePlugin.mjs.map +1 -1
- package/dist/plugins/autoDepOptimizePlugin.native.js +83 -63
- package/dist/plugins/autoDepOptimizePlugin.native.js.map +1 -1
- package/dist/plugins/autoDepOptimizePlugin.test.mjs +23 -17
- package/dist/plugins/autoDepOptimizePlugin.test.mjs.map +1 -1
- package/dist/plugins/autoDepOptimizePlugin.test.native.js +31 -27
- package/dist/plugins/autoDepOptimizePlugin.test.native.js.map +1 -1
- package/dist/plugins/defaultDepOptimizePlugin.mjs +6 -2
- package/dist/plugins/defaultDepOptimizePlugin.mjs.map +1 -1
- package/dist/plugins/defaultDepOptimizePlugin.native.js +6 -2
- package/dist/plugins/defaultDepOptimizePlugin.native.js.map +1 -1
- package/dist/plugins/expoManifestRequestHandlerPlugin.mjs +80 -36
- package/dist/plugins/expoManifestRequestHandlerPlugin.mjs.map +1 -1
- package/dist/plugins/expoManifestRequestHandlerPlugin.native.js +93 -46
- package/dist/plugins/expoManifestRequestHandlerPlugin.native.js.map +1 -1
- package/dist/plugins/getResolvedConfigSubset.mjs +3 -1
- package/dist/plugins/getResolvedConfigSubset.mjs.map +1 -1
- package/dist/plugins/getResolvedConfigSubset.native.js +3 -1
- package/dist/plugins/getResolvedConfigSubset.native.js.map +1 -1
- package/dist/plugins/reactNativeCommonJsPlugin.mjs +70 -46
- package/dist/plugins/reactNativeCommonJsPlugin.mjs.map +1 -1
- package/dist/plugins/reactNativeCommonJsPlugin.native.js +99 -68
- package/dist/plugins/reactNativeCommonJsPlugin.native.js.map +1 -1
- package/dist/plugins/reactNativeDevAssetPlugin.mjs +41 -27
- package/dist/plugins/reactNativeDevAssetPlugin.mjs.map +1 -1
- package/dist/plugins/reactNativeDevAssetPlugin.native.js +61 -48
- package/dist/plugins/reactNativeDevAssetPlugin.native.js.map +1 -1
- package/dist/plugins/reactNativeDevServer.mjs +126 -83
- package/dist/plugins/reactNativeDevServer.mjs.map +1 -1
- package/dist/plugins/reactNativeDevServer.native.js +156 -107
- package/dist/plugins/reactNativeDevServer.native.js.map +1 -1
- package/dist/plugins/resolveIdScan.test.mjs +22 -17
- package/dist/plugins/resolveIdScan.test.mjs.map +1 -1
- package/dist/plugins/resolveIdScan.test.native.js +25 -21
- package/dist/plugins/resolveIdScan.test.native.js.map +1 -1
- package/dist/plugins/serverExtensions.test.mjs +66 -38
- package/dist/plugins/serverExtensions.test.mjs.map +1 -1
- package/dist/plugins/serverExtensions.test.native.js +63 -49
- package/dist/plugins/serverExtensions.test.native.js.map +1 -1
- package/dist/rn-commands/bundle/buildBundle.mjs +48 -31
- package/dist/rn-commands/bundle/buildBundle.mjs.map +1 -1
- package/dist/rn-commands/bundle/buildBundle.native.js +52 -35
- package/dist/rn-commands/bundle/buildBundle.native.js.map +1 -1
- package/dist/runtime/hmr-client.mjs +59 -39
- package/dist/runtime/hmr-client.mjs.map +1 -1
- package/dist/runtime/hmr-client.native.js +132 -92
- package/dist/runtime/hmr-client.native.js.map +1 -1
- package/dist/runtime/hmr-runtime.mjs +65 -29
- package/dist/runtime/hmr-runtime.mjs.map +1 -1
- package/dist/runtime/hmr-runtime.native.js +361 -268
- package/dist/runtime/hmr-runtime.native.js.map +1 -1
- package/dist/runtime/react-refresh-utils.mjs +19 -9
- package/dist/runtime/react-refresh-utils.mjs.map +1 -1
- package/dist/runtime/react-refresh-utils.native.js +20 -10
- package/dist/runtime/react-refresh-utils.native.js.map +1 -1
- package/dist/serve/node.mjs +33 -19
- package/dist/serve/node.mjs.map +1 -1
- package/dist/serve/node.native.js +57 -39
- package/dist/serve/node.native.js.map +1 -1
- package/dist/user-interface/index.mjs +114 -61
- package/dist/user-interface/index.mjs.map +1 -1
- package/dist/user-interface/index.native.js +158 -111
- package/dist/user-interface/index.native.js.map +1 -1
- package/dist/utils/assert.mjs +6 -2
- package/dist/utils/assert.mjs.map +1 -1
- package/dist/utils/assert.native.js +12 -4
- package/dist/utils/assert.native.js.map +1 -1
- package/dist/utils/bindKeypressInput.mjs +38 -23
- package/dist/utils/bindKeypressInput.mjs.map +1 -1
- package/dist/utils/bindKeypressInput.native.js +38 -23
- package/dist/utils/bindKeypressInput.native.js.map +1 -1
- package/dist/utils/createNativeDevEngine.mjs +421 -319
- package/dist/utils/createNativeDevEngine.mjs.map +1 -1
- package/dist/utils/createNativeDevEngine.native.js +529 -425
- package/dist/utils/createNativeDevEngine.native.js.map +1 -1
- package/dist/utils/execSync.mjs +6 -4
- package/dist/utils/execSync.mjs.map +1 -1
- package/dist/utils/execSync.native.js.map +1 -1
- package/dist/utils/expoRun.mjs +5 -3
- package/dist/utils/expoRun.mjs.map +1 -1
- package/dist/utils/expoRun.native.js +13 -13
- package/dist/utils/expoRun.native.js.map +1 -1
- package/dist/utils/filterViteServerResolvedUrls.mjs +17 -5
- package/dist/utils/filterViteServerResolvedUrls.mjs.map +1 -1
- package/dist/utils/filterViteServerResolvedUrls.native.js +41 -23
- package/dist/utils/filterViteServerResolvedUrls.native.js.map +1 -1
- package/dist/utils/getServerEntry.mjs +6 -4
- package/dist/utils/getServerEntry.mjs.map +1 -1
- package/dist/utils/getServerEntry.native.js +9 -9
- package/dist/utils/getServerEntry.native.js.map +1 -1
- package/dist/utils/getVitePath.mjs +41 -17
- package/dist/utils/getVitePath.mjs.map +1 -1
- package/dist/utils/getVitePath.native.js +38 -16
- package/dist/utils/getVitePath.native.js.map +1 -1
- package/dist/utils/patches.mjs +143 -73
- package/dist/utils/patches.mjs.map +1 -1
- package/dist/utils/patches.native.js +299 -188
- package/dist/utils/patches.native.js.map +1 -1
- package/dist/utils/patches.test.mjs +106 -69
- package/dist/utils/patches.test.mjs.map +1 -1
- package/dist/utils/patches.test.native.js +100 -75
- package/dist/utils/patches.test.native.js.map +1 -1
- package/dist/utils/printServerUrls.mjs +6 -2
- package/dist/utils/printServerUrls.mjs.map +1 -1
- package/dist/utils/printServerUrls.native.js +28 -18
- package/dist/utils/printServerUrls.native.js.map +1 -1
- package/dist/utils/removeUndefined.mjs +5 -1
- package/dist/utils/removeUndefined.mjs.map +1 -1
- package/dist/utils/removeUndefined.native.js +5 -1
- package/dist/utils/removeUndefined.native.js.map +1 -1
- package/dist/utils/scanDepsToOptimize.mjs +131 -87
- package/dist/utils/scanDepsToOptimize.mjs.map +1 -1
- package/dist/utils/scanDepsToOptimize.native.js +163 -117
- package/dist/utils/scanDepsToOptimize.native.js.map +1 -1
- package/dist/utils/state.mjs +4 -2
- package/dist/utils/state.mjs.map +1 -1
- package/dist/utils/state.native.js +3 -2
- package/dist/utils/state.native.js.map +1 -1
- package/dist/utils/utils.mjs +4 -3
- package/dist/utils/utils.mjs.map +1 -1
- package/dist/utils/utils.native.js +22 -16
- package/dist/utils/utils.native.js.map +1 -1
- package/dist/vendor/debugger-app/src/index.css +1 -1
- package/dist/vendor/debugger-app/src/index.css.map +1 -1
- package/dist/vxrn-vite-plugin.mjs +10 -6
- package/dist/vxrn-vite-plugin.mjs.map +1 -1
- package/dist/vxrn-vite-plugin.native.js +25 -21
- package/dist/vxrn-vite-plugin.native.js.map +1 -1
- package/package.json +12 -12
- package/src/plugins/reactNativeDevServer.ts +0 -6
- package/src/utils/createNativeDevEngine.ts +55 -1
- package/types/plugins/reactNativeDevServer.d.ts.map +1 -1
- package/types/utils/createNativeDevEngine.d.ts.map +1 -1
|
@@ -1,348 +1,441 @@
|
|
|
1
1
|
import { enqueueUpdate, isReactRefreshBoundary } from "./react-refresh-utils.native.js";
|
|
2
2
|
function _assert_this_initialized(self) {
|
|
3
|
-
if (self === void 0)
|
|
3
|
+
if (self === void 0) {
|
|
4
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
5
|
+
}
|
|
4
6
|
return self;
|
|
5
7
|
}
|
|
6
8
|
function _call_super(_this, derived, args) {
|
|
7
|
-
|
|
9
|
+
derived = _get_prototype_of(derived);
|
|
10
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
8
11
|
}
|
|
9
12
|
function _class_call_check(instance, Constructor) {
|
|
10
|
-
if (!(instance instanceof Constructor))
|
|
13
|
+
if (!(instance instanceof Constructor)) {
|
|
14
|
+
throw new TypeError("Cannot call a class as a function");
|
|
15
|
+
}
|
|
11
16
|
}
|
|
12
17
|
function _defineProperties(target, props) {
|
|
13
18
|
for (var i = 0; i < props.length; i++) {
|
|
14
19
|
var descriptor = props[i];
|
|
15
|
-
descriptor.enumerable = descriptor.enumerable ||
|
|
20
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
21
|
+
descriptor.configurable = true;
|
|
22
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
23
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
16
24
|
}
|
|
17
25
|
}
|
|
18
26
|
function _create_class(Constructor, protoProps, staticProps) {
|
|
19
|
-
|
|
27
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
28
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
29
|
+
return Constructor;
|
|
20
30
|
}
|
|
21
31
|
function _define_property(obj, key, value) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
if (key in obj) {
|
|
33
|
+
Object.defineProperty(obj, key, {
|
|
34
|
+
value,
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true
|
|
38
|
+
});
|
|
39
|
+
} else {
|
|
40
|
+
obj[key] = value;
|
|
41
|
+
}
|
|
42
|
+
return obj;
|
|
28
43
|
}
|
|
29
44
|
function _get_prototype_of(o) {
|
|
30
|
-
|
|
45
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {
|
|
31
46
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
32
|
-
}
|
|
47
|
+
};
|
|
48
|
+
return _get_prototype_of(o);
|
|
33
49
|
}
|
|
34
50
|
function _inherits(subClass, superClass) {
|
|
35
|
-
if (typeof superClass
|
|
51
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
52
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
53
|
+
}
|
|
36
54
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
37
55
|
constructor: {
|
|
38
56
|
value: subClass,
|
|
39
|
-
writable:
|
|
40
|
-
configurable:
|
|
57
|
+
writable: true,
|
|
58
|
+
configurable: true
|
|
41
59
|
}
|
|
42
|
-
})
|
|
60
|
+
});
|
|
61
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
43
62
|
}
|
|
44
63
|
function _possible_constructor_return(self, call) {
|
|
45
|
-
|
|
64
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
65
|
+
return call;
|
|
66
|
+
}
|
|
67
|
+
return _assert_this_initialized(self);
|
|
46
68
|
}
|
|
47
69
|
function _set_prototype_of(o, p) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
70
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {
|
|
71
|
+
o2.__proto__ = p2;
|
|
72
|
+
return o2;
|
|
73
|
+
};
|
|
74
|
+
return _set_prototype_of(o, p);
|
|
51
75
|
}
|
|
52
76
|
function _type_of(obj) {
|
|
53
77
|
"@swc/helpers - typeof";
|
|
54
78
|
|
|
55
|
-
return obj && typeof Symbol
|
|
79
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
56
80
|
}
|
|
57
81
|
function _is_native_reflect_construct() {
|
|
58
82
|
try {
|
|
59
83
|
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
60
|
-
} catch {}
|
|
84
|
+
} catch (_) {}
|
|
61
85
|
return (_is_native_reflect_construct = function () {
|
|
62
86
|
return !!result;
|
|
63
87
|
})();
|
|
64
88
|
}
|
|
65
|
-
var BaseDevRuntime = DevRuntime
|
|
66
|
-
|
|
67
|
-
|
|
89
|
+
var BaseDevRuntime = DevRuntime;
|
|
90
|
+
var SimpleEmitter = /* @__PURE__ */function () {
|
|
91
|
+
"use strict";
|
|
68
92
|
|
|
69
|
-
|
|
70
|
-
|
|
93
|
+
function SimpleEmitter1() {
|
|
94
|
+
_class_call_check(this, SimpleEmitter1);
|
|
95
|
+
_define_property(this, "listeners", /* @__PURE__ */new Map());
|
|
96
|
+
}
|
|
97
|
+
_create_class(SimpleEmitter1, [{
|
|
98
|
+
key: "on",
|
|
99
|
+
value: function on(event, fn) {
|
|
100
|
+
if (!this.listeners.has(event)) this.listeners.set(event, /* @__PURE__ */new Set());
|
|
101
|
+
this.listeners.get(event).add(fn);
|
|
71
102
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}]), SimpleEmitter1;
|
|
92
|
-
}(),
|
|
93
|
-
ModuleHotContext = /* @__PURE__ */function () {
|
|
94
|
-
"use strict";
|
|
103
|
+
}, {
|
|
104
|
+
key: "off",
|
|
105
|
+
value: function off(event, fn) {
|
|
106
|
+
var _this_listeners_get;
|
|
107
|
+
(_this_listeners_get = this.listeners.get(event)) === null || _this_listeners_get === void 0 ? void 0 : _this_listeners_get.delete(fn);
|
|
108
|
+
}
|
|
109
|
+
}, {
|
|
110
|
+
key: "emit",
|
|
111
|
+
value: function emit(event, payload) {
|
|
112
|
+
var _this_listeners_get;
|
|
113
|
+
(_this_listeners_get = this.listeners.get(event)) === null || _this_listeners_get === void 0 ? void 0 : _this_listeners_get.forEach(function (fn) {
|
|
114
|
+
return fn(payload);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}]);
|
|
118
|
+
return SimpleEmitter1;
|
|
119
|
+
}();
|
|
120
|
+
var ModuleHotContext = /* @__PURE__ */function () {
|
|
121
|
+
"use strict";
|
|
95
122
|
|
|
96
|
-
|
|
97
|
-
|
|
123
|
+
function ModuleHotContext1(moduleId, socketHolder) {
|
|
124
|
+
_class_call_check(this, ModuleHotContext1);
|
|
125
|
+
_define_property(this, "moduleId", void 0);
|
|
126
|
+
_define_property(this, "socketHolder", void 0);
|
|
127
|
+
_define_property(this, "removeListeners", void 0);
|
|
128
|
+
_define_property(this, "acceptCallbacks", void 0);
|
|
129
|
+
this.moduleId = moduleId;
|
|
130
|
+
this.socketHolder = socketHolder;
|
|
131
|
+
this.removeListeners = [];
|
|
132
|
+
this.acceptCallbacks = [];
|
|
133
|
+
}
|
|
134
|
+
_create_class(ModuleHotContext1, [{
|
|
135
|
+
key: "refresh",
|
|
136
|
+
get: function get() {
|
|
137
|
+
return globalThis.__ReactRefresh;
|
|
98
138
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
139
|
+
}, {
|
|
140
|
+
key: "refreshUtils",
|
|
141
|
+
get: function get() {
|
|
142
|
+
return {
|
|
143
|
+
isReactRefreshBoundary,
|
|
144
|
+
enqueueUpdate
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
}, {
|
|
148
|
+
key: "accept",
|
|
149
|
+
value: function accept() {
|
|
150
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
151
|
+
args[_key] = arguments[_key];
|
|
111
152
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
value: function () {
|
|
115
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
116
|
-
if (args.length === 1) this.acceptCallbacks.push({
|
|
153
|
+
if (args.length === 1) {
|
|
154
|
+
this.acceptCallbacks.push({
|
|
117
155
|
deps: [this.moduleId],
|
|
118
156
|
fn: args[0]
|
|
119
|
-
});else if (args.length !== 0) throw new Error("Invalid arguments for `import.meta.hot.accept`");
|
|
120
|
-
}
|
|
121
|
-
}, {
|
|
122
|
-
key: "invalidate",
|
|
123
|
-
value: function () {
|
|
124
|
-
this.socketHolder.send(JSON.stringify({
|
|
125
|
-
type: "hmr:invalidate",
|
|
126
|
-
moduleId: this.moduleId
|
|
127
|
-
}));
|
|
128
|
-
}
|
|
129
|
-
}, {
|
|
130
|
-
key: "on",
|
|
131
|
-
value: function (event, listener) {
|
|
132
|
-
var _this = this;
|
|
133
|
-
this.socketHolder.on(event, listener), this.removeListeners.push(function () {
|
|
134
|
-
return _this.socketHolder.off(event, listener);
|
|
135
157
|
});
|
|
158
|
+
} else if (args.length === 0) {} else {
|
|
159
|
+
throw new Error("Invalid arguments for `import.meta.hot.accept`");
|
|
136
160
|
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
161
|
+
}
|
|
162
|
+
}, {
|
|
163
|
+
key: "invalidate",
|
|
164
|
+
value: function invalidate() {
|
|
165
|
+
this.socketHolder.send(JSON.stringify({
|
|
166
|
+
type: "hmr:invalidate",
|
|
167
|
+
moduleId: this.moduleId
|
|
168
|
+
}));
|
|
169
|
+
}
|
|
170
|
+
}, {
|
|
171
|
+
key: "on",
|
|
172
|
+
value: function on(event, listener) {
|
|
173
|
+
var _this = this;
|
|
174
|
+
this.socketHolder.on(event, listener);
|
|
175
|
+
this.removeListeners.push(function () {
|
|
176
|
+
return _this.socketHolder.off(event, listener);
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}, {
|
|
180
|
+
key: "off",
|
|
181
|
+
value: function off(event, listener) {
|
|
182
|
+
this.socketHolder.off(event, listener);
|
|
183
|
+
}
|
|
184
|
+
}, {
|
|
185
|
+
key: "send",
|
|
186
|
+
value: function send(type, payload) {
|
|
187
|
+
this.socketHolder.send(JSON.stringify({
|
|
188
|
+
type,
|
|
189
|
+
payload
|
|
190
|
+
}));
|
|
191
|
+
}
|
|
192
|
+
}, {
|
|
193
|
+
key: "cleanup",
|
|
194
|
+
value: function cleanup() {
|
|
195
|
+
var _iteratorNormalCompletion = true,
|
|
196
|
+
_didIteratorError = false,
|
|
197
|
+
_iteratorError = void 0;
|
|
198
|
+
try {
|
|
199
|
+
for (var _iterator = this.removeListeners[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
200
|
+
var removeListener = _step.value;
|
|
201
|
+
removeListener();
|
|
202
|
+
}
|
|
203
|
+
} catch (err) {
|
|
204
|
+
_didIteratorError = true;
|
|
205
|
+
_iteratorError = err;
|
|
206
|
+
} finally {
|
|
156
207
|
try {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
removeListener();
|
|
208
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
209
|
+
_iterator.return();
|
|
160
210
|
}
|
|
161
|
-
} catch (err) {
|
|
162
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
163
211
|
} finally {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
} finally {
|
|
167
|
-
if (_didIteratorError) throw _iteratorError;
|
|
212
|
+
if (_didIteratorError) {
|
|
213
|
+
throw _iteratorError;
|
|
168
214
|
}
|
|
169
215
|
}
|
|
170
|
-
this.removeListeners.length = 0;
|
|
171
216
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
217
|
+
this.removeListeners.length = 0;
|
|
218
|
+
}
|
|
219
|
+
}]);
|
|
220
|
+
return ModuleHotContext1;
|
|
221
|
+
}();
|
|
222
|
+
var SocketHolder = /* @__PURE__ */function () {
|
|
223
|
+
"use strict";
|
|
176
224
|
|
|
177
|
-
|
|
178
|
-
|
|
225
|
+
function SocketHolder1() {
|
|
226
|
+
_class_call_check(this, SocketHolder1);
|
|
227
|
+
_define_property(this, "queuedMessages", []);
|
|
228
|
+
_define_property(this, "emitter", new SimpleEmitter());
|
|
229
|
+
_define_property(this, "_socket", null);
|
|
230
|
+
_define_property(this, "_origin", null);
|
|
231
|
+
}
|
|
232
|
+
_create_class(SocketHolder1, [{
|
|
233
|
+
key: "socket",
|
|
234
|
+
get: function get() {
|
|
235
|
+
return this._socket;
|
|
179
236
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
var _this = this;
|
|
194
|
-
this._socket = socket, this._origin = origin, socket.readyState !== WebSocket.OPEN ? socket.addEventListener("open", function () {
|
|
237
|
+
}, {
|
|
238
|
+
key: "origin",
|
|
239
|
+
get: function get() {
|
|
240
|
+
return this._origin;
|
|
241
|
+
}
|
|
242
|
+
}, {
|
|
243
|
+
key: "setup",
|
|
244
|
+
value: function setup(socket, origin) {
|
|
245
|
+
var _this = this;
|
|
246
|
+
this._socket = socket;
|
|
247
|
+
this._origin = origin;
|
|
248
|
+
if (socket.readyState !== WebSocket.OPEN) {
|
|
249
|
+
socket.addEventListener("open", function () {
|
|
195
250
|
return _this.flushQueuedMessages();
|
|
196
251
|
}, {
|
|
197
|
-
once:
|
|
198
|
-
})
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
key: "on",
|
|
202
|
-
value: function (event, listener) {
|
|
203
|
-
this.emitter.on(event, listener);
|
|
204
|
-
}
|
|
205
|
-
}, {
|
|
206
|
-
key: "off",
|
|
207
|
-
value: function (event, listener) {
|
|
208
|
-
this.emitter.off(event, listener);
|
|
252
|
+
once: true
|
|
253
|
+
});
|
|
254
|
+
} else {
|
|
255
|
+
this.flushQueuedMessages();
|
|
209
256
|
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
257
|
+
}
|
|
258
|
+
}, {
|
|
259
|
+
key: "on",
|
|
260
|
+
value: function on(event, listener) {
|
|
261
|
+
this.emitter.on(event, listener);
|
|
262
|
+
}
|
|
263
|
+
}, {
|
|
264
|
+
key: "off",
|
|
265
|
+
value: function off(event, listener) {
|
|
266
|
+
this.emitter.off(event, listener);
|
|
267
|
+
}
|
|
268
|
+
}, {
|
|
269
|
+
key: "emit",
|
|
270
|
+
value: function emit(event, payload) {
|
|
271
|
+
this.emitter.emit(event, payload);
|
|
272
|
+
}
|
|
273
|
+
}, {
|
|
274
|
+
key: "send",
|
|
275
|
+
value: function send(message) {
|
|
276
|
+
if (this._socket == null || this._socket.readyState !== WebSocket.OPEN) {
|
|
277
|
+
this.queuedMessages.push(message);
|
|
278
|
+
return;
|
|
214
279
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
280
|
+
this.flushQueuedMessages();
|
|
281
|
+
this._socket.send(message);
|
|
282
|
+
}
|
|
283
|
+
}, {
|
|
284
|
+
key: "flushQueuedMessages",
|
|
285
|
+
value: function flushQueuedMessages() {
|
|
286
|
+
if (this._socket == null) return;
|
|
287
|
+
var _iteratorNormalCompletion = true,
|
|
288
|
+
_didIteratorError = false,
|
|
289
|
+
_iteratorError = void 0;
|
|
290
|
+
try {
|
|
291
|
+
for (var _iterator = this.queuedMessages[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
292
|
+
var message = _step.value;
|
|
293
|
+
this._socket.send(message);
|
|
221
294
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
var message = _step.value;
|
|
234
|
-
this._socket.send(message);
|
|
235
|
-
}
|
|
236
|
-
} catch (err) {
|
|
237
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
238
|
-
} finally {
|
|
239
|
-
try {
|
|
240
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
241
|
-
} finally {
|
|
242
|
-
if (_didIteratorError) throw _iteratorError;
|
|
243
|
-
}
|
|
295
|
+
} catch (err) {
|
|
296
|
+
_didIteratorError = true;
|
|
297
|
+
_iteratorError = err;
|
|
298
|
+
} finally {
|
|
299
|
+
try {
|
|
300
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
301
|
+
_iterator.return();
|
|
302
|
+
}
|
|
303
|
+
} finally {
|
|
304
|
+
if (_didIteratorError) {
|
|
305
|
+
throw _iteratorError;
|
|
244
306
|
}
|
|
245
|
-
this.queuedMessages.length = 0;
|
|
246
307
|
}
|
|
247
308
|
}
|
|
248
|
-
|
|
249
|
-
key: "close",
|
|
250
|
-
value: function () {
|
|
251
|
-
var _this__socket;
|
|
252
|
-
(_this__socket = this._socket) === null || _this__socket === void 0 || _this__socket.close();
|
|
253
|
-
}
|
|
254
|
-
}]), SocketHolder1;
|
|
255
|
-
}(),
|
|
256
|
-
ReactNativeDevRuntime = /* @__PURE__ */function (BaseDevRuntime1) {
|
|
257
|
-
"use strict";
|
|
258
|
-
|
|
259
|
-
_inherits(ReactNativeDevRuntime1, BaseDevRuntime1);
|
|
260
|
-
function ReactNativeDevRuntime1() {
|
|
261
|
-
_class_call_check(this, ReactNativeDevRuntime1);
|
|
262
|
-
var _this,
|
|
263
|
-
socketHolder = new SocketHolder(),
|
|
264
|
-
messenger = {
|
|
265
|
-
send: function (message) {
|
|
266
|
-
return socketHolder.send(JSON.stringify(message));
|
|
267
|
-
}
|
|
268
|
-
},
|
|
269
|
-
clientId = `rn-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
270
|
-
return _this = _call_super(this, ReactNativeDevRuntime1, [messenger, clientId]), _define_property(_this, "socketHolder", void 0), _define_property(_this, "moduleHotContexts", /* @__PURE__ */new Map()), _define_property(_this, "moduleHotContextsToBeUpdated", /* @__PURE__ */new Map()), _this.socketHolder = socketHolder, _this;
|
|
309
|
+
this.queuedMessages.length = 0;
|
|
271
310
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
311
|
+
}, {
|
|
312
|
+
key: "close",
|
|
313
|
+
value: function close() {
|
|
314
|
+
var _this__socket;
|
|
315
|
+
(_this__socket = this._socket) === null || _this__socket === void 0 ? void 0 : _this__socket.close();
|
|
316
|
+
}
|
|
317
|
+
}]);
|
|
318
|
+
return SocketHolder1;
|
|
319
|
+
}();
|
|
320
|
+
var ReactNativeDevRuntime = /* @__PURE__ */function (BaseDevRuntime1) {
|
|
321
|
+
"use strict";
|
|
322
|
+
|
|
323
|
+
_inherits(ReactNativeDevRuntime1, BaseDevRuntime1);
|
|
324
|
+
function ReactNativeDevRuntime1() {
|
|
325
|
+
_class_call_check(this, ReactNativeDevRuntime1);
|
|
326
|
+
var _this;
|
|
327
|
+
var socketHolder = new SocketHolder();
|
|
328
|
+
var messenger = {
|
|
329
|
+
send: function (message) {
|
|
330
|
+
return socketHolder.send(JSON.stringify(message));
|
|
277
331
|
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
332
|
+
};
|
|
333
|
+
var clientId = `rn-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
334
|
+
_this = _call_super(this, ReactNativeDevRuntime1, [messenger, clientId]), _define_property(_this, "socketHolder", void 0), _define_property(_this, "moduleHotContexts", /* @__PURE__ */new Map()), _define_property(_this, "moduleHotContextsToBeUpdated", /* @__PURE__ */new Map());
|
|
335
|
+
_this.socketHolder = socketHolder;
|
|
336
|
+
return _this;
|
|
337
|
+
}
|
|
338
|
+
_create_class(ReactNativeDevRuntime1, [{
|
|
339
|
+
key: "createModuleHotContext",
|
|
340
|
+
value: function createModuleHotContext(moduleId) {
|
|
341
|
+
var hotContext = new ModuleHotContext(moduleId, this.socketHolder);
|
|
342
|
+
if (this.moduleHotContexts.has(moduleId)) {
|
|
343
|
+
this.moduleHotContextsToBeUpdated.set(moduleId, hotContext);
|
|
344
|
+
} else {
|
|
345
|
+
this.moduleHotContexts.set(moduleId, hotContext);
|
|
346
|
+
}
|
|
347
|
+
return hotContext;
|
|
348
|
+
}
|
|
349
|
+
}, {
|
|
350
|
+
key: "applyUpdates",
|
|
351
|
+
value: function applyUpdates(boundaries) {
|
|
352
|
+
var _this = this;
|
|
353
|
+
var _iteratorNormalCompletion = true,
|
|
354
|
+
_didIteratorError = false,
|
|
355
|
+
_iteratorError = void 0;
|
|
356
|
+
try {
|
|
357
|
+
var _this1,
|
|
358
|
+
_loop = function () {
|
|
359
|
+
var [moduleId] = _step.value;
|
|
360
|
+
var hotContext = _this1.moduleHotContexts.get(moduleId);
|
|
361
|
+
if (hotContext) {
|
|
362
|
+
hotContext.acceptCallbacks.filter(function (cb) {
|
|
290
363
|
cb.fn(_this.modules[moduleId].exports);
|
|
291
|
-
})
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
364
|
+
});
|
|
365
|
+
hotContext.cleanup();
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
for (var _iterator = boundaries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _this1 = this, _loop();
|
|
369
|
+
} catch (err) {
|
|
370
|
+
_didIteratorError = true;
|
|
371
|
+
_iteratorError = err;
|
|
372
|
+
} finally {
|
|
373
|
+
try {
|
|
374
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
375
|
+
_iterator.return();
|
|
376
|
+
}
|
|
295
377
|
} finally {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
} finally {
|
|
299
|
-
if (_didIteratorError) throw _iteratorError;
|
|
378
|
+
if (_didIteratorError) {
|
|
379
|
+
throw _iteratorError;
|
|
300
380
|
}
|
|
301
381
|
}
|
|
302
|
-
this.moduleHotContextsToBeUpdated.forEach(function (hotContext, moduleId) {
|
|
303
|
-
_this.moduleHotContexts.set(moduleId, hotContext);
|
|
304
|
-
}), this.moduleHotContextsToBeUpdated.clear();
|
|
305
382
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
383
|
+
this.moduleHotContextsToBeUpdated.forEach(function (hotContext, moduleId) {
|
|
384
|
+
_this.moduleHotContexts.set(moduleId, hotContext);
|
|
385
|
+
});
|
|
386
|
+
this.moduleHotContextsToBeUpdated.clear();
|
|
387
|
+
}
|
|
388
|
+
}, {
|
|
389
|
+
key: "setup",
|
|
390
|
+
value: function setup(socket, origin) {
|
|
391
|
+
var _this = this;
|
|
392
|
+
if (this.socketHolder.socket != null) {
|
|
393
|
+
console.warn("[vxrn HMR]: runtime already setup");
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
this.socketHolder.setup(socket, origin);
|
|
397
|
+
socket.addEventListener("message", function (event) {
|
|
398
|
+
var message = JSON.parse(event.data);
|
|
399
|
+
if (isCustomHMRMessage(message)) {
|
|
400
|
+
var _globalThis___VXRN_CUSTOM_HMR_HANDLER__, _globalThis;
|
|
401
|
+
_this.socketHolder.emit(message.type, message.payload);
|
|
402
|
+
(_globalThis___VXRN_CUSTOM_HMR_HANDLER__ = (_globalThis = globalThis).__VXRN_CUSTOM_HMR_HANDLER__) === null || _globalThis___VXRN_CUSTOM_HMR_HANDLER__ === void 0 ? void 0 : _globalThis___VXRN_CUSTOM_HMR_HANDLER__.call(_globalThis, socket, message);
|
|
312
403
|
return;
|
|
313
404
|
}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}, {
|
|
332
|
-
key: "evaluate",
|
|
333
|
-
value: function evaluate(code, sourceURL) {
|
|
334
|
-
globalThis.globalEvalWithSourceUrl ? globalThis.globalEvalWithSourceUrl(code, sourceURL) : eval(code);
|
|
335
|
-
}
|
|
336
|
-
}, {
|
|
337
|
-
key: "reload",
|
|
338
|
-
value: function reload() {
|
|
339
|
-
var moduleName = "DevSettings";
|
|
340
|
-
(globalThis.__turboModuleProxy ? globalThis.__turboModuleProxy(moduleName) : globalThis.nativeModuleProxy[moduleName]).reload();
|
|
405
|
+
switch (message.type) {
|
|
406
|
+
case "hmr:update":
|
|
407
|
+
_this.evaluate(message.code);
|
|
408
|
+
break;
|
|
409
|
+
case "hmr:reload":
|
|
410
|
+
_this.reload();
|
|
411
|
+
break;
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}, {
|
|
416
|
+
key: "evaluate",
|
|
417
|
+
value: function evaluate(code, sourceURL) {
|
|
418
|
+
if (globalThis.globalEvalWithSourceUrl) {
|
|
419
|
+
globalThis.globalEvalWithSourceUrl(code, sourceURL);
|
|
420
|
+
} else {
|
|
421
|
+
eval(code);
|
|
341
422
|
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
423
|
+
}
|
|
424
|
+
}, {
|
|
425
|
+
key: "reload",
|
|
426
|
+
value: function reload() {
|
|
427
|
+
var moduleName = "DevSettings";
|
|
428
|
+
(globalThis.__turboModuleProxy ? globalThis.__turboModuleProxy(moduleName) : globalThis.nativeModuleProxy[moduleName]).reload();
|
|
429
|
+
}
|
|
430
|
+
}]);
|
|
431
|
+
return ReactNativeDevRuntime1;
|
|
432
|
+
}(BaseDevRuntime);
|
|
344
433
|
function isCustomHMRMessage(message) {
|
|
345
|
-
|
|
434
|
+
if ((typeof message === "undefined" ? "undefined" : _type_of(message)) !== "object" || message == null) return false;
|
|
435
|
+
if ("type" in message && typeof message.type === "string" && message.type.startsWith("hmr:")) {
|
|
436
|
+
return false;
|
|
437
|
+
}
|
|
438
|
+
return true;
|
|
346
439
|
}
|
|
347
440
|
globalThis.__rolldown_runtime__ = new ReactNativeDevRuntime();
|
|
348
441
|
//# sourceMappingURL=hmr-runtime.native.js.map
|