@vxrn/vite-plugin-metro 1.1.537 → 1.1.539

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 (83) hide show
  1. package/dist/cjs/babel-plugins/import-meta-env-plugin.native.js +57 -43
  2. package/dist/cjs/babel-plugins/import-meta-env-plugin.native.js.map +1 -6
  3. package/dist/cjs/index.native.js +19 -16
  4. package/dist/cjs/index.native.js.map +1 -6
  5. package/dist/cjs/metro-config/getMetroBabelConfigFromViteConfig.native.js +33 -33
  6. package/dist/cjs/metro-config/getMetroBabelConfigFromViteConfig.native.js.map +1 -6
  7. package/dist/cjs/metro-config/getMetroConfigFromViteConfig.native.js +88 -72
  8. package/dist/cjs/metro-config/getMetroConfigFromViteConfig.native.js.map +1 -6
  9. package/dist/cjs/metro-config/patchMetroServerWithViteConfigAndMetroPluginOptions.native.js +27 -25
  10. package/dist/cjs/metro-config/patchMetroServerWithViteConfigAndMetroPluginOptions.native.js.map +1 -6
  11. package/dist/cjs/metro-config/types.native.js +9 -5
  12. package/dist/cjs/metro-config/types.native.js.map +1 -6
  13. package/dist/cjs/plugins/expoManifestRequestHandlerPlugin.native.js +40 -25
  14. package/dist/cjs/plugins/expoManifestRequestHandlerPlugin.native.js.map +1 -6
  15. package/dist/cjs/plugins/metroPlugin.native.js +76 -35
  16. package/dist/cjs/plugins/metroPlugin.native.js.map +1 -6
  17. package/dist/cjs/rn-commands/bundle/assetCatalogIOS.native.js +46 -37
  18. package/dist/cjs/rn-commands/bundle/assetCatalogIOS.native.js.map +1 -6
  19. package/dist/cjs/rn-commands/bundle/assetPathUtils.native.js +20 -22
  20. package/dist/cjs/rn-commands/bundle/assetPathUtils.native.js.map +1 -6
  21. package/dist/cjs/rn-commands/bundle/buildBundle.native.js +36 -27
  22. package/dist/cjs/rn-commands/bundle/buildBundle.native.js.map +1 -6
  23. package/dist/cjs/rn-commands/bundle/buildBundleWithConfig.native.js +47 -33
  24. package/dist/cjs/rn-commands/bundle/buildBundleWithConfig.native.js.map +1 -6
  25. package/dist/cjs/rn-commands/bundle/filterPlatformAssetScales.native.js +25 -21
  26. package/dist/cjs/rn-commands/bundle/filterPlatformAssetScales.native.js.map +1 -6
  27. package/dist/cjs/rn-commands/bundle/getAssetDestPathAndroid.native.js +28 -16
  28. package/dist/cjs/rn-commands/bundle/getAssetDestPathAndroid.native.js.map +1 -6
  29. package/dist/cjs/rn-commands/bundle/getAssetDestPathIOS.native.js +31 -22
  30. package/dist/cjs/rn-commands/bundle/getAssetDestPathIOS.native.js.map +1 -6
  31. package/dist/cjs/rn-commands/bundle/getBuildBundleFn.native.js +25 -24
  32. package/dist/cjs/rn-commands/bundle/getBuildBundleFn.native.js.map +1 -6
  33. package/dist/cjs/rn-commands/bundle/index.native.js +19 -16
  34. package/dist/cjs/rn-commands/bundle/index.native.js.map +1 -6
  35. package/dist/cjs/rn-commands/bundle/saveAssets.native.js +58 -42
  36. package/dist/cjs/rn-commands/bundle/saveAssets.native.js.map +1 -6
  37. package/dist/cjs/rn-commands/bundle/types.native.js +9 -5
  38. package/dist/cjs/rn-commands/bundle/types.native.js.map +1 -6
  39. package/dist/cjs/rn-commands/index.native.js +24 -18
  40. package/dist/cjs/rn-commands/index.native.js.map +1 -6
  41. package/dist/cjs/transformer/babel-core.native.js +17 -15
  42. package/dist/cjs/transformer/babel-core.native.js.map +1 -6
  43. package/dist/cjs/transformer/babel-transformer.js +2 -2
  44. package/dist/cjs/transformer/babel-transformer.js.map +1 -1
  45. package/dist/cjs/transformer/babel-transformer.native.js +110 -81
  46. package/dist/cjs/transformer/babel-transformer.native.js.map +1 -6
  47. package/dist/cjs/transformer/loadBabelConfig.native.js +43 -40
  48. package/dist/cjs/transformer/loadBabelConfig.native.js.map +1 -6
  49. package/dist/cjs/transformer/transformSync.native.js +33 -23
  50. package/dist/cjs/transformer/transformSync.native.js.map +1 -6
  51. package/dist/cjs/transformer/types.native.js +9 -5
  52. package/dist/cjs/transformer/types.native.js.map +1 -6
  53. package/dist/cjs/utils/exit.js +2 -2
  54. package/dist/cjs/utils/exit.js.map +1 -1
  55. package/dist/cjs/utils/exit.native.js +81 -76
  56. package/dist/cjs/utils/exit.native.js.map +1 -6
  57. package/dist/cjs/utils/getTerminalReporter.native.js +34 -24
  58. package/dist/cjs/utils/getTerminalReporter.native.js.map +1 -6
  59. package/dist/cjs/utils/patchExpoGoManifestHandlerMiddlewareWithCustomMainModuleName.native.js +18 -15
  60. package/dist/cjs/utils/patchExpoGoManifestHandlerMiddlewareWithCustomMainModuleName.native.js.map +1 -6
  61. package/dist/cjs/utils/projectImport.native.js +37 -27
  62. package/dist/cjs/utils/projectImport.native.js.map +1 -6
  63. package/dist/esm/metro-config/getMetroConfigFromViteConfig.native.js.map +1 -1
  64. package/dist/esm/plugins/expoManifestRequestHandlerPlugin.native.js +5 -2
  65. package/dist/esm/plugins/expoManifestRequestHandlerPlugin.native.js.map +1 -1
  66. package/dist/esm/plugins/metroPlugin.native.js +3 -3
  67. package/dist/esm/rn-commands/bundle/assetCatalogIOS.native.js +2 -2
  68. package/dist/esm/rn-commands/bundle/buildBundleWithConfig.native.js +2 -2
  69. package/dist/esm/rn-commands/bundle/getAssetDestPathAndroid.native.js +1 -1
  70. package/dist/esm/rn-commands/bundle/getAssetDestPathIOS.native.js +1 -1
  71. package/dist/esm/rn-commands/bundle/saveAssets.native.js +2 -2
  72. package/dist/esm/transformer/babel-transformer.js +2 -2
  73. package/dist/esm/transformer/babel-transformer.js.map +1 -1
  74. package/dist/esm/transformer/babel-transformer.native.js +7 -2
  75. package/dist/esm/transformer/babel-transformer.native.js.map +1 -1
  76. package/dist/esm/transformer/loadBabelConfig.native.js +2 -2
  77. package/dist/esm/utils/exit.js +2 -2
  78. package/dist/esm/utils/exit.js.map +1 -1
  79. package/dist/esm/utils/exit.native.js +6 -3
  80. package/dist/esm/utils/exit.native.js.map +1 -1
  81. package/dist/esm/utils/projectImport.native.js +5 -2
  82. package/dist/esm/utils/projectImport.native.js.map +1 -1
  83. package/package.json +3 -3
