vxrn 1.1.166 → 1.1.168

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 (43) hide show
  1. package/dist/utils/assert.js +6 -1
  2. package/dist/utils/assert.js.map +1 -1
  3. package/dist/utils/assert.mjs +4 -1
  4. package/dist/utils/assert.mjs.map +1 -1
  5. package/dist/utils/assert.native.js +10 -1
  6. package/dist/utils/assert.native.js.map +2 -2
  7. package/dist/utils/getBaseViteConfig.js +9 -0
  8. package/dist/utils/getBaseViteConfig.js.map +1 -1
  9. package/dist/utils/getBaseViteConfig.mjs +9 -0
  10. package/dist/utils/getBaseViteConfig.mjs.map +1 -1
  11. package/dist/utils/getBaseViteConfig.native.js +9 -0
  12. package/dist/utils/getBaseViteConfig.native.js.map +2 -2
  13. package/dist/utils/getReactNativeBundle.js +3 -2
  14. package/dist/utils/getReactNativeBundle.js.map +1 -1
  15. package/dist/utils/getReactNativeBundle.mjs +3 -2
  16. package/dist/utils/getReactNativeBundle.mjs.map +1 -1
  17. package/dist/utils/getReactNativeBundle.native.js +4 -3
  18. package/dist/utils/getReactNativeBundle.native.js.map +2 -2
  19. package/dist/utils/getReactNativeConfig.js +13 -0
  20. package/dist/utils/getReactNativeConfig.js.map +1 -1
  21. package/dist/utils/getReactNativeConfig.mjs +13 -1
  22. package/dist/utils/getReactNativeConfig.mjs.map +1 -1
  23. package/dist/utils/getReactNativeConfig.native.js +24 -0
  24. package/dist/utils/getReactNativeConfig.native.js.map +2 -2
  25. package/dist/utils/patches.js +95 -19
  26. package/dist/utils/patches.js.map +1 -1
  27. package/dist/utils/patches.mjs +87 -27
  28. package/dist/utils/patches.mjs.map +1 -1
  29. package/dist/utils/patches.native.js +285 -101
  30. package/dist/utils/patches.native.js.map +2 -2
  31. package/package.json +8 -7
  32. package/src/exports/dev.ts +2 -2
  33. package/src/utils/assert.ts +6 -0
  34. package/src/utils/getBaseViteConfig.ts +10 -0
  35. package/src/utils/getReactNativeBundle.ts +11 -1
  36. package/src/utils/getReactNativeConfig.ts +20 -0
  37. package/src/utils/patches.ts +168 -41
  38. package/types/utils/assert.d.ts +1 -0
  39. package/types/utils/assert.d.ts.map +1 -1
  40. package/types/utils/getBaseViteConfig.d.ts.map +1 -1
  41. package/types/utils/getReactNativeBundle.d.ts.map +1 -1
  42. package/types/utils/getReactNativeConfig.d.ts.map +1 -1
  43. package/types/utils/patches.d.ts.map +1 -1
@@ -1,45 +1,105 @@
1
1
  import findNodeModules from "find-node-modules";
2
2
  import { join } from "node:path";
3
3
  import FSExtra from "fs-extra";
