@vxrn/utils 2.17.3 → 2.18.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.
Files changed (68) hide show
  1. package/dist/cjs/bunEngine.cjs +59 -0
  2. package/dist/cjs/bunEngine.native.cjs +65 -0
  3. package/dist/cjs/bunEngine.native.js +67 -0
  4. package/dist/cjs/bunEngine.native.js.map +1 -0
  5. package/dist/cjs/createMessageSocket.cjs +1 -0
  6. package/dist/cjs/createMessageSocket.native.cjs +1 -0
  7. package/dist/cjs/createMessageSocket.native.js +1 -0
  8. package/dist/cjs/desktopReactNativeResolve.cjs +1 -0
  9. package/dist/cjs/desktopReactNativeResolve.native.cjs +1 -0
  10. package/dist/cjs/desktopReactNativeResolve.native.js +1 -0
  11. package/dist/cjs/detectPackageManager.cjs +1 -0
  12. package/dist/cjs/detectPackageManager.native.cjs +1 -0
  13. package/dist/cjs/detectPackageManager.native.js +1 -0
  14. package/dist/cjs/exec.cjs +1 -0
  15. package/dist/cjs/exec.native.cjs +1 -0
  16. package/dist/cjs/exec.native.js +1 -0
  17. package/dist/cjs/index.cjs +2 -0
  18. package/dist/cjs/index.native.cjs +2 -0
  19. package/dist/cjs/index.native.js +2 -0
  20. package/dist/cjs/index.native.js.map +1 -1
  21. package/dist/cjs/mustReplace.cjs +1 -0
  22. package/dist/cjs/mustReplace.native.cjs +1 -0
  23. package/dist/cjs/mustReplace.native.js +1 -0
  24. package/dist/cjs/nativeAppManifest.cjs +30 -0
  25. package/dist/cjs/nativeAppManifest.native.cjs +114 -64
  26. package/dist/cjs/nativeAppManifest.native.js +114 -64
  27. package/dist/cjs/nativeAppManifest.native.js.map +1 -1
  28. package/dist/cjs/platformEnv.cjs +1 -0
  29. package/dist/cjs/platformEnv.native.cjs +1 -0
  30. package/dist/cjs/platformEnv.native.js +1 -0
  31. package/dist/cjs/publicEnv.cjs +1 -0
  32. package/dist/cjs/publicEnv.native.cjs +1 -0
  33. package/dist/cjs/publicEnv.native.js +1 -0
  34. package/dist/esm/bunEngine.mjs +40 -0
  35. package/dist/esm/bunEngine.mjs.map +1 -0
  36. package/dist/esm/bunEngine.native.js +44 -0
  37. package/dist/esm/bunEngine.native.js.map +1 -0
  38. package/dist/esm/createMessageSocket.mjs +1 -0
  39. package/dist/esm/createMessageSocket.native.js +1 -0
  40. package/dist/esm/desktopReactNativeResolve.mjs +1 -0
  41. package/dist/esm/desktopReactNativeResolve.native.js +1 -0
  42. package/dist/esm/detectPackageManager.mjs +1 -0
  43. package/dist/esm/detectPackageManager.native.js +1 -0
  44. package/dist/esm/exec.mjs +1 -0
  45. package/dist/esm/exec.native.js +1 -0
  46. package/dist/esm/index.js +2 -0
  47. package/dist/esm/index.mjs +2 -0
  48. package/dist/esm/index.native.js +2 -0
  49. package/dist/esm/mustReplace.mjs +1 -0
  50. package/dist/esm/mustReplace.native.js +1 -0
  51. package/dist/esm/nativeAppManifest.mjs +30 -0
  52. package/dist/esm/nativeAppManifest.mjs.map +1 -1
  53. package/dist/esm/nativeAppManifest.native.js +114 -64
  54. package/dist/esm/nativeAppManifest.native.js.map +1 -1
  55. package/dist/esm/platformEnv.mjs +1 -0
  56. package/dist/esm/platformEnv.native.js +1 -0
  57. package/dist/esm/publicEnv.mjs +1 -0
  58. package/dist/esm/publicEnv.native.js +1 -0
  59. package/package.json +5 -5
  60. package/src/bunEngine.ts +62 -0
  61. package/src/index.ts +1 -0
  62. package/src/nativeAppManifest.ts +35 -0
  63. package/types/bunEngine.d.ts +7 -0
  64. package/types/bunEngine.d.ts.map +1 -0
  65. package/types/index.d.ts +7 -6
  66. package/types/index.d.ts.map +1 -1
  67. package/types/nativeAppManifest.d.ts +3 -0
  68. package/types/nativeAppManifest.d.ts.map +1 -1