@@ -1,44 +1,53 @@
1
1
  "use strict";
2
+
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
7
  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);
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
+ value: !0
22
+ }), mod);
16
23
  var buildBundle_exports = {};
17
24
  __export(buildBundle_exports, {
18
25
  buildBundle: () => buildBundle
19
26
  });
20
27
  module.exports = __toCommonJS(buildBundle_exports);
21
- var import_getMetroConfigFromViteConfig = require("../../metro-config/getMetroConfigFromViteConfig"), import_buildBundleWithConfig = require("./buildBundleWithConfig"), import_patchMetroServerWithViteConfigAndMetroPluginOptions = require("../../metro-config/patchMetroServerWithViteConfigAndMetroPluginOptions"), import_projectImport = require("../../utils/projectImport"), import_exit = require("../../utils/exit");
28
+ var import_getMetroConfigFromViteConfig = require("../../metro-config/getMetroConfigFromViteConfig.native.js"),
29
+ import_buildBundleWithConfig = require("./buildBundleWithConfig.native.js"),
30
+ import_patchMetroServerWithViteConfigAndMetroPluginOptions = require("../../metro-config/patchMetroServerWithViteConfigAndMetroPluginOptions.native.js"),
31
+ import_projectImport = require("../../utils/projectImport.native.js"),
32
+ import_exit = require("../../utils/exit.native.js");
22
33
  async function buildBundle(_argv, ctx, argsIn) {
23
- var bundleImpl = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, { viteConfig, metroPluginOptions } = this || {};
24
- if (!viteConfig)
25
- throw new Error("[vxrn/buildBundle.metro] Expect the buildBundle function to be bind with an object that has viteConfig property.");
26
- if (!metroPluginOptions)
27
- throw new Error("[vxrn/buildBundle.metro] Expect the buildBundle function to be bind with an object that has metroPluginOptions property.");
28
- if (process.env.IS_VXRN_CLI)
29
- throw new Error("IS_VXRN_CLI should not be set while using @vxrn/vite-plugin-metro buildBundle, it is not supported");
30
- var metroConfig = await (0, import_getMetroConfigFromViteConfig.getMetroConfigFromViteConfig)(viteConfig, metroPluginOptions), args = {
31
- ...argsIn,
32
- entryFile: metroPluginOptions.mainModuleName ? (0, import_projectImport.projectResolve)(viteConfig.root, metroPluginOptions.mainModuleName) : argsIn.entryFile
33
- };
34
+ var bundleImpl = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null,
35
+ {
36
+ viteConfig,
37
+ metroPluginOptions
38
+ } = this || {};
39
+ if (!viteConfig) throw new Error("[vxrn/buildBundle.metro] Expect the buildBundle function to be bind with an object that has viteConfig property.");
40
+ if (!metroPluginOptions) throw new Error("[vxrn/buildBundle.metro] Expect the buildBundle function to be bind with an object that has metroPluginOptions property.");
41
+ if (process.env.IS_VXRN_CLI) throw new Error("IS_VXRN_CLI should not be set while using @vxrn/vite-plugin-metro buildBundle, it is not supported");
42
+ var metroConfig = await (0, import_getMetroConfigFromViteConfig.getMetroConfigFromViteConfig)(viteConfig, metroPluginOptions),
43
+ args = {
44
+ ...argsIn,
45
+ entryFile: metroPluginOptions.mainModuleName ? (0, import_projectImport.projectResolve)(viteConfig.root, metroPluginOptions.mainModuleName) : argsIn.entryFile
46
+ };
34
47
  await (0, import_buildBundleWithConfig.buildBundleWithConfig)(args, metroConfig, void 0, {
35
- patchServer: function(server) {
48
+ patchServer: function (server) {
36
49
  (0, import_patchMetroServerWithViteConfigAndMetroPluginOptions.patchMetroServerWithViteConfigAndMetroPluginOptions)(server, viteConfig, metroPluginOptions);
37
50
  }
38
51
  }), console.info("Done."), (0, import_exit.ensureProcessExitsAfterDelay)();
39
52
  }
40
- // Annotate the CommonJS export names for ESM import in node:
41
- 0 && (module.exports = {
42
- buildBundle
43
- });
44
- //# sourceMappingURL=buildBundle.js.map
53
+ //# sourceMappingURL=buildBundle.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/rn-commands/bundle/buildBundle.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAEA;;;;;0CAA6C,4DAC7C,+BAAsC,oCACtC,6DAAoE,mFACpE,uBAA+B,sCAE/B,cAA6C;AAE7C,eAAsBA,YAEpBC,OACAC,KACAC,QAAyB;MACzBC,aAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAAkB,MAEZ,EAAEC,YAAYC,mBAAkB,IAAK,QAAQ,CAAC;AACpD,MAAI,CAACD;AACH,UAAM,IAAIE,MACR,kHAAA;AAGJ,MAAI,CAACD;AACH,UAAM,IAAIC,MACR,0HAAA;AAIJ,MAAIC,QAAQC,IAAIC;AACd,UAAM,IAAIH,MACR,oGAAA;AAIJ,MAAMI,cAAc,UAAMC,kEAA6BP,YAAYC,kBAAAA,GAE7DO,OAAO;IACX,GAAGV;IACHW,WAAWR,mBAAmBS,qBAC1BC,qCAAeX,WAAWY,MAAMX,mBAAmBS,cAAc,IACjEZ,OAAOW;EACb;AAEA,YAAMI,oDAAsBL,MAAMF,aAAaQ,QAAW;IACxDC,aAAa,SAACC,QAAAA;AACZC,0HAAoDD,QAAQhB,YAAYC,kBAAAA;IAC1E;EACF,CAAA,GAEAiB,QAAQC,KAAK,OAAA,OAEbC,0CAAAA;AACF;",
5
- "names": ["buildBundle", "_argv", "ctx", "argsIn", "bundleImpl", "viteConfig", "metroPluginOptions", "Error", "process", "env", "IS_VXRN_CLI", "metroConfig", "getMetroConfigFromViteConfig", "args", "entryFile", "mainModuleName", "projectResolve", "root", "buildBundleWithConfig", "undefined", "patchServer", "server", "patchMetroServerWithViteConfigAndMetroPluginOptions", "console", "info", "ensureProcessExitsAfterDelay"]
6
- }
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","buildBundle_exports","__export","buildBundle","module","exports","import_getMetroConfigFromViteConfig","require","import_buildBundleWithConfig","import_patchMetroServerWithViteConfigAndMetroPluginOptions","import_projectImport","import_exit","_argv","ctx","argsIn","bundleImpl","arguments","length","viteConfig","metroPluginOptions","Error","process","env","IS_VXRN_CLI","metroConfig","getMetroConfigFromViteConfig","args","entryFile","mainModuleName","projectResolve","root","buildBundleWithConfig","patchServer","server","patchMetroServerWithViteConfigAndMetroPluginOptions","console","info","ensureProcessExitsAfterDelay"],"sources":["../../../../src/rn-commands/bundle/buildBundle.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,WAAA,EAAAA,CAAA,KAAAA;AAAA;AAEAC,MAAA,CAAAC,OAAA,GAAAT,YAAA,CAAAK,mBAA6C;AAO7C,IAAAK,mCAIE,GAAAC,OACA,4DACe;EAAAC,4BAAA,GAAAD,OAAA;EAAAE,0DAAA,GAAAF,OAAA;EAAAG,oBAAA,GAAAH,OAAA;EAAAI,WAAA,GAAAJ,OAAA;AACf,eAAQJ,WAAYA,CAAAS,KAAA,EAAAC,GAAA,EAAAC,MAAuB;EAC3C,IAAIC,UAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;IAAA;MAAAE,UAAA;MAAAC;IAAA;EACH,KAAAD,UAAU,QACR,IAAAE,KAAA;EAAA,IACF,CAAAD,kBAAA,EAEF,MAAK,IAAAC,KAAA;EACH,IAAAC,OAAM,CAAIC,GAAA,CAAAC,WAAA,QACR,IAAAH,KAAA;EAAA,IACFI,WAAA,aAAAlB,mCAAA,CAAAmB,4BAAA,EAAAP,UAAA,EAAAC,kBAAA;IAAAO,IAAA;MAGF,GAAIZ,MAAA;MACFa,SAAM,EAAIR,kBAAA,CAAAS,cAAA,OAAAlB,oBAAA,CAAAmB,cAAA,EAAAX,UAAA,CAAAY,IAAA,EAAAX,kBAAA,CAAAS,cAAA,IAAAd,MAAA,CAAAa;IAAA;EACR,MACF,IAAAnB,4BAAA,CAAAuB,qBAAA,EAAAL,IAAA,EAAAF,WAAA;IAGFQ,WAAM,WAAAA,CAAcC,MAAM;MAGxB,CAAG,GAAAxB,0DAAA,CAAAyB,mDAAA,EAAAD,MAAA,EAAAf,UAAA,EAAAC,kBAAA;IACH;EAGF,IAAAgB,OAAA,CAAAC,IAAA,eAAAzB,WAAA,CAAA0B,4BAAA;AAEA","ignoreList":[]}
@@ -1,54 +1,72 @@
1
1
  "use strict";