4
+ import { assertString } from "./assert.mjs";
5
+ class Bail extends Error {}
6
+ function bailIfExists(haystack, needle) {
7
+ if (haystack.includes(needle)) throw new Bail();
8
+ }
4
9
  const patches = [{
5
10
  module: "h3",
6
- patchFile: "h3+1.11.1.patch"
11
+ patchFiles: {
12
+ "dist/index.mjs": contents => {
13
+ assertString(contents), bailIfExists(contents, "/** patch-version-1 **/");
14
+ const insertPoint = contents.indexOf(" return headers;");
15
+ return contents.slice(0, insertPoint) + `
16
+ /** patch-version-1 **/
17
+ // The expoManifestRequestHandlerPlugin (Vite plugin) needs the original request host so that it can compose URLs that can be accessed by physical devices. This won't be needed once we retire h3 and use the Vite Dev Server directly.
18
+ // This may not work if one installed vxrn from NPM since this patch may not apply.
19
+ const originalHost = reqHeaders.host;
20
+ if (originalHost) {
21
+ headers['X-Forwarded-Host'] = originalHost;
22
+ }
23
+
24
+ ` + contents.slice(insertPoint);
25
+ }
26
+ }
7
27
  }, {
8
28
  module: "react",
9
- patchFile: "react+18.3.1.patch"
29
+ patchFiles: {
30
+ "index.web.js": () => "module.exports = require('@vxrn/vendor/react-19');",
31
+ "jsx-dev-runtime.web.js": () => "module.exports = require('@vxrn/vendor/react-jsx-dev-19');",
32
+ "jsx-runtime.web.js": () => "module.exports = require('@vxrn/vendor/react-jsx-19');",
33
+ "package.json": contents => {
34
+ assertString(contents), bailIfExists(contents, "index.web.js");
35
+ const pkg = JSON.parse(contents);
36
+ if (!pkg.exports["."]) throw new Error("Expected a version of React that has package.json exports defined");
37
+ return pkg.exports["."] = {
38
+ "react-server": "./react.shared-subset.js",
39
+ "react-native": "./index.js",
40
+ default: "./index.web.js"
41
+ }, pkg.exports["./jsx-runtime"] = {
42
+ "react-native": "./jsx-runtime.js",
43
+ default: "./jsx-runtime.web.js"
44
+ }, pkg.exports["./jsx-dev-runtime"] = {
45
+ "react-native": "./jsx-dev-runtime.js",
46
+ default: "./jsx-dev-runtime.web.js"
47
+ }, JSON.stringify(pkg, null, 2);
48
+ }
49
+ }
10
50
  }, {
11
51
  module: "react-dom",
12
- patchFile: "react-dom+18.3.1.patch"
52
+ patchFiles: {
53
+ "client.web.js": () => "module.exports = require('@vxrn/vendor/react-dom-client-19')",
54
+ "index.web.js": () => "module.exports = require('@vxrn/vendor/react-dom-19')",
55
+ "server.browser.web.js": () => "module.exports = require('@vxrn/vendor/react-dom-server.browser-19')",
56
+ "test-utils.web.js": () => "module.exports = require('@vxrn/vendor/react-dom-test-utils-19')",
57
+ "package.json": contents => {
58
+ assertString(contents), bailIfExists(contents, "index.web.js");
59
+ const pkg = JSON.parse(contents);
60
+ if (!pkg.exports["."]) throw new Error("Expected a version of React that has package.json exports defined");
61
+ return pkg.exports["."] = {
62
+ "react-native": "./index.js",
63
+ default: "./index.web.js"
64
+ }, pkg.exports["./client"] = {
65
+ "react-native": "./client.js",
66
+ default: "./client.web.js"
67
+ }, pkg.exports["./server.browser"] = {
68
+ "react-native": "./server.browser.js",
69
+ default: "./server.browser.web.js"
70
+ }, pkg.exports["./test-utils"] = {
71
+ "react-native": "./test-utils.js",
72
+ default: "./test-utils.web.js"
73
+ }, JSON.stringify(pkg, null, 2);
74
+ }
75
+ }
13
76
  }];
14
77
  async function checkPatches(options) {
15
78
  if (options.state.applyPatches === !1) return;
16
79
  const nodeModulesDirs = findNodeModules({
17
- cwd: options.root
18
- }).map(relativePath => join(options.root, relativePath)),
19
- patchesToCopy = [];
80
+ cwd: options.root
81
+ }).map(relativePath => join(options.root, relativePath));
20
82
  await Promise.all(patches.flatMap(patch => nodeModulesDirs.flatMap(async dir => {
21
- (await FSExtra.pathExists(join(dir, patch.module))) && patchesToCopy.push({
22
- patch,
23
- dir
24
- });
83
+ const nodeModuleDir = join(dir, patch.module);
84
+ if (await FSExtra.pathExists(nodeModuleDir)) for (const file in patch.patchFiles) {
85
+ const log = () => {
86
+ console.info(` Applying patch to ${patch.module}`);
87
+ };
88
+ try {
89
+ const fullPath = join(nodeModuleDir, file),
90
+ patchFn = patch.patchFiles[file];
91
+ if (!(await FSExtra.pathExists(fullPath))) {
92
+ log(), await FSExtra.writeFile(fullPath, await patchFn());
93
+ return;
94
+ }
95
+ if (patchFn.length === 0) return;
96
+ log(), await FSExtra.writeFile(fullPath, await patchFn(await FSExtra.readFile(fullPath, "utf-8")));
97
+ } catch (err) {
98
+ if (err instanceof Bail) return;
99
+ throw err;
100
+ }
101
+ }
25
102
  })));
26
- let didCopy = !1;
27
- for (const {
28
- patch,
29
- dir
30
- } of patchesToCopy) {
31
- const patchesDir = join(dir, "..", "patches");
32
- (await FSExtra.pathExists(patchesDir)) || (await FSExtra.mkdir(patchesDir));
33
- const src = join(options.internalPatchesDir, patch.patchFile),
34
- dest = join(patchesDir, patch.patchFile),
35
- patchContents = await FSExtra.readFile(src, "utf-8");
36
- (!(await FSExtra.pathExists(dest)) || (await FSExtra.readFile(dest, "utf-8")) !== patchContents) && (didCopy = !0, console.info(` \u{1FA79} Adding patch ${patch.module}`), await FSExtra.copy(src, dest));
37
- }
38
- didCopy && (console.info(`
39
- We've added patches to support running React 19 and 18 in parallel. Please run "npx patch-package" and re-run.
40
-
41
- You'll want to add "patch-package" to your devDependencies and scripts.postinstall in your package.json.
42
- `), process.exit(0));
43
103
  }
