peachsim 0.1.2400 → 0.1.2402

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 (126) hide show
  1. package/README.md +2 -2
  2. package/cli/bin.ts +1 -1
  3. package/cli/bridge-flow-runner.ts +1 -1
  4. package/cli/catalog/content.ts +520 -0
  5. package/cli/catalog/index.ts +4 -0
  6. package/cli/catalog/meta.ts +3881 -0
  7. package/cli/catalog/renderers.ts +659 -0
  8. package/cli/catalog/routes.ts +237 -0
  9. package/cli/catalog/types.ts +96 -0
  10. package/cli/cloud-client.ts +4 -1
  11. package/cli/commands/box.ts +6 -0
  12. package/cli/commands/inspect.ts +3 -3
  13. package/cli/commands/map.ts +1 -0
  14. package/cli/commands/platform.ts +2 -0
  15. package/cli/commands/record.ts +1 -1
  16. package/cli/commands/stream.ts +2 -0
  17. package/cli/dev-build-freshness.ts +1 -0
  18. package/cli/help-core.ts +6 -6
  19. package/cli/hidden-runtime-alias.ts +1 -1
  20. package/cli/outbound-endpoints.ts +3 -3
  21. package/cli/parse-args.ts +1 -1
  22. package/cli/run-registry.ts +25 -27
  23. package/dist-lib/agent-daemon-client.cjs +1 -1
  24. package/dist-lib/agent-events.cjs +1 -1
  25. package/dist-lib/attached-projects.cjs +1 -1
  26. package/dist-lib/auth/shared-session.cjs +1 -1
  27. package/dist-lib/backend-origin.cjs +1 -1
  28. package/dist-lib/beta.cjs +1 -1
  29. package/dist-lib/beta.mjs +1 -1
  30. package/dist-lib/bridge-constants.cjs +1 -1
  31. package/dist-lib/bridge-contract-input.cjs +1 -1
  32. package/dist-lib/bridge-contract-input.mjs +1 -1
  33. package/dist-lib/bridge-contract.cjs +1 -1
  34. package/dist-lib/bridge-contract.mjs +1 -1
  35. package/dist-lib/bundle-channel.cjs +50 -44
  36. package/dist-lib/capture-contract.cjs +1 -1
  37. package/dist-lib/capture-contract.mjs +1 -1
  38. package/dist-lib/cloud-contract.cjs +1 -1
  39. package/dist-lib/cloud-contract.mjs +1 -1
  40. package/dist-lib/cloud-test-args.cjs +1 -1
  41. package/dist-lib/cloud-test-args.mjs +1 -1
  42. package/dist-lib/cloud.cjs +1 -1
  43. package/dist-lib/cloud.mjs +1 -1
  44. package/dist-lib/config.cjs +1 -1
  45. package/dist-lib/config.mjs +1 -1
  46. package/dist-lib/detox/index.cjs +1 -1
  47. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  48. package/dist-lib/expo-swift-bundle.cjs +31 -31
  49. package/dist-lib/expo-swift-metadata.cjs +1 -1
  50. package/dist-lib/expo-swift-metadata.mjs +1 -1
  51. package/dist-lib/home-paths.cjs +1 -1
  52. package/dist-lib/host/bridge-host.cjs +75 -44
  53. package/dist-lib/host/fetch-proxy-handler.cjs +43 -40
  54. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  55. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  56. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  57. package/dist-lib/host/websocket-proxy.cjs +1 -1
  58. package/dist-lib/index.cjs +47 -44
  59. package/dist-lib/jump-to-source-babel.cjs +1 -1
  60. package/dist-lib/jump-to-source-native.cjs +1 -1
  61. package/dist-lib/kotlin-host.cjs +15 -9
  62. package/dist-lib/menu.cjs +1 -1
  63. package/dist-lib/menu.mjs +1 -1
  64. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  65. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  66. package/dist-lib/metro-production-bundle.cjs +1 -1
  67. package/dist-lib/metro-production-bundle.mjs +1 -1
  68. package/dist-lib/metro.cjs +52 -49
  69. package/dist-lib/native-app-identity-project.cjs +22 -19
  70. package/dist-lib/native-app-identity-project.mjs +4 -3
  71. package/dist-lib/native-app-identity.cjs +1 -1
  72. package/dist-lib/native-app-identity.mjs +1 -1
  73. package/dist-lib/native-firebase-metadata.cjs +1 -1
  74. package/dist-lib/native-firebase-metadata.mjs +1 -1
  75. package/dist-lib/pdfium-raster.cjs +1 -1
  76. package/dist-lib/pdfium-raster.mjs +1 -1
  77. package/dist-lib/plist.cjs +1 -1
  78. package/dist-lib/plist.mjs +1 -1
  79. package/dist-lib/profiles.cjs +1 -1
  80. package/dist-lib/public-brand.cjs +1 -1
  81. package/dist-lib/public-origins-lib-esm.json +24 -24
  82. package/dist-lib/public-origins-lib.json +65 -62
  83. package/dist-lib/react-native-host-modules.cjs +1 -1
  84. package/dist-lib/react-native-host-modules.mjs +1 -1
  85. package/dist-lib/reap-browser.cjs +1 -1
  86. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  87. package/dist-lib/sdk.cjs +1 -1
  88. package/dist-lib/sdk.mjs +1 -1
  89. package/dist-lib/skills.cjs +156 -120
  90. package/dist-lib/swift-compile.cjs +28 -30
  91. package/dist-lib/swift-compile.mjs +24 -26
  92. package/dist-lib/swift-package.cjs +1 -1
  93. package/dist-lib/swift-package.mjs +1 -1
  94. package/dist-lib/swift-submit.cjs +1 -1
  95. package/dist-lib/swift-submit.mjs +1 -1
  96. package/dist-lib/swift-toolchain.cjs +1 -1
  97. package/dist-lib/swift.cjs +1 -1
  98. package/dist-lib/vite-swift.cjs +29 -31
  99. package/dist-lib/vite.cjs +38 -35
  100. package/dist-lib/worklet-executable.cjs +1 -1
  101. package/dist-lib/worklet-executable.mjs +1 -1
  102. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +4 -0
  103. package/dist-types/packages/peach-engine/src/ios/apps/canvas-map-data.d.ts +13 -0
  104. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +6 -1
  105. package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +6 -0
  106. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +6 -0
  107. package/kotlin/sdk.tar.gz +0 -0
  108. package/kotlin/toolchain.json +2 -2
  109. package/package.json +1 -3
  110. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSValueTransformer.h +2 -2
  111. package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GKState.h +78 -0
  112. package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GKStateMachine.h +69 -0
  113. package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GameplayKit.apinotes +269 -0
  114. package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GameplayKit.h +15 -0
  115. package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Headers/GameplayKitBase.h +38 -0
  116. package/sdk/ios/System/Library/Frameworks/GameplayKit.framework/Modules/module.modulemap +6 -0
  117. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +8 -4
  118. package/src/android-gradle-sources.ts +14 -8
  119. package/src/androidGradleContract.ts +2 -0
  120. package/src/nitro-adapter.lock.json +232 -232
  121. package/src/nitro-superset.lock.json +4 -4
  122. package/src/swift-distribution.lock.json +8 -8
  123. package/src/turbo-runtime.lock.json +19 -19
  124. package/src/wasm-optimize.ts +23 -24
  125. package/src/worklets-babel.ts +2 -6
  126. package/cli/registry.ts +0 -2