2
+
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf,
8
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  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
- };
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: !0
13
+ });
14
+ },
15
+ __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ return to;
21
+ };
16
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
23
  // If the importer is in node compatibility mode or this is not an ESM
18
24
  // file that has been converted to a CommonJS file using a Babel-
19
25
  // compatible transform (i.e. "__esModule" has not been set), then set
20
26
  // "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);
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: !0
30
+ }) : target, mod)),
31
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: !0
33
+ }), mod);
24
34
  var buildBundleWithConfig_exports = {};
25
35
  __export(buildBundleWithConfig_exports, {
26
36
  buildBundleWithConfig: () => buildBundleWithConfig
27
37
  });
28
38
  module.exports = __toCommonJS(buildBundleWithConfig_exports);
29
- var import_node_path = __toESM(require("node:path"), 1), import_node_fs = require("node:fs"), import_Server = __toESM(require("metro/src/Server"), 1), import_bundle = __toESM(require("metro/src/shared/output/bundle"), 1), import_saveAssets = __toESM(require("./saveAssets"), 1);
39
+ var import_path = __toESM(require("path"), 1),
40
+ import_fs = require("fs"),
41
+ import_Server = __toESM(require("metro/src/Server"), 1),
42
+ import_bundle = __toESM(require("metro/src/shared/output/bundle"), 1),
43
+ import_saveAssets = __toESM(require("./saveAssets.native.js"), 1);
30
44
  async function buildBundleWithConfig(args, config) {
31
- var bundleImpl = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_bundle.default, { patchServer } = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, customResolverOptions = [];
32
- if (config.resolver.platforms.indexOf(args.platform) === -1)
33
- throw console.error(`Invalid platform ${args.platform ? `"${args.platform}" ` : ""}selected.`), console.info(`Available platforms are: ${config.resolver.platforms.map(function(x) {
34
- return `"${x}"`;
35
- }).join(", ")}. If you are trying to bundle for an out-of-tree platform, it may not be installed.`), new Error("Bundling failed");
45
+ var bundleImpl = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_bundle.default,
46
+ {
47
+ patchServer
48
+ } = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {},
49
+ customResolverOptions = [];
50
+ if (config.resolver.platforms.indexOf(args.platform) === -1) throw console.error(`Invalid platform ${args.platform ? `"${args.platform}" ` : ""}selected.`), console.info(`Available platforms are: ${config.resolver.platforms.map(function (x) {
51
+ return `"${x}"`;
52
+ }).join(", ")}. If you are trying to bundle for an out-of-tree platform, it may not be installed.`), new Error("Bundling failed");
36
53
  process.env.NODE_ENV = args.dev ? "development" : "production";
37
54
  var sourceMapUrl = args.sourcemapOutput;
38
- sourceMapUrl != null && !args.sourcemapUseAbsolutePath && (sourceMapUrl = import_node_path.default.basename(sourceMapUrl));
55
+ sourceMapUrl != null && !args.sourcemapUseAbsolutePath && (sourceMapUrl = import_path.default.basename(sourceMapUrl));
39
56
  var requestOpts = {
40
- entryFile: args.entryFile,
41
- sourceMapUrl,
42
- dev: args.dev,
43
- minify: args.minify !== void 0 ? args.minify : !args.dev,
44
- platform: args.platform,
45
- unstable_transformProfile: args.unstableTransformProfile,
46
- customResolverOptions
47
- }, server = new import_Server.default(config);
57
+ entryFile: args.entryFile,
58
+ sourceMapUrl,
59
+ dev: args.dev,
60
+ minify: args.minify !== void 0 ? args.minify : !args.dev,
61
+ platform: args.platform,
62
+ unstable_transformProfile: args.unstableTransformProfile,
63
+ customResolverOptions
64
+ },
65
+ server = new import_Server.default(config);
48
66
  patchServer && patchServer(server);
