vxrn 2.13.7 → 2.13.9
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.
- package/dist/cli.mjs +3 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/cli.native.js +5 -2
- package/dist/cli.native.js.map +1 -1
- package/dist/config/getBaseViteConfigOnly.mjs +3 -3
- package/dist/config/getBaseViteConfigOnly.mjs.map +1 -1
- package/dist/config/getBaseViteConfigOnly.native.js +3 -3
- package/dist/config/getBaseViteConfigOnly.native.js.map +1 -1
- package/dist/config/getOptionsFilled.mjs +24 -2
- package/dist/config/getOptionsFilled.mjs.map +1 -1
- package/dist/config/getOptionsFilled.native.js +25 -2
- package/dist/config/getOptionsFilled.native.js.map +1 -1
- package/dist/config/getServerOptionsFilled.mjs +119 -1
- package/dist/config/getServerOptionsFilled.mjs.map +1 -1
- package/dist/config/getServerOptionsFilled.native.js +137 -1
- package/dist/config/getServerOptionsFilled.native.js.map +1 -1
- package/dist/exports/build.mjs +6 -9
- package/dist/exports/build.mjs.map +1 -1
- package/dist/exports/build.native.js +6 -9
- package/dist/exports/build.native.js.map +1 -1
- package/dist/exports/dev.mjs +4 -6
- package/dist/exports/dev.mjs.map +1 -1
- package/dist/exports/dev.native.js +6 -6
- package/dist/exports/dev.native.js.map +1 -1
- package/dist/exports/prebuild.mjs +4 -4
- package/dist/exports/prebuild.mjs.map +1 -1
- package/dist/exports/prebuild.native.js +4 -4
- package/dist/exports/prebuild.native.js.map +1 -1
- package/dist/exports/prebuildWithoutExpo.mjs +95 -88
- package/dist/exports/prebuildWithoutExpo.mjs.map +1 -1
- package/dist/exports/prebuildWithoutExpo.native.js +95 -88
- package/dist/exports/prebuildWithoutExpo.native.js.map +1 -1
- package/dist/plugins/autoDepOptimizePlugin.mjs +3 -3
- package/dist/plugins/autoDepOptimizePlugin.mjs.map +1 -1
- package/dist/plugins/autoDepOptimizePlugin.native.js +3 -3
- package/dist/plugins/autoDepOptimizePlugin.native.js.map +1 -1
- package/dist/plugins/reactNativeDevAssetPlugin.mjs +4 -4
- package/dist/plugins/reactNativeDevAssetPlugin.mjs.map +1 -1
- package/dist/plugins/reactNativeDevAssetPlugin.native.js +4 -4
- package/dist/plugins/reactNativeDevAssetPlugin.native.js.map +1 -1
- package/dist/rn-commands/bundle/buildBundle.mjs +18 -5
- package/dist/rn-commands/bundle/buildBundle.mjs.map +1 -1
- package/dist/rn-commands/bundle/buildBundle.native.js +18 -5
- package/dist/rn-commands/bundle/buildBundle.native.js.map +1 -1
- package/dist/user-interface/index.mjs +1 -1
- package/dist/user-interface/index.mjs.map +1 -1
- package/dist/user-interface/index.native.js +1 -1
- package/dist/user-interface/index.native.js.map +1 -1
- package/dist/utils/env-editor.mjs +198 -0
- package/dist/utils/env-editor.mjs.map +1 -0
- package/dist/utils/env-editor.native.js +266 -0
- package/dist/utils/env-editor.native.js.map +1 -0
- package/dist/utils/fs.mjs +48 -0
- package/dist/utils/fs.mjs.map +1 -0
- package/dist/utils/fs.native.js +48 -0
- package/dist/utils/fs.native.js.map +1 -0
- package/dist/utils/getVitePath.mjs +2 -2
- package/dist/utils/getVitePath.mjs.map +1 -1
- package/dist/utils/getVitePath.native.js +2 -2
- package/dist/utils/getVitePath.native.js.map +1 -1
- package/dist/utils/patches.mjs +38 -29
- package/dist/utils/patches.mjs.map +1 -1
- package/dist/utils/patches.native.js +38 -29
- package/dist/utils/patches.native.js.map +1 -1
- package/dist/utils/scanDepsToOptimize.mjs +12 -11
- package/dist/utils/scanDepsToOptimize.mjs.map +1 -1
- package/dist/utils/scanDepsToOptimize.native.js +12 -11
- package/dist/utils/scanDepsToOptimize.native.js.map +1 -1
- package/dist/utils/state.mjs +5 -5
- package/dist/utils/state.mjs.map +1 -1
- package/dist/utils/state.native.js +5 -5
- package/dist/utils/state.native.js.map +1 -1
- package/dist/utils/utils.mjs +4 -3
- package/dist/utils/utils.mjs.map +1 -1
- package/dist/utils/utils.native.js +4 -3
- package/dist/utils/utils.native.js.map +1 -1
- package/package.json +12 -18
- package/src/cli.ts +5 -4
- package/src/config/getBaseViteConfigOnly.ts +3 -3
- package/src/config/getOptionsFilled.ts +35 -2
- package/src/config/getServerOptionsFilled.test.ts +37 -0
- package/src/config/getServerOptionsFilled.ts +57 -1
- package/src/exports/build.ts +5 -12
- package/src/exports/clean.test.ts +1 -1
- package/src/exports/dev.ts +5 -6
- package/src/exports/prebuild.ts +4 -4
- package/src/exports/prebuildWithoutExpo.ts +102 -89
- package/src/plugins/autoDepOptimizePlugin.ts +3 -3
- package/src/plugins/reactNativeDevAssetPlugin.ts +4 -4
- package/src/rn-commands/bundle/buildBundle.ts +15 -5
- package/src/user-interface/index.ts +1 -1
- package/src/utils/env-editor.LICENSE +9 -0
- package/src/utils/env-editor.ts +214 -0
- package/src/utils/fs.ts +59 -0
- package/src/utils/getVitePath.ts +2 -2
- package/src/utils/patches.test.ts +36 -36
- package/src/utils/patches.ts +39 -27
- package/src/utils/scanDepsToOptimize.test.ts +2 -2
- package/src/utils/scanDepsToOptimize.ts +6 -5
- package/src/utils/state.ts +5 -7
- package/src/utils/utils.ts +5 -5
- package/types/config/getOptionsFilled.d.ts +9 -2
- package/types/config/getOptionsFilled.d.ts.map +1 -1
- package/types/config/getServerOptionsFilled.d.ts.map +1 -1
- package/types/exports/build.d.ts +1 -1
- package/types/exports/build.d.ts.map +1 -1
- package/types/exports/dev.d.ts.map +1 -1
- package/types/exports/prebuildWithoutExpo.d.ts.map +1 -1
- package/types/rn-commands/bundle/buildBundle.d.ts.map +1 -1
- package/types/user-interface/index.d.ts.map +1 -1
- package/types/utils/env-editor.d.ts +9 -0
- package/types/utils/env-editor.d.ts.map +1 -0
- package/types/utils/fs.d.ts +9 -0
- package/types/utils/fs.d.ts.map +1 -0
- package/types/utils/patches.d.ts.map +1 -1
- package/types/utils/scanDepsToOptimize.d.ts.map +1 -1
- package/types/utils/state.d.ts.map +1 -1
- package/types/utils/utils.d.ts +2 -2
- package/types/utils/utils.d.ts.map +1 -1
package/src/utils/patches.ts
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
import { transformSWC } from '@vxrn/compiler'
|
|
2
2
|
import { transformFlowBabel } from '@vxrn/vite-flow'
|
|
3
3
|
import Glob from 'fast-glob'
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { join } from 'node:path'
|
|
8
|
-
import { rename } from 'node:fs/promises'
|
|
4
|
+
import { existsSync, realpathSync } from 'node:fs'
|
|
5
|
+
import { dirname, join, resolve } from 'node:path'
|
|
6
|
+
import { readFile, rename, stat, writeFile } from 'node:fs/promises'
|
|
9
7
|
import semver from 'semver'
|
|
10
8
|
import type { VXRNOptionsFilled } from '../config/getOptionsFilled'
|
|
11
9
|
import { builtInDepPatches } from '../patches/builtInDepPatches'
|
|
10
|
+
import { readJSON, writeJSON } from './fs'
|
|
12
11
|
import { globDir } from './globDir'
|
|
13
12
|
|
|
13
|
+
// every node_modules dir from root up to the filesystem root,
|
|
14
|
+
// matching the find-node-modules lookup this replaces
|
|
15
|
+
function findNodeModulesDirs(root: string): string[] {
|
|
16
|
+
const dirs: string[] = []
|
|
17
|
+
let dir = resolve(root)
|
|
18
|
+
for (;;) {
|
|
19
|
+
const candidate = join(dir, 'node_modules')
|
|
20
|
+
if (existsSync(candidate)) dirs.push(candidate)
|
|
21
|
+
const parent = dirname(dir)
|
|
22
|
+
if (parent === dir) return dirs
|
|
23
|
+
dir = parent
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
14
27
|
type Strategies = 'swc' | 'flow' | 'jsx'
|
|
15
28
|
|
|
16
29
|
export type DepFileStrategy =
|
|
@@ -83,14 +96,14 @@ function getOriginalPath(fullPath: string) {
|
|
|
83
96
|
|
|
84
97
|
async function readPatchStats(nodeModulesDir: string): Promise<PatchStats> {
|
|
85
98
|
try {
|
|
86
|
-
return await
|
|
99
|
+
return await readJSON(join(nodeModulesDir, STATS_FILE))
|
|
87
100
|
} catch {
|
|
88
101
|
return {}
|
|
89
102
|
}
|
|
90
103
|
}
|
|
91
104
|
|
|
92
105
|
async function writePatchStats(nodeModulesDir: string, stats: PatchStats) {
|
|
93
|
-
await
|
|
106
|
+
await writeJSON(join(nodeModulesDir, STATS_FILE), stats)
|
|
94
107
|
}
|
|
95
108
|
|
|
96
109
|
type PatchResult = 'applied' | 'ok' | 'skipped'
|
|
@@ -111,16 +124,15 @@ export async function applyDependencyPatches(
|
|
|
111
124
|
// collect unique module names for pnpm store globbing
|
|
112
125
|
const patchModuleNames = [...new Set(patches.map((p) => p.module))]
|
|
113
126
|
|
|
114
|
-
const nodeModulesDirs =
|
|
115
|
-
const dir = join(root, relativePath)
|
|
127
|
+
const nodeModulesDirs = findNodeModulesDirs(root).flatMap((dir) => {
|
|
116
128
|
const dirs = [dir]
|
|
117
129
|
|
|
118
130
|
const pnpmBase = join(dir, '.pnpm')
|
|
119
|
-
if (!
|
|
131
|
+
if (!existsSync(pnpmBase)) return dirs
|
|
120
132
|
|
|
121
133
|
// pnpm hoists transitive deps into .pnpm/node_modules/ (symlinks to store)
|
|
122
134
|
const pnpmHoistedDir = join(pnpmBase, 'node_modules')
|
|
123
|
-
if (
|
|
135
|
+
if (existsSync(pnpmHoistedDir)) {
|
|
124
136
|
dirs.push(pnpmHoistedDir)
|
|
125
137
|
}
|
|
126
138
|
|
|
@@ -159,7 +171,7 @@ export async function applyDependencyPatches(
|
|
|
159
171
|
try {
|
|
160
172
|
const nodeModuleDir = join(nodeModulesDir, patch.module)
|
|
161
173
|
|
|
162
|
-
if (!
|
|
174
|
+
if (!existsSync(nodeModuleDir)) return
|
|
163
175
|
|
|
164
176
|
// deduplicate by real path to avoid patching the same files twice
|
|
165
177
|
// (multiple symlinks/paths can resolve to the same pnpm store entry)
|
|
@@ -176,7 +188,7 @@ export async function applyDependencyPatches(
|
|
|
176
188
|
|
|
177
189
|
const version = patch.patchFiles.version
|
|
178
190
|
if (typeof version === 'string') {
|
|
179
|
-
const pkgJSON = await
|
|
191
|
+
const pkgJSON = await readJSON(join(nodeModuleDir, 'package.json'))
|
|
180
192
|
if (!semver.satisfies(pkgJSON.version, version)) return
|
|
181
193
|
}
|
|
182
194
|
|
|
@@ -203,8 +215,8 @@ export async function applyDependencyPatches(
|
|
|
203
215
|
filePatches.map(async ({ relativePath }) => {
|
|
204
216
|
const fullPath = join(nodeModuleDir, relativePath)
|
|
205
217
|
try {
|
|
206
|
-
const
|
|
207
|
-
return { relativePath, fullPath, stat, exists: true }
|
|
218
|
+
const fileStat = await stat(fullPath)
|
|
219
|
+
return { relativePath, fullPath, stat: fileStat, exists: true }
|
|
208
220
|
} catch {
|
|
209
221
|
return { relativePath, fullPath, stat: null, exists: false }
|
|
210
222
|
}
|
|
@@ -213,15 +225,15 @@ export async function applyDependencyPatches(
|
|
|
213
225
|
|
|
214
226
|
// filter to files that need processing
|
|
215
227
|
const filesToProcess = fileStatsResults.filter(
|
|
216
|
-
({ fullPath, stat, exists }) => {
|
|
217
|
-
if (!exists || !
|
|
228
|
+
({ fullPath, stat: fileStat, exists }) => {
|
|
229
|
+
if (!exists || !fileStat) return false
|
|
218
230
|
if (process.env.VXRN_FORCE_PATCH) return true
|
|
219
231
|
|
|
220
232
|
const cached = patchStats[fullPath]
|
|
221
233
|
if (!cached) return true // never patched
|
|
222
234
|
|
|
223
235
|
// check if file changed since we patched it
|
|
224
|
-
return
|
|
236
|
+
return fileStat.size !== cached.size || fileStat.mtimeMs !== cached.mtimeMs
|
|
225
237
|
}
|
|
226
238
|
)
|
|
227
239
|
|
|
@@ -246,8 +258,8 @@ export async function applyDependencyPatches(
|
|
|
246
258
|
|
|
247
259
|
// read target and original in parallel
|
|
248
260
|
const [targetContent, originalContent] = await Promise.all([
|
|
249
|
-
|
|
250
|
-
|
|
261
|
+
readFile(fullPath, 'utf-8'),
|
|
262
|
+
readFile(originalPath, 'utf-8').catch(() => null),
|
|
251
263
|
])
|
|
252
264
|
|
|
253
265
|
// determine source content for patching
|
|
@@ -336,8 +348,8 @@ export async function applyDependencyPatches(
|
|
|
336
348
|
// check if already has this patched content
|
|
337
349
|
if (targetContent === patchedContent) {
|
|
338
350
|
// already patched, just update stats
|
|
339
|
-
const
|
|
340
|
-
patchStats[fullPath] = { size:
|
|
351
|
+
const fileStat = await stat(fullPath)
|
|
352
|
+
patchStats[fullPath] = { size: fileStat.size, mtimeMs: fileStat.mtimeMs }
|
|
341
353
|
statsChanged = true
|
|
342
354
|
return
|
|
343
355
|
}
|
|
@@ -350,8 +362,8 @@ export async function applyDependencyPatches(
|
|
|
350
362
|
])
|
|
351
363
|
|
|
352
364
|
// update stats
|
|
353
|
-
const
|
|
354
|
-
patchStats[fullPath] = { size:
|
|
365
|
+
const fileStat = await stat(fullPath)
|
|
366
|
+
patchStats[fullPath] = { size: fileStat.size, mtimeMs: fileStat.mtimeMs }
|
|
355
367
|
statsChanged = true
|
|
356
368
|
didApplyPatch = true
|
|
357
369
|
|
|
@@ -362,8 +374,8 @@ export async function applyDependencyPatches(
|
|
|
362
374
|
}
|
|
363
375
|
} else {
|
|
364
376
|
// patch made no changes, still record stats so we skip next time
|
|
365
|
-
const
|
|
366
|
-
patchStats[fullPath] = { size:
|
|
377
|
+
const fileStat = await stat(fullPath)
|
|
378
|
+
patchStats[fullPath] = { size: fileStat.size, mtimeMs: fileStat.mtimeMs }
|
|
367
379
|
statsChanged = true
|
|
368
380
|
}
|
|
369
381
|
} catch (err) {
|
|
@@ -405,6 +417,6 @@ export async function applyDependencyPatches(
|
|
|
405
417
|
|
|
406
418
|
async function atomicWriteFile(filePath: string, contents: string) {
|
|
407
419
|
const tempPath = filePath + '.vxrn.tmp.' + process.pid + '.' + Date.now()
|
|
408
|
-
await
|
|
420
|
+
await writeFile(tempPath, contents)
|
|
409
421
|
await rename(tempPath, filePath)
|
|
410
422
|
}
|
|
@@ -3,7 +3,7 @@ import { tmpdir } from 'node:os'
|
|
|
3
3
|
import { join } from 'node:path'
|
|
4
4
|
import { createServer } from 'vite'
|
|
5
5
|
import { describe, expect, test, vi } from 'vitest'
|
|
6
|
-
import
|
|
6
|
+
import * as fsUtils from './fs'
|
|
7
7
|
import {
|
|
8
8
|
findDepsToOptimize,
|
|
9
9
|
getScannedOptimizeDepsConfig,
|
|
@@ -34,7 +34,7 @@ test('shares manifest reads within a scan and refreshes them on the next scan',
|
|
|
34
34
|
dependencies: { added: '*' },
|
|
35
35
|
peerDependencies: { react: '*' },
|
|
36
36
|
})
|
|
37
|
-
const readJson = vi.spyOn(
|
|
37
|
+
const readJson = vi.spyOn(fsUtils, 'readJSON')
|
|
38
38
|
try {
|
|
39
39
|
const result = await scanDepsToOptimize(join(root, 'package.json'))
|
|
40
40
|
expect(new Set(result.prebundleDeps)).toEqual(new Set(['alpha', 'beta', 'common']))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createDebugger } from '@vxrn/debug'
|
|
2
|
-
import
|
|
2
|
+
import { realpath } from 'node:fs/promises'
|
|
3
3
|
import path, { dirname, extname, join, sep } from 'node:path'
|
|
4
|
+
import { pathExists, readJSON } from './fs'
|
|
4
5
|
|
|
5
6
|
const { debug, debugDetails } = createDebugger(`vxrn:scanDepsToOptimize`)
|
|
6
7
|
|
|
@@ -165,9 +166,9 @@ export async function scanDepsToOptimize(
|
|
|
165
166
|
): Promise<ScanDepsResult> {
|
|
166
167
|
// share leaf reads only: sharing recursive promises can deadlock sibling cycles.
|
|
167
168
|
return scanDeps(packageJsonPath, options, {
|
|
168
|
-
pathExists: memoizeRead((file) =>
|
|
169
|
-
realpath: memoizeRead((file) =>
|
|
170
|
-
readJson: memoizeRead((file) =>
|
|
169
|
+
pathExists: memoizeRead((file) => pathExists(file)),
|
|
170
|
+
realpath: memoizeRead((file) => realpath(file)),
|
|
171
|
+
readJson: memoizeRead((file) => readJSON(file)),
|
|
171
172
|
})
|
|
172
173
|
}
|
|
173
174
|
|
|
@@ -472,7 +473,7 @@ async function resolveDepPkgJsonPath(
|
|
|
472
473
|
}
|
|
473
474
|
|
|
474
475
|
export async function findDepPkgJsonPath(dep, dependent) {
|
|
475
|
-
return findDepPkgJsonPathWithFs(dep, dependent, (file) =>
|
|
476
|
+
return findDepPkgJsonPathWithFs(dep, dependent, (file) => pathExists(file))
|
|
476
477
|
}
|
|
477
478
|
|
|
478
479
|
async function findDepPkgJsonPathWithFs(
|
package/src/utils/state.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import FSExtra from 'fs-extra'
|
|
2
1
|
import { randomUUID } from 'node:crypto'
|
|
3
|
-
import { rename, rm } from 'node:fs/promises'
|
|
2
|
+
import { mkdir, rename, rm } from 'node:fs/promises'
|
|
4
3
|
import { join } from 'node:path'
|
|
4
|
+
import { pathExists, readJSON, writeJSON } from './fs'
|
|
5
5
|
|
|
6
6
|
type State = {
|
|
7
7
|
versionHash?: string
|
|
@@ -10,9 +10,7 @@ type State = {
|
|
|
10
10
|
export async function readState(cacheDir: string) {
|
|
11
11
|
const statePath = join(cacheDir, 'state.json')
|
|
12
12
|
try {
|
|
13
|
-
const state: State = (await
|
|
14
|
-
? await FSExtra.readJSON(statePath)
|
|
15
|
-
: {}
|
|
13
|
+
const state: State = (await pathExists(statePath)) ? await readJSON(statePath) : {}
|
|
16
14
|
return state
|
|
17
15
|
} catch {
|
|
18
16
|
// recover from errors
|
|
@@ -23,9 +21,9 @@ export async function readState(cacheDir: string) {
|
|
|
23
21
|
export async function writeState(cacheDir: string, state: State) {
|
|
24
22
|
const statePath = join(cacheDir, 'state.json')
|
|
25
23
|
const pendingStatePath = `${statePath}.${process.pid}.${randomUUID()}.tmp`
|
|
26
|
-
await
|
|
24
|
+
await mkdir(cacheDir, { recursive: true })
|
|
27
25
|
try {
|
|
28
|
-
await
|
|
26
|
+
await writeJSON(pendingStatePath, state)
|
|
29
27
|
await rename(pendingStatePath, statePath)
|
|
30
28
|
} finally {
|
|
31
29
|
await rm(pendingStatePath, { force: true })
|
package/src/utils/utils.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import
|
|
1
|
+
import { type Stats, statSync } from 'node:fs'
|
|
2
|
+
import { readFile } from 'node:fs/promises'
|
|
3
3
|
import path from 'node:path'
|
|
4
4
|
import { createHash } from 'node:crypto'
|
|
5
5
|
|
|
6
|
-
export function tryStatSync(file: string):
|
|
6
|
+
export function tryStatSync(file: string): Stats | undefined {
|
|
7
7
|
try {
|
|
8
8
|
// The "throwIfNoEntry" is a performance optimization for cases where the file does not exist
|
|
9
|
-
return
|
|
9
|
+
return statSync(file, { throwIfNoEntry: false })
|
|
10
10
|
} catch {}
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -36,6 +36,6 @@ export function getHash(text: Buffer | string, length = 8): string {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export async function getFileHash(path: string) {
|
|
39
|
-
const content = await
|
|
39
|
+
const content = await readFile(path, 'utf-8')
|
|
40
40
|
return getHash(content)
|
|
41
41
|
}
|
|
@@ -27,6 +27,13 @@ import type { Mode, VXRNOptions } from '../types';
|
|
|
27
27
|
* * Over time, we can progressively eliminate dependencies on
|
|
28
28
|
* `VXRNOptionsFilled` across the codebase.
|
|
29
29
|
*/
|
|
30
|
+
export type PackageJSON = {
|
|
31
|
+
name?: string;
|
|
32
|
+
version?: string;
|
|
33
|
+
dependencies?: Record<string, string>;
|
|
34
|
+
devDependencies?: Record<string, string>;
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
};
|
|
30
37
|
export type VXRNOptionsFilled = Awaited<ReturnType<typeof fillOptions>>;
|
|
31
38
|
export declare function fillOptions(options: VXRNOptions, { mode }?: {
|
|
32
39
|
mode?: Mode;
|
|
@@ -51,7 +58,7 @@ export declare function fillOptions(options: VXRNOptions, { mode }?: {
|
|
|
51
58
|
native: string;
|
|
52
59
|
readonly server: './src/entry-server.tsx';
|
|
53
60
|
};
|
|
54
|
-
readonly packageJSON:
|
|
61
|
+
readonly packageJSON: PackageJSON;
|
|
55
62
|
readonly packageVersions: {
|
|
56
63
|
react: string;
|
|
57
64
|
reactNative: string;
|
|
@@ -84,7 +91,7 @@ export declare function getOptionsFilled(): {
|
|
|
84
91
|
native: string;
|
|
85
92
|
readonly server: './src/entry-server.tsx';
|
|
86
93
|
};
|
|
87
|
-
readonly packageJSON:
|
|
94
|
+
readonly packageJSON: PackageJSON;
|
|
88
95
|
readonly packageVersions: {
|
|
89
96
|
react: string;
|
|
90
97
|
reactNative: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOptionsFilled.d.ts","sourceRoot":"","sources":["../../src/config/getOptionsFilled.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getOptionsFilled.d.ts","sourceRoot":"","sources":["../../src/config/getOptionsFilled.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAOjD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAA;AAIvE,wBAAsB,WAAW,CAC/B,OAAO,EAAE,WAAW,EACpB,EAAE,IAAY,EAAE,GAAE;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAO;;;;;;;;;iBA0ClC,GAAG;iBACH,OAAO;;;;;;;;;yBAQC,wBAAwB;;;;;;;;;;;;;GAcrC;AAED,wBAAgB,gBAAgB;;;;;;;;;iBAzB1B,GAAG;iBACH,OAAO;;;;;;;;;yBAQC,wBAAwB;;;;;;;;;;;;;SAkBrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getServerOptionsFilled.d.ts","sourceRoot":"","sources":["../../src/config/getServerOptionsFilled.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"getServerOptionsFilled.d.ts","sourceRoot":"","sources":["../../src/config/getServerOptionsFilled.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AA0DzE,wBAAsB,sBAAsB,CAC1C,aAAa,EAAE,WAAW,CAAC,QAAQ,CAAC,EACpC,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,sBAAsB,CAAC,CAoDjC"}
|
package/types/exports/build.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare const build: (optionsIn: VXRNOptions, buildArgs?: BuildArgs) => P
|
|
|
26
26
|
native: string;
|
|
27
27
|
readonly server: './src/entry-server.tsx';
|
|
28
28
|
};
|
|
29
|
-
readonly packageJSON: import("
|
|
29
|
+
readonly packageJSON: import("../config/getOptionsFilled").PackageJSON;
|
|
30
30
|
readonly packageVersions: {
|
|
31
31
|
react: string;
|
|
32
32
|
reactNative: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/exports/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAkB,MAAM,UAAU,CAAA;AAaxE,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAmBtD,eAAO,MAAM,KAAK,cAAqB,WAAW,cAAa,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/exports/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAkB,MAAM,UAAU,CAAA;AAaxE,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAmBtD,eAAO,MAAM,KAAK,cAAqB,WAAW,cAAa,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgWvE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/exports/dev.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/exports/dev.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AA4E3C,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG;IACrC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,GAAG,cAAqB,UAAU;;;;;;EA4M9C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebuildWithoutExpo.d.ts","sourceRoot":"","sources":["../../src/exports/prebuildWithoutExpo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prebuildWithoutExpo.d.ts","sourceRoot":"","sources":["../../src/exports/prebuildWithoutExpo.ts"],"names":[],"mappings":"AAkBA,OAAO,EAKL,iBAAiB,EAEjB,KAAK,iBAAiB,EAEvB,MAAM,+BAA+B,CAAA;AAuEtC,YAAY,EAAE,iBAAiB,IAAI,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAE3F,eAAO,MAAM,mBAAmB,0BAAoB,CAAA;AA6EpD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAwChE;AAyJD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,WAAW,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,MAAM,CA8CrI;AAg8BD,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,EAAE,MAAM,CAAA;IACxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CACvB;AA6sBD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,QAAQ,EAAE,KAAK,GAAG,SAAS,CAAA;IAC3B,GAAG,EAAE,iBAAiB,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,GAAG,oBAAoB,CA+wBvB;AAED,eAAO,MAAM,mBAAmB,SACxB,MAAM,YACF,KAAK,GAAG,SAAS,OACtB,iBAAiB,WACd,MAAM,kBAuEf,CAAA;AAgCD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,QA6EvD;AAID,wBAAsB,qBAAqB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,iBAsDzF;AAyFD,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE;IAClD,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,iBAAiB,CAAA;IACtB,SAAS,EAAE,SAAS,yBAAyB,EAAE,CAAA;CAChD,GAAG,IAAI,CA8BP;AAID,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,yBAAyB,EAAE,CAAC,CA+BtC;AAKD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAAA;CACtC,GAAG,IAAI,CAaP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildBundle.d.ts","sourceRoot":"","sources":["../../../src/rn-commands/bundle/buildBundle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildBundle.d.ts","sourceRoot":"","sources":["../../../src/rn-commands/bundle/buildBundle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAQ5E,YAAY,EAAE,iBAAiB,EAAE,CAAA;AAEjC,wBAAsB,WAAW,CAC/B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EACpB,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,iBAAiB,EACvB,UAAU,GAAE,GAAU,GACrB,OAAO,CAAC,IAAI,CAAC,CAqHf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/user-interface/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/user-interface/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AAIzC,KAAK,OAAO,GAAG;IACb,MAAM,EAAE,aAAa,CAAA;CACtB,CAAA;AAiHD,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,OAAO,iBAOxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-editor.d.ts","sourceRoot":"","sources":["../../src/utils/env-editor.ts"],"names":[],"mappings":"AAqMA,wBAAgB,aAAa;;;;;;;EAgB5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function pathExists(path: string): Promise<boolean>;
|
|
2
|
+
export declare function readJSON<T = any>(path: string): Promise<T>;
|
|
3
|
+
export declare function readJSONSync<T = any>(path: string): T;
|
|
4
|
+
export declare function writeJSON(path: string, data: unknown): Promise<void>;
|
|
5
|
+
export declare function outputJSON(path: string, data: unknown): Promise<void>;
|
|
6
|
+
export declare function outputFileSync(path: string, data: string | Uint8Array, options?: {
|
|
7
|
+
encoding?: BufferEncoding;
|
|
8
|
+
}): void;
|
|
9
|
+
//# sourceMappingURL=fs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/utils/fs.ts"],"names":[],"mappings":"AAQA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO/D;AAeD,wBAAsB,QAAQ,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAEhE;AAED,wBAAgB,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAErD;AAMD,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1E;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAG3E;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,UAAU,EACzB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,cAAc,CAAA;CAAE,GACtC,IAAI,CAGN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patches.d.ts","sourceRoot":"","sources":["../../src/utils/patches.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"patches.d.ts","sourceRoot":"","sources":["../../src/utils/patches.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAmBnE,KAAK,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAA;AAExC,MAAM,MAAM,eAAe,GACvB,CAAC,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC,GAC/D,MAAM,GACN,UAAU,EAAE,CAAA;AAEhB,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG;QACjC,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAA;KAC/B,CAAA;CACF,CAAA;AAID,wBAAgB,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,QAInD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAI5D;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAA;AAEzE,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,EACxC,YAAY,CAAC,EAAE,oBAAoB,iBA2BpC;AAyBD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,QAAQ,EAAE,EACnB,EAAE,IAAoB,EAAE,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,iBAsSjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanDepsToOptimize.d.ts","sourceRoot":"","sources":["../../src/utils/scanDepsToOptimize.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scanDepsToOptimize.d.ts","sourceRoot":"","sources":["../../src/utils/scanDepsToOptimize.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,aAAa,EAAE,OAAO,CAAA;IACtB,aAAa,EAAE,OAAO,CAAA;CACvB,CAAA;AAsBD,6EAA6E;AAC7E,eAAO,MAAM,YAAY,UAkFxB,CAAA;AAED,eAAO,MAAM,gBAAgB,aAAwB,CAAA;AAErD,eAAO,MAAM,YAAY,UAKxB,CAAA;AAED,eAAO,MAAM,gBAAgB,aAAwB,CAAA;AAErD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,wBAAsB,kBAAkB,CACtC,eAAe,EAAE,MAAM,EACvB,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,KAAK,OAAO,CAAA;IAC1C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IACrC,8HAA8H;IAC9H,cAAc,CAAC,EAAE,GAAG,CAAA;CAChB,GACL,OAAO,CAAC,cAAc,CAAC,CAOzB;AA8SD,wBAAsB,kBAAkB,CAAC,GAAG,KAAA,EAAE,SAAS,KAAA,+BAEtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/utils/state.ts"],"names":[],"mappings":"AAKA,KAAK,KAAK,GAAG;IACX,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/utils/state.ts"],"names":[],"mappings":"AAKA,KAAK,KAAK,GAAG;IACX,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,kBAS/C;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,iBAU9D"}
|
package/types/utils/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare function tryStatSync(file: string):
|
|
1
|
+
import { type Stats } from 'node:fs';
|
|
2
|
+
export declare function tryStatSync(file: string): Stats | undefined;
|
|
3
3
|
export declare function lookupFile(dir: string, fileNames: string[]): Promise<string | undefined>;
|
|
4
4
|
export declare function getHash(text: Buffer | string, length?: number): string;
|
|
5
5
|
export declare function getFileHash(path: string): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAY,MAAM,SAAS,CAAA;AAK9C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAK3D;AAED,wBAAsB,UAAU,CAC9B,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EAAE,GAClB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAW7B;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAOjE;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,mBAG7C"}
|