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
package/dist-lib/skills.cjs
CHANGED
|
@@ -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;
|
|
@@ -44250,7 +44250,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
44250
44250
|
const coder = members2.some((member) => leaf(member) === "init(coder:)");
|
|
44251
44251
|
if (designated2 && !coder && externalRoot(id) !== "NSObject" && externalRoot(id) !== null)
|
|
44252
44252
|
emit(
|
|
44253
|
-
`${inner}public required init?(coder: NSCoder) { ${options.inert ? "return nil" : trap(`${path140}.init(coder:)`)} }`
|
|
44253
|
+
`${inner}public required init${options.coderNonfailable?.has(path140) ? "" : "?"}(coder: NSCoder) { ${options.inert && !options.coderNonfailable?.has(path140) ? "return nil" : trap(`${path140}.init(coder:)`)} }`
|
|
44254
44254
|
);
|
|
44255
44255
|
if (designated2 && !members2.some((member) => leaf(member) === "init()") && [...superChain(id)].some(
|
|
44256
44256
|
(at) => options.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
|
|
@@ -44431,15 +44431,18 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
44431
44431
|
const { 2: rest } = LEADING_ATTRS.exec(text(member));
|
|
44432
44432
|
const decl = rest.replace(/^(?:weak |unowned )/, "").replace(/^((?:static )?)let /, "$1var ");
|
|
44433
44433
|
const witness = `${owner2}.${leaf(member)}`;
|
|
44434
|
+
if (options.forcedOverride?.has(witness)) return;
|
|
44434
44435
|
const body = options.inert ? inertBody(member) : trap(witness);
|
|
44435
44436
|
if (member.kind.identifier === "swift.property" || member.kind.identifier === "swift.type.property") {
|
|
44436
44437
|
const parsed = splitAccessors(decl);
|
|
44437
44438
|
const setter = parsed.settable ? ` ${parsed.nonmutating ? "nonmutating " : ""}set { ${body} }` : "";
|
|
44438
|
-
|
|
44439
|
+
emitAt(
|
|
44440
|
+
witness,
|
|
44439
44441
|
`${indent2}${visibility} ${parsed.decl} { get${parsed.effects} { ${body} }${setter} }`
|
|
44440
44442
|
);
|
|
44441
44443
|
} else
|
|
44442
|
-
|
|
44444
|
+
emitAt(
|
|
44445
|
+
witness,
|
|
44443
44446
|
`${indent2}${member.kind.identifier === "swift.init" ? "public required " : visibility + " "}${stripDefaults(decl)} { ${body} }`
|
|
44444
44447
|
);
|
|
44445
44448
|
};
|
|
@@ -46001,7 +46004,7 @@ var init_swift_objc_standin = __esm({
|
|
|
46001
46004
|
};
|
|
46002
46005
|
NATIVE_GRAPH_ID = (0, import_node_crypto16.createHash)("sha256").update(JSON.stringify(NATIVE_GRAPH_INPUTS)).digest("hex");
|
|
46003
46006
|
ROUNDS = 12;
|
|
46004
|
-
headerFiles = (dir) => import_node_fs36.default.readdirSync(dir, { recursive: true, encoding: "utf8" }).filter((file) => file.endsWith(".h")).sort();
|
|
46007
|
+
headerFiles = (dir) => import_node_fs36.default.readdirSync(dir, { recursive: true, encoding: "utf8" }).filter((file) => file.endsWith(".h") || file.endsWith(".hh")).sort();
|
|
46005
46008
|
MISSING_IMPORT = "#import <PeachMissing/PeachMissing.h>\n";
|
|
46006
46009
|
FRAMEWORK_HEADER = /^System\/Library\/Frameworks\/([^/]+)\.framework\/Headers\/(.+)$/;
|
|
46007
46010
|
FRAMEWORK_MODULEMAP = /^System\/Library\/Frameworks\/([^/]+)\.framework\/Modules\/module\.modulemap$/;
|
|
@@ -53172,16 +53175,30 @@ function swiftClangImporterFlags(flags) {
|
|
|
53172
53175
|
(flag) => flag !== "-fobjc-arc" && flag !== "-fno-objc-arc" && !/^-std=(?:c(?!\+\+)|gnu(?!\+\+)|iso9899:)/.test(flag)
|
|
53173
53176
|
);
|
|
53174
53177
|
}
|
|
53175
|
-
function
|
|
53178
|
+
function swiftSubmoduleImports(sources) {
|
|
53179
|
+
const imports2 = /* @__PURE__ */ new Map();
|
|
53180
|
+
for (const source of sources)
|
|
53181
|
+
for (const [, module2, submodule] of source.matchAll(SWIFT_SUBMODULE_IMPORT)) {
|
|
53182
|
+
const names = imports2.get(module2) ?? /* @__PURE__ */ new Set();
|
|
53183
|
+
names.add(submodule);
|
|
53184
|
+
imports2.set(module2, names);
|
|
53185
|
+
}
|
|
53186
|
+
return imports2;
|
|
53187
|
+
}
|
|
53188
|
+
function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new Set()) {
|
|
53189
|
+
const header = (file) => `header ${JSON.stringify(file)}`;
|
|
53190
|
+
const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "");
|
|
53176
53191
|
return [
|
|
53177
53192
|
`module ${module2} {`,
|
|
53178
|
-
...headers.map(
|
|
53193
|
+
...headers.map(
|
|
53194
|
+
(file) => submodules.has(stem(file)) ? ` module ${stem(file)} { ${header(file)} export * }` : ` ${header(file)}`
|
|
53195
|
+
),
|
|
53179
53196
|
" export *",
|
|
53180
53197
|
"}",
|
|
53181
53198
|
""
|
|
53182
53199
|
].join("\n");
|
|
53183
53200
|
}
|
|
53184
|
-
var SWIFT_OBJC_INTEROP_FLAGS;
|
|
53201
|
+
var SWIFT_OBJC_INTEROP_FLAGS, SWIFT_SUBMODULE_IMPORT;
|
|
53185
53202
|
var init_swift_objc_import = __esm({
|
|
53186
53203
|
"src/swift-objc-import.ts"() {
|
|
53187
53204
|
"use strict";
|
|
@@ -53196,6 +53213,7 @@ var init_swift_objc_import = __esm({
|
|
|
53196
53213
|
"-Xcc",
|
|
53197
53214
|
"-fblocks"
|
|
53198
53215
|
];
|
|
53216
|
+
SWIFT_SUBMODULE_IMPORT = /^[ \t]*(?:@\w+(?:\([^)]*\))?[ \t]+)*import[ \t]+([A-Za-z_]\w*)\.([A-Za-z_]\w*)[ \t]*(?:\/\/.*)?$/gm;
|
|
53199
53217
|
}
|
|
53200
53218
|
});
|
|
53201
53219
|
|
|
@@ -55550,6 +55568,12 @@ function stripCCode(source) {
|
|
|
55550
55568
|
}
|
|
55551
55569
|
return code;
|
|
55552
55570
|
}
|
|
55571
|
+
function swiftCTakesReturnAddress(source) {
|
|
55572
|
+
if (!source.includes("__builtin_return_address")) return false;
|
|
55573
|
+
return /\b__builtin_return_address\s*\(/.test(
|
|
55574
|
+
cActiveCode(stripCCode(source), wasmMacroEnvironment)
|
|
55575
|
+
);
|
|
55576
|
+
}
|
|
55553
55577
|
function swiftCDefinedNames(sources) {
|
|
55554
55578
|
const names = /* @__PURE__ */ new Set();
|
|
55555
55579
|
for (const source of sources)
|
|
@@ -55842,6 +55866,11 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
55842
55866
|
clangImportedModules.add(name3);
|
|
55843
55867
|
}
|
|
55844
55868
|
}
|
|
55869
|
+
const submoduleImports = swiftSubmoduleImports(
|
|
55870
|
+
Object.entries(input.files).flatMap(
|
|
55871
|
+
([file, contents]) => file.endsWith(".swift") ? [contents] : []
|
|
55872
|
+
)
|
|
55873
|
+
);
|
|
55845
55874
|
const headerDirectory = import_node_path51.default.join(layout2.root, ".build", "peach-cxx-headers");
|
|
55846
55875
|
const flattenedHeaders = /* @__PURE__ */ new Set();
|
|
55847
55876
|
if ((0, import_node_fs54.existsSync)(headerDirectory)) {
|
|
@@ -56227,7 +56256,8 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
56227
56256
|
);
|
|
56228
56257
|
const moduleContents = originalModuleMap ? input.files[originalModuleMap[1]] : swiftpmModuleMap?.contents ?? packageModuleMap?.[1] ?? swiftObjCModuleMap(
|
|
56229
56258
|
swiftTargetModuleName(target.name),
|
|
56230
|
-
roots2.map((file) => import_node_path51.default.join(layout2.root, file))
|
|
56259
|
+
roots2.map((file) => import_node_path51.default.join(layout2.root, file)),
|
|
56260
|
+
submoduleImports.get(swiftTargetModuleName(target.name))
|
|
56231
56261
|
);
|
|
56232
56262
|
if (moduleContents === void 0)
|
|
56233
56263
|
throw new Error("missing original module map " + modulemap);
|
|
@@ -56552,10 +56582,14 @@ module ${moduleName2}.Swift {
|
|
|
56552
56582
|
header ${JSON.stringify(import_node_path51.default.join(headerDirectory, name3 + "-Swift.h"))}
|
|
56553
56583
|
requires objc
|
|
56554
56584
|
}
|
|
56555
|
-
` : swiftObjCModuleMap(
|
|
56556
|
-
|
|
56557
|
-
|
|
56558
|
-
|
|
56585
|
+
` : swiftObjCModuleMap(
|
|
56586
|
+
moduleName2,
|
|
56587
|
+
[
|
|
56588
|
+
...(input.nativeTargets?.find((target) => target.name === name3)?.publicHeaders ?? []).map((header) => import_node_path51.default.join(layout2.root, header)),
|
|
56589
|
+
import_node_path51.default.join(headerDirectory, name3 + "-Swift.h")
|
|
56590
|
+
],
|
|
56591
|
+
submoduleImports.get(moduleName2)
|
|
56592
|
+
)
|
|
56559
56593
|
);
|
|
56560
56594
|
nativeHeaderFlags.push("-fmodule-map-file=" + modulemap);
|
|
56561
56595
|
}
|
|
@@ -57538,8 +57572,12 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
57538
57572
|
const linked = frameworkLinkClosure(scratch2, linkedTargets.targets);
|
|
57539
57573
|
const objects = linked.objects;
|
|
57540
57574
|
if (linked.modules.has("UniformTypeIdentifiers")) {
|
|
57541
|
-
const
|
|
57542
|
-
|
|
57575
|
+
const constantsDir = import_node_path51.default.join(scratch2, "uniform-type-constants");
|
|
57576
|
+
const constantsStamp = import_node_path51.default.join(constantsDir, ".complete");
|
|
57577
|
+
const object6 = import_node_path51.default.join(constantsDir, "UniformTypeIdentifiers-NativeConstants.o");
|
|
57578
|
+
if (!(0, import_node_fs54.existsSync)(constantsStamp) || (0, import_node_fs54.readFileSync)(constantsStamp, "utf8") !== args.frameworkKey) {
|
|
57579
|
+
(0, import_node_fs54.rmSync)(constantsDir, { recursive: true, force: true });
|
|
57580
|
+
(0, import_node_fs54.mkdirSync)(constantsDir);
|
|
57543
57581
|
const sdkPaths2 = swiftSdkPaths(args.moduleRoot, args.toolchainBin);
|
|
57544
57582
|
compileUniformTypeConstants({
|
|
57545
57583
|
bin: args.toolchainBin,
|
|
@@ -57547,8 +57585,9 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
57547
57585
|
darwin: sdkPaths2.darwin,
|
|
57548
57586
|
packageRoot: args.moduleRoot,
|
|
57549
57587
|
minimum: darwinRecordsMinimum(),
|
|
57550
|
-
out:
|
|
57588
|
+
out: constantsDir
|
|
57551
57589
|
});
|
|
57590
|
+
(0, import_node_fs54.writeFileSync)(constantsStamp, args.frameworkKey);
|
|
57552
57591
|
}
|
|
57553
57592
|
objects.push(object6);
|
|
57554
57593
|
linked.owners.set(object6, "UniformTypeIdentifiers");
|
|
@@ -58233,7 +58272,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
58233
58272
|
options.signal
|
|
58234
58273
|
);
|
|
58235
58274
|
}
|
|
58236
|
-
var import_node_child_process31, import_node_crypto25, import_node_fs54, import_node_os12, import_node_path51, 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, cPredefineTable, cPredefineCache, 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;
|
|
58275
|
+
var import_node_child_process31, import_node_crypto25, import_node_fs54, import_node_os12, import_node_path51, 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, cPredefineTable, cPredefineCache, 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;
|
|
58237
58276
|
var init_swift_compile = __esm({
|
|
58238
58277
|
"src/swift-compile.ts"() {
|
|
58239
58278
|
"use strict";
|
|
@@ -58447,7 +58486,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
58447
58486
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
58448
58487
|
MULTI_MANIFEST_VERSION = 68;
|
|
58449
58488
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
58450
|
-
compilerSourceDigest = true ? "
|
|
58489
|
+
compilerSourceDigest = true ? "4fa3e84f8c3b585bc8e864c92f0682e6f02757d455de1ce784f0d40ba9df875a" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
58451
58490
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
58452
58491
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
58453
58492
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -58972,6 +59011,14 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
58972
59011
|
predefines: /* @__PURE__ */ new Map(),
|
|
58973
59012
|
targetDefined: /* @__PURE__ */ new Set()
|
|
58974
59013
|
};
|
|
59014
|
+
wasmMacroEnvironment = {
|
|
59015
|
+
...emptyMacroEnvironment,
|
|
59016
|
+
defines: /* @__PURE__ */ new Map([
|
|
59017
|
+
["__wasm__", "1"],
|
|
59018
|
+
["__wasm32__", "1"],
|
|
59019
|
+
["__wasi__", "1"]
|
|
59020
|
+
])
|
|
59021
|
+
};
|
|
58975
59022
|
cPredefineTable = swift_c_predefines_default;
|
|
58976
59023
|
cPredefineCache = /* @__PURE__ */ new Map();
|
|
58977
59024
|
HIDDEN_UNITS = "PeachHiddenUnits";
|
|
@@ -64903,7 +64950,7 @@ var init_swift_standin_digest = __esm({
|
|
|
64903
64950
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
64904
64951
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
64905
64952
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
64906
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
64953
|
+
STANDIN_SOURCE_DIGEST = true ? "9adf53d6f1cfece1b7a3e23bad712630278818d71b5b718384cf640144349600" : standinSourceDigest();
|
|
64907
64954
|
}
|
|
64908
64955
|
});
|
|
64909
64956
|
|
|
@@ -65364,7 +65411,7 @@ var init_package_tree_digest = __esm({
|
|
|
65364
65411
|
|
|
65365
65412
|
// src/expo-native-prebuilt.ts
|
|
65366
65413
|
function expoNativeCompilerDigestValue() {
|
|
65367
|
-
return true ? "
|
|
65414
|
+
return true ? "5922e9285a81f56dda7ebf9adbf34c7d630c8a729a2ce226405b975c38ab854b" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
65368
65415
|
}
|
|
65369
65416
|
function readSources(value) {
|
|
65370
65417
|
const sources = isRecord(value) ? value.sources : null;
|
|
@@ -65924,6 +65971,13 @@ var init_native_static_libraries = __esm({
|
|
|
65924
65971
|
upstream: "b94213a11b3a2edadfae89f0c57a7f4ab72772c9",
|
|
65925
65972
|
recipe: "a2642115a5eeb04559c9f1daaa4b4cbe4b1c211533b4cc80cb8339a4477af205",
|
|
65926
65973
|
archive: "libsksg.a"
|
|
65974
|
+
},
|
|
65975
|
+
{
|
|
65976
|
+
name: "webgpu_dawn",
|
|
65977
|
+
nativeSha256: "95078993275bccc969b1dfa1ad0934cbacc05ae59e8aa2a6cc46ce93e97d4f69",
|
|
65978
|
+
upstream: "3d786993a7ded64c4ebb4884b9b079db9ad0e580",
|
|
65979
|
+
recipe: "c55468cc976e837ad894133f2231beb7d1ed64633af7b457b8a2610d7df45994",
|
|
65980
|
+
archive: "libwebgpu_dawn.a"
|
|
65927
65981
|
}
|
|
65928
65982
|
];
|
|
65929
65983
|
}
|
|
@@ -66029,6 +66083,72 @@ var init_numbered_lock = __esm({
|
|
|
66029
66083
|
}
|
|
66030
66084
|
});
|
|
66031
66085
|
|
|
66086
|
+
// src/swift-shipped-archives.json
|
|
66087
|
+
var swift_shipped_archives_default;
|
|
66088
|
+
var init_swift_shipped_archives = __esm({
|
|
66089
|
+
"src/swift-shipped-archives.json"() {
|
|
66090
|
+
swift_shipped_archives_default = {
|
|
66091
|
+
AppCheckCore: "a18d4e5aff27ff4b9bce8d6e73e55ccf1d11515311e219aa4473319cdff3187b",
|
|
66092
|
+
AppLovinSDK: "c00f052c4b15766a6a2734e2b3685234e6bd28dbc47fbe7cbc3edbf56f701d5c",
|
|
66093
|
+
AppsFlyerLib: "13bae495e63e22579dd9525a1c9e88d8eedc78b4586979b7e2d492cfd3efbe1f",
|
|
66094
|
+
FBAEMKit: "ceaf685683c6a23ae4893150d0d770aeeaec34811ac8c146b3aa351beade5fa0",
|
|
66095
|
+
FBAudienceNetwork: "4d84bf1e404a83852a93af2ae73e22e45bb2b11e0a9a445c3b461173a5d6aec3",
|
|
66096
|
+
FBLPromises: "3544fb457e7f60c69740cdd26617a75bdd613943e948becca643022c7edd76c0",
|
|
66097
|
+
FBSDKCoreKit: "1577edd62ec0c172928befed3b309dc59ae8915d2aaad091460d9d1be5ddc13d",
|
|
66098
|
+
FBSDKCoreKit_Basics: "c780833f204f9ec6eab70a3758a45c5c78bfb6f4e590289ccf395497f204cac1",
|
|
66099
|
+
FirebaseAnalytics: "e3253a494375c5174d20cb81925e20afa1ff6b1419125cb608d39b092b53ff2a",
|
|
66100
|
+
FirebaseAppCheck: "af82d72727d55d14f65eee96845d4d9495e4e603b4673709d6f3448b9595cc63",
|
|
66101
|
+
FirebaseAppCheckInterop: "7ffd54e6fe187bf8cd714e3d863e0095f7cbbb0fb802adb87a40c552de7cffcc",
|
|
66102
|
+
FirebaseAuth: "fcde09db8d45ffba67802e81c17b8046db6b56568226ace3fca898983b08c968",
|
|
66103
|
+
FirebaseAuthInterop: "e8e6f4fb42b3fa76c2bade7a522ab0f224558d27d2321175c791d307541787a8",
|
|
66104
|
+
FirebaseCore: "30e3505c715e17682c1dc20bb26ba475e99e6981a9a0dba3cf9352eea632fc1d",
|
|
66105
|
+
FirebaseCoreExtension: "e37ce2abcd4c218ab5426da78cbe7ab41f79ee7eba1d02dd4b0cde952ed2c4a0",
|
|
66106
|
+
FirebaseCoreInternal: "72a15c0c63585faf93e9ffa91e8a8c1c50b24749405804ffae19a29ec05b07ab",
|
|
66107
|
+
FirebaseCrashlytics: "e03c71913efd97678b895abb1e968c83e58b3fbd7955a81ec6e6581b95db16e3",
|
|
66108
|
+
FirebaseFirestore: "f7a1bb7fc4a2fb09298b514114d6aaca9a4f00fd8868667524a05bc4563bf1fd",
|
|
66109
|
+
FirebaseFirestoreInternal: "d9595a1784beaf5cd4a8e0dda0f4364ddfa6b536ad60f82746d81d14dce037a3",
|
|
66110
|
+
FirebaseInstallations: "141e313325bab001f2dbb79dc8a433f884f4c4a12a5feb665e6958098d637f7b",
|
|
66111
|
+
FirebaseRemoteConfig: "e0ae6d626a423d535bc67216f9f0cd66f98f1c0fb4b5bf88074d4496733e2db1",
|
|
66112
|
+
FirebaseRemoteConfigInterop: "794f599eb4232058715b606fa671639c8cc5d821655a0f739651d17c5ef65c37",
|
|
66113
|
+
FirebaseSessions: "1781d72e47dac0fc7a532412641021730bd5b659135633cd9ef7b97ccd31b0ce",
|
|
66114
|
+
FirebaseSharedSwift: "8d63b09a517733ef3a58390bf1e8cf054f058bdd618bb4f19a1f4b5a0b4f09e5",
|
|
66115
|
+
FirebaseStorage: "636b33180dd5ad60b4878357691fe6472cf3bd57ec691e9d661c5444f523df66",
|
|
66116
|
+
GTMSessionFetcher: "f58dc2bd9db39defd73f0f67e7a11893a0c6e6f0ba45cd83cf420b2b3c15f1bd",
|
|
66117
|
+
GoogleAdsOnDeviceConversion: "31a5a1f5204f4844a480d3889b6ebe2e69473ef32b868935c51812c0483cb08b",
|
|
66118
|
+
GoogleAppMeasurement: "5741e6334392e0345f1b5896111ffef4d5a78859970f5e197fa0b7d881165305",
|
|
66119
|
+
GoogleAppMeasurementIdentitySupport: "b70cb033eeb002ed1c5a8140953ccb3be0221ca754c05fe450ed9c9c6547f274",
|
|
66120
|
+
GoogleDataTransport: "7d08050419e0906f13039cc4d2dd69be075234c0bf5bbb34df9dd4891e48831d",
|
|
66121
|
+
GoogleMobileAds: "f2c09c60ee331ce029f563304ad73a481d57ace0d4bc11ce33a2bf59497c59bf",
|
|
66122
|
+
GoogleUtilities: "37a9d3d3810dad763a8a79bd4c7cc4c37b386240725aca07f45dba1826676c8c",
|
|
66123
|
+
Intercom: "fc8251f24b305b91f83304d4dffaf1a90c424a7bc37be8b595dd1fc5cff566ea",
|
|
66124
|
+
Promises: "6d8f1a4b3d561d67adfc2026834779b05685d1cdacea6e83c70d0641c39f24de",
|
|
66125
|
+
RecaptchaInterop: "cf5cc62ebc237b34d5267c1190d18f33b424dbc7f81713f127108d0ad8a592cf",
|
|
66126
|
+
RiveRuntime: "72b6ff5c5a1d153c9cdbea9a917c09be557cfcb1fafa02853fa06b0268551710",
|
|
66127
|
+
absl: "fff0388cf074c69a2da4bc197a005da0b8e5c23ebdcfa383600c540a342f9df1",
|
|
66128
|
+
grpc: "918737c9f8f93e14127b3894e31c7a0522475f2247b74f87d8166dff3a6bafb0",
|
|
66129
|
+
grpcpp: "b83f85e0256cf06df00cf0ed728b5c0d68373ca401742877935771447450b90a",
|
|
66130
|
+
leveldb: "5521a6e6e4cd01b2e31b099d4341f1bccae7e8ba43de648b028928573daf8bb4",
|
|
66131
|
+
nanopb: "a7fafe2e4e16d99de4c58f72e22dcc53221885aa6d678d1270123e4b01badfa3",
|
|
66132
|
+
openssl_grpc: "b2aaede82457cdd15915762a4f57b38e28ba0f47b9b48556a7e0c46881973096"
|
|
66133
|
+
};
|
|
66134
|
+
}
|
|
66135
|
+
});
|
|
66136
|
+
|
|
66137
|
+
// src/swift-shipped-binaries.ts
|
|
66138
|
+
function shippedBinaryDiffers(target, checksum) {
|
|
66139
|
+
const shipped = SHIPPED_ARCHIVES.get(target);
|
|
66140
|
+
return shipped !== void 0 && checksum !== null && checksum !== shipped;
|
|
66141
|
+
}
|
|
66142
|
+
var SHIPPED_ARCHIVES;
|
|
66143
|
+
var init_swift_shipped_binaries = __esm({
|
|
66144
|
+
"src/swift-shipped-binaries.ts"() {
|
|
66145
|
+
"use strict";
|
|
66146
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
66147
|
+
init_swift_shipped_archives();
|
|
66148
|
+
SHIPPED_ARCHIVES = new Map(Object.entries(swift_shipped_archives_default));
|
|
66149
|
+
}
|
|
66150
|
+
});
|
|
66151
|
+
|
|
66032
66152
|
// src/swift-packages.ts
|
|
66033
66153
|
function remoteSwiftCheckouts(root) {
|
|
66034
66154
|
const prepared = preparedSwiftCheckouts(root);
|
|
@@ -66037,16 +66157,22 @@ function remoteSwiftCheckouts(root) {
|
|
|
66037
66157
|
import_node_fs73.default.mkdirSync(cacheDir(), { recursive: true });
|
|
66038
66158
|
return import_node_path71.default.join(import_node_fs73.default.realpathSync(cacheDir()), "swift-packages", key2, "checkouts");
|
|
66039
66159
|
}
|
|
66040
|
-
function
|
|
66160
|
+
function unlowerableSources(files2, target) {
|
|
66161
|
+
if (target.declaresWasiNativeSettings) return [];
|
|
66162
|
+
return [
|
|
66163
|
+
...files2.filter((file) => UNSUPPORTED_NATIVE.test(file)),
|
|
66164
|
+
...files2.filter(isSwiftNativeTranslationUnit).filter((file) => swiftCTakesReturnAddress(import_node_fs73.default.readFileSync(file, "utf8")))
|
|
66165
|
+
];
|
|
66166
|
+
}
|
|
66167
|
+
function unloweredSources(files2, target) {
|
|
66041
66168
|
if (target.type !== "regular") return null;
|
|
66042
|
-
if (target.declaresWasiNativeSettings) return null;
|
|
66043
|
-
const assembly = files2.filter((file) => UNSUPPORTED_NATIVE.test(file));
|
|
66044
|
-
if (assembly.length === 0) return null;
|
|
66045
66169
|
if (!files2.some(isSwiftNativeTranslationUnit)) return null;
|
|
66170
|
+
const unlowered = unlowerableSources(files2, target);
|
|
66171
|
+
if (unlowered.length === 0) return null;
|
|
66046
66172
|
const headers = import_node_path71.default.resolve(target.dir, target.publicHeadersPath);
|
|
66047
66173
|
if (!files2.some((file) => file.startsWith(`${headers}${import_node_path71.default.sep}`) && file.endsWith(".h")))
|
|
66048
66174
|
return null;
|
|
66049
|
-
return
|
|
66175
|
+
return unlowered;
|
|
66050
66176
|
}
|
|
66051
66177
|
function resolvedPins(data) {
|
|
66052
66178
|
if (!data || typeof data !== "object") return null;
|
|
@@ -66342,9 +66468,9 @@ function resolveSwiftPackages(options) {
|
|
|
66342
66468
|
if (target.type === "macro") return preservePackage(pkg, [name3], "host");
|
|
66343
66469
|
const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
|
|
66344
66470
|
const gap = options.binaryGaps?.get(name3);
|
|
66345
|
-
const
|
|
66471
|
+
const unlowerable = unlowerableSources(files2, target);
|
|
66346
66472
|
const placeholder = placeholderPackage(pkg);
|
|
66347
|
-
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` :
|
|
66473
|
+
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_path71.default.relative(pkg.manifest.dir, file)).join(", ")}${gap ? `; ${gap}` : ""}` : null;
|
|
66348
66474
|
const reasons = target.dependencies.map((dependency) => {
|
|
66349
66475
|
if (dependency.kind === "target") return resolveTarget(pkg, dependency.name);
|
|
66350
66476
|
const nested = resolveDependencyProduct(pkg, dependency);
|
|
@@ -66423,7 +66549,7 @@ function resolveSwiftPackages(options) {
|
|
|
66423
66549
|
(file) => file.endsWith(".swift") && import_node_fs73.default.readFileSync(file, "utf8").trim() === ""
|
|
66424
66550
|
))
|
|
66425
66551
|
return false;
|
|
66426
|
-
if (
|
|
66552
|
+
if (unloweredSources(files2, target)) return false;
|
|
66427
66553
|
claimed.add(key2);
|
|
66428
66554
|
providedTargets.delete(name3);
|
|
66429
66555
|
for (const dependency of target.dependencies) {
|
|
@@ -66437,6 +66563,13 @@ function resolveSwiftPackages(options) {
|
|
|
66437
66563
|
};
|
|
66438
66564
|
const claimProduct = (pkg, product) => {
|
|
66439
66565
|
const roots = pkg.manifest.products.get(product)?.targets ?? [];
|
|
66566
|
+
for (const root of roots) {
|
|
66567
|
+
const target = pkg.manifest.targets.get(root);
|
|
66568
|
+
if (target?.type === "binary" && !options.standinTargets?.has(root) && shippedBinaryDiffers(root, target.checksum)) {
|
|
66569
|
+
providedTargets.delete(root);
|
|
66570
|
+
providedProducts.delete(product);
|
|
66571
|
+
}
|
|
66572
|
+
}
|
|
66440
66573
|
if (roots.map((name3) => claimTarget(pkg, name3)).some(Boolean))
|
|
66441
66574
|
providedProducts.delete(product);
|
|
66442
66575
|
};
|
|
@@ -66464,7 +66597,7 @@ function resolveSwiftPackages(options) {
|
|
|
66464
66597
|
if (target.type === "executable") continue;
|
|
66465
66598
|
const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
|
|
66466
66599
|
const objc = target.type === "regular" && files2.some((file) => /\.(m|mm)$/.test(file));
|
|
66467
|
-
const
|
|
66600
|
+
const unlowered = unloweredSources(files2, target);
|
|
66468
66601
|
const gap = placeholderPackage(pkg);
|
|
66469
66602
|
const sources = files2.filter((file) => file.endsWith(".swift"));
|
|
66470
66603
|
const release = (setting) => setting.configuration !== "debug";
|
|
@@ -66491,7 +66624,7 @@ function resolveSwiftPackages(options) {
|
|
|
66491
66624
|
]
|
|
66492
66625
|
}
|
|
66493
66626
|
});
|
|
66494
|
-
else if (target.type === "binary" || objc ||
|
|
66627
|
+
else if (target.type === "binary" || objc || unlowered)
|
|
66495
66628
|
result.binaries.push({
|
|
66496
66629
|
target: name3,
|
|
66497
66630
|
source: pkg.source,
|
|
@@ -66505,8 +66638,8 @@ function resolveSwiftPackages(options) {
|
|
|
66505
66638
|
import_node_path71.default.join(target.dir, target.publicHeadersPath)
|
|
66506
66639
|
)
|
|
66507
66640
|
},
|
|
66508
|
-
...
|
|
66509
|
-
|
|
66641
|
+
...unlowered ? {
|
|
66642
|
+
unloweredSources: unlowered.map(
|
|
66510
66643
|
(file) => import_node_path71.default.relative(pkg.manifest.dir, file)
|
|
66511
66644
|
)
|
|
66512
66645
|
} : {}
|
|
@@ -66727,8 +66860,10 @@ var init_swift_packages = __esm({
|
|
|
66727
66860
|
init_native_git();
|
|
66728
66861
|
init_numbered_lock();
|
|
66729
66862
|
init_prepared_xcode_phases();
|
|
66863
|
+
init_swift_compile();
|
|
66730
66864
|
init_swift_package();
|
|
66731
66865
|
init_swift_package_manifest();
|
|
66866
|
+
init_swift_shipped_binaries();
|
|
66732
66867
|
swiftBinaryOnDisk = (binary2) => binary2.url !== null || import_node_fs73.default.existsSync(binary2.dir);
|
|
66733
66868
|
SWIFT_PLACEHOLDER_PACKAGES = /* @__PURE__ */ new Map();
|
|
66734
66869
|
placeholderPackage = (pkg) => SWIFT_PLACEHOLDER_PACKAGES.get(swiftPackageIdentity(pkg.manifest.dir));
|
|
@@ -68327,7 +68462,7 @@ function interfaceEnumValues(graphs, interfaceText) {
|
|
|
68327
68462
|
const declarations = [
|
|
68328
68463
|
...interfaceText.matchAll(
|
|
68329
68464
|
new RegExp(
|
|
68330
|
-
`^([ \\t]*)(?:@[\\w.]+(?:\\([^)]*\\))?\\s+)*(?:nonisolated\\s+)?(?:public|open)\\s+enum\\s+${name3}\\s*:\\s*(?:Swift\\.)?U?Int(?:8|16|32|64)
|
|
68465
|
+
`^([ \\t]*)(?:@[\\w.]+(?:\\([^)]*\\))?\\s+)*(?:nonisolated\\s+)?(?:public|open)\\s+enum\\s+${name3}\\s*:\\s*(?:Swift\\.)?(?:U?Int(?:8|16|32|64)?|IntegerLiteralType)\\b[^{]*\\{[ \\t]*$`,
|
|
68331
68466
|
"gm"
|
|
68332
68467
|
)
|
|
68333
68468
|
)
|
|
@@ -68426,9 +68561,26 @@ function mixedStandin(surface, binary2, toolchain, work, behavior, frameworkDirs
|
|
|
68426
68561
|
view.protocolProperties ?? /* @__PURE__ */ new Map(),
|
|
68427
68562
|
null,
|
|
68428
68563
|
view.inheritedConformances,
|
|
68429
|
-
interfaceProjections(view.graphs, interfaceText)
|
|
68564
|
+
interfaceProjections(view.graphs, interfaceText),
|
|
68565
|
+
[],
|
|
68566
|
+
externalConformances(surface.module, interfaceText)
|
|
68430
68567
|
);
|
|
68431
68568
|
}
|
|
68569
|
+
function externalConformances(module2, interfaceText) {
|
|
68570
|
+
const lines = /* @__PURE__ */ new Set();
|
|
68571
|
+
for (const match of interfaceText.matchAll(
|
|
68572
|
+
/^(?:@\w+\s+)*extension\s+([\w.]+)\s*:\s*([^{\n]+?)\s*\{/gm
|
|
68573
|
+
)) {
|
|
68574
|
+
const [, extended, conformances] = match;
|
|
68575
|
+
if (extended.startsWith(`${module2}.`) || /\bwhere\b/.test(conformances)) continue;
|
|
68576
|
+
const own = conformances.split(",").map((name3) => name3.trim()).filter((name3) => name3.startsWith(`${module2}.`));
|
|
68577
|
+
const type = extended.startsWith("Swift.") ? extended : extended.split(".").slice(1).join(".");
|
|
68578
|
+
if (own.length > 0 && type) lines.add(`extension ${type} : ${own.join(", ")} {}
|
|
68579
|
+
`);
|
|
68580
|
+
}
|
|
68581
|
+
return lines.size > 0 ? `
|
|
68582
|
+
${[...lines].join("")}` : "";
|
|
68583
|
+
}
|
|
68432
68584
|
function wasmFlags(toolchain, imports2) {
|
|
68433
68585
|
const { sysroot, darwin, resources, cFlags } = swiftSdkPaths(
|
|
68434
68586
|
toolchain.moduleRoot,
|
|
@@ -68521,7 +68673,7 @@ function objcStandin(surface, binary2, toolchain, work, behavior, frameworks, si
|
|
|
68521
68673
|
dependencyGraphs
|
|
68522
68674
|
);
|
|
68523
68675
|
}
|
|
68524
|
-
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 = []) {
|
|
68676
|
+
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 = "") {
|
|
68525
68677
|
const paths = new Set(
|
|
68526
68678
|
graphs.flatMap(
|
|
68527
68679
|
(graph) => graph.symbols.map((symbol2) => symbol2.pathComponents.join("."))
|
|
@@ -68562,6 +68714,8 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
68562
68714
|
const plain = /* @__PURE__ */ new Set();
|
|
68563
68715
|
const unobjc = /* @__PURE__ */ new Set();
|
|
68564
68716
|
const trapped = /* @__PURE__ */ new Set();
|
|
68717
|
+
const forced = /* @__PURE__ */ new Set();
|
|
68718
|
+
const nonfailable = /* @__PURE__ */ new Set();
|
|
68565
68719
|
const unconformed = /* @__PURE__ */ new Map();
|
|
68566
68720
|
const objcProtocols = new Set(
|
|
68567
68721
|
graphs.flatMap(
|
|
@@ -68571,7 +68725,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
68571
68725
|
)
|
|
68572
68726
|
);
|
|
68573
68727
|
const file = import_node_path75.default.join(work, `${module2}.swift`);
|
|
68574
|
-
const inert = binary2.placeholder !== void 0 || binary2.publicHeaders !== void 0 && binary2.
|
|
68728
|
+
const inert = binary2.placeholder !== void 0 || binary2.publicHeaders !== void 0 && binary2.unloweredSources === void 0;
|
|
68575
68729
|
for (; ; ) {
|
|
68576
68730
|
const { source, owners, skipped } = emitSwiftStandin(graphs, {
|
|
68577
68731
|
module: module2,
|
|
@@ -68584,6 +68738,8 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
68584
68738
|
unobjc,
|
|
68585
68739
|
unconformed,
|
|
68586
68740
|
trapped,
|
|
68741
|
+
forcedOverride: forced,
|
|
68742
|
+
coderNonfailable: nonfailable,
|
|
68587
68743
|
inert,
|
|
68588
68744
|
imports: [...placeholder?.peachImports ?? [], ...imports2],
|
|
68589
68745
|
family: [...imports2, ...placeholder?.peachImports ?? []],
|
|
@@ -68603,7 +68759,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
68603
68759
|
`Configured Swift behavior ${module2}.${entry.path} was not emitted: ${entry.reason}`
|
|
68604
68760
|
);
|
|
68605
68761
|
}
|
|
68606
|
-
import_node_fs78.default.writeFileSync(file, source);
|
|
68762
|
+
import_node_fs78.default.writeFileSync(file, source + trailer);
|
|
68607
68763
|
const check2 = (0, import_node_child_process41.spawnSync)(
|
|
68608
68764
|
import_node_path75.default.join(toolchain.toolchainBin, "swiftc"),
|
|
68609
68765
|
// emitting the module runs the diagnostics a typecheck skips, such as
|
|
@@ -68627,10 +68783,10 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
68627
68783
|
return {
|
|
68628
68784
|
module: module2,
|
|
68629
68785
|
target: binary2.target,
|
|
68630
|
-
files: { [`${module2}.swift`]: source },
|
|
68786
|
+
files: { [`${module2}.swift`]: source + trailer },
|
|
68631
68787
|
...imports2.length ? { dependencies: imports2 } : {}
|
|
68632
68788
|
};
|
|
68633
|
-
const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size;
|
|
68789
|
+
const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size + forced.size + nonfailable.size;
|
|
68634
68790
|
const elsewhere = [];
|
|
68635
68791
|
for (const match of check2.stderr.matchAll(/^(\S+?):(\d+):\d+: error: (.*)$/gm)) {
|
|
68636
68792
|
const owner = match[1] === file ? owners[Number(match[2]) - 1] : void 0;
|
|
@@ -68653,14 +68809,22 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
68653
68809
|
throw new Error(
|
|
68654
68810
|
`Configured Swift behavior ${module2}.${owner} does not typecheck: ${match[3]}`
|
|
68655
68811
|
);
|
|
68656
|
-
if (owner && /does not override any|overrides nothing/.test(
|
|
68812
|
+
if (owner && /does not override any|overrides nothing|does not override a designated initializer/.test(
|
|
68813
|
+
match[3]
|
|
68814
|
+
))
|
|
68657
68815
|
plain.add(owner);
|
|
68816
|
+
else if (owner && /failable initializer 'init\(coder:\)' cannot override a non-failable/.test(
|
|
68817
|
+
match[3]
|
|
68818
|
+
) && !nonfailable.has(owner))
|
|
68819
|
+
nonfailable.add(owner);
|
|
68820
|
+
else if (owner && /requires an 'override' keyword/.test(match[3]) && !forced.has(owner))
|
|
68821
|
+
forced.add(owner);
|
|
68658
68822
|
else if (owner && inert && INERT_VALUE.test(match[3]) && !trapped.has(owner))
|
|
68659
68823
|
trapped.add(owner);
|
|
68660
68824
|
else if (owner) omit.set(owner, `rejected by swiftc: ${match[3]}`);
|
|
68661
68825
|
else elsewhere.push(match[3]);
|
|
68662
68826
|
}
|
|
68663
|
-
if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size === before)
|
|
68827
|
+
if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size + forced.size + nonfailable.size === before)
|
|
68664
68828
|
throw new Error(
|
|
68665
68829
|
`its generated source does not typecheck: ${elsewhere.slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
|
|
68666
68830
|
);
|
|
@@ -69462,7 +69626,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
|
|
|
69462
69626
|
...(binary2.headerDependencies ?? []).map(
|
|
69463
69627
|
(dependency) => `${swiftTargetModuleName(dependency.module)}\0${treeDigest2(import_node_path75.default.join(binary2.dir, dependency.path))}`
|
|
69464
69628
|
),
|
|
69465
|
-
...binary2.
|
|
69629
|
+
...binary2.unloweredSources ?? []
|
|
69466
69630
|
].join("\0") : swiftBinaryFramework(binary2).digest
|
|
69467
69631
|
);
|
|
69468
69632
|
} catch {
|
|
@@ -70145,7 +70309,7 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
|
|
|
70145
70309
|
const binaryHeaders = binarySearch.flatMap((search) => search.headers);
|
|
70146
70310
|
const configuration = app.configuration === "Debug" ? "debug" : "release";
|
|
70147
70311
|
for (const binary2 of binaries) {
|
|
70148
|
-
if (!binary2.reached || binary2.publicHeaders === void 0 || binary2.
|
|
70312
|
+
if (!binary2.reached || binary2.publicHeaders === void 0 || binary2.unloweredSources !== void 0)
|
|
70149
70313
|
continue;
|
|
70150
70314
|
const manifest = swiftPackageManifest(binary2.dir);
|
|
70151
70315
|
const target = manifest.targets.get(binary2.target);
|
|
@@ -74281,9 +74445,9 @@ var init_self_invocation = __esm({
|
|
|
74281
74445
|
});
|
|
74282
74446
|
|
|
74283
74447
|
// src/swift-pdf-raster.ts
|
|
74284
|
-
function rasterBinary() {
|
|
74285
|
-
const tag = (0, import_node_crypto44.createHash)("sha256").update(
|
|
74286
|
-
const binary2 = import_node_path82.default.join(cacheDir(),
|
|
74448
|
+
function rasterBinary(swift = RASTER_SWIFT, name3 = "swift-pdf-raster") {
|
|
74449
|
+
const tag = (0, import_node_crypto44.createHash)("sha256").update(swift).digest("hex").slice(0, 16);
|
|
74450
|
+
const binary2 = import_node_path82.default.join(cacheDir(), `${name3}-${tag}`);
|
|
74287
74451
|
try {
|
|
74288
74452
|
import_node_fs85.default.accessSync(binary2, import_node_fs85.default.constants.X_OK);
|
|
74289
74453
|
return binary2;
|
|
@@ -74295,7 +74459,7 @@ function rasterBinary() {
|
|
|
74295
74459
|
import_node_fs85.default.mkdtempSync(import_node_path82.default.join(import_node_os17.default.tmpdir(), "swift-pdf-raster-")),
|
|
74296
74460
|
"raster.swift"
|
|
74297
74461
|
);
|
|
74298
|
-
import_node_fs85.default.writeFileSync(source,
|
|
74462
|
+
import_node_fs85.default.writeFileSync(source, swift);
|
|
74299
74463
|
try {
|
|
74300
74464
|
(0, import_node_child_process45.execFileSync)("xcrun", ["swiftc", "-o", binary2, source], { stdio: "pipe" });
|
|
74301
74465
|
} finally {
|
|
@@ -74353,7 +74517,31 @@ function rasterizePdfFile(diskPath, pdfSha256) {
|
|
|
74353
74517
|
import_node_fs85.default.rmSync(import_node_path82.default.dirname(out), { recursive: true, force: true });
|
|
74354
74518
|
}
|
|
74355
74519
|
}
|
|
74356
|
-
|
|
74520
|
+
function rasterizeSvgFile(diskPath, svgSha256) {
|
|
74521
|
+
if (process.platform !== "darwin") return null;
|
|
74522
|
+
const binary2 = rasterBinary(RASTER_SVG_SWIFT, "swift-svg-raster");
|
|
74523
|
+
const tag = (0, import_node_crypto44.createHash)("sha256").update(RASTER_SVG_SWIFT).digest("hex").slice(0, 16);
|
|
74524
|
+
const cached4 = import_node_path82.default.join(cacheDir(), `swift-svg-png-${tag}-${svgSha256}.png`);
|
|
74525
|
+
if (import_node_fs85.default.existsSync(cached4)) return { bytes: import_node_fs85.default.readFileSync(cached4) };
|
|
74526
|
+
const out = import_node_path82.default.join(
|
|
74527
|
+
import_node_fs85.default.mkdtempSync(import_node_path82.default.join(import_node_os17.default.tmpdir(), "swift-svg-png-")),
|
|
74528
|
+
"out.png"
|
|
74529
|
+
);
|
|
74530
|
+
try {
|
|
74531
|
+
(0, import_node_child_process45.execFileSync)(binary2, [diskPath, "3", out], { stdio: "pipe" });
|
|
74532
|
+
const bytes = import_node_fs85.default.readFileSync(out);
|
|
74533
|
+
import_node_fs85.default.mkdirSync(cacheDir(), { recursive: true });
|
|
74534
|
+
import_node_fs85.default.copyFileSync(out, cached4);
|
|
74535
|
+
return { bytes: Buffer.from(bytes) };
|
|
74536
|
+
} catch (error) {
|
|
74537
|
+
throw new Error(
|
|
74538
|
+
`swift svg asset ${diskPath} did not rasterize: ${error instanceof Error ? error.message : String(error)}`
|
|
74539
|
+
);
|
|
74540
|
+
} finally {
|
|
74541
|
+
import_node_fs85.default.rmSync(import_node_path82.default.dirname(out), { recursive: true, force: true });
|
|
74542
|
+
}
|
|
74543
|
+
}
|
|
74544
|
+
var import_node_child_process45, import_node_crypto44, import_node_fs85, import_node_os17, import_node_path82, RASTER_SWIFT, RASTER_SVG_SWIFT;
|
|
74357
74545
|
var init_swift_pdf_raster = __esm({
|
|
74358
74546
|
"src/swift-pdf-raster.ts"() {
|
|
74359
74547
|
"use strict";
|
|
@@ -74389,6 +74577,25 @@ guard let image = ctx.makeImage() else { exit(5) }
|
|
|
74389
74577
|
guard let dest = CGImageDestinationCreateWithURL(output as CFURL, UTType.png.identifier as CFString, 1, nil) else { exit(6) }
|
|
74390
74578
|
CGImageDestinationAddImage(dest, image, nil)
|
|
74391
74579
|
guard CGImageDestinationFinalize(dest) else { exit(7) }
|
|
74580
|
+
`;
|
|
74581
|
+
RASTER_SVG_SWIFT = `import AppKit
|
|
74582
|
+
guard CommandLine.arguments.count == 4 else { exit(1) }
|
|
74583
|
+
let input = URL(fileURLWithPath: CommandLine.arguments[1])
|
|
74584
|
+
let scale = CGFloat(Double(CommandLine.arguments[2]) ?? 3.0)
|
|
74585
|
+
let output = URL(fileURLWithPath: CommandLine.arguments[3])
|
|
74586
|
+
guard let image = NSImage(contentsOf: input), image.size.width > 0, image.size.height > 0 else { exit(2) }
|
|
74587
|
+
let width = Int(ceil(image.size.width * scale))
|
|
74588
|
+
let height = Int(ceil(image.size.height * scale))
|
|
74589
|
+
if width > 12000 || height > 12000 { exit(3) }
|
|
74590
|
+
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) }
|
|
74591
|
+
guard let context = NSGraphicsContext(bitmapImageRep: rep) else { exit(5) }
|
|
74592
|
+
NSGraphicsContext.saveGraphicsState()
|
|
74593
|
+
NSGraphicsContext.current = context
|
|
74594
|
+
context.imageInterpolation = .high
|
|
74595
|
+
image.draw(in: NSRect(x: 0, y: 0, width: width, height: height), from: .zero, operation: .copy, fraction: 1)
|
|
74596
|
+
NSGraphicsContext.restoreGraphicsState()
|
|
74597
|
+
guard let data = rep.representation(using: .png, properties: [:]) else { exit(6) }
|
|
74598
|
+
do { try data.write(to: output) } catch { exit(7) }
|
|
74392
74599
|
`;
|
|
74393
74600
|
}
|
|
74394
74601
|
});
|
|
@@ -74703,7 +74910,7 @@ async function swiftPackages(entry, app) {
|
|
|
74703
74910
|
] : []
|
|
74704
74911
|
);
|
|
74705
74912
|
let reached = [...cached4.binaries.filter((binary2) => binary2.reached), ...vendored];
|
|
74706
|
-
const standinArtifact = (binary2) => binary2.publicHeaders === void 0 || binary2.
|
|
74913
|
+
const standinArtifact = (binary2) => binary2.publicHeaders === void 0 || binary2.unloweredSources !== void 0;
|
|
74707
74914
|
const artifacts = reached.filter(standinArtifact);
|
|
74708
74915
|
if (entry.moduleRoot && entry.provided && artifacts.length > 0) {
|
|
74709
74916
|
const resolved = swiftModuleToolchain(entry.moduleRoot);
|
|
@@ -74722,10 +74929,13 @@ async function swiftPackages(entry, app) {
|
|
|
74722
74929
|
const cxxArtifacts = reached.filter(standinArtifact);
|
|
74723
74930
|
const generation = standinGenerationInputs(cxxArtifacts, toolchain, entry.behavior);
|
|
74724
74931
|
if (cached4.standinKey !== generation) {
|
|
74932
|
+
const replaced = new Set(
|
|
74933
|
+
cxxArtifacts.filter((binary2) => shippedBinaryDiffers(binary2.target, binary2.checksum)).map((binary2) => binary2.target)
|
|
74934
|
+
);
|
|
74725
74935
|
const built2 = await swiftStandins(
|
|
74726
74936
|
cxxArtifacts,
|
|
74727
74937
|
toolchain,
|
|
74728
|
-
entry.provided,
|
|
74938
|
+
new Set([...entry.provided].filter((name3) => !replaced.has(name3))),
|
|
74729
74939
|
entry.behavior
|
|
74730
74940
|
);
|
|
74731
74941
|
cached4.packages = await resolveSwiftPackagesAsync({
|
|
@@ -74739,6 +74949,9 @@ async function swiftPackages(entry, app) {
|
|
|
74739
74949
|
...entry.provided,
|
|
74740
74950
|
...cxxArtifacts.map((binary2) => binary2.target).filter((target) => !built2.gaps.has(target))
|
|
74741
74951
|
]),
|
|
74952
|
+
standinTargets: new Set(
|
|
74953
|
+
[...replaced].filter((target) => !built2.gaps.has(target))
|
|
74954
|
+
),
|
|
74742
74955
|
binaryGaps: built2.gaps,
|
|
74743
74956
|
owners
|
|
74744
74957
|
});
|
|
@@ -75648,6 +75861,12 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
|
|
|
75648
75861
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
75649
75862
|
}
|
|
75650
75863
|
bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
|
|
75864
|
+
const svg = ext === ".svg" ? rasterizeSvgFile(disk, (0, import_node_crypto45.createHash)("sha256").update(bytes).digest("hex")) : null;
|
|
75865
|
+
if (svg) {
|
|
75866
|
+
bytes = svg.bytes;
|
|
75867
|
+
ext = ".png";
|
|
75868
|
+
uploadName = `${import_node_path83.default.posix.basename(file, import_node_path83.default.posix.extname(file))}.png`;
|
|
75869
|
+
}
|
|
75651
75870
|
}
|
|
75652
75871
|
if (imageBytes + bytes.length > limits.imageTotalBytes) {
|
|
75653
75872
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
@@ -76751,6 +76970,7 @@ var init_swift_host = __esm({
|
|
|
76751
76970
|
init_swift_package_manifest();
|
|
76752
76971
|
init_swift_packages();
|
|
76753
76972
|
init_swift_pdf_raster();
|
|
76973
|
+
init_swift_shipped_binaries();
|
|
76754
76974
|
init_swift_source_file();
|
|
76755
76975
|
init_swift_standin_config();
|
|
76756
76976
|
init_swift_standins();
|
|
@@ -86067,7 +86287,7 @@ var init_nitro_superset = __esm({
|
|
|
86067
86287
|
init_nitroContract();
|
|
86068
86288
|
init_swift_standin_digest();
|
|
86069
86289
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
86070
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
86290
|
+
NITRO_COMPILER_DIGEST = true ? "7afc96bcaad18f442be5bd478487a44ee748ffe868f559accac85cf7e93d6a81" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
86071
86291
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
86072
86292
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
86073
86293
|
published2 = /* @__PURE__ */ new Map();
|