49
67
  try {
50
68
  var bundle = await bundleImpl.build(server, requestOpts);
51
- await import_node_fs.promises.mkdir(import_node_path.default.dirname(args.bundleOutput), {
69
+ await import_fs.promises.mkdir(import_path.default.dirname(args.bundleOutput), {
52
70
  recursive: !0,
53
71
  mode: 493
54
72
  }), await bundleImpl.save(bundle, args, console.info);
@@ -62,8 +80,4 @@ async function buildBundleWithConfig(args, config) {
62
80
  await server.end();
63
81
  }
64
82
  }
65
- // Annotate the CommonJS export names for ESM import in node:
66
- 0 && (module.exports = {
67
- buildBundleWithConfig
68
- });
69
- //# sourceMappingURL=buildBundleWithConfig.js.map
83
+ //# sourceMappingURL=buildBundleWithConfig.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/rn-commands/bundle/buildBundleWithConfig.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;uBAAiB,kCACjB,iBAA+B,oBAE/B,gBAAmB,yCACnB,gBAAwB,uDAIxB,oBAAuB;AAEvB,eAAsBA,sBACpBC,MACAC,QAAe;MACfC,aAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAAyDC,cAAAA,SACzD,EAAEC,YAAW,IAAb,UAAA,SAAA,KAAA,UAAA,CAAA,MAAA,SAAA,UAAA,CAAA,IAA8D,CAAC,GAGzDC,wBAAwB,CAAA;AAE9B,MAAIJ,OAAOK,SAASC,UAAUC,QAAQR,KAAKS,QAAQ,MAAM;AACvDC,kBAAQC,MAAM,oBAAoBX,KAAKS,WAAW,IAAIT,KAAKS,QAAQ,OAAO,EAAA,WAAa,GAEvFC,QAAQE,KACN,4BAA4BX,OAAOK,SAASC,UACzCM,IAAI,SAACC,GAAAA;aAAM,IAAIA,CAAAA;OACfC,KACC,IAAA,CAAA,qFACoF,GAGpF,IAAIC,MAAM,iBAAA;AAKlBC,UAAQC,IAAIC,WAAWnB,KAAKoB,MAAM,gBAAgB;AAElD,MAAIC,eAAerB,KAAKsB;AACxB,EAAID,gBAAgB,QAAQ,CAACrB,KAAKuB,6BAChCF,eAAeG,iBAAAA,QAAKC,SAASJ,YAAAA;AAI/B,MAAMK,cAA8B;IAClCC,WAAW3B,KAAK2B;IAChBN;IACAD,KAAKpB,KAAKoB;IACVQ,QAAQ5B,KAAK4B,WAAWC,SAAY7B,KAAK4B,SAAS,CAAC5B,KAAKoB;IACxDX,UAAUT,KAAKS;IACfqB,2BAA2B9B,KAAK+B;IAChC1B;EACF,GACM2B,SAAS,IAAIC,cAAAA,QAAOhC,MAAAA;AAE1B,EAAIG,eACFA,YAAY4B,MAAAA;AAGd,MAAI;AACF,QAAME,SAAS,MAAMhC,WAAWiC,MAAMH,QAAQN,WAAAA;AAG9C,UAAMU,eAAAA,SAAGC,MAAMb,iBAAAA,QAAKc,QAAQtC,KAAKuC,YAAY,GAAG;MAC9CC,WAAW;MACXC,MAAM;IACR,CAAA,GAEA,MAAMvC,WAAWwC,KAAKR,QAAQlC,MAAMU,QAAQE,IAAI;AAGhD,QAAM+B,eAAe,MAAMX,OAAOY,UAAU;MAC1C,GAAGX,cAAAA,QAAOY;MACV,GAAGnB;MACHoB,YAAY;IACd,CAAA;AAGA,WAAO,UAAMC,kBAAAA,SAAWJ,cAAc3C,KAAKS,UAAUT,KAAKgD,YAAYhD,KAAKiD,gBAAgB;EAC7F,UAAA;AACE,UAAMjB,OAAOkB,IAAG;EAClB;AACF;",
5
- "names": ["buildBundleWithConfig", "args", "config", "bundleImpl", "metroBundle", "patchServer", "customResolverOptions", "resolver", "platforms", "indexOf", "platform", "console", "error", "info", "map", "x", "join", "Error", "process", "env", "NODE_ENV", "dev", "sourceMapUrl", "sourcemapOutput", "sourcemapUseAbsolutePath", "path", "basename", "requestOpts", "entryFile", "minify", "undefined", "unstable_transformProfile", "unstableTransformProfile", "server", "Server", "bundle", "build", "fs", "mkdir", "dirname", "bundleOutput", "recursive", "mode", "save", "outputAssets", "getAssets", "DEFAULT_BUNDLE_OPTIONS", "bundleType", "saveAssets", "assetsDest", "assetCatalogDest", "end"]
6
- }
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","buildBundleWithConfig_exports","__export","buildBundleWithConfig","module","exports","import_path","__toESM","require","import_fs","import_Server","import_bundle","import_saveAssets","args","config","bundleImpl","arguments","length","default","patchServer","customResolverOptions","resolver","platforms","indexOf","platform","console","error","info","map","x","join","Error","process","env","NODE_ENV","dev","sourceMapUrl","sourcemapOutput","sourcemapUseAbsolutePath","basename","requestOpts","entryFile","minify","unstable_transformProfile","unstableTransformProfile","server","bundle","build","promises","mkdir","dirname","bundleOutput","recursive","mode","save","outputAssets","getAssets","DEFAULT_BUNDLE_OPTIONS","bundleType","assetsDest","assetCatalogDest","end"],"sources":["../../../../src/rn-commands/bundle/buildBundleWithConfig.ts"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
@@ -1,39 +1,44 @@
1
1
  "use strict";
2
+
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
7
  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);
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
+ value: !0
22
+ }), mod);
16
23
  var filterPlatformAssetScales_exports = {};
