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 __create = Object.create;
|
|
@@ -35,6 +35,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
35
35
|
));
|
|
36
36
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
37
|
|
|
38
|
+
// <define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>
|
|
39
|
+
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
40
|
+
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
38
44
|
// src/home-paths.ts
|
|
39
45
|
function rnxHomeDir() {
|
|
40
46
|
const override = process.env[PEACH_HOME_ENV];
|
|
@@ -61,6 +67,7 @@ var import_node_os, import_node_path, PEACH_HOME_ENV, DAEMON_LOCKFILE_MAX_BYTES;
|
|
|
61
67
|
var init_home_paths = __esm({
|
|
62
68
|
"src/home-paths.ts"() {
|
|
63
69
|
"use strict";
|
|
70
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
64
71
|
import_node_os = require("node:os");
|
|
65
72
|
import_node_path = __toESM(require("node:path"), 1);
|
|
66
73
|
PEACH_HOME_ENV = "PEACH_HOME";
|
|
@@ -383,6 +390,7 @@ var import_node_child_process2, import_node_fs, import_node_os2, import_node_pat
|
|
|
383
390
|
var init_process_group = __esm({
|
|
384
391
|
"src/process-group.ts"() {
|
|
385
392
|
"use strict";
|
|
393
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
386
394
|
import_node_child_process2 = require("node:child_process");
|
|
387
395
|
import_node_fs = require("node:fs");
|
|
388
396
|
import_node_os2 = require("node:os");
|
|
@@ -398,6 +406,7 @@ var init_process_group = __esm({
|
|
|
398
406
|
// ../../node_modules/json5/lib/unicode.js
|
|
399
407
|
var require_unicode = __commonJS({
|
|
400
408
|
"../../node_modules/json5/lib/unicode.js"(exports2, module2) {
|
|
409
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
401
410
|
module2.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
402
411
|
module2.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
|
|
403
412
|
module2.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
|
|
@@ -407,6 +416,7 @@ var require_unicode = __commonJS({
|
|
|
407
416
|
// ../../node_modules/json5/lib/util.js
|
|
408
417
|
var require_util = __commonJS({
|
|
409
418
|
"../../node_modules/json5/lib/util.js"(exports2, module2) {
|
|
419
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
410
420
|
var unicode = require_unicode();
|
|
411
421
|
module2.exports = {
|
|
412
422
|
isSpaceSeparator(c) {
|
|
@@ -431,6 +441,7 @@ var require_util = __commonJS({
|
|
|
431
441
|
// ../../node_modules/json5/lib/parse.js
|
|
432
442
|
var require_parse = __commonJS({
|
|
433
443
|
"../../node_modules/json5/lib/parse.js"(exports2, module2) {
|
|
444
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
434
445
|
var util = require_util();
|
|
435
446
|
var source;
|
|
436
447
|
var parseState;
|
|
@@ -1278,6 +1289,7 @@ var require_parse = __commonJS({
|
|
|
1278
1289
|
// ../../node_modules/json5/lib/stringify.js
|
|
1279
1290
|
var require_stringify = __commonJS({
|
|
1280
1291
|
"../../node_modules/json5/lib/stringify.js"(exports2, module2) {
|
|
1292
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1281
1293
|
var util = require_util();
|
|
1282
1294
|
module2.exports = function stringify4(value, replacer, space) {
|
|
1283
1295
|
const stack = [];
|
|
@@ -1497,6 +1509,7 @@ var require_stringify = __commonJS({
|
|
|
1497
1509
|
// ../../node_modules/json5/lib/index.js
|
|
1498
1510
|
var require_lib = __commonJS({
|
|
1499
1511
|
"../../node_modules/json5/lib/index.js"(exports2, module2) {
|
|
1512
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1500
1513
|
var parse3 = require_parse();
|
|
1501
1514
|
var stringify4 = require_stringify();
|
|
1502
1515
|
var JSON52 = {
|
|
@@ -1511,6 +1524,7 @@ var require_lib = __commonJS({
|
|
|
1511
1524
|
var init_version = __esm({
|
|
1512
1525
|
"../contrast-runtime-delivery/src/version.ts"() {
|
|
1513
1526
|
"use strict";
|
|
1527
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1514
1528
|
}
|
|
1515
1529
|
});
|
|
1516
1530
|
|
|
@@ -1518,6 +1532,7 @@ var init_version = __esm({
|
|
|
1518
1532
|
var init_product = __esm({
|
|
1519
1533
|
"../contrast-runtime-delivery/src/product.ts"() {
|
|
1520
1534
|
"use strict";
|
|
1535
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1521
1536
|
init_version();
|
|
1522
1537
|
}
|
|
1523
1538
|
});
|
|
@@ -1665,6 +1680,7 @@ var import_node_child_process9, import_node_crypto10, import_node_fs12, import_n
|
|
|
1665
1680
|
var init_src = __esm({
|
|
1666
1681
|
"../contrast-runtime-delivery/src/index.ts"() {
|
|
1667
1682
|
"use strict";
|
|
1683
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1668
1684
|
import_node_child_process9 = require("node:child_process");
|
|
1669
1685
|
import_node_crypto10 = __toESM(require("node:crypto"), 1);
|
|
1670
1686
|
import_node_fs12 = __toESM(require("node:fs"), 1);
|
|
@@ -1684,8 +1700,10 @@ __export(expo_swift_bundle_exports, {
|
|
|
1684
1700
|
buildExpoSwiftBundle: () => buildExpoSwiftBundle
|
|
1685
1701
|
});
|
|
1686
1702
|
module.exports = __toCommonJS(expo_swift_bundle_exports);
|
|
1703
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1687
1704
|
|
|
1688
1705
|
// src/expo-swift-host.ts
|
|
1706
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1689
1707
|
var import_node_child_process13 = require("node:child_process");
|
|
1690
1708
|
var import_node_crypto15 = require("node:crypto");
|
|
1691
1709
|
var import_node_fs23 = __toESM(require("node:fs"), 1);
|
|
@@ -1695,9 +1713,11 @@ var import_node_path24 = __toESM(require("node:path"), 1);
|
|
|
1695
1713
|
var import_node_util2 = require("node:util");
|
|
1696
1714
|
|
|
1697
1715
|
// cli/internal-child.ts
|
|
1716
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1698
1717
|
var RNX_FORKED_SCRIPT_ENV = "PEACH_RUNS_FORKED_SCRIPTS";
|
|
1699
1718
|
|
|
1700
1719
|
// src/backend-origin.ts
|
|
1720
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1701
1721
|
var DEFAULT_CONTRAST_BACKEND_ORIGIN = "https://peachsim.com";
|
|
1702
1722
|
function normalizeHostname(hostname) {
|
|
1703
1723
|
return hostname.replace(/^\[|\]$/g, "").toLowerCase();
|
|
@@ -1723,16 +1743,21 @@ function resolveContrastBackendOrigin(currentOrigin, search) {
|
|
|
1723
1743
|
}
|
|
1724
1744
|
|
|
1725
1745
|
// src/react-native-bridge-modules.ts
|
|
1746
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1726
1747
|
var import_node_fs10 = __toESM(require("node:fs"), 1);
|
|
1727
1748
|
var import_node_path13 = __toESM(require("node:path"), 1);
|
|
1728
1749
|
|
|
1729
1750
|
// src/swift-compile.ts
|
|
1751
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1730
1752
|
var import_node_child_process7 = require("node:child_process");
|
|
1731
1753
|
var import_node_crypto7 = require("node:crypto");
|
|
1732
1754
|
var import_node_fs8 = require("node:fs");
|
|
1733
1755
|
var import_node_os4 = __toESM(require("node:os"), 1);
|
|
1734
1756
|
var import_node_path10 = __toESM(require("node:path"), 1);
|
|
1735
1757
|
|
|
1758
|
+
// ../../node_modules/yaml/browser/index.js
|
|
1759
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1760
|
+
|
|
1736
1761
|
// ../../node_modules/yaml/browser/dist/index.js
|
|
1737
1762
|
var dist_exports = {};
|
|
1738
1763
|
__export(dist_exports, {
|
|
@@ -1766,8 +1791,16 @@ __export(dist_exports, {
|
|
|
1766
1791
|
visit: () => visit,
|
|
1767
1792
|
visitAsync: () => visitAsync
|
|
1768
1793
|
});
|
|
1794
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1795
|
+
|
|
1796
|
+
// ../../node_modules/yaml/browser/dist/compose/composer.js
|
|
1797
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1798
|
+
|
|
1799
|
+
// ../../node_modules/yaml/browser/dist/doc/directives.js
|
|
1800
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1769
1801
|
|
|
1770
1802
|
// ../../node_modules/yaml/browser/dist/nodes/identity.js
|
|
1803
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1771
1804
|
var ALIAS = Symbol.for("yaml.alias");
|
|
1772
1805
|
var DOC = Symbol.for("yaml.document");
|
|
1773
1806
|
var MAP = Symbol.for("yaml.map");
|
|
@@ -1804,6 +1837,7 @@ function isNode(node) {
|
|
|
1804
1837
|
var hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
|
|
1805
1838
|
|
|
1806
1839
|
// ../../node_modules/yaml/browser/dist/visit.js
|
|
1840
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1807
1841
|
var BREAK = Symbol("break visit");
|
|
1808
1842
|
var SKIP = Symbol("skip children");
|
|
1809
1843
|
var REMOVE = Symbol("remove node");
|
|
@@ -2116,7 +2150,14 @@ var Directives = class _Directives {
|
|
|
2116
2150
|
Directives.defaultYaml = { explicit: false, version: "1.2" };
|
|
2117
2151
|
Directives.defaultTags = { "!!": "tag:yaml.org,2002:" };
|
|
2118
2152
|
|
|
2153
|
+
// ../../node_modules/yaml/browser/dist/doc/Document.js
|
|
2154
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2155
|
+
|
|
2156
|
+
// ../../node_modules/yaml/browser/dist/nodes/Alias.js
|
|
2157
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2158
|
+
|
|
2119
2159
|
// ../../node_modules/yaml/browser/dist/doc/anchors.js
|
|
2160
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2120
2161
|
function anchorIsValid(anchor) {
|
|
2121
2162
|
if (/[\x00-\x19\s,[\]{}]/.test(anchor)) {
|
|
2122
2163
|
const sa = JSON.stringify(anchor);
|
|
@@ -2175,7 +2216,11 @@ function createNodeAnchors(doc, prefix) {
|
|
|
2175
2216
|
};
|
|
2176
2217
|
}
|
|
2177
2218
|
|
|
2219
|
+
// ../../node_modules/yaml/browser/dist/nodes/Node.js
|
|
2220
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2221
|
+
|
|
2178
2222
|
// ../../node_modules/yaml/browser/dist/doc/applyReviver.js
|
|
2223
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2179
2224
|
function applyReviver(reviver, obj, key2, val) {
|
|
2180
2225
|
if (val && typeof val === "object") {
|
|
2181
2226
|
if (Array.isArray(val)) {
|
|
@@ -2220,6 +2265,7 @@ function applyReviver(reviver, obj, key2, val) {
|
|
|
2220
2265
|
}
|
|
2221
2266
|
|
|
2222
2267
|
// ../../node_modules/yaml/browser/dist/nodes/toJS.js
|
|
2268
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2223
2269
|
function toJS(value, arg, ctx) {
|
|
2224
2270
|
if (Array.isArray(value))
|
|
2225
2271
|
return value.map((v, i) => toJS(v, String(i), ctx));
|
|
@@ -2379,7 +2425,14 @@ function getAliasCount(doc, node, anchors) {
|
|
|
2379
2425
|
return 1;
|
|
2380
2426
|
}
|
|
2381
2427
|
|
|
2428
|
+
// ../../node_modules/yaml/browser/dist/nodes/Collection.js
|
|
2429
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2430
|
+
|
|
2431
|
+
// ../../node_modules/yaml/browser/dist/doc/createNode.js
|
|
2432
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2433
|
+
|
|
2382
2434
|
// ../../node_modules/yaml/browser/dist/nodes/Scalar.js
|
|
2435
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2383
2436
|
var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
|
|
2384
2437
|
var Scalar = class extends NodeBase {
|
|
2385
2438
|
constructor(value) {
|
|
@@ -2597,7 +2650,17 @@ var Collection = class extends NodeBase {
|
|
|
2597
2650
|
}
|
|
2598
2651
|
};
|
|
2599
2652
|
|
|
2653
|
+
// ../../node_modules/yaml/browser/dist/nodes/Pair.js
|
|
2654
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2655
|
+
|
|
2656
|
+
// ../../node_modules/yaml/browser/dist/stringify/stringifyPair.js
|
|
2657
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2658
|
+
|
|
2659
|
+
// ../../node_modules/yaml/browser/dist/stringify/stringify.js
|
|
2660
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2661
|
+
|
|
2600
2662
|
// ../../node_modules/yaml/browser/dist/stringify/stringifyComment.js
|
|
2663
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2601
2664
|
var stringifyComment = (str2) => str2.replace(/^(?!$)(?: $)?/gm, "#");
|
|
2602
2665
|
function indentComment(comment, indent) {
|
|
2603
2666
|
if (/^\n+$/.test(comment))
|
|
@@ -2606,7 +2669,11 @@ function indentComment(comment, indent) {
|
|
|
2606
2669
|
}
|
|
2607
2670
|
var lineComment = (str2, indent, comment) => str2.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str2.endsWith(" ") ? "" : " ") + comment;
|
|
2608
2671
|
|
|
2672
|
+
// ../../node_modules/yaml/browser/dist/stringify/stringifyString.js
|
|
2673
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2674
|
+
|
|
2609
2675
|
// ../../node_modules/yaml/browser/dist/stringify/foldFlowLines.js
|
|
2676
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2610
2677
|
var FOLD_FLOW = "flow";
|
|
2611
2678
|
var FOLD_BLOCK = "block";
|
|
2612
2679
|
var FOLD_QUOTED = "quoted";
|
|
@@ -3244,7 +3311,11 @@ ${ctx.indent}`;
|
|
|
3244
3311
|
return str2;
|
|
3245
3312
|
}
|
|
3246
3313
|
|
|
3314
|
+
// ../../node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
|
|
3315
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3316
|
+
|
|
3247
3317
|
// ../../node_modules/yaml/browser/dist/log.js
|
|
3318
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3248
3319
|
function warn(logLevel, warning) {
|
|
3249
3320
|
if (logLevel === "debug" || logLevel === "warn") {
|
|
3250
3321
|
console.warn(warning);
|
|
@@ -3252,6 +3323,7 @@ function warn(logLevel, warning) {
|
|
|
3252
3323
|
}
|
|
3253
3324
|
|
|
3254
3325
|
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
|
|
3326
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3255
3327
|
var MERGE_KEY = "<<";
|
|
3256
3328
|
var merge = {
|
|
3257
3329
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
@@ -3383,7 +3455,17 @@ var Pair = class _Pair {
|
|
|
3383
3455
|
}
|
|
3384
3456
|
};
|
|
3385
3457
|
|
|
3458
|
+
// ../../node_modules/yaml/browser/dist/schema/Schema.js
|
|
3459
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3460
|
+
|
|
3461
|
+
// ../../node_modules/yaml/browser/dist/schema/common/map.js
|
|
3462
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3463
|
+
|
|
3464
|
+
// ../../node_modules/yaml/browser/dist/nodes/YAMLMap.js
|
|
3465
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3466
|
+
|
|
3386
3467
|
// ../../node_modules/yaml/browser/dist/stringify/stringifyCollection.js
|
|
3468
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3387
3469
|
function stringifyCollection(collection, ctx, options) {
|
|
3388
3470
|
const flow = ctx.inFlow ?? collection.flow;
|
|
3389
3471
|
const stringify4 = flow ? stringifyFlowCollection : stringifyBlockCollection;
|
|
@@ -3670,7 +3752,11 @@ var map = {
|
|
|
3670
3752
|
createNode: (schema4, obj, ctx) => YAMLMap.from(schema4, obj, ctx)
|
|
3671
3753
|
};
|
|
3672
3754
|
|
|
3755
|
+
// ../../node_modules/yaml/browser/dist/schema/common/seq.js
|
|
3756
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3757
|
+
|
|
3673
3758
|
// ../../node_modules/yaml/browser/dist/nodes/YAMLSeq.js
|
|
3759
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3674
3760
|
var YAMLSeq = class extends Collection {
|
|
3675
3761
|
static get tagName() {
|
|
3676
3762
|
return "tag:yaml.org,2002:seq";
|
|
@@ -3789,6 +3875,7 @@ var seq = {
|
|
|
3789
3875
|
};
|
|
3790
3876
|
|
|
3791
3877
|
// ../../node_modules/yaml/browser/dist/schema/common/string.js
|
|
3878
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3792
3879
|
var string = {
|
|
3793
3880
|
identify: (value) => typeof value === "string",
|
|
3794
3881
|
default: true,
|
|
@@ -3800,7 +3887,11 @@ var string = {
|
|
|
3800
3887
|
}
|
|
3801
3888
|
};
|
|
3802
3889
|
|
|
3890
|
+
// ../../node_modules/yaml/browser/dist/schema/tags.js
|
|
3891
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3892
|
+
|
|
3803
3893
|
// ../../node_modules/yaml/browser/dist/schema/common/null.js
|
|
3894
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3804
3895
|
var nullTag = {
|
|
3805
3896
|
identify: (value) => value == null,
|
|
3806
3897
|
createNode: () => new Scalar(null),
|
|
@@ -3812,6 +3903,7 @@ var nullTag = {
|
|
|
3812
3903
|
};
|
|
3813
3904
|
|
|
3814
3905
|
// ../../node_modules/yaml/browser/dist/schema/core/bool.js
|
|
3906
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3815
3907
|
var boolTag = {
|
|
3816
3908
|
identify: (value) => typeof value === "boolean",
|
|
3817
3909
|
default: true,
|
|
@@ -3828,7 +3920,11 @@ var boolTag = {
|
|
|
3828
3920
|
}
|
|
3829
3921
|
};
|
|
3830
3922
|
|
|
3923
|
+
// ../../node_modules/yaml/browser/dist/schema/core/float.js
|
|
3924
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3925
|
+
|
|
3831
3926
|
// ../../node_modules/yaml/browser/dist/stringify/stringifyNumber.js
|
|
3927
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3832
3928
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
3833
3929
|
if (typeof value === "bigint")
|
|
3834
3930
|
return String(value);
|
|
@@ -3886,6 +3982,7 @@ var float = {
|
|
|
3886
3982
|
};
|
|
3887
3983
|
|
|
3888
3984
|
// ../../node_modules/yaml/browser/dist/schema/core/int.js
|
|
3985
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3889
3986
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
3890
3987
|
var intResolve = (str2, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2.substring(offset), radix);
|
|
3891
3988
|
function intStringify(node, radix, prefix) {
|
|
@@ -3922,6 +4019,7 @@ var intHex = {
|
|
|
3922
4019
|
};
|
|
3923
4020
|
|
|
3924
4021
|
// ../../node_modules/yaml/browser/dist/schema/core/schema.js
|
|
4022
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3925
4023
|
var schema = [
|
|
3926
4024
|
map,
|
|
3927
4025
|
seq,
|
|
@@ -3937,6 +4035,7 @@ var schema = [
|
|
|
3937
4035
|
];
|
|
3938
4036
|
|
|
3939
4037
|
// ../../node_modules/yaml/browser/dist/schema/json/schema.js
|
|
4038
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3940
4039
|
function intIdentify2(value) {
|
|
3941
4040
|
return typeof value === "bigint" || Number.isInteger(value);
|
|
3942
4041
|
}
|
|
@@ -3995,6 +4094,7 @@ var jsonError = {
|
|
|
3995
4094
|
var schema2 = [map, seq].concat(jsonScalars, jsonError);
|
|
3996
4095
|
|
|
3997
4096
|
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js
|
|
4097
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3998
4098
|
var binary = {
|
|
3999
4099
|
identify: (value) => value instanceof Uint8Array,
|
|
4000
4100
|
// Buffer inherits from Uint8Array
|
|
@@ -4047,7 +4147,11 @@ var binary = {
|
|
|
4047
4147
|
}
|
|
4048
4148
|
};
|
|
4049
4149
|
|
|
4150
|
+
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js
|
|
4151
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
4152
|
+
|
|
4050
4153
|
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
|
|
4154
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
4051
4155
|
function resolvePairs(seq2, onError) {
|
|
4052
4156
|
if (isSeq(seq2)) {
|
|
4053
4157
|
for (let i = 0; i < seq2.items.length; ++i) {
|
|
@@ -4179,7 +4283,11 @@ var omap = {
|
|
|
4179
4283
|
createNode: (schema4, iterable, ctx) => YAMLOMap.from(schema4, iterable, ctx)
|
|
4180
4284
|
};
|
|
4181
4285
|
|
|
4286
|
+
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js
|
|
4287
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
4288
|
+
|
|
4182
4289
|
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js
|
|
4290
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
4183
4291
|
function boolStringify({ value, source }, ctx) {
|
|
4184
4292
|
const boolObj = value ? trueTag : falseTag;
|
|
4185
4293
|
if (source && boolObj.test.test(source))
|
|
@@ -4204,6 +4312,7 @@ var falseTag = {
|
|
|
4204
4312
|
};
|
|
4205
4313
|
|
|
4206
4314
|
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/float.js
|
|
4315
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
4207
4316
|
var floatNaN2 = {
|
|
4208
4317
|
identify: (value) => typeof value === "number",
|
|
4209
4318
|
default: true,
|
|
@@ -4243,6 +4352,7 @@ var float2 = {
|
|
|
4243
4352
|
};
|
|
4244
4353
|
|
|
4245
4354
|
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/int.js
|
|
4355
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
4246
4356
|
var intIdentify3 = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
4247
4357
|
function intResolve2(str2, offset, radix, { intAsBigInt }) {
|
|
4248
4358
|
const sign = str2[0];
|
|
@@ -4312,6 +4422,7 @@ var intHex2 = {
|
|
|
4312
4422
|
};
|
|
4313
4423
|
|
|
4314
4424
|
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/set.js
|
|
4425
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
4315
4426
|
var YAMLSet = class _YAMLSet extends YAMLMap {
|
|
4316
4427
|
constructor(schema4) {
|
|
4317
4428
|
super(schema4);
|
|
@@ -4391,6 +4502,7 @@ var set = {
|
|
|
4391
4502
|
};
|
|
4392
4503
|
|
|
4393
4504
|
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
|
|
4505
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
4394
4506
|
function parseSexagesimal(str2, asBigInt) {
|
|
4395
4507
|
const sign = str2[0];
|
|
4396
4508
|
const parts = sign === "-" || sign === "+" ? str2.substring(1) : str2;
|
|
@@ -4587,6 +4699,7 @@ var Schema = class _Schema {
|
|
|
4587
4699
|
};
|
|
4588
4700
|
|
|
4589
4701
|
// ../../node_modules/yaml/browser/dist/stringify/stringifyDocument.js
|
|
4702
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
4590
4703
|
function stringifyDocument(doc, options) {
|
|
4591
4704
|
const lines = [];
|
|
4592
4705
|
let hasDirectives = options.directives === true;
|
|
@@ -4950,6 +5063,7 @@ function assertCollection(contents) {
|
|
|
4950
5063
|
}
|
|
4951
5064
|
|
|
4952
5065
|
// ../../node_modules/yaml/browser/dist/errors.js
|
|
5066
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
4953
5067
|
var YAMLError = class extends Error {
|
|
4954
5068
|
constructor(name3, pos, code, message) {
|
|
4955
5069
|
super();
|
|
@@ -5005,7 +5119,20 @@ ${pointer}
|
|
|
5005
5119
|
}
|
|
5006
5120
|
};
|
|
5007
5121
|
|
|
5122
|
+
// ../../node_modules/yaml/browser/dist/compose/compose-doc.js
|
|
5123
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5124
|
+
|
|
5125
|
+
// ../../node_modules/yaml/browser/dist/compose/compose-node.js
|
|
5126
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5127
|
+
|
|
5128
|
+
// ../../node_modules/yaml/browser/dist/compose/compose-collection.js
|
|
5129
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5130
|
+
|
|
5131
|
+
// ../../node_modules/yaml/browser/dist/compose/resolve-block-map.js
|
|
5132
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5133
|
+
|
|
5008
5134
|
// ../../node_modules/yaml/browser/dist/compose/resolve-props.js
|
|
5135
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5009
5136
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
|
|
5010
5137
|
let spaceBefore = false;
|
|
5011
5138
|
let atNewline = startOnNewline;
|
|
@@ -5134,6 +5261,7 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
|
|
|
5134
5261
|
}
|
|
5135
5262
|
|
|
5136
5263
|
// ../../node_modules/yaml/browser/dist/compose/util-contains-newline.js
|
|
5264
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5137
5265
|
function containsNewline(key2) {
|
|
5138
5266
|
if (!key2)
|
|
5139
5267
|
return null;
|
|
@@ -5170,6 +5298,7 @@ function containsNewline(key2) {
|
|
|
5170
5298
|
}
|
|
5171
5299
|
|
|
5172
5300
|
// ../../node_modules/yaml/browser/dist/compose/util-flow-indent-check.js
|
|
5301
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5173
5302
|
function flowIndentCheck(indent, fc, onError) {
|
|
5174
5303
|
if (fc?.type === "flow-collection") {
|
|
5175
5304
|
const end = fc.end[0];
|
|
@@ -5181,6 +5310,7 @@ function flowIndentCheck(indent, fc, onError) {
|
|
|
5181
5310
|
}
|
|
5182
5311
|
|
|
5183
5312
|
// ../../node_modules/yaml/browser/dist/compose/util-map-includes.js
|
|
5313
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5184
5314
|
function mapIncludes(ctx, items2, search) {
|
|
5185
5315
|
const { uniqueKeys } = ctx.options;
|
|
5186
5316
|
if (uniqueKeys === false)
|
|
@@ -5286,6 +5416,7 @@ function resolveBlockMap({ composeNode: composeNode2, composeEmptyNode: composeE
|
|
|
5286
5416
|
}
|
|
5287
5417
|
|
|
5288
5418
|
// ../../node_modules/yaml/browser/dist/compose/resolve-block-seq.js
|
|
5419
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5289
5420
|
function resolveBlockSeq({ composeNode: composeNode2, composeEmptyNode: composeEmptyNode2 }, ctx, bs, onError, tag) {
|
|
5290
5421
|
const NodeClass = tag?.nodeClass ?? YAMLSeq;
|
|
5291
5422
|
const seq2 = new NodeClass(ctx.schema);
|
|
@@ -5327,7 +5458,11 @@ function resolveBlockSeq({ composeNode: composeNode2, composeEmptyNode: composeE
|
|
|
5327
5458
|
return seq2;
|
|
5328
5459
|
}
|
|
5329
5460
|
|
|
5461
|
+
// ../../node_modules/yaml/browser/dist/compose/resolve-flow-collection.js
|
|
5462
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5463
|
+
|
|
5330
5464
|
// ../../node_modules/yaml/browser/dist/compose/resolve-end.js
|
|
5465
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5331
5466
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
5332
5467
|
let comment = "";
|
|
5333
5468
|
if (end) {
|
|
@@ -5596,7 +5731,11 @@ function composeCollection(CN2, ctx, token, props, onError) {
|
|
|
5596
5731
|
return node;
|
|
5597
5732
|
}
|
|
5598
5733
|
|
|
5734
|
+
// ../../node_modules/yaml/browser/dist/compose/compose-scalar.js
|
|
5735
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5736
|
+
|
|
5599
5737
|
// ../../node_modules/yaml/browser/dist/compose/resolve-block-scalar.js
|
|
5738
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5600
5739
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
5601
5740
|
const start = scalar.offset;
|
|
5602
5741
|
const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);
|
|
@@ -5773,6 +5912,7 @@ function splitLines(source) {
|
|
|
5773
5912
|
}
|
|
5774
5913
|
|
|
5775
5914
|
// ../../node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js
|
|
5915
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5776
5916
|
function resolveFlowScalar(scalar, strict, onError) {
|
|
5777
5917
|
const { offset, type, source, end } = scalar;
|
|
5778
5918
|
let _type;
|
|
@@ -6056,6 +6196,7 @@ function findScalarTagByTest({ atKey, directives, schema: schema4 }, value, toke
|
|
|
6056
6196
|
}
|
|
6057
6197
|
|
|
6058
6198
|
// ../../node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js
|
|
6199
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6059
6200
|
function emptyScalarPosition(offset, before, pos) {
|
|
6060
6201
|
if (before) {
|
|
6061
6202
|
pos ?? (pos = before.length);
|
|
@@ -6415,8 +6556,10 @@ __export(cst_exports, {
|
|
|
6415
6556
|
tokenType: () => tokenType,
|
|
6416
6557
|
visit: () => visit2
|
|
6417
6558
|
});
|
|
6559
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6418
6560
|
|
|
6419
6561
|
// ../../node_modules/yaml/browser/dist/parse/cst-scalar.js
|
|
6562
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6420
6563
|
function resolveAsScalar(token, strict = true, onError) {
|
|
6421
6564
|
if (token) {
|
|
6422
6565
|
const _onError = (pos, code, message) => {
|
|
@@ -6590,6 +6733,7 @@ function setFlowScalarValue(token, source, type) {
|
|
|
6590
6733
|
}
|
|
6591
6734
|
|
|
6592
6735
|
// ../../node_modules/yaml/browser/dist/parse/cst-stringify.js
|
|
6736
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6593
6737
|
var stringify2 = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
|
|
6594
6738
|
function stringifyToken(token) {
|
|
6595
6739
|
switch (token.type) {
|
|
@@ -6645,6 +6789,7 @@ function stringifyItem({ start, key: key2, sep, value }) {
|
|
|
6645
6789
|
}
|
|
6646
6790
|
|
|
6647
6791
|
// ../../node_modules/yaml/browser/dist/parse/cst-visit.js
|
|
6792
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6648
6793
|
var BREAK2 = Symbol("break visit");
|
|
6649
6794
|
var SKIP2 = Symbol("skip children");
|
|
6650
6795
|
var REMOVE2 = Symbol("remove item");
|
|
@@ -6782,6 +6927,7 @@ function tokenType(source) {
|
|
|
6782
6927
|
}
|
|
6783
6928
|
|
|
6784
6929
|
// ../../node_modules/yaml/browser/dist/parse/lexer.js
|
|
6930
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6785
6931
|
function isEmpty(ch) {
|
|
6786
6932
|
switch (ch) {
|
|
6787
6933
|
case void 0:
|
|
@@ -7364,6 +7510,7 @@ var Lexer = class {
|
|
|
7364
7510
|
};
|
|
7365
7511
|
|
|
7366
7512
|
// ../../node_modules/yaml/browser/dist/parse/line-counter.js
|
|
7513
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
7367
7514
|
var LineCounter = class {
|
|
7368
7515
|
constructor() {
|
|
7369
7516
|
this.lineStarts = [];
|
|
@@ -7389,6 +7536,7 @@ var LineCounter = class {
|
|
|
7389
7536
|
};
|
|
7390
7537
|
|
|
7391
7538
|
// ../../node_modules/yaml/browser/dist/parse/parser.js
|
|
7539
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
7392
7540
|
function includesToken(list2, type) {
|
|
7393
7541
|
for (let i = 0; i < list2.length; ++i)
|
|
7394
7542
|
if (list2[i].type === type)
|
|
@@ -8252,6 +8400,7 @@ var Parser = class {
|
|
|
8252
8400
|
};
|
|
8253
8401
|
|
|
8254
8402
|
// ../../node_modules/yaml/browser/dist/public-api.js
|
|
8403
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
8255
8404
|
function parseOptions(options) {
|
|
8256
8405
|
const prettyErrors = options.prettyErrors !== false;
|
|
8257
8406
|
const lineCounter = options.lineCounter || prettyErrors && new LineCounter() || null;
|
|
@@ -8336,6 +8485,7 @@ function stringify3(value, replacer, options) {
|
|
|
8336
8485
|
var browser_default = dist_exports;
|
|
8337
8486
|
|
|
8338
8487
|
// src/admitted-mac-build.ts
|
|
8488
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
8339
8489
|
var import_node_child_process = require("node:child_process");
|
|
8340
8490
|
function windowAdmission() {
|
|
8341
8491
|
const result = (0, import_node_child_process.spawnSync)("tm", ["window", "ancestor", "--json"], {
|
|
@@ -8365,6 +8515,7 @@ function admittedMacBuilderSlot(env = process.env) {
|
|
|
8365
8515
|
init_home_paths();
|
|
8366
8516
|
|
|
8367
8517
|
// src/is-record.ts
|
|
8518
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
8368
8519
|
function isRecord(value) {
|
|
8369
8520
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8370
8521
|
}
|
|
@@ -8372,7 +8523,11 @@ function isRecord(value) {
|
|
|
8372
8523
|
// src/swift-compile.ts
|
|
8373
8524
|
init_process_group();
|
|
8374
8525
|
|
|
8526
|
+
// src/swift-compiler-digest.ts
|
|
8527
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
8528
|
+
|
|
8375
8529
|
// src/swift-objc-sdk-tree.ts
|
|
8530
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
8376
8531
|
var import_node_fs2 = require("node:fs");
|
|
8377
8532
|
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
8378
8533
|
function readIosSdkTree(root) {
|
|
@@ -8386,6 +8541,7 @@ function readIosSdkTree(root) {
|
|
|
8386
8541
|
}
|
|
8387
8542
|
|
|
8388
8543
|
// src/swift-design-time.ts
|
|
8544
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
8389
8545
|
var IDENT = /[A-Za-z_À-$0-9]/;
|
|
8390
8546
|
function tokenize(source) {
|
|
8391
8547
|
const tokens = [];
|
|
@@ -8806,6 +8962,7 @@ function designTimeDiagnostic(output, files2) {
|
|
|
8806
8962
|
}
|
|
8807
8963
|
|
|
8808
8964
|
// src/swift-distribution-contract.ts
|
|
8965
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
8809
8966
|
var SWIFT_DISTRIBUTION_MANIFEST = "distribution.json";
|
|
8810
8967
|
var SWIFT_DISTRIBUTION_HOSTS = [
|
|
8811
8968
|
"darwin-arm64",
|
|
@@ -8878,6 +9035,7 @@ function swiftDistributionKey(id, host2) {
|
|
|
8878
9035
|
}
|
|
8879
9036
|
|
|
8880
9037
|
// src/swift-icu.ts
|
|
9038
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
8881
9039
|
var import_node_child_process4 = require("node:child_process");
|
|
8882
9040
|
var import_node_crypto2 = require("node:crypto");
|
|
8883
9041
|
var import_node_fs4 = require("node:fs");
|
|
@@ -8886,6 +9044,7 @@ var import_node_util = require("node:util");
|
|
|
8886
9044
|
var import_node_zlib = require("node:zlib");
|
|
8887
9045
|
|
|
8888
9046
|
// src/swift-toolchain.ts
|
|
9047
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
8889
9048
|
var import_node_child_process3 = require("node:child_process");
|
|
8890
9049
|
var import_node_crypto = require("node:crypto");
|
|
8891
9050
|
var import_node_fs3 = __toESM(require("node:fs"), 1);
|
|
@@ -8903,7 +9062,17 @@ function sourceSwiftCheckout() {
|
|
|
8903
9062
|
}
|
|
8904
9063
|
function swiftSdkOptions() {
|
|
8905
9064
|
const directory = process.env.PEACH_SWIFT_SDKS_PATH;
|
|
8906
|
-
|
|
9065
|
+
if (directory) return ["--swift-sdks-path", import_node_path4.default.resolve(directory)];
|
|
9066
|
+
if (scratch && process.platform === "linux") {
|
|
9067
|
+
const config = process.env.XDG_CONFIG_HOME;
|
|
9068
|
+
if (config !== void 0 && !import_node_path4.default.isAbsolute(config))
|
|
9069
|
+
throw new Error("XDG_CONFIG_HOME must be an absolute path");
|
|
9070
|
+
return [
|
|
9071
|
+
"--swift-sdks-path",
|
|
9072
|
+
config === void 0 ? import_node_path4.default.join(import_node_os3.default.userInfo().homedir, ".swiftpm", "swift-sdks") : import_node_path4.default.join(config, "swiftpm", "swift-sdks")
|
|
9073
|
+
];
|
|
9074
|
+
}
|
|
9075
|
+
return [];
|
|
8907
9076
|
}
|
|
8908
9077
|
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-0d775d32d7c74eae";
|
|
8909
9078
|
var SWIFT_HOST_COMPILER_ID = "0d775d32d7c74eae";
|
|
@@ -8962,7 +9131,6 @@ function peachHome() {
|
|
|
8962
9131
|
return override ? import_node_path4.default.resolve(override) : import_node_path4.default.join(import_node_os3.default.homedir(), ".peach");
|
|
8963
9132
|
}
|
|
8964
9133
|
var scratch;
|
|
8965
|
-
var swiftHome;
|
|
8966
9134
|
function confineSwiftScratch(root) {
|
|
8967
9135
|
if (scratch) return;
|
|
8968
9136
|
import_node_fs3.default.mkdirSync(root, { recursive: true });
|
|
@@ -8973,48 +9141,13 @@ function confineSwiftScratch(root) {
|
|
|
8973
9141
|
}
|
|
8974
9142
|
const dir = import_node_path4.default.join(root, String(process.pid));
|
|
8975
9143
|
import_node_fs3.default.mkdirSync(dir, { recursive: true });
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
import_node_fs3.default.mkdirSync(swiftHome, { recursive: true });
|
|
8980
|
-
}
|
|
8981
|
-
const seeded = import_node_path4.default.join(import_node_os3.default.homedir(), ".swiftpm");
|
|
8982
|
-
const dirAbsentBefore = lstatIfKnown(seeded) === null;
|
|
8983
|
-
const absentBefore = swiftpmSeeds.filter(
|
|
8984
|
-
(name3) => lstatIfKnown(import_node_path4.default.join(seeded, name3)) === null
|
|
8985
|
-
);
|
|
9144
|
+
const home = import_node_path4.default.join(root, "home");
|
|
9145
|
+
import_node_fs3.default.mkdirSync(home, { recursive: true });
|
|
9146
|
+
scratch = { directory: dir, home };
|
|
8986
9147
|
process.once("exit", () => {
|
|
8987
9148
|
import_node_fs3.default.rmSync(dir, { recursive: true, force: true });
|
|
8988
|
-
for (const name3 of absentBefore) removeSwiftpmSeed(import_node_path4.default.join(seeded, name3), name3);
|
|
8989
|
-
if (dirAbsentBefore && lstatIfKnown(seeded)?.isDirectory())
|
|
8990
|
-
try {
|
|
8991
|
-
import_node_fs3.default.rmdirSync(seeded);
|
|
8992
|
-
} catch {
|
|
8993
|
-
}
|
|
8994
9149
|
});
|
|
8995
9150
|
}
|
|
8996
|
-
var swiftpmSeeds = ["cache", "configuration", "security"];
|
|
8997
|
-
function lstatIfKnown(entry) {
|
|
8998
|
-
try {
|
|
8999
|
-
return import_node_fs3.default.lstatSync(entry);
|
|
9000
|
-
} catch (error) {
|
|
9001
|
-
if (error instanceof Error && "code" in error && error.code === "ENOENT") return null;
|
|
9002
|
-
return void 0;
|
|
9003
|
-
}
|
|
9004
|
-
}
|
|
9005
|
-
function removeSwiftpmSeed(entry, name3) {
|
|
9006
|
-
const stat = lstatIfKnown(entry);
|
|
9007
|
-
if (!stat) return;
|
|
9008
|
-
try {
|
|
9009
|
-
if (name3 === "cache") {
|
|
9010
|
-
if (stat.isSymbolicLink() && import_node_fs3.default.readlinkSync(entry).endsWith("/.cache/org.swift.swiftpm"))
|
|
9011
|
-
import_node_fs3.default.unlinkSync(entry);
|
|
9012
|
-
} else if (stat.isDirectory()) {
|
|
9013
|
-
import_node_fs3.default.rmdirSync(entry);
|
|
9014
|
-
}
|
|
9015
|
-
} catch {
|
|
9016
|
-
}
|
|
9017
|
-
}
|
|
9018
9151
|
function processRuns(pid) {
|
|
9019
9152
|
try {
|
|
9020
9153
|
process.kill(pid, 0);
|
|
@@ -9025,7 +9158,14 @@ function processRuns(pid) {
|
|
|
9025
9158
|
}
|
|
9026
9159
|
function swiftEnvironment(base = process.env) {
|
|
9027
9160
|
if (!scratch) return base;
|
|
9028
|
-
return
|
|
9161
|
+
return {
|
|
9162
|
+
...base,
|
|
9163
|
+
TMPDIR: scratch.directory,
|
|
9164
|
+
XDG_CONFIG_HOME: import_node_path4.default.join(scratch.home, ".config"),
|
|
9165
|
+
XDG_CACHE_HOME: import_node_path4.default.join(scratch.home, ".cache"),
|
|
9166
|
+
XDG_DATA_HOME: import_node_path4.default.join(scratch.home, ".local", "share"),
|
|
9167
|
+
...process.platform === "linux" ? { HOME: scratch.home } : {}
|
|
9168
|
+
};
|
|
9029
9169
|
}
|
|
9030
9170
|
function swiftSourceSdk(root) {
|
|
9031
9171
|
const pin = JSON.parse(
|
|
@@ -9146,7 +9286,7 @@ function verifySwiftSdk(swift, sdk) {
|
|
|
9146
9286
|
function installSwiftSdkArchive(swift, sdk, archive) {
|
|
9147
9287
|
validateSwiftSdkIdentity(sdk);
|
|
9148
9288
|
const staging = import_node_fs3.default.realpathSync(
|
|
9149
|
-
import_node_fs3.default.mkdtempSync(import_node_path4.default.join(scratch ?? import_node_os3.default.tmpdir(), "peach-sdk-verification-"))
|
|
9289
|
+
import_node_fs3.default.mkdtempSync(import_node_path4.default.join(scratch?.directory ?? import_node_os3.default.tmpdir(), "peach-sdk-verification-"))
|
|
9150
9290
|
);
|
|
9151
9291
|
try {
|
|
9152
9292
|
if (swiftFileChecksum(archive) !== sdk.wasmSdkChecksum)
|
|
@@ -9222,7 +9362,7 @@ function installSwiftWasmSdk(release, sdk) {
|
|
|
9222
9362
|
} catch {
|
|
9223
9363
|
}
|
|
9224
9364
|
const swift = import_node_path4.default.join(swiftCompiler(release), "swift");
|
|
9225
|
-
const staging = import_node_fs3.default.mkdtempSync(import_node_path4.default.join(scratch ?? import_node_os3.default.tmpdir(), "builder-swift-sdk-"));
|
|
9365
|
+
const staging = import_node_fs3.default.mkdtempSync(import_node_path4.default.join(scratch?.directory ?? import_node_os3.default.tmpdir(), "builder-swift-sdk-"));
|
|
9226
9366
|
const archive = import_node_path4.default.join(staging, "sdk.artifactbundle.tar.gz");
|
|
9227
9367
|
try {
|
|
9228
9368
|
if (sdk.wasmSdkUrl.startsWith("file:"))
|
|
@@ -9458,6 +9598,7 @@ function icuSegment(object2) {
|
|
|
9458
9598
|
}
|
|
9459
9599
|
|
|
9460
9600
|
// src/swift-objc-export.ts
|
|
9601
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
9461
9602
|
var import_node_crypto3 = require("node:crypto");
|
|
9462
9603
|
function swiftObjCExports(args) {
|
|
9463
9604
|
const classes = [];
|
|
@@ -9898,6 +10039,7 @@ _objcRegisterPeerClass(${owner.name}.self, nativeName: "${owner.native}")
|
|
|
9898
10039
|
}
|
|
9899
10040
|
|
|
9900
10041
|
// src/swift-objc-import.ts
|
|
10042
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
9901
10043
|
var import_node_crypto4 = require("node:crypto");
|
|
9902
10044
|
var SwiftObjCImportError = class extends Error {
|
|
9903
10045
|
};
|
|
@@ -10034,6 +10176,7 @@ function swiftObjCImports(graphs, options) {
|
|
|
10034
10176
|
const categories = /* @__PURE__ */ new Map();
|
|
10035
10177
|
const functions = /* @__PURE__ */ new Map();
|
|
10036
10178
|
const typedefs = /* @__PURE__ */ new Map();
|
|
10179
|
+
const wrappedTypedefs = /* @__PURE__ */ new Map();
|
|
10037
10180
|
const visit3 = (node) => {
|
|
10038
10181
|
if (!record(node)) return;
|
|
10039
10182
|
if (node.kind === "ObjCInterfaceDecl" && typeof node.name === "string" && selected.has(node.name)) {
|
|
@@ -10055,6 +10198,9 @@ function swiftObjCImports(graphs, options) {
|
|
|
10055
10198
|
if (node.kind === "TypedefDecl" && typeof node.name === "string" && record(node.type)) {
|
|
10056
10199
|
const canonical2 = node.type.desugaredQualType ?? node.type.qualType;
|
|
10057
10200
|
if (typeof canonical2 === "string") typedefs.set(node.name, canonical2);
|
|
10201
|
+
if (nodes(node.inner).some((attribute) => attribute.kind === "SwiftNewTypeAttr")) {
|
|
10202
|
+
wrappedTypedefs.set(node.name, [...wrappedTypedefs.get(node.name) ?? [], node]);
|
|
10203
|
+
}
|
|
10058
10204
|
}
|
|
10059
10205
|
for (const child of nodes(node.inner)) visit3(child);
|
|
10060
10206
|
};
|
|
@@ -10062,14 +10208,29 @@ function swiftObjCImports(graphs, options) {
|
|
|
10062
10208
|
fail("declarations", "expected a complete Clang translation unit AST");
|
|
10063
10209
|
visit3(options.clangAST);
|
|
10064
10210
|
const symbols = /* @__PURE__ */ new Map();
|
|
10211
|
+
const seenSymbols = /* @__PURE__ */ new Set();
|
|
10065
10212
|
for (const graph of graphs) {
|
|
10066
10213
|
if (graph.module.name !== options.module)
|
|
10067
10214
|
fail("declarations", `symbol graph belongs to ${graph.module.name}`);
|
|
10068
10215
|
for (const symbol of graph.symbols) {
|
|
10069
|
-
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
|
|
10216
|
+
if (symbol.availability?.some(
|
|
10217
|
+
(entry) => entry.isUnconditionallyUnavailable && (!entry.domain || entry.domain === "Swift" || entry.domain === "iOS")
|
|
10218
|
+
))
|
|
10219
|
+
continue;
|
|
10220
|
+
const key2 = JSON.stringify([
|
|
10221
|
+
symbol.identifier.precise,
|
|
10222
|
+
symbol.kind.identifier,
|
|
10223
|
+
symbol.pathComponents,
|
|
10224
|
+
symbol.declarationFragments,
|
|
10225
|
+
symbol.functionSignature,
|
|
10226
|
+
symbol.accessLevel,
|
|
10227
|
+
symbol.availability
|
|
10228
|
+
]);
|
|
10229
|
+
if (seenSymbols.has(key2)) continue;
|
|
10230
|
+
seenSymbols.add(key2);
|
|
10231
|
+
const overloads = symbols.get(symbol.identifier.precise) ?? [];
|
|
10232
|
+
overloads.push(symbol);
|
|
10233
|
+
symbols.set(symbol.identifier.precise, overloads);
|
|
10073
10234
|
}
|
|
10074
10235
|
}
|
|
10075
10236
|
const classes = [];
|
|
@@ -10084,7 +10245,10 @@ function swiftObjCImports(graphs, options) {
|
|
|
10084
10245
|
types.set(name3, nativeName);
|
|
10085
10246
|
}
|
|
10086
10247
|
for (const nativeName of [...selected].sort()) {
|
|
10087
|
-
const
|
|
10248
|
+
const candidates = symbols.get(`c:objc(cs)${nativeName}`);
|
|
10249
|
+
if (candidates && candidates.length !== 1)
|
|
10250
|
+
fail(nativeName, "ambiguous imported class declaration");
|
|
10251
|
+
const symbol = candidates?.[0];
|
|
10088
10252
|
const name3 = symbol?.pathComponents[0];
|
|
10089
10253
|
if (!symbol || symbol.kind.identifier !== "swift.class" || !name3 || !identifier(name3))
|
|
10090
10254
|
fail(nativeName, "missing Swift-imported class declaration");
|
|
@@ -10099,6 +10263,70 @@ function swiftObjCImports(graphs, options) {
|
|
|
10099
10263
|
types.set(name3, nativeName);
|
|
10100
10264
|
classes.push({ name: name3, nativeName });
|
|
10101
10265
|
}
|
|
10266
|
+
const wrapperMembers = /* @__PURE__ */ new Map();
|
|
10267
|
+
const wrapperConformances = /* @__PURE__ */ new Map();
|
|
10268
|
+
for (const graph of graphs)
|
|
10269
|
+
for (const edge of graph.relationships)
|
|
10270
|
+
if (edge.kind === "conformsTo" && edge.source.includes("@T@")) {
|
|
10271
|
+
const protocols = wrapperConformances.get(edge.source) ?? /* @__PURE__ */ new Set();
|
|
10272
|
+
protocols.add(edge.target);
|
|
10273
|
+
wrapperConformances.set(edge.source, protocols);
|
|
10274
|
+
}
|
|
10275
|
+
for (const candidates of symbols.values())
|
|
10276
|
+
for (const member of candidates)
|
|
10277
|
+
if (member.pathComponents.length === 2 && ["init(rawValue:)", "init(_:)"].includes(member.pathComponents[1])) {
|
|
10278
|
+
const owner = member.pathComponents[0];
|
|
10279
|
+
wrapperMembers.set(owner, [...wrapperMembers.get(owner) ?? [], member]);
|
|
10280
|
+
}
|
|
10281
|
+
const stringWrappers = /* @__PURE__ */ new Map();
|
|
10282
|
+
const wrapperSymbols = [...symbols].filter(
|
|
10283
|
+
([usr, candidates]) => usr.includes("@T@") && candidates[0]?.kind.identifier === "swift.struct"
|
|
10284
|
+
).sort(([left], [right]) => left.localeCompare(right));
|
|
10285
|
+
for (const [usr, candidates] of wrapperSymbols) {
|
|
10286
|
+
const nativeName = /^c:.*@T@([A-Za-z_]\w*)$/.exec(usr)?.[1];
|
|
10287
|
+
if (!nativeName) continue;
|
|
10288
|
+
const originals = wrappedTypedefs.get(nativeName);
|
|
10289
|
+
const declaration = originals?.[0];
|
|
10290
|
+
if (!declaration || !record(declaration.type)) continue;
|
|
10291
|
+
const original = declaration.type.desugaredQualType ?? declaration.type.qualType;
|
|
10292
|
+
if (typeof original !== "string" || original.replace(/\s/g, "") !== "NSString*")
|
|
10293
|
+
continue;
|
|
10294
|
+
const symbol = candidates[0];
|
|
10295
|
+
const name3 = symbol.pathComponents[0];
|
|
10296
|
+
if (candidates.length !== 1 || originals?.length !== 1 || symbol.pathComponents.length !== 1 || !name3 || !identifier(name3) || types.has(name3) || stringWrappers.has(name3) || symbol.accessLevel !== "public" || text2(symbol.declarationFragments ?? []).trim() !== `struct ${name3}` || symbol.availability?.length)
|
|
10297
|
+
fail(usr, "typed string wrapper identity is unqualified");
|
|
10298
|
+
if (!["s:SY", "s:SH", "s:SQ", "s:s8SendableP"].every(
|
|
10299
|
+
(protocol) => wrapperConformances.get(usr)?.has(protocol)
|
|
10300
|
+
))
|
|
10301
|
+
fail(usr, "typed string wrapper conformances are unqualified");
|
|
10302
|
+
const members = wrapperMembers.get(name3) ?? [];
|
|
10303
|
+
const initializers = members.filter(
|
|
10304
|
+
(member) => member.pathComponents[1] === "init(rawValue:)"
|
|
10305
|
+
);
|
|
10306
|
+
if (initializers.length !== 1 || initializers[0].kind.identifier !== "swift.init" || initializers[0].accessLevel !== "public" || text2(initializers[0].declarationFragments ?? []).trim() !== "init(rawValue: String)" || !initializers[0].declarationFragments?.some(
|
|
10307
|
+
(part) => part.kind === "typeIdentifier" && part.preciseIdentifier === "s:SS"
|
|
10308
|
+
))
|
|
10309
|
+
fail(usr, "typed string wrapper raw initializer is unqualified");
|
|
10310
|
+
const unlabelled = members.filter((member) => member.pathComponents[1] === "init(_:)");
|
|
10311
|
+
if (unlabelled.length > 1 || unlabelled.length === 1 && (unlabelled[0].kind.identifier !== "swift.init" || unlabelled[0].accessLevel !== "public" || text2(unlabelled[0].declarationFragments ?? []).trim() !== "init(_ rawValue: String)" || !unlabelled[0].declarationFragments?.some(
|
|
10312
|
+
(part) => part.kind === "typeIdentifier" && part.preciseIdentifier === "s:SS"
|
|
10313
|
+
)))
|
|
10314
|
+
fail(usr, "typed string wrapper unlabeled initializer is unqualified");
|
|
10315
|
+
stringWrappers.set(
|
|
10316
|
+
name3,
|
|
10317
|
+
[
|
|
10318
|
+
`public struct ${swiftName(name3)}: Swift.RawRepresentable, Swift.Hashable, Swift.Equatable, Swift._SwiftNewtypeWrapper, Swift._ObjectiveCBridgeable, Swift.Sendable {`,
|
|
10319
|
+
" public typealias RawValue = Swift.String",
|
|
10320
|
+
" public typealias _ObjectiveCType = Foundation.NSString",
|
|
10321
|
+
" private let _rawValue: Swift.String",
|
|
10322
|
+
" public var rawValue: Swift.String { _rawValue }",
|
|
10323
|
+
" public init(rawValue: Swift.String) { _rawValue = rawValue }",
|
|
10324
|
+
...unlabelled.length ? [" public init(_ rawValue: Swift.String) { _rawValue = rawValue }"] : [],
|
|
10325
|
+
"}",
|
|
10326
|
+
""
|
|
10327
|
+
].join("\n")
|
|
10328
|
+
);
|
|
10329
|
+
}
|
|
10102
10330
|
const type = (parts, where) => {
|
|
10103
10331
|
const written = text2(parts).trim();
|
|
10104
10332
|
const optional = /[?!]$/.test(written);
|
|
@@ -10121,7 +10349,7 @@ function swiftObjCImports(graphs, options) {
|
|
|
10121
10349
|
Double: "double"
|
|
10122
10350
|
};
|
|
10123
10351
|
if (!optional && primitive[written] && !parts.some(
|
|
10124
|
-
(part) => part.preciseIdentifier?.startsWith("c:") || part.preciseIdentifier && symbols.get(part.preciseIdentifier)?.kind.identifier === "swift.class"
|
|
10352
|
+
(part) => part.preciseIdentifier?.startsWith("c:") || part.preciseIdentifier && symbols.get(part.preciseIdentifier)?.[0]?.kind.identifier === "swift.class"
|
|
10125
10353
|
))
|
|
10126
10354
|
return {
|
|
10127
10355
|
swift: `Swift.${written === "()" ? "Void" : written}`,
|
|
@@ -10133,7 +10361,7 @@ function swiftObjCImports(graphs, options) {
|
|
|
10133
10361
|
const identifiers = parts.filter((part) => part.kind === "typeIdentifier");
|
|
10134
10362
|
const id = identifiers.length === 1 ? identifiers[0]?.preciseIdentifier : void 0;
|
|
10135
10363
|
const native = id && nativeClass(id);
|
|
10136
|
-
const swiftClass = id ? symbols.get(id) : void 0;
|
|
10364
|
+
const swiftClass = id ? symbols.get(id)?.[0] : void 0;
|
|
10137
10365
|
const resolved = native ? names.get(native) : swiftClass?.kind.identifier === "swift.class" && swiftClass.pathComponents.length === 1 && swiftClass.pathComponents[0] === spelling && types.has(spelling) ? spelling : void 0;
|
|
10138
10366
|
if (!resolved || identifiers[0]?.spelling !== spelling || spelling !== resolved && spelling !== native)
|
|
10139
10367
|
return fail(
|
|
@@ -10194,7 +10422,8 @@ function swiftObjCImports(graphs, options) {
|
|
|
10194
10422
|
);
|
|
10195
10423
|
};
|
|
10196
10424
|
const membersByClass = /* @__PURE__ */ new Map();
|
|
10197
|
-
|
|
10425
|
+
const importedSymbols = [...symbols.values()].flat();
|
|
10426
|
+
for (const symbol of importedSymbols) {
|
|
10198
10427
|
const owner = /^c:objc\(cs\)([A-Za-z_]\w*)\(/.exec(symbol.identifier.precise)?.[1];
|
|
10199
10428
|
if (owner && selected.has(owner)) {
|
|
10200
10429
|
const members = membersByClass.get(owner);
|
|
@@ -10321,27 +10550,40 @@ function swiftObjCImports(graphs, options) {
|
|
|
10321
10550
|
(n) => nodes(n.inner)
|
|
10322
10551
|
);
|
|
10323
10552
|
for (const member of members) {
|
|
10324
|
-
if (member.kind === "ObjCMethodDecl" && typeof member.name === "string" && (/^init(?:$|[^a-z])/.test(member.name.replace(/^_+/, "")) || nodes(member.inner).some(
|
|
10553
|
+
if (member.kind === "ObjCMethodDecl" && typeof member.name === "string" && member.name !== "init" && (/^init(?:$|[^a-z])/.test(member.name.replace(/^_+/, "")) || nodes(member.inner).some(
|
|
10325
10554
|
(attribute) => attribute.kind === "NSConsumesSelfAttr" || attribute.kind === "ObjCDesignatedInitializerAttr"
|
|
10326
|
-
)))
|
|
10555
|
+
)) && !nodes(member.inner).some((attribute) => attribute.kind === "UnavailableAttr"))
|
|
10327
10556
|
fail(
|
|
10328
10557
|
`${nativeName}.${member.name}`,
|
|
10329
10558
|
"explicit or designated initialization is unqualified"
|
|
10330
10559
|
);
|
|
10331
|
-
|
|
10332
|
-
fail(`${nativeName}.${member.name}`, "variadic methods are unqualified");
|
|
10333
|
-
}
|
|
10334
|
-
const constructor = thunk(
|
|
10335
|
-
`${nativeName}:new`,
|
|
10336
|
-
raw2,
|
|
10337
|
-
[],
|
|
10338
|
-
null,
|
|
10339
|
-
`[[${nativeName} alloc] init]`
|
|
10340
|
-
);
|
|
10560
|
+
}
|
|
10341
10561
|
const body = [
|
|
10342
|
-
`public required init(_objcRetained: Swift.UnsafeMutableRawPointer) { precondition(Self.self == ${swiftName(name3)}.self, "Swift subclass construction is unqualified"); super.init(_objcRetained: _objcRetained) }
|
|
10343
|
-
`public init() { precondition(Self.self == ${swiftName(name3)}.self, "Swift subclass construction is unqualified"); super.init(_objcRetained: ${constructor}()!) }`
|
|
10562
|
+
`public required init(_objcRetained: Swift.UnsafeMutableRawPointer) { precondition(Self.self == ${swiftName(name3)}.self, "Swift subclass construction is unqualified"); super.init(_objcRetained: _objcRetained) }`
|
|
10344
10563
|
];
|
|
10564
|
+
const defaultInitializer = members.find(
|
|
10565
|
+
(member) => member.kind === "ObjCMethodDecl" && member.instance === true && member.name === "init"
|
|
10566
|
+
);
|
|
10567
|
+
const importedInitializer = symbols.get(`c:objc(cs)${nativeName}(im)init`);
|
|
10568
|
+
const initializerSpelling = importedInitializer?.[0] ? text2(importedInitializer[0].declarationFragments ?? []).trim() : "init()";
|
|
10569
|
+
if (!/^init[?!]?\(\)$/.test(initializerSpelling))
|
|
10570
|
+
fail(`${nativeName}.init`, "default initializer signature is unqualified");
|
|
10571
|
+
if (!defaultInitializer || !nodes(defaultInitializer.inner).some(
|
|
10572
|
+
(attribute) => attribute.kind === "UnavailableAttr"
|
|
10573
|
+
)) {
|
|
10574
|
+
if (defaultInitializer && (importedInitializer?.length !== 1 || importedInitializer[0]?.kind.identifier !== "swift.init"))
|
|
10575
|
+
fail(`${nativeName}.init`, "missing Swift-imported default initializer");
|
|
10576
|
+
const constructor = thunk(
|
|
10577
|
+
`${nativeName}:new`,
|
|
10578
|
+
raw2,
|
|
10579
|
+
[],
|
|
10580
|
+
null,
|
|
10581
|
+
`[[${nativeName} alloc] init]`
|
|
10582
|
+
);
|
|
10583
|
+
body.push(
|
|
10584
|
+
`public ${initializerSpelling} { precondition(Self.self == ${swiftName(name3)}.self, "Swift subclass construction is unqualified"); ${/^init[?!]/.test(initializerSpelling) ? `guard let _peer = ${constructor}() else { return nil }; super.init(_objcRetained: _peer)` : `super.init(_objcRetained: ${constructor}()!)`} }`
|
|
10585
|
+
);
|
|
10586
|
+
}
|
|
10345
10587
|
bodies.set(name3, body);
|
|
10346
10588
|
const prefix = `c:objc(cs)${nativeName}`;
|
|
10347
10589
|
for (const symbol of membersByClass.get(nativeName) ?? []) {
|
|
@@ -10359,16 +10601,19 @@ function swiftObjCImports(graphs, options) {
|
|
|
10359
10601
|
(m) => m.kind === (property ? "ObjCPropertyDecl" : "ObjCMethodDecl") && m.name === selector && (property ? m.class !== true === instance : m.instance === instance)
|
|
10360
10602
|
);
|
|
10361
10603
|
if (!decl) fail(usr, "member absent from original Clang interface");
|
|
10604
|
+
if (decl.variadic === true)
|
|
10605
|
+
fail(`${nativeName}.${selector}`, "variadic methods are unqualified");
|
|
10362
10606
|
const parts = symbol.declarationFragments ?? [];
|
|
10363
10607
|
const written = text2(parts);
|
|
10364
10608
|
if (symbol.availability?.length || /@|\b(?:optional|nonisolated|isolated|async|throws|rethrows)\b/.test(written))
|
|
10365
10609
|
fail(usr, "availability and asynchronous or throwing imports are unqualified");
|
|
10366
10610
|
if (nodes(decl.inner).some(
|
|
10367
|
-
(a) => /^(?:Unavailable|SwiftPrivate|SwiftAsync|SwiftError|ObjCRequiresSuper
|
|
10611
|
+
(a) => /^(?:Unavailable|SwiftPrivate|SwiftAsync|SwiftError|ObjCRequiresSuper)Attr$/.test(
|
|
10368
10612
|
String(a.kind)
|
|
10369
|
-
)
|
|
10613
|
+
) || a.kind === "NSConsumesSelfAttr" && selector !== "init"
|
|
10370
10614
|
))
|
|
10371
10615
|
fail(usr, "member attributes require a qualified importer path");
|
|
10616
|
+
if (selector === "init" && symbol.kind.identifier === "swift.init") continue;
|
|
10372
10617
|
const receiver = instance ? "_object" : nativeName;
|
|
10373
10618
|
const access = symbol.accessLevel === "open" ? "open" : "public";
|
|
10374
10619
|
const memberName = parts.find((part) => part.kind === "identifier")?.spelling;
|
|
@@ -10447,7 +10692,7 @@ function swiftObjCImports(graphs, options) {
|
|
|
10447
10692
|
}
|
|
10448
10693
|
}
|
|
10449
10694
|
const importedFunctions = [];
|
|
10450
|
-
for (const symbol of
|
|
10695
|
+
for (const symbol of importedSymbols) {
|
|
10451
10696
|
if (symbol.kind.identifier !== "swift.func") continue;
|
|
10452
10697
|
const usr = symbol.identifier.precise;
|
|
10453
10698
|
const native = /^c:@F@([A-Za-z_]\w*)$/.exec(usr)?.[1];
|
|
@@ -10488,7 +10733,7 @@ function swiftObjCImports(graphs, options) {
|
|
|
10488
10733
|
`public func ${swiftName(name3)}(${argumentsSwift}) -> ${result.swift} { ${result.c === "void" ? "" : "return "}${local}(${parameters.map((p) => swiftName(p.name)).join(", ")}) }`
|
|
10489
10734
|
);
|
|
10490
10735
|
}
|
|
10491
|
-
if (!classes.length && !importedFunctions.length)
|
|
10736
|
+
if (!classes.length && !importedFunctions.length && !stringWrappers.size)
|
|
10492
10737
|
fail("declarations", "no represented original Objective-C classes or C functions");
|
|
10493
10738
|
const registerFunction = `_peachRegisterObjCImports_${hash(options.module)}`;
|
|
10494
10739
|
const registration = [
|
|
@@ -10501,12 +10746,14 @@ function swiftObjCImports(graphs, options) {
|
|
|
10501
10746
|
""
|
|
10502
10747
|
].join("\n");
|
|
10503
10748
|
const swift = [
|
|
10504
|
-
...classes.length ? ["import Foundation"
|
|
10749
|
+
...classes.length || stringWrappers.size ? ["import Foundation"] : [],
|
|
10750
|
+
...classes.length ? ["import PeachObjC"] : [],
|
|
10505
10751
|
"",
|
|
10506
10752
|
...external,
|
|
10507
10753
|
"",
|
|
10508
10754
|
...importedFunctions,
|
|
10509
10755
|
"",
|
|
10756
|
+
...stringWrappers.values(),
|
|
10510
10757
|
...classes.flatMap((c) => [
|
|
10511
10758
|
`open class ${swiftName(c.name)}: PeachObjC._ObjCForeignObject {`,
|
|
10512
10759
|
...bodies.get(c.name).map((line) => ` ${line}`),
|
|
@@ -10524,7 +10771,11 @@ function swiftObjCImports(graphs, options) {
|
|
|
10524
10771
|
};
|
|
10525
10772
|
}
|
|
10526
10773
|
|
|
10774
|
+
// src/swift-objc-metadata.ts
|
|
10775
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
10776
|
+
|
|
10527
10777
|
// src/swift-objc-sdk.ts
|
|
10778
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
10528
10779
|
var import_node_path6 = __toESM(require("node:path"), 1);
|
|
10529
10780
|
var IOS_SDK_TARGET = "arm64-apple-ios16.0-simulator";
|
|
10530
10781
|
var OVERLAY_PATH = /^usr\/lib\/swift\/([^/]+)\.swiftmodule\/arm64-apple-ios-simulator\.swiftinterface$/;
|
|
@@ -10546,12 +10797,15 @@ for (const [file, text5] of tree) {
|
|
|
10546
10797
|
}
|
|
10547
10798
|
|
|
10548
10799
|
// src/swift-objc-standin.ts
|
|
10800
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
10549
10801
|
var import_node_child_process5 = require("node:child_process");
|
|
10550
10802
|
var import_node_crypto5 = require("node:crypto");
|
|
10551
10803
|
var import_node_fs5 = __toESM(require("node:fs"), 1);
|
|
10552
10804
|
var import_node_path7 = __toESM(require("node:path"), 1);
|
|
10553
|
-
var OBJC_IMPORT_VERSION = "
|
|
10805
|
+
var OBJC_IMPORT_VERSION = "4";
|
|
10554
10806
|
var NATIVE_GRAPH_SDK_VERSION = "27.1";
|
|
10807
|
+
var WASI_EMULATION = ["_WASI_EMULATED_SIGNAL", "_WASI_EMULATED_MMAN"];
|
|
10808
|
+
var WASI_EMULATION_FLAGS = WASI_EMULATION.map((name3) => `-D${name3}`);
|
|
10555
10809
|
var NATIVE_GRAPH_INPUTS = {
|
|
10556
10810
|
sdk: NATIVE_GRAPH_SDK_VERSION,
|
|
10557
10811
|
settings: "e68503e5e534e9194af5efe8c636ca8b824e2d8237c5f38ec84aa4d155bc8418",
|
|
@@ -10830,7 +11084,9 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original) {
|
|
|
10830
11084
|
"-module-cache-path",
|
|
10831
11085
|
import_node_path7.default.join(cacheDir5, "ios-module-cache"),
|
|
10832
11086
|
"-minimum-access-level",
|
|
10833
|
-
|
|
11087
|
+
// symbol graphs hide public underscored names at the public threshold.
|
|
11088
|
+
// original clang headers remain the declaration boundary.
|
|
11089
|
+
original ? "internal" : "public",
|
|
10834
11090
|
"-skip-synthesized-members",
|
|
10835
11091
|
"-omit-extension-block-symbols",
|
|
10836
11092
|
"-output-dir",
|
|
@@ -11219,6 +11475,7 @@ function validateObjcPeerStartupLibraries(libraries) {
|
|
|
11219
11475
|
}
|
|
11220
11476
|
|
|
11221
11477
|
// src/swift-package.ts
|
|
11478
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
11222
11479
|
function swiftImplicitResourcePaths(paths) {
|
|
11223
11480
|
return paths.filter(
|
|
11224
11481
|
(file) => !file.endsWith(".swift") && (/\.(xcassets|xcstrings|nib|xib|storyboard|xcdatamodeld|xcdatamodel|xcmappingmodel|metal|xcprivacy)(?:\/|$)/.test(
|
|
@@ -11335,6 +11592,51 @@ function swiftTargetModuleName(name3) {
|
|
|
11335
11592
|
function swiftPackageIdentity(url) {
|
|
11336
11593
|
return (url.split("/").pop() ?? url).replace(/\.git$/, "").toLowerCase();
|
|
11337
11594
|
}
|
|
11595
|
+
function clangMacroSetting(macro) {
|
|
11596
|
+
const [name3, ...value] = macro.split("=");
|
|
11597
|
+
return value.length === 0 ? `.define(${JSON.stringify(name3)})` : `.define(${JSON.stringify(name3)}, to: ${JSON.stringify(value.join("="))})`;
|
|
11598
|
+
}
|
|
11599
|
+
var swiftEscapes = {
|
|
11600
|
+
"\\": "\\",
|
|
11601
|
+
'"': '"',
|
|
11602
|
+
"'": "'",
|
|
11603
|
+
n: "\n",
|
|
11604
|
+
r: "\r",
|
|
11605
|
+
t: " "
|
|
11606
|
+
};
|
|
11607
|
+
function settingDefines(call, tool) {
|
|
11608
|
+
const defines = [];
|
|
11609
|
+
for (const open of call.matchAll(new RegExp(`\\b${tool}Settings\\s*:\\s*\\[`, "g"))) {
|
|
11610
|
+
let depth = 1;
|
|
11611
|
+
let index = open.index + open[0].length;
|
|
11612
|
+
const start = index;
|
|
11613
|
+
for (; index < call.length && depth > 0; index++) {
|
|
11614
|
+
const char = call[index];
|
|
11615
|
+
if (char === '"') {
|
|
11616
|
+
for (index++; index < call.length && call[index] !== '"'; index++)
|
|
11617
|
+
if (call[index] === "\\") index++;
|
|
11618
|
+
} else if (char === "[") depth++;
|
|
11619
|
+
else if (char === "]") depth--;
|
|
11620
|
+
}
|
|
11621
|
+
const body = call.slice(start, index - 1);
|
|
11622
|
+
for (const match of body.matchAll(
|
|
11623
|
+
/\.define\(\s*"([A-Za-z_][A-Za-z0-9_]*)"\s*(?:,\s*to:\s*"((?:[^"\\]|\\.)*)"\s*)?\)/g
|
|
11624
|
+
)) {
|
|
11625
|
+
const name3 = match[1];
|
|
11626
|
+
defines.push(
|
|
11627
|
+
match[2] === void 0 ? name3 : `${name3}=${match[2].replace(/\\(.)/g, (_, escape) => {
|
|
11628
|
+
const value = swiftEscapes[escape];
|
|
11629
|
+
if (value === void 0)
|
|
11630
|
+
throw new Error(
|
|
11631
|
+
`Unsupported escape \\${escape} in the value of macro ${name3}`
|
|
11632
|
+
);
|
|
11633
|
+
return value;
|
|
11634
|
+
})}`
|
|
11635
|
+
);
|
|
11636
|
+
}
|
|
11637
|
+
}
|
|
11638
|
+
return defines;
|
|
11639
|
+
}
|
|
11338
11640
|
function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
11339
11641
|
const implicitResources = swiftImplicitResourcePaths(resourcePaths);
|
|
11340
11642
|
const targets = [];
|
|
@@ -11362,9 +11664,9 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
|
11362
11664
|
const cxxInterop = /\.interoperabilityMode\(\s*\.Cxx\s*\)/.test(
|
|
11363
11665
|
call.replace(/"(?:\\.|[^"\\])*"/g, "")
|
|
11364
11666
|
);
|
|
11365
|
-
const defines = [
|
|
11366
|
-
|
|
11367
|
-
|
|
11667
|
+
const defines = settingDefines(call, "swift").map((define) => define.split("=")[0]);
|
|
11668
|
+
const cDefines = settingDefines(call, "c");
|
|
11669
|
+
const cxxDefines = settingDefines(call, "cxx");
|
|
11368
11670
|
const linkedLibraries = [...call.matchAll(/\.linkedLibrary\(\s*"([^"]+)"\s*\)/g)].map(
|
|
11369
11671
|
(match) => match[1]
|
|
11370
11672
|
);
|
|
@@ -11407,6 +11709,8 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
|
11407
11709
|
mainActorIsolation,
|
|
11408
11710
|
...cxxInterop ? { cxxInterop: true } : {},
|
|
11409
11711
|
...defines.length === 0 ? {} : { defines },
|
|
11712
|
+
...cDefines.length === 0 ? {} : { cDefines },
|
|
11713
|
+
...cxxDefines.length === 0 ? {} : { cxxDefines },
|
|
11410
11714
|
...linkedLibraries.length === 0 ? {} : { linkedLibraries },
|
|
11411
11715
|
resources,
|
|
11412
11716
|
...dependencies.length === 0 ? {} : { dependencies },
|
|
@@ -11544,6 +11848,7 @@ function swiftPackagePartition(manifest, resourcePaths = []) {
|
|
|
11544
11848
|
}
|
|
11545
11849
|
|
|
11546
11850
|
// src/swift-root-lock.ts
|
|
11851
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
11547
11852
|
var import_node_child_process6 = require("node:child_process");
|
|
11548
11853
|
var import_node_crypto6 = require("node:crypto");
|
|
11549
11854
|
var import_node_fs6 = require("node:fs");
|
|
@@ -11736,6 +12041,12 @@ async function withSwiftRootLock(root, work, signal) {
|
|
|
11736
12041
|
}
|
|
11737
12042
|
}
|
|
11738
12043
|
|
|
12044
|
+
// src/swiftContract.ts
|
|
12045
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
12046
|
+
|
|
12047
|
+
// src/assetCatalogContract.ts
|
|
12048
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
12049
|
+
|
|
11739
12050
|
// src/swiftContract.ts
|
|
11740
12051
|
function isSwiftObjCPeerStartup(value) {
|
|
11741
12052
|
return value !== null && typeof value === "object" && "registration" in value && isSwiftResourcePath(value.registration) && value.registration.endsWith(".swift") && Object.keys(value).length === 1;
|
|
@@ -11797,6 +12108,7 @@ function isSwiftMetalLibrarySources(value) {
|
|
|
11797
12108
|
}
|
|
11798
12109
|
|
|
11799
12110
|
// src/xcode-header-search.ts
|
|
12111
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
11800
12112
|
var import_node_fs7 = __toESM(require("node:fs"), 1);
|
|
11801
12113
|
var import_node_path9 = __toESM(require("node:path"), 1);
|
|
11802
12114
|
function headerMap(entries) {
|
|
@@ -12371,7 +12683,7 @@ var EXECUTABLE_LINK_FLAGS = ` "-Xclang-linker", "-O0",
|
|
|
12371
12683
|
`;
|
|
12372
12684
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12373
12685
|
var MULTI_MANIFEST_VERSION = 40;
|
|
12374
|
-
var compilerSourceDigest = true ? "
|
|
12686
|
+
var compilerSourceDigest = true ? "9c8bf514e9d972c32ef441bda4effae79610e2c5add1faca769349803321528f" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
12375
12687
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12376
12688
|
const hash2 = (0, import_node_crypto7.createHash)("sha256");
|
|
12377
12689
|
hash2.update(`swift-compile
|
|
@@ -12488,6 +12800,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
12488
12800
|
const linkedNativeModules = [...args.native?.entries() ?? []].flatMap(
|
|
12489
12801
|
([name3, value]) => value.clang ? [name3] : []
|
|
12490
12802
|
);
|
|
12803
|
+
const macroSettings = (values) => (values ?? []).map((value) => ` ${clangMacroSetting(value)},`).join("");
|
|
12491
12804
|
const stanza = (target) => {
|
|
12492
12805
|
if (target.systemLibrary)
|
|
12493
12806
|
return ` .systemLibrary(name: ${JSON.stringify(target.name)}, path: ${JSON.stringify(target.path)}),`;
|
|
@@ -12564,10 +12877,15 @@ function emitSwiftPackageManifest(args) {
|
|
|
12564
12877
|
.unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),
|
|
12565
12878
|
]` : librarySettings.length > 0 ? `,
|
|
12566
12879
|
linkerSettings: [${librarySettings.join(", ")}]` : "";
|
|
12880
|
+
const cDefines = macroSettings(target.cDefines);
|
|
12881
|
+
const cxxDefines = macroSettings(target.cxxDefines);
|
|
12567
12882
|
const nativeSettings = native?.clang ? [
|
|
12568
|
-
`cSettings: [.unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native.clang.flags])})]`,
|
|
12569
|
-
`cxxSettings: [${
|
|
12570
|
-
].join(", ") :
|
|
12883
|
+
`cSettings: [${cDefines} .unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native.clang.flags])})]`,
|
|
12884
|
+
`cxxSettings: [${cxxDefines} .unsafeFlags(${JSON.stringify(["-fno-cxx-modules", ...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native.clang.cxxFlags])})]`
|
|
12885
|
+
].join(", ") : [
|
|
12886
|
+
`cSettings: [${cDefines} .unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native?.flags ?? []])})]`,
|
|
12887
|
+
`cxxSettings: [${cxxDefines} .unsafeFlags(${JSON.stringify(["-fno-cxx-modules", ...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native?.cxxFlags ?? []])})]`
|
|
12888
|
+
].join(", ");
|
|
12571
12889
|
return [
|
|
12572
12890
|
` ${kind}(`,
|
|
12573
12891
|
` name: "${target.name}",`,
|
|
@@ -12577,7 +12895,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
12577
12895
|
...native?.clang ? [
|
|
12578
12896
|
` sources: ${JSON.stringify(native.clang.sources.map((source) => import_node_path10.default.posix.join(native.path, source)))},`,
|
|
12579
12897
|
` publicHeadersPath: ${JSON.stringify(import_node_path10.default.posix.dirname(native.clang.modulemap))},`
|
|
12580
|
-
] : [],
|
|
12898
|
+
] : native?.flags ? [` sources: ${JSON.stringify(native.sources)},`] : [],
|
|
12581
12899
|
// the native backend supplies dependency module maps without their
|
|
12582
12900
|
// compiled modules. textual c++ includes keep those dependencies usable.
|
|
12583
12901
|
` ${clang ? nativeSettings : swiftSettings}${link}`,
|
|
@@ -12603,24 +12921,26 @@ function emitSwiftPackageManifest(args) {
|
|
|
12603
12921
|
' publicHeadersPath: "include",',
|
|
12604
12922
|
` cSettings: [.unsafeFlags(${JSON.stringify([...args.objcExports.flags.filter((flag) => flag !== "-fobjc-arc"), "-fno-objc-arc", "-Xclang", "-disable-objc-default-synthesize-properties"])})]),`
|
|
12605
12923
|
] : [],
|
|
12606
|
-
...[...args.native?.entries() ?? []].flatMap(
|
|
12607
|
-
|
|
12924
|
+
...[...args.native?.entries() ?? []].flatMap(([name3, native]) => {
|
|
12925
|
+
const late = native.late;
|
|
12926
|
+
const owner = targets.find((target) => target.name === name3);
|
|
12927
|
+
return late ? (native.groups ?? [
|
|
12608
12928
|
{
|
|
12609
|
-
name:
|
|
12929
|
+
name: late.name,
|
|
12610
12930
|
sources: native.lateSources,
|
|
12611
12931
|
flags: [],
|
|
12612
12932
|
cxxFlags: []
|
|
12613
12933
|
}
|
|
12614
12934
|
]).flatMap((group) => [
|
|
12615
12935
|
` .target(name: ${JSON.stringify(group.name)},`,
|
|
12616
|
-
` dependencies: ${JSON.stringify(
|
|
12936
|
+
` dependencies: ${JSON.stringify(native.mixed ? [] : [name3, ...late.producers])},`,
|
|
12617
12937
|
` path: ${JSON.stringify(native.clang ? "." : native.path)},`,
|
|
12618
12938
|
` sources: ${JSON.stringify(native.clang ? group.sources.map((source) => import_node_path10.default.posix.join(native.path, source)) : group.sources)},`,
|
|
12619
12939
|
` publicHeadersPath: ${JSON.stringify(native.clang ? import_node_path10.default.posix.dirname(native.clang.modulemap) : "include")},`,
|
|
12620
|
-
` cSettings: [.unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...group.flags])})],`,
|
|
12621
|
-
` cxxSettings: [.unsafeFlags(${JSON.stringify(["-fno-cxx-modules", "-I", native.includeDirectory, "-I", args.headerDirectory, ...group.cxxFlags])})]),`
|
|
12622
|
-
]) : []
|
|
12623
|
-
),
|
|
12940
|
+
` cSettings: [${macroSettings(owner?.cDefines)} .unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...group.flags])})],`,
|
|
12941
|
+
` cxxSettings: [${macroSettings(owner?.cxxDefines)} .unsafeFlags(${JSON.stringify(["-fno-cxx-modules", ...args.objcExports?.flags ?? args.nativeFlags ?? [], "-I", native.includeDirectory, "-I", args.headerDirectory, ...group.cxxFlags])})]),`
|
|
12942
|
+
]) : [];
|
|
12943
|
+
}),
|
|
12624
12944
|
args.cxxLanguageStandard ? ` ],
|
|
12625
12945
|
cxxLanguageStandard: .${args.cxxLanguageStandard}` : " ]",
|
|
12626
12946
|
")",
|
|
@@ -16642,7 +16962,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
16642
16962
|
else files2.set(file, prior);
|
|
16643
16963
|
}
|
|
16644
16964
|
targetStagedFiles.delete(target.name);
|
|
16645
|
-
if (entries.some(([file]) => /\.(?:c|cc|cpp|cxx|m|mm)$/.test(file)) && (swift || input.nativeTargets?.some((value) => value.name === target.name)
|
|
16965
|
+
if (entries.some(([file]) => /\.(?:c|cc|cpp|cxx|m|mm)$/.test(file)) && (swift || input.nativeTargets?.some((value) => value.name === target.name))) {
|
|
16646
16966
|
if (!swift) {
|
|
16647
16967
|
const unprepared = import_node_path10.default.join(
|
|
16648
16968
|
layout.root,
|
|
@@ -16715,8 +17035,42 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
16715
17035
|
const entries = targetEntries(target);
|
|
16716
17036
|
const units = entries.filter(([file]) => /\.(?:c|cc|cpp|cxx|m|mm)$/.test(file));
|
|
16717
17037
|
if (units.length === 0) continue;
|
|
17038
|
+
const includes = `${prefix}include/`;
|
|
17039
|
+
const consumers = /* @__PURE__ */ new Map();
|
|
17040
|
+
const reverse = /* @__PURE__ */ new Map();
|
|
17041
|
+
for (const [file, contents] of entries) {
|
|
17042
|
+
const producers2 = /* @__PURE__ */ new Set();
|
|
17043
|
+
const source = contents.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
17044
|
+
for (const match of source.matchAll(
|
|
17045
|
+
/^\s*#\s*(?:include|import)\s*[<"]([^>"]+)[>"]/gm
|
|
17046
|
+
)) {
|
|
17047
|
+
const include2 = match[1];
|
|
17048
|
+
const producer = /(?:^|\/)([^/]+)-Swift\.h$/.exec(include2)?.[1];
|
|
17049
|
+
if (producer && targets.some((value) => value.name === producer))
|
|
17050
|
+
producers2.add(producer);
|
|
17051
|
+
const local = [
|
|
17052
|
+
import_node_path10.default.posix.join(import_node_path10.default.posix.dirname(file), include2),
|
|
17053
|
+
`${includes}${include2}`
|
|
17054
|
+
].find((candidate) => input.files[candidate] !== void 0);
|
|
17055
|
+
if (local) {
|
|
17056
|
+
reverse.set(local, [...reverse.get(local) ?? [], file]);
|
|
17057
|
+
}
|
|
17058
|
+
}
|
|
17059
|
+
consumers.set(file, producers2);
|
|
17060
|
+
}
|
|
17061
|
+
const queue = [...consumers.keys()].filter((file) => consumers.get(file).size > 0);
|
|
17062
|
+
for (let index = 0; index < queue.length; index++) {
|
|
17063
|
+
const file = queue[index];
|
|
17064
|
+
for (const parent of reverse.get(file) ?? []) {
|
|
17065
|
+
const inherited = consumers.get(parent);
|
|
17066
|
+
const before = inherited.size;
|
|
17067
|
+
for (const producer of consumers.get(file)) inherited.add(producer);
|
|
17068
|
+
if (before !== inherited.size) queue.push(parent);
|
|
17069
|
+
}
|
|
17070
|
+
}
|
|
17071
|
+
const late = units.filter(([file]) => consumers.get(file).size > 0);
|
|
16718
17072
|
const settings = input.nativeTargets?.find((value) => value.name === target.name);
|
|
16719
|
-
if (entries.some(([file]) => file.endsWith(".swift"))
|
|
17073
|
+
if (settings || entries.some(([file]) => file.endsWith(".swift"))) {
|
|
16720
17074
|
try {
|
|
16721
17075
|
if (!settings)
|
|
16722
17076
|
throw new Error(
|
|
@@ -16784,7 +17138,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
16784
17138
|
return relative.split("/").some((part) => part.startsWith(".")) ? import_node_path10.default.posix.join(HIDDEN_UNITS, relative.replaceAll(/(^|\/)\./g, "$1%2E")) : relative;
|
|
16785
17139
|
};
|
|
16786
17140
|
const accessorFlags = accessor ? ["-include", accessorHeader] : [];
|
|
16787
|
-
let nativeC =
|
|
17141
|
+
let nativeC = !roots2.length && !entries.some(([file]) => file.endsWith(".swift")) && !units.some(([file]) => /\.mm?$/.test(file));
|
|
16788
17142
|
if (roots2.length) {
|
|
16789
17143
|
const sourceHeaders = import_node_path10.default.join(
|
|
16790
17144
|
layout.root,
|
|
@@ -16883,7 +17237,13 @@ export *
|
|
|
16883
17237
|
)
|
|
16884
17238
|
];
|
|
16885
17239
|
const cxx = /\.(?:cc|cpp|cxx|mm)$/.test(file);
|
|
16886
|
-
const identity = (0, import_node_crypto7.createHash)("sha256").update(
|
|
17240
|
+
const identity = (0, import_node_crypto7.createHash)("sha256").update(
|
|
17241
|
+
JSON.stringify([
|
|
17242
|
+
cxx,
|
|
17243
|
+
perFile,
|
|
17244
|
+
...nativeC && !roots2.length ? [(consumers.get(file)?.size ?? 0) > 0] : []
|
|
17245
|
+
])
|
|
17246
|
+
).digest("hex").slice(0, 12);
|
|
16887
17247
|
const group = groups.get(identity) ?? {
|
|
16888
17248
|
name: `${target.name}${nativeC ? "Native" : "Swift"}Implementation_${identity}`,
|
|
16889
17249
|
sources: [],
|
|
@@ -16918,6 +17278,31 @@ export *
|
|
|
16918
17278
|
accessor.body
|
|
16919
17279
|
);
|
|
16920
17280
|
}
|
|
17281
|
+
if (nativeC && !roots2.length) {
|
|
17282
|
+
const lateSources = new Set(late.map(([file]) => unitSource(file)));
|
|
17283
|
+
const owner = [...groups.values()].find(
|
|
17284
|
+
(group) => group.sources.every((source) => !lateSources.has(source))
|
|
17285
|
+
);
|
|
17286
|
+
const implementations = [...groups.values()].filter((group) => group !== owner);
|
|
17287
|
+
native.set(target.name, {
|
|
17288
|
+
path: target.path,
|
|
17289
|
+
includeDirectory: include2,
|
|
17290
|
+
sources: owner?.sources ?? [],
|
|
17291
|
+
lateSources: implementations.flatMap((group) => group.sources),
|
|
17292
|
+
flags: owner?.flags ?? flags,
|
|
17293
|
+
cxxFlags: owner?.cxxFlags ?? flags,
|
|
17294
|
+
...implementations.length ? {
|
|
17295
|
+
groups: implementations,
|
|
17296
|
+
late: {
|
|
17297
|
+
name: `${target.name}NativeImplementation`,
|
|
17298
|
+
producers: [
|
|
17299
|
+
...new Set(late.flatMap(([file]) => [...consumers.get(file)]))
|
|
17300
|
+
].sort()
|
|
17301
|
+
}
|
|
17302
|
+
} : {}
|
|
17303
|
+
});
|
|
17304
|
+
continue;
|
|
17305
|
+
}
|
|
16921
17306
|
if (nativeC) {
|
|
16922
17307
|
const modulemaps = Object.entries(settings.productHeaders).filter(
|
|
16923
17308
|
([product2]) => product2.endsWith("/Modules/module.modulemap")
|
|
@@ -16988,40 +17373,6 @@ export *
|
|
|
16988
17373
|
}
|
|
16989
17374
|
continue;
|
|
16990
17375
|
}
|
|
16991
|
-
const includes = `${prefix}include/`;
|
|
16992
|
-
const consumers = /* @__PURE__ */ new Map();
|
|
16993
|
-
const reverse = /* @__PURE__ */ new Map();
|
|
16994
|
-
for (const [file, contents] of entries) {
|
|
16995
|
-
const producers2 = /* @__PURE__ */ new Set();
|
|
16996
|
-
const source = contents.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
16997
|
-
for (const match of source.matchAll(
|
|
16998
|
-
/^\s*#\s*(?:include|import)\s*[<"]([^>"]+)[>"]/gm
|
|
16999
|
-
)) {
|
|
17000
|
-
const include2 = match[1];
|
|
17001
|
-
const producer = /(?:^|\/)([^/]+)-Swift\.h$/.exec(include2)?.[1];
|
|
17002
|
-
if (producer && targets.some((value) => value.name === producer))
|
|
17003
|
-
producers2.add(producer);
|
|
17004
|
-
const local = [
|
|
17005
|
-
import_node_path10.default.posix.join(import_node_path10.default.posix.dirname(file), include2),
|
|
17006
|
-
`${includes}${include2}`
|
|
17007
|
-
].find((candidate) => input.files[candidate] !== void 0);
|
|
17008
|
-
if (local) {
|
|
17009
|
-
reverse.set(local, [...reverse.get(local) ?? [], file]);
|
|
17010
|
-
}
|
|
17011
|
-
}
|
|
17012
|
-
consumers.set(file, producers2);
|
|
17013
|
-
}
|
|
17014
|
-
const queue = [...consumers.keys()].filter((file) => consumers.get(file).size > 0);
|
|
17015
|
-
for (let index = 0; index < queue.length; index++) {
|
|
17016
|
-
const file = queue[index];
|
|
17017
|
-
for (const parent of reverse.get(file) ?? []) {
|
|
17018
|
-
const inherited = consumers.get(parent);
|
|
17019
|
-
const before = inherited.size;
|
|
17020
|
-
for (const producer of consumers.get(file)) inherited.add(producer);
|
|
17021
|
-
if (before !== inherited.size) queue.push(parent);
|
|
17022
|
-
}
|
|
17023
|
-
}
|
|
17024
|
-
const late = units.filter(([file]) => consumers.get(file).size > 0);
|
|
17025
17376
|
native.set(target.name, {
|
|
17026
17377
|
path: target.path,
|
|
17027
17378
|
includeDirectory: import_node_path10.default.join(layout.root, includes),
|
|
@@ -17250,6 +17601,7 @@ ${[
|
|
|
17250
17601
|
"-fobjc-exceptions",
|
|
17251
17602
|
"-fexceptions",
|
|
17252
17603
|
"-fwasm-exceptions",
|
|
17604
|
+
...WASI_EMULATION_FLAGS,
|
|
17253
17605
|
"-fobjc-arc",
|
|
17254
17606
|
"-fblocks",
|
|
17255
17607
|
"-F",
|
|
@@ -17937,6 +18289,7 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
17937
18289
|
}
|
|
17938
18290
|
|
|
17939
18291
|
// src/xcode-project.ts
|
|
18292
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
17940
18293
|
var import_node_child_process8 = require("node:child_process");
|
|
17941
18294
|
var import_node_crypto8 = require("node:crypto");
|
|
17942
18295
|
var import_node_fs9 = __toESM(require("node:fs"), 1);
|
|
@@ -17944,6 +18297,7 @@ var import_node_path12 = __toESM(require("node:path"), 1);
|
|
|
17944
18297
|
var import_plist = __toESM(require("plist"), 1);
|
|
17945
18298
|
|
|
17946
18299
|
// src/xcode-json-project.ts
|
|
18300
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
17947
18301
|
var import_node_path11 = __toESM(require("node:path"), 1);
|
|
17948
18302
|
var import_json5 = __toESM(require_lib(), 1);
|
|
17949
18303
|
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -18276,7 +18630,11 @@ function isJsonObject(value) {
|
|
|
18276
18630
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18277
18631
|
}
|
|
18278
18632
|
|
|
18633
|
+
// src/xcode-target-members.ts
|
|
18634
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
18635
|
+
|
|
18279
18636
|
// src/openstep-plist.ts
|
|
18637
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
18280
18638
|
var isDict = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18281
18639
|
var str = (value) => typeof value === "string" ? value : void 0;
|
|
18282
18640
|
var list = (value) => Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
|
|
@@ -18625,10 +18983,10 @@ function loadProject(xcodeproj) {
|
|
|
18625
18983
|
const projectFile = xcodeProjectFile(xcodeproj);
|
|
18626
18984
|
if (!projectFile)
|
|
18627
18985
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
18628
|
-
const mtimeMs = import_node_fs9.default.statSync(projectFile).mtimeMs;
|
|
18629
|
-
const cached2 = loaded.get(projectFile);
|
|
18630
|
-
if (cached2?.mtimeMs === mtimeMs) return cached2.project;
|
|
18631
18986
|
const source = import_node_fs9.default.readFileSync(projectFile, "utf8");
|
|
18987
|
+
const digest = (0, import_node_crypto8.createHash)("sha256").update(source).digest("hex");
|
|
18988
|
+
const cached2 = loaded.get(projectFile);
|
|
18989
|
+
if (cached2?.digest === digest) return cached2.project;
|
|
18632
18990
|
const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
|
|
18633
18991
|
if (!isDict(root) || !isDict(root.objects)) {
|
|
18634
18992
|
throw new Error(`${projectFile} has no objects table`);
|
|
@@ -18655,7 +19013,7 @@ function loadProject(xcodeproj) {
|
|
|
18655
19013
|
object: object2,
|
|
18656
19014
|
resolvePath
|
|
18657
19015
|
};
|
|
18658
|
-
loaded.set(projectFile, {
|
|
19016
|
+
loaded.set(projectFile, { digest, project: result });
|
|
18659
19017
|
return result;
|
|
18660
19018
|
}
|
|
18661
19019
|
function defaultConfiguration(project) {
|
|
@@ -19950,6 +20308,7 @@ public func ${register}() -> RCTModuleHost.Registration {
|
|
|
19950
20308
|
}
|
|
19951
20309
|
|
|
19952
20310
|
// src/swift-binary-modules.ts
|
|
20311
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
19953
20312
|
var import_node_crypto9 = require("node:crypto");
|
|
19954
20313
|
var import_node_fs11 = __toESM(require("node:fs"), 1);
|
|
19955
20314
|
var import_node_path14 = __toESM(require("node:path"), 1);
|
|
@@ -20032,6 +20391,7 @@ async function swiftBinaryModules(binary2) {
|
|
|
20032
20391
|
}
|
|
20033
20392
|
|
|
20034
20393
|
// src/swift-distribution.ts
|
|
20394
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
20035
20395
|
var import_node_fs13 = __toESM(require("node:fs"), 1);
|
|
20036
20396
|
var import_node_os6 = __toESM(require("node:os"), 1);
|
|
20037
20397
|
var import_node_path16 = __toESM(require("node:path"), 1);
|
|
@@ -20040,12 +20400,12 @@ init_home_paths();
|
|
|
20040
20400
|
|
|
20041
20401
|
// src/swift-distribution.lock.json
|
|
20042
20402
|
var swift_distribution_lock_default = {
|
|
20043
|
-
id: "
|
|
20403
|
+
id: "433f607a19978269",
|
|
20044
20404
|
release: "swift-6.4.0-RELEASE-custom-0d775d32d7c74eae",
|
|
20045
20405
|
wasmSdkId: "swift-6.4.0-RELEASE_wasm-peach-f02bd198",
|
|
20046
20406
|
wasmSdkUrl: "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-f02bd198.artifactbundle.tar.gz",
|
|
20047
20407
|
wasmSdkChecksum: "1e19ea768fd4e821aae34b8966c4ddcee45615c4b3cf018979b061aee2fb5504",
|
|
20048
|
-
source: "
|
|
20408
|
+
source: "f52d21b43f5cba9bd52f1665697284e46d16c0d9",
|
|
20049
20409
|
targets: [
|
|
20050
20410
|
"ImagePlayground",
|
|
20051
20411
|
"QuickLookThumbnailing",
|
|
@@ -20234,16 +20594,16 @@ var swift_distribution_lock_default = {
|
|
|
20234
20594
|
},
|
|
20235
20595
|
hosts: {
|
|
20236
20596
|
"darwin-arm64": {
|
|
20237
|
-
sha256: "
|
|
20238
|
-
size:
|
|
20597
|
+
sha256: "0b814aa2ced56e4452c82227c4251036346015ba6445e742070ee221c53fc575",
|
|
20598
|
+
size: 71080069
|
|
20239
20599
|
},
|
|
20240
20600
|
"linux-x64": {
|
|
20241
|
-
sha256: "
|
|
20242
|
-
size:
|
|
20601
|
+
sha256: "62e67740951c7972fde15bc074fe8838f308432a8521e93691035e7fc105b716",
|
|
20602
|
+
size: 71085950
|
|
20243
20603
|
},
|
|
20244
20604
|
"linux-arm64": {
|
|
20245
|
-
sha256: "
|
|
20246
|
-
size:
|
|
20605
|
+
sha256: "f900ab5b6a4823966cebe291c91710e6323185df971c667c25ddcc1427935b52",
|
|
20606
|
+
size: 71084016
|
|
20247
20607
|
}
|
|
20248
20608
|
}
|
|
20249
20609
|
};
|
|
@@ -20423,11 +20783,13 @@ function swiftModuleToolchain(root) {
|
|
|
20423
20783
|
}
|
|
20424
20784
|
|
|
20425
20785
|
// src/swift-host.ts
|
|
20786
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
20426
20787
|
var import_node_crypto14 = require("node:crypto");
|
|
20427
20788
|
var import_node_fs22 = __toESM(require("node:fs"), 1);
|
|
20428
20789
|
var import_node_path23 = __toESM(require("node:path"), 1);
|
|
20429
20790
|
|
|
20430
20791
|
// ../sootsim-swift/src/bundleAssets.ts
|
|
20792
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
20431
20793
|
var import_svgpath = __toESM(require("svgpath"), 1);
|
|
20432
20794
|
var RASTER_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
20433
20795
|
".avif",
|
|
@@ -20729,6 +21091,7 @@ function enumerateBundleResources(paths) {
|
|
|
20729
21091
|
}
|
|
20730
21092
|
|
|
20731
21093
|
// ../sootsim-swift/src/stringCatalog.ts
|
|
21094
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
20732
21095
|
function isRecord2(value) {
|
|
20733
21096
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
20734
21097
|
}
|
|
@@ -20900,12 +21263,17 @@ function compileStringCatalog(source, name3) {
|
|
|
20900
21263
|
);
|
|
20901
21264
|
}
|
|
20902
21265
|
|
|
21266
|
+
// cli/auth.ts
|
|
21267
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21268
|
+
|
|
20903
21269
|
// src/auth/shared-session.ts
|
|
21270
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
20904
21271
|
var import_node_fs14 = require("node:fs");
|
|
20905
21272
|
var import_node_path17 = require("node:path");
|
|
20906
21273
|
init_home_paths();
|
|
20907
21274
|
|
|
20908
21275
|
// src/public-brand.ts
|
|
21276
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
20909
21277
|
var name2 = "Peach";
|
|
20910
21278
|
var peachPublicBrand = Object.freeze({
|
|
20911
21279
|
name: name2,
|
|
@@ -21003,6 +21371,7 @@ function readSharedDesktopAuthSession() {
|
|
|
21003
21371
|
}
|
|
21004
21372
|
|
|
21005
21373
|
// cli/run-rnx.ts
|
|
21374
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21006
21375
|
var import_node_async_hooks = require("node:async_hooks");
|
|
21007
21376
|
var sinks = new import_node_async_hooks.AsyncLocalStorage();
|
|
21008
21377
|
|
|
@@ -21364,18 +21733,42 @@ var ios_sdk_frameworks_default = {
|
|
|
21364
21733
|
]
|
|
21365
21734
|
};
|
|
21366
21735
|
|
|
21736
|
+
// src/native-app-identity-project.ts
|
|
21737
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21738
|
+
|
|
21739
|
+
// src/android-app-identity.ts
|
|
21740
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21741
|
+
|
|
21742
|
+
// src/android-string-value.ts
|
|
21743
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21744
|
+
|
|
21745
|
+
// src/android-xml.ts
|
|
21746
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21747
|
+
|
|
21748
|
+
// src/native-app-identity.ts
|
|
21749
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21750
|
+
|
|
21751
|
+
// src/bundleGlobalFooter.ts
|
|
21752
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21753
|
+
|
|
21754
|
+
// src/nativeAppIconContract.ts
|
|
21755
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21756
|
+
|
|
21367
21757
|
// src/plist.ts
|
|
21758
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21368
21759
|
var import_plist2 = __toESM(require("plist"), 1);
|
|
21369
21760
|
function parsePlistSource(source) {
|
|
21370
21761
|
return import_plist2.default.parse(source);
|
|
21371
21762
|
}
|
|
21372
21763
|
|
|
21373
21764
|
// src/swift-objc-compile.ts
|
|
21765
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21374
21766
|
var import_node_fs18 = __toESM(require("node:fs"), 1);
|
|
21375
21767
|
var import_node_path21 = __toESM(require("node:path"), 1);
|
|
21376
21768
|
init_home_paths();
|
|
21377
21769
|
|
|
21378
21770
|
// src/swift-package-manifest.ts
|
|
21771
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21379
21772
|
var import_node_child_process10 = require("node:child_process");
|
|
21380
21773
|
var import_node_crypto11 = require("node:crypto");
|
|
21381
21774
|
var import_node_fs15 = __toESM(require("node:fs"), 1);
|
|
@@ -21395,25 +21788,37 @@ var record2 = (value) => value && typeof value === "object" && !Array.isArray(va
|
|
|
21395
21788
|
var array = (value) => Array.isArray(value) ? value : [];
|
|
21396
21789
|
var string2 = (value) => typeof value === "string" ? value : void 0;
|
|
21397
21790
|
function swiftCommand() {
|
|
21398
|
-
return process.platform === "darwin" ?
|
|
21791
|
+
return process.platform === "darwin" ? (
|
|
21792
|
+
// runner-toolchain-platform: darwin
|
|
21793
|
+
(0, import_node_child_process10.execFileSync)("xcrun", ["--find", "swift"], { encoding: "utf8" }).trim()
|
|
21794
|
+
) : import_node_path18.default.join(swiftToolchainBin(swift_distribution_lock_default.release), "swift");
|
|
21399
21795
|
}
|
|
21400
21796
|
var cacheDir3 = import_node_path18.default.join(cacheDir(), "swift-manifests");
|
|
21401
21797
|
var evaluated = /* @__PURE__ */ new Map();
|
|
21402
21798
|
function dump(dir) {
|
|
21403
21799
|
const manifests = import_node_fs15.default.readdirSync(dir).filter((name3) => /^Package(@swift-[\d.]+)?\.swift$/.test(name3)).sort();
|
|
21404
21800
|
const command = swiftCommand();
|
|
21405
|
-
const
|
|
21801
|
+
const toolchain = {
|
|
21802
|
+
path: command,
|
|
21803
|
+
realpath: import_node_fs15.default.realpathSync(command),
|
|
21804
|
+
sha256: (0, import_node_crypto11.createHash)("sha256").update(import_node_fs15.default.readFileSync(command)).digest("hex"),
|
|
21805
|
+
version: (0, import_node_child_process10.execFileSync)(command, ["--version"], {
|
|
21806
|
+
encoding: "utf8",
|
|
21807
|
+
env: swiftEnvironment(),
|
|
21808
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
21809
|
+
}).trim()
|
|
21810
|
+
};
|
|
21811
|
+
const key2 = (0, import_node_crypto11.createHash)("sha256").update(JSON.stringify([toolchain, import_node_path18.default.resolve(dir)])).update(
|
|
21406
21812
|
manifests.map((name3) => `${name3}\0${import_node_fs15.default.readFileSync(import_node_path18.default.join(dir, name3), "utf8")}`).join("\0")
|
|
21407
21813
|
).digest("hex").slice(0, 32);
|
|
21408
21814
|
const cached2 = import_node_path18.default.join(cacheDir3, `${key2}.json`);
|
|
21409
21815
|
if (import_node_fs15.default.existsSync(cached2))
|
|
21410
|
-
return { key: key2, raw: record2(JSON.parse(import_node_fs15.default.readFileSync(cached2, "utf8"))) };
|
|
21816
|
+
return { key: key2, toolchain, raw: record2(JSON.parse(import_node_fs15.default.readFileSync(cached2, "utf8"))) };
|
|
21411
21817
|
let output;
|
|
21412
21818
|
try {
|
|
21413
21819
|
output = (0, import_node_child_process10.execFileSync)(
|
|
21414
|
-
command
|
|
21820
|
+
command,
|
|
21415
21821
|
[
|
|
21416
|
-
...command.args,
|
|
21417
21822
|
"package",
|
|
21418
21823
|
...swiftPackageCacheOptions(),
|
|
21419
21824
|
"--package-path",
|
|
@@ -21438,7 +21843,7 @@ function dump(dir) {
|
|
|
21438
21843
|
}
|
|
21439
21844
|
import_node_fs15.default.mkdirSync(cacheDir3, { recursive: true });
|
|
21440
21845
|
import_node_fs15.default.writeFileSync(cached2, output);
|
|
21441
|
-
return { key: key2, raw: record2(JSON.parse(output)) };
|
|
21846
|
+
return { key: key2, toolchain, raw: record2(JSON.parse(output)) };
|
|
21442
21847
|
}
|
|
21443
21848
|
function defaultTraits(manifest) {
|
|
21444
21849
|
const traits = new Map(
|
|
@@ -21466,15 +21871,18 @@ function linksOnIOS(condition, traits) {
|
|
|
21466
21871
|
}
|
|
21467
21872
|
function swiftPackageManifest(dir) {
|
|
21468
21873
|
dir = import_node_fs15.default.realpathSync(dir);
|
|
21469
|
-
const { key: key2, raw: raw2 } = dump(dir);
|
|
21874
|
+
const { key: key2, raw: raw2, toolchain } = dump(dir);
|
|
21470
21875
|
const known = evaluated.get(key2);
|
|
21471
21876
|
if (known) return known;
|
|
21472
21877
|
const traits = defaultTraits(raw2);
|
|
21473
21878
|
const tools = Number(
|
|
21474
21879
|
/^(\d+)/.exec(string2(record2(raw2.toolsVersion)._version) ?? "5")?.[1] ?? 5
|
|
21475
21880
|
);
|
|
21476
|
-
const
|
|
21477
|
-
|
|
21881
|
+
const declaredModeValues = array(raw2.swiftLanguageVersions).flatMap(
|
|
21882
|
+
(mode) => string2(mode) ?? []
|
|
21883
|
+
);
|
|
21884
|
+
const declaredModes = declaredModeValues.flatMap((mode) => {
|
|
21885
|
+
const major = Number(/^(\d+)/.exec(mode)?.[1]);
|
|
21478
21886
|
return Number.isFinite(major) ? [major] : [];
|
|
21479
21887
|
});
|
|
21480
21888
|
const packageMode = Math.max(
|
|
@@ -21537,10 +21945,14 @@ function swiftPackageManifest(dir) {
|
|
|
21537
21945
|
});
|
|
21538
21946
|
}
|
|
21539
21947
|
let languageMode = packageMode;
|
|
21948
|
+
let sourceLanguageMode = declaredModeValues.length ? declaredModeValues.reduce(
|
|
21949
|
+
(highest, mode) => Number(mode) > Number(highest) ? mode : highest
|
|
21950
|
+
) : tools >= 6 ? "6" : tools >= 5 ? "5" : string2(record2(raw2.toolsVersion)._version) ?? "unknown";
|
|
21540
21951
|
let mainActorIsolation = false;
|
|
21541
21952
|
const defines = [];
|
|
21542
21953
|
const libraries = [];
|
|
21543
21954
|
const nativeSettings = [];
|
|
21955
|
+
const unsupportedSwiftSettings = [];
|
|
21544
21956
|
for (const [tool, standard] of [
|
|
21545
21957
|
["c", string2(raw2.cLanguageStandard)],
|
|
21546
21958
|
["cxx", string2(raw2.cxxLanguageStandard)]
|
|
@@ -21551,6 +21963,16 @@ function swiftPackageManifest(dir) {
|
|
|
21551
21963
|
for (const setting of array(target.settings)) {
|
|
21552
21964
|
const { kind: rawKind, tool, condition } = record2(setting);
|
|
21553
21965
|
const settingKind = record2(rawKind);
|
|
21966
|
+
if (tool === "swift") {
|
|
21967
|
+
const kinds = Object.keys(settingKind);
|
|
21968
|
+
const supported = kinds.length === 1 && (kinds[0] === "define" && /^[A-Za-z_][A-Za-z0-9_]*$/.test(
|
|
21969
|
+
string2(record2(settingKind.define)._0) ?? ""
|
|
21970
|
+
) || kinds[0] === "swiftLanguageMode" && Object.keys(record2(condition)).length === 0 || kinds[0] === "defaultIsolation" && Object.keys(record2(condition)).length === 0 && ["MainActor", "nonisolated"].includes(
|
|
21971
|
+
string2(record2(settingKind.defaultIsolation)._0) ?? ""
|
|
21972
|
+
));
|
|
21973
|
+
if (!supported)
|
|
21974
|
+
unsupportedSwiftSettings.push(JSON.stringify({ kind: rawKind, condition }));
|
|
21975
|
+
}
|
|
21554
21976
|
if ((tool === "c" || tool === "cxx") && linksOnIOS(condition, traits)) {
|
|
21555
21977
|
const config = string2(record2(condition).config);
|
|
21556
21978
|
const header = string2(record2(settingKind.headerSearchPath)._0);
|
|
@@ -21570,6 +21992,7 @@ function swiftPackageManifest(dir) {
|
|
|
21570
21992
|
});
|
|
21571
21993
|
}
|
|
21572
21994
|
const mode = string2(record2(settingKind.swiftLanguageMode)._0);
|
|
21995
|
+
if (tool === "swift" && mode) sourceLanguageMode = mode;
|
|
21573
21996
|
if (mode)
|
|
21574
21997
|
languageMode = Math.max(5, Number(/^(\d+)/.exec(mode)?.[1] ?? languageMode));
|
|
21575
21998
|
if (string2(record2(settingKind.defaultIsolation)._0) === "MainActor")
|
|
@@ -21591,6 +22014,10 @@ function swiftPackageManifest(dir) {
|
|
|
21591
22014
|
});
|
|
21592
22015
|
}
|
|
21593
22016
|
}
|
|
22017
|
+
if (!["5", "6"].includes(sourceLanguageMode))
|
|
22018
|
+
unsupportedSwiftSettings.push(
|
|
22019
|
+
`unsupported Swift language mode: ${sourceLanguageMode}`
|
|
22020
|
+
);
|
|
21594
22021
|
targets.set(name4, {
|
|
21595
22022
|
name: name4,
|
|
21596
22023
|
type: kind,
|
|
@@ -21604,6 +22031,8 @@ function swiftPackageManifest(dir) {
|
|
|
21604
22031
|
libraries,
|
|
21605
22032
|
nativeSettings,
|
|
21606
22033
|
declaresResources: array(target.resources).length > 0,
|
|
22034
|
+
hasPluginUsages: array(target.pluginUsages).length > 0,
|
|
22035
|
+
unsupportedSwiftSettings,
|
|
21607
22036
|
publicHeadersPath: string2(target.publicHeadersPath) ?? "include",
|
|
21608
22037
|
url: string2(target.url) ?? null,
|
|
21609
22038
|
checksum: string2(target.checksum) ?? null
|
|
@@ -21611,7 +22040,7 @@ function swiftPackageManifest(dir) {
|
|
|
21611
22040
|
}
|
|
21612
22041
|
const name3 = string2(raw2.name);
|
|
21613
22042
|
if (!name3) throw new Error(`swiftpm returned no package name for ${dir}`);
|
|
21614
|
-
const manifest = { name: name3, dir, products, targets, packages };
|
|
22043
|
+
const manifest = { name: name3, dir, products, targets, packages, toolchain };
|
|
21615
22044
|
evaluated.set(key2, manifest);
|
|
21616
22045
|
return manifest;
|
|
21617
22046
|
}
|
|
@@ -21640,6 +22069,7 @@ function swiftTargetFiles(manifest, target) {
|
|
|
21640
22069
|
}
|
|
21641
22070
|
|
|
21642
22071
|
// src/swift-packages.ts
|
|
22072
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21643
22073
|
var import_node_child_process11 = require("node:child_process");
|
|
21644
22074
|
var import_node_crypto12 = require("node:crypto");
|
|
21645
22075
|
var import_node_fs16 = __toESM(require("node:fs"), 1);
|
|
@@ -21921,6 +22351,7 @@ function resolveSwiftPackages(options) {
|
|
|
21921
22351
|
}
|
|
21922
22352
|
|
|
21923
22353
|
// src/swift-source-file.ts
|
|
22354
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21924
22355
|
var import_node_fs17 = __toESM(require("node:fs"), 1);
|
|
21925
22356
|
var import_node_path20 = __toESM(require("node:path"), 1);
|
|
21926
22357
|
function readPackageFile(root, file, maxBytes) {
|
|
@@ -22124,16 +22555,19 @@ function xcodeObjCInputs(app, binaries) {
|
|
|
22124
22555
|
}
|
|
22125
22556
|
|
|
22126
22557
|
// src/swift-standin-config.ts
|
|
22558
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
22127
22559
|
var import_acorn = require("acorn");
|
|
22128
22560
|
var import_sucrase = require("sucrase");
|
|
22129
22561
|
|
|
22130
22562
|
// src/swift-standins.ts
|
|
22563
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
22131
22564
|
var import_node_child_process12 = require("node:child_process");
|
|
22132
22565
|
var import_node_crypto13 = require("node:crypto");
|
|
22133
22566
|
var import_node_fs21 = __toESM(require("node:fs"), 1);
|
|
22134
22567
|
var import_node_path22 = __toESM(require("node:path"), 1);
|
|
22135
22568
|
|
|
22136
22569
|
// src/cli-version.ts
|
|
22570
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
22137
22571
|
var import_node_fs19 = require("node:fs");
|
|
22138
22572
|
var import_node_url2 = require("node:url");
|
|
22139
22573
|
var import_meta = {};
|
|
@@ -22166,6 +22600,7 @@ function getCliVersion() {
|
|
|
22166
22600
|
init_home_paths();
|
|
22167
22601
|
|
|
22168
22602
|
// src/output-lock-stdio.ts
|
|
22603
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
22169
22604
|
var import_node_fs20 = require("node:fs");
|
|
22170
22605
|
function outputLockStdio(standard, env = process.env) {
|
|
22171
22606
|
const stdio = [...standard];
|
|
@@ -22192,6 +22627,7 @@ function outputLockStdio(standard, env = process.env) {
|
|
|
22192
22627
|
}
|
|
22193
22628
|
|
|
22194
22629
|
// src/swift-standin-emit.ts
|
|
22630
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
22195
22631
|
var STANDIN_EMIT_VERSION = "12";
|
|
22196
22632
|
var STANDIN_IMPORTS = ["Foundation", "UIKit"];
|
|
22197
22633
|
var TYPE_KINDS = /* @__PURE__ */ new Set([
|
|
@@ -22951,7 +23387,6 @@ function stripDefaults(decl) {
|
|
|
22951
23387
|
|
|
22952
23388
|
// src/swift-standins.ts
|
|
22953
23389
|
var TRIPLE = "wasm32-unknown-wasip1";
|
|
22954
|
-
var WASI_EMULATION = ["_WASI_EMULATED_SIGNAL", "_WASI_EMULATED_MMAN"];
|
|
22955
23390
|
var cacheDir4 = import_node_path22.default.join(cacheDir(), "swift-standins");
|
|
22956
23391
|
var SWIFT_STANDINS_DIR = "__standins__";
|
|
22957
23392
|
function exec(file, args, cwd) {
|
|
@@ -23513,6 +23948,7 @@ ${roots.map((file) => ` header "${file}"
|
|
|
23513
23948
|
TRIPLE,
|
|
23514
23949
|
"--sysroot",
|
|
23515
23950
|
sysroot,
|
|
23951
|
+
...WASI_EMULATION_FLAGS,
|
|
23516
23952
|
"-fsyntax-only",
|
|
23517
23953
|
"-I",
|
|
23518
23954
|
include,
|
|
@@ -23579,6 +24015,7 @@ ${roots.map((file) => ` header "${file}"
|
|
|
23579
24015
|
TRIPLE,
|
|
23580
24016
|
"--sysroot",
|
|
23581
24017
|
sysroot,
|
|
24018
|
+
...WASI_EMULATION_FLAGS,
|
|
23582
24019
|
"-fsyntax-only",
|
|
23583
24020
|
"-I",
|
|
23584
24021
|
include,
|
|
@@ -24206,6 +24643,7 @@ function swiftStandins(binaries, toolchain, provided = /* @__PURE__ */ new Set()
|
|
|
24206
24643
|
}
|
|
24207
24644
|
|
|
24208
24645
|
// src/swift-submit.ts
|
|
24646
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
24209
24647
|
var SWIFT_COMPILE_PATH = "/api/swift-compile";
|
|
24210
24648
|
var MAX_SWIFT_COMPILE_FILES = 256;
|
|
24211
24649
|
var DEFAULT_SWIFT_COMPILE_BUILD_MS = 10 * 6e4;
|
|
@@ -24220,7 +24658,7 @@ var MAX_SWIFT_COMPILE_METAL_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
24220
24658
|
var MAX_SWIFT_COMPILE_IMAGES = 128;
|
|
24221
24659
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
24222
24660
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
24223
|
-
var SWIFT_HOST_ABI =
|
|
24661
|
+
var SWIFT_HOST_ABI = 48;
|
|
24224
24662
|
var POLL_INTERVAL_MS = 1500;
|
|
24225
24663
|
function httpSwiftCompileSubmit(context) {
|
|
24226
24664
|
const { assetReadToken, authorization, endpoint } = context;
|
|
@@ -24567,8 +25005,14 @@ function xcodeLayout(root) {
|
|
|
24567
25005
|
if (relative2 === ".." || relative2.startsWith(`..${import_node_path23.default.sep}`) || import_node_path23.default.isAbsolute(relative2))
|
|
24568
25006
|
throw new Error(`swift input escapes the selected package: ${target.dir}`);
|
|
24569
25007
|
const posix = relative2.split(import_node_path23.default.sep).join(import_node_path23.default.posix.sep);
|
|
25008
|
+
const packageMacros = [
|
|
25009
|
+
"SWIFT_PACKAGE=1",
|
|
25010
|
+
...packageConfiguration === "debug" ? ["DEBUG=1"] : []
|
|
25011
|
+
];
|
|
24570
25012
|
targets.push({
|
|
24571
25013
|
...target,
|
|
25014
|
+
cDefines: packageMacros,
|
|
25015
|
+
cxxDefines: packageMacros,
|
|
24572
25016
|
path: target.remote ? import_node_path23.default.posix.join(XCODE_PACKAGES_DIR, posix) : posix,
|
|
24573
25017
|
exclude: [],
|
|
24574
25018
|
defines: [
|
|
@@ -24725,6 +25169,12 @@ function xcodeManifest(layout) {
|
|
|
24725
25169
|
...target.mainActorIsolation ? [".defaultIsolation(MainActor.self)"] : [],
|
|
24726
25170
|
...(target.defines ?? []).map((name3) => `.define(${JSON.stringify(name3)})`)
|
|
24727
25171
|
].join(", ")}]`;
|
|
25172
|
+
const clangSettings = (target) => [
|
|
25173
|
+
["cSettings", target.cDefines],
|
|
25174
|
+
["cxxSettings", target.cxxDefines]
|
|
25175
|
+
].map(
|
|
25176
|
+
([label, macros]) => macros?.length ? `${label}: [${macros.map(clangMacroSetting).join(", ")}], ` : ""
|
|
25177
|
+
).join("");
|
|
24728
25178
|
const libraries = (target) => target.linkedLibraries?.length ? `, linkerSettings: [${target.linkedLibraries.map((name3) => `.linkedLibrary(${JSON.stringify(name3)})`).join(", ")}]` : "";
|
|
24729
25179
|
return [
|
|
24730
25180
|
"// swift-tools-version: 6.2",
|
|
@@ -24732,7 +25182,7 @@ function xcodeManifest(layout) {
|
|
|
24732
25182
|
'let package = Package(name: "app", targets: [',
|
|
24733
25183
|
` .executableTarget(name: "${layout.app.moduleName}", path: "${XCODE_APP_DIR}", ${settings(layout.app)}),`,
|
|
24734
25184
|
...layout.targets.map(
|
|
24735
|
-
(target) => target.systemLibrary ? ` .systemLibrary(name: "${target.name}", path: "${target.path}"),` : ` .target(name: "${target.name}", dependencies: ${JSON.stringify((target.dependencies ?? []).map((dependency) => dependency.name))}, path: "${target.path}", ${target.exclude.length > 0 ? `exclude: ${JSON.stringify(target.exclude)}, ` : ""}${target.resources ? "resources: [], " : ""}${settings(target)}${libraries(target)}),`
|
|
25185
|
+
(target) => target.systemLibrary ? ` .systemLibrary(name: "${target.name}", path: "${target.path}"),` : ` .target(name: "${target.name}", dependencies: ${JSON.stringify((target.dependencies ?? []).map((dependency) => dependency.name))}, path: "${target.path}", ${target.exclude.length > 0 ? `exclude: ${JSON.stringify(target.exclude)}, ` : ""}${target.resources ? "resources: [], " : ""}${clangSettings(target)}${settings(target)}${libraries(target)}),`
|
|
24736
25186
|
),
|
|
24737
25187
|
"])",
|
|
24738
25188
|
""
|