vxrn 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cli.js +77 -3
- package/dist/cjs/cli.js.map +2 -2
- package/dist/cjs/cli.native.js +268 -2
- package/dist/cjs/cli.native.js.map +2 -2
- package/dist/cjs/constants.js +21 -0
- package/dist/cjs/constants.js.map +6 -0
- package/dist/cjs/constants.native.js +26 -0
- package/dist/cjs/constants.native.js.map +6 -0
- package/dist/cjs/dispose.js +28 -0
- package/dist/cjs/dispose.js.map +6 -0
- package/dist/cjs/dispose.native.js +36 -0
- package/dist/cjs/dispose.native.js.map +6 -0
- package/dist/cjs/exports/build.js +145 -0
- package/dist/cjs/exports/build.js.map +6 -0
- package/dist/cjs/exports/build.native.js +409 -0
- package/dist/cjs/exports/build.native.js.map +6 -0
- package/dist/cjs/exports/checkPatches.js +62 -0
- package/dist/cjs/exports/checkPatches.js.map +6 -0
- package/dist/cjs/exports/checkPatches.native.js +289 -0
- package/dist/cjs/exports/checkPatches.native.js.map +6 -0
- package/dist/cjs/exports/dev.js +568 -0
- package/dist/cjs/exports/dev.js.map +6 -0
- package/dist/cjs/exports/dev.native.js +1111 -0
- package/dist/cjs/exports/dev.native.js.map +6 -0
- package/dist/cjs/exports/serve.js +55 -0
- package/dist/cjs/exports/serve.js.map +6 -0
- package/dist/cjs/exports/serve.native.js +236 -0
- package/dist/cjs/exports/serve.native.js.map +6 -0
- package/dist/cjs/index.js +2 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +3 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/plugins/clientInjectPlugin.js +66 -0
- package/dist/cjs/plugins/clientInjectPlugin.js.map +6 -0
- package/dist/cjs/plugins/clientInjectPlugin.native.js +190 -0
- package/dist/cjs/plugins/clientInjectPlugin.native.js.map +6 -0
- package/dist/cjs/plugins/reactNativeCommonJsPlugin.js +89 -0
- package/dist/cjs/plugins/reactNativeCommonJsPlugin.js.map +6 -0
- package/dist/cjs/plugins/reactNativeCommonJsPlugin.native.js +346 -0
- package/dist/cjs/plugins/reactNativeCommonJsPlugin.native.js.map +6 -0
- package/dist/cjs/utils/checkPatches.js +62 -0
- package/dist/cjs/utils/checkPatches.js.map +6 -0
- package/dist/cjs/utils/checkPatches.native.js +289 -0
- package/dist/cjs/utils/checkPatches.native.js.map +6 -0
- package/dist/cjs/utils/dispose.js +28 -0
- package/dist/cjs/utils/dispose.js.map +6 -0
- package/dist/cjs/utils/dispose.native.js +36 -0
- package/dist/cjs/utils/dispose.native.js.map +6 -0
- package/dist/cjs/utils/getBaseViteConfig.js +2 -2
- package/dist/cjs/utils/getBaseViteConfig.js.map +1 -1
- package/dist/cjs/utils/getBaseViteConfig.native.js +2 -2
- package/dist/cjs/utils/getBaseViteConfig.native.js.map +1 -1
- package/dist/cjs/utils/patches.js +62 -0
- package/dist/cjs/utils/patches.js.map +6 -0
- package/dist/cjs/utils/patches.native.js +289 -0
- package/dist/cjs/utils/patches.native.js.map +6 -0
- package/dist/cjs/utils/prerender.js +1 -0
- package/dist/cjs/utils/prerender.js.map +6 -0
- package/dist/cjs/utils/prerender.native.js +2 -0
- package/dist/cjs/utils/prerender.native.js.map +6 -0
- package/dist/cjs/vendor/createExpoServer.js +34 -0
- package/dist/cjs/vendor/createExpoServer.js.map +6 -0
- package/dist/cjs/vendor/createExpoServer.native.js +42 -0
- package/dist/cjs/vendor/createExpoServer.native.js.map +6 -0
- package/dist/esm/cli.js +58 -3
- package/dist/esm/cli.js.map +2 -2
- package/dist/esm/cli.mjs +81 -9
- package/dist/esm/cli.native.js +249 -3
- package/dist/esm/cli.native.js.map +2 -2
- package/dist/esm/constants.js +5 -0
- package/dist/esm/constants.js.map +6 -0
- package/dist/esm/constants.mjs +2 -0
- package/dist/esm/constants.native.js +5 -0
- package/dist/esm/constants.native.js.map +6 -0
- package/dist/esm/dispose.js +12 -0
- package/dist/esm/dispose.js.map +6 -0
- package/dist/esm/dispose.mjs +8 -0
- package/dist/esm/dispose.native.js +14 -0
- package/dist/esm/dispose.native.js.map +6 -0
- package/dist/esm/exports/build.js +128 -0
- package/dist/esm/exports/build.js.map +6 -0
- package/dist/esm/exports/build.mjs +119 -0
- package/dist/esm/exports/build.native.js +385 -0
- package/dist/esm/exports/build.native.js.map +6 -0
- package/dist/esm/exports/checkPatches.js +40 -0
- package/dist/esm/exports/checkPatches.js.map +6 -0
- package/dist/esm/exports/checkPatches.mjs +31 -0
- package/dist/esm/exports/checkPatches.native.js +262 -0
- package/dist/esm/exports/checkPatches.native.js.map +6 -0
- package/dist/esm/exports/dev.js +581 -0
- package/dist/esm/exports/dev.js.map +6 -0
- package/dist/esm/exports/dev.mjs +543 -0
- package/dist/esm/exports/dev.native.js +1102 -0
- package/dist/esm/exports/dev.native.js.map +6 -0
- package/dist/esm/exports/serve.js +33 -0
- package/dist/esm/exports/serve.js.map +6 -0
- package/dist/esm/exports/serve.mjs +38 -0
- package/dist/esm/exports/serve.native.js +209 -0
- package/dist/esm/exports/serve.native.js.map +6 -0
- package/dist/esm/index.js +3 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +3 -4
- package/dist/esm/index.native.js +3 -5
- package/dist/esm/index.native.js.map +2 -2
- package/dist/esm/plugins/clientInjectPlugin.js +42 -0
- package/dist/esm/plugins/clientInjectPlugin.js.map +6 -0
- package/dist/esm/plugins/clientInjectPlugin.mjs +56 -0
- package/dist/esm/plugins/clientInjectPlugin.native.js +161 -0
- package/dist/esm/plugins/clientInjectPlugin.native.js.map +6 -0
- package/dist/esm/plugins/reactNativeCommonJsPlugin.js +75 -0
- package/dist/esm/plugins/reactNativeCommonJsPlugin.js.map +6 -0
- package/dist/esm/plugins/reactNativeCommonJsPlugin.mjs +55 -0
- package/dist/esm/plugins/reactNativeCommonJsPlugin.native.js +327 -0
- package/dist/esm/plugins/reactNativeCommonJsPlugin.native.js.map +6 -0
- package/dist/esm/utils/checkPatches.js +40 -0
- package/dist/esm/utils/checkPatches.js.map +6 -0
- package/dist/esm/utils/checkPatches.mjs +31 -0
- package/dist/esm/utils/checkPatches.native.js +262 -0
- package/dist/esm/utils/checkPatches.native.js.map +6 -0
- package/dist/esm/utils/dispose.js +12 -0
- package/dist/esm/utils/dispose.js.map +6 -0
- package/dist/esm/utils/dispose.mjs +8 -0
- package/dist/esm/utils/dispose.native.js +14 -0
- package/dist/esm/utils/dispose.native.js.map +6 -0
- package/dist/esm/utils/getBaseViteConfig.js +1 -1
- package/dist/esm/utils/getBaseViteConfig.mjs +1 -1
- package/dist/esm/utils/getBaseViteConfig.native.js +1 -1
- package/dist/esm/utils/patches.js +40 -0
- package/dist/esm/utils/patches.js.map +6 -0
- package/dist/esm/utils/patches.mjs +31 -0
- package/dist/esm/utils/patches.native.js +262 -0
- package/dist/esm/utils/patches.native.js.map +6 -0
- package/dist/esm/utils/prerender.js +1 -0
- package/dist/esm/utils/prerender.js.map +6 -0
- package/dist/esm/utils/prerender.mjs +0 -0
- package/dist/esm/utils/prerender.native.js +1 -0
- package/dist/esm/utils/prerender.native.js.map +6 -0
- package/dist/esm/vendor/createExpoServer.js +20 -0
- package/dist/esm/vendor/createExpoServer.js.map +6 -0
- package/dist/esm/vendor/createExpoServer.mjs +17 -0
- package/dist/esm/vendor/createExpoServer.native.js +22 -0
- package/dist/esm/vendor/createExpoServer.native.js.map +6 -0
- package/package.json +8 -7
- package/src/cli.ts +78 -2
- package/src/{build.ts → exports/build.ts} +5 -4
- package/src/{createDevServer.ts → exports/dev.ts} +13 -63
- package/src/exports/serve.ts +51 -0
- package/src/index.ts +3 -3
- package/src/{dev → plugins}/clientInjectPlugin.ts +1 -12
- package/src/{nativePlugin.ts → plugins/reactNativeCommonJsPlugin.ts} +3 -26
- package/src/utils/getBaseViteConfig.ts +1 -1
- package/src/utils/patches.ts +54 -0
- package/types/build.d.ts +4 -4
- package/types/constants.d.ts +2 -0
- package/types/dispose.d.ts +3 -0
- package/types/exports/build.d.ts +4 -0
- package/types/exports/dev.d.ts +13 -0
- package/types/exports/serve.d.ts +3 -0
- package/types/index.d.ts +2 -3
- package/types/plugins/clientInjectPlugin.d.ts +7 -0
- package/types/plugins/reactNativeCommonJsPlugin.d.ts +7 -0
- package/types/utils/checkPatches.d.ts +3 -0
- package/types/utils/dispose.d.ts +3 -0
- package/types/utils/patches.d.ts +3 -0
- package/types/utils/prerender.d.ts +1 -0
- package/types/vendor/createExpoServer.d.ts +4 -0
- package/src/commands/cli-build.ts +0 -25
- package/src/commands/cli-dev.ts +0 -47
- package/src/commands/index.ts +0 -10
- package/src/dev/createDevServer.ts +0 -234
- /package/src/{utils/constants.ts → constants.ts} +0 -0
- /package/src/{utils.ts → utils/dispose.ts} +0 -0
- /package/src/{createExpoServer.ts → vendor/createExpoServer.ts} +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
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, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var checkPatches_exports = {};
|
|
24
|
+
__export(checkPatches_exports, {
|
|
25
|
+
checkPatches: () => checkPatches
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(checkPatches_exports);
|
|
28
|
+
var import_find_node_modules = __toESM(require("find-node-modules"), 1), import_node_path = require("node:path"), import_fs_extra = __toESM(require("fs-extra"), 1);
|
|
29
|
+
const patches = [
|
|
30
|
+
{
|
|
31
|
+
module: "react-native-screens",
|
|
32
|
+
patchFile: "react-native-screens+3.22.1.patch"
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
async function checkPatches(options) {
|
|
36
|
+
if (options.state.applyPatches === !1)
|
|
37
|
+
return;
|
|
38
|
+
const nodeModulesDirs = (0, import_find_node_modules.default)({
|
|
39
|
+
cwd: options.root
|
|
40
|
+
}).map((relativePath) => (0, import_node_path.join)(options.root, relativePath)), patchesToCopy = /* @__PURE__ */ new Set();
|
|
41
|
+
await Promise.all(
|
|
42
|
+
patches.flatMap((patch) => nodeModulesDirs.flatMap(async (dir) => {
|
|
43
|
+
await import_fs_extra.default.pathExists((0, import_node_path.join)(dir, patch.module)) && patchesToCopy.add(patch);
|
|
44
|
+
}))
|
|
45
|
+
);
|
|
46
|
+
let didCopy = !1;
|
|
47
|
+
for (const patch of [...patchesToCopy]) {
|
|
48
|
+
const dest = (0, import_node_path.join)(options.userPatchesDir, patch.patchFile);
|
|
49
|
+
if (!await pathExists(dest)) {
|
|
50
|
+
didCopy = !0, console.info(`Copying patch ${patch.module}`);
|
|
51
|
+
const src = (0, import_node_path.join)(options.internalPatchesDir, patch.patchFile);
|
|
52
|
+
await import_fs_extra.default.copy(src, dest);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
didCopy && (console.info(
|
|
56
|
+
`
|
|
57
|
+
Please restart after applying the patch by running "npx patch-package".
|
|
58
|
+
Ideally add it to your devDependencies and as a postinstall script.
|
|
59
|
+
`
|
|
60
|
+
), process.exit(0));
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=checkPatches.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/utils/checkPatches.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAA4B,0CAC5B,mBAAqB,sBACrB,kBAAoB;AAGpB,MAAM,UAAU;AAAA,EACd;AAAA,IACE,QAAQ;AAAA,IACR,WAAW;AAAA,EACb;AACF;AAEA,eAAsB,aAAa,SAA2B;AAC5D,MAAI,QAAQ,MAAM,iBAAiB;AACjC;AAGF,QAAM,sBAAkB,yBAAAA,SAAgB;AAAA,IACtC,KAAK,QAAQ;AAAA,EACf,CAAC,EAAE,IAAI,CAAC,qBAAiB,uBAAK,QAAQ,MAAM,YAAY,CAAC,GAEnD,gBAAgB,oBAAI,IAAW;AAErC,QAAM,QAAQ;AAAA,IACZ,QAAQ,QAAQ,CAAC,UACR,gBAAgB,QAAQ,OAAO,QAAQ;AAC5C,MAAI,MAAM,gBAAAC,QAAQ,eAAW,uBAAK,KAAK,MAAM,MAAM,CAAC,KAClD,cAAc,IAAI,KAAK;AAAA,IAE3B,CAAC,CACF;AAAA,EACH;AAEA,MAAI,UAAU;AAEd,aAAW,SAAS,CAAC,GAAG,aAAa,GAAG;AACtC,UAAM,WAAO,uBAAK,QAAQ,gBAAgB,MAAM,SAAS;AACzD,QAAI,CAAE,MAAM,WAAW,IAAI,GAAI;AAC7B,gBAAU,IACV,QAAQ,KAAK,iBAAiB,MAAM,MAAM,EAAE;AAC5C,YAAM,UAAM,uBAAK,QAAQ,oBAAoB,MAAM,SAAS;AAC5D,YAAM,gBAAAA,QAAQ,KAAK,KAAK,IAAI;AAAA,IAC9B;AAAA,EACF;AAEA,EAAI,YACF,QAAQ;AAAA,IACN;AAAA;AAAA;AAAA;AAAA,EAEF,GACA,QAAQ,KAAK,CAAC;AAElB;",
|
|
5
|
+
"names": ["findNodeModules", "FSExtra"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
+
var checkPatches_exports = {};
|
|
25
|
+
__export(checkPatches_exports, {
|
|
26
|
+
checkPatches: () => checkPatches
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(checkPatches_exports);
|
|
29
|
+
var import_find_node_modules = __toESM(require("find-node-modules"), 1), import_node_path = require("node:path"), import_fs_extra = __toESM(require("fs-extra"), 1);
|
|
30
|
+
function _array_like_to_array(arr, len) {
|
|
31
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
32
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
33
|
+
arr2[i] = arr[i];
|
|
34
|
+
return arr2;
|
|
35
|
+
}
|
|
36
|
+
function _array_without_holes(arr) {
|
|
37
|
+
if (Array.isArray(arr))
|
|
38
|
+
return _array_like_to_array(arr);
|
|
39
|
+
}
|
|
40
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
41
|
+
try {
|
|
42
|
+
var info = gen[key](arg), value = info.value;
|
|
43
|
+
} catch (error) {
|
|
44
|
+
reject(error);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
|
|
48
|
+
}
|
|
49
|
+
function _async_to_generator(fn) {
|
|
50
|
+
return function() {
|
|
51
|
+
var self = this, args = arguments;
|
|
52
|
+
return new Promise(function(resolve, reject) {
|
|
53
|
+
var gen = fn.apply(self, args);
|
|
54
|
+
function _next(value) {
|
|
55
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
56
|
+
}
|
|
57
|
+
function _throw(err) {
|
|
58
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
59
|
+
}
|
|
60
|
+
_next(void 0);
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function _iterable_to_array(iter) {
|
|
65
|
+
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
66
|
+
return Array.from(iter);
|
|
67
|
+
}
|
|
68
|
+
function _non_iterable_spread() {
|
|
69
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
70
|
+
}
|
|
71
|
+
function _to_consumable_array(arr) {
|
|
72
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
73
|
+
}
|
|
74
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
75
|
+
if (o) {
|
|
76
|
+
if (typeof o == "string")
|
|
77
|
+
return _array_like_to_array(o, minLen);
|
|
78
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
79
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
80
|
+
return Array.from(n);
|
|
81
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
82
|
+
return _array_like_to_array(o, minLen);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function _ts_generator(thisArg, body) {
|
|
86
|
+
var f, y, t, g, _ = {
|
|
87
|
+
label: 0,
|
|
88
|
+
sent: function() {
|
|
89
|
+
if (t[0] & 1)
|
|
90
|
+
throw t[1];
|
|
91
|
+
return t[1];
|
|
92
|
+
},
|
|
93
|
+
trys: [],
|
|
94
|
+
ops: []
|
|
95
|
+
};
|
|
96
|
+
return g = {
|
|
97
|
+
next: verb(0),
|
|
98
|
+
throw: verb(1),
|
|
99
|
+
return: verb(2)
|
|
100
|
+
}, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
|
|
101
|
+
return this;
|
|
102
|
+
}), g;
|
|
103
|
+
function verb(n) {
|
|
104
|
+
return function(v) {
|
|
105
|
+
return step([
|
|
106
|
+
n,
|
|
107
|
+
v
|
|
108
|
+
]);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function step(op) {
|
|
112
|
+
if (f)
|
|
113
|
+
throw new TypeError("Generator is already executing.");
|
|
114
|
+
for (; _; )
|
|
115
|
+
try {
|
|
116
|
+
if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
117
|
+
return t;
|
|
118
|
+
switch (y = 0, t && (op = [
|
|
119
|
+
op[0] & 2,
|
|
120
|
+
t.value
|
|
121
|
+
]), op[0]) {
|
|
122
|
+
case 0:
|
|
123
|
+
case 1:
|
|
124
|
+
t = op;
|
|
125
|
+
break;
|
|
126
|
+
case 4:
|
|
127
|
+
return _.label++, {
|
|
128
|
+
value: op[1],
|
|
129
|
+
done: !1
|
|
130
|
+
};
|
|
131
|
+
case 5:
|
|
132
|
+
_.label++, y = op[1], op = [
|
|
133
|
+
0
|
|
134
|
+
];
|
|
135
|
+
continue;
|
|
136
|
+
case 7:
|
|
137
|
+
op = _.ops.pop(), _.trys.pop();
|
|
138
|
+
continue;
|
|
139
|
+
default:
|
|
140
|
+
if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
141
|
+
_ = 0;
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
145
|
+
_.label = op[1];
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
149
|
+
_.label = t[1], t = op;
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
if (t && _.label < t[2]) {
|
|
153
|
+
_.label = t[2], _.ops.push(op);
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
t[2] && _.ops.pop(), _.trys.pop();
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
op = body.call(thisArg, _);
|
|
160
|
+
} catch (e) {
|
|
161
|
+
op = [
|
|
162
|
+
6,
|
|
163
|
+
e
|
|
164
|
+
], y = 0;
|
|
165
|
+
} finally {
|
|
166
|
+
f = t = 0;
|
|
167
|
+
}
|
|
168
|
+
if (op[0] & 5)
|
|
169
|
+
throw op[1];
|
|
170
|
+
return {
|
|
171
|
+
value: op[0] ? op[1] : void 0,
|
|
172
|
+
done: !0
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
var patches = [
|
|
177
|
+
{
|
|
178
|
+
module: "react-native-screens",
|
|
179
|
+
patchFile: "react-native-screens+3.22.1.patch"
|
|
180
|
+
}
|
|
181
|
+
];
|
|
182
|
+
function checkPatches(options) {
|
|
183
|
+
return _checkPatches.apply(this, arguments);
|
|
184
|
+
}
|
|
185
|
+
function _checkPatches() {
|
|
186
|
+
return _checkPatches = _async_to_generator(function(options) {
|
|
187
|
+
var nodeModulesDirs, patchesToCopy, didCopy, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, patch, dest, src, err;
|
|
188
|
+
return _ts_generator(this, function(_state) {
|
|
189
|
+
switch (_state.label) {
|
|
190
|
+
case 0:
|
|
191
|
+
return options.state.applyPatches === !1 ? [
|
|
192
|
+
2
|
|
193
|
+
] : (nodeModulesDirs = (0, import_find_node_modules.default)({
|
|
194
|
+
cwd: options.root
|
|
195
|
+
}).map(function(relativePath) {
|
|
196
|
+
return (0, import_node_path.join)(options.root, relativePath);
|
|
197
|
+
}), patchesToCopy = /* @__PURE__ */ new Set(), [
|
|
198
|
+
4,
|
|
199
|
+
Promise.all(patches.flatMap(function(patch2) {
|
|
200
|
+
return nodeModulesDirs.flatMap(function() {
|
|
201
|
+
var _ref = _async_to_generator(function(dir) {
|
|
202
|
+
return _ts_generator(this, function(_state2) {
|
|
203
|
+
switch (_state2.label) {
|
|
204
|
+
case 0:
|
|
205
|
+
return [
|
|
206
|
+
4,
|
|
207
|
+
import_fs_extra.default.pathExists((0, import_node_path.join)(dir, patch2.module))
|
|
208
|
+
];
|
|
209
|
+
case 1:
|
|
210
|
+
return _state2.sent() && patchesToCopy.add(patch2), [
|
|
211
|
+
2
|
|
212
|
+
];
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
return function(dir) {
|
|
217
|
+
return _ref.apply(this, arguments);
|
|
218
|
+
};
|
|
219
|
+
}());
|
|
220
|
+
}))
|
|
221
|
+
]);
|
|
222
|
+
case 1:
|
|
223
|
+
_state.sent(), didCopy = !1, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0, _state.label = 2;
|
|
224
|
+
case 2:
|
|
225
|
+
_state.trys.push([
|
|
226
|
+
2,
|
|
227
|
+
8,
|
|
228
|
+
9,
|
|
229
|
+
10
|
|
230
|
+
]), _iterator = _to_consumable_array(patchesToCopy)[Symbol.iterator](), _state.label = 3;
|
|
231
|
+
case 3:
|
|
232
|
+
return (_iteratorNormalCompletion = (_step = _iterator.next()).done) ? [
|
|
233
|
+
3,
|
|
234
|
+
7
|
|
235
|
+
] : (patch = _step.value, dest = (0, import_node_path.join)(options.userPatchesDir, patch.patchFile), [
|
|
236
|
+
4,
|
|
237
|
+
pathExists(dest)
|
|
238
|
+
]);
|
|
239
|
+
case 4:
|
|
240
|
+
return _state.sent() ? [
|
|
241
|
+
3,
|
|
242
|
+
6
|
|
243
|
+
] : (didCopy = !0, console.info("Copying patch ".concat(patch.module)), src = (0, import_node_path.join)(options.internalPatchesDir, patch.patchFile), [
|
|
244
|
+
4,
|
|
245
|
+
import_fs_extra.default.copy(src, dest)
|
|
246
|
+
]);
|
|
247
|
+
case 5:
|
|
248
|
+
_state.sent(), _state.label = 6;
|
|
249
|
+
case 6:
|
|
250
|
+
return _iteratorNormalCompletion = !0, [
|
|
251
|
+
3,
|
|
252
|
+
3
|
|
253
|
+
];
|
|
254
|
+
case 7:
|
|
255
|
+
return [
|
|
256
|
+
3,
|
|
257
|
+
10
|
|
258
|
+
];
|
|
259
|
+
case 8:
|
|
260
|
+
return err = _state.sent(), _didIteratorError = !0, _iteratorError = err, [
|
|
261
|
+
3,
|
|
262
|
+
10
|
|
263
|
+
];
|
|
264
|
+
case 9:
|
|
265
|
+
try {
|
|
266
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
267
|
+
} finally {
|
|
268
|
+
if (_didIteratorError)
|
|
269
|
+
throw _iteratorError;
|
|
270
|
+
}
|
|
271
|
+
return [
|
|
272
|
+
7
|
|
273
|
+
];
|
|
274
|
+
case 10:
|
|
275
|
+
return didCopy && (console.info(`
|
|
276
|
+
Please restart after applying the patch by running "npx patch-package".
|
|
277
|
+
Ideally add it to your devDependencies and as a postinstall script.
|
|
278
|
+
`), process.exit(0)), [
|
|
279
|
+
2
|
|
280
|
+
];
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}), _checkPatches.apply(this, arguments);
|
|
284
|
+
}
|
|
285
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
286
|
+
0 && (module.exports = {
|
|
287
|
+
checkPatches
|
|
288
|
+
});
|
|
289
|
+
//# sourceMappingURL=checkPatches.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/utils/Users/n8/vxrn/packages/vxrn/src/utils/checkPatches.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA4B,0CAC5B,mBAAqB,sBACrB,kBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGpB,IAAMA,UAAU;EACd;IACEC,QAAQ;IACRC,WAAW;EACb;;AAGF,SAAsBC,aAAaC,SAAyB;SAAtCD,cAAAA,MAAAA,MAAAA,SAAAA;;SAAAA,gBAAAA;AAAAA,yBAAf,oBAAA,SAA4BC,SAAyB;QAKpDC,iBAIAC,eAYFC,SAEC,2BAAA,mBAAA,gBAAA,WAAA,OAAMC,OACHC,MAIEC,KAAAA;;;;AA3BV,iBAAIN,QAAQO,MAAMC,iBAAiB,KACjC;;eAGIP,sBAAkBQ,yBAAAA,SAAgB;YACtCC,KAAKV,QAAQW;UACf,CAAA,EAAGC,IAAI,SAACC,cAAAA;uBAAiBC,uBAAKd,QAAQW,MAAME,YAAAA;cAEtCX,gBAAgB,oBAAIa,IAAAA,GAE1B;;YAAMC,QAAQC,IACZrB,QAAQsB,QAAQ,SAACd,QAAAA;AACf,qBAAOH,gBAAgBiB,QAAO,WAAA;2BAAC,oBAAA,SAAOC,KAAAA;;;;AAChC,+BAAA;;0BAAMC,gBAAAA,QAAQC,eAAWP,uBAAKK,KAAKf,OAAMP,MAAM,CAAA;;;AAAnD,+BAAIyB,QAAA,KAAA,KACFpB,cAAcqB,IAAInB,MAAAA;;;;;gBAEtB,CAAA;gCAJsCe,KAAAA;;;;YAKxC,CAAA,CAAA;;;AAPF,iBAAA,KAAA,GAUIhB,UAAU,IAET,4BAAA,IAAA,oBAAA,IAAA,iBAAA;;;;;;;cAAA,YAAgB,qBAAGD,aAAAA,EAAAA,OAAAA,QAAAA,EAAAA;;kBAAnB,6BAAA,QAAA,UAAA,KAAA,GAAA,QAAA;;;eAAME,QAAN,MAAA,OACGC,WAAOS,uBAAKd,QAAQwB,gBAAgBpB,MAAMN,SAAS,GACnD;;YAAMuB,WAAWhB,IAAAA;;;iBAAjB,OAAA,KAAA,IAAF;;;eACFF,UAAU,IACVsB,QAAQC,KAAM,iBAA6B,OAAbtB,MAAMP,MAAM,CAAA,GACpCS,UAAMQ,uBAAKd,QAAQ2B,oBAAoBvB,MAAMN,SAAS,GAC5D;;YAAMsB,gBAAAA,QAAQQ,KAAKtB,KAAKD,IAAAA;;;AAAxB,iBAAA,KAAA;;AANC,6CAAA;;;;;;;;;;sCAAA,oBAAA,IAAA,iBAAA;;;;;;aAAA,6BAAA,UAAA,UAAA,QAAA,UAAA,OAAA;;gBAAA;oBAAA;;;;;;AAUL,iBAAIF,YACFsB,QAAQC,KACL;;;CAAA,GAGHG,QAAQC,KAAK,CAAA;;;;;EAEjB,CAAA,GAxCsB/B,cAAAA,MAAAA,MAAAA,SAAAA;;",
|
|
5
|
+
"names": ["patches", "module", "patchFile", "checkPatches", "options", "nodeModulesDirs", "patchesToCopy", "didCopy", "patch", "dest", "src", "state", "applyPatches", "findNodeModules", "cwd", "root", "map", "relativePath", "join", "Set", "Promise", "all", "flatMap", "dir", "FSExtra", "pathExists", "_state", "add", "userPatchesDir", "console", "info", "internalPatchesDir", "copy", "process", "exit"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var dispose_exports = {};
|
|
16
|
+
__export(dispose_exports, {
|
|
17
|
+
disposeAll: () => disposeAll,
|
|
18
|
+
registerDispose: () => registerDispose
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(dispose_exports);
|
|
21
|
+
const disposers = /* @__PURE__ */ new Set();
|
|
22
|
+
function registerDispose(cb) {
|
|
23
|
+
disposers.add(cb);
|
|
24
|
+
}
|
|
25
|
+
function disposeAll() {
|
|
26
|
+
disposers.forEach((cb) => cb());
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=dispose.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/utils/dispose.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,YAAY,oBAAI,IAAc;AAE7B,SAAS,gBAAgB,IAAgB;AAC9C,YAAU,IAAI,EAAE;AAClB;AAEO,SAAS,aAAa;AAC3B,YAAU,QAAQ,CAAC,OAAO,GAAG,CAAC;AAChC;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var dispose_exports = {};
|
|
17
|
+
__export(dispose_exports, {
|
|
18
|
+
disposeAll: () => disposeAll,
|
|
19
|
+
registerDispose: () => registerDispose
|
|
20
|
+
});
|
|
21
|
+
module.exports = __toCommonJS(dispose_exports);
|
|
22
|
+
var disposers = /* @__PURE__ */ new Set();
|
|
23
|
+
function registerDispose(cb) {
|
|
24
|
+
disposers.add(cb);
|
|
25
|
+
}
|
|
26
|
+
function disposeAll() {
|
|
27
|
+
disposers.forEach(function(cb) {
|
|
28
|
+
return cb();
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
disposeAll,
|
|
34
|
+
registerDispose
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=dispose.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/utils/Users/n8/vxrn/packages/vxrn/src/utils/dispose.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;IAAMA,YAAY,oBAAIC,IAAAA;AAEf,SAASC,gBAAgBC,IAAc;AAC5CH,YAAUI,IAAID,EAAAA;AAChB;AAEO,SAASE,aAAAA;AACdL,YAAUM,QAAQ,SAACH,IAAAA;WAAOA,GAAAA;;AAC5B;",
|
|
5
|
+
"names": ["disposers", "Set", "registerDispose", "cb", "add", "disposeAll", "forEach"]
|
|
6
|
+
}
|
|
@@ -17,7 +17,7 @@ __export(getBaseViteConfig_exports, {
|
|
|
17
17
|
getBaseViteConfig: () => getBaseViteConfig
|
|
18
18
|
});
|
|
19
19
|
module.exports = __toCommonJS(getBaseViteConfig_exports);
|
|
20
|
-
var
|
|
20
|
+
var import_dev = require("../exports/dev");
|
|
21
21
|
function getBaseViteConfig({ mode }) {
|
|
22
22
|
return {
|
|
23
23
|
mode,
|
|
@@ -27,7 +27,7 @@ function getBaseViteConfig({ mode }) {
|
|
|
27
27
|
},
|
|
28
28
|
resolve: {
|
|
29
29
|
alias: {
|
|
30
|
-
"react-native": (0,
|
|
30
|
+
"react-native": (0, import_dev.resolveFile)("react-native-web-lite")
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
build: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/utils/getBaseViteConfig.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAA4B;AAErB,SAAS,kBAAkB,EAAE,KAAK,GAAuD;AAC9F,SAAO;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,MACN,SAAS,GAAG,SAAS,aAAa;AAAA,MAClC,wBAAwB,IAAI,IAAI;AAAA,IAClC;AAAA,IACA,SAAS;AAAA,MACP,OAAO;AAAA,QACL,oBAAgB,wBAAY,uBAAuB;AAAA,MACrD;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,iBAAiB;AAAA,QACf,yBAAyB;AAAA,MAC3B;AAAA,IACF;AAAA,EACF;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -18,7 +18,7 @@ __export(getBaseViteConfig_exports, {
|
|
|
18
18
|
getBaseViteConfig: () => getBaseViteConfig
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(getBaseViteConfig_exports);
|
|
21
|
-
var
|
|
21
|
+
var import_dev = require("../exports/dev");
|
|
22
22
|
function getBaseViteConfig(param) {
|
|
23
23
|
var mode = param.mode;
|
|
24
24
|
return {
|
|
@@ -29,7 +29,7 @@ function getBaseViteConfig(param) {
|
|
|
29
29
|
},
|
|
30
30
|
resolve: {
|
|
31
31
|
alias: {
|
|
32
|
-
"react-native": (0,
|
|
32
|
+
"react-native": (0, import_dev.resolveFile)("react-native-web-lite")
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
build: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/utils/Users/n8/vxrn/packages/vxrn/src/utils/getBaseViteConfig.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AACA;;;;;
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AACA;;;;;iBAA4B;AAErB,SAASA,kBAAkB,OAAgD;MAA9CC,OAAF,MAAEA;AAClC,SAAO;IACLA;IACAC,QAAQ;MACNC,SAAU,GAAyB,OAAvBF,SAAS,aAAA;MACrB,wBAAyB,IAAQ,OAALA,MAAK,GAAA;IACnC;IACAG,SAAS;MACPC,OAAO;QACL,oBAAgBC,wBAAY,uBAAA;MAC9B;IACF;IACAC,OAAO;MACLC,iBAAiB;QACfC,yBAAyB;MAC3B;IACF;EACF;AACF;",
|
|
5
5
|
"names": ["getBaseViteConfig", "mode", "define", "__DEV__", "resolve", "alias", "resolveFile", "build", "commonjsOptions", "transformMixedEsModules"]
|
|
6
6
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var patches_exports = {};
|
|
24
|
+
__export(patches_exports, {
|
|
25
|
+
checkPatches: () => checkPatches
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(patches_exports);
|
|
28
|
+
var import_find_node_modules = __toESM(require("find-node-modules"), 1), import_node_path = require("node:path"), import_fs_extra = __toESM(require("fs-extra"), 1);
|
|
29
|
+
const patches = [
|
|
30
|
+
{
|
|
31
|
+
module: "react-native-screens",
|
|
32
|
+
patchFile: "react-native-screens+3.22.1.patch"
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
async function checkPatches(options) {
|
|
36
|
+
if (options.state.applyPatches === !1)
|
|
37
|
+
return;
|
|
38
|
+
const nodeModulesDirs = (0, import_find_node_modules.default)({
|
|
39
|
+
cwd: options.root
|
|
40
|
+
}).map((relativePath) => (0, import_node_path.join)(options.root, relativePath)), patchesToCopy = /* @__PURE__ */ new Set();
|
|
41
|
+
await Promise.all(
|
|
42
|
+
patches.flatMap((patch) => nodeModulesDirs.flatMap(async (dir) => {
|
|
43
|
+
await import_fs_extra.default.pathExists((0, import_node_path.join)(dir, patch.module)) && patchesToCopy.add(patch);
|
|
44
|
+
}))
|
|
45
|
+
);
|
|
46
|
+
let didCopy = !1;
|
|
47
|
+
for (const patch of [...patchesToCopy]) {
|
|
48
|
+
const dest = (0, import_node_path.join)(options.userPatchesDir, patch.patchFile);
|
|
49
|
+
if (!await import_fs_extra.default.pathExists(dest)) {
|
|
50
|
+
didCopy = !0, console.info(`Copying patch ${patch.module}`);
|
|
51
|
+
const src = (0, import_node_path.join)(options.internalPatchesDir, patch.patchFile);
|
|
52
|
+
await import_fs_extra.default.copy(src, dest);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
didCopy && (console.info(
|
|
56
|
+
`
|
|
57
|
+
Please restart after applying the patch by running "npx patch-package".
|
|
58
|
+
Ideally add it to your devDependencies and as a postinstall script.
|
|
59
|
+
`
|
|
60
|
+
), process.exit(0));
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=patches.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/utils/patches.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAA4B,0CAC5B,mBAAqB,sBACrB,kBAAoB;AAGpB,MAAM,UAAU;AAAA,EACd;AAAA,IACE,QAAQ;AAAA,IACR,WAAW;AAAA,EACb;AACF;AAGA,eAAsB,aAAa,SAA2B;AAC5D,MAAI,QAAQ,MAAM,iBAAiB;AACjC;AAGF,QAAM,sBAAkB,yBAAAA,SAAgB;AAAA,IACtC,KAAK,QAAQ;AAAA,EACf,CAAC,EAAE,IAAI,CAAC,qBAAiB,uBAAK,QAAQ,MAAM,YAAY,CAAC,GAEnD,gBAAgB,oBAAI,IAAW;AAErC,QAAM,QAAQ;AAAA,IACZ,QAAQ,QAAQ,CAAC,UACR,gBAAgB,QAAQ,OAAO,QAAQ;AAC5C,MAAI,MAAM,gBAAAC,QAAQ,eAAW,uBAAK,KAAK,MAAM,MAAM,CAAC,KAClD,cAAc,IAAI,KAAK;AAAA,IAE3B,CAAC,CACF;AAAA,EACH;AAEA,MAAI,UAAU;AAEd,aAAW,SAAS,CAAC,GAAG,aAAa,GAAG;AACtC,UAAM,WAAO,uBAAK,QAAQ,gBAAgB,MAAM,SAAS;AACzD,QAAI,CAAE,MAAM,gBAAAA,QAAQ,WAAW,IAAI,GAAI;AACrC,gBAAU,IACV,QAAQ,KAAK,iBAAiB,MAAM,MAAM,EAAE;AAC5C,YAAM,UAAM,uBAAK,QAAQ,oBAAoB,MAAM,SAAS;AAC5D,YAAM,gBAAAA,QAAQ,KAAK,KAAK,IAAI;AAAA,IAC9B;AAAA,EACF;AAEA,EAAI,YACF,QAAQ;AAAA,IACN;AAAA;AAAA;AAAA;AAAA,EAEF,GACA,QAAQ,KAAK,CAAC;AAElB;",
|
|
5
|
+
"names": ["findNodeModules", "FSExtra"]
|
|
6
|
+
}
|