vxrn 0.1.20 → 0.1.21

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 (173) hide show
  1. package/dist/cjs/cli.js +77 -3
  2. package/dist/cjs/cli.js.map +2 -2
  3. package/dist/cjs/cli.native.js +268 -2
  4. package/dist/cjs/cli.native.js.map +2 -2
  5. package/dist/cjs/constants.js +21 -0
  6. package/dist/cjs/constants.js.map +6 -0
  7. package/dist/cjs/constants.native.js +26 -0
  8. package/dist/cjs/constants.native.js.map +6 -0
  9. package/dist/cjs/dispose.js +28 -0
  10. package/dist/cjs/dispose.js.map +6 -0
  11. package/dist/cjs/dispose.native.js +36 -0
  12. package/dist/cjs/dispose.native.js.map +6 -0
  13. package/dist/cjs/exports/build.js +145 -0
  14. package/dist/cjs/exports/build.js.map +6 -0
  15. package/dist/cjs/exports/build.native.js +409 -0
  16. package/dist/cjs/exports/build.native.js.map +6 -0
  17. package/dist/cjs/exports/checkPatches.js +62 -0
  18. package/dist/cjs/exports/checkPatches.js.map +6 -0
  19. package/dist/cjs/exports/checkPatches.native.js +289 -0
  20. package/dist/cjs/exports/checkPatches.native.js.map +6 -0
  21. package/dist/cjs/exports/dev.js +568 -0
  22. package/dist/cjs/exports/dev.js.map +6 -0
  23. package/dist/cjs/exports/dev.native.js +1111 -0
  24. package/dist/cjs/exports/dev.native.js.map +6 -0
  25. package/dist/cjs/exports/serve.js +55 -0
  26. package/dist/cjs/exports/serve.js.map +6 -0
  27. package/dist/cjs/exports/serve.native.js +236 -0
  28. package/dist/cjs/exports/serve.native.js.map +6 -0
  29. package/dist/cjs/index.js +2 -3
  30. package/dist/cjs/index.js.map +1 -1
  31. package/dist/cjs/index.native.js +3 -5
  32. package/dist/cjs/index.native.js.map +1 -1
  33. package/dist/cjs/plugins/clientInjectPlugin.js +66 -0
  34. package/dist/cjs/plugins/clientInjectPlugin.js.map +6 -0
  35. package/dist/cjs/plugins/clientInjectPlugin.native.js +190 -0
  36. package/dist/cjs/plugins/clientInjectPlugin.native.js.map +6 -0
  37. package/dist/cjs/plugins/reactNativeCommonJsPlugin.js +89 -0
  38. package/dist/cjs/plugins/reactNativeCommonJsPlugin.js.map +6 -0
  39. package/dist/cjs/plugins/reactNativeCommonJsPlugin.native.js +346 -0
  40. package/dist/cjs/plugins/reactNativeCommonJsPlugin.native.js.map +6 -0
  41. package/dist/cjs/utils/checkPatches.js +62 -0
  42. package/dist/cjs/utils/checkPatches.js.map +6 -0
  43. package/dist/cjs/utils/checkPatches.native.js +289 -0
  44. package/dist/cjs/utils/checkPatches.native.js.map +6 -0
  45. package/dist/cjs/utils/dispose.js +28 -0
  46. package/dist/cjs/utils/dispose.js.map +6 -0
  47. package/dist/cjs/utils/dispose.native.js +36 -0
  48. package/dist/cjs/utils/dispose.native.js.map +6 -0
  49. package/dist/cjs/utils/getBaseViteConfig.js +2 -2
  50. package/dist/cjs/utils/getBaseViteConfig.js.map +1 -1
  51. package/dist/cjs/utils/getBaseViteConfig.native.js +2 -2
  52. package/dist/cjs/utils/getBaseViteConfig.native.js.map +1 -1
  53. package/dist/cjs/utils/patches.js +62 -0
  54. package/dist/cjs/utils/patches.js.map +6 -0
  55. package/dist/cjs/utils/patches.native.js +289 -0
  56. package/dist/cjs/utils/patches.native.js.map +6 -0
  57. package/dist/cjs/utils/prerender.js +1 -0
  58. package/dist/cjs/utils/prerender.js.map +6 -0
  59. package/dist/cjs/utils/prerender.native.js +2 -0
  60. package/dist/cjs/utils/prerender.native.js.map +6 -0
  61. package/dist/cjs/vendor/createExpoServer.js +34 -0
  62. package/dist/cjs/vendor/createExpoServer.js.map +6 -0
  63. package/dist/cjs/vendor/createExpoServer.native.js +42 -0
  64. package/dist/cjs/vendor/createExpoServer.native.js.map +6 -0
  65. package/dist/esm/cli.js +58 -3
  66. package/dist/esm/cli.js.map +2 -2
  67. package/dist/esm/cli.mjs +81 -9
  68. package/dist/esm/cli.native.js +249 -3
  69. package/dist/esm/cli.native.js.map +2 -2
  70. package/dist/esm/constants.js +5 -0
  71. package/dist/esm/constants.js.map +6 -0
  72. package/dist/esm/constants.mjs +2 -0
  73. package/dist/esm/constants.native.js +5 -0
  74. package/dist/esm/constants.native.js.map +6 -0
  75. package/dist/esm/dispose.js +12 -0
  76. package/dist/esm/dispose.js.map +6 -0
  77. package/dist/esm/dispose.mjs +8 -0
  78. package/dist/esm/dispose.native.js +14 -0
  79. package/dist/esm/dispose.native.js.map +6 -0
  80. package/dist/esm/exports/build.js +128 -0
  81. package/dist/esm/exports/build.js.map +6 -0
  82. package/dist/esm/exports/build.mjs +119 -0
  83. package/dist/esm/exports/build.native.js +385 -0
  84. package/dist/esm/exports/build.native.js.map +6 -0
  85. package/dist/esm/exports/checkPatches.js +40 -0
  86. package/dist/esm/exports/checkPatches.js.map +6 -0
  87. package/dist/esm/exports/checkPatches.mjs +31 -0
  88. package/dist/esm/exports/checkPatches.native.js +262 -0
  89. package/dist/esm/exports/checkPatches.native.js.map +6 -0
  90. package/dist/esm/exports/dev.js +581 -0
  91. package/dist/esm/exports/dev.js.map +6 -0
  92. package/dist/esm/exports/dev.mjs +543 -0
  93. package/dist/esm/exports/dev.native.js +1102 -0
  94. package/dist/esm/exports/dev.native.js.map +6 -0
  95. package/dist/esm/exports/serve.js +33 -0
  96. package/dist/esm/exports/serve.js.map +6 -0
  97. package/dist/esm/exports/serve.mjs +38 -0
  98. package/dist/esm/exports/serve.native.js +209 -0
  99. package/dist/esm/exports/serve.native.js.map +6 -0
  100. package/dist/esm/index.js +3 -5
  101. package/dist/esm/index.js.map +1 -1
  102. package/dist/esm/index.mjs +3 -4
  103. package/dist/esm/index.native.js +3 -5
  104. package/dist/esm/index.native.js.map +2 -2
  105. package/dist/esm/plugins/clientInjectPlugin.js +42 -0
  106. package/dist/esm/plugins/clientInjectPlugin.js.map +6 -0
  107. package/dist/esm/plugins/clientInjectPlugin.mjs +56 -0
  108. package/dist/esm/plugins/clientInjectPlugin.native.js +161 -0
  109. package/dist/esm/plugins/clientInjectPlugin.native.js.map +6 -0
  110. package/dist/esm/plugins/reactNativeCommonJsPlugin.js +75 -0
  111. package/dist/esm/plugins/reactNativeCommonJsPlugin.js.map +6 -0
  112. package/dist/esm/plugins/reactNativeCommonJsPlugin.mjs +55 -0
  113. package/dist/esm/plugins/reactNativeCommonJsPlugin.native.js +327 -0
  114. package/dist/esm/plugins/reactNativeCommonJsPlugin.native.js.map +6 -0
  115. package/dist/esm/utils/checkPatches.js +40 -0
  116. package/dist/esm/utils/checkPatches.js.map +6 -0
  117. package/dist/esm/utils/checkPatches.mjs +31 -0
  118. package/dist/esm/utils/checkPatches.native.js +262 -0
  119. package/dist/esm/utils/checkPatches.native.js.map +6 -0
  120. package/dist/esm/utils/dispose.js +12 -0
  121. package/dist/esm/utils/dispose.js.map +6 -0
  122. package/dist/esm/utils/dispose.mjs +8 -0
  123. package/dist/esm/utils/dispose.native.js +14 -0
  124. package/dist/esm/utils/dispose.native.js.map +6 -0
  125. package/dist/esm/utils/getBaseViteConfig.js +1 -1
  126. package/dist/esm/utils/getBaseViteConfig.mjs +1 -1
  127. package/dist/esm/utils/getBaseViteConfig.native.js +1 -1
  128. package/dist/esm/utils/patches.js +40 -0
  129. package/dist/esm/utils/patches.js.map +6 -0
  130. package/dist/esm/utils/patches.mjs +31 -0
  131. package/dist/esm/utils/patches.native.js +262 -0
  132. package/dist/esm/utils/patches.native.js.map +6 -0
  133. package/dist/esm/utils/prerender.js +1 -0
  134. package/dist/esm/utils/prerender.js.map +6 -0
  135. package/dist/esm/utils/prerender.mjs +0 -0
  136. package/dist/esm/utils/prerender.native.js +1 -0
  137. package/dist/esm/utils/prerender.native.js.map +6 -0
  138. package/dist/esm/vendor/createExpoServer.js +20 -0
  139. package/dist/esm/vendor/createExpoServer.js.map +6 -0
  140. package/dist/esm/vendor/createExpoServer.mjs +17 -0
  141. package/dist/esm/vendor/createExpoServer.native.js +22 -0
  142. package/dist/esm/vendor/createExpoServer.native.js.map +6 -0
  143. package/package.json +8 -7
  144. package/src/cli.ts +78 -2
  145. package/src/{build.ts → exports/build.ts} +5 -4
  146. package/src/{createDevServer.ts → exports/dev.ts} +13 -63
  147. package/src/exports/serve.ts +51 -0
  148. package/src/index.ts +3 -3
  149. package/src/{dev → plugins}/clientInjectPlugin.ts +1 -12
  150. package/src/{nativePlugin.ts → plugins/reactNativeCommonJsPlugin.ts} +3 -26
  151. package/src/utils/getBaseViteConfig.ts +1 -1
  152. package/src/utils/patches.ts +54 -0
  153. package/types/build.d.ts +4 -4
  154. package/types/constants.d.ts +2 -0
  155. package/types/dispose.d.ts +3 -0
  156. package/types/exports/build.d.ts +4 -0
  157. package/types/exports/dev.d.ts +13 -0
  158. package/types/exports/serve.d.ts +3 -0
  159. package/types/index.d.ts +2 -3
  160. package/types/plugins/clientInjectPlugin.d.ts +7 -0
  161. package/types/plugins/reactNativeCommonJsPlugin.d.ts +7 -0
  162. package/types/utils/checkPatches.d.ts +3 -0
  163. package/types/utils/dispose.d.ts +3 -0
  164. package/types/utils/patches.d.ts +3 -0
  165. package/types/utils/prerender.d.ts +1 -0
  166. package/types/vendor/createExpoServer.d.ts +4 -0
  167. package/src/commands/cli-build.ts +0 -25
  168. package/src/commands/cli-dev.ts +0 -47
  169. package/src/commands/index.ts +0 -10
  170. package/src/dev/createDevServer.ts +0 -234
  171. /package/src/{utils/constants.ts → constants.ts} +0 -0
  172. /package/src/{utils.ts → utils/dispose.ts} +0 -0
  173. /package/src/{createExpoServer.ts → vendor/createExpoServer.ts} +0 -0