@@ -0,0 +1,59 @@
1
+ // dist/cjs/bunEngine.js
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) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
20
+ };
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
+ var bunEngine_exports = {};
23
+ __export(bunEngine_exports, { isBunIosEngine: () => isBunIosEngine });
24
+ module.exports = __toCommonJS(bunEngine_exports);
25
+ var import_node_fs = require("node:fs");
26
+ var import_node_path = require("node:path");
27
+ const BUN_ENGINE_PODFILE_MARKER = "# [vxrn/one] bun engine";
28
+ function hasBunExpoPluginConfig(configPath) {
29
+ if (!(0, import_node_fs.existsSync)(configPath)) return false;
30
+ try {
31
+ const parsed = JSON.parse((0, import_node_fs.readFileSync)(configPath, "utf8"));
32
+ const plugins = parsed?.plugins ?? parsed?.expo?.plugins;
33
+ if (!Array.isArray(plugins)) return false;
34
+ return plugins.some((entry) => Array.isArray(entry) && entry[0] === "vxrn/expo-plugin" && typeof entry[1] === "object" && entry[1] !== null && entry[1].engine === "bun");
35
+ } catch {
36
+ return false;
37
+ }
38
+ }
39
+ function isBunIosEngine(root, platform) {
40
+ if (platform !== "ios") return false;
41
+ if (process.env.ONE_BUN_ENGINE === "0") return false;
42
+ if (process.env.ONE_BUN_ENGINE === "1") return true;
43
+ const configured = globalThis.__vxrnNativeIosEngine;
44
+ if (configured?.engine === "bun") {
45
+ if (!root || (0, import_node_path.resolve)(root) === configured.root) {
46
+ return true;
47
+ }
48
+ }
49
+ if (!root) return false;
50
+ const podfilePath = (0, import_node_path.join)(root, "ios", "Podfile");
51
+ if ((0, import_node_fs.existsSync)(podfilePath)) {
52
+ try {
53
+ if ((0, import_node_fs.readFileSync)(podfilePath, "utf8").includes(BUN_ENGINE_PODFILE_MARKER)) {
54
+ return true;
55
+ }
56
+ } catch {}
57
+ }
58
+ return hasBunExpoPluginConfig((0, import_node_path.join)(root, "app.json")) || hasBunExpoPluginConfig((0, import_node_path.join)(root, "app.config.json"));
59
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ // dist/cjs/bunEngine.native.js
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
22
+ };
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
+ var bunEngine_exports = {};
25
+ __export(bunEngine_exports, { isBunIosEngine: () => isBunIosEngine });
26
+ module.exports = __toCommonJS(bunEngine_exports);
27
+ var import_fs = require("fs");
28
+ var import_path = require("path");
29
+ var BUN_ENGINE_PODFILE_MARKER = "# [vxrn/one] bun engine";
30
+ function hasBunExpoPluginConfig(configPath) {
31
+ if (!(0, import_fs.existsSync)(configPath)) return false;
32
+ try {
33
+ var _ref;
34
+ var _parsed_expo;
35
+ var parsed = JSON.parse((0, import_fs.readFileSync)(configPath, "utf8"));
36
+ 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;
37
+ if (!Array.isArray(plugins)) return false;
38
+ return plugins.some(function(entry) {
39
+ return Array.isArray(entry) && entry[0] === "vxrn/expo-plugin" && typeof entry[1] === "object" && entry[1] !== null && entry[1].engine === "bun";
40
+ });
41
+ } catch (unused) {
42
+ return false;
43
+ }
44
+ }
45
+ function isBunIosEngine(root, platform) {
46
+ if (platform !== "ios") return false;
47
+ if (process.env.ONE_BUN_ENGINE === "0") return false;
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") {
51
+ if (!root || (0, import_path.resolve)(root) === configured.root) {
52
+ return true;
53
+ }
54
+ }
55
+ if (!root) return false;
56
+ var podfilePath = (0, import_path.join)(root, "ios", "Podfile");
57
+ if ((0, import_fs.existsSync)(podfilePath)) {
58
+ try {
59
+ if ((0, import_fs.readFileSync)(podfilePath, "utf8").includes(BUN_ENGINE_PODFILE_MARKER)) {
60
+ return true;
61
+ }
62
+ } catch (unused) {}
63
+ }
64
+ return hasBunExpoPluginConfig((0, import_path.join)(root, "app.json")) || hasBunExpoPluginConfig((0, import_path.join)(root, "app.config.json"));
65
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ // dist/cjs/bunEngine.native.js
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
22
+ };
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
+ var bunEngine_exports = {};
25
+ __export(bunEngine_exports, { isBunIosEngine: () => isBunIosEngine });
26
+ module.exports = __toCommonJS(bunEngine_exports);
27
+ var import_fs = require("fs");
28
+ var import_path = require("path");
29
+ var BUN_ENGINE_PODFILE_MARKER = "# [vxrn/one] bun engine";
30
+ function hasBunExpoPluginConfig(configPath) {
31
+ if (!(0, import_fs.existsSync)(configPath)) return false;
32
+ try {
33
+ var _ref;
34
+ var _parsed_expo;
35
+ var parsed = JSON.parse((0, import_fs.readFileSync)(configPath, "utf8"));
36
+ 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;
37
+ if (!Array.isArray(plugins)) return false;
38
+ return plugins.some(function(entry) {
39
+ return Array.isArray(entry) && entry[0] === "vxrn/expo-plugin" && typeof entry[1] === "object" && entry[1] !== null && entry[1].engine === "bun";
40
+ });
41
+ } catch (unused) {
42
+ return false;
43
+ }
44
+ }
45
+ function isBunIosEngine(root, platform) {
46
+ if (platform !== "ios") return false;
47
+ if (process.env.ONE_BUN_ENGINE === "0") return false;
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") {
51
+ if (!root || (0, import_path.resolve)(root) === configured.root) {
52
+ return true;
53
+ }
54
+ }
55
+ if (!root) return false;
56
+ var podfilePath = (0, import_path.join)(root, "ios", "Podfile");
57
+ if ((0, import_fs.existsSync)(podfilePath)) {
58
+ try {
59
+ if ((0, import_fs.readFileSync)(podfilePath, "utf8").includes(BUN_ENGINE_PODFILE_MARKER)) {
60
+ return true;
61
+ }
62
+ } catch (unused) {}
63
+ }
64
+ return hasBunExpoPluginConfig((0, import_path.join)(root, "app.json")) || hasBunExpoPluginConfig((0, import_path.join)(root, "app.config.json"));
65
+ }
66
+
67
+ //# sourceMappingURL=bunEngine.native.js.map
@@ -0,0 +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,IAAI;EACF,IAAI;EACJ,IAAI;EACJ,IAAI,SAAS,KAAK,OAAO,GAAG,UAAU,aAAY,CAAE,YAAY,MAAM,CAAC;EACvE,IAAI,WAAW,OAAO,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,aAAa,QAAQ,SAAS,KAAK,IAAI,OAAO,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,KAAK,eAAe,OAAO,UAAU,QAAQ,iBAAiB,KAAK,IAAI,KAAK,IAAI,aAAa;EACpQ,IAAI,CAAC,MAAM,QAAQ,OAAO,GAAG,OAAO;EACpC,OAAO,QAAQ,KAAK,SAAS,OAAO;GAClC,OAAO,MAAM,QAAQ,KAAK,KAAK,MAAM,OAAO,sBAAsB,OAAO,MAAM,OAAO,YAAY,MAAM,OAAO,QAAQ,MAAM,EAAE,CAAC,WAAW;EAC7I,CAAC;CACH,SAAS,QAAQ;EACf,OAAO;CACT;AACF;AACA,SAAS,eAAe,MAAM,UAAU;CACtC,IAAI,aAAa,OAAO,OAAO;CAC/B,IAAI,QAAQ,IAAI,mBAAmB,KAAK,OAAO;CAC/C,IAAI,QAAQ,IAAI,mBAAmB,KAAK,OAAO;CAC/C,IAAI,aAAa,WAAW;CAC5B,KAAK,eAAe,QAAQ,eAAe,KAAK,IAAI,KAAK,IAAI,WAAW,YAAY,OAAO;EACzF,IAAI,CAAC,SAAS,GAAG,YAAY,QAAO,CAAE,IAAI,MAAM,WAAW,MAAM;GAC/D,OAAO;EACT;CACF;CACA,IAAI,CAAC,MAAM,OAAO;CAClB,IAAI,eAAe,GAAG,YAAY,KAAI,CAAE,MAAM,OAAO,SAAS;CAC9D,KAAK,GAAG,UAAU,WAAU,CAAE,WAAW,GAAG;EAC1C,IAAI;GACF,KAAK,GAAG,UAAU,aAAY,CAAE,aAAa,MAAM,CAAC,CAAC,SAAS,yBAAyB,GAAG;IACxF,OAAO;GACT;EACF,SAAS,QAAQ,CACjB;CACF;CACA,OAAO,wBAAwB,GAAG,YAAY,KAAI,CAAE,MAAM,UAAU,CAAC,KAAK,wBAAwB,GAAG,YAAY,KAAI,CAAE,MAAM,iBAAiB,CAAC;AACjJ"}
@@ -1,3 +1,4 @@
1
+ // dist/cjs/createMessageSocket.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // dist/cjs/createMessageSocket.native.js
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // dist/cjs/createMessageSocket.native.js
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,4 @@
1
+ // dist/cjs/desktopReactNativeResolve.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // dist/cjs/desktopReactNativeResolve.native.js
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // dist/cjs/desktopReactNativeResolve.native.js
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,4 @@
1
+ // dist/cjs/detectPackageManager.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // dist/cjs/detectPackageManager.native.js
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // dist/cjs/detectPackageManager.native.js
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
package/dist/cjs/exec.cjs CHANGED
@@ -1,3 +1,4 @@
1
+ // dist/cjs/exec.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // dist/cjs/exec.native.js
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // dist/cjs/exec.native.js
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,4 @@
1
+ // dist/cjs/index.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -23,3 +24,4 @@ __reExport(index_exports, require("./exec.cjs"), module.exports);
23
24
  __reExport(index_exports, require("./mustReplace.cjs"), module.exports);
