peachsim 0.1.2409 → 0.1.2411

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 (112) hide show
  1. package/README.md +2 -5
  2. package/cli/internal-child-contract.ts +0 -1
  3. package/cli/internal-child.ts +0 -6
  4. package/cli/outbound-endpoints.ts +0 -23
  5. package/dist-lib/agent-daemon-client.cjs +1 -1
  6. package/dist-lib/agent-events.cjs +1 -1
  7. package/dist-lib/attached-projects.cjs +1 -1
  8. package/dist-lib/auth/shared-session.cjs +1 -1
  9. package/dist-lib/backend-origin.cjs +1 -1
  10. package/dist-lib/beta.cjs +1 -1
  11. package/dist-lib/beta.mjs +1 -1
  12. package/dist-lib/bridge-constants.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.mjs +1 -1
  15. package/dist-lib/bridge-contract.cjs +1 -1
  16. package/dist-lib/bridge-contract.mjs +1 -1
  17. package/dist-lib/bundle-channel.cjs +10313 -4172
  18. package/dist-lib/capture-contract.cjs +1 -1
  19. package/dist-lib/capture-contract.mjs +1 -1
  20. package/dist-lib/cloud-contract.cjs +1 -1
  21. package/dist-lib/cloud-contract.mjs +1 -1
  22. package/dist-lib/cloud-test-args.cjs +1 -1
  23. package/dist-lib/cloud-test-args.mjs +1 -1
  24. package/dist-lib/cloud.cjs +1 -1
  25. package/dist-lib/cloud.mjs +1 -1
  26. package/dist-lib/config.cjs +1 -1
  27. package/dist-lib/config.mjs +1 -1
  28. package/dist-lib/detox/index.cjs +1 -1
  29. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  30. package/dist-lib/expo-swift-bundle.cjs +11579 -5438
  31. package/dist-lib/expo-swift-metadata.cjs +1 -1
  32. package/dist-lib/expo-swift-metadata.mjs +1 -1
  33. package/dist-lib/home-paths.cjs +1 -1
  34. package/dist-lib/host/bridge-host.cjs +12830 -6689
  35. package/dist-lib/host/fetch-proxy-handler.cjs +925 -151
  36. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  37. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  38. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  39. package/dist-lib/host/websocket-proxy.cjs +1 -1
  40. package/dist-lib/index.cjs +1045 -246
  41. package/dist-lib/jump-to-source-babel.cjs +1 -1
  42. package/dist-lib/jump-to-source-native.cjs +1 -1
  43. package/dist-lib/kotlin-host.cjs +1 -1
  44. package/dist-lib/menu.cjs +1 -1
  45. package/dist-lib/menu.mjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  47. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  48. package/dist-lib/metro-production-bundle.cjs +1 -1
  49. package/dist-lib/metro-production-bundle.mjs +1 -1
  50. package/dist-lib/metro.cjs +961 -162
  51. package/dist-lib/native-app-identity-project.cjs +36 -11
  52. package/dist-lib/native-app-identity-project.mjs +36 -11
  53. package/dist-lib/native-app-identity.cjs +1 -1
  54. package/dist-lib/native-app-identity.mjs +1 -1
  55. package/dist-lib/native-firebase-metadata.cjs +1 -1
  56. package/dist-lib/native-firebase-metadata.mjs +1 -1
  57. package/dist-lib/pdfium-raster.cjs +1 -1
  58. package/dist-lib/pdfium-raster.mjs +1 -1
  59. package/dist-lib/plist.cjs +1 -1
  60. package/dist-lib/plist.mjs +1 -1
  61. package/dist-lib/profiles.cjs +1 -1
  62. package/dist-lib/public-brand.cjs +1 -1
  63. package/dist-lib/public-origins-lib-esm.json +24 -24
  64. package/dist-lib/public-origins-lib.json +124 -104
  65. package/dist-lib/react-native-host-modules.cjs +1 -1
  66. package/dist-lib/react-native-host-modules.mjs +1 -1
  67. package/dist-lib/reap-browser.cjs +1 -1
  68. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  69. package/dist-lib/sdk.cjs +1 -1
  70. package/dist-lib/sdk.mjs +1 -1
  71. package/dist-lib/skills.cjs +13937 -7796
  72. package/dist-lib/swift-compile.cjs +62 -14
  73. package/dist-lib/swift-compile.mjs +62 -13
  74. package/dist-lib/swift-package.cjs +1 -1
  75. package/dist-lib/swift-package.mjs +1 -1
  76. package/dist-lib/swift-submit.cjs +1 -1
  77. package/dist-lib/swift-submit.mjs +1 -1
  78. package/dist-lib/swift-toolchain.cjs +1 -1
  79. package/dist-lib/swift.cjs +1 -1
  80. package/dist-lib/vite-swift.cjs +110 -28
  81. package/dist-lib/vite.cjs +3101 -2327
  82. package/dist-lib/worklet-executable.cjs +1 -1
  83. package/dist-lib/worklet-executable.mjs +1 -1
  84. package/kotlin/sdk.tar.gz +0 -0
  85. package/package.json +3 -3
  86. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +1 -1
  87. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAsset.h +1 -1
  88. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetResource.h +1 -1
  89. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHChange.h +1 -1
  90. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHFetchOptions.h +1 -1
  91. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHFetchResult.h +1 -1
  92. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHImageManager.h +2 -2
  93. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHObject.h +1 -1
  94. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHPhotoLibrary.h +2 -2
  95. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +1 -1
  96. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIVibrancyEffect.h +1 -1
  97. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIVisualEffectView.h +1 -1
  98. package/sdk/ios/System/Library/Frameworks/UIKitActivity.framework/Headers/UIKitActivity.h +1 -1
  99. package/src/nitro-adapter.lock.json +262 -262
  100. package/src/nitro-superset.lock.json +4 -4
  101. package/src/podspec-cocoapods.ts +934 -0
  102. package/src/podspec-prism.ts +66 -0
  103. package/src/podspec-ruby-stdlib.ts +1121 -0
  104. package/src/podspec-ruby.ts +5175 -0
  105. package/src/podspec-sources.ts +25 -112
  106. package/src/swift-compile.ts +70 -12
  107. package/src/swift-distribution.lock.json +9 -8
  108. package/src/swift-host.ts +14 -4
  109. package/src/turbo-runtime.lock.json +19 -19
  110. package/src/xcode-project.ts +37 -11
  111. package/cli/drivers/linux-cocoapods.lock.json +0 -303
  112. package/cli/drivers/linux-cocoapods.ts +0 -99
