peachsim 0.1.2411 → 0.1.2421
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/README.md +1 -1
- package/cli/catalog/content.ts +6 -3
- package/cli/catalog/meta.ts +63 -17
- package/cli/catalog/routes.ts +4 -0
- package/cli/cloud-box-artifact.ts +45 -24
- package/cli/cloud-client.ts +6 -2
- package/cli/command-registry.ts +3 -1
- package/cli/commands/control.ts +74 -55
- package/cli/commands/desktop.ts +3 -3
- package/cli/commands/electron.ts +7 -5
- package/cli/commands/kotlin.ts +8 -1
- package/cli/commands/platform.ts +5 -7
- package/cli/commands/profile.ts +2 -2
- package/cli/commands/settings.ts +90 -0
- package/cli/commands/shell-url.ts +18 -10
- package/cli/commands/swift.ts +3 -1
- package/cli/main.ts +6 -0
- package/cli/outbound-endpoints.ts +17 -15
- package/cli/settings-flags.ts +115 -0
- 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 +3706 -1818
- 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 +3 -7
- package/dist-lib/config.mjs +3 -7
- package/dist-lib/detox/index.cjs +4 -4
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +17144 -15295
- 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 +63288 -62269
- package/dist-lib/host/fetch-proxy-handler.cjs +1598 -211
- 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 +3007 -1512
- 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 +972 -246
- 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 +1742 -247
- package/dist-lib/native-app-identity-project.cjs +40 -204
- package/dist-lib/native-app-identity-project.mjs +40 -204
- 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 +26 -24
- package/dist-lib/public-origins-lib.json +198 -117
- 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 +2 -2
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +21765 -20511
- package/dist-lib/swift-compile.cjs +48 -228
- package/dist-lib/swift-compile.mjs +48 -228
- 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 -199
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +227 -251
- package/dist-lib/vite.cjs +5240 -3788
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/config.d.ts +1 -4
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +5 -0
- package/kotlin/README.md +4 -3
- package/kotlin/sdk.tar.gz +0 -0
- package/kotlin/toolchain.json +3 -6
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1 -43
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayerContents.h +55 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Modules/module.modulemap +3 -3
- package/sdk/ios/usr/include/ObjectiveC.apinotes +0 -24
- package/sdk/ios/usr/include/grp.h +93 -0
- package/sdk/ios/usr/include/netinet/tcp.h +299 -0
- package/sdk/ios/wasm/include/netinet/tcp.h +6 -0
- package/sdk/ios/wasm/include/stdlib.h +1 -0
- package/sdk/ios/wasm/include/unistd.h +2 -0
- package/skills/contrast/SKILL.md +1 -0
- package/skills/peach-setup/SKILL.md +11 -1
- package/src/android-bridge-dependencies.ts +1 -1
- package/src/app-config.ts +7 -0
- package/src/binaryen.lock.json +21 -0
- package/src/cocoapods-trunk.ts +52 -0
- package/src/config.ts +21 -31
- package/src/expo-native-workspace.ts +4 -0
- package/src/kotlin-host.ts +1 -1
- package/src/kotlin-sdk.ts +7 -7
- package/src/kotlin-toolchain.ts +28 -24
- package/src/kotlinSdkContract.ts +2 -2
- package/src/native-bundles.ts +5 -2
- package/src/native-static-libraries.ts +38 -5
- package/src/podfile-cocoapods.ts +1473 -0
- package/src/podspec-cocoapods.ts +331 -106
- package/src/podspec-ruby-stdlib.ts +134 -19
- package/src/podspec-ruby.ts +199 -46
- package/src/settingsContract.ts +74 -0
- package/src/swift-compile.ts +1 -1
- package/src/swift-compiler-digest.ts +1 -0
- package/src/swift-host.ts +107 -15
- package/src/swift-objc-compile.ts +5 -0
- package/src/swift-packages.ts +75 -0
- package/src/swift-shared-sdk.ts +19 -0
- package/src/swift-toolchain.ts +2 -201
- package/src/turbo-source.ts +7 -37
- package/src/wasm-optimize.ts +4 -27
- package/src/xcode-project.ts +22 -7
package/src/wasm-optimize.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { dirname, join } from 'node:path'
|
|
|
4
4
|
import { promisify } from 'node:util'
|
|
5
5
|
import { installVerifiedTarball } from '@contrast/runtime-delivery'
|
|
6
6
|
import { windowAdmission } from './admitted-mac-build'
|
|
7
|
+
import binaryenLock from './binaryen.lock.json' with { type: 'json' }
|
|
7
8
|
import { rnxHomeDir } from './home-paths'
|
|
8
9
|
import {
|
|
9
10
|
dropBoundaryExports,
|
|
@@ -35,36 +36,13 @@ const FEATURES = [
|
|
|
35
36
|
export const KEEP_WASM_NAMES = process.env.PEACH_SWIFT_NAMES === '1'
|
|
36
37
|
|
|
37
38
|
const LOWERING = ['--memory64-lowering', '--table64-lowering']
|
|
38
|
-
const BINARYEN_VERSION =
|
|
39
|
+
const BINARYEN_VERSION = binaryenLock.version
|
|
39
40
|
const runBinaryen = promisify(execFile)
|
|
40
41
|
|
|
41
42
|
/** feeds the artifact hash: a new optimizer or flag set is a new artifact. */
|
|
42
43
|
export const WASM_LOWER_IDENTITY = `binaryen ${BINARYEN_VERSION} narrow ${LOWERING.join(' ')} ${FEATURES.join(',')} unoptimized-names`
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
const BINARYEN_RELEASES = new Map([
|
|
46
|
-
[
|
|
47
|
-
'linux-x64',
|
|
48
|
-
{
|
|
49
|
-
asset: 'x86_64-linux',
|
|
50
|
-
sha256: '195ddc94f9bc89f45abdabb0b9eea86023d727ba90eac8b35b80f2544fc30572',
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
[
|
|
54
|
-
'linux-arm64',
|
|
55
|
-
{
|
|
56
|
-
asset: 'aarch64-linux',
|
|
57
|
-
sha256: 'c58562417836c5d0493d89bdefc434933bdc097db641b483df86bcfa557a107f',
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
[
|
|
61
|
-
'darwin-arm64',
|
|
62
|
-
{
|
|
63
|
-
asset: 'arm64-macos',
|
|
64
|
-
sha256: '98aad827847af7ef990ed7098d885725c8e5b5aae75073403635617ae4e259aa',
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
])
|
|
45
|
+
const BINARYEN_RELEASES = new Map(Object.entries(binaryenLock.platforms))
|
|
68
46
|
|
|
69
47
|
// skipPasses names Binaryen passes to leave out. a guest link with several images
|
|
70
48
|
// skips duplicate-function-elimination, which would merge identical functions
|
|
@@ -142,11 +120,10 @@ async function installWasmOpt(): Promise<string> {
|
|
|
142
120
|
const binary = join(destDir, 'bin', 'wasm-opt')
|
|
143
121
|
if (!existsSync(binary))
|
|
144
122
|
await installVerifiedTarball({
|
|
145
|
-
url: `https://
|
|
123
|
+
url: `https://r2.rnxsim.com/peach/binaryen/${release.sha256}/${platform}.tar.gz`,
|
|
146
124
|
digest: { algorithm: 'sha256', encoding: 'hex', value: release.sha256 },
|
|
147
125
|
destDir,
|
|
148
126
|
installedMarker: 'bin/wasm-opt',
|
|
149
|
-
stripComponents: 1,
|
|
150
127
|
label: `Binaryen ${BINARYEN_VERSION}`,
|
|
151
128
|
})
|
|
152
129
|
return binary
|
package/src/xcode-project.ts
CHANGED
|
@@ -1996,6 +1996,9 @@ export function readXcodeAppTarget(
|
|
|
1996
1996
|
installedPods?: boolean
|
|
1997
1997
|
/** snapshot only these native modules, without the application's resources. */
|
|
1998
1998
|
nativeModules?: readonly string[]
|
|
1999
|
+
/** select the original framework target that builds a package's archive. */
|
|
2000
|
+
frameworkMachOType?: 'staticlib' | 'mh_dylib'
|
|
2001
|
+
frameworkBuildSettings?: Readonly<Record<string, string>>
|
|
1999
2002
|
/**
|
|
2000
2003
|
* throw when the project has remote packages and no lock. a read that
|
|
2001
2004
|
* compiles sets it; one that only reads metadata leaves the graph empty.
|
|
@@ -2016,12 +2019,14 @@ export function readXcodeAppTarget(
|
|
|
2016
2019
|
)
|
|
2017
2020
|
const allTargets = projects.flatMap(projectTargets)
|
|
2018
2021
|
// an extension runs as its own process: named, it builds as the compiled unit
|
|
2019
|
-
const appTargets = allTargets.filter(
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2022
|
+
const appTargets = allTargets.filter((ref) =>
|
|
2023
|
+
options.frameworkMachOType
|
|
2024
|
+
? ref.target.name === targetName &&
|
|
2025
|
+
FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? '')
|
|
2026
|
+
: isIosAppTarget(ref, options) ||
|
|
2027
|
+
(targetName !== undefined &&
|
|
2028
|
+
ref.target.name === targetName &&
|
|
2029
|
+
ref.target.productType === APP_EXTENSION),
|
|
2025
2030
|
)
|
|
2026
2031
|
const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id)
|
|
2027
2032
|
const container = path.basename(xcodeprojOrWorkspace)
|
|
@@ -2029,6 +2034,10 @@ export function readXcodeAppTarget(
|
|
|
2029
2034
|
? appTargets.filter((ref) => ref.target.name === targetName)
|
|
2030
2035
|
: appTargets
|
|
2031
2036
|
if (named.length !== 1) {
|
|
2037
|
+
if (options.frameworkMachOType)
|
|
2038
|
+
throw new Error(
|
|
2039
|
+
`${container} must declare one framework target named ${targetName}`,
|
|
2040
|
+
)
|
|
2032
2041
|
if (appTargets.length === 0)
|
|
2033
2042
|
throw new Error(
|
|
2034
2043
|
`${container} has no application targets; open a project or workspace that contains one`,
|
|
@@ -2369,7 +2378,13 @@ export function readXcodeAppTarget(
|
|
|
2369
2378
|
DEVELOPMENT_LANGUAGE: str(ref.project.project.developmentRegion) ?? 'en',
|
|
2370
2379
|
},
|
|
2371
2380
|
options,
|
|
2372
|
-
|
|
2381
|
+
ref === app && options.frameworkMachOType
|
|
2382
|
+
? {
|
|
2383
|
+
...workspaceBuild,
|
|
2384
|
+
...options.frameworkBuildSettings,
|
|
2385
|
+
MACH_O_TYPE: options.frameworkMachOType,
|
|
2386
|
+
}
|
|
2387
|
+
: workspaceBuild,
|
|
2373
2388
|
)
|
|
2374
2389
|
for (const file of read) xcconfigs.add(file)
|
|
2375
2390
|
const swiftVersion = Number.parseFloat(settings('SWIFT_VERSION') || '5')
|