17
24
  __export(filterPlatformAssetScales_exports, {
18
25
  default: () => filterPlatformAssetScales_default
19
26
  });
20
27
  module.exports = __toCommonJS(filterPlatformAssetScales_exports);
21
28
  var ALLOWED_SCALES = {
22
- ios: [
23
- 1,
24
- 2,
25
- 3
26
- ]
29
+ ios: [1, 2, 3]
27
30
  };
28
31
  function filterPlatformAssetScales(platform, scales) {
29
32
  var whitelist = ALLOWED_SCALES[platform];
30
- if (!whitelist)
31
- return scales;
32
- var result = scales.filter(function(scale2) {
33
+ if (!whitelist) return scales;
34
+ var result = scales.filter(function (scale2) {
33
35
  return whitelist.indexOf(scale2) > -1;
34
36
  });
35
37
  if (result.length === 0 && scales.length > 0) {
36
- var maxScale = whitelist[whitelist.length - 1], _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
38
+ var maxScale = whitelist[whitelist.length - 1],
39
+ _iteratorNormalCompletion = !0,
40
+ _didIteratorError = !1,
41
+ _iteratorError = void 0;
37
42
  try {
38
43
  for (var _iterator = scales[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
39
44
  var scale = _step.value;
@@ -48,8 +53,7 @@ function filterPlatformAssetScales(platform, scales) {
48
53
  try {
49
54
  !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
50
55
  } finally {
51
- if (_didIteratorError)
52
- throw _iteratorError;
56
+ if (_didIteratorError) throw _iteratorError;
53
57
  }
54
58
  }
55
59
  result.length === 0 && result.push(scales[scales.length - 1]);
@@ -57,4 +61,4 @@ function filterPlatformAssetScales(platform, scales) {
57
61
  return result;
58
62
  }
59
63
  var filterPlatformAssetScales_default = filterPlatformAssetScales;
60
- //# sourceMappingURL=filterPlatformAssetScales.js.map
64
+ //# sourceMappingURL=filterPlatformAssetScales.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/rn-commands/bundle/filterPlatformAssetScales.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;AAOA,IAAMA,iBAA8C;EAClDC,KAAK;IAAC;IAAG;IAAG;;AACd;AAEA,SAASC,0BACPC,UACAC,QAA6B;AAE7B,MAAMC,YAAsBL,eAAeG,QAAAA;AAC3C,MAAI,CAACE;AACH,WAAOD;AAET,MAAME,SAASF,OAAOG,OAAO,SAACC,QAAAA;WAAUH,UAAUI,QAAQD,MAAAA,IAAS;;AACnE,MAAIF,OAAOI,WAAW,KAAKN,OAAOM,SAAS,GAAG;AAI5C,QAAMC,WAAWN,UAAUA,UAAUK,SAAS,CAAA,GACzC,4BAAA,IAAA,oBAAA,IAAA,iBAAA;;AAAL,eAAK,YAAeN,OAAAA,OAAAA,QAAAA,EAAAA,GAAf,OAAA,EAAA,6BAAA,QAAA,UAAA,KAAA,GAAA,OAAA,4BAAA,IAAuB;AAAvB,YAAMI,QAAN,MAAA;AACH,YAAIA,QAAQG,UAAU;AACpBL,iBAAOM,KAAKJ,KAAAA;AACZ;QACF;MACF;;AALK,0BAAA,IAAA,iBAAA;;;SAAA,6BAAA,UAAA,UAAA,QAAA,UAAA,OAAA;;YAAA;gBAAA;;;AAQL,IAAIF,OAAOI,WAAW,KACpBJ,OAAOM,KAAKR,OAAOA,OAAOM,SAAS,CAAA,CAAE;EAEzC;AACA,SAAOJ;AACT;AAEA,IAAA,oCAAeJ;",
5
- "names": ["ALLOWED_SCALES", "ios", "filterPlatformAssetScales", "platform", "scales", "whitelist", "result", "filter", "scale", "indexOf", "length", "maxScale", "push"]
6
- }
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","filterPlatformAssetScales_exports","__export","default","filterPlatformAssetScales_default","module","exports","ALLOWED_SCALES","ios","filterPlatformAssetScales","platform","scales","whitelist","result","filter","scale2","indexOf","length","maxScale","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","scale"],"sources":["../../../../src/rn-commands/bundle/filterPlatformAssetScales.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,iCAAA;AAAAC,QAAA,CAAAD,iCAAA;EAAAE,OAAA,EAAAA,CAAA,KAAAC;AAAA;AAOAC,MAAM,CAAAC,OAAA,GAAAV,YAA8C,CAAAK,iCAAA;AAAA,IAClDM,cAAa;EACfC,GAAA,GAEA,GAIE,GACA;AAGA;AACA,SAAIC,yBAAuBA,CAAAC,QAAO,EAASC,MAAG;EAI5C,IAAAC,SAAM,GAAAL,cAAqB,CAAAG,QAAU;EACrC,KAAAE,SAAW,EACT,OAAID,MAAA;EACF,IAAAE,MAAA,GAAOF,MAAK,CAAAG,MAAK,WAAAC,MAAA;IACjB,OAAAH,SAAA,CAAAI,OAAA,CAAAD,MAAA;EAAA;EAKJ,IAAIF,MAAO,CAAAI,MAAA,KAAW,KACpBN,MAAO,CAAAM,MAAK,IAAO;IAEvB,IAAAC,QAAA,GAAAN,SAAA,CAAAA,SAAA,CAAAK,MAAA;MAAAE,yBAAA;MAAAC,iBAAA;MAAAC,cAAA;IACA;MACF,SAAAC,SAAA,GAAAX,MAAA,CAAAY,MAAA,CAAAC,QAAA,KAAAC,KAAA,IAAAN,yBAAA,IAAAM,KAAA,GAAAH,SAAA,CAAAI,IAAA,IAAAC,IAAA,GAAAR,yBAAA;QAEO,IAAAS,KAAA,GAAAH,KAAA,CAAAzB,KAAA","ignoreList":[]}
@@ -1,35 +1,47 @@
1
1
  "use strict";
2
+
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf,
8
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  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
- };
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: !0
13
+ });
14
+ },
15
+ __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ return to;
21
+ };
16
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
23
  // If the importer is in node compatibility mode or this is not an ESM
18
24
  // file that has been converted to a CommonJS file using a Babel-
19
25
  // compatible transform (i.e. "__esModule" has not been set), then set
20
26
  // "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);
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: !0
30
+ }) : target, mod)),
31
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: !0
33
+ }), mod);
24
34
  var getAssetDestPathAndroid_exports = {};