@@ -12,7 +12,7 @@
12
12
  "checksum": "8bad20813c74d19d242f1f2d05b7afacbaad6be6930bc3b696dfa2c3e41f0297"
13
13
  },
14
14
  "framework": {
15
- "distribution": "b1fffe7f5d001ecc",
15
+ "distribution": "bc40ad2d5d02ab07",
16
16
  "wireAbi": "38eed69f6b7391584112981b7892914e7033d7e0c17c2e8d4a4448030618bd2b"
17
17
  },
18
18
  "archives": [
@@ -20,71 +20,71 @@
20
20
  "headers": {
21
21
  "reactNativeJsi": "0f8c2defbca69a27a848a81ae72363073bf9602fd316e57a75811be1a0528358"
22
22
  },
23
- "sha256": "600406142f2c6ab0148af08fecd0a439191645e8b7f675ba998c8d81f2a65186",
24
- "size": 26177
23
+ "sha256": "2614118da2d86bb9f647b84ad3bb6ac2b5bc13f0d0f6e1bfc23e0ed6a7626356",
24
+ "size": 26179
25
25
  },
26
26
  {
27
27
  "headers": {
28
28
  "reactNativeJsi": "21a624ea24fd17d56bf26832d496fc1177067f89640414c20e6486c7984dfb0a"
29
29
  },
30
- "sha256": "071848715a9fac0aa41e6675fb6ca40a446b8da45a53f952b5428d2bb023c066",
31
- "size": 26916
30
+ "sha256": "c93c41da7ca8d9d2224755e1157e38d9c16a2f3f10b0e5a72df93e01955e6254",
31
+ "size": 26917
32
32
  },
