peachsim 0.1.2400 → 0.1.2401
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 +2 -2
- package/cli/bin.ts +1 -1
- package/cli/catalog/content.ts +520 -0
- package/cli/catalog/index.ts +4 -0
- package/cli/catalog/meta.ts +3881 -0
- package/cli/catalog/renderers.ts +659 -0
- package/cli/catalog/routes.ts +237 -0
- package/cli/catalog/types.ts +96 -0
- package/cli/commands/inspect.ts +3 -3
- package/cli/commands/record.ts +1 -1
- package/cli/dev-build-freshness.ts +1 -0
- package/cli/help-core.ts +6 -6
- package/cli/hidden-runtime-alias.ts +1 -1
- package/cli/parse-args.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 +32 -32
- 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 +31 -31
- 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 +32 -32
- package/dist-lib/host/fetch-proxy-handler.cjs +43 -40
- 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 +47 -44
- 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 +52 -49
- package/dist-lib/native-app-identity-project.cjs +22 -19
- package/dist-lib/native-app-identity-project.mjs +4 -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 +59 -59
- 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 +47 -47
- package/dist-lib/swift-compile.cjs +28 -30
- package/dist-lib/swift-compile.mjs +24 -26
- 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 +29 -31
- package/dist-lib/vite.cjs +38 -35
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/kotlin/sdk.tar.gz +0 -0
- package/kotlin/toolchain.json +2 -2
- package/package.json +1 -3
- package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GKState.h +78 -0
- package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GKStateMachine.h +69 -0
- package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GameplayKit.apinotes +269 -0
- package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GameplayKit.h +15 -0
- package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GameplayKitBase.h +38 -0
- package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Modules/module.modulemap +6 -0
- package/src/wasm-optimize.ts +23 -24
- package/src/worklets-babel.ts +2 -6
- package/cli/registry.ts +0 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GameplayKit.h
|
|
3
|
+
// GameplayKit
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2014 Apple. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
// the swift module declares every other gameplaykit class; these headers are
|
|
11
|
+
// the state machine classes it implements as objective-c classes.
|
|
12
|
+
#import <GameplayKit/GameplayKitBase.h>
|
|
13
|
+
|
|
14
|
+
#import <GameplayKit/GKState.h>
|
|
15
|
+
#import <GameplayKit/GKStateMachine.h>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GameplayKitBase.h
|
|
3
|
+
// GameplayKit
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2014 Apple. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#import <simd/simd.h>
|
|
10
|
+
#import <Availability.h>
|
|
11
|
+
#import <TargetConditionals.h>
|
|
12
|
+
|
|
13
|
+
//Exporting
|
|
14
|
+
#ifdef __cplusplus
|
|
15
|
+
#define GK_EXPORT extern "C" __attribute__((visibility ("default")))
|
|
16
|
+
#else
|
|
17
|
+
#define GK_EXPORT extern __attribute__((visibility ("default")))
|
|
18
|
+
#endif
|
|
19
|
+
|
|
20
|
+
//Visibility
|
|
21
|
+
#define GK_DEFAULT __attribute__((visibility ("default")))
|
|
22
|
+
|
|
23
|
+
//Availability
|
|
24
|
+
#define GK_BASE_AVAILABILITY NS_CLASS_AVAILABLE(10_11, 9_0)
|
|
25
|
+
#define GK_BASE_AVAILABILITY_2 NS_CLASS_AVAILABLE(10_12, 10_0)
|
|
26
|
+
#define GK_BASE_AVAILABILITY_3 NS_CLASS_AVAILABLE(10_13, 11_0)
|
|
27
|
+
|
|
28
|
+
#define GK_AVAILABLE __OSX_AVAILABLE_STARTING
|
|
29
|
+
|
|
30
|
+
//Inlining
|
|
31
|
+
#define GK_FORCE_INLINE __inline__ __attribute__((always_inline))
|
|
32
|
+
|
|
33
|
+
//Branch prediction
|
|
34
|
+
#define GK_LIKELY(x) __builtin_expect(!!(x), 1)
|
|
35
|
+
#define GK_UNLIKELY(x) __builtin_expect(!!(x), 0)
|
|
36
|
+
|
|
37
|
+
// Attribute annotation to parse properties from GKComponent derived component classes
|
|
38
|
+
#define GKInspectable __attribute__((annotate("gk_inspectable")))
|
package/src/wasm-optimize.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { existsSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
|
|
|
3
3
|
import { dirname, join } from 'node:path'
|
|
4
4
|
import { promisify } from 'node:util'
|
|
5
5
|
import { installVerifiedTarball } from '@contrast/runtime-delivery'
|
|
6
|
-
import { BINARYEN_VERSION, wasmOpt } from 'wasm-opt'
|
|
7
6
|
import { windowAdmission } from './admitted-mac-build'
|
|
8
7
|
import { rnxHomeDir } from './home-paths'
|
|
9
8
|
import {
|
|
@@ -36,13 +35,13 @@ const FEATURES = [
|
|
|
36
35
|
export const KEEP_WASM_NAMES = process.env.PEACH_SWIFT_NAMES === '1'
|
|
37
36
|
|
|
38
37
|
const LOWERING = ['--memory64-lowering', '--table64-lowering']
|
|
38
|
+
const BINARYEN_VERSION = '132'
|
|
39
|
+
const runBinaryen = promisify(execFile)
|
|
39
40
|
|
|
40
41
|
/** feeds the artifact hash: a new optimizer or flag set is a new artifact. */
|
|
41
42
|
export const WASM_LOWER_IDENTITY = `binaryen ${BINARYEN_VERSION} narrow ${LOWERING.join(' ')} ${FEATURES.join(',')} unoptimized-names`
|
|
42
43
|
|
|
43
|
-
// the sha256 of each Binaryen release archive
|
|
44
|
-
// keys; update both when the wasm-opt package moves BINARYEN_VERSION.
|
|
45
|
-
const PINNED_BINARYEN_VERSION = '132'
|
|
44
|
+
// the sha256 of each supported Binaryen release archive
|
|
46
45
|
const BINARYEN_RELEASES = new Map([
|
|
47
46
|
[
|
|
48
47
|
'linux-x64',
|
|
@@ -79,7 +78,7 @@ async function runWasmOpt(
|
|
|
79
78
|
): Promise<void> {
|
|
80
79
|
const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES)
|
|
81
80
|
const requestedCores = Number(process.env.BINARYEN_CORES)
|
|
82
|
-
const environment: NodeJS.ProcessEnv = { ...process.env
|
|
81
|
+
const environment: NodeJS.ProcessEnv = { ...process.env }
|
|
83
82
|
if (Number.isInteger(admittedCores) && admittedCores > 0)
|
|
84
83
|
environment.BINARYEN_CORES = String(
|
|
85
84
|
Number.isInteger(requestedCores) && requestedCores > 0
|
|
@@ -96,7 +95,7 @@ async function runWasmOpt(
|
|
|
96
95
|
const thunks = `${output}.thunks.wat`
|
|
97
96
|
writeFileSync(guest, narrowed.module)
|
|
98
97
|
writeFileSync(thunks, narrowed.thunks)
|
|
99
|
-
await
|
|
98
|
+
await runBinaryen(
|
|
100
99
|
join(dirname(binary), 'wasm-merge'),
|
|
101
100
|
[
|
|
102
101
|
...features,
|
|
@@ -114,28 +113,28 @@ async function runWasmOpt(
|
|
|
114
113
|
rmSync(guest)
|
|
115
114
|
rmSync(thunks)
|
|
116
115
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
116
|
+
try {
|
|
117
|
+
await runBinaryen(
|
|
118
|
+
binary,
|
|
119
|
+
[
|
|
120
|
+
...LOWERING,
|
|
121
|
+
...(optimize ? ['-Oz'] : []),
|
|
122
|
+
...names,
|
|
123
|
+
...skipPasses.flatMap((pass) => ['--skip-pass', pass]),
|
|
124
|
+
...features,
|
|
125
|
+
narrowed ? merged : file,
|
|
126
|
+
'-o',
|
|
127
|
+
output,
|
|
128
|
+
],
|
|
129
|
+
{ env: environment, maxBuffer: Infinity },
|
|
130
|
+
)
|
|
131
|
+
} finally {
|
|
132
|
+
if (narrowed) rmSync(merged)
|
|
133
|
+
}
|
|
133
134
|
}
|
|
134
135
|
|
|
135
136
|
// use the same verified binary on every host so the artifact identity is true.
|
|
136
137
|
async function installWasmOpt(): Promise<string> {
|
|
137
|
-
if (BINARYEN_VERSION !== PINNED_BINARYEN_VERSION)
|
|
138
|
-
throw new Error('the Binaryen release pins must match the wasm-opt package')
|
|
139
138
|
const platform = `${process.platform}-${process.arch}`
|
|
140
139
|
const release = BINARYEN_RELEASES.get(platform)
|
|
141
140
|
if (!release) throw new Error(`no pinned Binaryen release for ${platform}`)
|
package/src/worklets-babel.ts
CHANGED
|
@@ -50,7 +50,6 @@ export const REANIMATED_WORKLETIZATION_REGEX = new RegExp(
|
|
|
50
50
|
const REANIMATED_IGNORED_PATHS_REGEX =
|
|
51
51
|
/node_modules\/(react|react-dom|react-native|react-native-web)\//
|
|
52
52
|
const SOOTSIM_ENGINE_SRC_PATH = '/packages/peach-engine/src/'
|
|
53
|
-
const SOOTSIM_ENGINE_TEST_FIXTURE_PATH = '/packages/peach-engine/src/test-fixtures/'
|
|
54
53
|
const REANIMATED_IMPORT_REGEX =
|
|
55
54
|
/(?:from\s+['"]react-native-reanimated(?:\/[^'"]*)?['"]|require\(\s*['"]react-native-reanimated(?:\/[^'"]*)?['"]\s*\))/
|
|
56
55
|
|
|
@@ -61,6 +60,7 @@ const REANIMATED_IMPORT_REGEX =
|
|
|
61
60
|
const ENGINE_STAND_IN_PATHS = [
|
|
62
61
|
'/packages/peach-engine/src/',
|
|
63
62
|
'/packages/peach-compat/src/',
|
|
63
|
+
'/conformance-corpus/peach-engine/fixtures/',
|
|
64
64
|
]
|
|
65
65
|
|
|
66
66
|
const workletsPlugins = new Map<string, { path: string; identity: string }>()
|
|
@@ -78,11 +78,7 @@ export function shouldApplyWorkletsPlugin(id: string, code: string): boolean {
|
|
|
78
78
|
// hooks. without an upstream import, require an authored worklet directive
|
|
79
79
|
// before letting the plugin rewrite callbacks. keyboard hooks and shared
|
|
80
80
|
// worklet helpers need no direct reanimated import.
|
|
81
|
-
if (
|
|
82
|
-
id.includes(SOOTSIM_ENGINE_SRC_PATH) &&
|
|
83
|
-
!id.includes(SOOTSIM_ENGINE_TEST_FIXTURE_PATH) &&
|
|
84
|
-
!REANIMATED_IMPORT_REGEX.test(code)
|
|
85
|
-
) {
|
|
81
|
+
if (id.includes(SOOTSIM_ENGINE_SRC_PATH) && !REANIMATED_IMPORT_REGEX.test(code)) {
|
|
86
82
|
if (!/['"]worklet['"]/.test(code)) return false
|
|
87
83
|
const syntax = parseSync(id, code, {
|
|
88
84
|
lang: isTypescriptFile(id) ? 'tsx' : 'jsx',
|
package/cli/registry.ts
DELETED