25
35
  __export(getAssetDestPathAndroid_exports, {
26
36
  default: () => getAssetDestPathAndroid_default
27
37
  });
28
38
  module.exports = __toCommonJS(getAssetDestPathAndroid_exports);
29
- var import_assetPathUtils = __toESM(require("./assetPathUtils"), 1), import_node_path = __toESM(require("node:path"), 1);
39
+ var import_assetPathUtils = __toESM(require("./assetPathUtils.native.js"), 1),
40
+ import_path = __toESM(require("path"), 1);
30
41
  function getAssetDestPathAndroid(asset, scale) {
31
- var androidFolder = import_assetPathUtils.default.getAndroidResourceFolderName(asset, scale), fileName = import_assetPathUtils.default.getResourceIdentifier(asset);
32
- return import_node_path.default.join(androidFolder, `${fileName}.${asset.type}`);
42
+ var androidFolder = import_assetPathUtils.default.getAndroidResourceFolderName(asset, scale),
43
+ fileName = import_assetPathUtils.default.getResourceIdentifier(asset);
44
+ return import_path.default.join(androidFolder, `${fileName}.${asset.type}`);
33
45
  }
34
46
  var getAssetDestPathAndroid_default = getAssetDestPathAndroid;
35
- //# sourceMappingURL=getAssetDestPathAndroid.js.map
47
+ //# sourceMappingURL=getAssetDestPathAndroid.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/rn-commands/bundle/getAssetDestPathAndroid.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AASA,4BAA2B,yCAC3B,mBAAiB;AAEjB,SAASA,wBAAwBC,OAAsBC,OAAa;AAClE,MAAMC,gBAAgBC,sBAAAA,QAAeC,6BAA6BJ,OAAOC,KAAAA,GACnEI,WAAWF,sBAAAA,QAAeG,sBAAsBN,KAAAA;AACtD,SAAOO,iBAAAA,QAAKC,KAAKN,eAAe,GAAGG,QAAAA,IAAYL,MAAMS,IAAI,EAAE;AAC7D;AAEA,IAAA,kCAAeV;",
5
- "names": ["getAssetDestPathAndroid", "asset", "scale", "androidFolder", "assetPathUtils", "getAndroidResourceFolderName", "fileName", "getResourceIdentifier", "path", "join", "type"]
6
- }
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getAssetDestPathAndroid_exports","__export","default","getAssetDestPathAndroid_default","module","exports","import_assetPathUtils","__toESM","require","import_path","getAssetDestPathAndroid","asset","scale","androidFolder","getAndroidResourceFolderName","fileName","getResourceIdentifier","join","type"],"sources":["../../../../src/rn-commands/bundle/getAssetDestPathAndroid.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,+BAAA;AAAAC,QAAA,CAAAD,+BAAA;EAAAE,OAAA,EAAAA,CAAA,KAAAC;AAAA;AASAC,MAAA,CAAAC,OAAA,GAAAV,YAA2B,CAAAK,+BAAA;AAG3B,IAAAM,qBAAS,GAAAC,OAAwB,CAAAC,OAAsB,6BAAuB;EAAAC,WAAA,GAAAF,OAAA,CAAAC,OAAA;AAC5E,SAAME,uBAAgBA,CAAAC,KAAA,EAAAC,KAAA;EAEtB,IAAAC,aAAO,GAAAP,qBAAU,CAAAJ,OAAA,CAAAY,4BAAwC,CAAEH,KAAA,EAAAC,KAAA;IAAAG,QAAA,GAAAT,qBAAA,CAAAJ,OAAA,CAAAc,qBAAA,CAAAL,KAAA;EAC7D,OAAAF,WAAA,CAAAP,OAAA,CAAAe,IAAA,CAAAJ,aAAA,KAAAE,QAAA,IAAAJ,KAAA,CAAAO,IAAA;AAEA","ignoreList":[]}
@@ -1,41 +1,50 @@
1
1
  "use strict";
