peachsim 0.1.2410 → 0.1.2412
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 -5
- package/cli/internal-child-contract.ts +0 -1
- package/cli/internal-child.ts +0 -6
- package/cli/outbound-endpoints.ts +0 -23
- 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 +10390 -4177
- 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 +11656 -5443
- 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 +12910 -6697
- package/dist-lib/host/fetch-proxy-handler.cjs +925 -151
- 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 +1018 -240
- 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 +934 -156
- package/dist-lib/native-app-identity-project.cjs +9 -5
- package/dist-lib/native-app-identity-project.mjs +9 -5
- 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 +124 -104
- 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 +14016 -7803
- package/dist-lib/swift-compile.cjs +62 -14
- package/dist-lib/swift-compile.mjs +62 -13
- 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 +190 -36
- package/dist-lib/vite.cjs +3101 -2327
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +5 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +3 -3
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAsset.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetResource.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHChange.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHFetchOptions.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHFetchResult.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHImageManager.h +2 -2
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHObject.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHPhotoLibrary.h +2 -2
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIVibrancyEffect.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIVisualEffectView.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKitActivity.framework/Headers/UIKitActivity.h +1 -1
- package/src/expo-native-workspace.ts +4 -0
- package/src/nitro-adapter.lock.json +262 -262
- package/src/nitro-superset.lock.json +4 -4
- package/src/podspec-cocoapods.ts +934 -0
- package/src/podspec-prism.ts +66 -0
- package/src/podspec-ruby-stdlib.ts +1121 -0
- package/src/podspec-ruby.ts +5175 -0
- package/src/podspec-sources.ts +25 -112
- package/src/swift-compile.ts +70 -12
- package/src/swift-distribution.lock.json +9 -8
- package/src/swift-host.ts +96 -19
- package/src/swift-objc-compile.ts +5 -0
- package/src/swift-packages.ts +46 -0
- package/src/turbo-runtime.lock.json +19 -19
- package/src/xcode-project.ts +17 -7
- package/cli/drivers/linux-cocoapods.lock.json +0 -303
- 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
|
+
}
|