peachsim 0.1.2209 → 0.1.2210
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/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 +271 -51
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +270 -50
- 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 +271 -51
- package/dist-lib/host/fetch-proxy-handler.cjs +16 -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 +16 -3
- 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 +16 -3
- package/dist-lib/native-app-identity-project.cjs +15 -2
- package/dist-lib/native-app-identity-project.mjs +15 -2
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +63 -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 +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +271 -51
- 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 +253 -46
- package/dist-lib/vite.cjs +16 -3
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h +2 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +21 -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/src/native-static-libraries.ts +7 -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-emit.ts +9 -3
- package/src/swift-standins.ts +75 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2210 | (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;
|
|
@@ -16842,7 +16842,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
16842
16842
|
const coder = members2.some((member) => leaf(member) === "init(coder:)");
|
|
16843
16843
|
if (designated2 && !coder && externalRoot(id) !== "NSObject" && externalRoot(id) !== null)
|
|
16844
16844
|
emit(
|
|
16845
|
-
`${inner}public required init?(coder: NSCoder) { ${options.inert ? "return nil" : trap(`${path99}.init(coder:)`)} }`
|
|
16845
|
+
`${inner}public required init${options.coderNonfailable?.has(path99) ? "" : "?"}(coder: NSCoder) { ${options.inert && !options.coderNonfailable?.has(path99) ? "return nil" : trap(`${path99}.init(coder:)`)} }`
|
|
16846
16846
|
);
|
|
16847
16847
|
if (designated2 && !members2.some((member) => leaf(member) === "init()") && [...superChain(id)].some(
|
|
16848
16848
|
(at) => options.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
|
|
@@ -17023,15 +17023,18 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17023
17023
|
const { 2: rest } = LEADING_ATTRS.exec(text(member));
|
|
17024
17024
|
const decl = rest.replace(/^(?:weak |unowned )/, "").replace(/^((?:static )?)let /, "$1var ");
|
|
17025
17025
|
const witness = `${owner2}.${leaf(member)}`;
|
|
17026
|
+
if (options.forcedOverride?.has(witness)) return;
|
|
17026
17027
|
const body = options.inert ? inertBody(member) : trap(witness);
|
|
17027
17028
|
if (member.kind.identifier === "swift.property" || member.kind.identifier === "swift.type.property") {
|
|
17028
17029
|
const parsed = splitAccessors(decl);
|
|
17029
17030
|
const setter = parsed.settable ? ` ${parsed.nonmutating ? "nonmutating " : ""}set { ${body} }` : "";
|
|
17030
|
-
|
|
17031
|
+
emitAt(
|
|
17032
|
+
witness,
|
|
17031
17033
|
`${indent2}${visibility} ${parsed.decl} { get${parsed.effects} { ${body} }${setter} }`
|
|
17032
17034
|
);
|
|
17033
17035
|
} else
|
|
17034
|
-
|
|
17036
|
+
emitAt(
|
|
17037
|
+
witness,
|
|
17035
17038
|
`${indent2}${member.kind.identifier === "swift.init" ? "public required " : visibility + " "}${stripDefaults(decl)} { ${body} }`
|
|
17036
17039
|
);
|
|
17037
17040
|
};
|
|
@@ -18593,7 +18596,7 @@ var init_swift_objc_standin = __esm({
|
|
|
18593
18596
|
};
|
|
18594
18597
|
NATIVE_GRAPH_ID = (0, import_node_crypto11.createHash)("sha256").update(JSON.stringify(NATIVE_GRAPH_INPUTS)).digest("hex");
|
|
18595
18598
|
ROUNDS = 12;
|
|
18596
|
-
headerFiles = (dir) => import_node_fs24.default.readdirSync(dir, { recursive: true, encoding: "utf8" }).filter((file) => file.endsWith(".h")).sort();
|
|
18599
|
+
headerFiles = (dir) => import_node_fs24.default.readdirSync(dir, { recursive: true, encoding: "utf8" }).filter((file) => file.endsWith(".h") || file.endsWith(".hh")).sort();
|
|
18597
18600
|
MISSING_IMPORT = "#import <PeachMissing/PeachMissing.h>\n";
|
|
18598
18601
|
FRAMEWORK_HEADER = /^System\/Library\/Frameworks\/([^/]+)\.framework\/Headers\/(.+)$/;
|
|
18599
18602
|
FRAMEWORK_MODULEMAP = /^System\/Library\/Frameworks\/([^/]+)\.framework\/Modules\/module\.modulemap$/;
|
|
@@ -25732,16 +25735,30 @@ function swiftClangImporterFlags(flags) {
|
|
|
25732
25735
|
(flag) => flag !== "-fobjc-arc" && flag !== "-fno-objc-arc" && !/^-std=(?:c(?!\+\+)|gnu(?!\+\+)|iso9899:)/.test(flag)
|
|
25733
25736
|
);
|
|
25734
25737
|
}
|
|
25735
|
-
function
|
|
25738
|
+
function swiftSubmoduleImports(sources) {
|
|
25739
|
+
const imports2 = /* @__PURE__ */ new Map();
|
|
25740
|
+
for (const source of sources)
|
|
25741
|
+
for (const [, module2, submodule] of source.matchAll(SWIFT_SUBMODULE_IMPORT)) {
|
|
25742
|
+
const names = imports2.get(module2) ?? /* @__PURE__ */ new Set();
|
|
25743
|
+
names.add(submodule);
|
|
25744
|
+
imports2.set(module2, names);
|
|
25745
|
+
}
|
|
25746
|
+
return imports2;
|
|
25747
|
+
}
|
|
25748
|
+
function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new Set()) {
|
|
25749
|
+
const header = (file) => `header ${JSON.stringify(file)}`;
|
|
25750
|
+
const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "");
|
|
25736
25751
|
return [
|
|
25737
25752
|
`module ${module2} {`,
|
|
25738
|
-
...headers.map(
|
|
25753
|
+
...headers.map(
|
|
25754
|
+
(file) => submodules.has(stem(file)) ? ` module ${stem(file)} { ${header(file)} export * }` : ` ${header(file)}`
|
|
25755
|
+
),
|
|
25739
25756
|
" export *",
|
|
25740
25757
|
"}",
|
|
25741
25758
|
""
|
|
25742
25759
|
].join("\n");
|
|
25743
25760
|
}
|
|
25744
|
-
var SWIFT_OBJC_INTEROP_FLAGS;
|
|
25761
|
+
var SWIFT_OBJC_INTEROP_FLAGS, SWIFT_SUBMODULE_IMPORT;
|
|
25745
25762
|
var init_swift_objc_import = __esm({
|
|
25746
25763
|
"src/swift-objc-import.ts"() {
|
|
25747
25764
|
"use strict";
|
|
@@ -25756,6 +25773,7 @@ var init_swift_objc_import = __esm({
|
|
|
25756
25773
|
"-Xcc",
|
|
25757
25774
|
"-fblocks"
|
|
25758
25775
|
];
|
|
25776
|
+
SWIFT_SUBMODULE_IMPORT = /^[ \t]*(?:@\w+(?:\([^)]*\))?[ \t]+)*import[ \t]+([A-Za-z_]\w*)\.([A-Za-z_]\w*)[ \t]*(?:\/\/.*)?$/gm;
|
|
25759
25777
|
}
|
|
25760
25778
|
});
|
|
25761
25779
|
|
|
@@ -28110,6 +28128,12 @@ function stripCCode(source) {
|
|
|
28110
28128
|
}
|
|
28111
28129
|
return code;
|
|
28112
28130
|
}
|
|
28131
|
+
function swiftCTakesReturnAddress(source) {
|
|
28132
|
+
if (!source.includes("__builtin_return_address")) return false;
|
|
28133
|
+
return /\b__builtin_return_address\s*\(/.test(
|
|
28134
|
+
cActiveCode(stripCCode(source), wasmMacroEnvironment)
|
|
28135
|
+
);
|
|
28136
|
+
}
|
|
28113
28137
|
function swiftCMainEntry(file, source, env = emptyMacroEnvironment) {
|
|
28114
28138
|
if (!isSwiftNativeTranslationUnit(file)) return false;
|
|
28115
28139
|
const code = cActiveCode(stripCCode(source), env);
|
|
@@ -28384,6 +28408,11 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
28384
28408
|
clangImportedModules.add(name3);
|
|
28385
28409
|
}
|
|
28386
28410
|
}
|
|
28411
|
+
const submoduleImports = swiftSubmoduleImports(
|
|
28412
|
+
Object.entries(input.files).flatMap(
|
|
28413
|
+
([file, contents]) => file.endsWith(".swift") ? [contents] : []
|
|
28414
|
+
)
|
|
28415
|
+
);
|
|
28387
28416
|
const headerDirectory = import_node_path41.default.join(layout2.root, ".build", "peach-cxx-headers");
|
|
28388
28417
|
const flattenedHeaders = /* @__PURE__ */ new Set();
|
|
28389
28418
|
if ((0, import_node_fs42.existsSync)(headerDirectory)) {
|
|
@@ -28769,7 +28798,8 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
28769
28798
|
);
|
|
28770
28799
|
const moduleContents = originalModuleMap ? input.files[originalModuleMap[1]] : swiftpmModuleMap?.contents ?? packageModuleMap?.[1] ?? swiftObjCModuleMap(
|
|
28771
28800
|
swiftTargetModuleName(target.name),
|
|
28772
|
-
roots2.map((file) => import_node_path41.default.join(layout2.root, file))
|
|
28801
|
+
roots2.map((file) => import_node_path41.default.join(layout2.root, file)),
|
|
28802
|
+
submoduleImports.get(swiftTargetModuleName(target.name))
|
|
28773
28803
|
);
|
|
28774
28804
|
if (moduleContents === void 0)
|
|
28775
28805
|
throw new Error("missing original module map " + modulemap);
|
|
@@ -29094,10 +29124,14 @@ module ${moduleName2}.Swift {
|
|
|
29094
29124
|
header ${JSON.stringify(import_node_path41.default.join(headerDirectory, name3 + "-Swift.h"))}
|
|
29095
29125
|
requires objc
|
|
29096
29126
|
}
|
|
29097
|
-
` : swiftObjCModuleMap(
|
|
29098
|
-
|
|
29099
|
-
|
|
29100
|
-
|
|
29127
|
+
` : swiftObjCModuleMap(
|
|
29128
|
+
moduleName2,
|
|
29129
|
+
[
|
|
29130
|
+
...(input.nativeTargets?.find((target) => target.name === name3)?.publicHeaders ?? []).map((header) => import_node_path41.default.join(layout2.root, header)),
|
|
29131
|
+
import_node_path41.default.join(headerDirectory, name3 + "-Swift.h")
|
|
29132
|
+
],
|
|
29133
|
+
submoduleImports.get(moduleName2)
|
|
29134
|
+
)
|
|
29101
29135
|
);
|
|
29102
29136
|
nativeHeaderFlags.push("-fmodule-map-file=" + modulemap);
|
|
29103
29137
|
}
|
|
@@ -30080,8 +30114,12 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
30080
30114
|
const linked = frameworkLinkClosure(scratch2, linkedTargets.targets);
|
|
30081
30115
|
const objects = linked.objects;
|
|
30082
30116
|
if (linked.modules.has("UniformTypeIdentifiers")) {
|
|
30083
|
-
const
|
|
30084
|
-
|
|
30117
|
+
const constantsDir = import_node_path41.default.join(scratch2, "uniform-type-constants");
|
|
30118
|
+
const constantsStamp = import_node_path41.default.join(constantsDir, ".complete");
|
|
30119
|
+
const object6 = import_node_path41.default.join(constantsDir, "UniformTypeIdentifiers-NativeConstants.o");
|
|
30120
|
+
if (!(0, import_node_fs42.existsSync)(constantsStamp) || (0, import_node_fs42.readFileSync)(constantsStamp, "utf8") !== args.frameworkKey) {
|
|
30121
|
+
(0, import_node_fs42.rmSync)(constantsDir, { recursive: true, force: true });
|
|
30122
|
+
(0, import_node_fs42.mkdirSync)(constantsDir);
|
|
30085
30123
|
const sdkPaths2 = swiftSdkPaths(args.moduleRoot, args.toolchainBin);
|
|
30086
30124
|
compileUniformTypeConstants({
|
|
30087
30125
|
bin: args.toolchainBin,
|
|
@@ -30089,8 +30127,9 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
30089
30127
|
darwin: sdkPaths2.darwin,
|
|
30090
30128
|
packageRoot: args.moduleRoot,
|
|
30091
30129
|
minimum: darwinRecordsMinimum(),
|
|
30092
|
-
out:
|
|
30130
|
+
out: constantsDir
|
|
30093
30131
|
});
|
|
30132
|
+
(0, import_node_fs42.writeFileSync)(constantsStamp, args.frameworkKey);
|
|
30094
30133
|
}
|
|
30095
30134
|
objects.push(object6);
|
|
30096
30135
|
linked.owners.set(object6, "UniformTypeIdentifiers");
|
|
@@ -30775,7 +30814,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
30775
30814
|
options.signal
|
|
30776
30815
|
);
|
|
30777
30816
|
}
|
|
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;
|
|
30817
|
+
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
30818
|
var init_swift_compile = __esm({
|
|
30780
30819
|
"src/swift-compile.ts"() {
|
|
30781
30820
|
"use strict";
|
|
@@ -30988,7 +31027,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
30988
31027
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
30989
31028
|
MULTI_MANIFEST_VERSION = 68;
|
|
30990
31029
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
30991
|
-
compilerSourceDigest = true ? "
|
|
31030
|
+
compilerSourceDigest = true ? "4fa3e84f8c3b585bc8e864c92f0682e6f02757d455de1ce784f0d40ba9df875a" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
30992
31031
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
30993
31032
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
30994
31033
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -31513,6 +31552,14 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
31513
31552
|
predefines: /* @__PURE__ */ new Map(),
|
|
31514
31553
|
targetDefined: /* @__PURE__ */ new Set()
|
|
31515
31554
|
};
|
|
31555
|
+
wasmMacroEnvironment = {
|
|
31556
|
+
...emptyMacroEnvironment,
|
|
31557
|
+
defines: /* @__PURE__ */ new Map([
|
|
31558
|
+
["__wasm__", "1"],
|
|
31559
|
+
["__wasm32__", "1"],
|
|
31560
|
+
["__wasi__", "1"]
|
|
31561
|
+
])
|
|
31562
|
+
};
|
|
31516
31563
|
HIDDEN_UNITS = "PeachHiddenUnits";
|
|
31517
31564
|
LIBXML_REFERENCE = /(?:^|\n)[ \t]*#[ \t]*(?:include|import)[ \t]*["<][ \t]*libxml\/|@import[ \t]+libxml2[ \t]*;|(?:^|\n)[ \t]*import[ \t]+libxml2(?![\w.])/;
|
|
31518
31565
|
LIBXML_SOURCE = /\.(?:c|m|mm|cc|cpp|cxx|h|hh|hpp|hxx|swift)$/;
|
|
@@ -39762,6 +39809,13 @@ var init_native_static_libraries = __esm({
|
|
|
39762
39809
|
upstream: "b94213a11b3a2edadfae89f0c57a7f4ab72772c9",
|
|
39763
39810
|
recipe: "a2642115a5eeb04559c9f1daaa4b4cbe4b1c211533b4cc80cb8339a4477af205",
|
|
39764
39811
|
archive: "libsksg.a"
|
|
39812
|
+
},
|
|
39813
|
+
{
|
|
39814
|
+
name: "webgpu_dawn",
|
|
39815
|
+
nativeSha256: "95078993275bccc969b1dfa1ad0934cbacc05ae59e8aa2a6cc46ce93e97d4f69",
|
|
39816
|
+
upstream: "3d786993a7ded64c4ebb4884b9b079db9ad0e580",
|
|
39817
|
+
recipe: "c55468cc976e837ad894133f2231beb7d1ed64633af7b457b8a2610d7df45994",
|
|
39818
|
+
archive: "libwebgpu_dawn.a"
|
|
39765
39819
|
}
|
|
39766
39820
|
];
|
|
39767
39821
|
}
|
|
@@ -42328,6 +42382,72 @@ var init_numbered_lock = __esm({
|
|
|
42328
42382
|
}
|
|
42329
42383
|
});
|
|
42330
42384
|
|
|
42385
|
+
// src/swift-shipped-archives.json
|
|
42386
|
+
var swift_shipped_archives_default;
|
|
42387
|
+
var init_swift_shipped_archives = __esm({
|
|
42388
|
+
"src/swift-shipped-archives.json"() {
|
|
42389
|
+
swift_shipped_archives_default = {
|
|
42390
|
+
AppCheckCore: "a18d4e5aff27ff4b9bce8d6e73e55ccf1d11515311e219aa4473319cdff3187b",
|
|
42391
|
+
AppLovinSDK: "c00f052c4b15766a6a2734e2b3685234e6bd28dbc47fbe7cbc3edbf56f701d5c",
|
|
42392
|
+
AppsFlyerLib: "13bae495e63e22579dd9525a1c9e88d8eedc78b4586979b7e2d492cfd3efbe1f",
|
|
42393
|
+
FBAEMKit: "ceaf685683c6a23ae4893150d0d770aeeaec34811ac8c146b3aa351beade5fa0",
|
|
42394
|
+
FBAudienceNetwork: "4d84bf1e404a83852a93af2ae73e22e45bb2b11e0a9a445c3b461173a5d6aec3",
|
|
42395
|
+
FBLPromises: "3544fb457e7f60c69740cdd26617a75bdd613943e948becca643022c7edd76c0",
|
|
42396
|
+
FBSDKCoreKit: "1577edd62ec0c172928befed3b309dc59ae8915d2aaad091460d9d1be5ddc13d",
|
|
42397
|
+
FBSDKCoreKit_Basics: "c780833f204f9ec6eab70a3758a45c5c78bfb6f4e590289ccf395497f204cac1",
|
|
42398
|
+
FirebaseAnalytics: "e3253a494375c5174d20cb81925e20afa1ff6b1419125cb608d39b092b53ff2a",
|
|
42399
|
+
FirebaseAppCheck: "af82d72727d55d14f65eee96845d4d9495e4e603b4673709d6f3448b9595cc63",
|
|
42400
|
+
FirebaseAppCheckInterop: "7ffd54e6fe187bf8cd714e3d863e0095f7cbbb0fb802adb87a40c552de7cffcc",
|
|
42401
|
+
FirebaseAuth: "fcde09db8d45ffba67802e81c17b8046db6b56568226ace3fca898983b08c968",
|
|
42402
|
+
FirebaseAuthInterop: "e8e6f4fb42b3fa76c2bade7a522ab0f224558d27d2321175c791d307541787a8",
|
|
42403
|
+
FirebaseCore: "30e3505c715e17682c1dc20bb26ba475e99e6981a9a0dba3cf9352eea632fc1d",
|
|
42404
|
+
FirebaseCoreExtension: "e37ce2abcd4c218ab5426da78cbe7ab41f79ee7eba1d02dd4b0cde952ed2c4a0",
|
|
42405
|
+
FirebaseCoreInternal: "72a15c0c63585faf93e9ffa91e8a8c1c50b24749405804ffae19a29ec05b07ab",
|
|
42406
|
+
FirebaseCrashlytics: "e03c71913efd97678b895abb1e968c83e58b3fbd7955a81ec6e6581b95db16e3",
|
|
42407
|
+
FirebaseFirestore: "f7a1bb7fc4a2fb09298b514114d6aaca9a4f00fd8868667524a05bc4563bf1fd",
|
|
42408
|
+
FirebaseFirestoreInternal: "d9595a1784beaf5cd4a8e0dda0f4364ddfa6b536ad60f82746d81d14dce037a3",
|
|
42409
|
+
FirebaseInstallations: "141e313325bab001f2dbb79dc8a433f884f4c4a12a5feb665e6958098d637f7b",
|
|
42410
|
+
FirebaseRemoteConfig: "e0ae6d626a423d535bc67216f9f0cd66f98f1c0fb4b5bf88074d4496733e2db1",
|
|
42411
|
+
FirebaseRemoteConfigInterop: "794f599eb4232058715b606fa671639c8cc5d821655a0f739651d17c5ef65c37",
|
|
42412
|
+
FirebaseSessions: "1781d72e47dac0fc7a532412641021730bd5b659135633cd9ef7b97ccd31b0ce",
|
|
42413
|
+
FirebaseSharedSwift: "8d63b09a517733ef3a58390bf1e8cf054f058bdd618bb4f19a1f4b5a0b4f09e5",
|
|
42414
|
+
FirebaseStorage: "636b33180dd5ad60b4878357691fe6472cf3bd57ec691e9d661c5444f523df66",
|
|
42415
|
+
GTMSessionFetcher: "f58dc2bd9db39defd73f0f67e7a11893a0c6e6f0ba45cd83cf420b2b3c15f1bd",
|
|
42416
|
+
GoogleAdsOnDeviceConversion: "31a5a1f5204f4844a480d3889b6ebe2e69473ef32b868935c51812c0483cb08b",
|
|
42417
|
+
GoogleAppMeasurement: "5741e6334392e0345f1b5896111ffef4d5a78859970f5e197fa0b7d881165305",
|
|
42418
|
+
GoogleAppMeasurementIdentitySupport: "b70cb033eeb002ed1c5a8140953ccb3be0221ca754c05fe450ed9c9c6547f274",
|
|
42419
|
+
GoogleDataTransport: "7d08050419e0906f13039cc4d2dd69be075234c0bf5bbb34df9dd4891e48831d",
|
|
42420
|
+
GoogleMobileAds: "f2c09c60ee331ce029f563304ad73a481d57ace0d4bc11ce33a2bf59497c59bf",
|
|
42421
|
+
GoogleUtilities: "37a9d3d3810dad763a8a79bd4c7cc4c37b386240725aca07f45dba1826676c8c",
|
|
42422
|
+
Intercom: "fc8251f24b305b91f83304d4dffaf1a90c424a7bc37be8b595dd1fc5cff566ea",
|
|
42423
|
+
Promises: "6d8f1a4b3d561d67adfc2026834779b05685d1cdacea6e83c70d0641c39f24de",
|
|
42424
|
+
RecaptchaInterop: "cf5cc62ebc237b34d5267c1190d18f33b424dbc7f81713f127108d0ad8a592cf",
|
|
42425
|
+
RiveRuntime: "72b6ff5c5a1d153c9cdbea9a917c09be557cfcb1fafa02853fa06b0268551710",
|
|
42426
|
+
absl: "fff0388cf074c69a2da4bc197a005da0b8e5c23ebdcfa383600c540a342f9df1",
|
|
42427
|
+
grpc: "918737c9f8f93e14127b3894e31c7a0522475f2247b74f87d8166dff3a6bafb0",
|
|
42428
|
+
grpcpp: "b83f85e0256cf06df00cf0ed728b5c0d68373ca401742877935771447450b90a",
|
|
42429
|
+
leveldb: "5521a6e6e4cd01b2e31b099d4341f1bccae7e8ba43de648b028928573daf8bb4",
|
|
42430
|
+
nanopb: "a7fafe2e4e16d99de4c58f72e22dcc53221885aa6d678d1270123e4b01badfa3",
|
|
42431
|
+
openssl_grpc: "b2aaede82457cdd15915762a4f57b38e28ba0f47b9b48556a7e0c46881973096"
|
|
42432
|
+
};
|
|
42433
|
+
}
|
|
42434
|
+
});
|
|
42435
|
+
|
|
42436
|
+
// src/swift-shipped-binaries.ts
|
|
42437
|
+
function shippedBinaryDiffers(target, checksum) {
|
|
42438
|
+
const shipped = SHIPPED_ARCHIVES.get(target);
|
|
42439
|
+
return shipped !== void 0 && checksum !== null && checksum !== shipped;
|
|
42440
|
+
}
|
|
42441
|
+
var SHIPPED_ARCHIVES;
|
|
42442
|
+
var init_swift_shipped_binaries = __esm({
|
|
42443
|
+
"src/swift-shipped-binaries.ts"() {
|
|
42444
|
+
"use strict";
|
|
42445
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
42446
|
+
init_swift_shipped_archives();
|
|
42447
|
+
SHIPPED_ARCHIVES = new Map(Object.entries(swift_shipped_archives_default));
|
|
42448
|
+
}
|
|
42449
|
+
});
|
|
42450
|
+
|
|
42331
42451
|
// src/swift-packages.ts
|
|
42332
42452
|
function remoteSwiftCheckouts(root) {
|
|
42333
42453
|
const prepared = preparedSwiftCheckouts(root);
|
|
@@ -42336,16 +42456,22 @@ function remoteSwiftCheckouts(root) {
|
|
|
42336
42456
|
import_node_fs69.default.mkdirSync(cacheDir(), { recursive: true });
|
|
42337
42457
|
return import_node_path69.default.join(import_node_fs69.default.realpathSync(cacheDir()), "swift-packages", key2, "checkouts");
|
|
42338
42458
|
}
|
|
42339
|
-
function
|
|
42459
|
+
function unlowerableSources(files2, target) {
|
|
42460
|
+
if (target.declaresWasiNativeSettings) return [];
|
|
42461
|
+
return [
|
|
42462
|
+
...files2.filter((file) => UNSUPPORTED_NATIVE.test(file)),
|
|
42463
|
+
...files2.filter(isSwiftNativeTranslationUnit).filter((file) => swiftCTakesReturnAddress(import_node_fs69.default.readFileSync(file, "utf8")))
|
|
42464
|
+
];
|
|
42465
|
+
}
|
|
42466
|
+
function unloweredSources(files2, target) {
|
|
42340
42467
|
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
42468
|
if (!files2.some(isSwiftNativeTranslationUnit)) return null;
|
|
42469
|
+
const unlowered = unlowerableSources(files2, target);
|
|
42470
|
+
if (unlowered.length === 0) return null;
|
|
42345
42471
|
const headers = import_node_path69.default.resolve(target.dir, target.publicHeadersPath);
|
|
42346
42472
|
if (!files2.some((file) => file.startsWith(`${headers}${import_node_path69.default.sep}`) && file.endsWith(".h")))
|
|
42347
42473
|
return null;
|
|
42348
|
-
return
|
|
42474
|
+
return unlowered;
|
|
42349
42475
|
}
|
|
42350
42476
|
function resolvedPins(data) {
|
|
42351
42477
|
if (!data || typeof data !== "object") return null;
|
|
@@ -42641,9 +42767,9 @@ function resolveSwiftPackages(options) {
|
|
|
42641
42767
|
if (target.type === "macro") return preservePackage(pkg, [name3], "host");
|
|
42642
42768
|
const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
|
|
42643
42769
|
const gap = options.binaryGaps?.get(name3);
|
|
42644
|
-
const
|
|
42770
|
+
const unlowerable = unlowerableSources(files2, target);
|
|
42645
42771
|
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` :
|
|
42772
|
+
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
42773
|
const reasons = target.dependencies.map((dependency) => {
|
|
42648
42774
|
if (dependency.kind === "target") return resolveTarget(pkg, dependency.name);
|
|
42649
42775
|
const nested = resolveDependencyProduct(pkg, dependency);
|
|
@@ -42722,7 +42848,7 @@ function resolveSwiftPackages(options) {
|
|
|
42722
42848
|
(file) => file.endsWith(".swift") && import_node_fs69.default.readFileSync(file, "utf8").trim() === ""
|
|
42723
42849
|
))
|
|
42724
42850
|
return false;
|
|
42725
|
-
if (
|
|
42851
|
+
if (unloweredSources(files2, target)) return false;
|
|
42726
42852
|
claimed.add(key2);
|
|
42727
42853
|
providedTargets.delete(name3);
|
|
42728
42854
|
for (const dependency of target.dependencies) {
|
|
@@ -42736,6 +42862,13 @@ function resolveSwiftPackages(options) {
|
|
|
42736
42862
|
};
|
|
42737
42863
|
const claimProduct = (pkg, product) => {
|
|
42738
42864
|
const roots = pkg.manifest.products.get(product)?.targets ?? [];
|
|
42865
|
+
for (const root of roots) {
|
|
42866
|
+
const target = pkg.manifest.targets.get(root);
|
|
42867
|
+
if (target?.type === "binary" && !options.standinTargets?.has(root) && shippedBinaryDiffers(root, target.checksum)) {
|
|
42868
|
+
providedTargets.delete(root);
|
|
42869
|
+
providedProducts.delete(product);
|
|
42870
|
+
}
|
|
42871
|
+
}
|
|
42739
42872
|
if (roots.map((name3) => claimTarget(pkg, name3)).some(Boolean))
|
|
42740
42873
|
providedProducts.delete(product);
|
|
42741
42874
|
};
|
|
@@ -42763,7 +42896,7 @@ function resolveSwiftPackages(options) {
|
|
|
42763
42896
|
if (target.type === "executable") continue;
|
|
42764
42897
|
const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
|
|
42765
42898
|
const objc = target.type === "regular" && files2.some((file) => /\.(m|mm)$/.test(file));
|
|
42766
|
-
const
|
|
42899
|
+
const unlowered = unloweredSources(files2, target);
|
|
42767
42900
|
const gap = placeholderPackage(pkg);
|
|
42768
42901
|
const sources = files2.filter((file) => file.endsWith(".swift"));
|
|
42769
42902
|
const release = (setting) => setting.configuration !== "debug";
|
|
@@ -42790,7 +42923,7 @@ function resolveSwiftPackages(options) {
|
|
|
42790
42923
|
]
|
|
42791
42924
|
}
|
|
42792
42925
|
});
|
|
42793
|
-
else if (target.type === "binary" || objc ||
|
|
42926
|
+
else if (target.type === "binary" || objc || unlowered)
|
|
42794
42927
|
result.binaries.push({
|
|
42795
42928
|
target: name3,
|
|
42796
42929
|
source: pkg.source,
|
|
@@ -42804,8 +42937,8 @@ function resolveSwiftPackages(options) {
|
|
|
42804
42937
|
import_node_path69.default.join(target.dir, target.publicHeadersPath)
|
|
42805
42938
|
)
|
|
42806
42939
|
},
|
|
42807
|
-
...
|
|
42808
|
-
|
|
42940
|
+
...unlowered ? {
|
|
42941
|
+
unloweredSources: unlowered.map(
|
|
42809
42942
|
(file) => import_node_path69.default.relative(pkg.manifest.dir, file)
|
|
42810
42943
|
)
|
|
42811
42944
|
} : {}
|
|
@@ -43026,8 +43159,10 @@ var init_swift_packages = __esm({
|
|
|
43026
43159
|
init_native_git();
|
|
43027
43160
|
init_numbered_lock();
|
|
43028
43161
|
init_prepared_xcode_phases();
|
|
43162
|
+
init_swift_compile();
|
|
43029
43163
|
init_swift_package();
|
|
43030
43164
|
init_swift_package_manifest();
|
|
43165
|
+
init_swift_shipped_binaries();
|
|
43031
43166
|
swiftBinaryOnDisk = (binary2) => binary2.url !== null || import_node_fs69.default.existsSync(binary2.dir);
|
|
43032
43167
|
SWIFT_PLACEHOLDER_PACKAGES = /* @__PURE__ */ new Map();
|
|
43033
43168
|
placeholderPackage = (pkg) => SWIFT_PLACEHOLDER_PACKAGES.get(swiftPackageIdentity(pkg.manifest.dir));
|
|
@@ -43094,7 +43229,7 @@ var init_swift_standin_digest = __esm({
|
|
|
43094
43229
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
43095
43230
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
43096
43231
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
43097
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
43232
|
+
STANDIN_SOURCE_DIGEST = true ? "9adf53d6f1cfece1b7a3e23bad712630278818d71b5b718384cf640144349600" : standinSourceDigest();
|
|
43098
43233
|
}
|
|
43099
43234
|
});
|
|
43100
43235
|
|
|
@@ -44635,7 +44770,7 @@ function interfaceEnumValues(graphs, interfaceText) {
|
|
|
44635
44770
|
const declarations = [
|
|
44636
44771
|
...interfaceText.matchAll(
|
|
44637
44772
|
new RegExp(
|
|
44638
|
-
`^([ \\t]*)(?:@[\\w.]+(?:\\([^)]*\\))?\\s+)*(?:nonisolated\\s+)?(?:public|open)\\s+enum\\s+${name3}\\s*:\\s*(?:Swift\\.)?U?Int(?:8|16|32|64)
|
|
44773
|
+
`^([ \\t]*)(?:@[\\w.]+(?:\\([^)]*\\))?\\s+)*(?:nonisolated\\s+)?(?:public|open)\\s+enum\\s+${name3}\\s*:\\s*(?:Swift\\.)?(?:U?Int(?:8|16|32|64)?|IntegerLiteralType)\\b[^{]*\\{[ \\t]*$`,
|
|
44639
44774
|
"gm"
|
|
44640
44775
|
)
|
|
44641
44776
|
)
|
|
@@ -44734,9 +44869,26 @@ function mixedStandin(surface, binary2, toolchain, work, behavior, frameworkDirs
|
|
|
44734
44869
|
view.protocolProperties ?? /* @__PURE__ */ new Map(),
|
|
44735
44870
|
null,
|
|
44736
44871
|
view.inheritedConformances,
|
|
44737
|
-
interfaceProjections(view.graphs, interfaceText)
|
|
44872
|
+
interfaceProjections(view.graphs, interfaceText),
|
|
44873
|
+
[],
|
|
44874
|
+
externalConformances(surface.module, interfaceText)
|
|
44738
44875
|
);
|
|
44739
44876
|
}
|
|
44877
|
+
function externalConformances(module2, interfaceText) {
|
|
44878
|
+
const lines = /* @__PURE__ */ new Set();
|
|
44879
|
+
for (const match of interfaceText.matchAll(
|
|
44880
|
+
/^(?:@\w+\s+)*extension\s+([\w.]+)\s*:\s*([^{\n]+?)\s*\{/gm
|
|
44881
|
+
)) {
|
|
44882
|
+
const [, extended, conformances] = match;
|
|
44883
|
+
if (extended.startsWith(`${module2}.`) || /\bwhere\b/.test(conformances)) continue;
|
|
44884
|
+
const own = conformances.split(",").map((name3) => name3.trim()).filter((name3) => name3.startsWith(`${module2}.`));
|
|
44885
|
+
const type = extended.startsWith("Swift.") ? extended : extended.split(".").slice(1).join(".");
|
|
44886
|
+
if (own.length > 0 && type) lines.add(`extension ${type} : ${own.join(", ")} {}
|
|
44887
|
+
`);
|
|
44888
|
+
}
|
|
44889
|
+
return lines.size > 0 ? `
|
|
44890
|
+
${[...lines].join("")}` : "";
|
|
44891
|
+
}
|
|
44740
44892
|
function wasmFlags(toolchain, imports2) {
|
|
44741
44893
|
const { sysroot, darwin, resources, cFlags } = swiftSdkPaths(
|
|
44742
44894
|
toolchain.moduleRoot,
|
|
@@ -44829,7 +44981,7 @@ function objcStandin(surface, binary2, toolchain, work, behavior, frameworks, si
|
|
|
44829
44981
|
dependencyGraphs
|
|
44830
44982
|
);
|
|
44831
44983
|
}
|
|
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 = []) {
|
|
44984
|
+
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
44985
|
const paths = new Set(
|
|
44834
44986
|
graphs.flatMap(
|
|
44835
44987
|
(graph) => graph.symbols.map((symbol2) => symbol2.pathComponents.join("."))
|
|
@@ -44870,6 +45022,8 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
44870
45022
|
const plain = /* @__PURE__ */ new Set();
|
|
44871
45023
|
const unobjc = /* @__PURE__ */ new Set();
|
|
44872
45024
|
const trapped = /* @__PURE__ */ new Set();
|
|
45025
|
+
const forced = /* @__PURE__ */ new Set();
|
|
45026
|
+
const nonfailable = /* @__PURE__ */ new Set();
|
|
44873
45027
|
const unconformed = /* @__PURE__ */ new Map();
|
|
44874
45028
|
const objcProtocols = new Set(
|
|
44875
45029
|
graphs.flatMap(
|
|
@@ -44879,7 +45033,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
44879
45033
|
)
|
|
44880
45034
|
);
|
|
44881
45035
|
const file = import_node_path74.default.join(work, `${module2}.swift`);
|
|
44882
|
-
const inert = binary2.placeholder !== void 0 || binary2.publicHeaders !== void 0 && binary2.
|
|
45036
|
+
const inert = binary2.placeholder !== void 0 || binary2.publicHeaders !== void 0 && binary2.unloweredSources === void 0;
|
|
44883
45037
|
for (; ; ) {
|
|
44884
45038
|
const { source, owners, skipped } = emitSwiftStandin(graphs, {
|
|
44885
45039
|
module: module2,
|
|
@@ -44892,6 +45046,8 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
44892
45046
|
unobjc,
|
|
44893
45047
|
unconformed,
|
|
44894
45048
|
trapped,
|
|
45049
|
+
forcedOverride: forced,
|
|
45050
|
+
coderNonfailable: nonfailable,
|
|
44895
45051
|
inert,
|
|
44896
45052
|
imports: [...placeholder?.peachImports ?? [], ...imports2],
|
|
44897
45053
|
family: [...imports2, ...placeholder?.peachImports ?? []],
|
|
@@ -44911,7 +45067,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
44911
45067
|
`Configured Swift behavior ${module2}.${entry.path} was not emitted: ${entry.reason}`
|
|
44912
45068
|
);
|
|
44913
45069
|
}
|
|
44914
|
-
import_node_fs75.default.writeFileSync(file, source);
|
|
45070
|
+
import_node_fs75.default.writeFileSync(file, source + trailer);
|
|
44915
45071
|
const check2 = (0, import_node_child_process38.spawnSync)(
|
|
44916
45072
|
import_node_path74.default.join(toolchain.toolchainBin, "swiftc"),
|
|
44917
45073
|
// emitting the module runs the diagnostics a typecheck skips, such as
|
|
@@ -44935,10 +45091,10 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
44935
45091
|
return {
|
|
44936
45092
|
module: module2,
|
|
44937
45093
|
target: binary2.target,
|
|
44938
|
-
files: { [`${module2}.swift`]: source },
|
|
45094
|
+
files: { [`${module2}.swift`]: source + trailer },
|
|
44939
45095
|
...imports2.length ? { dependencies: imports2 } : {}
|
|
44940
45096
|
};
|
|
44941
|
-
const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size;
|
|
45097
|
+
const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size + forced.size + nonfailable.size;
|
|
44942
45098
|
const elsewhere = [];
|
|
44943
45099
|
for (const match of check2.stderr.matchAll(/^(\S+?):(\d+):\d+: error: (.*)$/gm)) {
|
|
44944
45100
|
const owner = match[1] === file ? owners[Number(match[2]) - 1] : void 0;
|
|
@@ -44961,14 +45117,22 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
44961
45117
|
throw new Error(
|
|
44962
45118
|
`Configured Swift behavior ${module2}.${owner} does not typecheck: ${match[3]}`
|
|
44963
45119
|
);
|
|
44964
|
-
if (owner && /does not override any|overrides nothing/.test(
|
|
45120
|
+
if (owner && /does not override any|overrides nothing|does not override a designated initializer/.test(
|
|
45121
|
+
match[3]
|
|
45122
|
+
))
|
|
44965
45123
|
plain.add(owner);
|
|
45124
|
+
else if (owner && /failable initializer 'init\(coder:\)' cannot override a non-failable/.test(
|
|
45125
|
+
match[3]
|
|
45126
|
+
) && !nonfailable.has(owner))
|
|
45127
|
+
nonfailable.add(owner);
|
|
45128
|
+
else if (owner && /requires an 'override' keyword/.test(match[3]) && !forced.has(owner))
|
|
45129
|
+
forced.add(owner);
|
|
44966
45130
|
else if (owner && inert && INERT_VALUE.test(match[3]) && !trapped.has(owner))
|
|
44967
45131
|
trapped.add(owner);
|
|
44968
45132
|
else if (owner) omit.set(owner, `rejected by swiftc: ${match[3]}`);
|
|
44969
45133
|
else elsewhere.push(match[3]);
|
|
44970
45134
|
}
|
|
44971
|
-
if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size === before)
|
|
45135
|
+
if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size + forced.size + nonfailable.size === before)
|
|
44972
45136
|
throw new Error(
|
|
44973
45137
|
`its generated source does not typecheck: ${elsewhere.slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
|
|
44974
45138
|
);
|
|
@@ -45770,7 +45934,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
|
|
|
45770
45934
|
...(binary2.headerDependencies ?? []).map(
|
|
45771
45935
|
(dependency) => `${swiftTargetModuleName(dependency.module)}\0${treeDigest(import_node_path74.default.join(binary2.dir, dependency.path))}`
|
|
45772
45936
|
),
|
|
45773
|
-
...binary2.
|
|
45937
|
+
...binary2.unloweredSources ?? []
|
|
45774
45938
|
].join("\0") : swiftBinaryFramework(binary2).digest
|
|
45775
45939
|
);
|
|
45776
45940
|
} catch {
|
|
@@ -46453,7 +46617,7 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
|
|
|
46453
46617
|
const binaryHeaders = binarySearch.flatMap((search) => search.headers);
|
|
46454
46618
|
const configuration = app.configuration === "Debug" ? "debug" : "release";
|
|
46455
46619
|
for (const binary2 of binaries) {
|
|
46456
|
-
if (!binary2.reached || binary2.publicHeaders === void 0 || binary2.
|
|
46620
|
+
if (!binary2.reached || binary2.publicHeaders === void 0 || binary2.unloweredSources !== void 0)
|
|
46457
46621
|
continue;
|
|
46458
46622
|
const manifest = swiftPackageManifest(binary2.dir);
|
|
46459
46623
|
const target = manifest.targets.get(binary2.target);
|
|
@@ -47846,9 +48010,9 @@ var init_self_invocation = __esm({
|
|
|
47846
48010
|
});
|
|
47847
48011
|
|
|
47848
48012
|
// 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(),
|
|
48013
|
+
function rasterBinary(swift = RASTER_SWIFT, name3 = "swift-pdf-raster") {
|
|
48014
|
+
const tag = (0, import_node_crypto39.createHash)("sha256").update(swift).digest("hex").slice(0, 16);
|
|
48015
|
+
const binary2 = import_node_path78.default.join(cacheDir(), `${name3}-${tag}`);
|
|
47852
48016
|
try {
|
|
47853
48017
|
import_node_fs79.default.accessSync(binary2, import_node_fs79.default.constants.X_OK);
|
|
47854
48018
|
return binary2;
|
|
@@ -47860,7 +48024,7 @@ function rasterBinary() {
|
|
|
47860
48024
|
import_node_fs79.default.mkdtempSync(import_node_path78.default.join(import_node_os16.default.tmpdir(), "swift-pdf-raster-")),
|
|
47861
48025
|
"raster.swift"
|
|
47862
48026
|
);
|
|
47863
|
-
import_node_fs79.default.writeFileSync(source,
|
|
48027
|
+
import_node_fs79.default.writeFileSync(source, swift);
|
|
47864
48028
|
try {
|
|
47865
48029
|
(0, import_node_child_process41.execFileSync)("xcrun", ["swiftc", "-o", binary2, source], { stdio: "pipe" });
|
|
47866
48030
|
} finally {
|
|
@@ -47918,7 +48082,31 @@ function rasterizePdfFile(diskPath, pdfSha256) {
|
|
|
47918
48082
|
import_node_fs79.default.rmSync(import_node_path78.default.dirname(out), { recursive: true, force: true });
|
|
47919
48083
|
}
|
|
47920
48084
|
}
|
|
47921
|
-
|
|
48085
|
+
function rasterizeSvgFile(diskPath, svgSha256) {
|
|
48086
|
+
if (process.platform !== "darwin") return null;
|
|
48087
|
+
const binary2 = rasterBinary(RASTER_SVG_SWIFT, "swift-svg-raster");
|
|
48088
|
+
const tag = (0, import_node_crypto39.createHash)("sha256").update(RASTER_SVG_SWIFT).digest("hex").slice(0, 16);
|
|
48089
|
+
const cached2 = import_node_path78.default.join(cacheDir(), `swift-svg-png-${tag}-${svgSha256}.png`);
|
|
48090
|
+
if (import_node_fs79.default.existsSync(cached2)) return { bytes: import_node_fs79.default.readFileSync(cached2) };
|
|
48091
|
+
const out = import_node_path78.default.join(
|
|
48092
|
+
import_node_fs79.default.mkdtempSync(import_node_path78.default.join(import_node_os16.default.tmpdir(), "swift-svg-png-")),
|
|
48093
|
+
"out.png"
|
|
48094
|
+
);
|
|
48095
|
+
try {
|
|
48096
|
+
(0, import_node_child_process41.execFileSync)(binary2, [diskPath, "3", out], { stdio: "pipe" });
|
|
48097
|
+
const bytes = import_node_fs79.default.readFileSync(out);
|
|
48098
|
+
import_node_fs79.default.mkdirSync(cacheDir(), { recursive: true });
|
|
48099
|
+
import_node_fs79.default.copyFileSync(out, cached2);
|
|
48100
|
+
return { bytes: Buffer.from(bytes) };
|
|
48101
|
+
} catch (error) {
|
|
48102
|
+
throw new Error(
|
|
48103
|
+
`swift svg asset ${diskPath} did not rasterize: ${error instanceof Error ? error.message : String(error)}`
|
|
48104
|
+
);
|
|
48105
|
+
} finally {
|
|
48106
|
+
import_node_fs79.default.rmSync(import_node_path78.default.dirname(out), { recursive: true, force: true });
|
|
48107
|
+
}
|
|
48108
|
+
}
|
|
48109
|
+
var import_node_child_process41, import_node_crypto39, import_node_fs79, import_node_os16, import_node_path78, RASTER_SWIFT, RASTER_SVG_SWIFT;
|
|
47922
48110
|
var init_swift_pdf_raster = __esm({
|
|
47923
48111
|
"src/swift-pdf-raster.ts"() {
|
|
47924
48112
|
"use strict";
|
|
@@ -47954,6 +48142,25 @@ guard let image = ctx.makeImage() else { exit(5) }
|
|
|
47954
48142
|
guard let dest = CGImageDestinationCreateWithURL(output as CFURL, UTType.png.identifier as CFString, 1, nil) else { exit(6) }
|
|
47955
48143
|
CGImageDestinationAddImage(dest, image, nil)
|
|
47956
48144
|
guard CGImageDestinationFinalize(dest) else { exit(7) }
|
|
48145
|
+
`;
|
|
48146
|
+
RASTER_SVG_SWIFT = `import AppKit
|
|
48147
|
+
guard CommandLine.arguments.count == 4 else { exit(1) }
|
|
48148
|
+
let input = URL(fileURLWithPath: CommandLine.arguments[1])
|
|
48149
|
+
let scale = CGFloat(Double(CommandLine.arguments[2]) ?? 3.0)
|
|
48150
|
+
let output = URL(fileURLWithPath: CommandLine.arguments[3])
|
|
48151
|
+
guard let image = NSImage(contentsOf: input), image.size.width > 0, image.size.height > 0 else { exit(2) }
|
|
48152
|
+
let width = Int(ceil(image.size.width * scale))
|
|
48153
|
+
let height = Int(ceil(image.size.height * scale))
|
|
48154
|
+
if width > 12000 || height > 12000 { exit(3) }
|
|
48155
|
+
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) }
|
|
48156
|
+
guard let context = NSGraphicsContext(bitmapImageRep: rep) else { exit(5) }
|
|
48157
|
+
NSGraphicsContext.saveGraphicsState()
|
|
48158
|
+
NSGraphicsContext.current = context
|
|
48159
|
+
context.imageInterpolation = .high
|
|
48160
|
+
image.draw(in: NSRect(x: 0, y: 0, width: width, height: height), from: .zero, operation: .copy, fraction: 1)
|
|
48161
|
+
NSGraphicsContext.restoreGraphicsState()
|
|
48162
|
+
guard let data = rep.representation(using: .png, properties: [:]) else { exit(6) }
|
|
48163
|
+
do { try data.write(to: output) } catch { exit(7) }
|
|
47957
48164
|
`;
|
|
47958
48165
|
}
|
|
47959
48166
|
});
|
|
@@ -48151,7 +48358,7 @@ async function swiftPackages(entry, app) {
|
|
|
48151
48358
|
] : []
|
|
48152
48359
|
);
|
|
48153
48360
|
let reached = [...cached2.binaries.filter((binary2) => binary2.reached), ...vendored];
|
|
48154
|
-
const standinArtifact = (binary2) => binary2.publicHeaders === void 0 || binary2.
|
|
48361
|
+
const standinArtifact = (binary2) => binary2.publicHeaders === void 0 || binary2.unloweredSources !== void 0;
|
|
48155
48362
|
const artifacts = reached.filter(standinArtifact);
|
|
48156
48363
|
if (entry.moduleRoot && entry.provided && artifacts.length > 0) {
|
|
48157
48364
|
const resolved = swiftModuleToolchain(entry.moduleRoot);
|
|
@@ -48170,10 +48377,13 @@ async function swiftPackages(entry, app) {
|
|
|
48170
48377
|
const cxxArtifacts = reached.filter(standinArtifact);
|
|
48171
48378
|
const generation = standinGenerationInputs(cxxArtifacts, toolchain, entry.behavior);
|
|
48172
48379
|
if (cached2.standinKey !== generation) {
|
|
48380
|
+
const replaced = new Set(
|
|
48381
|
+
cxxArtifacts.filter((binary2) => shippedBinaryDiffers(binary2.target, binary2.checksum)).map((binary2) => binary2.target)
|
|
48382
|
+
);
|
|
48173
48383
|
const built2 = await swiftStandins(
|
|
48174
48384
|
cxxArtifacts,
|
|
48175
48385
|
toolchain,
|
|
48176
|
-
entry.provided,
|
|
48386
|
+
new Set([...entry.provided].filter((name3) => !replaced.has(name3))),
|
|
48177
48387
|
entry.behavior
|
|
48178
48388
|
);
|
|
48179
48389
|
cached2.packages = await resolveSwiftPackagesAsync({
|
|
@@ -48187,6 +48397,9 @@ async function swiftPackages(entry, app) {
|
|
|
48187
48397
|
...entry.provided,
|
|
48188
48398
|
...cxxArtifacts.map((binary2) => binary2.target).filter((target) => !built2.gaps.has(target))
|
|
48189
48399
|
]),
|
|
48400
|
+
standinTargets: new Set(
|
|
48401
|
+
[...replaced].filter((target) => !built2.gaps.has(target))
|
|
48402
|
+
),
|
|
48190
48403
|
binaryGaps: built2.gaps,
|
|
48191
48404
|
owners
|
|
48192
48405
|
});
|
|
@@ -49096,6 +49309,12 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
|
|
|
49096
49309
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
49097
49310
|
}
|
|
49098
49311
|
bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
|
|
49312
|
+
const svg = ext === ".svg" ? rasterizeSvgFile(disk, (0, import_node_crypto40.createHash)("sha256").update(bytes).digest("hex")) : null;
|
|
49313
|
+
if (svg) {
|
|
49314
|
+
bytes = svg.bytes;
|
|
49315
|
+
ext = ".png";
|
|
49316
|
+
uploadName = `${import_node_path79.default.posix.basename(file, import_node_path79.default.posix.extname(file))}.png`;
|
|
49317
|
+
}
|
|
49099
49318
|
}
|
|
49100
49319
|
if (imageBytes + bytes.length > limits.imageTotalBytes) {
|
|
49101
49320
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
@@ -49994,6 +50213,7 @@ var init_swift_host = __esm({
|
|
|
49994
50213
|
init_swift_package_manifest();
|
|
49995
50214
|
init_swift_packages();
|
|
49996
50215
|
init_swift_pdf_raster();
|
|
50216
|
+
init_swift_shipped_binaries();
|
|
49997
50217
|
init_swift_source_file();
|
|
49998
50218
|
init_swift_standin_config();
|
|
49999
50219
|
init_swift_standins();
|
|
@@ -55439,7 +55659,7 @@ var init_nitro_superset = __esm({
|
|
|
55439
55659
|
init_nitroContract();
|
|
55440
55660
|
init_swift_standin_digest();
|
|
55441
55661
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
55442
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
55662
|
+
NITRO_COMPILER_DIGEST = true ? "7afc96bcaad18f442be5bd478487a44ee748ffe868f559accac85cf7e93d6a81" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
55443
55663
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
55444
55664
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
55445
55665
|
published = /* @__PURE__ */ new Map();
|
|
@@ -56664,7 +56884,7 @@ var init_expo_native_compiler_digest = __esm({
|
|
|
56664
56884
|
|
|
56665
56885
|
// src/expo-native-prebuilt.ts
|
|
56666
56886
|
function expoNativeCompilerDigestValue() {
|
|
56667
|
-
return true ? "
|
|
56887
|
+
return true ? "5922e9285a81f56dda7ebf9adbf34c7d630c8a729a2ce226405b975c38ab854b" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
56668
56888
|
}
|
|
56669
56889
|
function readSources(value) {
|
|
56670
56890
|
const sources = isRecord(value) ? value.sources : null;
|