@@ -0,0 +1,289 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ 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
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "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);
24
+ var patches_exports = {};
25
+ __export(patches_exports, {
26
+ checkPatches: () => checkPatches
27
+ });
28
+ module.exports = __toCommonJS(patches_exports);
29
+ var import_find_node_modules = __toESM(require("find-node-modules"), 1), import_node_path = require("node:path"), import_fs_extra = __toESM(require("fs-extra"), 1);
30
+ function _array_like_to_array(arr, len) {
31
+ (len == null || len > arr.length) && (len = arr.length);
32
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
33
+ arr2[i] = arr[i];
34
+ return arr2;
35
+ }
36
+ function _array_without_holes(arr) {
37
+ if (Array.isArray(arr))
38
+ return _array_like_to_array(arr);
39
+ }
40
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
41
+ try {
42
+ var info = gen[key](arg), value = info.value;
43
+ } catch (error) {
44
+ reject(error);
45
+ return;
46
+ }
47
+ info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
48
+ }
49
+ function _async_to_generator(fn) {
50
+ return function() {
51
+ var self = this, args = arguments;
52
+ return new Promise(function(resolve, reject) {
53
+ var gen = fn.apply(self, args);
54
+ function _next(value) {
55
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
56
+ }
57
+ function _throw(err) {
58
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
59
+ }
60
+ _next(void 0);
61
+ });
62
+ };
63
+ }
64
+ function _iterable_to_array(iter) {
65
+ if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
66
+ return Array.from(iter);
67
+ }
68
+ function _non_iterable_spread() {
69
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
70
+ }
71
+ function _to_consumable_array(arr) {
72
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
73
+ }
74
+ function _unsupported_iterable_to_array(o, minLen) {
75
+ if (o) {
76
+ if (typeof o == "string")
77
+ return _array_like_to_array(o, minLen);
78
+ var n = Object.prototype.toString.call(o).slice(8, -1);
79
+ if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
80
+ return Array.from(n);
81
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
82
+ return _array_like_to_array(o, minLen);
83
+ }
84
+ }
85
+ function _ts_generator(thisArg, body) {
86
+ var f, y, t, g, _ = {
87
+ label: 0,
88
+ sent: function() {
89
+ if (t[0] & 1)
90
+ throw t[1];
91
+ return t[1];
92
+ },
93
+ trys: [],
94
+ ops: []
95
+ };
96
+ return g = {
97
+ next: verb(0),
98
+ throw: verb(1),
99
+ return: verb(2)
100
+ }, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
101
+ return this;
102
+ }), g;
103
+ function verb(n) {
104
+ return function(v) {
105
+ return step([
106
+ n,
107
+ v
108
+ ]);
109
+ };
110
+ }
111
+ function step(op) {
112
+ if (f)
113
+ throw new TypeError("Generator is already executing.");
114
+ for (; _; )
115
+ try {
116
+ if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
117
+ return t;
118
+ switch (y = 0, t && (op = [
119
+ op[0] & 2,
120
+ t.value
121
+ ]), op[0]) {
122
+ case 0:
123
+ case 1:
124
+ t = op;
125
+ break;
126
+ case 4:
127
+ return _.label++, {
128
+ value: op[1],
129
+ done: !1
130
+ };
131
+ case 5:
132
+ _.label++, y = op[1], op = [
133
+ 0
134
+ ];
135
+ continue;
136
+ case 7:
137
+ op = _.ops.pop(), _.trys.pop();
138
+ continue;
139
+ default:
140
+ if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
141
+ _ = 0;
142
+ continue;
143
+ }
144
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
145
+ _.label = op[1];
146
+ break;
147
+ }
148
+ if (op[0] === 6 && _.label < t[1]) {
149
+ _.label = t[1], t = op;
150
+ break;
151
+ }
152
+ if (t && _.label < t[2]) {
153
+ _.label = t[2], _.ops.push(op);
154
+ break;
155
+ }
156
+ t[2] && _.ops.pop(), _.trys.pop();
157
+ continue;
158
+ }
159
+ op = body.call(thisArg, _);
160
+ } catch (e) {
161
+ op = [
162
+ 6,
163
+ e
164
+ ], y = 0;
165
+ } finally {
166
+ f = t = 0;
167
+ }
168
+ if (op[0] & 5)
169
+ throw op[1];
170
+ return {
171
+ value: op[0] ? op[1] : void 0,
172
+ done: !0
173
+ };
174
+ }
175
+ }
176
+ var patches = [
177
+ {
178
+ module: "react-native-screens",
179
+ patchFile: "react-native-screens+3.22.1.patch"
180
+ }
181
+ ];
182
+ function checkPatches(options) {
183
+ return _checkPatches.apply(this, arguments);
184
+ }
185
+ function _checkPatches() {
186
+ return _checkPatches = _async_to_generator(function(options) {
187
+ var nodeModulesDirs, patchesToCopy, didCopy, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, patch, dest, src, err;
188
+ return _ts_generator(this, function(_state) {
189
+ switch (_state.label) {
190
+ case 0:
191
+ return options.state.applyPatches === !1 ? [
192
+ 2
193
+ ] : (nodeModulesDirs = (0, import_find_node_modules.default)({
194
+ cwd: options.root
195
+ }).map(function(relativePath) {
196
+ return (0, import_node_path.join)(options.root, relativePath);
197
+ }), patchesToCopy = /* @__PURE__ */ new Set(), [
198
+ 4,
199
+ Promise.all(patches.flatMap(function(patch2) {
200
+ return nodeModulesDirs.flatMap(function() {
201
+ var _ref = _async_to_generator(function(dir) {
202
+ return _ts_generator(this, function(_state2) {
203
+ switch (_state2.label) {
204
+ case 0:
205
+ return [
206
+ 4,
207
+ import_fs_extra.default.pathExists((0, import_node_path.join)(dir, patch2.module))
208
+ ];
209
+ case 1:
210
+ return _state2.sent() && patchesToCopy.add(patch2), [
211
+ 2
212
+ ];
213
+ }
214
+ });
215
+ });
216
+ return function(dir) {
217
+ return _ref.apply(this, arguments);
218
+ };
219
+ }());
220
+ }))
221
+ ]);
222
+ case 1:
223
+ _state.sent(), didCopy = !1, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0, _state.label = 2;
224
+ case 2:
225
+ _state.trys.push([
226
+ 2,
227
+ 8,
228
+ 9,
229
+ 10
230
+ ]), _iterator = _to_consumable_array(patchesToCopy)[Symbol.iterator](), _state.label = 3;
231
+ case 3:
232
+ return (_iteratorNormalCompletion = (_step = _iterator.next()).done) ? [
233
+ 3,
234
+ 7
235
+ ] : (patch = _step.value, dest = (0, import_node_path.join)(options.userPatchesDir, patch.patchFile), [
236
+ 4,
237
+ import_fs_extra.default.pathExists(dest)
238
+ ]);
239
+ case 4:
240
+ return _state.sent() ? [
241
+ 3,
242
+ 6
243
+ ] : (didCopy = !0, console.info("Copying patch ".concat(patch.module)), src = (0, import_node_path.join)(options.internalPatchesDir, patch.patchFile), [
244
+ 4,
245
+ import_fs_extra.default.copy(src, dest)
246
+ ]);
247
+ case 5:
248
+ _state.sent(), _state.label = 6;
249
+ case 6:
250
+ return _iteratorNormalCompletion = !0, [
251
+ 3,
252
+ 3
253
+ ];
254
+ case 7:
255
+ return [
256
+ 3,
257
+ 10
258
+ ];
259
+ case 8:
260
+ return err = _state.sent(), _didIteratorError = !0, _iteratorError = err, [
261
+ 3,
262
+ 10
263
+ ];
264
+ case 9:
265
+ try {
266
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
267
+ } finally {
268
+ if (_didIteratorError)
269
+ throw _iteratorError;
270
+ }
271
+ return [
272
+ 7
273
+ ];
274
+ case 10:
275
+ return didCopy && (console.info(`
276
+ Please restart after applying the patch by running "npx patch-package".
277
+ Ideally add it to your devDependencies and as a postinstall script.
278
+ `), process.exit(0)), [
279
+ 2
280
+ ];
281
+ }
282
+ });
283
+ }), _checkPatches.apply(this, arguments);
284
+ }
285
+ // Annotate the CommonJS export names for ESM import in node:
286
+ 0 && (module.exports = {
287
+ checkPatches
288
+ });
289
+ //# sourceMappingURL=patches.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/utils/Users/n8/vxrn/packages/vxrn/src/utils/patches.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA4B,0CAC5B,mBAAqB,sBACrB,kBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGpB,IAAMA,UAAU;EACd;IACEC,QAAQ;IACRC,WAAW;EACb;;AAIF,SAAsBC,aAAaC,SAAyB;SAAtCD,cAAAA,MAAAA,MAAAA,SAAAA;;SAAAA,gBAAAA;AAAAA,yBAAf,oBAAA,SAA4BC,SAAyB;QAKpDC,iBAIAC,eAYFC,SAEC,2BAAA,mBAAA,gBAAA,WAAA,OAAMC,OACHC,MAIEC,KAAAA;;;;AA3BV,iBAAIN,QAAQO,MAAMC,iBAAiB,KACjC;;eAGIP,sBAAkBQ,yBAAAA,SAAgB;YACtCC,KAAKV,QAAQW;UACf,CAAA,EAAGC,IAAI,SAACC,cAAAA;uBAAiBC,uBAAKd,QAAQW,MAAME,YAAAA;cAEtCX,gBAAgB,oBAAIa,IAAAA,GAE1B;;YAAMC,QAAQC,IACZrB,QAAQsB,QAAQ,SAACd,QAAAA;AACf,qBAAOH,gBAAgBiB,QAAO,WAAA;2BAAC,oBAAA,SAAOC,KAAAA;;;;AAChC,+BAAA;;0BAAMC,gBAAAA,QAAQC,eAAWP,uBAAKK,KAAKf,OAAMP,MAAM,CAAA;;;AAAnD,+BAAIyB,QAAA,KAAA,KACFpB,cAAcqB,IAAInB,MAAAA;;;;;gBAEtB,CAAA;gCAJsCe,KAAAA;;;;YAKxC,CAAA,CAAA;;;AAPF,iBAAA,KAAA,GAUIhB,UAAU,IAET,4BAAA,IAAA,oBAAA,IAAA,iBAAA;;;;;;;cAAA,YAAgB,qBAAGD,aAAAA,EAAAA,OAAAA,QAAAA,EAAAA;;kBAAnB,6BAAA,QAAA,UAAA,KAAA,GAAA,QAAA;;;eAAME,QAAN,MAAA,OACGC,WAAOS,uBAAKd,QAAQwB,gBAAgBpB,MAAMN,SAAS,GACnD;;YAAMsB,gBAAAA,QAAQC,WAAWhB,IAAAA;;;iBAAzB,OAAA,KAAA,IAAF;;;eACFF,UAAU,IACVsB,QAAQC,KAAM,iBAA6B,OAAbtB,MAAMP,MAAM,CAAA,GACpCS,UAAMQ,uBAAKd,QAAQ2B,oBAAoBvB,MAAMN,SAAS,GAC5D;;YAAMsB,gBAAAA,QAAQQ,KAAKtB,KAAKD,IAAAA;;;AAAxB,iBAAA,KAAA;;AANC,6CAAA;;;;;;;;;;sCAAA,oBAAA,IAAA,iBAAA;;;;;;aAAA,6BAAA,UAAA,UAAA,QAAA,UAAA,OAAA;;gBAAA;oBAAA;;;;;;AAUL,iBAAIF,YACFsB,QAAQC,KACL;;;CAAA,GAGHG,QAAQC,KAAK,CAAA;;;;;EAEjB,CAAA,GAxCsB/B,cAAAA,MAAAA,MAAAA,SAAAA;;",
5
+ "names": ["patches", "module", "patchFile", "checkPatches", "options", "nodeModulesDirs", "patchesToCopy", "didCopy", "patch", "dest", "src", "state", "applyPatches", "findNodeModules", "cwd", "root", "map", "relativePath", "join", "Set", "Promise", "all", "flatMap", "dir", "FSExtra", "pathExists", "_state", "add", "userPatchesDir", "console", "info", "internalPatchesDir", "copy", "process", "exit"]
6
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=prerender.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "mappings": "",
5
+ "names": []
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=prerender.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "mappings": "",
5
+ "names": []
6
+ }
@@ -0,0 +1,34 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
10
+ for (let key of __getOwnPropNames(from))
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
+ var createExpoServer_exports = {};
16
+ __export(createExpoServer_exports, {
17
+ createExpoServer: () => createExpoServer,
18
+ getRoutePaths: () => getRoutePaths
19
+ });
20
+ module.exports = __toCommonJS(createExpoServer_exports);
21
+ var import_glob = require("glob"), import_node_path = require("node:path"), import_routes_manifest = require("@vxrn/expo-router/routes-manifest");
22
+ function createExpoServer(root, app) {
23
+ const routePaths = getRoutePaths((0, import_node_path.join)(root, "app")), manifest = (0, import_routes_manifest.createRoutesManifest)(routePaths);
24
+ console.info("manifest", manifest);
25
+ }
26
+ function getRoutePaths(cwd) {
27
+ return (0, import_glob.sync)("**/*.@(ts|tsx|js|jsx)", {
28
+ cwd
29
+ }).map((p) => "./" + normalizePaths(p));
30
+ }
31
+ function normalizePaths(p) {
32
+ return p.replace(/\\/g, "/");
33
+ }
34
+ //# sourceMappingURL=createExpoServer.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/vendor/createExpoServer.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC,iBAEjC,mBAAqB,sBAErB,yBAAqC;AAI9B,SAAS,iBAAiB,MAAc,KAAU;AACvD,QAAM,aAAa,kBAAc,uBAAK,MAAM,KAAK,CAAC,GAC5C,eAAW,6CAAqB,UAAU;AAChD,UAAQ,KAAK,YAAY,QAAQ;AAInC;AAGO,SAAS,cAAc,KAAa;AACzC,aAAO,YAAAA,MAAS,yBAAyB;AAAA,IACvC;AAAA,EACF,CAAC,EAAE,IAAI,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AACxC;AAEA,SAAS,eAAe,GAAW;AACjC,SAAO,EAAE,QAAQ,OAAO,GAAG;AAC7B;",
5
+ "names": ["globSync"]
6
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
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)
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);
16
+ var createExpoServer_exports = {};
17
+ __export(createExpoServer_exports, {
18
+ createExpoServer: () => createExpoServer,
19
+ getRoutePaths: () => getRoutePaths
20
+ });
21
+ module.exports = __toCommonJS(createExpoServer_exports);
22
+ var import_glob = require("glob"), import_node_path = require("node:path"), import_routes_manifest = require("@vxrn/expo-router/routes-manifest");
23
+ function createExpoServer(root, app) {
24
+ var routePaths = getRoutePaths((0, import_node_path.join)(root, "app")), manifest = (0, import_routes_manifest.createRoutesManifest)(routePaths);
25
+ console.info("manifest", manifest);
26
+ }
27
+ function getRoutePaths(cwd) {
28
+ return (0, import_glob.sync)("**/*.@(ts|tsx|js|jsx)", {
29
+ cwd
30
+ }).map(function(p) {
31
+ return "./" + normalizePaths(p);
32
+ });
33
+ }
34
+ function normalizePaths(p) {
35
+ return p.replace(/\\/g, "/");
36
+ }
37
+ // Annotate the CommonJS export names for ESM import in node:
38
+ 0 && (module.exports = {
39
+ createExpoServer,
40
+ getRoutePaths
41
+ });
42
+ //# sourceMappingURL=createExpoServer.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/vendor/Users/n8/vxrn/packages/vxrn/src/vendor/createExpoServer.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;kBAAiC,iBAEjC,mBAAqB,sBAErB,yBAAqC;AAI9B,SAASA,iBAAiBC,MAAcC,KAAQ;AACrD,MAAMC,aAAaC,kBAAcC,uBAAKJ,MAAM,KAAA,CAAA,GACtCK,eAAWC,6CAAqBJ,UAAAA;AACtCK,UAAQC,KAAK,YAAYH,QAAAA;AAI3B;AAGO,SAASF,cAAcM,KAAW;AACvC,aAAOC,YAAAA,MAAS,yBAAyB;IACvCD;EACF,CAAA,EAAGE,IAAI,SAACC,GAAAA;WAAM,OAAOC,eAAeD,CAAAA;;AACtC;AAEA,SAASC,eAAeD,GAAS;AAC/B,SAAOA,EAAEE,QAAQ,OAAO,GAAA;AAC1B;",
5
+ "names": ["createExpoServer", "root", "app", "routePaths", "getRoutePaths", "join", "manifest", "createRoutesManifest", "console", "info", "cwd", "globSync", "map", "p", "normalizePaths", "replace"]
6
+ }
package/dist/esm/cli.js CHANGED
@@ -1,12 +1,67 @@
1
+ import { readVXRNConfig } from "./utils/readVXRNConfig";
1
2
  import { defineCommand, runMain } from "citty";