24
25
  __reExport(index_exports, require("./publicEnv.cjs"), module.exports);
25
26
  __reExport(index_exports, require("./platformEnv.cjs"), module.exports);
27
+ __reExport(index_exports, require("./bunEngine.cjs"), module.exports);
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // dist/cjs/index.native.js
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -25,3 +26,4 @@ __reExport(index_exports, require("./exec.native.js"), module.exports);
25
26
  __reExport(index_exports, require("./mustReplace.native.js"), module.exports);
26
27
  __reExport(index_exports, require("./publicEnv.native.js"), module.exports);
27
28
  __reExport(index_exports, require("./platformEnv.native.js"), module.exports);
29
+ __reExport(index_exports, require("./bunEngine.native.js"), module.exports);
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // dist/cjs/index.native.js
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -25,5 +26,6 @@ __reExport(index_exports, require("./exec.native.js"), module.exports);
25
26
  __reExport(index_exports, require("./mustReplace.native.js"), module.exports);
26
27
  __reExport(index_exports, require("./publicEnv.native.js"), module.exports);
27
28
  __reExport(index_exports, require("./platformEnv.native.js"), module.exports);
29
+ __reExport(index_exports, require("./bunEngine.native.js"), module.exports);
28
30
 
29
31
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"@vxrn/debug\"), module.exports);\n__reExport(index_exports, require(\"@vxrn/resolve\"), module.exports);\n__reExport(index_exports, require(\"./createMessageSocket\"), module.exports);\n__reExport(index_exports, require(\"./detectPackageManager\"), module.exports);\n__reExport(index_exports, require(\"./exec\"), module.exports);\n__reExport(index_exports, require(\"./mustReplace\"), module.exports);\n__reExport(index_exports, require(\"./publicEnv\"), module.exports);\n__reExport(index_exports, require(\"./platformEnv\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,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,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,aAAa,GAAG,OAAO,OAAO;AAChE,WAAW,eAAe,QAAQ,eAAe,GAAG,OAAO,OAAO;AAClE,WAAW,eAAe,QAAQ,iCAAuB,GAAG,OAAO,OAAO;AAC1E,WAAW,eAAe,QAAQ,kCAAwB,GAAG,OAAO,OAAO;AAC3E,WAAW,eAAe,QAAQ,kBAAQ,GAAG,OAAO,OAAO;AAC3D,WAAW,eAAe,QAAQ,yBAAe,GAAG,OAAO,OAAO;AAClE,WAAW,eAAe,QAAQ,uBAAa,GAAG,OAAO,OAAO;AAChE,WAAW,eAAe,QAAQ,yBAAe,GAAG,OAAO,OAAO"}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"@vxrn/debug\"), module.exports);\n__reExport(index_exports, require(\"@vxrn/resolve\"), module.exports);\n__reExport(index_exports, require(\"./createMessageSocket\"), module.exports);\n__reExport(index_exports, require(\"./detectPackageManager\"), module.exports);\n__reExport(index_exports, require(\"./exec\"), module.exports);\n__reExport(index_exports, require(\"./mustReplace\"), module.exports);\n__reExport(index_exports, require(\"./publicEnv\"), module.exports);\n__reExport(index_exports, require(\"./platformEnv\"), module.exports);\n__reExport(index_exports, require(\"./bunEngine\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,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,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,aAAa,GAAG,OAAO,OAAO;AAChE,WAAW,eAAe,QAAQ,eAAe,GAAG,OAAO,OAAO;AAClE,WAAW,eAAe,QAAQ,iCAAuB,GAAG,OAAO,OAAO;AAC1E,WAAW,eAAe,QAAQ,kCAAwB,GAAG,OAAO,OAAO;AAC3E,WAAW,eAAe,QAAQ,kBAAQ,GAAG,OAAO,OAAO;AAC3D,WAAW,eAAe,QAAQ,yBAAe,GAAG,OAAO,OAAO;AAClE,WAAW,eAAe,QAAQ,uBAAa,GAAG,OAAO,OAAO;AAChE,WAAW,eAAe,QAAQ,yBAAe,GAAG,OAAO,OAAO;AAClE,WAAW,eAAe,QAAQ,uBAAa,GAAG,OAAO,OAAO"}
@@ -1,3 +1,4 @@
1
+ // dist/cjs/mustReplace.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // dist/cjs/mustReplace.native.js
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // dist/cjs/mustReplace.native.js
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,4 @@
1
+ // dist/cjs/nativeAppManifest.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -115,6 +116,32 @@ function validateNativeApp(manifest, platform) {
115
116
  names.add(name);
