peachsim 0.1.2018 → 0.1.2021
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/cli/commands/inspect/settling.ts +11 -6
- package/cli/commands/screenshots-capture.ts +9 -2
- package/cli/outbound-endpoints.ts +1 -1
- package/cli/telemetry.ts +19 -0
- 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 +383 -102
- 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 +6 -4
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +377 -96
- 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 +382 -101
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- 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 +83 -18
- 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 +78 -15
- package/dist-lib/native-app-identity-project.cjs +76 -13
- package/dist-lib/native-app-identity-project.mjs +76 -12
- package/dist-lib/native-app-identity.cjs +5 -2
- package/dist-lib/native-app-identity.mjs +5 -2
- 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 +53 -53
- 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 +6 -4
- package/dist-lib/sdk.mjs +6 -4
- package/dist-lib/skills.cjs +389 -106
- package/dist-lib/swift-compile.cjs +101 -66
- package/dist-lib/swift-compile.mjs +100 -65
- 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 +26 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +376 -95
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/components/native-ui/context-menu-types.d.ts +84 -0
- package/dist-types/packages/peach-engine/src/engine/animated.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/fontDataContract.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/rn-spring.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/render-worker/graph-linked-value.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/render-worker/native-menu-gesture.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +1 -0
- package/package.json +1 -1
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSEntityDescription.h +10 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSFetchRequest.h +28 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObject.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectContext.h +16 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModel.h +3 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h +7 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreRequest.h +3 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSPredicate.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSSortDescriptor.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSURLConnection.h +1 -1
- package/sdk/ios/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAContext.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SafariServices.framework/Headers/SFAuthenticationSession.h +17 -0
- package/sdk/ios/System/Library/Frameworks/SafariServices.framework/Headers/SafariServices.h +1 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIInputViewController.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPageViewController.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPointerStyle.h +1 -6
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Modules/module.modulemap +1 -0
- package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +6 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCSession.h +1 -1
- package/sdk/ios/usr/include/objc/NSObject.h +1 -1
- package/sdk/ios/wasm/include/stdlib.h +1 -0
- package/src/nitro-adapter.lock.json +274 -274
- package/src/nitro-superset.lock.json +4 -4
- package/src/swift-compile.ts +70 -81
- package/src/swift-distribution.lock.json +14 -12
- package/src/swift-guest-image-ledger.ts +15 -10
- package/src/swift-guest-source-inputs.ts +6 -3
- package/src/swift-guest-source-plan.ts +5 -1
- package/src/swift-objc-compile.ts +2 -2
- package/src/swift-objc-standin.ts +197 -5
- package/src/swift-packages.ts +13 -12
- package/src/swift-shared-sdk.ts +2 -1
- package/src/swift-standin-emit.ts +43 -5
- package/src/swift-standins.ts +41 -2
- package/src/swift-toolchain.ts +24 -0
- package/src/turbo-runtime.lock.json +23 -23
- package/src/xcode-project.ts +59 -1
- package/src/xcode-target-members.ts +4 -0
|
@@ -78,9 +78,12 @@ export class IdleObservationError extends Error {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
// the waits around a gesture settle on motion alone, from pushes: the tenant
|
|
81
|
-
// posts each
|
|
82
|
-
// blocking native animation, blocking frame callbacks
|
|
83
|
-
//
|
|
81
|
+
// posts each change of its render activity, whose animating flag covers guest
|
|
82
|
+
// and blocking native animation, blocking frame callbacks and text waits but
|
|
83
|
+
// not the renders a commit requests, so an app that keeps committing (images
|
|
84
|
+
// landing one by one) does not hold the wait. the transition read below holds
|
|
85
|
+
// it until the input's own react work has run, and a screen transition
|
|
86
|
+
// reports its own drain. nothing is read from the tenant
|
|
84
87
|
// while the wait runs, so it costs the motion it observes no worker time.
|
|
85
88
|
// a wait that ends unsettled reads the tenant's stats once to name the cause.
|
|
86
89
|
function renderActivityIdleScript({
|
|
@@ -101,12 +104,14 @@ function renderActivityIdleScript({
|
|
|
101
104
|
let deadline = start + budgetMs
|
|
102
105
|
// with no tenant running, nothing an app draws can move.
|
|
103
106
|
const host = window.__sootsimRenderHost ?? null
|
|
107
|
+
// a runtime that predates the animating flag reports render work as busy.
|
|
108
|
+
const moving = (activity) => activity.animating ?? activity.busy
|
|
104
109
|
const initial = host ? host.getRenderActivity() : null
|
|
105
110
|
// a published frame proves the idle flag is an observed worker state, not
|
|
106
111
|
// the host's pre-boot default, so its idle interval counts from now even
|
|
107
112
|
// when the busy-to-idle edge preceded this wait.
|
|
108
|
-
let busySeen = !initial || initial
|
|
109
|
-
let idleSince = !initial || (!initial
|
|
113
|
+
let busySeen = !initial || moving(initial) || initial.frameToken > 0
|
|
114
|
+
let idleSince = !initial || (!moving(initial) && initial.frameToken > 0) ? start : null
|
|
110
115
|
let wake = null
|
|
111
116
|
const notify = () => {
|
|
112
117
|
const resolve = wake
|
|
@@ -114,7 +119,7 @@ function renderActivityIdleScript({
|
|
|
114
119
|
resolve?.()
|
|
115
120
|
}
|
|
116
121
|
const unsubscribe = host?.subscribeRenderActivity(() => {
|
|
117
|
-
if (host.getRenderActivity()
|
|
122
|
+
if (moving(host.getRenderActivity())) {
|
|
118
123
|
busySeen = true
|
|
119
124
|
idleSince = null
|
|
120
125
|
} else if (busySeen && idleSince === null) {
|
|
@@ -211,10 +211,11 @@ async function fetchScreenImage(
|
|
|
211
211
|
apiOrigin: string,
|
|
212
212
|
token: string,
|
|
213
213
|
org: string,
|
|
214
|
+
repo: string,
|
|
214
215
|
ref: string,
|
|
215
216
|
): Promise<string | null> {
|
|
216
217
|
const res = await fetch(
|
|
217
|
-
`${apiOrigin}/api/sootsim/screenshot-capture?ref=${encodeURIComponent(ref)}&org=${encodeURIComponent(org)}`,
|
|
218
|
+
`${apiOrigin}/api/sootsim/screenshot-capture?ref=${encodeURIComponent(ref)}&org=${encodeURIComponent(org)}&repo=${encodeURIComponent(repo)}`,
|
|
218
219
|
{ headers: { authorization: `Bearer ${token}` } },
|
|
219
220
|
)
|
|
220
221
|
if (!res.ok) return null
|
|
@@ -507,7 +508,13 @@ export async function runScreenshotsCapture(args: string[]): Promise<number> {
|
|
|
507
508
|
const scene = deckFrame?.threeScene ?? null
|
|
508
509
|
const screenDataUrl =
|
|
509
510
|
scene && deckFrame?.screenRef
|
|
510
|
-
? await fetchScreenImage(
|
|
511
|
+
? await fetchScreenImage(
|
|
512
|
+
apiOrigin,
|
|
513
|
+
token,
|
|
514
|
+
flags.org,
|
|
515
|
+
flags.repo,
|
|
516
|
+
deckFrame.screenRef,
|
|
517
|
+
)
|
|
511
518
|
: null
|
|
512
519
|
await captureSlide(frame, slide.index, scene, screenDataUrl)
|
|
513
520
|
console.log(` ✓ slide ${slide.index} "${slide.title.slice(0, 40)}"`)
|
|
@@ -838,7 +838,7 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
|
|
|
838
838
|
category: 'local_development',
|
|
839
839
|
count: 1,
|
|
840
840
|
},
|
|
841
|
-
'packages/peachsim/cli/commands/screenshots-capture.ts :: fetch :: `${apiOrigin}/api/sootsim/screenshot-capture?ref=${encodeURIComponent()}&org=${encodeURIComponent()}`':
|
|
841
|
+
'packages/peachsim/cli/commands/screenshots-capture.ts :: fetch :: `${apiOrigin}/api/sootsim/screenshot-capture?ref=${encodeURIComponent()}&org=${encodeURIComponent()}&repo=${encodeURIComponent()}`':
|
|
842
842
|
{ category: 'contrast_user_action', count: 1 },
|
|
843
843
|
'packages/peachsim/cli/commands/screenshots-capture.ts :: fetch :: `${apiOrigin}/api/sootsim/screenshot-decks?org=${encodeURIComponent()}&repo=${encodeURIComponent()}`':
|
|
844
844
|
{ category: 'contrast_user_action', count: 1 },
|
package/cli/telemetry.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto'
|
|
2
|
+
import { readFileSync } from 'node:fs'
|
|
2
3
|
import { homedir } from 'node:os'
|
|
3
4
|
import { eventUuid } from '@peach/globals/event-identity'
|
|
4
5
|
import { getCliVersion } from '../src/cli-version'
|
|
@@ -206,6 +207,22 @@ export async function flushCliTelemetry(exitCode: number): Promise<void> {
|
|
|
206
207
|
|
|
207
208
|
const CRASH_REPORT_EVERY_MS = 24 * 60 * 60_000
|
|
208
209
|
const CRASH_SENT_KEY = 'crashReportsSent'
|
|
210
|
+
const PACKAGE_NAME = /^[A-Za-z0-9@][A-Za-z0-9._@/-]{0,79}$/
|
|
211
|
+
|
|
212
|
+
// the cwd package name, when it is a single token. paths stay out of the report.
|
|
213
|
+
function crashAppName(): string | null {
|
|
214
|
+
let parsed: unknown
|
|
215
|
+
try {
|
|
216
|
+
parsed = JSON.parse(readFileSync('package.json', 'utf8'))
|
|
217
|
+
} catch {
|
|
218
|
+
return null
|
|
219
|
+
}
|
|
220
|
+
if (!parsed || typeof parsed !== 'object') return null
|
|
221
|
+
const name = Reflect.get(parsed, 'name')
|
|
222
|
+
if (typeof name !== 'string' || name.includes('..') || !PACKAGE_NAME.test(name))
|
|
223
|
+
return null
|
|
224
|
+
return name
|
|
225
|
+
}
|
|
209
226
|
|
|
210
227
|
// an unexpected CLI crash files itself in the issue queue: error class, the
|
|
211
228
|
// sanitized first line of its message, redacted failure detail, command and
|
|
@@ -278,6 +295,7 @@ export async function reportCliCrash(error: unknown): Promise<void> {
|
|
|
278
295
|
try {
|
|
279
296
|
const { supportEndpoint } = await import('./commands/report-issue')
|
|
280
297
|
const endpoint = supportEndpoint()
|
|
298
|
+
const appName = crashAppName()
|
|
281
299
|
const response = await fetch(`${endpoint.origin}/api/sootsim/report-issue`, {
|
|
282
300
|
method: 'POST',
|
|
283
301
|
headers: { ...endpoint.headers, 'content-type': 'application/json' },
|
|
@@ -290,6 +308,7 @@ export async function reportCliCrash(error: unknown): Promise<void> {
|
|
|
290
308
|
signature,
|
|
291
309
|
bundle: {
|
|
292
310
|
reportSource: 'auto',
|
|
311
|
+
activeApp: appName ? { appName } : null,
|
|
293
312
|
cliVersion,
|
|
294
313
|
runtimeVersion,
|
|
295
314
|
platform: process.platform,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2021 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2021 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2021 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2021 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2021 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2021 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2021 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2021 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2021 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|