44
104
  export { checkPatches };
45
105
  //# sourceMappingURL=patches.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["findNodeModules","join","FSExtra","patches","module","patchFile","checkPatches","options","state","applyPatches","nodeModulesDirs","cwd","root","map","relativePath","patchesToCopy","Promise","all","flatMap","patch","dir","pathExists","push","didCopy","patchesDir","mkdir","src","internalPatchesDir","dest","patchContents","readFile","console","info","copy","process","exit"],"sources":["../../src/utils/patches.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,eAAA,MAAqB;AAC5B,SAASC,IAAA,QAAY;AACrB,OAAOC,OAAA,MAAa;AAGpB,MAAMC,OAAA,GAAU,CACd;EACEC,MAAA,EAAQ;EACRC,SAAA,EAAW;AACb,GACA;EACED,MAAA,EAAQ;EACRC,SAAA,EAAW;AACb,GACA;EACED,MAAA,EAAQ;EACRC,SAAA,EAAW;AACb,EACF;AAIA,eAAsBC,aAAaC,OAAA,EAA4B;EAC7D,IAAIA,OAAA,CAAQC,KAAA,CAAMC,YAAA,KAAiB,IACjC;EAGF,MAAMC,eAAA,GAAkBV,eAAA,CAAgB;MACtCW,GAAA,EAAKJ,OAAA,CAAQK;IACf,CAAC,EAAEC,GAAA,CAAKC,YAAA,IAAiBb,IAAA,CAAKM,OAAA,CAAQK,IAAA,EAAME,YAAY,CAAC;IAEnDC,aAAA,GAAiD,EAAC;EAExD,MAAMC,OAAA,CAAQC,GAAA,CACZd,OAAA,CAAQe,OAAA,CAASC,KAAA,IACRT,eAAA,CAAgBQ,OAAA,CAAQ,MAAOE,GAAA,IAAQ;IACxC,OAAMlB,OAAA,CAAQmB,UAAA,CAAWpB,IAAA,CAAKmB,GAAA,EAAKD,KAAA,CAAMf,MAAM,CAAC,MAClDW,aAAA,CAAcO,IAAA,CAAK;MAAEH,KAAA;MAAOC;IAAI,CAAC;EAErC,CAAC,CACF,CACH;EAEA,IAAIG,OAAA,GAAU;EAEd,WAAW;IAAEJ,KAAA;IAAOC;EAAI,KAAKL,aAAA,EAAe;IAC1C,MAAMS,UAAA,GAAavB,IAAA,CAAKmB,GAAA,EAAK,MAAM,SAAS;IAEtC,OAAMlB,OAAA,CAAQmB,UAAA,CAAWG,UAAU,OACvC,MAAMtB,OAAA,CAAQuB,KAAA,CAAMD,UAAU;IAGhC,MAAME,GAAA,GAAMzB,IAAA,CAAKM,OAAA,CAAQoB,kBAAA,EAAoBR,KAAA,CAAMd,SAAS;MACtDuB,IAAA,GAAO3B,IAAA,CAAKuB,UAAA,EAAYL,KAAA,CAAMd,SAAS;MACvCwB,aAAA,GAAgB,MAAM3B,OAAA,CAAQ4B,QAAA,CAASJ,GAAA,EAAK,OAAO;IAEzD,CACE,EAAE,MAAMxB,OAAA,CAAQmB,UAAA,CAAWO,IAAI,MAC9B,OAAM1B,OAAA,CAAQ4B,QAAA,CAASF,IAAA,EAAM,OAAO,OAAOC,aAAA,MAE5CN,OAAA,GAAU,IACVQ,OAAA,CAAQC,IAAA,CAAK,2BAAoBb,KAAA,CAAMf,MAAM,EAAE,GAC/C,MAAMF,OAAA,CAAQ+B,IAAA,CAAKP,GAAA,EAAKE,IAAI;EAEhC;EAEIL,OAAA,KACFQ,OAAA,CAAQC,IAAA,CACN;AAAA;AAAA;AAAA;AAAA,CAGF,GACAE,OAAA,CAAQC,IAAA,CAAK,CAAC;AAElB","ignoreList":[]}
