peachsim 0.1.2031 → 0.1.2032
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/package.ts +1 -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 +7864 -7787
- 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 +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +3 -3
- 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 +4 -4
- 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-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 +62 -60
- 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 +4 -4
- 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 +2 -2
- 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/bundle-channel.mjs +26 -8
package/package.json
CHANGED
package/src/bundle-channel.mjs
CHANGED
|
@@ -7,10 +7,14 @@ import { brotliCompressSync, constants as zlibConstants } from 'node:zlib'
|
|
|
7
7
|
import { isLoopbackHost } from './backend-origin'
|
|
8
8
|
import { resolveConnectionInput } from './dev-bundle-resolution'
|
|
9
9
|
import { cacheDir } from './home-paths'
|
|
10
|
+
import { getCliRuntime } from './cli-runtime'
|
|
10
11
|
import { readInstalledNativePackageVersionsAsync } from './installed-package-versions'
|
|
11
12
|
import { buildNativeBundles, insertNativeBundleFooters } from './native-bundles'
|
|
12
13
|
import { nodeHttpFetch } from './node-http-fetch'
|
|
13
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
detachPackageVersionsFooter,
|
|
16
|
+
insertPackageVersionsFooter,
|
|
17
|
+
} from './packageVersionsContract'
|
|
14
18
|
import { terminateProcessGroup } from './process-group'
|
|
15
19
|
|
|
16
20
|
const digest = (bytes) => createHash('sha256').update(bytes).digest('hex')
|
|
@@ -36,7 +40,7 @@ const nativeAssetPath = {
|
|
|
36
40
|
android: /^__peach\/kotlin\/[a-f0-9]+\/[A-Za-z0-9._-]+\.(mjs|wasm)$/,
|
|
37
41
|
}
|
|
38
42
|
|
|
39
|
-
export function prepareBundleChannel({
|
|
43
|
+
export async function prepareBundleChannel({
|
|
40
44
|
prefix,
|
|
41
45
|
publicOrigin,
|
|
42
46
|
sourceSha,
|
|
@@ -71,7 +75,7 @@ export function prepareBundleChannel({
|
|
|
71
75
|
if (!platforms.length) throw new Error('bundle channel has no platforms')
|
|
72
76
|
if (new Set(platforms.map((p) => p.platform)).size !== platforms.length)
|
|
73
77
|
throw new Error('bundle channel repeats a platform')
|
|
74
|
-
const channels = platforms.map((snapshot) =>
|
|
78
|
+
const channels = await Promise.all(platforms.map((snapshot) =>
|
|
75
79
|
prepareChannel({
|
|
76
80
|
prefix,
|
|
77
81
|
origin,
|
|
@@ -81,11 +85,11 @@ export function prepareBundleChannel({
|
|
|
81
85
|
icon,
|
|
82
86
|
...snapshot,
|
|
83
87
|
}),
|
|
84
|
-
)
|
|
88
|
+
))
|
|
85
89
|
return { prefix, origin: origin.origin, channels }
|
|
86
90
|
}
|
|
87
91
|
|
|
88
|
-
function prepareChannel({
|
|
92
|
+
async function prepareChannel({
|
|
89
93
|
prefix,
|
|
90
94
|
origin,
|
|
91
95
|
sourceSha,
|
|
@@ -95,6 +99,7 @@ function prepareChannel({
|
|
|
95
99
|
platform,
|
|
96
100
|
bundle,
|
|
97
101
|
assets,
|
|
102
|
+
oneSDK = null,
|
|
98
103
|
expoSwift = null,
|
|
99
104
|
expoKotlin = null,
|
|
100
105
|
nitro = null,
|
|
@@ -106,7 +111,9 @@ function prepareChannel({
|
|
|
106
111
|
throw new Error(`${platform} bundle carries an iOS Nitro module`)
|
|
107
112
|
if (platform !== 'ios' && turbo !== null)
|
|
108
113
|
throw new Error(`${platform} bundle carries an iOS TurboModule`)
|
|
109
|
-
|
|
114
|
+
if (platform !== 'ios' && oneSDK !== null)
|
|
115
|
+
throw new Error(`${platform} bundle carries an iOS One SDK`)
|
|
116
|
+
const nativeBundles = [oneSDK, native, nitro, turbo].filter(Boolean)
|
|
110
117
|
const nativeAssets = new Map()
|
|
111
118
|
if ((platform === 'ios' ? expoKotlin : expoSwift) !== null)
|
|
112
119
|
throw new Error(`${platform} bundle carries another platform's native modules`)
|
|
@@ -149,6 +156,7 @@ function prepareChannel({
|
|
|
149
156
|
identity.update(JSON.stringify([path, digest(bytes)]))
|
|
150
157
|
}
|
|
151
158
|
if (native) identity.update(JSON.stringify(native.metadata))
|
|
159
|
+
if (oneSDK) identity.update(JSON.stringify(oneSDK.metadata))
|
|
152
160
|
if (nitro) identity.update(JSON.stringify(nitro.metadata))
|
|
153
161
|
if (turbo) identity.update(JSON.stringify(turbo.metadata))
|
|
154
162
|
const releaseKey = `${prefix}/peach/releases/${identity.digest('hex')}`
|
|
@@ -157,7 +165,14 @@ function prepareChannel({
|
|
|
157
165
|
[...files.keys()].map((path) => path.slice(0, path.lastIndexOf('/'))),
|
|
158
166
|
)
|
|
159
167
|
let locations = 0
|
|
160
|
-
|
|
168
|
+
const { stripRolldownBundleInventoryFooter, attachRolldownBundleInventory } =
|
|
169
|
+
getCliRuntime().rolldown_bundle_inventory
|
|
170
|
+
const detached = detachPackageVersionsFooter(
|
|
171
|
+
stripRolldownBundleInventoryFooter(
|
|
172
|
+
new TextDecoder('utf-8', { fatal: true }).decode(bundle),
|
|
173
|
+
),
|
|
174
|
+
)
|
|
175
|
+
let source = detached.source.replace(
|
|
161
176
|
// minifiers emit the location as a JSON string or a plain template literal.
|
|
162
177
|
/("?httpServerLocation"?\s*:\s*)(?:"((?:[^"\\]|\\.)*)"|`([^`\\$]*)`)/g,
|
|
163
178
|
(match, property, quoted, template) => {
|
|
@@ -174,10 +189,13 @@ function prepareChannel({
|
|
|
174
189
|
throw new Error('bundle has packaged files but no asset metadata')
|
|
175
190
|
const attached = insertNativeBundleFooters(
|
|
176
191
|
source,
|
|
177
|
-
{ expoSwift, expoKotlin, nitro, turbo },
|
|
192
|
+
{ oneSDK, expoSwift, expoKotlin, nitro, turbo },
|
|
178
193
|
(path) => new URL(path, assetBaseUrl).href,
|
|
179
194
|
)
|
|
180
195
|
source = attached.source
|
|
196
|
+
if (detached.versions)
|
|
197
|
+
source = insertPackageVersionsFooter(source, detached.versions)
|
|
198
|
+
source = await attachRolldownBundleInventory(source)
|
|
181
199
|
const nativeMetadata = attached.metadata
|
|
182
200
|
new Script(source, { filename: 'peach-release-bundle.js' })
|
|
183
201
|
const bundleBytes = Buffer.from(source)
|