@vxrn/utils 2.23.0 → 2.24.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.
@@ -20,11 +20,11 @@ var __copyProps = (to, from, except, desc) => {
20
20
  };
21
21
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
22
  var bunEngine_exports = {};
23
- __export(bunEngine_exports, { isBunIosEngine: () => isBunIosEngine });
23
+ __export(bunEngine_exports, { isBunEngine: () => isBunEngine });
24
24
  module.exports = __toCommonJS(bunEngine_exports);
25
25
  var import_node_fs = require("node:fs");
26
26
  var import_node_path = require("node:path");
27
- const BUN_ENGINE_PODFILE_MARKER = "# [vxrn/one] bun engine";
27
+ const BUN_ENGINE_MARKER = "[vxrn/one] bun engine";
28
28
  function hasBunExpoPluginConfig(configPath) {
29
29
  if (!(0, import_node_fs.existsSync)(configPath)) return false;
30
30
  try {
@@ -36,24 +36,24 @@ function hasBunExpoPluginConfig(configPath) {
36
36
  return false;
37
37
  }
38
38
  }
39
- function isBunIosEngine(root, platform) {
40
- if (platform !== "ios") return false;
39
+ function isBunEngine(root, platform) {
40
+ if (platform !== "ios" && platform !== "android") return false;
41
41
  if (process.env.ONE_BUN_ENGINE === "0") return false;
42
42
  if (process.env.ONE_BUN_ENGINE === "1") return true;
43
- const configured = globalThis.__vxrnNativeIosEngine;
44
- if (configured?.engine === "bun") {
43
+ const configured = globalThis.__vxrnNativeEngine;
44
+ if (configured?.[platform] === "bun") {
45
45
  if (!root || (0, import_node_path.resolve)(root) === configured.root) {
46
46
  return true;
47
47
  }
48
48
  }
49
49
  if (!root) return false;
50
- const podfilePath = (0, import_node_path.join)(root, "ios", "Podfile");
51
- if ((0, import_node_fs.existsSync)(podfilePath)) {
50
+ const nativeProjectPath = platform === "ios" ? (0, import_node_path.join)(root, "ios", "Podfile") : (0, import_node_path.join)(root, "android", "app", "build.gradle");
51
+ if ((0, import_node_fs.existsSync)(nativeProjectPath)) {
52
52
  try {
53
- if ((0, import_node_fs.readFileSync)(podfilePath, "utf8").includes(BUN_ENGINE_PODFILE_MARKER)) {
53
+ if ((0, import_node_fs.readFileSync)(nativeProjectPath, "utf8").includes(BUN_ENGINE_MARKER)) {
54
54
  return true;
55
55
  }
56
56
  } catch {}
57
57
  }
58
- return hasBunExpoPluginConfig((0, import_node_path.join)(root, "app.json")) || hasBunExpoPluginConfig((0, import_node_path.join)(root, "app.config.json"));
58
+ return platform === "ios" && (hasBunExpoPluginConfig((0, import_node_path.join)(root, "app.json")) || hasBunExpoPluginConfig((0, import_node_path.join)(root, "app.config.json")));
59
59
  }
@@ -22,11 +22,11 @@ var __copyProps = (to, from, except, desc) => {
22
22
  };
23
23
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
24
  var bunEngine_exports = {};
25
- __export(bunEngine_exports, { isBunIosEngine: () => isBunIosEngine });
25
+ __export(bunEngine_exports, { isBunEngine: () => isBunEngine });
26
26
  module.exports = __toCommonJS(bunEngine_exports);
27
27
  var import_fs = require("fs");
28
28
  var import_path = require("path");
29
- var BUN_ENGINE_PODFILE_MARKER = "# [vxrn/one] bun engine";
29
+ var BUN_ENGINE_MARKER = "[vxrn/one] bun engine";
30
30
  function hasBunExpoPluginConfig(configPath) {
31
31
  if (!(0, import_fs.existsSync)(configPath)) return false;
32
32
  try {
@@ -42,24 +42,24 @@ function hasBunExpoPluginConfig(configPath) {
42
42
  return false;
43
43
  }
44
44
  }
45
- function isBunIosEngine(root, platform) {
46
- if (platform !== "ios") return false;
45
+ function isBunEngine(root, platform) {
46
+ if (platform !== "ios" && platform !== "android") return false;
47
47
  if (process.env.ONE_BUN_ENGINE === "0") return false;
48
48
  if (process.env.ONE_BUN_ENGINE === "1") return true;
49
- var configured = globalThis.__vxrnNativeIosEngine;
50
- if ((configured === null || configured === void 0 ? void 0 : configured.engine) === "bun") {
49
+ var configured = globalThis.__vxrnNativeEngine;
50
+ if ((configured === null || configured === void 0 ? void 0 : configured[platform]) === "bun") {
51
51
  if (!root || (0, import_path.resolve)(root) === configured.root) {
52
52
  return true;
53
53
  }
54
54
  }
55
55
  if (!root) return false;
56
- var podfilePath = (0, import_path.join)(root, "ios", "Podfile");
57
- if ((0, import_fs.existsSync)(podfilePath)) {
56
+ var nativeProjectPath = platform === "ios" ? (0, import_path.join)(root, "ios", "Podfile") : (0, import_path.join)(root, "android", "app", "build.gradle");
57
+ if ((0, import_fs.existsSync)(nativeProjectPath)) {
58
58
  try {
59
- if ((0, import_fs.readFileSync)(podfilePath, "utf8").includes(BUN_ENGINE_PODFILE_MARKER)) {
59
+ if ((0, import_fs.readFileSync)(nativeProjectPath, "utf8").includes(BUN_ENGINE_MARKER)) {
60
60
  return true;
61
61
  }
62
62
  } catch (unused) {}
63
63
  }
64
- return hasBunExpoPluginConfig((0, import_path.join)(root, "app.json")) || hasBunExpoPluginConfig((0, import_path.join)(root, "app.config.json"));
64
+ return platform === "ios" && (hasBunExpoPluginConfig((0, import_path.join)(root, "app.json")) || hasBunExpoPluginConfig((0, import_path.join)(root, "app.config.json")));
65
65
  }
@@ -22,11 +22,11 @@ var __copyProps = (to, from, except, desc) => {
22
22
  };
23
23
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
24
  var bunEngine_exports = {};
25
- __export(bunEngine_exports, { isBunIosEngine: () => isBunIosEngine });
25
+ __export(bunEngine_exports, { isBunEngine: () => isBunEngine });
26
26
  module.exports = __toCommonJS(bunEngine_exports);
27
27
  var import_fs = require("fs");
28
28
  var import_path = require("path");
29
- var BUN_ENGINE_PODFILE_MARKER = "# [vxrn/one] bun engine";
29
+ var BUN_ENGINE_MARKER = "[vxrn/one] bun engine";
30
30
  function hasBunExpoPluginConfig(configPath) {
31
31
  if (!(0, import_fs.existsSync)(configPath)) return false;
32
32
  try {
@@ -42,26 +42,26 @@ function hasBunExpoPluginConfig(configPath) {
42
42
  return false;
43
43
  }
44
44
  }
45
- function isBunIosEngine(root, platform) {
46
- if (platform !== "ios") return false;
45
+ function isBunEngine(root, platform) {
46
+ if (platform !== "ios" && platform !== "android") return false;
47
47
  if (process.env.ONE_BUN_ENGINE === "0") return false;
48
48
  if (process.env.ONE_BUN_ENGINE === "1") return true;
49
- var configured = globalThis.__vxrnNativeIosEngine;
50
- if ((configured === null || configured === void 0 ? void 0 : configured.engine) === "bun") {
49
+ var configured = globalThis.__vxrnNativeEngine;
50
+ if ((configured === null || configured === void 0 ? void 0 : configured[platform]) === "bun") {
51
51
  if (!root || (0, import_path.resolve)(root) === configured.root) {
52
52
  return true;
53
53
  }
54
54
  }
55
55
  if (!root) return false;
56
- var podfilePath = (0, import_path.join)(root, "ios", "Podfile");
57
- if ((0, import_fs.existsSync)(podfilePath)) {
56
+ var nativeProjectPath = platform === "ios" ? (0, import_path.join)(root, "ios", "Podfile") : (0, import_path.join)(root, "android", "app", "build.gradle");
57
+ if ((0, import_fs.existsSync)(nativeProjectPath)) {
58
58
  try {
59
- if ((0, import_fs.readFileSync)(podfilePath, "utf8").includes(BUN_ENGINE_PODFILE_MARKER)) {
59
+ if ((0, import_fs.readFileSync)(nativeProjectPath, "utf8").includes(BUN_ENGINE_MARKER)) {
60
60
  return true;
61
61
  }
62
62
  } catch (unused) {}
63
63
  }
64
- return hasBunExpoPluginConfig((0, import_path.join)(root, "app.json")) || hasBunExpoPluginConfig((0, import_path.join)(root, "app.config.json"));
64
+ return platform === "ios" && (hasBunExpoPluginConfig((0, import_path.join)(root, "app.json")) || hasBunExpoPluginConfig((0, import_path.join)(root, "app.config.json")));
65
65
  }
66
66
 
67
67
  //# sourceMappingURL=bunEngine.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bunEngine.native.js","names":[],"sources":["cjs/bunEngine.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar bunEngine_exports = {};\n__export(bunEngine_exports, {\n isBunIosEngine: () => isBunIosEngine\n});\nmodule.exports = __toCommonJS(bunEngine_exports);\nvar import_fs = require(\"fs\");\nvar import_path = require(\"path\");\nvar BUN_ENGINE_PODFILE_MARKER = \"# [vxrn/one] bun engine\";\nfunction hasBunExpoPluginConfig(configPath) {\n if (!(0, import_fs.existsSync)(configPath)) return false;\n try {\n var _ref;\n var _parsed_expo;\n var parsed = JSON.parse((0, import_fs.readFileSync)(configPath, \"utf8\"));\n var plugins = (_ref = parsed === null || parsed === void 0 ? void 0 : parsed.plugins) !== null && _ref !== void 0 ? _ref : parsed === null || parsed === void 0 ? void 0 : (_parsed_expo = parsed.expo) === null || _parsed_expo === void 0 ? void 0 : _parsed_expo.plugins;\n if (!Array.isArray(plugins)) return false;\n return plugins.some(function(entry) {\n return Array.isArray(entry) && entry[0] === \"vxrn/expo-plugin\" && typeof entry[1] === \"object\" && entry[1] !== null && entry[1].engine === \"bun\";\n });\n } catch (unused) {\n return false;\n }\n}\nfunction isBunIosEngine(root, platform) {\n if (platform !== \"ios\") return false;\n if (process.env.ONE_BUN_ENGINE === \"0\") return false;\n if (process.env.ONE_BUN_ENGINE === \"1\") return true;\n var configured = globalThis.__vxrnNativeIosEngine;\n if ((configured === null || configured === void 0 ? void 0 : configured.engine) === \"bun\") {\n if (!root || (0, import_path.resolve)(root) === configured.root) {\n return true;\n }\n }\n if (!root) return false;\n var podfilePath = (0, import_path.join)(root, \"ios\", \"Podfile\");\n if ((0, import_fs.existsSync)(podfilePath)) {\n try {\n if ((0, import_fs.readFileSync)(podfilePath, \"utf8\").includes(BUN_ENGINE_PODFILE_MARKER)) {\n return true;\n }\n } catch (unused) {\n }\n }\n return hasBunExpoPluginConfig((0, import_path.join)(root, \"app.json\")) || hasBunExpoPluginConfig((0, import_path.join)(root, \"app.config.json\"));\n}\n//# sourceMappingURL=bunEngine.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,oBAAoB,CAAC;AACzB,SAAS,mBAAmB,EAC1B,sBAAsB,eACxB,CAAC;AACD,OAAO,UAAU,aAAa,iBAAiB;AAC/C,IAAI,YAAY,QAAQ,IAAI;AAC5B,IAAI,cAAc,QAAQ,MAAM;AAChC,IAAI,4BAA4B;AAChC,SAAS,uBAAuB,YAAY;CAC1C,IAAI,EAAE,GAAG,UAAU,WAAU,CAAE,UAAU,GAAG,OAAO;CACnD,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,YAAY,KAAI,CAAE,MAAM,UAAU,CAAC,KAAK,wBAAwB,GAAG,YAAY,KAAI,CAAE,MAAM,iBAAiB,CAAC;AACjJ"}
1
+ {"version":3,"file":"bunEngine.native.js","names":[],"sources":["cjs/bunEngine.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar bunEngine_exports = {};\n__export(bunEngine_exports, {\n isBunEngine: () => isBunEngine\n});\nmodule.exports = __toCommonJS(bunEngine_exports);\nvar import_fs = require(\"fs\");\nvar import_path = require(\"path\");\nvar BUN_ENGINE_MARKER = \"[vxrn/one] bun engine\";\nfunction hasBunExpoPluginConfig(configPath) {\n if (!(0, import_fs.existsSync)(configPath)) return false;\n try {\n var _ref;\n var _parsed_expo;\n var parsed = JSON.parse((0, import_fs.readFileSync)(configPath, \"utf8\"));\n var plugins = (_ref = parsed === null || parsed === void 0 ? void 0 : parsed.plugins) !== null && _ref !== void 0 ? _ref : parsed === null || parsed === void 0 ? void 0 : (_parsed_expo = parsed.expo) === null || _parsed_expo === void 0 ? void 0 : _parsed_expo.plugins;\n if (!Array.isArray(plugins)) return false;\n return plugins.some(function(entry) {\n return Array.isArray(entry) && entry[0] === \"vxrn/expo-plugin\" && typeof entry[1] === \"object\" && entry[1] !== null && entry[1].engine === \"bun\";\n });\n } catch (unused) {\n return false;\n }\n}\nfunction isBunEngine(root, platform) {\n if (platform !== \"ios\" && platform !== \"android\") return false;\n if (process.env.ONE_BUN_ENGINE === \"0\") return false;\n if (process.env.ONE_BUN_ENGINE === \"1\") return true;\n var configured = globalThis.__vxrnNativeEngine;\n if ((configured === null || configured === void 0 ? void 0 : configured[platform]) === \"bun\") {\n if (!root || (0, import_path.resolve)(root) === configured.root) {\n return true;\n }\n }\n if (!root) return false;\n var nativeProjectPath = platform === \"ios\" ? (0, import_path.join)(root, \"ios\", \"Podfile\") : (0, import_path.join)(root, \"android\", \"app\", \"build.gradle\");\n if ((0, import_fs.existsSync)(nativeProjectPath)) {\n try {\n if ((0, import_fs.readFileSync)(nativeProjectPath, \"utf8\").includes(BUN_ENGINE_MARKER)) {\n return true;\n }\n } catch (unused) {\n }\n }\n return platform === \"ios\" && (hasBunExpoPluginConfig((0, import_path.join)(root, \"app.json\")) || hasBunExpoPluginConfig((0, import_path.join)(root, \"app.config.json\")));\n}\n//# sourceMappingURL=bunEngine.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBA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AS,GAAG,YAAY,QAAO,CAAE,IAAI,MAAM,WAAW,MAAM;GAC/D,OAAO;EACT;CACF;CACA,IAAI,CAAC,MAAM,OAAO;CAClB,IAAI,oBAAoB,aAAa,SAAS,GAAG,YAAY,KAAI,CAAE,MAAM,OAAO,SAAS,KAAK,GAAG,YAAY,KAAI,CAAE,MAAM,WAAW,OAAO,cAAc;CACzJ,KAAK,GAAG,UAAU,WAAU,CAAE,iBAAiB,GAAG;EAChD,IAAI;GACF,KAAK,GAAG,UAAU,aAAY,CAAE,mBAAmB,MAAM,CAAC,CAAC,SAAS,iBAAiB,GAAG;IACtF,OAAO;GACT;EACF,SAAS,QAAQ,CACjB;CACF;CACA,OAAO,aAAa,UAAU,wBAAwB,GAAG,YAAY,KAAI,CAAE,MAAM,UAAU,CAAC,KAAK,wBAAwB,GAAG,YAAY,KAAI,CAAE,MAAM,iBAAiB,CAAC;AACxK"}
@@ -308,8 +308,11 @@ function validateNativeApp(manifest, platform) {
308
308
  if (manifest.pictureInPicture !== void 0 && typeof manifest.pictureInPicture !== "boolean") {
309
309
  fail("pictureInPicture must be a boolean");
310
310
  }
311
- if (manifest.ios?.engine !== void 0 && manifest.ios.engine !== "hermes" && manifest.ios.engine !== "bun") {
312
- fail(`ios.engine must be 'hermes' or 'bun'`);
311
+ for (const platform2 of ["ios", "android"]) {
312
+ const engine = manifest[platform2]?.engine;
313
+ if (engine !== void 0 && engine !== "hermes" && engine !== "bun") {
314
+ fail(`${platform2}.engine must be 'hermes' or 'bun'`);
315
+ }
313
316
  }
314
317
  if (manifest.ios?.viewCulling !== void 0 && typeof manifest.ios.viewCulling !== "boolean") {
315
318
  fail("ios.viewCulling must be a boolean");
@@ -94,7 +94,7 @@ function fail(message) {
94
94
  }
95
95
  function validateNativeApp(manifest, platform) {
96
96
  var _manifest_alternateIcons;
97
- var _manifest_ios, _manifest_ios1, _manifest_ios2, _manifest_ios3, _manifest_splash, _manifest_splash_dark, _manifest_splash1, _manifest_splash2, _manifest_imagePicker, _manifest_imagePicker1, _manifest_photoLibrary, _manifest_photoLibrary1, _manifest_location, _manifest_location1, _manifest_ios4, _manifest_speech, _manifest_pedometer, _manifest_ios5, _manifest_ios6, _manifest_ios7, _manifest_ios8;
97
+ var _manifest_ios, _manifest_ios1, _manifest_ios2, _manifest_ios3, _manifest_splash, _manifest_splash_dark, _manifest_splash1, _manifest_splash2, _manifest_imagePicker, _manifest_imagePicker1, _manifest_photoLibrary, _manifest_photoLibrary1, _manifest_location, _manifest_location1, _manifest_ios4, _manifest_speech, _manifest_pedometer, _manifest_ios5, _manifest_ios6, _manifest_ios7;
98
98
  if (!manifest || typeof manifest !== "object") fail("manifest must be an object");
99
99
  if (!manifest.name || typeof manifest.name !== "string") fail("name is required");
100
100
  if (!TARGET_NAME.test(manifest.name)) {
@@ -446,10 +446,15 @@ function validateNativeApp(manifest, platform) {
446
446
  if (manifest.pictureInPicture !== void 0 && typeof manifest.pictureInPicture !== "boolean") {
447
447
  fail("pictureInPicture must be a boolean");
448
448
  }
449
- if (((_manifest_ios7 = manifest.ios) === null || _manifest_ios7 === void 0 ? void 0 : _manifest_ios7.engine) !== void 0 && manifest.ios.engine !== "hermes" && manifest.ios.engine !== "bun") {
450
- fail(`ios.engine must be 'hermes' or 'bun'`);
449
+ for (var _i1 = 0, _iter1 = ["ios", "android"]; _i1 < _iter1.length; _i1++) {
450
+ var _$platform = _iter1[_i1];
451
+ var _manifest_platform;
452
+ var engine = (_manifest_platform = manifest[_$platform]) === null || _manifest_platform === void 0 ? void 0 : _manifest_platform.engine;
453
+ if (engine !== void 0 && engine !== "hermes" && engine !== "bun") {
454
+ fail(`${_$platform}.engine must be 'hermes' or 'bun'`);
455
+ }
451
456
  }
452
- if (((_manifest_ios8 = manifest.ios) === null || _manifest_ios8 === void 0 ? void 0 : _manifest_ios8.viewCulling) !== void 0 && typeof manifest.ios.viewCulling !== "boolean") {
457
+ if (((_manifest_ios7 = manifest.ios) === null || _manifest_ios7 === void 0 ? void 0 : _manifest_ios7.viewCulling) !== void 0 && typeof manifest.ios.viewCulling !== "boolean") {
453
458
  fail("ios.viewCulling must be a boolean");
454
459
  }
455
460
  if (manifest.updates !== void 0) {
@@ -461,10 +466,10 @@ function validateNativeApp(manifest, platform) {
461
466
  }
462
467
  }
463
468
  if (!platform || platform === "ios") {
464
- var _manifest_ios9;
465
- if (!((_manifest_ios9 = manifest.ios) === null || _manifest_ios9 === void 0 ? void 0 : _manifest_ios9.bundleId) || !REVERSE_DNS.test(manifest.ios.bundleId)) {
466
- var _manifest_ios10;
467
- fail(`ios.bundleId "${(_manifest_ios10 = manifest.ios) === null || _manifest_ios10 === void 0 ? void 0 : _manifest_ios10.bundleId}" must be reverse-dns`);
469
+ var _manifest_ios8;
470
+ if (!((_manifest_ios8 = manifest.ios) === null || _manifest_ios8 === void 0 ? void 0 : _manifest_ios8.bundleId) || !REVERSE_DNS.test(manifest.ios.bundleId)) {
471
+ var _manifest_ios9;
472
+ fail(`ios.bundleId "${(_manifest_ios9 = manifest.ios) === null || _manifest_ios9 === void 0 ? void 0 : _manifest_ios9.bundleId}" must be reverse-dns`);
468
473
  }
469
474
  if (manifest.ios.deploymentTarget !== void 0 && !DEPLOYMENT_TARGET.test(manifest.ios.deploymentTarget)) {
470
475
  fail(`ios.deploymentTarget "${manifest.ios.deploymentTarget}" must look like "17.0"`);
@@ -512,8 +517,8 @@ function validateNativeApp(manifest, platform) {
512
517
  if (manifest.android.versionCode !== void 0 && (!Number.isInteger(manifest.android.versionCode) || manifest.android.versionCode < 1)) {
513
518
  fail(`android.versionCode "${manifest.android.versionCode}" must be a positive integer`);
514
519
  }
515
- for (var _i1 = 0, _iter1 = ["targetSdk", "compileSdk"]; _i1 < _iter1.length; _i1++) {
516
- var key = _iter1[_i1];
520
+ for (var _i2 = 0, _iter2 = ["targetSdk", "compileSdk"]; _i2 < _iter2.length; _i2++) {
521
+ var key = _iter2[_i2];
517
522
  var value = manifest.android[key];
518
523
  var floor = key === "compileSdk" ? 36 : 21;
519
524
  if (value !== void 0 && (!Number.isInteger(value) || value < floor)) {
@@ -94,7 +94,7 @@ function fail(message) {
94
94
  }
95
95
  function validateNativeApp(manifest, platform) {
96
96
  var _manifest_alternateIcons;
97
- var _manifest_ios, _manifest_ios1, _manifest_ios2, _manifest_ios3, _manifest_splash, _manifest_splash_dark, _manifest_splash1, _manifest_splash2, _manifest_imagePicker, _manifest_imagePicker1, _manifest_photoLibrary, _manifest_photoLibrary1, _manifest_location, _manifest_location1, _manifest_ios4, _manifest_speech, _manifest_pedometer, _manifest_ios5, _manifest_ios6, _manifest_ios7, _manifest_ios8;
97
+ var _manifest_ios, _manifest_ios1, _manifest_ios2, _manifest_ios3, _manifest_splash, _manifest_splash_dark, _manifest_splash1, _manifest_splash2, _manifest_imagePicker, _manifest_imagePicker1, _manifest_photoLibrary, _manifest_photoLibrary1, _manifest_location, _manifest_location1, _manifest_ios4, _manifest_speech, _manifest_pedometer, _manifest_ios5, _manifest_ios6, _manifest_ios7;
98
98
  if (!manifest || typeof manifest !== "object") fail("manifest must be an object");
99
99
  if (!manifest.name || typeof manifest.name !== "string") fail("name is required");
100
100
  if (!TARGET_NAME.test(manifest.name)) {
@@ -446,10 +446,15 @@ function validateNativeApp(manifest, platform) {
446
446
  if (manifest.pictureInPicture !== void 0 && typeof manifest.pictureInPicture !== "boolean") {
447
447
  fail("pictureInPicture must be a boolean");
448
448
  }
449
- if (((_manifest_ios7 = manifest.ios) === null || _manifest_ios7 === void 0 ? void 0 : _manifest_ios7.engine) !== void 0 && manifest.ios.engine !== "hermes" && manifest.ios.engine !== "bun") {
450
- fail(`ios.engine must be 'hermes' or 'bun'`);
449
+ for (var _i1 = 0, _iter1 = ["ios", "android"]; _i1 < _iter1.length; _i1++) {
450
+ var _$platform = _iter1[_i1];
451
+ var _manifest_platform;
452
+ var engine = (_manifest_platform = manifest[_$platform]) === null || _manifest_platform === void 0 ? void 0 : _manifest_platform.engine;
453
+ if (engine !== void 0 && engine !== "hermes" && engine !== "bun") {
454
+ fail(`${_$platform}.engine must be 'hermes' or 'bun'`);
455
+ }
451
456
  }
452
- if (((_manifest_ios8 = manifest.ios) === null || _manifest_ios8 === void 0 ? void 0 : _manifest_ios8.viewCulling) !== void 0 && typeof manifest.ios.viewCulling !== "boolean") {
457
+ if (((_manifest_ios7 = manifest.ios) === null || _manifest_ios7 === void 0 ? void 0 : _manifest_ios7.viewCulling) !== void 0 && typeof manifest.ios.viewCulling !== "boolean") {
453
458
  fail("ios.viewCulling must be a boolean");
454
459
  }
455
460
  if (manifest.updates !== void 0) {
@@ -461,10 +466,10 @@ function validateNativeApp(manifest, platform) {
461
466
  }
462
467
  }
463
468
  if (!platform || platform === "ios") {
464
- var _manifest_ios9;
465
- if (!((_manifest_ios9 = manifest.ios) === null || _manifest_ios9 === void 0 ? void 0 : _manifest_ios9.bundleId) || !REVERSE_DNS.test(manifest.ios.bundleId)) {
466
- var _manifest_ios10;
467
- fail(`ios.bundleId "${(_manifest_ios10 = manifest.ios) === null || _manifest_ios10 === void 0 ? void 0 : _manifest_ios10.bundleId}" must be reverse-dns`);
469
+ var _manifest_ios8;
470
+ if (!((_manifest_ios8 = manifest.ios) === null || _manifest_ios8 === void 0 ? void 0 : _manifest_ios8.bundleId) || !REVERSE_DNS.test(manifest.ios.bundleId)) {
471
+ var _manifest_ios9;
472
+ fail(`ios.bundleId "${(_manifest_ios9 = manifest.ios) === null || _manifest_ios9 === void 0 ? void 0 : _manifest_ios9.bundleId}" must be reverse-dns`);
468
473
  }
469
474
  if (manifest.ios.deploymentTarget !== void 0 && !DEPLOYMENT_TARGET.test(manifest.ios.deploymentTarget)) {
470
475
  fail(`ios.deploymentTarget "${manifest.ios.deploymentTarget}" must look like "17.0"`);
@@ -512,8 +517,8 @@ function validateNativeApp(manifest, platform) {
512
517
  if (manifest.android.versionCode !== void 0 && (!Number.isInteger(manifest.android.versionCode) || manifest.android.versionCode < 1)) {
513
518
  fail(`android.versionCode "${manifest.android.versionCode}" must be a positive integer`);
514
519
  }
515
- for (var _i1 = 0, _iter1 = ["targetSdk", "compileSdk"]; _i1 < _iter1.length; _i1++) {
516
- var key = _iter1[_i1];
520
+ for (var _i2 = 0, _iter2 = ["targetSdk", "compileSdk"]; _i2 < _iter2.length; _i2++) {
521
+ var key = _iter2[_i2];
517
522
  var value = manifest.android[key];
518
523
  var floor = key === "compileSdk" ? 36 : 21;
519
524
  if (value !== void 0 && (!Number.isInteger(value) || value < floor)) {