1
+ {"version":3,"names":["findNodeModules","join","FSExtra","assertString","Bail","Error","bailIfExists","haystack","needle","includes","patches","module","patchFiles","contents","insertPoint","indexOf","slice","index.web.js","jsx-dev-runtime.web.js","jsx-runtime.web.js","pkg","JSON","parse","exports","default","stringify","client.web.js","server.browser.web.js","test-utils.web.js","checkPatches","options","state","applyPatches","nodeModulesDirs","cwd","root","map","relativePath","Promise","all","flatMap","patch","dir","nodeModuleDir","pathExists","file","log","console","info","fullPath","patchFn","writeFile","length","readFile","err"],"sources":["../../src/utils/patches.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,eAAA,MAAqB;AAC5B,SAASC,IAAA,QAAY;AACrB,OAAOC,OAAA,MAAa;AAEpB,SAASC,YAAA,QAAoB;AAS7B,MAAMC,IAAA,SAAaC,KAAA,CAAM;AAEzB,SAASC,aAA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MAAMC,aAAA,GAAgB1C,IAAA,CAAKyC,GAAA,EAAKD,KAAA,CAAM9B,MAAM;IAE5C,IAAI,MAAMT,OAAA,CAAQ0C,UAAA,CAAWD,aAAa,GACxC,WAAWE,IAAA,IAAQJ,KAAA,CAAM7B,UAAA,EAAY;MACnC,MAAMkC,GAAA,GAAMA,CAAA,KAAM;QAChBC,OAAA,CAAQC,IAAA,CAAK,sBAAsBP,KAAA,CAAM9B,MAAM,EAAE;MACnD;MAEA,IAAI;QACF,MAAMsC,QAAA,GAAWhD,IAAA,CAAK0C,aAAA,EAAeE,IAAI;UACnCK,OAAA,GAAUT,KAAA,CAAM7B,UAAA,CAAWiC,IAAI;QAGrC,IAAI,EAAE,MAAM3C,OAAA,CAAQ0C,UAAA,CAAWK,QAAQ,IAAI;UACzCH,GAAA,CAAI,GACJ,MAAM5C,OAAA,CAAQiD,SAAA,CAAUF,QAAA,EAAU,MAAMC,OAAA,CAAQ,CAAC;UACjD;QACF;QAGA,IAAIA,OAAA,CAAQE,MAAA,KAAW,GACrB;QAGFN,GAAA,CAAI,GAEJ,MAAM5C,OAAA,CAAQiD,SAAA,CACZF,QAAA,EACA,MAAMC,OAAA,CAAQ,MAAMhD,OAAA,CAAQmD,QAAA,CAASJ,QAAA,EAAU,OAAO,CAAC,CACzD;MACF,SAASK,GAAA,EAAK;QACZ,IAAIA,GAAA,YAAelD,IAAA,EACjB;QAEF,MAAMkD,GAAA;MACR;IACF;EAEJ,CAAC,CACF,CACH;AACF","ignoreList":[]}
@@ -1,6 +1,12 @@
1
1
  import findNodeModules from "find-node-modules";
2
2
  import { join } from "node:path";
3
3
  import FSExtra from "fs-extra";
4
+ import { assertString } from "./assert";
5
+ function _assert_this_initialized(self) {
6
+ if (self === void 0)
7
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
8
+ return self;
9
+ }
4
10
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
5
11
  try {
6
12
  var info = gen[key](arg), value = info.value;
@@ -25,6 +31,99 @@ function _async_to_generator(fn) {
25
31
  });
26
32
  };
27
33
  }
