peachsim 0.1.2209 → 0.1.2213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/command-registry.ts +1 -0
- package/cli/commands/inspect/settling.ts +1 -1
- package/cli/commands/map.ts +576 -0
- package/cli/commands/runtime.ts +1 -1
- package/cli/main.ts +6 -0
- package/cli/outbound-endpoints.ts +11 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +282 -53
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +6 -3
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +280 -51
- 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 +1264 -856
- package/dist-lib/host/fetch-proxy-handler.cjs +21 -5
- 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 +1966 -752
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +1806 -593
- package/dist-lib/native-app-identity-project.cjs +19 -3
- package/dist-lib/native-app-identity-project.mjs +19 -3
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +25 -24
- package/dist-lib/public-origins-lib.json +83 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +2 -2
- package/dist-lib/sdk.mjs +2 -2
- package/dist-lib/skills.cjs +1800 -1334
- package/dist-lib/swift-compile.cjs +58 -12
- package/dist-lib/swift-compile.mjs +57 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +257 -47
- package/dist-lib/vite.cjs +1530 -303
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes +35 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h +8 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSAttributeDescription.h +30 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSEntityDescription.h +14 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSExpressionDescription.h +10 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSFetchIndexDescription.h +13 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSFetchIndexElementDescription.h +18 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObject.h +11 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectContext.h +19 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectID.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModel.h +3 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSMergePolicy.h +17 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStore.h +8 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h +6 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPropertyDescription.h +13 -0
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSRelationshipDescription.h +21 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h +2 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIImage.h +1 -10
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +21 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UINibLoading.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +11 -0
- package/sdk/ios/usr/lib/swift/Combine.swiftmodule/arm64-apple-ios-simulator.swiftinterface +18 -0
- package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -0
- package/sdk/ios/usr/lib/swift/SwiftUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +19 -0
- package/sdk/ios/usr/lib/swift/SwiftUICore.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -0
- package/sdk/ios/usr/lib/swift/UIKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -0
- package/sdk/ios/wasm/include/pthread.h +1 -0
- package/sdk/ios/wasm/include/signal.h +2 -2
- package/sdk/native-hashes.json +3 -3
- package/skills/contrast/SKILL.md +1 -0
- package/src/home-paths.ts +1 -1
- package/src/host/bridge-host.ts +101 -97
- package/src/metro-plugin.ts +4 -1
- package/src/native-static-libraries.ts +7 -0
- package/src/react-native-coverage/native-source-ranges-file.ts +1 -1
- package/src/runtime-assets.ts +0 -1
- package/src/runtime-delivery.ts +1 -1
- package/src/runtime-packs.ts +212 -0
- package/src/swift-compile.ts +48 -10
- package/src/swift-host.ts +22 -3
- package/src/swift-objc-compile.ts +1 -1
- package/src/swift-objc-import.ts +32 -2
- package/src/swift-objc-standin.ts +1 -1
- package/src/swift-packages.ts +53 -28
- package/src/swift-pdf-raster.ts +60 -4
- package/src/swift-shipped-archives.json +44 -0
- package/src/swift-shipped-binaries.ts +12 -0
- package/src/swift-standin-config.ts +4 -2
- package/src/swift-standin-emit.ts +9 -3
- package/src/swift-standins.ts +75 -8
- package/src/vite-plugin-one.ts +4 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2213 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -39,7 +39,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
39
39
|
var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
|
|
40
40
|
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
41
41
|
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
42
|
-
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1", "swift-coverage/source.ts": "c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "25505683ca29a0b380413bf2a5026d4967eacf886e35bc11ece6e15317e5bb02", "home-paths.ts": "
|
|
42
|
+
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1", "swift-coverage/source.ts": "c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "25505683ca29a0b380413bf2a5026d4967eacf886e35bc11ece6e15317e5bb02", "home-paths.ts": "d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "86f79e98323ec065e0e5195324c75ca608f490efbd95dcc25c53d5aa0b9aecc9", "xcode-target-members.ts": "ad7589132bffab265e8a10b64e24484fe88b4a2b1cc0ee19a97f151a002eca77", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -653,6 +653,14 @@ var init_product = __esm({
|
|
|
653
653
|
}
|
|
654
654
|
});
|
|
655
655
|
|
|
656
|
+
// ../contrast-runtime-delivery/src/packs.ts
|
|
657
|
+
var init_packs = __esm({
|
|
658
|
+
"../contrast-runtime-delivery/src/packs.ts"() {
|
|
659
|
+
"use strict";
|
|
660
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
|
|
656
664
|
// ../contrast-runtime-delivery/src/index.ts
|
|
657
665
|
async function installVerifiedTarball(tarball) {
|
|
658
666
|
const { destDir, installedMarker, signal } = tarball;
|
|
@@ -871,6 +879,7 @@ var init_src = __esm({
|
|
|
871
879
|
import_node_zlib2 = __toESM(require("node:zlib"), 1);
|
|
872
880
|
init_process_group();
|
|
873
881
|
init_product();
|
|
882
|
+
init_packs();
|
|
874
883
|
init_product();
|
|
875
884
|
}
|
|
876
885
|
});
|
|
@@ -16842,7 +16851,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
16842
16851
|
const coder = members2.some((member) => leaf(member) === "init(coder:)");
|
|
16843
16852
|
if (designated2 && !coder && externalRoot(id) !== "NSObject" && externalRoot(id) !== null)
|
|
16844
16853
|
emit(
|
|
16845
|
-
`${inner}public required init?(coder: NSCoder) { ${options.inert ? "return nil" : trap(`${path99}.init(coder:)`)} }`
|
|
16854
|
+
`${inner}public required init${options.coderNonfailable?.has(path99) ? "" : "?"}(coder: NSCoder) { ${options.inert && !options.coderNonfailable?.has(path99) ? "return nil" : trap(`${path99}.init(coder:)`)} }`
|
|
16846
16855
|
);
|
|
16847
16856
|
if (designated2 && !members2.some((member) => leaf(member) === "init()") && [...superChain(id)].some(
|
|
16848
16857
|
(at) => options.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
|
|
@@ -17023,15 +17032,18 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17023
17032
|
const { 2: rest } = LEADING_ATTRS.exec(text(member));
|
|
17024
17033
|
const decl = rest.replace(/^(?:weak |unowned )/, "").replace(/^((?:static )?)let /, "$1var ");
|
|
17025
17034
|
const witness = `${owner2}.${leaf(member)}`;
|
|
17035
|
+
if (options.forcedOverride?.has(witness)) return;
|
|
17026
17036
|
const body = options.inert ? inertBody(member) : trap(witness);
|
|
17027
17037
|
if (member.kind.identifier === "swift.property" || member.kind.identifier === "swift.type.property") {
|
|
17028
17038
|
const parsed = splitAccessors(decl);
|
|
17029
17039
|
const setter = parsed.settable ? ` ${parsed.nonmutating ? "nonmutating " : ""}set { ${body} }` : "";
|
|
17030
|
-
|
|
17040
|
+
emitAt(
|
|
17041
|
+
witness,
|
|
17031
17042
|
`${indent2}${visibility} ${parsed.decl} { get${parsed.effects} { ${body} }${setter} }`
|
|
17032
17043
|
);
|
|
17033
17044
|
} else
|
|
17034
|
-
|
|
17045
|
+
emitAt(
|
|
17046
|
+
witness,
|
|
17035
17047
|
`${indent2}${member.kind.identifier === "swift.init" ? "public required " : visibility + " "}${stripDefaults(decl)} { ${body} }`
|
|
17036
17048
|
);
|
|
17037
17049
|
};
|
|
@@ -18593,7 +18605,7 @@ var init_swift_objc_standin = __esm({
|
|
|
18593
18605
|
};
|
|
18594
18606
|
NATIVE_GRAPH_ID = (0, import_node_crypto11.createHash)("sha256").update(JSON.stringify(NATIVE_GRAPH_INPUTS)).digest("hex");
|
|
18595
18607
|
ROUNDS = 12;
|
|
18596
|
-
headerFiles = (dir) => import_node_fs24.default.readdirSync(dir, { recursive: true, encoding: "utf8" }).filter((file) => file.endsWith(".h")).sort();
|
|
18608
|
+
headerFiles = (dir) => import_node_fs24.default.readdirSync(dir, { recursive: true, encoding: "utf8" }).filter((file) => file.endsWith(".h") || file.endsWith(".hh")).sort();
|
|
18597
18609
|
MISSING_IMPORT = "#import <PeachMissing/PeachMissing.h>\n";
|
|
18598
18610
|
FRAMEWORK_HEADER = /^System\/Library\/Frameworks\/([^/]+)\.framework\/Headers\/(.+)$/;
|
|
18599
18611
|
FRAMEWORK_MODULEMAP = /^System\/Library\/Frameworks\/([^/]+)\.framework\/Modules\/module\.modulemap$/;
|
|
@@ -25732,16 +25744,30 @@ function swiftClangImporterFlags(flags) {
|
|
|
25732
25744
|
(flag) => flag !== "-fobjc-arc" && flag !== "-fno-objc-arc" && !/^-std=(?:c(?!\+\+)|gnu(?!\+\+)|iso9899:)/.test(flag)
|
|
25733
25745
|
);
|
|
25734
25746
|
}
|
|
25735
|
-
function
|
|
25747
|
+
function swiftSubmoduleImports(sources) {
|
|
25748
|
+
const imports2 = /* @__PURE__ */ new Map();
|
|
25749
|
+
for (const source of sources)
|
|
25750
|
+
for (const [, module2, submodule] of source.matchAll(SWIFT_SUBMODULE_IMPORT)) {
|
|
25751
|
+
const names = imports2.get(module2) ?? /* @__PURE__ */ new Set();
|
|
25752
|
+
names.add(submodule);
|
|
25753
|
+
imports2.set(module2, names);
|
|
25754
|
+
}
|
|
25755
|
+
return imports2;
|
|
25756
|
+
}
|
|
25757
|
+
function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new Set()) {
|
|
25758
|
+
const header = (file) => `header ${JSON.stringify(file)}`;
|
|
25759
|
+
const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "");
|
|
25736
25760
|
return [
|
|
25737
25761
|
`module ${module2} {`,
|
|
25738
|
-
...headers.map(
|
|
25762
|
+
...headers.map(
|
|
25763
|
+
(file) => submodules.has(stem(file)) ? ` module ${stem(file)} { ${header(file)} export * }` : ` ${header(file)}`
|
|
25764
|
+
),
|
|
25739
25765
|
" export *",
|
|
25740
25766
|
"}",
|
|
25741
25767
|
""
|
|
25742
25768
|
].join("\n");
|
|
25743
25769
|
}
|
|
25744
|
-
var SWIFT_OBJC_INTEROP_FLAGS;
|
|
25770
|
+
var SWIFT_OBJC_INTEROP_FLAGS, SWIFT_SUBMODULE_IMPORT;
|
|
25745
25771
|
var init_swift_objc_import = __esm({
|
|
25746
25772
|
"src/swift-objc-import.ts"() {
|
|
25747
25773
|
"use strict";
|
|
@@ -25756,6 +25782,7 @@ var init_swift_objc_import = __esm({
|
|
|
25756
25782
|
"-Xcc",
|
|
25757
25783
|
"-fblocks"
|
|
25758
25784
|
];
|
|
25785
|
+
SWIFT_SUBMODULE_IMPORT = /^[ \t]*(?:@\w+(?:\([^)]*\))?[ \t]+)*import[ \t]+([A-Za-z_]\w*)\.([A-Za-z_]\w*)[ \t]*(?:\/\/.*)?$/gm;
|
|
25759
25786
|
}
|
|
25760
25787
|
});
|
|
25761
25788
|
|
|
@@ -28110,6 +28137,12 @@ function stripCCode(source) {
|
|
|
28110
28137
|
}
|
|
28111
28138
|
return code;
|
|
28112
28139
|
}
|
|
28140
|
+
function swiftCTakesReturnAddress(source) {
|
|
28141
|
+
if (!source.includes("__builtin_return_address")) return false;
|
|
28142
|
+
return /\b__builtin_return_address\s*\(/.test(
|
|
28143
|
+
cActiveCode(stripCCode(source), wasmMacroEnvironment)
|
|
28144
|
+
);
|
|
28145
|
+
}
|
|
28113
28146
|
function swiftCMainEntry(file, source, env = emptyMacroEnvironment) {
|
|
28114
28147
|
if (!isSwiftNativeTranslationUnit(file)) return false;
|
|
28115
28148
|
const code = cActiveCode(stripCCode(source), env);
|
|
@@ -28384,6 +28417,11 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
28384
28417
|
clangImportedModules.add(name3);
|
|
28385
28418
|
}
|
|
28386
28419
|
}
|
|
28420
|
+
const submoduleImports = swiftSubmoduleImports(
|
|
28421
|
+
Object.entries(input.files).flatMap(
|
|
28422
|
+
([file, contents]) => file.endsWith(".swift") ? [contents] : []
|
|
28423
|
+
)
|
|
28424
|
+
);
|
|
28387
28425
|
const headerDirectory = import_node_path41.default.join(layout2.root, ".build", "peach-cxx-headers");
|
|
28388
28426
|
const flattenedHeaders = /* @__PURE__ */ new Set();
|
|
28389
28427
|
if ((0, import_node_fs42.existsSync)(headerDirectory)) {
|
|
@@ -28769,7 +28807,8 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
28769
28807
|
);
|
|
28770
28808
|
const moduleContents = originalModuleMap ? input.files[originalModuleMap[1]] : swiftpmModuleMap?.contents ?? packageModuleMap?.[1] ?? swiftObjCModuleMap(
|
|
28771
28809
|
swiftTargetModuleName(target.name),
|
|
28772
|
-
roots2.map((file) => import_node_path41.default.join(layout2.root, file))
|
|
28810
|
+
roots2.map((file) => import_node_path41.default.join(layout2.root, file)),
|
|
28811
|
+
submoduleImports.get(swiftTargetModuleName(target.name))
|
|
28773
28812
|
);
|
|
28774
28813
|
if (moduleContents === void 0)
|
|
28775
28814
|
throw new Error("missing original module map " + modulemap);
|
|
@@ -29094,10 +29133,14 @@ module ${moduleName2}.Swift {
|
|
|
29094
29133
|
header ${JSON.stringify(import_node_path41.default.join(headerDirectory, name3 + "-Swift.h"))}
|
|
29095
29134
|
requires objc
|
|
29096
29135
|
}
|
|
29097
|
-
` : swiftObjCModuleMap(
|
|
29098
|
-
|
|
29099
|
-
|
|
29100
|
-
|
|
29136
|
+
` : swiftObjCModuleMap(
|
|
29137
|
+
moduleName2,
|
|
29138
|
+
[
|
|
29139
|
+
...(input.nativeTargets?.find((target) => target.name === name3)?.publicHeaders ?? []).map((header) => import_node_path41.default.join(layout2.root, header)),
|
|
29140
|
+
import_node_path41.default.join(headerDirectory, name3 + "-Swift.h")
|
|
29141
|
+
],
|
|
29142
|
+
submoduleImports.get(moduleName2)
|
|
29143
|
+
)
|
|
29101
29144
|
);
|
|
29102
29145
|
nativeHeaderFlags.push("-fmodule-map-file=" + modulemap);
|
|
29103
29146
|
}
|
|
@@ -30080,8 +30123,12 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
30080
30123
|
const linked = frameworkLinkClosure(scratch2, linkedTargets.targets);
|
|
30081
30124
|
const objects = linked.objects;
|
|
30082
30125
|
if (linked.modules.has("UniformTypeIdentifiers")) {
|
|
30083
|
-
const
|
|
30084
|
-
|
|
30126
|
+
const constantsDir = import_node_path41.default.join(scratch2, "uniform-type-constants");
|
|
30127
|
+
const constantsStamp = import_node_path41.default.join(constantsDir, ".complete");
|
|
30128
|
+
const object6 = import_node_path41.default.join(constantsDir, "UniformTypeIdentifiers-NativeConstants.o");
|
|
30129
|
+
if (!(0, import_node_fs42.existsSync)(constantsStamp) || (0, import_node_fs42.readFileSync)(constantsStamp, "utf8") !== args.frameworkKey) {
|
|
30130
|
+
(0, import_node_fs42.rmSync)(constantsDir, { recursive: true, force: true });
|
|
30131
|
+
(0, import_node_fs42.mkdirSync)(constantsDir);
|
|
30085
30132
|
const sdkPaths2 = swiftSdkPaths(args.moduleRoot, args.toolchainBin);
|
|
30086
30133
|
compileUniformTypeConstants({
|
|
30087
30134
|
bin: args.toolchainBin,
|
|
@@ -30089,8 +30136,9 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
30089
30136
|
darwin: sdkPaths2.darwin,
|
|
30090
30137
|
packageRoot: args.moduleRoot,
|
|
30091
30138
|
minimum: darwinRecordsMinimum(),
|
|
30092
|
-
out:
|
|
30139
|
+
out: constantsDir
|
|
30093
30140
|
});
|
|
30141
|
+
(0, import_node_fs42.writeFileSync)(constantsStamp, args.frameworkKey);
|
|
30094
30142
|
}
|
|
30095
30143
|
objects.push(object6);
|
|
30096
30144
|
linked.owners.set(object6, "UniformTypeIdentifiers");
|
|
@@ -30775,7 +30823,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
30775
30823
|
options.signal
|
|
30776
30824
|
);
|
|
30777
30825
|
}
|
|
30778
|
-
var import_node_child_process23, import_node_crypto20, import_node_fs42, import_node_os11, import_node_path41, v5, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_BUILDER_TRANSPORT_MARGIN_MS, SWIFT_BUILDER_DEFAULT_COMPILE_MS, clangInterfaceHeader, swiftInterfaceDeclarations, linkedModuleDigests, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, SWIFT_IMPORT, kleeneNot, kleeneAnd, kleeneOr, sdkPaths, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, ONE_PRODUCT, SPRITEKIT_PRODUCT, importsSpriteKit, FOUNDATION_IMPLICIT_MODULES, FOUNDATION_IMPLICIT_FLAGS, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, cFlagArray, cxxFlagArray, DIRECTIVE, OS_IOS, DELEGATE_CLASS, FOUNDATION_NETWORKING_TYPES, FOUNDATION_OVERLAY_TYPES, FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, emptyMacroEnvironment, HIDDEN_UNITS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, SWIFT_LINK_STAMP, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN;
|
|
30826
|
+
var import_node_child_process23, import_node_crypto20, import_node_fs42, import_node_os11, import_node_path41, v5, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_BUILDER_TRANSPORT_MARGIN_MS, SWIFT_BUILDER_DEFAULT_COMPILE_MS, clangInterfaceHeader, swiftInterfaceDeclarations, linkedModuleDigests, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, SWIFT_IMPORT, kleeneNot, kleeneAnd, kleeneOr, sdkPaths, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, ONE_PRODUCT, SPRITEKIT_PRODUCT, importsSpriteKit, FOUNDATION_IMPLICIT_MODULES, FOUNDATION_IMPLICIT_FLAGS, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, cFlagArray, cxxFlagArray, DIRECTIVE, OS_IOS, DELEGATE_CLASS, FOUNDATION_NETWORKING_TYPES, FOUNDATION_OVERLAY_TYPES, FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_OVERLAY_GLOBALS, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, emptyMacroEnvironment, wasmMacroEnvironment, HIDDEN_UNITS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, SWIFT_LINK_STAMP, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN;
|
|
30779
30827
|
var init_swift_compile = __esm({
|
|
30780
30828
|
"src/swift-compile.ts"() {
|
|
30781
30829
|
"use strict";
|
|
@@ -30988,7 +31036,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
30988
31036
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
30989
31037
|
MULTI_MANIFEST_VERSION = 68;
|
|
30990
31038
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
30991
|
-
compilerSourceDigest = true ? "
|
|
31039
|
+
compilerSourceDigest = true ? "4646bbe2e0cd2e48e498f51fd3d0d5ea29ecd5e6163fdf3afe8d64d4368022d7" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
30992
31040
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
30993
31041
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
30994
31042
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -31513,6 +31561,14 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
31513
31561
|
predefines: /* @__PURE__ */ new Map(),
|
|
31514
31562
|
targetDefined: /* @__PURE__ */ new Set()
|
|
31515
31563
|
};
|
|
31564
|
+
wasmMacroEnvironment = {
|
|
31565
|
+
...emptyMacroEnvironment,
|
|
31566
|
+
defines: /* @__PURE__ */ new Map([
|
|
31567
|
+
["__wasm__", "1"],
|
|
31568
|
+
["__wasm32__", "1"],
|
|
31569
|
+
["__wasi__", "1"]
|
|
31570
|
+
])
|
|
31571
|
+
};
|
|
31516
31572
|
HIDDEN_UNITS = "PeachHiddenUnits";
|
|
31517
31573
|
LIBXML_REFERENCE = /(?:^|\n)[ \t]*#[ \t]*(?:include|import)[ \t]*["<][ \t]*libxml\/|@import[ \t]+libxml2[ \t]*;|(?:^|\n)[ \t]*import[ \t]+libxml2(?![\w.])/;
|
|
31518
31574
|
LIBXML_SOURCE = /\.(?:c|m|mm|cc|cpp|cxx|h|hh|hpp|hxx|swift)$/;
|
|
@@ -39762,6 +39818,13 @@ var init_native_static_libraries = __esm({
|
|
|
39762
39818
|
upstream: "b94213a11b3a2edadfae89f0c57a7f4ab72772c9",
|
|
39763
39819
|
recipe: "a2642115a5eeb04559c9f1daaa4b4cbe4b1c211533b4cc80cb8339a4477af205",
|
|
39764
39820
|
archive: "libsksg.a"
|
|
39821
|
+
},
|
|
39822
|
+
{
|
|
39823
|
+
name: "webgpu_dawn",
|
|
39824
|
+
nativeSha256: "95078993275bccc969b1dfa1ad0934cbacc05ae59e8aa2a6cc46ce93e97d4f69",
|
|
39825
|
+
upstream: "3d786993a7ded64c4ebb4884b9b079db9ad0e580",
|
|
39826
|
+
recipe: "c55468cc976e837ad894133f2231beb7d1ed64633af7b457b8a2610d7df45994",
|
|
39827
|
+
archive: "libwebgpu_dawn.a"
|
|
39765
39828
|
}
|
|
39766
39829
|
];
|
|
39767
39830
|
}
|
|
@@ -42328,6 +42391,72 @@ var init_numbered_lock = __esm({
|
|
|
42328
42391
|
}
|
|
42329
42392
|
});
|
|
42330
42393
|
|
|
42394
|
+
// src/swift-shipped-archives.json
|
|
42395
|
+
var swift_shipped_archives_default;
|
|
42396
|
+
var init_swift_shipped_archives = __esm({
|
|
42397
|
+
"src/swift-shipped-archives.json"() {
|
|
42398
|
+
swift_shipped_archives_default = {
|
|
42399
|
+
AppCheckCore: "a18d4e5aff27ff4b9bce8d6e73e55ccf1d11515311e219aa4473319cdff3187b",
|
|
42400
|
+
AppLovinSDK: "c00f052c4b15766a6a2734e2b3685234e6bd28dbc47fbe7cbc3edbf56f701d5c",
|
|
42401
|
+
AppsFlyerLib: "13bae495e63e22579dd9525a1c9e88d8eedc78b4586979b7e2d492cfd3efbe1f",
|
|
42402
|
+
FBAEMKit: "ceaf685683c6a23ae4893150d0d770aeeaec34811ac8c146b3aa351beade5fa0",
|
|
42403
|
+
FBAudienceNetwork: "4d84bf1e404a83852a93af2ae73e22e45bb2b11e0a9a445c3b461173a5d6aec3",
|
|
42404
|
+
FBLPromises: "3544fb457e7f60c69740cdd26617a75bdd613943e948becca643022c7edd76c0",
|
|
42405
|
+
FBSDKCoreKit: "1577edd62ec0c172928befed3b309dc59ae8915d2aaad091460d9d1be5ddc13d",
|
|
42406
|
+
FBSDKCoreKit_Basics: "c780833f204f9ec6eab70a3758a45c5c78bfb6f4e590289ccf395497f204cac1",
|
|
42407
|
+
FirebaseAnalytics: "e3253a494375c5174d20cb81925e20afa1ff6b1419125cb608d39b092b53ff2a",
|
|
42408
|
+
FirebaseAppCheck: "af82d72727d55d14f65eee96845d4d9495e4e603b4673709d6f3448b9595cc63",
|
|
42409
|
+
FirebaseAppCheckInterop: "7ffd54e6fe187bf8cd714e3d863e0095f7cbbb0fb802adb87a40c552de7cffcc",
|
|
42410
|
+
FirebaseAuth: "fcde09db8d45ffba67802e81c17b8046db6b56568226ace3fca898983b08c968",
|
|
42411
|
+
FirebaseAuthInterop: "e8e6f4fb42b3fa76c2bade7a522ab0f224558d27d2321175c791d307541787a8",
|
|
42412
|
+
FirebaseCore: "30e3505c715e17682c1dc20bb26ba475e99e6981a9a0dba3cf9352eea632fc1d",
|
|
42413
|
+
FirebaseCoreExtension: "e37ce2abcd4c218ab5426da78cbe7ab41f79ee7eba1d02dd4b0cde952ed2c4a0",
|
|
42414
|
+
FirebaseCoreInternal: "72a15c0c63585faf93e9ffa91e8a8c1c50b24749405804ffae19a29ec05b07ab",
|
|
42415
|
+
FirebaseCrashlytics: "e03c71913efd97678b895abb1e968c83e58b3fbd7955a81ec6e6581b95db16e3",
|
|
42416
|
+
FirebaseFirestore: "f7a1bb7fc4a2fb09298b514114d6aaca9a4f00fd8868667524a05bc4563bf1fd",
|
|
42417
|
+
FirebaseFirestoreInternal: "d9595a1784beaf5cd4a8e0dda0f4364ddfa6b536ad60f82746d81d14dce037a3",
|
|
42418
|
+
FirebaseInstallations: "141e313325bab001f2dbb79dc8a433f884f4c4a12a5feb665e6958098d637f7b",
|
|
42419
|
+
FirebaseRemoteConfig: "e0ae6d626a423d535bc67216f9f0cd66f98f1c0fb4b5bf88074d4496733e2db1",
|
|
42420
|
+
FirebaseRemoteConfigInterop: "794f599eb4232058715b606fa671639c8cc5d821655a0f739651d17c5ef65c37",
|
|
42421
|
+
FirebaseSessions: "1781d72e47dac0fc7a532412641021730bd5b659135633cd9ef7b97ccd31b0ce",
|
|
42422
|
+
FirebaseSharedSwift: "8d63b09a517733ef3a58390bf1e8cf054f058bdd618bb4f19a1f4b5a0b4f09e5",
|
|
42423
|
+
FirebaseStorage: "636b33180dd5ad60b4878357691fe6472cf3bd57ec691e9d661c5444f523df66",
|
|
42424
|
+
GTMSessionFetcher: "f58dc2bd9db39defd73f0f67e7a11893a0c6e6f0ba45cd83cf420b2b3c15f1bd",
|
|
42425
|
+
GoogleAdsOnDeviceConversion: "31a5a1f5204f4844a480d3889b6ebe2e69473ef32b868935c51812c0483cb08b",
|
|
42426
|
+
GoogleAppMeasurement: "5741e6334392e0345f1b5896111ffef4d5a78859970f5e197fa0b7d881165305",
|
|
42427
|
+
GoogleAppMeasurementIdentitySupport: "b70cb033eeb002ed1c5a8140953ccb3be0221ca754c05fe450ed9c9c6547f274",
|
|
42428
|
+
GoogleDataTransport: "7d08050419e0906f13039cc4d2dd69be075234c0bf5bbb34df9dd4891e48831d",
|
|
42429
|
+
GoogleMobileAds: "f2c09c60ee331ce029f563304ad73a481d57ace0d4bc11ce33a2bf59497c59bf",
|
|
42430
|
+
GoogleUtilities: "37a9d3d3810dad763a8a79bd4c7cc4c37b386240725aca07f45dba1826676c8c",
|
|
42431
|
+
Intercom: "fc8251f24b305b91f83304d4dffaf1a90c424a7bc37be8b595dd1fc5cff566ea",
|
|
42432
|
+
Promises: "6d8f1a4b3d561d67adfc2026834779b05685d1cdacea6e83c70d0641c39f24de",
|
|
42433
|
+
RecaptchaInterop: "cf5cc62ebc237b34d5267c1190d18f33b424dbc7f81713f127108d0ad8a592cf",
|
|
42434
|
+
RiveRuntime: "72b6ff5c5a1d153c9cdbea9a917c09be557cfcb1fafa02853fa06b0268551710",
|
|
42435
|
+
absl: "fff0388cf074c69a2da4bc197a005da0b8e5c23ebdcfa383600c540a342f9df1",
|
|
42436
|
+
grpc: "918737c9f8f93e14127b3894e31c7a0522475f2247b74f87d8166dff3a6bafb0",
|
|
42437
|
+
grpcpp: "b83f85e0256cf06df00cf0ed728b5c0d68373ca401742877935771447450b90a",
|
|
42438
|
+
leveldb: "5521a6e6e4cd01b2e31b099d4341f1bccae7e8ba43de648b028928573daf8bb4",
|
|
42439
|
+
nanopb: "a7fafe2e4e16d99de4c58f72e22dcc53221885aa6d678d1270123e4b01badfa3",
|
|
42440
|
+
openssl_grpc: "b2aaede82457cdd15915762a4f57b38e28ba0f47b9b48556a7e0c46881973096"
|
|
42441
|
+
};
|
|
42442
|
+
}
|
|
42443
|
+
});
|
|
42444
|
+
|
|
42445
|
+
// src/swift-shipped-binaries.ts
|
|
42446
|
+
function shippedBinaryDiffers(target, checksum) {
|
|
42447
|
+
const shipped = SHIPPED_ARCHIVES.get(target);
|
|
42448
|
+
return shipped !== void 0 && checksum !== null && checksum !== shipped;
|
|
42449
|
+
}
|
|
42450
|
+
var SHIPPED_ARCHIVES;
|
|
42451
|
+
var init_swift_shipped_binaries = __esm({
|
|
42452
|
+
"src/swift-shipped-binaries.ts"() {
|
|
42453
|
+
"use strict";
|
|
42454
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
42455
|
+
init_swift_shipped_archives();
|
|
42456
|
+
SHIPPED_ARCHIVES = new Map(Object.entries(swift_shipped_archives_default));
|
|
42457
|
+
}
|
|
42458
|
+
});
|
|
42459
|
+
|
|
42331
42460
|
// src/swift-packages.ts
|
|
42332
42461
|
function remoteSwiftCheckouts(root) {
|
|
42333
42462
|
const prepared = preparedSwiftCheckouts(root);
|
|
@@ -42336,16 +42465,22 @@ function remoteSwiftCheckouts(root) {
|
|
|
42336
42465
|
import_node_fs69.default.mkdirSync(cacheDir(), { recursive: true });
|
|
42337
42466
|
return import_node_path69.default.join(import_node_fs69.default.realpathSync(cacheDir()), "swift-packages", key2, "checkouts");
|
|
42338
42467
|
}
|
|
42339
|
-
function
|
|
42468
|
+
function unlowerableSources(files2, target) {
|
|
42469
|
+
if (target.declaresWasiNativeSettings) return [];
|
|
42470
|
+
return [
|
|
42471
|
+
...files2.filter((file) => UNSUPPORTED_NATIVE.test(file)),
|
|
42472
|
+
...files2.filter(isSwiftNativeTranslationUnit).filter((file) => swiftCTakesReturnAddress(import_node_fs69.default.readFileSync(file, "utf8")))
|
|
42473
|
+
];
|
|
42474
|
+
}
|
|
42475
|
+
function unloweredSources(files2, target) {
|
|
42340
42476
|
if (target.type !== "regular") return null;
|
|
42341
|
-
if (target.declaresWasiNativeSettings) return null;
|
|
42342
|
-
const assembly = files2.filter((file) => UNSUPPORTED_NATIVE.test(file));
|
|
42343
|
-
if (assembly.length === 0) return null;
|
|
42344
42477
|
if (!files2.some(isSwiftNativeTranslationUnit)) return null;
|
|
42478
|
+
const unlowered = unlowerableSources(files2, target);
|
|
42479
|
+
if (unlowered.length === 0) return null;
|
|
42345
42480
|
const headers = import_node_path69.default.resolve(target.dir, target.publicHeadersPath);
|
|
42346
42481
|
if (!files2.some((file) => file.startsWith(`${headers}${import_node_path69.default.sep}`) && file.endsWith(".h")))
|
|
42347
42482
|
return null;
|
|
42348
|
-
return
|
|
42483
|
+
return unlowered;
|
|
42349
42484
|
}
|
|
42350
42485
|
function resolvedPins(data) {
|
|
42351
42486
|
if (!data || typeof data !== "object") return null;
|
|
@@ -42641,9 +42776,9 @@ function resolveSwiftPackages(options) {
|
|
|
42641
42776
|
if (target.type === "macro") return preservePackage(pkg, [name3], "host");
|
|
42642
42777
|
const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
|
|
42643
42778
|
const gap = options.binaryGaps?.get(name3);
|
|
42644
|
-
const
|
|
42779
|
+
const unlowerable = unlowerableSources(files2, target);
|
|
42645
42780
|
const placeholder = placeholderPackage(pkg);
|
|
42646
|
-
const ownReason = target.type === "binary" ? `${name3} ${BINARY}${gap ? `; ${gap}` : ""}` : placeholder && gap ? `${name3} stands in as a placeholder (${placeholder}), and ${gap}` : target.type !== "regular" && target.type !== "system" ? `${name3} is a ${target.type} target` :
|
|
42781
|
+
const ownReason = target.type === "binary" ? `${name3} ${BINARY}${gap ? `; ${gap}` : ""}` : placeholder && gap ? `${name3} stands in as a placeholder (${placeholder}), and ${gap}` : target.type !== "regular" && target.type !== "system" ? `${name3} is a ${target.type} target` : unlowerable.length > 0 ? `${name3} has native sources with no wasm32 lowering: ${unlowerable.map((file) => import_node_path69.default.relative(pkg.manifest.dir, file)).join(", ")}${gap ? `; ${gap}` : ""}` : null;
|
|
42647
42782
|
const reasons = target.dependencies.map((dependency) => {
|
|
42648
42783
|
if (dependency.kind === "target") return resolveTarget(pkg, dependency.name);
|
|
42649
42784
|
const nested = resolveDependencyProduct(pkg, dependency);
|
|
@@ -42722,7 +42857,7 @@ function resolveSwiftPackages(options) {
|
|
|
42722
42857
|
(file) => file.endsWith(".swift") && import_node_fs69.default.readFileSync(file, "utf8").trim() === ""
|
|
42723
42858
|
))
|
|
42724
42859
|
return false;
|
|
42725
|
-
if (
|
|
42860
|
+
if (unloweredSources(files2, target)) return false;
|
|
42726
42861
|
claimed.add(key2);
|
|
42727
42862
|
providedTargets.delete(name3);
|
|
42728
42863
|
for (const dependency of target.dependencies) {
|
|
@@ -42736,6 +42871,13 @@ function resolveSwiftPackages(options) {
|
|
|
42736
42871
|
};
|
|
42737
42872
|
const claimProduct = (pkg, product) => {
|
|
42738
42873
|
const roots = pkg.manifest.products.get(product)?.targets ?? [];
|
|
42874
|
+
for (const root of roots) {
|
|
42875
|
+
const target = pkg.manifest.targets.get(root);
|
|
42876
|
+
if (target?.type === "binary" && !options.standinTargets?.has(root) && shippedBinaryDiffers(root, target.checksum)) {
|
|
42877
|
+
providedTargets.delete(root);
|
|
42878
|
+
providedProducts.delete(product);
|
|
42879
|
+
}
|
|
42880
|
+
}
|
|
42739
42881
|
if (roots.map((name3) => claimTarget(pkg, name3)).some(Boolean))
|
|
42740
42882
|
providedProducts.delete(product);
|
|
42741
42883
|
};
|
|
@@ -42763,7 +42905,7 @@ function resolveSwiftPackages(options) {
|
|
|
42763
42905
|
if (target.type === "executable") continue;
|
|
42764
42906
|
const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
|
|
42765
42907
|
const objc = target.type === "regular" && files2.some((file) => /\.(m|mm)$/.test(file));
|
|
42766
|
-
const
|
|
42908
|
+
const unlowered = unloweredSources(files2, target);
|
|
42767
42909
|
const gap = placeholderPackage(pkg);
|
|
42768
42910
|
const sources = files2.filter((file) => file.endsWith(".swift"));
|
|
42769
42911
|
const release = (setting) => setting.configuration !== "debug";
|
|
@@ -42790,7 +42932,7 @@ function resolveSwiftPackages(options) {
|
|
|
42790
42932
|
]
|
|
42791
42933
|
}
|
|
42792
42934
|
});
|
|
42793
|
-
else if (target.type === "binary" || objc ||
|
|
42935
|
+
else if (target.type === "binary" || objc || unlowered)
|
|
42794
42936
|
result.binaries.push({
|
|
42795
42937
|
target: name3,
|
|
42796
42938
|
source: pkg.source,
|
|
@@ -42804,8 +42946,8 @@ function resolveSwiftPackages(options) {
|
|
|
42804
42946
|
import_node_path69.default.join(target.dir, target.publicHeadersPath)
|
|
42805
42947
|
)
|
|
42806
42948
|
},
|
|
42807
|
-
...
|
|
42808
|
-
|
|
42949
|
+
...unlowered ? {
|
|
42950
|
+
unloweredSources: unlowered.map(
|
|
42809
42951
|
(file) => import_node_path69.default.relative(pkg.manifest.dir, file)
|
|
42810
42952
|
)
|
|
42811
42953
|
} : {}
|
|
@@ -43026,8 +43168,10 @@ var init_swift_packages = __esm({
|
|
|
43026
43168
|
init_native_git();
|
|
43027
43169
|
init_numbered_lock();
|
|
43028
43170
|
init_prepared_xcode_phases();
|
|
43171
|
+
init_swift_compile();
|
|
43029
43172
|
init_swift_package();
|
|
43030
43173
|
init_swift_package_manifest();
|
|
43174
|
+
init_swift_shipped_binaries();
|
|
43031
43175
|
swiftBinaryOnDisk = (binary2) => binary2.url !== null || import_node_fs69.default.existsSync(binary2.dir);
|
|
43032
43176
|
SWIFT_PLACEHOLDER_PACKAGES = /* @__PURE__ */ new Map();
|
|
43033
43177
|
placeholderPackage = (pkg) => SWIFT_PLACEHOLDER_PACKAGES.get(swiftPackageIdentity(pkg.manifest.dir));
|
|
@@ -43094,7 +43238,7 @@ var init_swift_standin_digest = __esm({
|
|
|
43094
43238
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
43095
43239
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
43096
43240
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
43097
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
43241
|
+
STANDIN_SOURCE_DIGEST = true ? "f077081111b09ca27482cd53be422dae6cd1bd3a5fd2b2bdef48a83a9c0d6ca8" : standinSourceDigest();
|
|
43098
43242
|
}
|
|
43099
43243
|
});
|
|
43100
43244
|
|
|
@@ -44635,7 +44779,7 @@ function interfaceEnumValues(graphs, interfaceText) {
|
|
|
44635
44779
|
const declarations = [
|
|
44636
44780
|
...interfaceText.matchAll(
|
|
44637
44781
|
new RegExp(
|
|
44638
|
-
`^([ \\t]*)(?:@[\\w.]+(?:\\([^)]*\\))?\\s+)*(?:nonisolated\\s+)?(?:public|open)\\s+enum\\s+${name3}\\s*:\\s*(?:Swift\\.)?U?Int(?:8|16|32|64)
|
|
44782
|
+
`^([ \\t]*)(?:@[\\w.]+(?:\\([^)]*\\))?\\s+)*(?:nonisolated\\s+)?(?:public|open)\\s+enum\\s+${name3}\\s*:\\s*(?:Swift\\.)?(?:U?Int(?:8|16|32|64)?|IntegerLiteralType)\\b[^{]*\\{[ \\t]*$`,
|
|
44639
44783
|
"gm"
|
|
44640
44784
|
)
|
|
44641
44785
|
)
|
|
@@ -44734,9 +44878,26 @@ function mixedStandin(surface, binary2, toolchain, work, behavior, frameworkDirs
|
|
|
44734
44878
|
view.protocolProperties ?? /* @__PURE__ */ new Map(),
|
|
44735
44879
|
null,
|
|
44736
44880
|
view.inheritedConformances,
|
|
44737
|
-
interfaceProjections(view.graphs, interfaceText)
|
|
44881
|
+
interfaceProjections(view.graphs, interfaceText),
|
|
44882
|
+
[],
|
|
44883
|
+
externalConformances(surface.module, interfaceText)
|
|
44738
44884
|
);
|
|
44739
44885
|
}
|
|
44886
|
+
function externalConformances(module2, interfaceText) {
|
|
44887
|
+
const lines = /* @__PURE__ */ new Set();
|
|
44888
|
+
for (const match of interfaceText.matchAll(
|
|
44889
|
+
/^(?:@\w+\s+)*extension\s+([\w.]+)\s*:\s*([^{\n]+?)\s*\{/gm
|
|
44890
|
+
)) {
|
|
44891
|
+
const [, extended, conformances] = match;
|
|
44892
|
+
if (extended.startsWith(`${module2}.`) || /\bwhere\b/.test(conformances)) continue;
|
|
44893
|
+
const own = conformances.split(",").map((name3) => name3.trim()).filter((name3) => name3.startsWith(`${module2}.`));
|
|
44894
|
+
const type = extended.startsWith("Swift.") ? extended : extended.split(".").slice(1).join(".");
|
|
44895
|
+
if (own.length > 0 && type) lines.add(`extension ${type} : ${own.join(", ")} {}
|
|
44896
|
+
`);
|
|
44897
|
+
}
|
|
44898
|
+
return lines.size > 0 ? `
|
|
44899
|
+
${[...lines].join("")}` : "";
|
|
44900
|
+
}
|
|
44740
44901
|
function wasmFlags(toolchain, imports2) {
|
|
44741
44902
|
const { sysroot, darwin, resources, cFlags } = swiftSdkPaths(
|
|
44742
44903
|
toolchain.moduleRoot,
|
|
@@ -44829,7 +44990,7 @@ function objcStandin(surface, binary2, toolchain, work, behavior, frameworks, si
|
|
|
44829
44990
|
dependencyGraphs
|
|
44830
44991
|
);
|
|
44831
44992
|
}
|
|
44832
|
-
function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, requiredInits2, declared, imports2 = [], requireSwift = false, objcProperties = /* @__PURE__ */ new Map(), placeholder = null, inheritedConformances = /* @__PURE__ */ new Map(), projections = /* @__PURE__ */ new Map(), dependencyGraphs = []) {
|
|
44993
|
+
function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, requiredInits2, declared, imports2 = [], requireSwift = false, objcProperties = /* @__PURE__ */ new Map(), placeholder = null, inheritedConformances = /* @__PURE__ */ new Map(), projections = /* @__PURE__ */ new Map(), dependencyGraphs = [], trailer = "") {
|
|
44833
44994
|
const paths = new Set(
|
|
44834
44995
|
graphs.flatMap(
|
|
44835
44996
|
(graph) => graph.symbols.map((symbol2) => symbol2.pathComponents.join("."))
|
|
@@ -44870,6 +45031,8 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
44870
45031
|
const plain = /* @__PURE__ */ new Set();
|
|
44871
45032
|
const unobjc = /* @__PURE__ */ new Set();
|
|
44872
45033
|
const trapped = /* @__PURE__ */ new Set();
|
|
45034
|
+
const forced = /* @__PURE__ */ new Set();
|
|
45035
|
+
const nonfailable = /* @__PURE__ */ new Set();
|
|
44873
45036
|
const unconformed = /* @__PURE__ */ new Map();
|
|
44874
45037
|
const objcProtocols = new Set(
|
|
44875
45038
|
graphs.flatMap(
|
|
@@ -44879,7 +45042,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
44879
45042
|
)
|
|
44880
45043
|
);
|
|
44881
45044
|
const file = import_node_path74.default.join(work, `${module2}.swift`);
|
|
44882
|
-
const inert = binary2.placeholder !== void 0 || binary2.publicHeaders !== void 0 && binary2.
|
|
45045
|
+
const inert = binary2.placeholder !== void 0 || binary2.publicHeaders !== void 0 && binary2.unloweredSources === void 0;
|
|
44883
45046
|
for (; ; ) {
|
|
44884
45047
|
const { source, owners, skipped } = emitSwiftStandin(graphs, {
|
|
44885
45048
|
module: module2,
|
|
@@ -44892,6 +45055,8 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
44892
45055
|
unobjc,
|
|
44893
45056
|
unconformed,
|
|
44894
45057
|
trapped,
|
|
45058
|
+
forcedOverride: forced,
|
|
45059
|
+
coderNonfailable: nonfailable,
|
|
44895
45060
|
inert,
|
|
44896
45061
|
imports: [...placeholder?.peachImports ?? [], ...imports2],
|
|
44897
45062
|
family: [...imports2, ...placeholder?.peachImports ?? []],
|
|
@@ -44911,7 +45076,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
44911
45076
|
`Configured Swift behavior ${module2}.${entry.path} was not emitted: ${entry.reason}`
|
|
44912
45077
|
);
|
|
44913
45078
|
}
|
|
44914
|
-
import_node_fs75.default.writeFileSync(file, source);
|
|
45079
|
+
import_node_fs75.default.writeFileSync(file, source + trailer);
|
|
44915
45080
|
const check2 = (0, import_node_child_process38.spawnSync)(
|
|
44916
45081
|
import_node_path74.default.join(toolchain.toolchainBin, "swiftc"),
|
|
44917
45082
|
// emitting the module runs the diagnostics a typecheck skips, such as
|
|
@@ -44935,10 +45100,10 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
44935
45100
|
return {
|
|
44936
45101
|
module: module2,
|
|
44937
45102
|
target: binary2.target,
|
|
44938
|
-
files: { [`${module2}.swift`]: source },
|
|
45103
|
+
files: { [`${module2}.swift`]: source + trailer },
|
|
44939
45104
|
...imports2.length ? { dependencies: imports2 } : {}
|
|
44940
45105
|
};
|
|
44941
|
-
const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size;
|
|
45106
|
+
const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size + forced.size + nonfailable.size;
|
|
44942
45107
|
const elsewhere = [];
|
|
44943
45108
|
for (const match of check2.stderr.matchAll(/^(\S+?):(\d+):\d+: error: (.*)$/gm)) {
|
|
44944
45109
|
const owner = match[1] === file ? owners[Number(match[2]) - 1] : void 0;
|
|
@@ -44961,14 +45126,22 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
44961
45126
|
throw new Error(
|
|
44962
45127
|
`Configured Swift behavior ${module2}.${owner} does not typecheck: ${match[3]}`
|
|
44963
45128
|
);
|
|
44964
|
-
if (owner && /does not override any|overrides nothing/.test(
|
|
45129
|
+
if (owner && /does not override any|overrides nothing|does not override a designated initializer/.test(
|
|
45130
|
+
match[3]
|
|
45131
|
+
))
|
|
44965
45132
|
plain.add(owner);
|
|
45133
|
+
else if (owner && /failable initializer 'init\(coder:\)' cannot override a non-failable/.test(
|
|
45134
|
+
match[3]
|
|
45135
|
+
) && !nonfailable.has(owner))
|
|
45136
|
+
nonfailable.add(owner);
|
|
45137
|
+
else if (owner && /requires an 'override' keyword/.test(match[3]) && !forced.has(owner))
|
|
45138
|
+
forced.add(owner);
|
|
44966
45139
|
else if (owner && inert && INERT_VALUE.test(match[3]) && !trapped.has(owner))
|
|
44967
45140
|
trapped.add(owner);
|
|
44968
45141
|
else if (owner) omit.set(owner, `rejected by swiftc: ${match[3]}`);
|
|
44969
45142
|
else elsewhere.push(match[3]);
|
|
44970
45143
|
}
|
|
44971
|
-
if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size === before)
|
|
45144
|
+
if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size + forced.size + nonfailable.size === before)
|
|
44972
45145
|
throw new Error(
|
|
44973
45146
|
`its generated source does not typecheck: ${elsewhere.slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
|
|
44974
45147
|
);
|
|
@@ -45770,7 +45943,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
|
|
|
45770
45943
|
...(binary2.headerDependencies ?? []).map(
|
|
45771
45944
|
(dependency) => `${swiftTargetModuleName(dependency.module)}\0${treeDigest(import_node_path74.default.join(binary2.dir, dependency.path))}`
|
|
45772
45945
|
),
|
|
45773
|
-
...binary2.
|
|
45946
|
+
...binary2.unloweredSources ?? []
|
|
45774
45947
|
].join("\0") : swiftBinaryFramework(binary2).digest
|
|
45775
45948
|
);
|
|
45776
45949
|
} catch {
|
|
@@ -46453,7 +46626,7 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
|
|
|
46453
46626
|
const binaryHeaders = binarySearch.flatMap((search) => search.headers);
|
|
46454
46627
|
const configuration = app.configuration === "Debug" ? "debug" : "release";
|
|
46455
46628
|
for (const binary2 of binaries) {
|
|
46456
|
-
if (!binary2.reached || binary2.publicHeaders === void 0 || binary2.
|
|
46629
|
+
if (!binary2.reached || binary2.publicHeaders === void 0 || binary2.unloweredSources !== void 0)
|
|
46457
46630
|
continue;
|
|
46458
46631
|
const manifest = swiftPackageManifest(binary2.dir);
|
|
46459
46632
|
const target = manifest.targets.get(binary2.target);
|
|
@@ -47846,9 +48019,9 @@ var init_self_invocation = __esm({
|
|
|
47846
48019
|
});
|
|
47847
48020
|
|
|
47848
48021
|
// src/swift-pdf-raster.ts
|
|
47849
|
-
function rasterBinary() {
|
|
47850
|
-
const tag = (0, import_node_crypto39.createHash)("sha256").update(
|
|
47851
|
-
const binary2 = import_node_path78.default.join(cacheDir(),
|
|
48022
|
+
function rasterBinary(swift = RASTER_SWIFT, name3 = "swift-pdf-raster") {
|
|
48023
|
+
const tag = (0, import_node_crypto39.createHash)("sha256").update(swift).digest("hex").slice(0, 16);
|
|
48024
|
+
const binary2 = import_node_path78.default.join(cacheDir(), `${name3}-${tag}`);
|
|
47852
48025
|
try {
|
|
47853
48026
|
import_node_fs79.default.accessSync(binary2, import_node_fs79.default.constants.X_OK);
|
|
47854
48027
|
return binary2;
|
|
@@ -47860,7 +48033,7 @@ function rasterBinary() {
|
|
|
47860
48033
|
import_node_fs79.default.mkdtempSync(import_node_path78.default.join(import_node_os16.default.tmpdir(), "swift-pdf-raster-")),
|
|
47861
48034
|
"raster.swift"
|
|
47862
48035
|
);
|
|
47863
|
-
import_node_fs79.default.writeFileSync(source,
|
|
48036
|
+
import_node_fs79.default.writeFileSync(source, swift);
|
|
47864
48037
|
try {
|
|
47865
48038
|
(0, import_node_child_process41.execFileSync)("xcrun", ["swiftc", "-o", binary2, source], { stdio: "pipe" });
|
|
47866
48039
|
} finally {
|
|
@@ -47918,7 +48091,31 @@ function rasterizePdfFile(diskPath, pdfSha256) {
|
|
|
47918
48091
|
import_node_fs79.default.rmSync(import_node_path78.default.dirname(out), { recursive: true, force: true });
|
|
47919
48092
|
}
|
|
47920
48093
|
}
|
|
47921
|
-
|
|
48094
|
+
function rasterizeSvgFile(diskPath, svgSha256) {
|
|
48095
|
+
if (process.platform !== "darwin") return null;
|
|
48096
|
+
const binary2 = rasterBinary(RASTER_SVG_SWIFT, "swift-svg-raster");
|
|
48097
|
+
const tag = (0, import_node_crypto39.createHash)("sha256").update(RASTER_SVG_SWIFT).digest("hex").slice(0, 16);
|
|
48098
|
+
const cached2 = import_node_path78.default.join(cacheDir(), `swift-svg-png-${tag}-${svgSha256}.png`);
|
|
48099
|
+
if (import_node_fs79.default.existsSync(cached2)) return { bytes: import_node_fs79.default.readFileSync(cached2) };
|
|
48100
|
+
const out = import_node_path78.default.join(
|
|
48101
|
+
import_node_fs79.default.mkdtempSync(import_node_path78.default.join(import_node_os16.default.tmpdir(), "swift-svg-png-")),
|
|
48102
|
+
"out.png"
|
|
48103
|
+
);
|
|
48104
|
+
try {
|
|
48105
|
+
(0, import_node_child_process41.execFileSync)(binary2, [diskPath, "3", out], { stdio: "pipe" });
|
|
48106
|
+
const bytes = import_node_fs79.default.readFileSync(out);
|
|
48107
|
+
import_node_fs79.default.mkdirSync(cacheDir(), { recursive: true });
|
|
48108
|
+
import_node_fs79.default.copyFileSync(out, cached2);
|
|
48109
|
+
return { bytes: Buffer.from(bytes) };
|
|
48110
|
+
} catch (error) {
|
|
48111
|
+
throw new Error(
|
|
48112
|
+
`swift svg asset ${diskPath} did not rasterize: ${error instanceof Error ? error.message : String(error)}`
|
|
48113
|
+
);
|
|
48114
|
+
} finally {
|
|
48115
|
+
import_node_fs79.default.rmSync(import_node_path78.default.dirname(out), { recursive: true, force: true });
|
|
48116
|
+
}
|
|
48117
|
+
}
|
|
48118
|
+
var import_node_child_process41, import_node_crypto39, import_node_fs79, import_node_os16, import_node_path78, RASTER_SWIFT, RASTER_SVG_SWIFT;
|
|
47922
48119
|
var init_swift_pdf_raster = __esm({
|
|
47923
48120
|
"src/swift-pdf-raster.ts"() {
|
|
47924
48121
|
"use strict";
|
|
@@ -47954,6 +48151,25 @@ guard let image = ctx.makeImage() else { exit(5) }
|
|
|
47954
48151
|
guard let dest = CGImageDestinationCreateWithURL(output as CFURL, UTType.png.identifier as CFString, 1, nil) else { exit(6) }
|
|
47955
48152
|
CGImageDestinationAddImage(dest, image, nil)
|
|
47956
48153
|
guard CGImageDestinationFinalize(dest) else { exit(7) }
|
|
48154
|
+
`;
|
|
48155
|
+
RASTER_SVG_SWIFT = `import AppKit
|
|
48156
|
+
guard CommandLine.arguments.count == 4 else { exit(1) }
|
|
48157
|
+
let input = URL(fileURLWithPath: CommandLine.arguments[1])
|
|
48158
|
+
let scale = CGFloat(Double(CommandLine.arguments[2]) ?? 3.0)
|
|
48159
|
+
let output = URL(fileURLWithPath: CommandLine.arguments[3])
|
|
48160
|
+
guard let image = NSImage(contentsOf: input), image.size.width > 0, image.size.height > 0 else { exit(2) }
|
|
48161
|
+
let width = Int(ceil(image.size.width * scale))
|
|
48162
|
+
let height = Int(ceil(image.size.height * scale))
|
|
48163
|
+
if width > 12000 || height > 12000 { exit(3) }
|
|
48164
|
+
guard let rep = NSBitmapImageRep(bitmapDataPlanes: nil, pixelsWide: width, pixelsHigh: height, bitsPerSample: 8, samplesPerPixel: 4, hasAlpha: true, isPlanar: false, colorSpaceName: .deviceRGB, bytesPerRow: 0, bitsPerPixel: 0) else { exit(4) }
|
|
48165
|
+
guard let context = NSGraphicsContext(bitmapImageRep: rep) else { exit(5) }
|
|
48166
|
+
NSGraphicsContext.saveGraphicsState()
|
|
48167
|
+
NSGraphicsContext.current = context
|
|
48168
|
+
context.imageInterpolation = .high
|
|
48169
|
+
image.draw(in: NSRect(x: 0, y: 0, width: width, height: height), from: .zero, operation: .copy, fraction: 1)
|
|
48170
|
+
NSGraphicsContext.restoreGraphicsState()
|
|
48171
|
+
guard let data = rep.representation(using: .png, properties: [:]) else { exit(6) }
|
|
48172
|
+
do { try data.write(to: output) } catch { exit(7) }
|
|
47957
48173
|
`;
|
|
47958
48174
|
}
|
|
47959
48175
|
});
|
|
@@ -48151,7 +48367,7 @@ async function swiftPackages(entry, app) {
|
|
|
48151
48367
|
] : []
|
|
48152
48368
|
);
|
|
48153
48369
|
let reached = [...cached2.binaries.filter((binary2) => binary2.reached), ...vendored];
|
|
48154
|
-
const standinArtifact = (binary2) => binary2.publicHeaders === void 0 || binary2.
|
|
48370
|
+
const standinArtifact = (binary2) => binary2.publicHeaders === void 0 || binary2.unloweredSources !== void 0;
|
|
48155
48371
|
const artifacts = reached.filter(standinArtifact);
|
|
48156
48372
|
if (entry.moduleRoot && entry.provided && artifacts.length > 0) {
|
|
48157
48373
|
const resolved = swiftModuleToolchain(entry.moduleRoot);
|
|
@@ -48170,10 +48386,13 @@ async function swiftPackages(entry, app) {
|
|
|
48170
48386
|
const cxxArtifacts = reached.filter(standinArtifact);
|
|
48171
48387
|
const generation = standinGenerationInputs(cxxArtifacts, toolchain, entry.behavior);
|
|
48172
48388
|
if (cached2.standinKey !== generation) {
|
|
48389
|
+
const replaced = new Set(
|
|
48390
|
+
cxxArtifacts.filter((binary2) => shippedBinaryDiffers(binary2.target, binary2.checksum)).map((binary2) => binary2.target)
|
|
48391
|
+
);
|
|
48173
48392
|
const built2 = await swiftStandins(
|
|
48174
48393
|
cxxArtifacts,
|
|
48175
48394
|
toolchain,
|
|
48176
|
-
entry.provided,
|
|
48395
|
+
new Set([...entry.provided].filter((name3) => !replaced.has(name3))),
|
|
48177
48396
|
entry.behavior
|
|
48178
48397
|
);
|
|
48179
48398
|
cached2.packages = await resolveSwiftPackagesAsync({
|
|
@@ -48187,6 +48406,9 @@ async function swiftPackages(entry, app) {
|
|
|
48187
48406
|
...entry.provided,
|
|
48188
48407
|
...cxxArtifacts.map((binary2) => binary2.target).filter((target) => !built2.gaps.has(target))
|
|
48189
48408
|
]),
|
|
48409
|
+
standinTargets: new Set(
|
|
48410
|
+
[...replaced].filter((target) => !built2.gaps.has(target))
|
|
48411
|
+
),
|
|
48190
48412
|
binaryGaps: built2.gaps,
|
|
48191
48413
|
owners
|
|
48192
48414
|
});
|
|
@@ -49096,6 +49318,12 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
|
|
|
49096
49318
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
49097
49319
|
}
|
|
49098
49320
|
bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
|
|
49321
|
+
const svg = ext === ".svg" ? rasterizeSvgFile(disk, (0, import_node_crypto40.createHash)("sha256").update(bytes).digest("hex")) : null;
|
|
49322
|
+
if (svg) {
|
|
49323
|
+
bytes = svg.bytes;
|
|
49324
|
+
ext = ".png";
|
|
49325
|
+
uploadName = `${import_node_path79.default.posix.basename(file, import_node_path79.default.posix.extname(file))}.png`;
|
|
49326
|
+
}
|
|
49099
49327
|
}
|
|
49100
49328
|
if (imageBytes + bytes.length > limits.imageTotalBytes) {
|
|
49101
49329
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
@@ -49994,6 +50222,7 @@ var init_swift_host = __esm({
|
|
|
49994
50222
|
init_swift_package_manifest();
|
|
49995
50223
|
init_swift_packages();
|
|
49996
50224
|
init_swift_pdf_raster();
|
|
50225
|
+
init_swift_shipped_binaries();
|
|
49997
50226
|
init_swift_source_file();
|
|
49998
50227
|
init_swift_standin_config();
|
|
49999
50228
|
init_swift_standins();
|
|
@@ -55439,7 +55668,7 @@ var init_nitro_superset = __esm({
|
|
|
55439
55668
|
init_nitroContract();
|
|
55440
55669
|
init_swift_standin_digest();
|
|
55441
55670
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
55442
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
55671
|
+
NITRO_COMPILER_DIGEST = true ? "d738b6ab8d9565d2ed45147861078597c0ce97c0b2f9eccb844e3b6bbf98cc62" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
55443
55672
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
55444
55673
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
55445
55674
|
published = /* @__PURE__ */ new Map();
|
|
@@ -56664,7 +56893,7 @@ var init_expo_native_compiler_digest = __esm({
|
|
|
56664
56893
|
|
|
56665
56894
|
// src/expo-native-prebuilt.ts
|
|
56666
56895
|
function expoNativeCompilerDigestValue() {
|
|
56667
|
-
return true ? "
|
|
56896
|
+
return true ? "84a9fe588bafb71e772f78ffc8de2ac50d4ff654547f5aab6cb44528fc7c7d15" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
56668
56897
|
}
|
|
56669
56898
|
function readSources(value) {
|
|
56670
56899
|
const sources = isRecord(value) ? value.sources : null;
|
|
@@ -64141,7 +64370,7 @@ var import_node_path5 = require("node:path");
|
|
|
64141
64370
|
init_src();
|
|
64142
64371
|
|
|
64143
64372
|
// runtime-companion.json
|
|
64144
|
-
var runtime_companion_default = { abi: 1, sha256: "
|
|
64373
|
+
var runtime_companion_default = { abi: 1, sha256: "1c15d055a3e1e68a17d3f735cd1c592fdc418c85e781e44abf4f4aa0b1215b52", file: "node/cli-1c15d055a3e1e68a17d3f735cd1c592fdc418c85e781e44abf4f4aa0b1215b52.cjs" };
|
|
64145
64374
|
|
|
64146
64375
|
// src/cli-runtime.ts
|
|
64147
64376
|
init_answeredNativePackages();
|