2
+
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf,
8
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  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
- };
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: !0
13
+ });
14
+ },
15
+ __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ return to;
21
+ };
16
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
23
  // If the importer is in node compatibility mode or this is not an ESM
18
24
  // file that has been converted to a CommonJS file using a Babel-
19
25
  // compatible transform (i.e. "__esModule" has not been set), then set
20
26
  // "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);
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: !0
30
+ }) : target, mod)),
31
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: !0
33
+ }), mod);
24
34
  var getAssetDestPathIOS_exports = {};
25
35
  __export(getAssetDestPathIOS_exports, {
26
36
  default: () => getAssetDestPathIOS_default
27
37
  });
28
38
  module.exports = __toCommonJS(getAssetDestPathIOS_exports);
29
- var import_node_path = __toESM(require("node:path"), 1);
39
+ var import_path = __toESM(require("path"), 1);
30
40
  function getAssetDestPathIOS(asset, scale) {
31
- var suffix = scale === 1 ? "" : `@${scale}x`, fileName = `${asset.name + suffix}.${asset.type}`;
32
- return import_node_path.default.join(
33
- // Assets can have relative paths outside of the project root.
34
- // Replace `../` with `_` to make sure they don't end up outside of
35
- // the expected assets directory.
36
- asset.httpServerLocation.substr(1).replace(/\.\.\//g, "_"),
37
- fileName
38
- );
41
+ var suffix = scale === 1 ? "" : `@${scale}x`,
42
+ fileName = `${asset.name + suffix}.${asset.type}`;
43
+ return import_path.default.join(
44
+ // Assets can have relative paths outside of the project root.
45
+ // Replace `../` with `_` to make sure they don't end up outside of
46
+ // the expected assets directory.
47
+ asset.httpServerLocation.substr(1).replace(/\.\.\//g, "_"), fileName);
39
48
  }
40
49
  var getAssetDestPathIOS_default = getAssetDestPathIOS;
41
- //# sourceMappingURL=getAssetDestPathIOS.js.map
50
+ //# sourceMappingURL=getAssetDestPathIOS.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/rn-commands/bundle/getAssetDestPathIOS.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AASA,uBAAiB;AAEjB,SAASA,oBAAoBC,OAAsBC,OAAa;AAC9D,MAAMC,SAASD,UAAU,IAAI,KAAK,IAAIA,KAAAA,KAChCE,WAAW,GAAGH,MAAMI,OAAOF,MAAAA,IAAUF,MAAMK,IAAI;AACrD,SAAOC,iBAAAA,QAAKC;;;;IAIVP,MAAMQ,mBAAmBC,OAAO,CAAA,EAAGC,QAAQ,WAAW,GAAA;IACtDP;EAAAA;AAEJ;AAEA,IAAA,8BAAeJ;",
5
- "names": ["getAssetDestPathIOS", "asset", "scale", "suffix", "fileName", "name", "type", "path", "join", "httpServerLocation", "substr", "replace"]
6
- }
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getAssetDestPathIOS_exports","__export","default","getAssetDestPathIOS_default","module","exports","import_path","__toESM","require","getAssetDestPathIOS","asset","scale","suffix","fileName","name","type","join","httpServerLocation","substr","replace"],"sources":["../../../../src/rn-commands/bundle/getAssetDestPathIOS.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,2BAAA;AAAAC,QAAA,CAAAD,2BAAA;EAAAE,OAAA,EAAAA,CAAA,KAAAC;AAAA;AASAC,MAAA,CAAAC,OAAA,GAAAV,YAAiB,CAAAK,2BAAA;AAEjB,IAAAM,WAAS,GAAAC,OAAA,CAAAC,OAAoB,OAAsB,GAAuB;AACxE,SAAMC,mBAAmBA,CAAAC,KAAI,EAAKC,KAAI;EAEtC,IAAAC,MAAO,GAAAD,KAAA,cAAK,IAAAA,KAAA;IAAAE,QAAA,MAAAH,KAAA,CAAAI,IAAA,GAAAF,MAAA,IAAAF,KAAA,CAAAK,IAAA;EAAA,OAAAT,WAAA,CAAAJ,OAAA,CAAAc,IAAA;EAAA;EAAA;EAIV;EACAN,KAAA,CAAAO,kBAAA,CAAAC,MAAA,IAAAC,OAAA,kBACFN,QACF;AAEA","ignoreList":[]}
@@ -1,34 +1,39 @@
1
1
  "use strict";
2
+
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
7
  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);
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
+ value: !0
22
+ }), mod);
16
23
  var getBuildBundleFn_exports = {};