34
+ function _class_call_check(instance, Constructor) {
35
+ if (!(instance instanceof Constructor))
36
+ throw new TypeError("Cannot call a class as a function");
37
+ }
38
+ function _construct(Parent, args, Class) {
39
+ return _is_native_reflect_construct() ? _construct = Reflect.construct : _construct = function(Parent2, args2, Class2) {
40
+ var a = [
41
+ null
42
+ ];
43
+ a.push.apply(a, args2);
44
+ var Constructor = Function.bind.apply(Parent2, a), instance = new Constructor();
45
+ return Class2 && _set_prototype_of(instance, Class2.prototype), instance;
46
+ }, _construct.apply(null, arguments);
47
+ }
48
+ function _get_prototype_of(o) {
49
+ return _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function(o2) {
50
+ return o2.__proto__ || Object.getPrototypeOf(o2);
51
+ }, _get_prototype_of(o);
52
+ }
53
+ function _inherits(subClass, superClass) {
54
+ if (typeof superClass != "function" && superClass !== null)
55
+ throw new TypeError("Super expression must either be null or a function");
56
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
57
+ constructor: {
58
+ value: subClass,
59
+ writable: !0,
60
+ configurable: !0
61
+ }
62
+ }), superClass && _set_prototype_of(subClass, superClass);
63
+ }
64
+ function _instanceof(left, right) {
65
+ return right != null && typeof Symbol < "u" && right[Symbol.hasInstance] ? !!right[Symbol.hasInstance](left) : left instanceof right;
66
+ }
67
+ function _is_native_function(fn) {
68
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
69
+ }
70
+ function _possible_constructor_return(self, call) {
71
+ return call && (_type_of(call) === "object" || typeof call == "function") ? call : _assert_this_initialized(self);
72
+ }
73
+ function _set_prototype_of(o, p) {
74
+ return _set_prototype_of = Object.setPrototypeOf || function(o2, p2) {
75
+ return o2.__proto__ = p2, o2;
76
+ }, _set_prototype_of(o, p);
77
+ }
78
+ function _type_of(obj) {
79
+ "@swc/helpers - typeof";
80
+ return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
81
+ }
82
+ function _wrap_native_super(Class) {
83
+ var _cache = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
84
+ return _wrap_native_super = function(Class2) {
85
+ if (Class2 === null || !_is_native_function(Class2)) return Class2;
86
+ if (typeof Class2 != "function")
87
+ throw new TypeError("Super expression must either be null or a function");
88
+ if (typeof _cache < "u") {
89
+ if (_cache.has(Class2)) return _cache.get(Class2);
90
+ _cache.set(Class2, Wrapper);
91
+ }
92
+ function Wrapper() {
93
+ return _construct(Class2, arguments, _get_prototype_of(this).constructor);
94
+ }
95
+ return Wrapper.prototype = Object.create(Class2.prototype, {
96
+ constructor: {
97
+ value: Wrapper,
98
+ enumerable: !1,
99
+ writable: !0,
100
+ configurable: !0
101
+ }
102
+ }), _set_prototype_of(Wrapper, Class2);
103
+ }, _wrap_native_super(Class);
104
+ }
105
+ function _is_native_reflect_construct() {
106
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
107
+ if (typeof Proxy == "function") return !0;
108
+ try {
109
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
110
+ })), !0;
111
+ } catch {
112
+ return !1;
113
+ }
114
+ }
115
+ function _create_super(Derived) {
116
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
117
+ return function() {
118
+ var Super = _get_prototype_of(Derived), result;
119
+ if (hasNativeReflectConstruct) {
120
+ var NewTarget = _get_prototype_of(this).constructor;
121
+ result = Reflect.construct(Super, arguments, NewTarget);
122
+ } else
123
+ result = Super.apply(this, arguments);
124
+ return _possible_constructor_return(this, result);
125
+ };
126
+ }
28
127
  function _ts_generator(thisArg, body) {
29
128
  var f, y, t, g, _ = {
30
129
  label: 0,
@@ -111,18 +210,105 @@ function _ts_generator(thisArg, body) {
111
210
  };
112
211
  }
113
212
  }
