peachsim 0.1.2260 → 0.1.2262
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/app-catalog.ts +72 -15
- package/cli/commands/shell-url.ts +11 -3
- package/cli/commands/upload.ts +2 -1
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.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 +387 -296
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +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/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +2 -2
- 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 +6 -4
- package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +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/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.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/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.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 +159 -109
- 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 +2 -2
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +1 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/bundle-channel.mjs +21 -3
- package/src/nitro-source.ts +8 -0
package/cli/app-catalog.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process'
|
|
1
2
|
import fs from 'node:fs'
|
|
3
|
+
import { createRequire } from 'node:module'
|
|
2
4
|
import path from 'node:path'
|
|
5
|
+
import { pathToFileURL } from 'node:url'
|
|
6
|
+
import { promisify } from 'node:util'
|
|
3
7
|
import {
|
|
4
8
|
enumerateBundleColors,
|
|
5
9
|
enumerateBundleImages,
|
|
@@ -13,9 +17,11 @@ import { stageHostFile } from '../src/host/staged-host-files'
|
|
|
13
17
|
import {
|
|
14
18
|
ONE_NATIVE_APP_CATALOG_ROUTE,
|
|
15
19
|
parseOneNativeAppCatalog,
|
|
20
|
+
readOneNativeAppCatalog,
|
|
16
21
|
} from '../src/one-native-app-catalog'
|
|
17
22
|
import { findExpoAppConfig } from './app-project'
|
|
18
23
|
import type { AppCatalog } from '#peach-cli-contract/engine/app-catalog-wire'
|
|
24
|
+
import type { OneNativeAppCatalog } from '../src/one-native-app-catalog'
|
|
19
25
|
|
|
20
26
|
// the xcode build setting actool turns into the built Info.plist's
|
|
21
27
|
// NSAccentColorName when the source plist does not name one itself
|
|
@@ -147,9 +153,28 @@ export async function discoverAppCatalog(
|
|
|
147
153
|
)
|
|
148
154
|
}
|
|
149
155
|
|
|
150
|
-
// a One app with no ios/ on disk:
|
|
151
|
-
//
|
|
152
|
-
//
|
|
156
|
+
// a One app with no ios/ on disk: what its native.app declares for the catalog
|
|
157
|
+
// `one prebuild` writes, the AccentColor and the declared asset catalog folder,
|
|
158
|
+
// read the way a prebuilt app's catalogs are.
|
|
159
|
+
export function oneDeclaredAppCatalog(
|
|
160
|
+
declared: OneNativeAppCatalog,
|
|
161
|
+
assetOrigin: string,
|
|
162
|
+
): AppCatalog | null {
|
|
163
|
+
const { accentColor, assetCatalog } = declared
|
|
164
|
+
const accentName = accentColor ? 'AccentColor' : null
|
|
165
|
+
const files: string[] = []
|
|
166
|
+
if (assetCatalog) catalogFiles(assetCatalog, files)
|
|
167
|
+
const catalog = readAssetCatalog(
|
|
168
|
+
files,
|
|
169
|
+
readText,
|
|
170
|
+
(file) => stageHostFile(file, assetOrigin),
|
|
171
|
+
accentName,
|
|
172
|
+
)
|
|
173
|
+
if (catalog && accentColor) catalog.colors.AccentColor = accentColor
|
|
174
|
+
return catalog
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// a running dev server reports the declaration from its evaluated config
|
|
153
178
|
export async function discoverOneNativeAppCatalog(
|
|
154
179
|
metroOrigin: string,
|
|
155
180
|
assetOrigin: string,
|
|
@@ -163,17 +188,49 @@ export async function discoverOneNativeAppCatalog(
|
|
|
163
188
|
)
|
|
164
189
|
return null
|
|
165
190
|
const declared = parseOneNativeAppCatalog(await response.json().catch(() => null))
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
191
|
+
return declared ? oneDeclaredAppCatalog(declared, assetOrigin) : null
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export async function discoverProjectOneNativeAppCatalog(
|
|
195
|
+
projectRoot: string,
|
|
196
|
+
assetOrigin: string,
|
|
197
|
+
): Promise<AppCatalog | null> {
|
|
198
|
+
const declared = await readProjectOneNativeAppCatalog(projectRoot, process.env, 'node')
|
|
199
|
+
return declared ? oneDeclaredAppCatalog(declared, assetOrigin) : null
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// a production bundle has no dev server: evaluate the app's vite config with
|
|
203
|
+
// One's own loader, the one `one prebuild` reads native.app through.
|
|
204
|
+
export async function readProjectOneNativeAppCatalog(
|
|
205
|
+
projectRoot: string,
|
|
206
|
+
env: NodeJS.ProcessEnv,
|
|
207
|
+
runtimeExecutable: string,
|
|
208
|
+
): Promise<OneNativeAppCatalog | null> {
|
|
209
|
+
let onePackage: string
|
|
210
|
+
try {
|
|
211
|
+
onePackage = createRequire(path.join(projectRoot, 'package.json')).resolve(
|
|
212
|
+
'one/package.json',
|
|
213
|
+
)
|
|
214
|
+
} catch {
|
|
215
|
+
return null
|
|
216
|
+
}
|
|
217
|
+
const loader = pathToFileURL(
|
|
218
|
+
path.join(path.dirname(onePackage), 'dist/esm/vite/loadConfig.mjs'),
|
|
219
|
+
).href
|
|
220
|
+
const { stdout } = await promisify(execFile)(
|
|
221
|
+
runtimeExecutable,
|
|
222
|
+
[
|
|
223
|
+
'--input-type=module',
|
|
224
|
+
'-e',
|
|
225
|
+
`const { loadUserOneOptions } = await import(process.argv[1])
|
|
226
|
+
const { oneOptions } = await loadUserOneOptions('build', true)
|
|
227
|
+
const app = typeof oneOptions?.native === 'object' ? oneOptions.native.app : undefined
|
|
228
|
+
process.stdout.write('\\n' + JSON.stringify({ app }) + '\\n')
|
|
229
|
+
process.exit(0)`,
|
|
230
|
+
loader,
|
|
231
|
+
],
|
|
232
|
+
{ cwd: projectRoot, env, maxBuffer: 64 * 1024 * 1024 },
|
|
176
233
|
)
|
|
177
|
-
|
|
178
|
-
return
|
|
234
|
+
const json = stdout.split('\n').findLast((line) => line.startsWith('{"app"'))
|
|
235
|
+
return readOneNativeAppCatalog(json ? JSON.parse(json) : null, projectRoot)
|
|
179
236
|
}
|
|
@@ -52,7 +52,11 @@ import {
|
|
|
52
52
|
} from '../../src/simulator-route'
|
|
53
53
|
import { sleep } from '../../src/sleep'
|
|
54
54
|
import { stageAppBundleResources } from '../app-bundle-resources'
|
|
55
|
-
import {
|
|
55
|
+
import {
|
|
56
|
+
discoverAppCatalog,
|
|
57
|
+
discoverOneNativeAppCatalog,
|
|
58
|
+
discoverProjectOneNativeAppCatalog,
|
|
59
|
+
} from '../app-catalog'
|
|
56
60
|
import { discoverNativeLinkedAppFonts } from '../app-fonts'
|
|
57
61
|
import {
|
|
58
62
|
findExpoAppConfig,
|
|
@@ -467,10 +471,14 @@ async function stampAppCatalog(
|
|
|
467
471
|
): Promise<string> {
|
|
468
472
|
const url = new URL(urlStr)
|
|
469
473
|
const metroOrigin = loopbackOriginOf(url.searchParams.get('bundle') ?? '')
|
|
470
|
-
if (!
|
|
474
|
+
if (!project) return urlStr
|
|
475
|
+
// a prebuilt bundle has no dev server to ask: read the declaration from the
|
|
476
|
+
// project's One config
|
|
471
477
|
const catalog =
|
|
472
478
|
(await discoverAppCatalog(project.appDir, assetOrigin)) ??
|
|
473
|
-
(
|
|
479
|
+
(metroOrigin
|
|
480
|
+
? await discoverOneNativeAppCatalog(metroOrigin, assetOrigin)
|
|
481
|
+
: await discoverProjectOneNativeAppCatalog(project.appDir, assetOrigin))
|
|
474
482
|
if (!catalog) return urlStr
|
|
475
483
|
url.searchParams.set(
|
|
476
484
|
'appCatalog',
|
package/cli/commands/upload.ts
CHANGED
|
@@ -1286,8 +1286,9 @@ export async function runUpload(
|
|
|
1286
1286
|
(result.init.flowVideo ? 1 : 0) +
|
|
1287
1287
|
(result.init.sceneStream ? 1 : 0) +
|
|
1288
1288
|
(result.init.failureBundle ? 1 : 0)
|
|
1289
|
+
const { initMs, putMs, finalizeMs, finalizeServerTiming } = result.timing
|
|
1289
1290
|
console.log(
|
|
1290
|
-
`
|
|
1291
|
+
` uploaded ${totalObjects} objects in ${Date.now() - putT0}ms (${(putBytes / 1024).toFixed(1)} KiB): init ${initMs}ms, PUT ${putMs}ms, finalize ${finalizeMs}ms${finalizeServerTiming ? ` [${finalizeServerTiming}]` : ''}`,
|
|
1291
1292
|
)
|
|
1292
1293
|
} catch (err: unknown) {
|
|
1293
1294
|
const e = err as {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2262 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2262 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2262 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2262 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2262 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2262 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2262 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2262 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2262 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|