vxrn 1.14.4 → 1.14.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/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 +54 -0
- package/types/plugins/reactNativeDevServer.d.ts.map +1 -1
- package/types/utils/createNativeDevEngine.d.ts.map +1 -1
|
@@ -10,84 +10,112 @@ import semver from "semver";
|
|
|
10
10
|
import { builtInDepPatches } from "../patches/builtInDepPatches.native.js";
|
|
11
11
|
import { globDir } from "./globDir.native.js";
|
|
12
12
|
function _assert_this_initialized(self) {
|
|
13
|
-
if (self === void 0)
|
|
13
|
+
if (self === void 0) {
|
|
14
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15
|
+
}
|
|
14
16
|
return self;
|
|
15
17
|
}
|
|
16
18
|
function _call_super(_this, derived, args) {
|
|
17
|
-
|
|
19
|
+
derived = _get_prototype_of(derived);
|
|
20
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
18
21
|
}
|
|
19
22
|
function _class_call_check(instance, Constructor) {
|
|
20
|
-
if (!(instance instanceof Constructor))
|
|
23
|
+
if (!(instance instanceof Constructor)) {
|
|
24
|
+
throw new TypeError("Cannot call a class as a function");
|
|
25
|
+
}
|
|
21
26
|
}
|
|
22
27
|
function _construct(Parent, args, Class) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
if (_is_native_reflect_construct()) {
|
|
29
|
+
_construct = Reflect.construct;
|
|
30
|
+
} else {
|
|
31
|
+
_construct = function construct(Parent2, args2, Class2) {
|
|
32
|
+
var a = [null];
|
|
33
|
+
a.push.apply(a, args2);
|
|
34
|
+
var Constructor = Function.bind.apply(Parent2, a);
|
|
35
|
+
var instance = new Constructor();
|
|
36
|
+
if (Class2) _set_prototype_of(instance, Class2.prototype);
|
|
37
|
+
return instance;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return _construct.apply(null, arguments);
|
|
30
41
|
}
|
|
31
42
|
function _get_prototype_of(o) {
|
|
32
|
-
|
|
43
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {
|
|
33
44
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
34
|
-
}
|
|
45
|
+
};
|
|
46
|
+
return _get_prototype_of(o);
|
|
35
47
|
}
|
|
36
48
|
function _inherits(subClass, superClass) {
|
|
37
|
-
if (typeof superClass
|
|
49
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
50
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
51
|
+
}
|
|
38
52
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
39
53
|
constructor: {
|
|
40
54
|
value: subClass,
|
|
41
|
-
writable:
|
|
42
|
-
configurable:
|
|
55
|
+
writable: true,
|
|
56
|
+
configurable: true
|
|
43
57
|
}
|
|
44
|
-
})
|
|
58
|
+
});
|
|
59
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
45
60
|
}
|
|
46
61
|
function _instanceof(left, right) {
|
|
47
|
-
|
|
62
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
63
|
+
return !!right[Symbol.hasInstance](left);
|
|
64
|
+
} else {
|
|
65
|
+
return left instanceof right;
|
|
66
|
+
}
|
|
48
67
|
}
|
|
49
68
|
function _is_native_function(fn) {
|
|
50
69
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
51
70
|
}
|
|
52
71
|
function _possible_constructor_return(self, call) {
|
|
53
|
-
|
|
72
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
73
|
+
return call;
|
|
74
|
+
}
|
|
75
|
+
return _assert_this_initialized(self);
|
|
54
76
|
}
|
|
55
77
|
function _set_prototype_of(o, p) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
78
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {
|
|
79
|
+
o2.__proto__ = p2;
|
|
80
|
+
return o2;
|
|
81
|
+
};
|
|
82
|
+
return _set_prototype_of(o, p);
|
|
59
83
|
}
|
|
60
84
|
function _type_of(obj) {
|
|
61
85
|
"@swc/helpers - typeof";
|
|
62
86
|
|
|
63
|
-
return obj && typeof Symbol
|
|
87
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
64
88
|
}
|
|
65
89
|
function _wrap_native_super(Class) {
|
|
66
|
-
var _cache = typeof Map
|
|
67
|
-
|
|
90
|
+
var _cache = typeof Map === "function" ? /* @__PURE__ */new Map() : void 0;
|
|
91
|
+
_wrap_native_super = function wrapNativeSuper(Class2) {
|
|
68
92
|
if (Class2 === null || !_is_native_function(Class2)) return Class2;
|
|
69
|
-
if (typeof Class2
|
|
70
|
-
|
|
93
|
+
if (typeof Class2 !== "function") {
|
|
94
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
95
|
+
}
|
|
96
|
+
if (typeof _cache !== "undefined") {
|
|
71
97
|
if (_cache.has(Class2)) return _cache.get(Class2);
|
|
72
98
|
_cache.set(Class2, Wrapper);
|
|
73
99
|
}
|
|
74
100
|
function Wrapper() {
|
|
75
101
|
return _construct(Class2, arguments, _get_prototype_of(this).constructor);
|
|
76
102
|
}
|
|
77
|
-
|
|
103
|
+
Wrapper.prototype = Object.create(Class2.prototype, {
|
|
78
104
|
constructor: {
|
|
79
105
|
value: Wrapper,
|
|
80
|
-
enumerable:
|
|
81
|
-
writable:
|
|
82
|
-
configurable:
|
|
106
|
+
enumerable: false,
|
|
107
|
+
writable: true,
|
|
108
|
+
configurable: true
|
|
83
109
|
}
|
|
84
|
-
})
|
|
85
|
-
|
|
110
|
+
});
|
|
111
|
+
return _set_prototype_of(Wrapper, Class2);
|
|
112
|
+
};
|
|
113
|
+
return _wrap_native_super(Class);
|
|
86
114
|
}
|
|
87
115
|
function _is_native_reflect_construct() {
|
|
88
116
|
try {
|
|
89
117
|
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
90
|
-
} catch {}
|
|
118
|
+
} catch (_) {}
|
|
91
119
|
return (_is_native_reflect_construct = function () {
|
|
92
120
|
return !!result;
|
|
93
121
|
})();
|
|
@@ -97,28 +125,42 @@ var Bail = /* @__PURE__ */function (Error1) {
|
|
|
97
125
|
|
|
98
126
|
_inherits(Bail2, Error1);
|
|
99
127
|
function Bail2() {
|
|
100
|
-
|
|
128
|
+
_class_call_check(this, Bail2);
|
|
129
|
+
return _call_super(this, Bail2, arguments);
|
|
101
130
|
}
|
|
102
131
|
return Bail2;
|
|
103
132
|
}(_wrap_native_super(Error));
|
|
104
133
|
function bailIfUnchanged(obj1, obj2) {
|
|
105
|
-
if (JSON.stringify(obj1) === JSON.stringify(obj2))
|
|
134
|
+
if (JSON.stringify(obj1) === JSON.stringify(obj2)) {
|
|
135
|
+
throw new Bail();
|
|
136
|
+
}
|
|
106
137
|
}
|
|
107
138
|
function bailIfExists(haystack, needle) {
|
|
108
|
-
if (haystack.includes(needle))
|
|
139
|
+
if (haystack.includes(needle)) {
|
|
140
|
+
throw new Bail();
|
|
141
|
+
}
|
|
109
142
|
}
|
|
110
143
|
async function applyBuiltInPatches(options, extraPatches) {
|
|
111
144
|
var all = [...builtInDepPatches];
|
|
112
145
|
if (extraPatches) {
|
|
113
146
|
var _loop = function (key2) {
|
|
114
|
-
var extraPatchFiles = extraPatches[key2]
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
});
|
|
118
|
-
if (existing) for (var patchKey in extraPatchFiles) existing.patchFiles[patchKey] && console.warn("Warning: Overwriting One built-in patch with user patch", key2, patchKey), existing.patchFiles[patchKey] = extraPatchFiles[patchKey];else all.push({
|
|
119
|
-
module: key2,
|
|
120
|
-
patchFiles: extraPatchFiles
|
|
147
|
+
var extraPatchFiles = extraPatches[key2];
|
|
148
|
+
var existing = all.find(function (x) {
|
|
149
|
+
return x.module === key2;
|
|
121
150
|
});
|
|
151
|
+
if (existing) {
|
|
152
|
+
for (var patchKey in extraPatchFiles) {
|
|
153
|
+
if (existing.patchFiles[patchKey]) {
|
|
154
|
+
console.warn(`Warning: Overwriting One built-in patch with user patch`, key2, patchKey);
|
|
155
|
+
}
|
|
156
|
+
existing.patchFiles[patchKey] = extraPatchFiles[patchKey];
|
|
157
|
+
}
|
|
158
|
+
} else {
|
|
159
|
+
all.push({
|
|
160
|
+
module: key2,
|
|
161
|
+
patchFiles: extraPatchFiles
|
|
162
|
+
});
|
|
163
|
+
}
|
|
122
164
|
};
|
|
123
165
|
for (var key in extraPatches) _loop(key);
|
|
124
166
|
}
|
|
@@ -133,7 +175,7 @@ function getOriginalPath(fullPath) {
|
|
|
133
175
|
async function readPatchStats(nodeModulesDir) {
|
|
134
176
|
try {
|
|
135
177
|
return await FSExtra.readJSON(join(nodeModulesDir, STATS_FILE));
|
|
136
|
-
} catch {
|
|
178
|
+
} catch (unused) {
|
|
137
179
|
return {};
|
|
138
180
|
}
|
|
139
181
|
}
|
|
@@ -145,66 +187,78 @@ function moduleToPnpmStorePattern(moduleName) {
|
|
|
145
187
|
}
|
|
146
188
|
async function applyDependencyPatches(patches) {
|
|
147
189
|
var {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
190
|
+
root = process.cwd()
|
|
191
|
+
} = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
192
|
+
var patchModuleNames = [...new Set(patches.map(function (p) {
|
|
193
|
+
return p.module;
|
|
194
|
+
}))];
|
|
195
|
+
var nodeModulesDirs = findNodeModules({
|
|
196
|
+
cwd: root
|
|
197
|
+
}).flatMap(function (relativePath) {
|
|
198
|
+
var dir = join(root, relativePath);
|
|
199
|
+
var dirs = [dir];
|
|
200
|
+
var pnpmBase = join(dir, ".pnpm");
|
|
201
|
+
if (!FSExtra.existsSync(pnpmBase)) return dirs;
|
|
202
|
+
var pnpmHoistedDir = join(pnpmBase, "node_modules");
|
|
203
|
+
if (FSExtra.existsSync(pnpmHoistedDir)) {
|
|
204
|
+
dirs.push(pnpmHoistedDir);
|
|
205
|
+
}
|
|
206
|
+
var _iteratorNormalCompletion2 = true,
|
|
207
|
+
_didIteratorError2 = false,
|
|
208
|
+
_iteratorError2 = void 0;
|
|
209
|
+
try {
|
|
210
|
+
for (var _iterator2 = patchModuleNames[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
211
|
+
var moduleName = _step2.value;
|
|
212
|
+
var storePattern = moduleToPnpmStorePattern(moduleName);
|
|
213
|
+
var storeMatches = Glob.sync(`${storePattern}@*/node_modules`, {
|
|
214
|
+
cwd: pnpmBase,
|
|
215
|
+
onlyDirectories: true
|
|
216
|
+
});
|
|
217
|
+
var _iteratorNormalCompletion1 = true,
|
|
218
|
+
_didIteratorError1 = false,
|
|
219
|
+
_iteratorError1 = void 0;
|
|
220
|
+
try {
|
|
221
|
+
for (var _iterator1 = storeMatches[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
222
|
+
var match = _step1.value;
|
|
223
|
+
dirs.push(join(pnpmBase, match));
|
|
224
|
+
}
|
|
225
|
+
} catch (err) {
|
|
226
|
+
_didIteratorError1 = true;
|
|
227
|
+
_iteratorError1 = err;
|
|
228
|
+
} finally {
|
|
176
229
|
try {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
dirs.push(join(pnpmBase, match));
|
|
230
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
231
|
+
_iterator1.return();
|
|
180
232
|
}
|
|
181
|
-
} catch (err) {
|
|
182
|
-
_didIteratorError1 = !0, _iteratorError1 = err;
|
|
183
233
|
} finally {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
} finally {
|
|
187
|
-
if (_didIteratorError1) throw _iteratorError1;
|
|
234
|
+
if (_didIteratorError1) {
|
|
235
|
+
throw _iteratorError1;
|
|
188
236
|
}
|
|
189
237
|
}
|
|
190
238
|
}
|
|
191
|
-
}
|
|
192
|
-
|
|
239
|
+
}
|
|
240
|
+
} catch (err) {
|
|
241
|
+
_didIteratorError2 = true;
|
|
242
|
+
_iteratorError2 = err;
|
|
243
|
+
} finally {
|
|
244
|
+
try {
|
|
245
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
246
|
+
_iterator2.return();
|
|
247
|
+
}
|
|
193
248
|
} finally {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
} finally {
|
|
197
|
-
if (_didIteratorError2) throw _iteratorError2;
|
|
249
|
+
if (_didIteratorError2) {
|
|
250
|
+
throw _iteratorError2;
|
|
198
251
|
}
|
|
199
252
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
253
|
+
}
|
|
254
|
+
return dirs;
|
|
255
|
+
});
|
|
256
|
+
var results = /* @__PURE__ */new Map();
|
|
257
|
+
var transformWarnedModules = /* @__PURE__ */new Set();
|
|
258
|
+
var patchedRealPaths = /* @__PURE__ */new Set();
|
|
205
259
|
await Promise.all(nodeModulesDirs.map(async function (nodeModulesDir) {
|
|
206
|
-
var patchStats = await readPatchStats(nodeModulesDir)
|
|
207
|
-
|
|
260
|
+
var patchStats = await readPatchStats(nodeModulesDir);
|
|
261
|
+
var statsChanged = false;
|
|
208
262
|
await Promise.all(patches.map(async function (patch) {
|
|
209
263
|
try {
|
|
210
264
|
var nodeModuleDir = join(nodeModulesDir, patch.module);
|
|
@@ -212,26 +266,27 @@ async function applyDependencyPatches(patches) {
|
|
|
212
266
|
var realModuleDir;
|
|
213
267
|
try {
|
|
214
268
|
realModuleDir = realpathSync(nodeModuleDir);
|
|
215
|
-
} catch {
|
|
269
|
+
} catch (unused) {
|
|
216
270
|
return;
|
|
217
271
|
}
|
|
218
|
-
var patchIdx = patches.indexOf(patch)
|
|
219
|
-
|
|
272
|
+
var patchIdx = patches.indexOf(patch);
|
|
273
|
+
var dedupKey = `${patchIdx}\0${realModuleDir}`;
|
|
220
274
|
if (patchedRealPaths.has(dedupKey)) return;
|
|
221
275
|
patchedRealPaths.add(dedupKey);
|
|
222
276
|
var version = patch.patchFiles.version;
|
|
223
|
-
if (typeof version
|
|
277
|
+
if (typeof version === "string") {
|
|
224
278
|
var pkgJSON = await FSExtra.readJSON(join(nodeModuleDir, "package.json"));
|
|
225
279
|
if (!semver.satisfies(pkgJSON.version, version)) return;
|
|
226
280
|
}
|
|
227
281
|
var filePatches = [];
|
|
228
|
-
for (var file in patch.patchFiles)
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
282
|
+
for (var file in patch.patchFiles) {
|
|
283
|
+
if (file === "version") continue;
|
|
284
|
+
var filesToApply = file.includes("*") ? globDir(nodeModuleDir, file) : [file];
|
|
285
|
+
var _iteratorNormalCompletion2 = true,
|
|
286
|
+
_didIteratorError2 = false,
|
|
232
287
|
_iteratorError2 = void 0;
|
|
233
288
|
try {
|
|
234
|
-
for (var _iterator2 = filesToApply[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 =
|
|
289
|
+
for (var _iterator2 = filesToApply[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
235
290
|
var relativePath = _step2.value;
|
|
236
291
|
filePatches.push({
|
|
237
292
|
relativePath,
|
|
@@ -239,53 +294,61 @@ async function applyDependencyPatches(patches) {
|
|
|
239
294
|
});
|
|
240
295
|
}
|
|
241
296
|
} catch (err) {
|
|
242
|
-
_didIteratorError2 =
|
|
297
|
+
_didIteratorError2 = true;
|
|
298
|
+
_iteratorError2 = err;
|
|
243
299
|
} finally {
|
|
244
300
|
try {
|
|
245
|
-
!_iteratorNormalCompletion2 && _iterator2.return != null
|
|
301
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
302
|
+
_iterator2.return();
|
|
303
|
+
}
|
|
246
304
|
} finally {
|
|
247
|
-
if (_didIteratorError2)
|
|
305
|
+
if (_didIteratorError2) {
|
|
306
|
+
throw _iteratorError2;
|
|
307
|
+
}
|
|
248
308
|
}
|
|
249
309
|
}
|
|
250
310
|
}
|
|
251
311
|
var fileStatsResults = await Promise.all(filePatches.map(async function (param) {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
fullPath,
|
|
261
|
-
stat,
|
|
262
|
-
exists: !0
|
|
263
|
-
};
|
|
264
|
-
} catch {
|
|
265
|
-
return {
|
|
266
|
-
relativePath: relativePath2,
|
|
267
|
-
fullPath,
|
|
268
|
-
stat: null,
|
|
269
|
-
exists: !1
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
})),
|
|
273
|
-
filesToProcess = fileStatsResults.filter(function (param) {
|
|
274
|
-
var {
|
|
312
|
+
var {
|
|
313
|
+
relativePath: relativePath2
|
|
314
|
+
} = param;
|
|
315
|
+
var fullPath = join(nodeModuleDir, relativePath2);
|
|
316
|
+
try {
|
|
317
|
+
var stat = await FSExtra.stat(fullPath);
|
|
318
|
+
return {
|
|
319
|
+
relativePath: relativePath2,
|
|
275
320
|
fullPath,
|
|
276
321
|
stat,
|
|
277
|
-
exists
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
322
|
+
exists: true
|
|
323
|
+
};
|
|
324
|
+
} catch (unused) {
|
|
325
|
+
return {
|
|
326
|
+
relativePath: relativePath2,
|
|
327
|
+
fullPath,
|
|
328
|
+
stat: null,
|
|
329
|
+
exists: false
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
}));
|
|
333
|
+
var filesToProcess = fileStatsResults.filter(function (param) {
|
|
334
|
+
var {
|
|
335
|
+
fullPath,
|
|
336
|
+
stat,
|
|
337
|
+
exists
|
|
338
|
+
} = param;
|
|
339
|
+
if (!exists || !stat) return false;
|
|
340
|
+
if (process.env.VXRN_FORCE_PATCH) return true;
|
|
341
|
+
var cached = patchStats[fullPath];
|
|
342
|
+
if (!cached) return true;
|
|
343
|
+
return stat.size !== cached.size || stat.mtimeMs !== cached.mtimeMs;
|
|
344
|
+
});
|
|
284
345
|
if (filesToProcess.length === 0) {
|
|
285
|
-
results.has(patch.module)
|
|
346
|
+
if (!results.has(patch.module)) {
|
|
347
|
+
results.set(patch.module, "ok");
|
|
348
|
+
}
|
|
286
349
|
return;
|
|
287
350
|
}
|
|
288
|
-
var didApplyPatch =
|
|
351
|
+
var didApplyPatch = false;
|
|
289
352
|
await Promise.all(filesToProcess.map(async function (param) {
|
|
290
353
|
var {
|
|
291
354
|
relativePath: relativePath2,
|
|
@@ -293,49 +356,71 @@ async function applyDependencyPatches(patches) {
|
|
|
293
356
|
} = param;
|
|
294
357
|
try {
|
|
295
358
|
var patchDef = filePatches.find(function (p) {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
if (typeof patchDef
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
_didIteratorError3 = !1,
|
|
308
|
-
_iteratorError3 = void 0;
|
|
359
|
+
return p.relativePath === relativePath2;
|
|
360
|
+
}).patchDefinition;
|
|
361
|
+
var originalPath = getOriginalPath(fullPath);
|
|
362
|
+
var [targetContent, originalContent] = await Promise.all([FSExtra.readFile(fullPath, "utf-8"), FSExtra.readFile(originalPath, "utf-8").catch(function () {
|
|
363
|
+
return null;
|
|
364
|
+
})]);
|
|
365
|
+
var sourceContent = originalContent !== null && originalContent !== void 0 ? originalContent : targetContent;
|
|
366
|
+
var patchedContent = null;
|
|
367
|
+
if (typeof patchDef === "string") {
|
|
368
|
+
patchedContent = patchDef;
|
|
369
|
+
} else if (Array.isArray(patchDef)) {
|
|
309
370
|
try {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
contents = ((_this = await transformSWC(fullPath, contents, {
|
|
315
|
-
mode: "build",
|
|
316
|
-
environment: "ios",
|
|
317
|
-
forceJSX: strategy === "jsx",
|
|
318
|
-
noHMR: !0,
|
|
319
|
-
fixNonTypeSpecificImports: !0
|
|
320
|
-
})) === null || _this === void 0 ? void 0 : _this.code) || contents;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
} catch (err) {
|
|
324
|
-
_didIteratorError3 = !0, _iteratorError3 = err;
|
|
325
|
-
} finally {
|
|
371
|
+
var contents = sourceContent;
|
|
372
|
+
var _iteratorNormalCompletion3 = true,
|
|
373
|
+
_didIteratorError3 = false,
|
|
374
|
+
_iteratorError3 = void 0;
|
|
326
375
|
try {
|
|
327
|
-
|
|
376
|
+
for (var _iterator3 = patchDef[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
|
377
|
+
var strategy = _step3.value;
|
|
378
|
+
if (strategy === "flow") {
|
|
379
|
+
contents = await transformFlowBabel(contents);
|
|
380
|
+
}
|
|
381
|
+
if (strategy === "swc" || strategy === "jsx") {
|
|
382
|
+
var _this;
|
|
383
|
+
contents = ((_this = await transformSWC(fullPath, contents, {
|
|
384
|
+
mode: "build",
|
|
385
|
+
environment: "ios",
|
|
386
|
+
forceJSX: strategy === "jsx",
|
|
387
|
+
noHMR: true,
|
|
388
|
+
fixNonTypeSpecificImports: true
|
|
389
|
+
})) === null || _this === void 0 ? void 0 : _this.code) || contents;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
} catch (err) {
|
|
393
|
+
_didIteratorError3 = true;
|
|
394
|
+
_iteratorError3 = err;
|
|
328
395
|
} finally {
|
|
329
|
-
|
|
396
|
+
try {
|
|
397
|
+
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
|
398
|
+
_iterator3.return();
|
|
399
|
+
}
|
|
400
|
+
} finally {
|
|
401
|
+
if (_didIteratorError3) {
|
|
402
|
+
throw _iteratorError3;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
if (contents !== sourceContent) {
|
|
407
|
+
patchedContent = contents;
|
|
330
408
|
}
|
|
409
|
+
} catch (transformErr) {
|
|
410
|
+
if (!transformWarnedModules.has(patch.module)) {
|
|
411
|
+
transformWarnedModules.add(patch.module);
|
|
412
|
+
console.warn(` \u26A0 Patch transform failed for ${patch.module} (likely Node version compat), skipping non-critical patch`);
|
|
413
|
+
if (process.env.DEBUG) {
|
|
414
|
+
console.warn(transformErr);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
return;
|
|
331
418
|
}
|
|
332
|
-
contents !== sourceContent && (patchedContent = contents);
|
|
333
|
-
} catch (transformErr) {
|
|
334
|
-
transformWarnedModules.has(patch.module) || (transformWarnedModules.add(patch.module), console.warn(` \u26A0 Patch transform failed for ${patch.module} (likely Node version compat), skipping non-critical patch`), process.env.DEBUG && console.warn(transformErr));
|
|
335
|
-
return;
|
|
336
419
|
} else {
|
|
337
420
|
var out = await patchDef(sourceContent);
|
|
338
|
-
typeof out
|
|
421
|
+
if (typeof out === "string" && out !== sourceContent) {
|
|
422
|
+
patchedContent = out;
|
|
423
|
+
}
|
|
339
424
|
}
|
|
340
425
|
if (patchedContent !== null) {
|
|
341
426
|
if (targetContent === patchedContent) {
|
|
@@ -343,7 +428,8 @@ async function applyDependencyPatches(patches) {
|
|
|
343
428
|
patchStats[fullPath] = {
|
|
344
429
|
size: stat.size,
|
|
345
430
|
mtimeMs: stat.mtimeMs
|
|
346
|
-
}
|
|
431
|
+
};
|
|
432
|
+
statsChanged = true;
|
|
347
433
|
return;
|
|
348
434
|
}
|
|
349
435
|
await Promise.all([originalContent === null && atomicWriteFile(originalPath, sourceContent), atomicWriteFile(fullPath, patchedContent)]);
|
|
@@ -351,45 +437,70 @@ async function applyDependencyPatches(patches) {
|
|
|
351
437
|
patchStats[fullPath] = {
|
|
352
438
|
size: stat1.size,
|
|
353
439
|
mtimeMs: stat1.mtimeMs
|
|
354
|
-
}
|
|
440
|
+
};
|
|
441
|
+
statsChanged = true;
|
|
442
|
+
didApplyPatch = true;
|
|
443
|
+
if (process.env.DEBUG) {
|
|
444
|
+
console.info(` - Applied patch to ${patch.module}: ${relativePath2}`);
|
|
445
|
+
}
|
|
355
446
|
} else {
|
|
356
447
|
var stat2 = await FSExtra.stat(fullPath);
|
|
357
448
|
patchStats[fullPath] = {
|
|
358
449
|
size: stat2.size,
|
|
359
450
|
mtimeMs: stat2.mtimeMs
|
|
360
|
-
}
|
|
451
|
+
};
|
|
452
|
+
statsChanged = true;
|
|
361
453
|
}
|
|
362
454
|
} catch (err) {
|
|
363
455
|
if (_instanceof(err, Bail)) return;
|
|
364
456
|
throw err;
|
|
365
457
|
}
|
|
366
|
-
}))
|
|
458
|
+
}));
|
|
459
|
+
if (didApplyPatch) {
|
|
460
|
+
results.set(patch.module, "applied");
|
|
461
|
+
} else if (!results.has(patch.module)) {
|
|
462
|
+
results.set(patch.module, "ok");
|
|
463
|
+
}
|
|
367
464
|
} catch (err) {
|
|
368
|
-
console.error(
|
|
465
|
+
console.error(`\u{1F6A8} Error applying patch to`, patch.module);
|
|
466
|
+
console.error(err);
|
|
369
467
|
}
|
|
370
|
-
}))
|
|
468
|
+
}));
|
|
469
|
+
if (statsChanged) {
|
|
470
|
+
await writePatchStats(nodeModulesDir, patchStats);
|
|
471
|
+
}
|
|
371
472
|
}));
|
|
372
|
-
var _iteratorNormalCompletion =
|
|
373
|
-
_didIteratorError =
|
|
473
|
+
var _iteratorNormalCompletion = true,
|
|
474
|
+
_didIteratorError = false,
|
|
374
475
|
_iteratorError = void 0;
|
|
375
476
|
try {
|
|
376
|
-
for (var _iterator = results[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion =
|
|
477
|
+
for (var _iterator = results[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
377
478
|
var [module, result] = _step.value;
|
|
378
|
-
result === "applied"
|
|
479
|
+
if (result === "applied") {
|
|
480
|
+
console.info(` \u{1FA79} ${module}`);
|
|
481
|
+
} else if (result === "ok" && process.env.VXRN_FORCE_PATCH) {
|
|
482
|
+
console.info(` \u2713 ${module}`);
|
|
483
|
+
}
|
|
379
484
|
}
|
|
380
485
|
} catch (err) {
|
|
381
|
-
_didIteratorError =
|
|
486
|
+
_didIteratorError = true;
|
|
487
|
+
_iteratorError = err;
|
|
382
488
|
} finally {
|
|
383
489
|
try {
|
|
384
|
-
!_iteratorNormalCompletion && _iterator.return != null
|
|
490
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
491
|
+
_iterator.return();
|
|
492
|
+
}
|
|
385
493
|
} finally {
|
|
386
|
-
if (_didIteratorError)
|
|
494
|
+
if (_didIteratorError) {
|
|
495
|
+
throw _iteratorError;
|
|
496
|
+
}
|
|
387
497
|
}
|
|
388
498
|
}
|
|
389
499
|
}
|
|
390
500
|
async function atomicWriteFile(filePath, contents) {
|
|
391
501
|
var tempPath = filePath + ".vxrn.tmp." + process.pid + "." + Date.now();
|
|
392
|
-
await FSExtra.writeFile(tempPath, contents)
|
|
502
|
+
await FSExtra.writeFile(tempPath, contents);
|
|
503
|
+
await rename(tempPath, filePath);
|
|
393
504
|
}
|
|
394
505
|
export { applyBuiltInPatches, applyDependencyPatches, bailIfExists, bailIfUnchanged, moduleToPnpmStorePattern };
|
|
395
506
|
//# sourceMappingURL=patches.native.js.map
|