116
117
  }
117
118
  }
119
+ if (manifest.ios?.resources !== void 0) {
120
+ if (!Array.isArray(manifest.ios.resources)) fail("ios.resources must be an array");
121
+ const names = /* @__PURE__ */ new Set([
122
+ "info.plist",
123
+ "launchscreen.storyboard",
124
+ "one-bridging-header.h",
125
+ "appdelegate.swift",
126
+ "scenedelegate.swift",
127
+ "oneappintents.swift",
128
+ "privacyinfo.xcprivacy",
129
+ `${manifest.name.toLowerCase()}.entitlements`,
130
+ "oneappwidgets.entitlements",
131
+ ...(manifest.fonts ?? []).map((file) => file.split("/").pop().toLowerCase()),
132
+ ...manifest.ios.googleServicesFile ? ["googleservice-info.plist"] : []
133
+ ]);
134
+ for (const file of manifest.ios.resources) {
135
+ if (typeof file !== "string" || !file || file.startsWith("/") || file.split("/").includes("..")) {
136
+ fail("ios.resources entries must be project-relative file paths");
137
+ }
138
+ const name = file.split("/").pop();
139
+ if (!/^[a-z0-9][a-z0-9._-]*$/i.test(name) || names.has(name.toLowerCase())) {
140
+ fail(`ios.resources has an invalid or duplicate bundle filename: ${name}`);
141
+ }
142
+ names.add(name.toLowerCase());
143
+ }
144
+ }
118
145
  if (manifest.version !== void 0 && !VERSION.test(manifest.version)) {
119
146
  fail(`version "${manifest.version}" must start with major.minor.patch`);
120
147
  }
@@ -281,6 +308,9 @@ function validateNativeApp(manifest, platform) {
281
308
  if (manifest.pictureInPicture !== void 0 && typeof manifest.pictureInPicture !== "boolean") {
282
309
  fail("pictureInPicture must be a boolean");
283
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'`);
313
+ }
284
314
  if (manifest.updates !== void 0) {
285
315
  if (typeof manifest.updates.runtimeVersion !== "string" || manifest.updates.runtimeVersion.trim() === "") {
286
316
  fail("updates.runtimeVersion must be a non-empty string");