peachsim 0.1.2253 → 0.1.2257
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/bridge-flow-runner.ts +41 -0
- package/cli/commands/compat.ts +1 -1
- package/cli/commands/control.ts +9 -3
- package/cli/commands/flow.ts +9 -0
- package/cli/commands/package.ts +1 -1
- package/cli/commands/runtime.ts +1 -1
- package/cli/commands/swift.ts +5 -0
- package/cli/commands/upgrade.ts +2 -5
- package/cli/commands/version.ts +1 -1
- package/cli/current-sim.ts +23 -15
- package/cli/native-input.ts +1 -1
- package/cli/outbound-endpoints.ts +0 -2
- package/cli/secure-file.ts +8 -2
- 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 +3295 -2329
- 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 +16 -1
- package/dist-lib/config.mjs +14 -1
- package/dist-lib/detox/index.cjs +16 -12
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +3345 -2401
- 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 +3869 -2832
- package/dist-lib/host/fetch-proxy-handler.cjs +3607 -1627
- 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 +14284 -12772
- 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 +6 -4
- 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 +9796 -8347
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +2 -3
- 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 +682 -292
- 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 +4580 -3494
- package/dist-lib/swift-compile.cjs +426 -126
- package/dist-lib/swift-compile.mjs +429 -126
- 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 +2529 -1611
- package/dist-lib/vite.cjs +7138 -4012
- 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 -1
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +1 -0
- 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 +33 -1
- package/dist-types/packages/peach-engine/src/render-worker/reanimated-readiness.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/appLifecycleBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +2 -1
- package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +12 -0
- package/dist-types/packages/peach-kit/src/transitions/screen-transition-math.d.ts +6 -0
- package/java-platform/licenses/android.txt +183 -0
- package/java-platform/licenses/arm-optimized-routines.txt +256 -0
- package/java-platform/licenses/fdlibm.txt +72 -0
- package/java-platform/licenses/icu.txt +50 -0
- package/java-platform/licenses/openjdk.txt +395 -0
- package/java-platform/licenses/teavm.txt +182 -0
- package/java-platform/licenses/threeten-backport.txt +29 -0
- package/kotlin/README.md +1 -1
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +2 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/wasm/include/__typedef_time_t.h +5 -0
- package/sdk/ios/wasm/include/ifaddrs.h +75 -0
- package/sdk/ios/wasm/include/machine/_types.h +1 -1
- package/sdk/ios/wasm/include/pthread.h +4 -0
- package/sdk/ios/wasm/include/unistd.h +2 -0
- package/{cli → src}/app-config.ts +5 -5
- package/src/bundle-channel.mjs +1 -1
- package/src/config.ts +29 -0
- package/src/core-data-entity-classes.ts +2 -2
- package/src/core-data-model.ts +681 -0
- package/src/expo-autolinking.ts +47 -4
- package/src/expo-pod-prebuilt.ts +96 -9
- package/src/expo-swift-host.ts +30 -10
- package/src/kotlin-host.ts +4 -2
- package/src/kotlinSdkContract.ts +1 -0
- package/src/metro-plugin.ts +1 -3
- package/src/native-package-slice.ts +810 -0
- package/src/native-prebuilt.ts +4 -0
- package/src/native-seam-manifest.ts +0 -8
- package/src/nitro-adapter.lock.json +261 -261
- package/src/nitro-bundle.ts +1 -1
- package/src/nitro-superset.lock.json +4 -4
- package/src/plist-bytes.ts +113 -0
- package/src/swift-compile.ts +2 -0
- package/src/swift-distribution.lock.json +11 -11
- package/src/swift-guest-image-ledger.ts +2 -1
- package/src/swift-host.ts +14 -2
- package/src/swift-link-roots.ts +23 -22
- package/src/swift-wasm-prune.ts +436 -105
- package/src/turbo-bundle.ts +1 -1
- package/src/turbo-runtime.lock.json +22 -22
- package/src/vite-plugin-one.ts +68 -0
package/src/turbo-bundle.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from 'node:module'
|
|
2
2
|
import path from 'node:path'
|
|
3
|
-
import { loadRNXAppConfig } from '../cli/app-config'
|
|
4
3
|
import { resolveAppProject } from '../cli/app-project'
|
|
4
|
+
import { loadRNXAppConfig } from './app-config'
|
|
5
5
|
import { prebuiltExpoNative } from './expo-native-prebuilt'
|
|
6
6
|
import { prepareNativeAppRoot } from './expo-native-workspace'
|
|
7
7
|
import { installedNativeLibraries } from './installed-native-libraries'
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
},
|
|
9
9
|
"compiler": "swift-6.4.0-RELEASE-custom-fb42d2535739dfd2",
|
|
10
10
|
"sdk": {
|
|
11
|
-
"id": "swift-6.4.0-RELEASE_wasm-peach-
|
|
12
|
-
"checksum": "
|
|
11
|
+
"id": "swift-6.4.0-RELEASE_wasm-peach-6ff7e819",
|
|
12
|
+
"checksum": "ac7bf36166760fd4074f430847dcf1d12bdb6727c061919ee1425dbb9fb7f128"
|
|
13
13
|
},
|
|
14
14
|
"framework": {
|
|
15
|
-
"distribution": "
|
|
15
|
+
"distribution": "0c0e33b4b191ff3a",
|
|
16
16
|
"wireAbi": "38eed69f6b7391584112981b7892914e7033d7e0c17c2e8d4a4448030618bd2b"
|
|
17
17
|
},
|
|
18
18
|
"archives": [
|
|
@@ -20,71 +20,71 @@
|
|
|
20
20
|
"headers": {
|
|
21
21
|
"reactNativeJsi": "0f8c2defbca69a27a848a81ae72363073bf9602fd316e57a75811be1a0528358"
|
|
22
22
|
},
|
|
23
|
-
"sha256": "
|
|
24
|
-
"size":
|
|
23
|
+
"sha256": "5342f72977d90aea9aba94e9eaa47c384ef574784902c746844011412da629ea",
|
|
24
|
+
"size": 26177
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"headers": {
|
|
28
28
|
"reactNativeJsi": "21a624ea24fd17d56bf26832d496fc1177067f89640414c20e6486c7984dfb0a"
|
|
29
29
|
},
|
|
30
|
-
"sha256": "
|
|
31
|
-
"size":
|
|
30
|
+
"sha256": "b22da620504ce03ad3a3cb64d670c937c0434921a97c0f53b05b76777331403f",
|
|
31
|
+
"size": 26915
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"headers": {
|
|
35
35
|
"reactNativeJsi": "324aefd8591d9ce688bce7589c4c2b516cd33ecb95d35c47239a87a8fcf6a8da"
|
|
36
36
|
},
|
|
37
|
-
"sha256": "
|
|
38
|
-
"size":
|
|
37
|
+
"sha256": "9f3b3cfba36850c6730d5f387e69a39b658139f9ee2f7e5c92b20720c6436b53",
|
|
38
|
+
"size": 26173
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"headers": {
|
|
42
42
|
"reactNativeJsi": "33596664ee7d7a6623f0796a6feb429543316c3a41b211150acda6e1d835286c"
|
|
43
43
|
},
|
|
44
|
-
"sha256": "
|
|
45
|
-
"size":
|
|
44
|
+
"sha256": "4b09d9f54a0a7c5c9a8a6ccdbcd6697113eaa0b81fce5521183a6932821a9ebb",
|
|
45
|
+
"size": 25956
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"headers": {
|
|
49
49
|
"reactNativeJsi": "66b2cd5a38511195207f6c8a76aba735f9b9cc66a52a0d00780ffe5d331623f7"
|
|
50
50
|
},
|
|
51
|
-
"sha256": "
|
|
52
|
-
"size":
|
|
51
|
+
"sha256": "a2c0cc17a8a2d6f460146065b278fbf02636ce448ab79c09eb81f2903312b871",
|
|
52
|
+
"size": 26176
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"headers": {
|
|
56
56
|
"reactNativeJsi": "96db4e758dd53e9320cef7cad485e00aa06e7a982cefd920f17007de8a5bd9f9"
|
|
57
57
|
},
|
|
58
|
-
"sha256": "
|
|
59
|
-
"size":
|
|
58
|
+
"sha256": "620f9a7a0651e7f940ea754331e878537bbe9799d325dee525dc53c76c29b16c",
|
|
59
|
+
"size": 26911
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"headers": {
|
|
63
63
|
"reactNativeJsi": "aeab590ddd1218df963462242d3954ce467b0fa88f70e91429e4ffc74d230893"
|
|
64
64
|
},
|
|
65
|
-
"sha256": "
|
|
66
|
-
"size":
|
|
65
|
+
"sha256": "10359242755f0cf752cf56d5bfae72d17b1c605aa7adb72fabc22ccac8c3a088",
|
|
66
|
+
"size": 26913
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"headers": {
|
|
70
70
|
"reactNativeJsi": "b5fb260522384dd7ab07d740cdc534b529922446fcec798341c7817d9eaa49f4"
|
|
71
71
|
},
|
|
72
|
-
"sha256": "
|
|
72
|
+
"sha256": "50a30bfb2d01e9cd2f62426ebe0350bfb47a62dabb55c68b1498dde6dd394068",
|
|
73
73
|
"size": 26045
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"headers": {
|
|
77
77
|
"reactNativeJsi": "c6b391a1e870ccf7cdd534be63582862840f8245b99ebd253317deece1e6ffd5"
|
|
78
78
|
},
|
|
79
|
-
"sha256": "
|
|
80
|
-
"size":
|
|
79
|
+
"sha256": "82e9cc7b7478bc9a430d7885814b237e36fa087e7b728ffe9bc64b87689342e1",
|
|
80
|
+
"size": 26912
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"headers": {
|
|
84
84
|
"reactNativeJsi": "c8270f1315745ecc204c4209a4f50f58ff6f14b4a385ad6820a69800270b53c6"
|
|
85
85
|
},
|
|
86
|
-
"sha256": "
|
|
87
|
-
"size":
|
|
86
|
+
"sha256": "9b8e5e762ead8d4a2e2efe55530b455c4b8a5202f9e636202ea079d99fd9d8a0",
|
|
87
|
+
"size": 25919
|
|
88
88
|
}
|
|
89
89
|
]
|
|
90
90
|
}
|
package/src/vite-plugin-one.ts
CHANGED
|
@@ -18,8 +18,11 @@ import {
|
|
|
18
18
|
PACKAGE_VERSIONS_HEADER,
|
|
19
19
|
} from '@peach/globals/package-versions'
|
|
20
20
|
import { WebSocket, WebSocketServer } from 'ws'
|
|
21
|
+
import { resolveAppProject } from '../cli/app-project'
|
|
22
|
+
import { loadRNXAppConfig } from './app-config'
|
|
21
23
|
import { DEFAULT_SOOTSIM_BRIDGE_PORT } from './bridge-constants'
|
|
22
24
|
import { getCliRuntime } from './cli-runtime'
|
|
25
|
+
import { matchConfigModule, PEACH_WORKSPACE_MODULE_MARKER } from './config'
|
|
23
26
|
import {
|
|
24
27
|
launchRnxDesktop,
|
|
25
28
|
resolveRnxDesktopAppName,
|
|
@@ -48,6 +51,7 @@ import { ensureRuntimePackFor } from './runtime-packs'
|
|
|
48
51
|
import { SWIFT_HMR_PATH, SWIFT_PACKAGE_PATH } from './swift-submit'
|
|
49
52
|
import { privateSwiftDistributionRoot } from './swift-toolchain'
|
|
50
53
|
import { swiftViteLifetime } from './swift-vite-lifetime'
|
|
54
|
+
import type { PeachConfig } from './config'
|
|
51
55
|
import type { OneWidgetPackage } from './oneWidgetContract'
|
|
52
56
|
import type { PeachPluginOptions } from './vite'
|
|
53
57
|
import type { IncomingMessage, ServerResponse } from 'node:http'
|
|
@@ -91,8 +95,72 @@ export function peachPlugin(options: PeachPluginOptions = {}): Plugin {
|
|
|
91
95
|
|
|
92
96
|
api: {
|
|
93
97
|
vxrnNative({ root, dev }: { root: string; dev: boolean }): Plugin {
|
|
98
|
+
let modules: PeachConfig['modules']
|
|
94
99
|
return {
|
|
95
100
|
name: 'peach:package-versions',
|
|
101
|
+
async buildStart() {
|
|
102
|
+
if (options.enabled === false || dev) return
|
|
103
|
+
modules = (await loadRNXAppConfig(resolveAppProject(root)))?.modules
|
|
104
|
+
},
|
|
105
|
+
transform(code, id) {
|
|
106
|
+
if (!modules || id.includes('/node_modules/')) return
|
|
107
|
+
const match = matchConfigModule(id.split('?')[0], modules)
|
|
108
|
+
if (!match) return
|
|
109
|
+
// production rolldown reads a module's exports by direct binding, so
|
|
110
|
+
// the tag lists each export name with the local it reads
|
|
111
|
+
const exported: string[] = []
|
|
112
|
+
for (const node of this.parse(code, {
|
|
113
|
+
lang: id.split('?')[0].endsWith('x') ? 'tsx' : 'ts',
|
|
114
|
+
}).body) {
|
|
115
|
+
if (node.type === 'ExportDefaultDeclaration') {
|
|
116
|
+
const declaration = node.declaration
|
|
117
|
+
if (!('id' in declaration) || declaration.id?.type !== 'Identifier')
|
|
118
|
+
throw new Error(
|
|
119
|
+
`${id}: a configured module needs a named default export`,
|
|
120
|
+
)
|
|
121
|
+
exported.push(`default:()=>${declaration.id.name}`)
|
|
122
|
+
} else if (
|
|
123
|
+
node.type === 'ExportNamedDeclaration' &&
|
|
124
|
+
node.exportKind !== 'type'
|
|
125
|
+
) {
|
|
126
|
+
if (node.source)
|
|
127
|
+
throw new Error(
|
|
128
|
+
`${id}: a configured module cannot re-export from another module`,
|
|
129
|
+
)
|
|
130
|
+
for (const specifier of node.specifiers) {
|
|
131
|
+
const { exported: name, local } = specifier
|
|
132
|
+
if (specifier.exportKind === 'type') continue
|
|
133
|
+
if (local.type !== 'Identifier')
|
|
134
|
+
throw new Error(`${id}: a configured module needs plain exports`)
|
|
135
|
+
exported.push(
|
|
136
|
+
`${JSON.stringify('name' in name ? name.name : name.value)}:()=>${local.name}`,
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
const declaration = node.declaration
|
|
140
|
+
if (declaration?.type === 'VariableDeclaration') {
|
|
141
|
+
for (const declarator of declaration.declarations) {
|
|
142
|
+
if (declarator.id.type !== 'Identifier')
|
|
143
|
+
throw new Error(
|
|
144
|
+
`${id}: a configured module needs plain exported variables`,
|
|
145
|
+
)
|
|
146
|
+
exported.push(`${declarator.id.name}:()=>${declarator.id.name}`)
|
|
147
|
+
}
|
|
148
|
+
} else if (
|
|
149
|
+
(declaration?.type === 'FunctionDeclaration' ||
|
|
150
|
+
declaration?.type === 'ClassDeclaration' ||
|
|
151
|
+
declaration?.type === 'TSEnumDeclaration') &&
|
|
152
|
+
declaration.id?.type === 'Identifier'
|
|
153
|
+
) {
|
|
154
|
+
exported.push(`${declaration.id.name}:()=>${declaration.id.name}`)
|
|
155
|
+
}
|
|
156
|
+
} else if (node.type === 'ExportAllDeclaration') {
|
|
157
|
+
throw new Error(
|
|
158
|
+
`${id}: a configured module cannot re-export from another module`,
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return `${code}\nglobalThis.${PEACH_WORKSPACE_MODULE_MARKER}=[${JSON.stringify(match.pattern)},{${exported.join(',')}}];`
|
|
163
|
+
},
|
|
96
164
|
async generateBundle(_options, bundle) {
|
|
97
165
|
if (options.enabled === false || dev) return
|
|
98
166
|
const versions = readInstalledNativePackageVersions(root)
|