@@ -0,0 +1,66 @@
1
+ // Ruby's own parser, Prism, compiled to wasm. it needs only libc's WASI
2
+ // imports and no preopened directories, so a synchronous instance with inert
3
+ // stubs parses without node:wasi.
4
+ import { randomFillSync } from 'node:crypto'
5
+ import fs from 'node:fs'
6
+ import { createRequire } from 'node:module'
7
+ import { parsePrism } from '@ruby/prism/src/parsePrism.js'
8
+ import type { ProgramNode } from '@ruby/prism/src/nodes.js'
9
+
10
+ declare const __PEACH_PRISM_WASM__: string | undefined
11
+
12
+ export class RubySyntaxError extends Error {}
13
+
14
+ type PrismExports = Parameters<typeof parsePrism>[0]
15
+ let exports: PrismExports | null = null
16
+
17
+ function prism(): PrismExports {
18
+ if (exports) return exports
19
+ const bytes =
20
+ typeof __PEACH_PRISM_WASM__ === 'string'
21
+ ? Buffer.from(__PEACH_PRISM_WASM__, 'base64')
22
+ : fs.readFileSync(
23
+ createRequire(import.meta.url).resolve('@ruby/prism/src/prism.wasm'),
24
+ )
25
+ let memory: WebAssembly.Memory | null = null
26
+ const EBADF = 8
27
+ const ENOSYS = 52
28
+ const instance = new WebAssembly.Instance(new WebAssembly.Module(bytes), {
29
+ wasi_snapshot_preview1: {
30
+ fd_close: () => EBADF,
31
+ fd_prestat_get: () => EBADF,
32
+ fd_prestat_dir_name: () => EBADF,
33
+ fd_seek: () => ENOSYS,
34
+ fd_write: () => ENOSYS,
35
+ proc_exit: (code: number) => {
36
+ throw new Error(`prism exited ${code}`)
37
+ },
38
+ random_get: (pointer: number, length: number) => {
39
+ if (memory) randomFillSync(new Uint8Array(memory.buffer, pointer, length))
40
+ return 0
41
+ },
42
+ },
43
+ })
44
+ const exported = instance.exports
45
+ if (!(exported.memory instanceof WebAssembly.Memory))
46
+ throw new Error('prism.wasm exports no memory')
47
+ memory = exported.memory
48
+ const initialize = exported._initialize
49
+ if (typeof initialize === 'function') initialize()
50
+ exports = exported
51
+ return exports
52
+ }
53
+
54
+ const parsed = new Map<string, { source: string; program: ProgramNode }>()
55
+
56
+ /** the syntax tree Prism builds for `source`; `file` names it in errors and `__FILE__`. */
57
+ export function parseRuby(source: string, file: string): ProgramNode {
58
+ const cached = parsed.get(file)
59
+ if (cached?.source === source) return cached.program
60
+ const result = parsePrism(prism(), new TextEncoder().encode(source), { filepath: file })
61
+ const error = result.errors[0]
62
+ if (error)
63
+ throw new RubySyntaxError(`${file}:${error.location.startLine()}: ${error.message}`)
64
+ parsed.set(file, { source, program: result.value })
65
+ return result.value
66
+ }