213
+ var Bail = /* @__PURE__ */ function(Error1) {
214
+ "use strict";
215
+ _inherits(Bail2, Error1);
216
+ var _super = _create_super(Bail2);
217
+ function Bail2() {
218
+ return _class_call_check(this, Bail2), _super.apply(this, arguments);
219
+ }
220
+ return Bail2;
221
+ }(_wrap_native_super(Error));
222
+ function bailIfExists(haystack, needle) {
223
+ if (haystack.includes(needle))
224
+ throw new Bail();
225
+ }
114
226
  var patches = [
115
227
  {
116
228
  module: "h3",
117
- patchFile: "h3+1.11.1.patch"
229
+ patchFiles: {
230
+ "dist/index.mjs": function(contents) {
231
+ assertString(contents), bailIfExists(contents, "/** patch-version-1 **/");
232
+ var insertPoint = contents.indexOf(" return headers;");
233
+ return contents.slice(0, insertPoint) + `
234
+ /** patch-version-1 **/
235
+ // The expoManifestRequestHandlerPlugin (Vite plugin) needs the original request host so that it can compose URLs that can be accessed by physical devices. This won't be needed once we retire h3 and use the Vite Dev Server directly.
236
+ // This may not work if one installed vxrn from NPM since this patch may not apply.
237
+ const originalHost = reqHeaders.host;
238
+ if (originalHost) {
239
+ headers['X-Forwarded-Host'] = originalHost;
240
+ }
241
+
242
+ ` + contents.slice(insertPoint);
243
+ }
244
+ }
118
245
  },
119
246
  {
120
247
  module: "react",
121
- patchFile: "react+18.3.1.patch"
248
+ patchFiles: {
249
+ "index.web.js": function() {
250
+ return "module.exports = require('@vxrn/vendor/react-19');";
251
+ },
252
+ "jsx-dev-runtime.web.js": function() {
253
+ return "module.exports = require('@vxrn/vendor/react-jsx-dev-19');";
254
+ },
255
+ "jsx-runtime.web.js": function() {
256
+ return "module.exports = require('@vxrn/vendor/react-jsx-19');";
257
+ },
258
+ "package.json": function(contents) {
259
+ assertString(contents), bailIfExists(contents, "index.web.js");
260
+ var pkg = JSON.parse(contents);
261
+ if (!pkg.exports["."])
262
+ throw new Error("Expected a version of React that has package.json exports defined");
263
+ return pkg.exports["."] = {
264
+ "react-server": "./react.shared-subset.js",
265
+ "react-native": "./index.js",
266
+ default: "./index.web.js"
267
+ }, pkg.exports["./jsx-runtime"] = {
268
+ "react-native": "./jsx-runtime.js",
269
+ default: "./jsx-runtime.web.js"
270
+ }, pkg.exports["./jsx-dev-runtime"] = {
271
+ "react-native": "./jsx-dev-runtime.js",
272
+ default: "./jsx-dev-runtime.web.js"
273
+ }, JSON.stringify(pkg, null, 2);
274
+ }
275
+ }
122
276
  },
123
277
  {
124
278
  module: "react-dom",
125
- patchFile: "react-dom+18.3.1.patch"
279
+ patchFiles: {
280
+ "client.web.js": function() {
281
+ return "module.exports = require('@vxrn/vendor/react-dom-client-19')";
282
+ },
283
+ "index.web.js": function() {
284
+ return "module.exports = require('@vxrn/vendor/react-dom-19')";
285
+ },
286
+ "server.browser.web.js": function() {
287
+ return "module.exports = require('@vxrn/vendor/react-dom-server.browser-19')";
288
+ },
289
+ "test-utils.web.js": function() {
290
+ return "module.exports = require('@vxrn/vendor/react-dom-test-utils-19')";
291
+ },
292
+ "package.json": function(contents) {
293
+ assertString(contents), bailIfExists(contents, "index.web.js");
294
+ var pkg = JSON.parse(contents);
295
+ if (!pkg.exports["."])
296
+ throw new Error("Expected a version of React that has package.json exports defined");
297
+ return pkg.exports["."] = {
298
+ "react-native": "./index.js",
299
+ default: "./index.web.js"
300
+ }, pkg.exports["./client"] = {
301
+ "react-native": "./client.js",
302
+ default: "./client.web.js"
303
+ }, pkg.exports["./server.browser"] = {
304
+ "react-native": "./server.browser.js",
305
+ default: "./server.browser.web.js"
306
+ }, pkg.exports["./test-utils"] = {
307
+ "react-native": "./test-utils.js",
308
+ default: "./test-utils.web.js"
309
+ }, JSON.stringify(pkg, null, 2);
310
+ }
311
+ }
126
312
  }
127
313
  ];
