peachsim 0.1.926 → 0.1.928
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/cli/commands/control.ts +4 -26
- package/cli/commands/detect.ts +80 -63
- package/cli/commands/nodeRepoFileReader.ts +22 -0
- package/cli/commands/repoFileReaderContract.ts +8 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +1 -1
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +1 -1
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +42 -21
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +413 -573
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/src/vite-plugin.ts +1 -1
package/cli/commands/control.ts
CHANGED
|
@@ -37,7 +37,6 @@ import {
|
|
|
37
37
|
runtimeDir,
|
|
38
38
|
} from '../../src/home-paths'
|
|
39
39
|
import { applyHotMode } from '../../src/native-dev-bundle-url'
|
|
40
|
-
import { readNativeFirebaseConfig } from '../../src/native-firebase-config'
|
|
41
40
|
import { ensureProfile } from '../../src/profiles'
|
|
42
41
|
import { rnxPublicBrand } from '../../src/public-brand'
|
|
43
42
|
import {
|
|
@@ -874,26 +873,6 @@ async function stampAppSplash(
|
|
|
874
873
|
}
|
|
875
874
|
}
|
|
876
875
|
|
|
877
|
-
function stampNativeFirebaseConfig(
|
|
878
|
-
urlStr: string,
|
|
879
|
-
project?: ResolvedAppProject | null,
|
|
880
|
-
): string {
|
|
881
|
-
const url = new URL(urlStr)
|
|
882
|
-
if (!url.searchParams.get('bundle') || !project) return urlStr
|
|
883
|
-
try {
|
|
884
|
-
url.searchParams.set(
|
|
885
|
-
'nativeFirebase',
|
|
886
|
-
JSON.stringify(readNativeFirebaseConfig(project.appDir)),
|
|
887
|
-
)
|
|
888
|
-
} catch (error) {
|
|
889
|
-
url.searchParams.set(
|
|
890
|
-
'nativeFirebase',
|
|
891
|
-
JSON.stringify({ error: error instanceof Error ? error.message : String(error) }),
|
|
892
|
-
)
|
|
893
|
-
}
|
|
894
|
-
return url.toString()
|
|
895
|
-
}
|
|
896
|
-
|
|
897
876
|
// stamp the engine page url with `?appCatalog=` so an app's asset-catalog
|
|
898
877
|
// colors and its declared accent reach the tenant, which applies them to the
|
|
899
878
|
// bundle this url opens. the catalog lives in the native binary, never in
|
|
@@ -1002,14 +981,13 @@ export async function buildShellUrl(
|
|
|
1002
981
|
const project =
|
|
1003
982
|
opts.project ?? (await resolveAppProjectForBundleUrl(bundleUrlOf(resolved)))
|
|
1004
983
|
const expoRoot = project?.appDir ?? null
|
|
1005
|
-
const stamped =
|
|
1006
|
-
|
|
1007
|
-
await stampAppSplash(await stampAppFonts(resolved, project), project),
|
|
1008
|
-
project,
|
|
1009
|
-
),
|
|
984
|
+
const stamped = stampAppCatalog(
|
|
985
|
+
await stampAppSplash(await stampAppFonts(resolved, project), project),
|
|
1010
986
|
project,
|
|
1011
987
|
)
|
|
1012
988
|
const expoStamped = new URL(stamped)
|
|
989
|
+
// the installed app's Metro server owns dynamic Expo config for live boots.
|
|
990
|
+
expoStamped.searchParams.delete('nativeFirebase')
|
|
1013
991
|
if (opts.bundleOriginOverride)
|
|
1014
992
|
expoStamped.searchParams.set('bundleOriginOverride', opts.bundleOriginOverride)
|
|
1015
993
|
if (opts.hostDriver) expoStamped.searchParams.set('peachHostDriver', opts.hostDriver)
|
package/cli/commands/detect.ts
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
// project detection — finds project root, detects framework, scans monorepo workspaces
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
existsSync,
|
|
5
|
-
lstatSync,
|
|
6
|
-
opendirSync,
|
|
7
|
-
readFileSync,
|
|
8
|
-
readdirSync,
|
|
9
|
-
statSync,
|
|
10
|
-
} from 'node:fs'
|
|
3
|
+
import { existsSync, opendirSync, readFileSync, statSync } from 'node:fs'
|
|
11
4
|
import { basename, dirname, join } from 'node:path'
|
|
12
5
|
import JSON5 from 'json5'
|
|
13
6
|
import { parse as parseYaml } from 'yaml'
|
|
7
|
+
import { nodeRepoFileReader } from './nodeRepoFileReader'
|
|
14
8
|
import type { DependencyVersion, ProjectManifest } from './projectReportContract'
|
|
9
|
+
import type { RepoFileReader } from './repoFileReaderContract'
|
|
15
10
|
|
|
16
11
|
export type Framework = 'one' | 'expo' | 'bare' | 'unknown'
|
|
17
12
|
export type PackageManager = 'bun' | 'pnpm' | 'npm' | 'yarn'
|
|
@@ -35,25 +30,29 @@ export interface DetectedWorkspace {
|
|
|
35
30
|
|
|
36
31
|
const CONFIG_EXTENSIONS = ['ts', 'js', 'cjs', 'mjs', 'mts', 'cts']
|
|
37
32
|
|
|
38
|
-
export function findProjectRoot(
|
|
33
|
+
export function findProjectRoot(
|
|
34
|
+
cwd: string,
|
|
35
|
+
includeNativeRepository = false,
|
|
36
|
+
files: RepoFileReader = nodeRepoFileReader,
|
|
37
|
+
): string {
|
|
39
38
|
let swiftRoot: string | undefined
|
|
40
39
|
let dir = cwd
|
|
41
40
|
while (true) {
|
|
42
41
|
if (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
files.exists(join(dir, 'turbo.json')) ||
|
|
43
|
+
files.exists(join(dir, 'nx.json')) ||
|
|
44
|
+
files.exists(join(dir, 'lerna.json')) ||
|
|
45
|
+
files.exists(join(dir, 'pnpm-workspace.yaml'))
|
|
47
46
|
) {
|
|
48
47
|
return dir
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
if (metadataValue(readProjectJson(join(dir, 'package.json')), 'workspaces'))
|
|
50
|
+
if (metadataValue(readProjectJson(join(dir, 'package.json'), files), 'workspaces'))
|
|
52
51
|
return dir
|
|
53
52
|
|
|
54
53
|
if (includeNativeRepository) {
|
|
55
|
-
if (
|
|
56
|
-
if (!swiftRoot &&
|
|
54
|
+
if (files.exists(join(dir, '.git'))) return dir
|
|
55
|
+
if (!swiftRoot && files.exists(join(dir, 'Package.swift'))) swiftRoot = dir
|
|
57
56
|
}
|
|
58
57
|
const parent = dirname(dir)
|
|
59
58
|
if (parent === dir) break
|
|
@@ -62,9 +61,12 @@ export function findProjectRoot(cwd: string, includeNativeRepository = false): s
|
|
|
62
61
|
return swiftRoot ?? cwd
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
export function detectPackageManager(
|
|
64
|
+
export function detectPackageManager(
|
|
65
|
+
root: string,
|
|
66
|
+
files: RepoFileReader = nodeRepoFileReader,
|
|
67
|
+
): PackageManager {
|
|
66
68
|
const manager = metadataValue(
|
|
67
|
-
readProjectJson(join(root, 'package.json')),
|
|
69
|
+
readProjectJson(join(root, 'package.json'), files),
|
|
68
70
|
'packageManager',
|
|
69
71
|
)
|
|
70
72
|
if (typeof manager === 'string') {
|
|
@@ -72,21 +74,24 @@ export function detectPackageManager(root: string): PackageManager {
|
|
|
72
74
|
if (name === 'bun' || name === 'pnpm' || name === 'npm' || name === 'yarn')
|
|
73
75
|
return name
|
|
74
76
|
}
|
|
75
|
-
if (
|
|
77
|
+
if (files.exists(join(root, 'bun.lock')) || files.exists(join(root, 'bun.lockb'))) {
|
|
76
78
|
return 'bun'
|
|
77
79
|
}
|
|
78
|
-
if (
|
|
79
|
-
if (
|
|
80
|
+
if (files.exists(join(root, 'pnpm-lock.yaml'))) return 'pnpm'
|
|
81
|
+
if (files.exists(join(root, 'yarn.lock'))) return 'yarn'
|
|
80
82
|
return 'npm'
|
|
81
83
|
}
|
|
82
84
|
|
|
83
|
-
export function detectMonorepoType(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
export function detectMonorepoType(
|
|
86
|
+
root: string,
|
|
87
|
+
files: RepoFileReader = nodeRepoFileReader,
|
|
88
|
+
): MonorepoType {
|
|
89
|
+
if (files.exists(join(root, 'turbo.json'))) return 'turbo'
|
|
90
|
+
if (files.exists(join(root, 'nx.json'))) return 'nx'
|
|
91
|
+
if (files.exists(join(root, 'pnpm-workspace.yaml'))) return 'pnpm'
|
|
87
92
|
|
|
88
|
-
if (
|
|
89
|
-
if (metadataValue(readProjectJson(join(root, 'package.json')), 'workspaces'))
|
|
93
|
+
if (files.exists(join(root, 'lerna.json'))) return 'lerna'
|
|
94
|
+
if (metadataValue(readProjectJson(join(root, 'package.json'), files), 'workspaces'))
|
|
90
95
|
return 'npm-workspaces'
|
|
91
96
|
return 'single'
|
|
92
97
|
}
|
|
@@ -98,16 +103,19 @@ export function detectFramework(deps: Record<string, string>): Framework {
|
|
|
98
103
|
return 'unknown'
|
|
99
104
|
}
|
|
100
105
|
|
|
101
|
-
export function detectProject(
|
|
106
|
+
export function detectProject(
|
|
107
|
+
dir: string,
|
|
108
|
+
files: RepoFileReader = nodeRepoFileReader,
|
|
109
|
+
): DetectedProject | null {
|
|
102
110
|
const pkgPath = join(dir, 'package.json')
|
|
103
|
-
if (!
|
|
111
|
+
if (!files.exists(pkgPath)) return null
|
|
104
112
|
|
|
105
|
-
const pkg = readProjectManifest(dir)
|
|
113
|
+
const pkg = readProjectManifest(dir, files)
|
|
106
114
|
if (!pkg) return null
|
|
107
115
|
|
|
108
116
|
const deps = { ...pkg.dependencies, ...pkg.devDependencies }
|
|
109
117
|
const devCommand = metadataValue(
|
|
110
|
-
metadataValue(readProjectJson(pkgPath), 'scripts'),
|
|
118
|
+
metadataValue(readProjectJson(pkgPath, files), 'scripts'),
|
|
111
119
|
'dev',
|
|
112
120
|
)
|
|
113
121
|
const framework = detectFramework(deps)
|
|
@@ -122,41 +130,44 @@ export function detectProject(dir: string): DetectedProject | null {
|
|
|
122
130
|
// apps write .cjs as often as .js, and missing one reads as "this project
|
|
123
131
|
// has no bundler config" and sends the user to create a second one.
|
|
124
132
|
hasViteConfig: CONFIG_EXTENSIONS.some((ext) =>
|
|
125
|
-
|
|
133
|
+
files.exists(join(dir, `vite.config.${ext}`)),
|
|
126
134
|
),
|
|
127
135
|
hasMetroConfig: CONFIG_EXTENSIONS.some((ext) =>
|
|
128
|
-
|
|
136
|
+
files.exists(join(dir, `metro.config.${ext}`)),
|
|
129
137
|
),
|
|
130
138
|
devCommand: typeof devCommand === 'string' ? devCommand : null,
|
|
131
139
|
}
|
|
132
140
|
}
|
|
133
141
|
|
|
134
|
-
function getWorkspaceDirs(
|
|
142
|
+
function getWorkspaceDirs(
|
|
143
|
+
root: string,
|
|
144
|
+
files: RepoFileReader = nodeRepoFileReader,
|
|
145
|
+
): string[] {
|
|
135
146
|
const dirs: string[] = []
|
|
136
147
|
|
|
137
148
|
const pnpmWs = join(root, 'pnpm-workspace.yaml')
|
|
138
|
-
if (
|
|
139
|
-
const content =
|
|
149
|
+
if (files.exists(pnpmWs)) {
|
|
150
|
+
const content = files.readText(pnpmWs)
|
|
140
151
|
const match = content.match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/)
|
|
141
152
|
if (match) {
|
|
142
153
|
const lines = match[1].split('\n').filter(Boolean)
|
|
143
154
|
for (const line of lines) {
|
|
144
155
|
const glob = line.replace(/^\s*-\s*['"]?/, '').replace(/['"]?\s*$/, '')
|
|
145
|
-
if (glob) dirs.push(...expandGlob(root, glob))
|
|
156
|
+
if (glob) dirs.push(...expandGlob(root, glob, files))
|
|
146
157
|
}
|
|
147
158
|
}
|
|
148
159
|
return dirs
|
|
149
160
|
}
|
|
150
161
|
|
|
151
162
|
const pkgPath = join(root, 'package.json')
|
|
152
|
-
if (
|
|
163
|
+
if (files.exists(pkgPath)) {
|
|
153
164
|
try {
|
|
154
|
-
const pkg = JSON.parse(
|
|
165
|
+
const pkg = JSON.parse(files.readText(pkgPath))
|
|
155
166
|
const workspaces = Array.isArray(pkg.workspaces)
|
|
156
167
|
? pkg.workspaces
|
|
157
168
|
: pkg.workspaces?.packages || []
|
|
158
169
|
for (const glob of workspaces) {
|
|
159
|
-
dirs.push(...expandGlob(root, glob))
|
|
170
|
+
dirs.push(...expandGlob(root, glob, files))
|
|
160
171
|
}
|
|
161
172
|
} catch {}
|
|
162
173
|
}
|
|
@@ -164,19 +175,19 @@ function getWorkspaceDirs(root: string): string[] {
|
|
|
164
175
|
return dirs
|
|
165
176
|
}
|
|
166
177
|
|
|
167
|
-
function expandGlob(root: string, pattern: string): string[] {
|
|
178
|
+
function expandGlob(root: string, pattern: string, files: RepoFileReader): string[] {
|
|
168
179
|
const clean = pattern.replace(/\/\*\*?$/, '').replace(/\*$/, '')
|
|
169
180
|
const baseDir = join(root, clean)
|
|
170
181
|
|
|
171
|
-
if (!
|
|
182
|
+
if (!files.exists(baseDir)) return []
|
|
172
183
|
|
|
173
184
|
try {
|
|
174
|
-
const entries =
|
|
185
|
+
const entries = files.entries(baseDir).map((entry) => entry.name)
|
|
175
186
|
return entries
|
|
176
187
|
.map((entry) => join(baseDir, entry))
|
|
177
188
|
.filter((path) => {
|
|
178
189
|
try {
|
|
179
|
-
return
|
|
190
|
+
return files.isDirectory(path) && files.exists(join(path, 'package.json'))
|
|
180
191
|
} catch {
|
|
181
192
|
return false
|
|
182
193
|
}
|
|
@@ -186,12 +197,15 @@ function expandGlob(root: string, pattern: string): string[] {
|
|
|
186
197
|
}
|
|
187
198
|
}
|
|
188
199
|
|
|
189
|
-
export function scanWorkspace(
|
|
190
|
-
|
|
191
|
-
|
|
200
|
+
export function scanWorkspace(
|
|
201
|
+
root: string,
|
|
202
|
+
files: RepoFileReader = nodeRepoFileReader,
|
|
203
|
+
): DetectedWorkspace {
|
|
204
|
+
const type = detectMonorepoType(root, files)
|
|
205
|
+
const packageManager = detectPackageManager(root, files)
|
|
192
206
|
|
|
193
207
|
if (type === 'single') {
|
|
194
|
-
const project = detectProject(root)
|
|
208
|
+
const project = detectProject(root, files)
|
|
195
209
|
return {
|
|
196
210
|
root,
|
|
197
211
|
type,
|
|
@@ -200,15 +214,15 @@ export function scanWorkspace(root: string): DetectedWorkspace {
|
|
|
200
214
|
}
|
|
201
215
|
}
|
|
202
216
|
|
|
203
|
-
const workspaceDirs = getWorkspaceDirs(root)
|
|
217
|
+
const workspaceDirs = getWorkspaceDirs(root, files)
|
|
204
218
|
const apps: DetectedProject[] = []
|
|
205
219
|
|
|
206
|
-
const rootProject = detectProject(root)
|
|
220
|
+
const rootProject = detectProject(root, files)
|
|
207
221
|
if (rootProject) apps.push(rootProject)
|
|
208
222
|
|
|
209
223
|
for (const dir of workspaceDirs) {
|
|
210
224
|
if (dir === root) continue
|
|
211
|
-
const project = detectProject(dir)
|
|
225
|
+
const project = detectProject(dir, files)
|
|
212
226
|
if (project) apps.push(project)
|
|
213
227
|
}
|
|
214
228
|
|
|
@@ -286,14 +300,11 @@ export function scanRepository(root: string): {
|
|
|
286
300
|
|
|
287
301
|
// inspect only regular, bounded metadata files. errors are data, never a reason
|
|
288
302
|
// to execute project code. symlinks may point outside the checkout.
|
|
289
|
-
export function readProjectMetadata(
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
} catch {
|
|
295
|
-
return null
|
|
296
|
-
}
|
|
303
|
+
export function readProjectMetadata(
|
|
304
|
+
filePath: string,
|
|
305
|
+
files: RepoFileReader = nodeRepoFileReader,
|
|
306
|
+
): string | null {
|
|
307
|
+
return files.readMetadata(filePath)
|
|
297
308
|
}
|
|
298
309
|
|
|
299
310
|
export function metadataValue(value: unknown, key: string): unknown {
|
|
@@ -301,8 +312,11 @@ export function metadataValue(value: unknown, key: string): unknown {
|
|
|
301
312
|
return Object.getOwnPropertyDescriptor(value, key)?.value
|
|
302
313
|
}
|
|
303
314
|
|
|
304
|
-
export function readProjectJson(
|
|
305
|
-
|
|
315
|
+
export function readProjectJson(
|
|
316
|
+
path: string,
|
|
317
|
+
files: RepoFileReader = nodeRepoFileReader,
|
|
318
|
+
): unknown {
|
|
319
|
+
const text = readProjectMetadata(path, files)
|
|
306
320
|
if (text === null) return null
|
|
307
321
|
try {
|
|
308
322
|
const value: unknown = JSON.parse(text)
|
|
@@ -312,8 +326,11 @@ export function readProjectJson(path: string): unknown {
|
|
|
312
326
|
}
|
|
313
327
|
}
|
|
314
328
|
|
|
315
|
-
export function readProjectManifest(
|
|
316
|
-
|
|
329
|
+
export function readProjectManifest(
|
|
330
|
+
dir: string,
|
|
331
|
+
files: RepoFileReader = nodeRepoFileReader,
|
|
332
|
+
): ProjectManifest | null {
|
|
333
|
+
const parsed = readProjectJson(join(dir, 'package.json'), files)
|
|
317
334
|
if (!parsed || typeof parsed !== 'object') return null
|
|
318
335
|
const record = (value: unknown): Record<string, string> => {
|
|
319
336
|
if (!value || typeof value !== 'object') return {}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { existsSync, lstatSync, readFileSync, readdirSync, statSync } from 'node:fs'
|
|
2
|
+
import type { RepoFileReader } from './repoFileReaderContract'
|
|
3
|
+
|
|
4
|
+
export const nodeRepoFileReader: RepoFileReader = {
|
|
5
|
+
exists: existsSync,
|
|
6
|
+
readText: (filePath) => readFileSync(filePath, 'utf8'),
|
|
7
|
+
entries: (directory) =>
|
|
8
|
+
readdirSync(directory, { withFileTypes: true }).map((entry) => ({
|
|
9
|
+
name: entry.name,
|
|
10
|
+
directory: entry.isDirectory(),
|
|
11
|
+
})),
|
|
12
|
+
isDirectory: (filePath) => statSync(filePath).isDirectory(),
|
|
13
|
+
readMetadata(filePath) {
|
|
14
|
+
try {
|
|
15
|
+
const info = lstatSync(filePath)
|
|
16
|
+
if (!info.isFile() || info.size > 4 * 1024 * 1024) return null
|
|
17
|
+
return readFileSync(filePath, 'utf8')
|
|
18
|
+
} catch {
|
|
19
|
+
return null
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// scanners accept the same repository view for local files and downloaded archives.
|
|
2
|
+
export interface RepoFileReader {
|
|
3
|
+
exists(filePath: string): boolean
|
|
4
|
+
readText(filePath: string): string
|
|
5
|
+
entries(directory: string): Array<{ name: string; directory: boolean }>
|
|
6
|
+
isDirectory(filePath: string): boolean
|
|
7
|
+
readMetadata(filePath: string): string | null
|
|
8
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/cloud.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/cloud.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
package/dist-lib/config.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/detox/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.928 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|