17
24
  __export(getBuildBundleFn_exports, {
18
25
  getBuildBundleFn: () => getBuildBundleFn
19
26
  });
20
27
  module.exports = __toCommonJS(getBuildBundleFn_exports);
21
- var import_vite = require("vite"), import_buildBundle = require("./buildBundle");
28
+ var import_vite = require("vite"),
29
+ import_buildBundle = require("./buildBundle.native.js");
22
30
  async function getBuildBundleFn() {
23
- var viteConfig = await (0, import_vite.resolveConfig)(
24
- {},
25
- // configFile,
26
- // configLoader,
27
- // envFile,
28
- // forceOptimizeDeps,
29
- "build",
30
- "production"
31
- );
31
+ var viteConfig = await (0, import_vite.resolveConfig)({},
32
+ // configFile,
33
+ // configLoader,
34
+ // envFile,
35
+ // forceOptimizeDeps,
36
+ "build", "production");
32
37
  if (globalThis.__viteMetroPluginOptions__) {
33
38
  var metroBuildBundle = import_buildBundle.buildBundle.bind({
34
39
  viteConfig,
@@ -38,8 +43,4 @@ async function getBuildBundleFn() {
38
43
  }
39
44
  return null;
40
45
  }
41
- // Annotate the CommonJS export names for ESM import in node:
42
- 0 && (module.exports = {
43
- getBuildBundleFn
44
- });
45
- //# sourceMappingURL=getBuildBundleFn.js.map
46
+ //# sourceMappingURL=getBuildBundleFn.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/rn-commands/bundle/getBuildBundleFn.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;kBAA8B,iBAC9B,qBAA4B;AAO5B,eAAsBA,mBAAAA;AACpB,MAAMC,aAAa,UAAMC;IACvB,CAKA;;;;;IACA;IACA;EAAA;AAIF,MAAIC,WAAW,4BAA+B;AAC5C,QAAMC,mBAAmBC,+BAAYC,KAAK;MACxCL;MACAM,oBAAoBJ,WAAW;IACjC,CAAA;AACA,WAAOC;EACT;AAEA,SAAO;AACT;",
5
- "names": ["getBuildBundleFn", "viteConfig", "resolveConfig", "globalThis", "metroBuildBundle", "buildBundle", "bind", "metroPluginOptions"]
6
- }
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getBuildBundleFn_exports","__export","getBuildBundleFn","module","exports","import_vite","require","import_buildBundle","viteConfig","resolveConfig","globalThis","__viteMetroPluginOptions__","metroBuildBundle","buildBundle","bind","metroPluginOptions"],"sources":["../../../../src/rn-commands/bundle/getBuildBundleFn.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,wBAAA;AAAAC,QAAA,CAAAD,wBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA8B,CAAAK,wBAC9B;AAOA,IAAAK,WAAsB,GAAAC,OAAA;EAAmBC,kBAAA,GAAAD,OAAA;AACvC,eAAMJ,gBAAmBA,CAAA;EAAA,IACvBM,UAAA,aAAAH,WAAA,CAAAI,aAAA;EAAA;EAAA;EAAA;EAKA;EACA,SACA,YACF;EAGA,IAAAC,UAAI,CAAAC,0BAAW;IAEX,IAAAC,gBAAA,GAAAL,kBAAA,CAAAM,WAAA,CAAAC,IAAA;MACAN,UAAA;MACDO,kBAII,EAAAL,UAAA,CAAAC;IACT","ignoreList":[]}
@@ -1,28 +1,31 @@
1
1
  "use strict";
2
+
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
7
  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);
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
+ value: !0
22
+ }), mod);
16
23
  var bundle_exports = {};
17
24
  __export(bundle_exports, {
18
25
  buildBundle: () => import_buildBundle.buildBundle,
19
26
  getBuildBundleFn: () => import_getBuildBundleFn.getBuildBundleFn
20
27
  });
21
28
  module.exports = __toCommonJS(bundle_exports);
22
- var import_buildBundle = require("./buildBundle"), import_getBuildBundleFn = require("./getBuildBundleFn");
23
- // Annotate the CommonJS export names for ESM import in node:
24
- 0 && (module.exports = {
25
- buildBundle,
26
- getBuildBundleFn
27
- });
28
- //# sourceMappingURL=index.js.map
29
+ var import_buildBundle = require("./buildBundle.native.js"),
30
+ import_getBuildBundleFn = require("./getBuildBundleFn.native.js");
31
+ //# sourceMappingURL=index.native.js.map