128
314
  function checkPatches(options) {
@@ -130,7 +316,7 @@ function checkPatches(options) {
130
316
  }
131
317
  function _checkPatches() {
132
318
  return _checkPatches = _async_to_generator(function(options) {
133
- var nodeModulesDirs, patchesToCopy, didCopy, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, _step_value, patch, dir, patchesDir, src, dest, patchContents, _tmp, err;
319
+ var nodeModulesDirs;
134
320
  return _ts_generator(this, function(_state) {
135
321
  switch (_state.label) {
136
322
  case 0:
@@ -140,122 +326,120 @@ function _checkPatches() {
140
326
  cwd: options.root
141
327
  }).map(function(relativePath) {
142
328
  return join(options.root, relativePath);
143
- }), patchesToCopy = [], [
329
+ }), [
144
330
  4,
145
- Promise.all(patches.flatMap(function(patch2) {
331
+ Promise.all(patches.flatMap(function(patch) {
146
332
  return nodeModulesDirs.flatMap(function() {
147
- var _ref = _async_to_generator(function(dir2) {
333
+ var _ref = _async_to_generator(function(dir) {
334
+ var nodeModuleDir, _tmp, _tmp1, _i, file, log, fullPath, patchFn, _, _tmp2, _1, _tmp3, err;
148
335
  return _ts_generator(this, function(_state2) {
149
336
  switch (_state2.label) {
150
337
  case 0:
151
- return [
338
+ return nodeModuleDir = join(dir, patch.module), [
152
339
  4,
153
- FSExtra.pathExists(join(dir2, patch2.module))
340
+ FSExtra.pathExists(nodeModuleDir)
154
341
  ];
155
342
  case 1:
156
- return _state2.sent() && patchesToCopy.push({
157
- patch: patch2,
158
- dir: dir2
159
- }), [
343
+ if (!_state2.sent()) return [
344
+ 3,
345
+ 13
346
+ ];
347
+ _tmp = [];
348
+ for (_tmp1 in patch.patchFiles) _tmp.push(_tmp1);
349
+ _i = 0, _state2.label = 2;
350
+ case 2:
351
+ if (!(_i < _tmp.length)) return [
352
+ 3,
353
+ 13
354
+ ];
355
+ file = _tmp[_i], log = function() {
356
+ console.info(" Applying patch to ".concat(patch.module));
357
+ }, _state2.label = 3;
358
+ case 3:
359
+ return _state2.trys.push([
360
+ 3,
361
+ 11,
362
+ ,
363
+ 12
364
+ ]), fullPath = join(nodeModuleDir, file), patchFn = patch.patchFiles[file], [
365
+ 4,
366
+ FSExtra.pathExists(fullPath)
367
+ ];
368
+ case 4:
369
+ return _state2.sent() ? [
370
+ 3,
371
+ 7
372
+ ] : (log(), _ = FSExtra.writeFile, _tmp2 = [
373
+ fullPath
374
+ ], [
375
+ 4,
376
+ patchFn()
377
+ ]);
378
+ case 5:
379
+ return [
380
+ 4,
381
+ _.apply(FSExtra, _tmp2.concat([
382
+ _state2.sent()
383
+ ]))
384
+ ];
385
+ case 6:
386
+ return _state2.sent(), [
387
+ 2
388
+ ];
389
+ case 7:
390
+ return patchFn.length === 0 ? [
391
+ 2
392
+ ] : (log(), _1 = FSExtra.writeFile, _tmp3 = [
393
+ fullPath
394
+ ], [
395
+ 4,
396
+ FSExtra.readFile(fullPath, "utf-8")
397
+ ]);
398
+ case 8:
399
+ return [
400
+ 4,
401
+ patchFn.apply(void 0, [
402
+ _state2.sent()
403
+ ])
404
+ ];
405
+ case 9:
406
+ return [
407
+ 4,
408
+ _1.apply(FSExtra, _tmp3.concat([
409
+ _state2.sent()
410
+ ]))
411
+ ];
412
+ case 10:
413
+ return _state2.sent(), [
414
+ 3,
415
+ 12
416
+ ];
417
+ case 11:
418
+ if (err = _state2.sent(), _instanceof(err, Bail))
419
+ return [
420
+ 2
421
+ ];
422
+ throw err;
423
+ case 12:
424
+ return _i++, [
425
+ 3,
426
+ 2
427
+ ];
428
+ case 13:
429
+ return [
160
430
  2
161
431
  ];
162
432
  }
163
433
  });
164
434
  });
165
- return function(dir2) {
435
+ return function(dir) {
166
436
  return _ref.apply(this, arguments);
167
437
  };
168
438
  }());
169
439
  }))
170
440
  ]);
171
441
  case 1:
172
- _state.sent(), didCopy = !1, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0, _state.label = 2;
173
- case 2:
174
- _state.trys.push([
175
- 2,
176
- 14,
177
- 15,
178
- 16
179
- ]), _iterator = patchesToCopy[Symbol.iterator](), _state.label = 3;
180
- case 3:
181
- return (_iteratorNormalCompletion = (_step = _iterator.next()).done) ? [
182
- 3,
183
- 13
184
- ] : (_step_value = _step.value, patch = _step_value.patch, dir = _step_value.dir, patchesDir = join(dir, "..", "patches"), [
185
- 4,
186
- FSExtra.pathExists(patchesDir)
187
- ]);
188
- case 4:
189
- return _state.sent() ? [
190
- 3,
191
- 6
192
- ] : [
193
- 4,
194
- FSExtra.mkdir(patchesDir)
195
- ];
196
- case 5:
197
- _state.sent(), _state.label = 6;
198
- case 6:
199
- return src = join(options.internalPatchesDir, patch.patchFile), dest = join(patchesDir, patch.patchFile), [
200
- 4,
201
- FSExtra.readFile(src, "utf-8")
202
- ];
203
- case 7:
204
- return patchContents = _state.sent(), [
205
- 4,
206
- FSExtra.pathExists(dest)
207
- ];
208
- case 8:
209
- return _tmp = !_state.sent(), _tmp ? [
210
- 3,
211
- 10
212
- ] : [
213
- 4,
214
- FSExtra.readFile(dest, "utf-8")
215
- ];
216
- case 9:
217
- _tmp = _state.sent() !== patchContents, _state.label = 10;
218
- case 10:
219
- return _tmp ? (didCopy = !0, console.info(" \u{1FA79} Adding patch ".concat(patch.module)), [
220
- 4,
221
- FSExtra.copy(src, dest)
222
- ]) : [
223
- 3,
224
- 12
225
- ];
226
- case 11:
227
- _state.sent(), _state.label = 12;
228
- case 12:
229
- return _iteratorNormalCompletion = !0, [
230
- 3,
231
- 3
232
- ];
233
- case 13:
234
- return [
235
- 3,
236
- 16
237
- ];
238
- case 14:
239
- return err = _state.sent(), _didIteratorError = !0, _iteratorError = err, [
240
- 3,
241
- 16
242
- ];
243
- case 15:
244
- try {
245
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
246
- } finally {
247
- if (_didIteratorError)
248
- throw _iteratorError;
249
- }
250
- return [
251
- 7
252
- ];
253
- case 16:
254
- return didCopy && (console.info(`
255
- We've added patches to support running React 19 and 18 in parallel. Please run "npx patch-package" and re-run.
256
-
257
- You'll want to add "patch-package" to your devDependencies and scripts.postinstall in your package.json.
258
- `), process.exit(0)), [
442
+ return _state.sent(), [
259
443
  2
260
444
  ];
261
445
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/Users/n8/vxrn/packages/vxrn/src/utils/patches.ts"],
4
- "mappings": "AAAA,OAAOA,qBAAqB;AAC5B,SAASC,YAAY;AACrB,OAAOC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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KAAKW,KAAK,MAAM,SAAA,GAE7B;;YAAMV,QAAQwB,WAAWb,UAAAA;;;iBAAzB,OAAA,KAAA,IAAF;;;cACF;;YAAMX,QAAQ2B,MAAMhB,UAAAA;;;AAApB,iBAAA,KAAA;;AAGIC,uBAAMb,KAAKM,QAAQuB,oBAAoBnB,MAAMN,SAAS,GACtDU,OAAOd,KAAKY,YAAYF,MAAMN,SAAS,GACvB;;YAAMH,QAAQ6B,SAASjB,KAAK,OAAA;;;AAA5CE,iCAAgB,OAAA,KAAA,GAGlB;;YAAMd,QAAQwB,WAAWX,IAAAA;;;wBAA3B,CAAE,OAAA,KAAA,UAAF;;;cACC;;YAAMb,QAAQ6B,SAAShB,MAAM,OAAA;;;iBAA7B,OAAA,KAAA,MAA2CC;;yBAE5CN,UAAU,IACVsB,QAAQC,KAAM,2BAAgC,OAAbtB,MAAMP,MAAM,CAAA,GAC7C;;YAAMF,QAAQgC,KAAKpB,KAAKC,IAAAA;;;;;;AAAxB,iBAAA,KAAA;;AAjBC,6CAAA;;;;;;;;;;sCAAA,oBAAA,IAAA,iBAAA;;;;;;aAAA,6BAAA,UAAA,UAAA,QAAA,UAAA,OAAA;;gBAAA;oBAAA;;;;;;AAqBL,iBAAIL,YACFsB,QAAQC,KACL;;;;CAAA,GAIHE,QAAQC,KAAK,CAAA;;;;;EAEjB,CAAA,GApDsB9B,cAAAA,MAAAA,MAAAA,SAAAA;;",
5
- "names": ["findNodeModules", "join", "FSExtra", "patches", "module", "patchFile", "checkPatches", "options", "nodeModulesDirs", "patchesToCopy", "didCopy", "patch", "dir", "patchesDir", "src", "dest", "patchContents", "state", "applyPatches", "cwd", "root", "map", "relativePath", "Promise", "all", "flatMap", "pathExists", "_state", "push", "mkdir", "internalPatchesDir", "readFile", "console", "info", "copy", "process", "exit"]
4
+ "mappings": "AAAA,OAAOA,qBAAqB;AAC5B,SAASC,YAAY;AACrB,OAAOC,aAAa;AAEpB,SAASC,oBAAoB;;;;;;;;;;;;;;;;;;;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A,KAAA;;;;;EA4CF,CAAA,GArDsBb,cAAAA,MAAAA,MAAAA,SAAAA;;",
5
+ "names": ["findNodeModules", "join", "FSExtra", "assertString", "Bail", "Error", "bailIfExists", "haystack", "needle", "includes", "patches", "module", "patchFiles", "contents", "insertPoint", "indexOf", "slice", "pkg", "JSON", "parse", "exports", "default", "stringify", "checkPatches", "options", "nodeModulesDirs", "state", "applyPatches", "cwd", "root", "map", "relativePath", "Promise", "all", "flatMap", "patch", "dir", "nodeModuleDir", "file", "log", "fullPath", "patchFn", "err", "pathExists", "_state", "console", "info", "writeFile", "length", "readFile"]
6
6
  }