33
33
  {
34
34
  "headers": {
35
35
  "reactNativeJsi": "324aefd8591d9ce688bce7589c4c2b516cd33ecb95d35c47239a87a8fcf6a8da"
36
36
  },
37
- "sha256": "83e4949a793eeddd74fed9accf0123f4b7e45138190f53650a48dd027e13e3cc",
38
- "size": 26167
37
+ "sha256": "22ab1e2624df513bb839f60801053c6bfea16b5893d5cf79aa8b493ef365a4ff",
38
+ "size": 26168
39
39
  },
40
40
  {
41
41
  "headers": {
42
42
  "reactNativeJsi": "33596664ee7d7a6623f0796a6feb429543316c3a41b211150acda6e1d835286c"
43
43
  },
44
- "sha256": "be7792f3da85a83fb9fdf5bb9062e889531e113ec984cc0c0ee5e8c1d7ca6a32",
45
- "size": 25958
44
+ "sha256": "5a8b143f5156fd6eeb4b2dfbba8a03db3bc53d149069d9b1fde7e34819cb491e",
45
+ "size": 25959
46
46
  },
47
47
  {
48
48
  "headers": {
49
49
  "reactNativeJsi": "66b2cd5a38511195207f6c8a76aba735f9b9cc66a52a0d00780ffe5d331623f7"
50
50
  },
51
- "sha256": "b2c4b2580d20d431cea3021d0208b76463268861178264f2525dd9974b66af87",
52
- "size": 26175
51
+ "sha256": "e0d1ffd5378fe3d9f810fbed6212701d995072e06abb3779727a286c21439e68",
52
+ "size": 26177
53
53
  },
54
54
  {
55
55
  "headers": {
56
56
  "reactNativeJsi": "96db4e758dd53e9320cef7cad485e00aa06e7a982cefd920f17007de8a5bd9f9"
57
57
  },
58
- "sha256": "28545384e475c172080b9b590aa8efde8a7c14e45601d954f09375125bbbb62d",
59
- "size": 26910
58
+ "sha256": "58b321f114b51ff8da608af62cc7cc475dc0dd66548b45d502803f43e4d3395a",
59
+ "size": 26911
60
60
  },
61
61
  {
62
62
  "headers": {
63
63
  "reactNativeJsi": "aeab590ddd1218df963462242d3954ce467b0fa88f70e91429e4ffc74d230893"
64
64
  },
65
- "sha256": "893f325167897e53009245bd1b6e49ca2214bfef578095213128d704a29457cb",
65
+ "sha256": "d06fb5890b8bd2df42caa1a37622c76b987110a92c8457113891ae5fe817a731",
66
66
  "size": 26916
67
67
  },
68
68
  {
69
69
  "headers": {
70
70
  "reactNativeJsi": "b5fb260522384dd7ab07d740cdc534b529922446fcec798341c7817d9eaa49f4"
71
71
  },
72
- "sha256": "48571954285b7837775abcdd3a5636becf17b8572df6a025cd64c246035c2537",
73
- "size": 26046
72
+ "sha256": "4597f353aee8fa8613960e280dffb2db1b893194b163a5cc098a1c99b3b93e64",
73
+ "size": 26047
74
74
  },
75
75
  {
76
76
  "headers": {
77
77
  "reactNativeJsi": "c6b391a1e870ccf7cdd534be63582862840f8245b99ebd253317deece1e6ffd5"
78
78
  },
79
- "sha256": "97c6815bf6a667c759daa1360d16f7fc76ae35907059cd63dc0606c76a9af436",
79
+ "sha256": "26150e17a86dd52ed8f6575f3de2f07812c833dcedbe1313e81358f1439337ba",
80
80
  "size": 26914
81
81
  },
82
82
  {
83
83
  "headers": {
84
84
  "reactNativeJsi": "c8270f1315745ecc204c4209a4f50f58ff6f14b4a385ad6820a69800270b53c6"
85
85
  },
86
- "sha256": "85a2b1f006e45ba4f6aeb6bfc5e22cecba84b9abb54d797c142ac368ef91758f",
87
- "size": 25917
86
+ "sha256": "3161e3e6e71bdebb9db6ecac952e76be789d10a086e050ecfe735913523633af",
87
+ "size": 25919
88
88
  }
89
89
  ]
90
90
  }
@@ -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'