2
- import { commands } from "./commands";
3
- const main = defineCommand({
3
+ const dev = defineCommand({
4
+ meta: {
5
+ name: "dev",
6
+ version: "0.0.0",
7
+ description: "Start the dev server"
8
+ },
9
+ args: {},
10
+ async run({ args }) {
11
+ const userConfig = await readVXRNConfig(), { dev: dev2 } = await import(
12
+ // @ts-expect-error
13
+ "./exports/dev.mjs"
14
+ ), { start, stop } = await dev2({
15
+ root: process.cwd(),
16
+ host: "127.0.0.1",
17
+ webConfig: {
18
+ plugins: []
19
+ },
20
+ buildConfig: {
21
+ plugins: []
22
+ },
23
+ flow: {
24
+ include: [],
25
+ exclude: []
26
+ },
27
+ ...userConfig
28
+ }), { closePromise } = await start();
29
+ process.on("beforeExit", () => {
30
+ stop();
31
+ }), process.on("SIGINT", () => {
32
+ stop();
33
+ }), process.on("uncaughtException", (err) => {
34
+ console.error(err?.message || err);
35
+ }), await closePromise;
36
+ }
37
+ }), build = defineCommand({
38
+ meta: {
39
+ name: "build",
40
+ version: "0.0.0",
41
+ description: "Build your app"
42
+ },
43
+ args: {},
44
+ async run({ args }) {
45
+ const userConfig = await readVXRNConfig(), { build: build2 } = await import(
46
+ // @ts-expect-error
47
+ "./exports/build.mjs"
48
+ );
49
+ process.on("uncaughtException", (err) => {
50
+ console.error(err?.message || err);
51
+ });
52
+ const results = await build2(userConfig);
53
+ process.env.DEBUG && console.info("results", results);
54
+ }
55
+ }), main = defineCommand({
4
56
  meta: {
5
57
  name: "main",
6
58
  version: "0.0.0",
7
59
  description: "Welcome to vxrn"
8
60
  },
9
- subCommands: commands
61
+ subCommands: {
62
+ dev,
63
+ build
64
+ }
10
65
  });
11
66
  runMain(main);
12
67
  //# sourceMappingURL=cli.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/cli.ts"],
4
- "mappings": "AAAA,SAAS,eAAe,eAAe;AACvC,SAAS,gBAAgB;AAEzB,MAAM,OAAO,cAAc;AAAA,EACzB,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,aAAa;AACf,CAAC;AAED,QAAQ,IAAI;",
5
- "names": []
4
+ "mappings": "AAAA,SAAS,sBAAsB;AAC/B,SAAS,eAAe,eAAe;AAEvC,MAAM,MAAM,cAAc;AAAA,EACxB,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,MAAM,CAAC;AAAA,EACP,MAAM,IAAI,EAAE,KAAK,GAAG;AAClB,UAAM,aAAa,MAAM,eAAe,GAClC,EAAE,KAAAA,KAAI,IAAI,MAAM;AAAA;AAAA,MAEpB;AAAA,IACF,GACM,EAAE,OAAO,KAAK,IAAI,MAAMA,KAAI;AAAA,MAChC,MAAM,QAAQ,IAAI;AAAA,MAClB,MAAM;AAAA,MACN,WAAW;AAAA,QACT,SAAS,CAAC;AAAA,MACZ;AAAA,MACA,aAAa;AAAA,QACX,SAAS,CAAC;AAAA,MACZ;AAAA,MACA,MAAM;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,SAAS,CAAC;AAAA,MACZ;AAAA,MACA,GAAG;AAAA,IACL,CAAC,GAEK,EAAE,aAAa,IAAI,MAAM,MAAM;AAErC,YAAQ,GAAG,cAAc,MAAM;AAC7B,WAAK;AAAA,IACP,CAAC,GAED,QAAQ,GAAG,UAAU,MAAM;AACzB,WAAK;AAAA,IACP,CAAC,GAED,QAAQ,GAAG,qBAAqB,CAAC,QAAQ;AACvC,cAAQ,MAAM,KAAK,WAAW,GAAG;AAAA,IACnC,CAAC,GAED,MAAM;AAAA,EACR;AACF,CAAC,GAEK,QAAQ,cAAc;AAAA,EAC1B,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,MAAM,CAAC;AAAA,EACP,MAAM,IAAI,EAAE,KAAK,GAAG;AAClB,UAAM,aAAa,MAAM,eAAe,GAClC,EAAE,OAAAC,OAAM,IAAI,MAAM;AAAA;AAAA,MAEtB;AAAA,IACF;AAEA,YAAQ,GAAG,qBAAqB,CAAC,QAAQ;AACvC,cAAQ,MAAM,KAAK,WAAW,GAAG;AAAA,IACnC,CAAC;AAED,UAAM,UAAU,MAAMA,OAAM,UAAU;AAEtC,IAAI,QAAQ,IAAI,SACd,QAAQ,KAAK,WAAW,OAAO;AAAA,EAEnC;AACF,CAAC,GAEK,OAAO,cAAc;AAAA,EACzB,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,aAAa;AAAA,IACX;AAAA,IACA;AAAA,EACF;AACF,CAAC;AAED,QAAQ,IAAI;",
5
+ "names": ["dev", "build"]
6
6
  }
package/dist/esm/cli.mjs CHANGED
@@ -1,11 +1,83 @@
1
+ import { readVXRNConfig } from "./utils/readVXRNConfig.mjs";
1
2
  import { defineCommand, runMain } from "citty";
2
- import { commands } from "./commands/index.mjs";
3
- const main = defineCommand({
4
- meta: {
5
- name: "main",
6
- version: "0.0.0",
7
- description: "Welcome to vxrn"
8
- },
9
- subCommands: commands
10
- });
3
+ const dev = defineCommand({
4
+ meta: {
5
+ name: "dev",
6
+ version: "0.0.0",
7
+ description: "Start the dev server"
8
+ },
9
+ args: {},
10
+ async run({
11
+ args
12
+ }) {
13
+ const userConfig = await readVXRNConfig(),
14
+ {
15
+ dev: dev2
16
+ } = await import(
17
+ // @ts-expect-error
18
+ "./exports/dev.mjs"),
19
+ {
20
+ start,
21
+ stop
22
+ } = await dev2({
23
+ root: process.cwd(),
24
+ host: "127.0.0.1",
25
+ webConfig: {
26
+ plugins: []
27
+ },
28
+ buildConfig: {
29
+ plugins: []
30
+ },
31
+ flow: {
32
+ include: [],
33
+ exclude: []
34
+ },
35
+ ...userConfig
36
+ }),
37
+ {
38
+ closePromise
39
+ } = await start();
40
+ process.on("beforeExit", () => {
41
+ stop();
42
+ }), process.on("SIGINT", () => {
43
+ stop();
44
+ }), process.on("uncaughtException", err => {
45
+ console.error(err?.message || err);
46
+ }), await closePromise;
47
+ }
48
+ }),
49
+ build = defineCommand({
50
+ meta: {
51
+ name: "build",
52
+ version: "0.0.0",
53
+ description: "Build your app"
54
+ },
55
+ args: {},
56
+ async run({
57
+ args
58
+ }) {
59
+ const userConfig = await readVXRNConfig(),
60
+ {
61
+ build: build2
62
+ } = await import(
63
+ // @ts-expect-error
64
+ "./exports/build.mjs");
65
+ process.on("uncaughtException", err => {
66
+ console.error(err?.message || err);
67
+ });
68
+ const results = await build2(userConfig);
69
+ process.env.DEBUG && console.info("results", results);
70
+ }
71
+ }),
72
+ main = defineCommand({
73
+ meta: {
74
+ name: "main",
75
+ version: "0.0.0",
76
+ description: "Welcome to vxrn"
77
+ },
78
+ subCommands: {
79
+ dev,
80
+ build
81
+ }
82
+ });
11
83
  runMain(main);