peachsim 0.1.1667 → 0.1.1674
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 +1 -1
- package/cli/bridge-flow-runner.ts +4 -1
- package/cli/commands/coverage-swift.ts +291 -0
- package/cli/commands/coverage.ts +168 -24
- package/cli/commands/diagnose.ts +1 -19
- package/cli/commands/inspect/settling.ts +37 -4
- package/cli/commands/react.ts +3 -18
- package/cli/commands/screenshot.ts +1 -1
- package/cli/commands/screenshots-capture.ts +1 -1
- package/cli/drivers/playwright-provisioning.ts +1 -4
- package/cli/drivers/playwright.ts +15 -1
- package/cli/scene-video.ts +1 -1
- package/cli/ui.ts +20 -0
- package/cli/ws-bridge.ts +7 -36
- package/detox/frame-identity.cjs +21 -0
- package/detox/frame-identity.d.cts +6 -0
- package/detox/index.ts +39 -33
- package/detox/jest-environment.cjs +4 -1
- package/detox/jest-setup-after-env.cjs +0 -4
- package/detox/navigation-lifecycle.ts +2 -2
- package/detox/proof-observer.ts +126 -0
- package/dist-lib/agent-daemon-client.cjs +29 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +10 -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 +557 -158
- 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 +5098 -7344
- package/dist-lib/detox/jest-environment.cjs +4 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +602 -152
- 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 +688 -194
- package/dist-lib/host/fetch-proxy-handler.cjs +6 -3
- 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 +247 -11
- 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 +10 -1
- package/dist-lib/metro-production-bundle.mjs +12 -1
- package/dist-lib/metro.cjs +155 -5
- package/dist-lib/native-app-identity-project.cjs +43 -5
- package/dist-lib/native-app-identity-project.mjs +43 -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/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +21 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +73 -27
- package/dist-lib/public-origins-lib-static.json +1 -1
- package/dist-lib/public-origins-lib.json +563 -183
- 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 +964 -0
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +38 -5
- package/dist-lib/sdk.mjs +38 -5
- package/dist-lib/skills.cjs +1031 -530
- package/dist-lib/swift-compile.cjs +298 -86
- package/dist-lib/swift-compile.mjs +298 -86
- package/dist-lib/swift-package.cjs +53 -4
- package/dist-lib/swift-package.mjs +52 -4
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +25 -44
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +603 -114
- package/dist-lib/vite.cjs +65 -3
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/glass-material.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/engine/inspect-outline.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime-kind.d.ts +24 -0
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +4 -2
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/settings/devices.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +18 -0
- package/dist-types/packages/peach-globals/src/compositorBridgeContract.d.ts +10 -1
- package/dist-types/packages/peach-globals/src/index.d.ts +2 -2
- package/dist-types/packages/peach-globals/src/nodeContract.d.ts +1 -0
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +54 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +23 -4
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStore.h +439 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStoreCopySpecific.h +216 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStoreKey.h +267 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetwork.h +204 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkConfiguration.h +1393 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkConnection.h +568 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkReachability.h +369 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferences.h +473 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferencesPath.h +179 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferencesSetSpecific.h +95 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCSchemaDefinitions.h +2395 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SystemConfiguration.h +184 -0
- package/sdk/ios/usr/include/_ctype.h +388 -0
- package/sdk/ios/usr/include/_inttypes.h +296 -0
- package/sdk/ios/usr/include/_locale.h +83 -0
- package/sdk/ios/usr/include/_locale_posix2008.h +65 -0
- package/sdk/ios/usr/include/_time.h +207 -0
- package/sdk/ios/usr/include/ctype.h +70 -0
- package/sdk/ios/usr/include/dispatch/dispatch.h +69 -6
- package/sdk/ios/usr/include/inttypes.h +35 -0
- package/sdk/ios/usr/include/libkern/OSByteOrder.h +315 -0
- package/sdk/ios/usr/include/libkern/machine/OSByteOrder.h +147 -0
- package/sdk/ios/usr/include/locale.h +59 -0
- package/sdk/ios/usr/include/runetype.h +118 -0
- package/sdk/ios/usr/include/setjmp.h +99 -0
- package/sdk/ios/usr/include/sys/_types/_clock_t.h +32 -0
- package/sdk/ios/usr/include/sys/_types/_ct_rune_t.h +33 -0
- package/sdk/ios/usr/include/sys/_types/_rune_t.h +32 -0
- package/sdk/ios/usr/include/sys/_types/_time_t.h +32 -0
- package/sdk/ios/usr/include/sys/_types/_wint_t.h +33 -0
- package/sdk/ios/usr/include/sys/cdefs.h +2 -0
- package/sdk/ios/usr/include/time.h +67 -2
- package/src/bridge-contract.ts +42 -0
- package/src/chromium-admission.ts +196 -0
- package/src/host/bridge-host.ts +6 -43
- package/src/host/rolldown-bundle-forward.ts +4 -1
- package/src/launch-deadline.ts +74 -0
- package/src/nitro-adapter.lock.json +3 -3
- package/src/profiles.ts +21 -0
- package/src/react-native-coverage/capability-reference-resolution.ts +402 -0
- package/src/react-native-coverage/capability-source-references.ts +1296 -0
- package/src/react-native-coverage/native-typescript-parser.ts +74 -0
- package/src/react-native-coverage/project-aliases.ts +207 -0
- package/src/react-native-coverage/verified-reach.ts +47 -0
- package/src/reap-browser.ts +1019 -0
- package/src/skills/builtin/a11y-review.ts +1 -1
- package/src/skills/builtin/perf-profile.ts +1 -1
- package/src/skills/builtin/screenshot-all.ts +1 -1
- package/src/skills/builtin/visual-diff.ts +1 -1
- package/src/swift-compile.ts +109 -57
- package/src/swift-coverage/indexdump.ts +80 -0
- package/src/swift-coverage/indexing.ts +147 -0
- package/src/swift-coverage/package.ts +230 -0
- package/src/swift-coverage/provenance.ts +47 -0
- package/src/swift-coverage/reader.ts +81 -0
- package/src/swift-coverage/source.ts +252 -0
- package/src/swift-coverage/types.ts +58 -0
- package/src/swift-coverage/xcode-assets.ts +175 -0
- package/src/swift-coverage/xcode-bridging.ts +160 -0
- package/src/swift-coverage/xcode-packages.ts +251 -0
- package/src/swift-coverage/xcode-strings.ts +78 -0
- package/src/swift-coverage/xcode.ts +656 -0
- package/src/swift-distribution.lock.json +8 -8
- package/src/swift-host.ts +21 -1
- package/src/swift-objc-compile.ts +7 -3
- package/src/swift-objc-import.ts +191 -27
- package/src/swift-objc-metadata.ts +2 -2
- package/src/swift-objc-standin.ts +9 -2
- package/src/swift-package-manifest.ts +134 -13
- package/src/swift-package.ts +69 -4
- package/src/swift-standins.ts +4 -1
- package/src/swift-submit.ts +2 -1
- package/src/swift-toolchain.ts +36 -61
- package/src/worker-system-chunks.ts +3 -10
- package/src/xcode-project.ts +5 -5
- package/detox/attempt-events.cjs +0 -914
- package/detox/attempt-events.d.cts +0 -113
- package/detox/motion-change.cjs +0 -524
- package/detox/motion-change.d.cts +0 -140
- package/detox/motion-leg-starts.cjs +0 -20
- package/detox/motion-leg-starts.d.cts +0 -8
- package/detox/proof-frame.cjs +0 -190
- package/detox/record-block-execution.cjs +0 -78
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1674 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -25,6 +25,7 @@ __export(swift_package_exports, {
|
|
|
25
25
|
OBJC_RESOURCE_ACCESSOR_BODY: () => OBJC_RESOURCE_ACCESSOR_BODY,
|
|
26
26
|
OBJC_RESOURCE_ACCESSOR_HEADER: () => OBJC_RESOURCE_ACCESSOR_HEADER,
|
|
27
27
|
SWIFT_NATIVE_SOURCE_EXTENSIONS: () => SWIFT_NATIVE_SOURCE_EXTENSIONS,
|
|
28
|
+
clangMacroSetting: () => clangMacroSetting,
|
|
28
29
|
isSwiftManifestFile: () => isSwiftManifestFile,
|
|
29
30
|
swiftImplicitResourcePaths: () => swiftImplicitResourcePaths,
|
|
30
31
|
swiftManifestCxxLanguageStandard: () => swiftManifestCxxLanguageStandard,
|
|
@@ -160,6 +161,51 @@ function swiftTargetModuleName(name) {
|
|
|
160
161
|
function swiftPackageIdentity(url) {
|
|
161
162
|
return (url.split("/").pop() ?? url).replace(/\.git$/, "").toLowerCase();
|
|
162
163
|
}
|
|
164
|
+
function clangMacroSetting(macro) {
|
|
165
|
+
const [name, ...value] = macro.split("=");
|
|
166
|
+
return value.length === 0 ? `.define(${JSON.stringify(name)})` : `.define(${JSON.stringify(name)}, to: ${JSON.stringify(value.join("="))})`;
|
|
167
|
+
}
|
|
168
|
+
var swiftEscapes = {
|
|
169
|
+
"\\": "\\",
|
|
170
|
+
'"': '"',
|
|
171
|
+
"'": "'",
|
|
172
|
+
n: "\n",
|
|
173
|
+
r: "\r",
|
|
174
|
+
t: " "
|
|
175
|
+
};
|
|
176
|
+
function settingDefines(call, tool) {
|
|
177
|
+
const defines = [];
|
|
178
|
+
for (const open of call.matchAll(new RegExp(`\\b${tool}Settings\\s*:\\s*\\[`, "g"))) {
|
|
179
|
+
let depth = 1;
|
|
180
|
+
let index = open.index + open[0].length;
|
|
181
|
+
const start = index;
|
|
182
|
+
for (; index < call.length && depth > 0; index++) {
|
|
183
|
+
const char = call[index];
|
|
184
|
+
if (char === '"') {
|
|
185
|
+
for (index++; index < call.length && call[index] !== '"'; index++)
|
|
186
|
+
if (call[index] === "\\") index++;
|
|
187
|
+
} else if (char === "[") depth++;
|
|
188
|
+
else if (char === "]") depth--;
|
|
189
|
+
}
|
|
190
|
+
const body = call.slice(start, index - 1);
|
|
191
|
+
for (const match of body.matchAll(
|
|
192
|
+
/\.define\(\s*"([A-Za-z_][A-Za-z0-9_]*)"\s*(?:,\s*to:\s*"((?:[^"\\]|\\.)*)"\s*)?\)/g
|
|
193
|
+
)) {
|
|
194
|
+
const name = match[1];
|
|
195
|
+
defines.push(
|
|
196
|
+
match[2] === void 0 ? name : `${name}=${match[2].replace(/\\(.)/g, (_, escape) => {
|
|
197
|
+
const value = swiftEscapes[escape];
|
|
198
|
+
if (value === void 0)
|
|
199
|
+
throw new Error(
|
|
200
|
+
`Unsupported escape \\${escape} in the value of macro ${name}`
|
|
201
|
+
);
|
|
202
|
+
return value;
|
|
203
|
+
})}`
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return defines;
|
|
208
|
+
}
|
|
163
209
|
function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
164
210
|
const implicitResources = swiftImplicitResourcePaths(resourcePaths);
|
|
165
211
|
const targets = [];
|
|
@@ -187,9 +233,9 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
|
187
233
|
const cxxInterop = /\.interoperabilityMode\(\s*\.Cxx\s*\)/.test(
|
|
188
234
|
call.replace(/"(?:\\.|[^"\\])*"/g, "")
|
|
189
235
|
);
|
|
190
|
-
const defines = [
|
|
191
|
-
|
|
192
|
-
|
|
236
|
+
const defines = settingDefines(call, "swift").map((define) => define.split("=")[0]);
|
|
237
|
+
const cDefines = settingDefines(call, "c");
|
|
238
|
+
const cxxDefines = settingDefines(call, "cxx");
|
|
193
239
|
const linkedLibraries = [...call.matchAll(/\.linkedLibrary\(\s*"([^"]+)"\s*\)/g)].map(
|
|
194
240
|
(match) => match[1]
|
|
195
241
|
);
|
|
@@ -232,6 +278,8 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
|
232
278
|
mainActorIsolation,
|
|
233
279
|
...cxxInterop ? { cxxInterop: true } : {},
|
|
234
280
|
...defines.length === 0 ? {} : { defines },
|
|
281
|
+
...cDefines.length === 0 ? {} : { cDefines },
|
|
282
|
+
...cxxDefines.length === 0 ? {} : { cxxDefines },
|
|
235
283
|
...linkedLibraries.length === 0 ? {} : { linkedLibraries },
|
|
236
284
|
resources,
|
|
237
285
|
...dependencies.length === 0 ? {} : { dependencies },
|
|
@@ -372,6 +420,7 @@ function swiftPackagePartition(manifest, resourcePaths = []) {
|
|
|
372
420
|
OBJC_RESOURCE_ACCESSOR_BODY,
|
|
373
421
|
OBJC_RESOURCE_ACCESSOR_HEADER,
|
|
374
422
|
SWIFT_NATIVE_SOURCE_EXTENSIONS,
|
|
423
|
+
clangMacroSetting,
|
|
375
424
|
isSwiftManifestFile,
|
|
376
425
|
swiftImplicitResourcePaths,
|
|
377
426
|
swiftManifestCxxLanguageStandard,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1674 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-package.ts
|
|
4
4
|
function isSwiftManifestFile(file) {
|
|
@@ -121,6 +121,51 @@ function swiftTargetModuleName(name) {
|
|
|
121
121
|
function swiftPackageIdentity(url) {
|
|
122
122
|
return (url.split("/").pop() ?? url).replace(/\.git$/, "").toLowerCase();
|
|
123
123
|
}
|
|
124
|
+
function clangMacroSetting(macro) {
|
|
125
|
+
const [name, ...value] = macro.split("=");
|
|
126
|
+
return value.length === 0 ? `.define(${JSON.stringify(name)})` : `.define(${JSON.stringify(name)}, to: ${JSON.stringify(value.join("="))})`;
|
|
127
|
+
}
|
|
128
|
+
var swiftEscapes = {
|
|
129
|
+
"\\": "\\",
|
|
130
|
+
'"': '"',
|
|
131
|
+
"'": "'",
|
|
132
|
+
n: "\n",
|
|
133
|
+
r: "\r",
|
|
134
|
+
t: " "
|
|
135
|
+
};
|
|
136
|
+
function settingDefines(call, tool) {
|
|
137
|
+
const defines = [];
|
|
138
|
+
for (const open of call.matchAll(new RegExp(`\\b${tool}Settings\\s*:\\s*\\[`, "g"))) {
|
|
139
|
+
let depth = 1;
|
|
140
|
+
let index = open.index + open[0].length;
|
|
141
|
+
const start = index;
|
|
142
|
+
for (; index < call.length && depth > 0; index++) {
|
|
143
|
+
const char = call[index];
|
|
144
|
+
if (char === '"') {
|
|
145
|
+
for (index++; index < call.length && call[index] !== '"'; index++)
|
|
146
|
+
if (call[index] === "\\") index++;
|
|
147
|
+
} else if (char === "[") depth++;
|
|
148
|
+
else if (char === "]") depth--;
|
|
149
|
+
}
|
|
150
|
+
const body = call.slice(start, index - 1);
|
|
151
|
+
for (const match of body.matchAll(
|
|
152
|
+
/\.define\(\s*"([A-Za-z_][A-Za-z0-9_]*)"\s*(?:,\s*to:\s*"((?:[^"\\]|\\.)*)"\s*)?\)/g
|
|
153
|
+
)) {
|
|
154
|
+
const name = match[1];
|
|
155
|
+
defines.push(
|
|
156
|
+
match[2] === void 0 ? name : `${name}=${match[2].replace(/\\(.)/g, (_, escape) => {
|
|
157
|
+
const value = swiftEscapes[escape];
|
|
158
|
+
if (value === void 0)
|
|
159
|
+
throw new Error(
|
|
160
|
+
`Unsupported escape \\${escape} in the value of macro ${name}`
|
|
161
|
+
);
|
|
162
|
+
return value;
|
|
163
|
+
})}`
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return defines;
|
|
168
|
+
}
|
|
124
169
|
function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
125
170
|
const implicitResources = swiftImplicitResourcePaths(resourcePaths);
|
|
126
171
|
const targets = [];
|
|
@@ -148,9 +193,9 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
|
148
193
|
const cxxInterop = /\.interoperabilityMode\(\s*\.Cxx\s*\)/.test(
|
|
149
194
|
call.replace(/"(?:\\.|[^"\\])*"/g, "")
|
|
150
195
|
);
|
|
151
|
-
const defines = [
|
|
152
|
-
|
|
153
|
-
|
|
196
|
+
const defines = settingDefines(call, "swift").map((define) => define.split("=")[0]);
|
|
197
|
+
const cDefines = settingDefines(call, "c");
|
|
198
|
+
const cxxDefines = settingDefines(call, "cxx");
|
|
154
199
|
const linkedLibraries = [...call.matchAll(/\.linkedLibrary\(\s*"([^"]+)"\s*\)/g)].map(
|
|
155
200
|
(match) => match[1]
|
|
156
201
|
);
|
|
@@ -193,6 +238,8 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
|
193
238
|
mainActorIsolation,
|
|
194
239
|
...cxxInterop ? { cxxInterop: true } : {},
|
|
195
240
|
...defines.length === 0 ? {} : { defines },
|
|
241
|
+
...cDefines.length === 0 ? {} : { cDefines },
|
|
242
|
+
...cxxDefines.length === 0 ? {} : { cxxDefines },
|
|
196
243
|
...linkedLibraries.length === 0 ? {} : { linkedLibraries },
|
|
197
244
|
resources,
|
|
198
245
|
...dependencies.length === 0 ? {} : { dependencies },
|
|
@@ -332,6 +379,7 @@ export {
|
|
|
332
379
|
OBJC_RESOURCE_ACCESSOR_BODY,
|
|
333
380
|
OBJC_RESOURCE_ACCESSOR_HEADER,
|
|
334
381
|
SWIFT_NATIVE_SOURCE_EXTENSIONS,
|
|
382
|
+
clangMacroSetting,
|
|
335
383
|
isSwiftManifestFile,
|
|
336
384
|
swiftImplicitResourcePaths,
|
|
337
385
|
swiftManifestCxxLanguageStandard,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1674 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -86,7 +86,7 @@ var MAX_SWIFT_COMPILE_METAL_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
86
86
|
var MAX_SWIFT_COMPILE_IMAGES = 128;
|
|
87
87
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
88
88
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
89
|
-
var SWIFT_HOST_ABI =
|
|
89
|
+
var SWIFT_HOST_ABI = 48;
|
|
90
90
|
var POLL_INTERVAL_MS = 1500;
|
|
91
91
|
function swiftNativeEntry(native, file) {
|
|
92
92
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1674 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/is-record.ts
|
|
4
4
|
function isRecord(value) {
|
|
@@ -40,7 +40,7 @@ var MAX_SWIFT_COMPILE_METAL_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
40
40
|
var MAX_SWIFT_COMPILE_IMAGES = 128;
|
|
41
41
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
42
42
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
43
|
-
var SWIFT_HOST_ABI =
|
|
43
|
+
var SWIFT_HOST_ABI = 48;
|
|
44
44
|
var POLL_INTERVAL_MS = 1500;
|
|
45
45
|
function swiftNativeEntry(native, file) {
|
|
46
46
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1674 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -71,7 +71,17 @@ function sourceSwiftCheckout() {
|
|
|
71
71
|
}
|
|
72
72
|
function swiftSdkOptions() {
|
|
73
73
|
const directory = process.env.PEACH_SWIFT_SDKS_PATH;
|
|
74
|
-
|
|
74
|
+
if (directory) return ["--swift-sdks-path", import_node_path.default.resolve(directory)];
|
|
75
|
+
if (scratch && process.platform === "linux") {
|
|
76
|
+
const config = process.env.XDG_CONFIG_HOME;
|
|
77
|
+
if (config !== void 0 && !import_node_path.default.isAbsolute(config))
|
|
78
|
+
throw new Error("XDG_CONFIG_HOME must be an absolute path");
|
|
79
|
+
return [
|
|
80
|
+
"--swift-sdks-path",
|
|
81
|
+
config === void 0 ? import_node_path.default.join(import_node_os.default.userInfo().homedir, ".swiftpm", "swift-sdks") : import_node_path.default.join(config, "swiftpm", "swift-sdks")
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
return [];
|
|
75
85
|
}
|
|
76
86
|
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-0d775d32d7c74eae";
|
|
77
87
|
var SWIFT_HOST_COMPILER_ID = "0d775d32d7c74eae";
|
|
@@ -130,7 +140,6 @@ function peachHome() {
|
|
|
130
140
|
return override ? import_node_path.default.resolve(override) : import_node_path.default.join(import_node_os.default.homedir(), ".peach");
|
|
131
141
|
}
|
|
132
142
|
var scratch;
|
|
133
|
-
var swiftHome;
|
|
134
143
|
function confineSwiftScratch(root) {
|
|
135
144
|
if (scratch) return;
|
|
136
145
|
import_node_fs.default.mkdirSync(root, { recursive: true });
|
|
@@ -141,48 +150,13 @@ function confineSwiftScratch(root) {
|
|
|
141
150
|
}
|
|
142
151
|
const dir = import_node_path.default.join(root, String(process.pid));
|
|
143
152
|
import_node_fs.default.mkdirSync(dir, { recursive: true });
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
import_node_fs.default.mkdirSync(swiftHome, { recursive: true });
|
|
148
|
-
}
|
|
149
|
-
const seeded = import_node_path.default.join(import_node_os.default.homedir(), ".swiftpm");
|
|
150
|
-
const dirAbsentBefore = lstatIfKnown(seeded) === null;
|
|
151
|
-
const absentBefore = swiftpmSeeds.filter(
|
|
152
|
-
(name) => lstatIfKnown(import_node_path.default.join(seeded, name)) === null
|
|
153
|
-
);
|
|
153
|
+
const home = import_node_path.default.join(root, "home");
|
|
154
|
+
import_node_fs.default.mkdirSync(home, { recursive: true });
|
|
155
|
+
scratch = { directory: dir, home };
|
|
154
156
|
process.once("exit", () => {
|
|
155
157
|
import_node_fs.default.rmSync(dir, { recursive: true, force: true });
|
|
156
|
-
for (const name of absentBefore) removeSwiftpmSeed(import_node_path.default.join(seeded, name), name);
|
|
157
|
-
if (dirAbsentBefore && lstatIfKnown(seeded)?.isDirectory())
|
|
158
|
-
try {
|
|
159
|
-
import_node_fs.default.rmdirSync(seeded);
|
|
160
|
-
} catch {
|
|
161
|
-
}
|
|
162
158
|
});
|
|
163
159
|
}
|
|
164
|
-
var swiftpmSeeds = ["cache", "configuration", "security"];
|
|
165
|
-
function lstatIfKnown(entry) {
|
|
166
|
-
try {
|
|
167
|
-
return import_node_fs.default.lstatSync(entry);
|
|
168
|
-
} catch (error) {
|
|
169
|
-
if (error instanceof Error && "code" in error && error.code === "ENOENT") return null;
|
|
170
|
-
return void 0;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
function removeSwiftpmSeed(entry, name) {
|
|
174
|
-
const stat = lstatIfKnown(entry);
|
|
175
|
-
if (!stat) return;
|
|
176
|
-
try {
|
|
177
|
-
if (name === "cache") {
|
|
178
|
-
if (stat.isSymbolicLink() && import_node_fs.default.readlinkSync(entry).endsWith("/.cache/org.swift.swiftpm"))
|
|
179
|
-
import_node_fs.default.unlinkSync(entry);
|
|
180
|
-
} else if (stat.isDirectory()) {
|
|
181
|
-
import_node_fs.default.rmdirSync(entry);
|
|
182
|
-
}
|
|
183
|
-
} catch {
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
160
|
function processRuns(pid) {
|
|
187
161
|
try {
|
|
188
162
|
process.kill(pid, 0);
|
|
@@ -193,7 +167,14 @@ function processRuns(pid) {
|
|
|
193
167
|
}
|
|
194
168
|
function swiftEnvironment(base = process.env) {
|
|
195
169
|
if (!scratch) return base;
|
|
196
|
-
return
|
|
170
|
+
return {
|
|
171
|
+
...base,
|
|
172
|
+
TMPDIR: scratch.directory,
|
|
173
|
+
XDG_CONFIG_HOME: import_node_path.default.join(scratch.home, ".config"),
|
|
174
|
+
XDG_CACHE_HOME: import_node_path.default.join(scratch.home, ".cache"),
|
|
175
|
+
XDG_DATA_HOME: import_node_path.default.join(scratch.home, ".local", "share"),
|
|
176
|
+
...process.platform === "linux" ? { HOME: scratch.home } : {}
|
|
177
|
+
};
|
|
197
178
|
}
|
|
198
179
|
function swiftSourceSdk(root) {
|
|
199
180
|
const pin = JSON.parse(
|
|
@@ -314,7 +295,7 @@ function verifySwiftSdk(swift, sdk) {
|
|
|
314
295
|
function installSwiftSdkArchive(swift, sdk, archive) {
|
|
315
296
|
validateSwiftSdkIdentity(sdk);
|
|
316
297
|
const staging = import_node_fs.default.realpathSync(
|
|
317
|
-
import_node_fs.default.mkdtempSync(import_node_path.default.join(scratch ?? import_node_os.default.tmpdir(), "peach-sdk-verification-"))
|
|
298
|
+
import_node_fs.default.mkdtempSync(import_node_path.default.join(scratch?.directory ?? import_node_os.default.tmpdir(), "peach-sdk-verification-"))
|
|
318
299
|
);
|
|
319
300
|
try {
|
|
320
301
|
if (swiftFileChecksum(archive) !== sdk.wasmSdkChecksum)
|
|
@@ -390,7 +371,7 @@ function installSwiftWasmSdk(release, sdk) {
|
|
|
390
371
|
} catch {
|
|
391
372
|
}
|
|
392
373
|
const swift = import_node_path.default.join(swiftCompiler(release), "swift");
|
|
393
|
-
const staging = import_node_fs.default.mkdtempSync(import_node_path.default.join(scratch ?? import_node_os.default.tmpdir(), "builder-swift-sdk-"));
|
|
374
|
+
const staging = import_node_fs.default.mkdtempSync(import_node_path.default.join(scratch?.directory ?? import_node_os.default.tmpdir(), "builder-swift-sdk-"));
|
|
394
375
|
const archive = import_node_path.default.join(staging, "sdk.artifactbundle.tar.gz");
|
|
395
376
|
try {
|
|
396
377
|
if (sdk.wasmSdkUrl.startsWith("file:"))
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1674 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|