vxrn 2.14.1 → 2.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/exports/prebuildWithoutExpo.mjs +24 -0
- package/dist/exports/prebuildWithoutExpo.mjs.map +1 -1
- package/dist/exports/prebuildWithoutExpo.native.js +47 -0
- package/dist/exports/prebuildWithoutExpo.native.js.map +1 -1
- package/dist/runtime/native-prelude.mjs +23 -0
- package/dist/runtime/native-prelude.mjs.map +1 -1
- package/dist/runtime/native-prelude.native.js +23 -0
- package/dist/runtime/native-prelude.native.js.map +1 -1
- package/native-project-patches.cjs +5 -0
- package/package.json +13 -13
- package/src/exports/prebuildWithoutExpo.test.ts +59 -0
- package/src/exports/prebuildWithoutExpo.ts +30 -0
- package/src/runtime/native-prelude.ts +23 -0
- package/types/exports/prebuildWithoutExpo.d.ts.map +1 -1
- package/types/runtime/native-prelude.d.ts.map +1 -1
|
@@ -2729,7 +2729,54 @@ var generateForPlatform = async function generateForPlatform2(root, platform, ap
|
|
|
2729
2729
|
root,
|
|
2730
2730
|
dest
|
|
2731
2731
|
});
|
|
2732
|
+
applyAppPatches(dest, platform, app);
|
|
2732
2733
|
};
|
|
2734
|
+
function listFiles(dir) {
|
|
2735
|
+
return readdirSync(dir, { withFileTypes: true }).flatMap(function(entry) {
|
|
2736
|
+
return entry.isDirectory() ? listFiles(path.join(dir, entry.name)) : [path.join(dir, entry.name)];
|
|
2737
|
+
});
|
|
2738
|
+
}
|
|
2739
|
+
function applyAppPatches(dest, platform, app) {
|
|
2740
|
+
var _app_patches;
|
|
2741
|
+
var patches = ((_app_patches = app.patches) !== null && _app_patches !== void 0 ? _app_patches : []).filter(function(entry) {
|
|
2742
|
+
return entry.platform === platform;
|
|
2743
|
+
});
|
|
2744
|
+
if (patches.length === 0) return;
|
|
2745
|
+
var files = listFiles(dest);
|
|
2746
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
2747
|
+
try {
|
|
2748
|
+
var _loop = function() {
|
|
2749
|
+
var { file, patch } = _step.value;
|
|
2750
|
+
var matches = files.filter(function(candidate) {
|
|
2751
|
+
var relative = path.relative(dest, candidate).split(path.sep).join("/");
|
|
2752
|
+
return relative === file || relative.endsWith("/" + file);
|
|
2753
|
+
});
|
|
2754
|
+
if (matches.length !== 1) {
|
|
2755
|
+
throw new Error(`[vxrn] native.app.patches: "${file}" matched ${matches.length} ${platform} files, expected exactly one`);
|
|
2756
|
+
}
|
|
2757
|
+
var before = readFileSync(matches[0], "utf8");
|
|
2758
|
+
var after = patch(before);
|
|
2759
|
+
if (patch(after) !== after) {
|
|
2760
|
+
throw new Error(`[vxrn] native.app.patches: patch for "${file}" is not idempotent`);
|
|
2761
|
+
}
|
|
2762
|
+
writeFileSync(matches[0], after);
|
|
2763
|
+
};
|
|
2764
|
+
for (var _iterator = patches[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop();
|
|
2765
|
+
} catch (err) {
|
|
2766
|
+
_didIteratorError = true;
|
|
2767
|
+
_iteratorError = err;
|
|
2768
|
+
} finally {
|
|
2769
|
+
try {
|
|
2770
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
2771
|
+
_iterator.return();
|
|
2772
|
+
}
|
|
2773
|
+
} finally {
|
|
2774
|
+
if (_didIteratorError) {
|
|
2775
|
+
throw _iteratorError;
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2733
2780
|
var KOTLIN_IMPORT_ARTIFACTS = [{
|
|
2734
2781
|
importPrefix: "androidx.compose.material.icons",
|
|
2735
2782
|
artifact: "androidx.compose.material:material-icons-core",
|