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.
Files changed (105) hide show
  1. package/README.md +2 -2
  2. package/cli/bin.ts +1 -1
  3. package/cli/catalog/content.ts +520 -0
  4. package/cli/catalog/index.ts +4 -0
  5. package/cli/catalog/meta.ts +3881 -0
  6. package/cli/catalog/renderers.ts +659 -0
  7. package/cli/catalog/routes.ts +237 -0
  8. package/cli/catalog/types.ts +96 -0
  9. package/cli/commands/inspect.ts +3 -3
  10. package/cli/commands/record.ts +1 -1
  11. package/cli/dev-build-freshness.ts +1 -0
  12. package/cli/help-core.ts +6 -6
  13. package/cli/hidden-runtime-alias.ts +1 -1
  14. package/cli/parse-args.ts +1 -1
  15. package/dist-lib/agent-daemon-client.cjs +1 -1
  16. package/dist-lib/agent-events.cjs +1 -1
  17. package/dist-lib/attached-projects.cjs +1 -1
  18. package/dist-lib/auth/shared-session.cjs +1 -1
  19. package/dist-lib/backend-origin.cjs +1 -1
  20. package/dist-lib/beta.cjs +1 -1
  21. package/dist-lib/beta.mjs +1 -1
  22. package/dist-lib/bridge-constants.cjs +1 -1
  23. package/dist-lib/bridge-contract-input.cjs +1 -1
  24. package/dist-lib/bridge-contract-input.mjs +1 -1
  25. package/dist-lib/bridge-contract.cjs +1 -1
  26. package/dist-lib/bridge-contract.mjs +1 -1
  27. package/dist-lib/bundle-channel.cjs +32 -32
  28. package/dist-lib/capture-contract.cjs +1 -1
  29. package/dist-lib/capture-contract.mjs +1 -1
  30. package/dist-lib/cloud-contract.cjs +1 -1
  31. package/dist-lib/cloud-contract.mjs +1 -1
  32. package/dist-lib/cloud-test-args.cjs +1 -1
  33. package/dist-lib/cloud-test-args.mjs +1 -1
  34. package/dist-lib/cloud.cjs +1 -1
  35. package/dist-lib/cloud.mjs +1 -1
  36. package/dist-lib/config.cjs +1 -1
  37. package/dist-lib/config.mjs +1 -1
  38. package/dist-lib/detox/index.cjs +1 -1
  39. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  40. package/dist-lib/expo-swift-bundle.cjs +31 -31
  41. package/dist-lib/expo-swift-metadata.cjs +1 -1
  42. package/dist-lib/expo-swift-metadata.mjs +1 -1
  43. package/dist-lib/home-paths.cjs +1 -1
  44. package/dist-lib/host/bridge-host.cjs +32 -32
  45. package/dist-lib/host/fetch-proxy-handler.cjs +43 -40
  46. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  47. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  48. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  49. package/dist-lib/host/websocket-proxy.cjs +1 -1
  50. package/dist-lib/index.cjs +47 -44
  51. package/dist-lib/jump-to-source-babel.cjs +1 -1
  52. package/dist-lib/jump-to-source-native.cjs +1 -1
  53. package/dist-lib/kotlin-host.cjs +1 -1
  54. package/dist-lib/menu.cjs +1 -1
  55. package/dist-lib/menu.mjs +1 -1
  56. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  57. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  58. package/dist-lib/metro-production-bundle.cjs +1 -1
  59. package/dist-lib/metro-production-bundle.mjs +1 -1
  60. package/dist-lib/metro.cjs +52 -49
  61. package/dist-lib/native-app-identity-project.cjs +22 -19
  62. package/dist-lib/native-app-identity-project.mjs +4 -3
  63. package/dist-lib/native-app-identity.cjs +1 -1
  64. package/dist-lib/native-app-identity.mjs +1 -1
  65. package/dist-lib/native-firebase-metadata.cjs +1 -1
  66. package/dist-lib/native-firebase-metadata.mjs +1 -1
  67. package/dist-lib/pdfium-raster.cjs +1 -1
  68. package/dist-lib/pdfium-raster.mjs +1 -1
  69. package/dist-lib/plist.cjs +1 -1
  70. package/dist-lib/plist.mjs +1 -1
  71. package/dist-lib/profiles.cjs +1 -1
  72. package/dist-lib/public-brand.cjs +1 -1
  73. package/dist-lib/public-origins-lib-esm.json +24 -24
  74. package/dist-lib/public-origins-lib.json +59 -59
  75. package/dist-lib/react-native-host-modules.cjs +1 -1
  76. package/dist-lib/react-native-host-modules.mjs +1 -1
  77. package/dist-lib/reap-browser.cjs +1 -1
  78. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  79. package/dist-lib/sdk.cjs +1 -1
  80. package/dist-lib/sdk.mjs +1 -1
  81. package/dist-lib/skills.cjs +47 -47
  82. package/dist-lib/swift-compile.cjs +28 -30
  83. package/dist-lib/swift-compile.mjs +24 -26
  84. package/dist-lib/swift-package.cjs +1 -1
  85. package/dist-lib/swift-package.mjs +1 -1
  86. package/dist-lib/swift-submit.cjs +1 -1
  87. package/dist-lib/swift-submit.mjs +1 -1
  88. package/dist-lib/swift-toolchain.cjs +1 -1
  89. package/dist-lib/swift.cjs +1 -1
  90. package/dist-lib/vite-swift.cjs +29 -31
  91. package/dist-lib/vite.cjs +38 -35
  92. package/dist-lib/worklet-executable.cjs +1 -1
  93. package/dist-lib/worklet-executable.mjs +1 -1
  94. package/kotlin/sdk.tar.gz +0 -0
  95. package/kotlin/toolchain.json +2 -2
  96. package/package.json +1 -3
  97. package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GKState.h +78 -0
  98. package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GKStateMachine.h +69 -0
  99. package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GameplayKit.apinotes +269 -0
  100. package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GameplayKit.h +15 -0
  101. package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GameplayKitBase.h +38 -0
  102. package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Modules/module.modulemap +6 -0
  103. package/src/wasm-optimize.ts +23 -24
  104. package/src/worklets-babel.ts +2 -6
  105. 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")))
@@ -0,0 +1,6 @@
1
+ framework module GameplayKit{
2
+ umbrella header "GameplayKit.h"
3
+
4
+ export *
5
+ module * { export * }
6
+ }
@@ -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 wasm-opt resolves for its own platform
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, WASM_OPT_PATH: binary }
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 promisify(execFile)(
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
- const result = await wasmOpt(
118
- [
119
- ...LOWERING,
120
- ...(optimize ? ['-Oz'] : []),
121
- ...names,
122
- ...skipPasses.flatMap((pass) => ['--skip-pass', pass]),
123
- ...features,
124
- narrowed ? merged : file,
125
- '-o',
126
- output,
127
- ],
128
- { env: environment },
129
- )
130
- if (narrowed) rmSync(merged)
131
- if (result.status !== 0)
132
- throw new Error(`wasm-opt exited ${result.status}: ${result.stderr}`)
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}`)
@@ -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
@@ -1,2 +0,0 @@
1
- export * from '@peach/skills/cli'
2
- export * from './command-registry'