peachsim 0.1.2208 → 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 +712 -66
- 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 +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +700 -60
- 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 +712 -66
- package/dist-lib/host/fetch-proxy-handler.cjs +17 -4
- 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 +17 -4
- 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 +7 -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 +17 -4
- 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 +69 -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 +5679 -358
- package/dist-lib/swift-compile.cjs +154 -16
- package/dist-lib/swift-compile.mjs +153 -16
- 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 +600 -55
- package/dist-lib/vite.cjs +17 -4
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/animated.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/animation-graph.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/canvaskit-webgpu.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +14 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-runtime/render-tree.d.ts +18 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSCompoundPredicate.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSExpression.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSMeasurementFormatter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INObjectCollection.h +27 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INObjectSection.h +24 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/Intents.h +9 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h +2 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIFeedbackGenerator.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIImpactFeedbackGenerator.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +21 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UINibLoading.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UINotificationFeedbackGenerator.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISelectionFeedbackGenerator.h +1 -1
- package/sdk/ios/usr/include/ObjectiveC.apinotes +7 -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/android-theme.ts +136 -2
- package/src/expo-swift-host.ts +90 -1
- package/src/generated/android-framework-text.json +4566 -0
- package/src/generated/android-framework-themes.json +11 -0
- package/src/kotlin-app.ts +24 -4
- package/src/kotlin-host.ts +9 -0
- package/src/native-static-libraries.ts +7 -0
- package/src/nitro-adapter.lock.json +246 -246
- package/src/nitro-superset.lock.json +4 -4
- package/src/swift-compile.ts +168 -12
- package/src/swift-distribution.lock.json +8 -8
- 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 +10 -3
- package/src/swift-packages.ts +53 -28
- package/src/swift-pdf-raster.ts +60 -4
- package/src/swift-shared-sdk.ts +2 -1
- package/src/swift-shipped-archives.json +44 -0
- package/src/swift-shipped-binaries.ts +12 -0
- package/src/swift-standin-builtin-behavior.ts +248 -0
- package/src/swift-standin-emit.ts +11 -3
- package/src/swift-standins.ts +92 -13
- package/src/turbo-runtime.lock.json +17 -17
|
@@ -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;
|
|
@@ -9732,7 +9732,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
9732
9732
|
const coder = members2.some((member) => leaf(member) === "init(coder:)");
|
|
9733
9733
|
if (designated2 && !coder && externalRoot(id) !== "NSObject" && externalRoot(id) !== null)
|
|
9734
9734
|
emit(
|
|
9735
|
-
`${inner}public required init?(coder: NSCoder) { ${options.inert ? "return nil" : trap(`${path74}.init(coder:)`)} }`
|
|
9735
|
+
`${inner}public required init${options.coderNonfailable?.has(path74) ? "" : "?"}(coder: NSCoder) { ${options.inert && !options.coderNonfailable?.has(path74) ? "return nil" : trap(`${path74}.init(coder:)`)} }`
|
|
9736
9736
|
);
|
|
9737
9737
|
if (designated2 && !members2.some((member) => leaf(member) === "init()") && [...superChain(id)].some(
|
|
9738
9738
|
(at) => options.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
|
|
@@ -9913,15 +9913,18 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
9913
9913
|
const { 2: rest } = LEADING_ATTRS.exec(text(member));
|
|
9914
9914
|
const decl = rest.replace(/^(?:weak |unowned )/, "").replace(/^((?:static )?)let /, "$1var ");
|
|
9915
9915
|
const witness = `${owner2}.${leaf(member)}`;
|
|
9916
|
+
if (options.forcedOverride?.has(witness)) return;
|
|
9916
9917
|
const body = options.inert ? inertBody(member) : trap(witness);
|
|
9917
9918
|
if (member.kind.identifier === "swift.property" || member.kind.identifier === "swift.type.property") {
|
|
9918
9919
|
const parsed = splitAccessors(decl);
|
|
9919
9920
|
const setter = parsed.settable ? ` ${parsed.nonmutating ? "nonmutating " : ""}set { ${body} }` : "";
|
|
9920
|
-
|
|
9921
|
+
emitAt(
|
|
9922
|
+
witness,
|
|
9921
9923
|
`${indent2}${visibility} ${parsed.decl} { get${parsed.effects} { ${body} }${setter} }`
|
|
9922
9924
|
);
|
|
9923
9925
|
} else
|
|
9924
|
-
|
|
9926
|
+
emitAt(
|
|
9927
|
+
witness,
|
|
9925
9928
|
`${indent2}${member.kind.identifier === "swift.init" ? "public required " : visibility + " "}${stripDefaults(decl)} { ${body} }`
|
|
9926
9929
|
);
|
|
9927
9930
|
};
|
|
@@ -10560,9 +10563,14 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
10560
10563
|
recursive: true
|
|
10561
10564
|
});
|
|
10562
10565
|
const modulemap = import_node_fs32.default.readFileSync(surface.modulemap, "utf8");
|
|
10566
|
+
const forwardEnum = [...originals.values()].some(
|
|
10567
|
+
(text6) => /typedef\s+NS_(?:CLOSED_)?(?:ENUM|OPTIONS)\s*\(\s*\w+\s*,\s*\w+\s*\)\s*;/.test(
|
|
10568
|
+
text6
|
|
10569
|
+
)
|
|
10570
|
+
);
|
|
10563
10571
|
import_node_fs32.default.writeFileSync(
|
|
10564
10572
|
import_node_path29.default.join(frameworks, `${surface.module}.framework`, "Modules", "module.modulemap"),
|
|
10565
|
-
surface.interface ? modulemap.replace(
|
|
10573
|
+
surface.interface && !forwardEnum ? modulemap.replace(
|
|
10566
10574
|
new RegExp(`\\n\\s*module\\s+${surface.module}\\.Swift\\s*\\{[^}]*\\}`),
|
|
10567
10575
|
""
|
|
10568
10576
|
) : modulemap
|
|
@@ -11478,7 +11486,7 @@ var init_swift_objc_standin = __esm({
|
|
|
11478
11486
|
};
|
|
11479
11487
|
NATIVE_GRAPH_ID = (0, import_node_crypto12.createHash)("sha256").update(JSON.stringify(NATIVE_GRAPH_INPUTS)).digest("hex");
|
|
11480
11488
|
ROUNDS = 12;
|
|
11481
|
-
headerFiles = (dir) => import_node_fs32.default.readdirSync(dir, { recursive: true, encoding: "utf8" }).filter((file) => file.endsWith(".h")).sort();
|
|
11489
|
+
headerFiles = (dir) => import_node_fs32.default.readdirSync(dir, { recursive: true, encoding: "utf8" }).filter((file) => file.endsWith(".h") || file.endsWith(".hh")).sort();
|
|
11482
11490
|
MISSING_IMPORT = "#import <PeachMissing/PeachMissing.h>\n";
|
|
11483
11491
|
FRAMEWORK_HEADER = /^System\/Library\/Frameworks\/([^/]+)\.framework\/Headers\/(.+)$/;
|
|
11484
11492
|
FRAMEWORK_MODULEMAP = /^System\/Library\/Frameworks\/([^/]+)\.framework\/Modules\/module\.modulemap$/;
|
|
@@ -11690,7 +11698,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
|
|
|
11690
11698
|
const overlay = import_node_path30.default.join(swiftSharedSdkRoot(moduleRoot, distribution), "wasm/include");
|
|
11691
11699
|
const overlayFiles = (0, import_node_fs33.readdirSync)(overlay, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path30.default.join(entry.parentPath, entry.name)).sort();
|
|
11692
11700
|
const key2 = JSON.stringify([
|
|
11693
|
-
"
|
|
11701
|
+
"v23",
|
|
11694
11702
|
toolchainBin,
|
|
11695
11703
|
sdk,
|
|
11696
11704
|
frameworks,
|
|
@@ -11747,6 +11755,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
|
|
|
11747
11755
|
...[
|
|
11748
11756
|
"MacTypes.h",
|
|
11749
11757
|
"objc/NSObject.h",
|
|
11758
|
+
"ObjectiveC.apinotes",
|
|
11750
11759
|
"net/if.h",
|
|
11751
11760
|
"notify.h",
|
|
11752
11761
|
"notify.modulemap",
|
|
@@ -18616,16 +18625,30 @@ function swiftClangImporterFlags(flags) {
|
|
|
18616
18625
|
(flag) => flag !== "-fobjc-arc" && flag !== "-fno-objc-arc" && !/^-std=(?:c(?!\+\+)|gnu(?!\+\+)|iso9899:)/.test(flag)
|
|
18617
18626
|
);
|
|
18618
18627
|
}
|
|
18619
|
-
function
|
|
18628
|
+
function swiftSubmoduleImports(sources) {
|
|
18629
|
+
const imports2 = /* @__PURE__ */ new Map();
|
|
18630
|
+
for (const source of sources)
|
|
18631
|
+
for (const [, module2, submodule] of source.matchAll(SWIFT_SUBMODULE_IMPORT)) {
|
|
18632
|
+
const names = imports2.get(module2) ?? /* @__PURE__ */ new Set();
|
|
18633
|
+
names.add(submodule);
|
|
18634
|
+
imports2.set(module2, names);
|
|
18635
|
+
}
|
|
18636
|
+
return imports2;
|
|
18637
|
+
}
|
|
18638
|
+
function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new Set()) {
|
|
18639
|
+
const header = (file) => `header ${JSON.stringify(file)}`;
|
|
18640
|
+
const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "");
|
|
18620
18641
|
return [
|
|
18621
18642
|
`module ${module2} {`,
|
|
18622
|
-
...headers.map(
|
|
18643
|
+
...headers.map(
|
|
18644
|
+
(file) => submodules.has(stem(file)) ? ` module ${stem(file)} { ${header(file)} export * }` : ` ${header(file)}`
|
|
18645
|
+
),
|
|
18623
18646
|
" export *",
|
|
18624
18647
|
"}",
|
|
18625
18648
|
""
|
|
18626
18649
|
].join("\n");
|
|
18627
18650
|
}
|
|
18628
|
-
var SWIFT_OBJC_INTEROP_FLAGS;
|
|
18651
|
+
var SWIFT_OBJC_INTEROP_FLAGS, SWIFT_SUBMODULE_IMPORT;
|
|
18629
18652
|
var init_swift_objc_import = __esm({
|
|
18630
18653
|
"src/swift-objc-import.ts"() {
|
|
18631
18654
|
"use strict";
|
|
@@ -18640,6 +18663,7 @@ var init_swift_objc_import = __esm({
|
|
|
18640
18663
|
"-Xcc",
|
|
18641
18664
|
"-fblocks"
|
|
18642
18665
|
];
|
|
18666
|
+
SWIFT_SUBMODULE_IMPORT = /^[ \t]*(?:@\w+(?:\([^)]*\))?[ \t]+)*import[ \t]+([A-Za-z_]\w*)\.([A-Za-z_]\w*)[ \t]*(?:\/\/.*)?$/gm;
|
|
18643
18667
|
}
|
|
18644
18668
|
});
|
|
18645
18669
|
|
|
@@ -19790,6 +19814,41 @@ function swiftSystemLibraryExclusions(files2, targets, distributionModules) {
|
|
|
19790
19814
|
)
|
|
19791
19815
|
);
|
|
19792
19816
|
}
|
|
19817
|
+
function distributionClangModulePresent(modules, name3) {
|
|
19818
|
+
return (0, import_node_fs50.existsSync)(import_node_path47.default.join(modules, `${name3}.swiftmodule`)) || (0, import_node_fs50.existsSync)(import_node_path47.default.join(modules, name3, "module.modulemap"));
|
|
19819
|
+
}
|
|
19820
|
+
function distributionClangModuleMap(root, modules) {
|
|
19821
|
+
const missing = DISTRIBUTION_CLANG_MODULES.filter(
|
|
19822
|
+
(mod) => !distributionClangModulePresent(modules, mod.name)
|
|
19823
|
+
);
|
|
19824
|
+
if (missing.length === 0) return null;
|
|
19825
|
+
const key2 = (0, import_node_crypto21.createHash)("sha256").update(modules).update(missing.map((mod) => `${mod.name}\0${mod.source}`).join("\0")).digest("hex").slice(0, 16);
|
|
19826
|
+
const directory2 = import_node_path47.default.join(root, `.peach-clang-modules-${key2}`);
|
|
19827
|
+
const mapPath = import_node_path47.default.join(directory2, "module.modulemap");
|
|
19828
|
+
if (!(0, import_node_fs50.existsSync)(mapPath)) {
|
|
19829
|
+
(0, import_node_fs50.mkdirSync)(directory2, { recursive: true });
|
|
19830
|
+
const parts = [];
|
|
19831
|
+
for (const mod of missing) {
|
|
19832
|
+
const destination = import_node_path47.default.join(directory2, mod.header);
|
|
19833
|
+
(0, import_node_fs50.mkdirSync)(import_node_path47.default.dirname(destination), { recursive: true });
|
|
19834
|
+
(0, import_node_fs50.writeFileSync)(destination, mod.source);
|
|
19835
|
+
parts.push(
|
|
19836
|
+
`module ${mod.name} {
|
|
19837
|
+
requires objc
|
|
19838
|
+
header "${mod.header}"
|
|
19839
|
+
export *
|
|
19840
|
+
}
|
|
19841
|
+
`
|
|
19842
|
+
);
|
|
19843
|
+
}
|
|
19844
|
+
(0, import_node_fs50.writeFileSync)(mapPath, parts.join("\n"));
|
|
19845
|
+
}
|
|
19846
|
+
return mapPath;
|
|
19847
|
+
}
|
|
19848
|
+
function distributionClangModuleOptions(root, modules) {
|
|
19849
|
+
const map2 = distributionClangModuleMap(root, modules);
|
|
19850
|
+
return map2 === null ? [] : ["-Xcc", `-fmodule-map-file=${map2}`];
|
|
19851
|
+
}
|
|
19793
19852
|
function providedModulesPath(root, modules, excluded) {
|
|
19794
19853
|
if (!excluded || excluded.size === 0) return modules;
|
|
19795
19854
|
const entries = (0, import_node_fs50.readdirSync)(modules).filter((entry) => !excluded.has(entry.replace(/\..*$/, ""))).sort();
|
|
@@ -20122,7 +20181,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
20122
20181
|
import_node_path47.default.join(moduleRoot, "modules"),
|
|
20123
20182
|
args.moduleExcludes
|
|
20124
20183
|
)
|
|
20125
|
-
)}` : prebuilt ? `, "-Isystem", ${JSON.stringify(providedModulesPath(args.root, prebuilt.modules, args.moduleExcludes))}${prebuilt.moduleMaps.map((map2) => `, "-Xcc", ${JSON.stringify(`-fmodule-map-file=${map2}`)}`).join("")}` : "");
|
|
20184
|
+
)}${distributionClangModuleOptions(args.root, import_node_path47.default.join(moduleRoot, "modules")).map((flag) => `, ${JSON.stringify(flag)}`).join("")}` : prebuilt ? `, "-Isystem", ${JSON.stringify(providedModulesPath(args.root, prebuilt.modules, args.moduleExcludes))}${prebuilt.moduleMaps.map((map2) => `, "-Xcc", ${JSON.stringify(`-fmodule-map-file=${map2}`)}`).join("")}` : "");
|
|
20126
20185
|
const nativeFlags = [
|
|
20127
20186
|
...args.nativeFlags?.get(target.name) ?? [],
|
|
20128
20187
|
...args.nativeHeaderFlags ?? []
|
|
@@ -20329,7 +20388,9 @@ function syncSwiftTree(base, files2) {
|
|
|
20329
20388
|
const walk3 = (dir) => {
|
|
20330
20389
|
for (const entry of (0, import_node_fs50.readdirSync)(dir, { withFileTypes: true })) {
|
|
20331
20390
|
const full = import_node_path47.default.join(dir, entry.name);
|
|
20332
|
-
if (dir === base && (entry.name === ".build" || entry.name.startsWith(".peach-modules-") ||
|
|
20391
|
+
if (dir === base && (entry.name === ".build" || entry.name.startsWith(".peach-modules-") || // distribution clang maps are written beside the project and named
|
|
20392
|
+
// from the compiler flags, so a sync must not remove them.
|
|
20393
|
+
entry.name.startsWith(".peach-clang-modules-") || entry.name === SWIFT_LINK_STAMP))
|
|
20333
20394
|
continue;
|
|
20334
20395
|
if (entry.isDirectory()) walk3(full);
|
|
20335
20396
|
else if (!files2.has(full)) (0, import_node_fs50.rmSync)(full, { force: true });
|
|
@@ -20957,6 +21018,12 @@ function stripCCode(source) {
|
|
|
20957
21018
|
}
|
|
20958
21019
|
return code;
|
|
20959
21020
|
}
|
|
21021
|
+
function swiftCTakesReturnAddress(source) {
|
|
21022
|
+
if (!source.includes("__builtin_return_address")) return false;
|
|
21023
|
+
return /\b__builtin_return_address\s*\(/.test(
|
|
21024
|
+
cActiveCode(stripCCode(source), wasmMacroEnvironment)
|
|
21025
|
+
);
|
|
21026
|
+
}
|
|
20960
21027
|
function swiftCMainEntry(file, source, env = emptyMacroEnvironment) {
|
|
20961
21028
|
if (!isSwiftNativeTranslationUnit(file)) return false;
|
|
20962
21029
|
const code = cActiveCode(stripCCode(source), env);
|
|
@@ -21231,6 +21298,11 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
21231
21298
|
clangImportedModules.add(name3);
|
|
21232
21299
|
}
|
|
21233
21300
|
}
|
|
21301
|
+
const submoduleImports = swiftSubmoduleImports(
|
|
21302
|
+
Object.entries(input.files).flatMap(
|
|
21303
|
+
([file, contents]) => file.endsWith(".swift") ? [contents] : []
|
|
21304
|
+
)
|
|
21305
|
+
);
|
|
21234
21306
|
const headerDirectory = import_node_path47.default.join(layout2.root, ".build", "peach-cxx-headers");
|
|
21235
21307
|
const flattenedHeaders = /* @__PURE__ */ new Set();
|
|
21236
21308
|
if ((0, import_node_fs50.existsSync)(headerDirectory)) {
|
|
@@ -21616,7 +21688,8 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
21616
21688
|
);
|
|
21617
21689
|
const moduleContents = originalModuleMap ? input.files[originalModuleMap[1]] : swiftpmModuleMap?.contents ?? packageModuleMap?.[1] ?? swiftObjCModuleMap(
|
|
21618
21690
|
swiftTargetModuleName(target.name),
|
|
21619
|
-
roots2.map((file) => import_node_path47.default.join(layout2.root, file))
|
|
21691
|
+
roots2.map((file) => import_node_path47.default.join(layout2.root, file)),
|
|
21692
|
+
submoduleImports.get(swiftTargetModuleName(target.name))
|
|
21620
21693
|
);
|
|
21621
21694
|
if (moduleContents === void 0)
|
|
21622
21695
|
throw new Error("missing original module map " + modulemap);
|
|
@@ -21941,10 +22014,14 @@ module ${moduleName}.Swift {
|
|
|
21941
22014
|
header ${JSON.stringify(import_node_path47.default.join(headerDirectory, name3 + "-Swift.h"))}
|
|
21942
22015
|
requires objc
|
|
21943
22016
|
}
|
|
21944
|
-
` : swiftObjCModuleMap(
|
|
21945
|
-
|
|
21946
|
-
|
|
21947
|
-
|
|
22017
|
+
` : swiftObjCModuleMap(
|
|
22018
|
+
moduleName,
|
|
22019
|
+
[
|
|
22020
|
+
...(input.nativeTargets?.find((target) => target.name === name3)?.publicHeaders ?? []).map((header) => import_node_path47.default.join(layout2.root, header)),
|
|
22021
|
+
import_node_path47.default.join(headerDirectory, name3 + "-Swift.h")
|
|
22022
|
+
],
|
|
22023
|
+
submoduleImports.get(moduleName)
|
|
22024
|
+
)
|
|
21948
22025
|
);
|
|
21949
22026
|
nativeHeaderFlags.push("-fmodule-map-file=" + modulemap);
|
|
21950
22027
|
}
|
|
@@ -21954,6 +22031,9 @@ module ${moduleName}.Swift {
|
|
|
21954
22031
|
if (!distribution) {
|
|
21955
22032
|
modulePlan.update((0, import_node_fs50.readFileSync)(import_node_path47.default.join(moduleRoot, "Package.swift")));
|
|
21956
22033
|
}
|
|
22034
|
+
modulePlan.update(
|
|
22035
|
+
Object.keys(input.files).filter((file) => file.endsWith(".swift")).sort().join("\n")
|
|
22036
|
+
);
|
|
21957
22037
|
const resourcePlan = (0, import_node_crypto21.createHash)("sha256").update(
|
|
21958
22038
|
JSON.stringify(
|
|
21959
22039
|
resourceTargets.filter((target) => target.resources).map((target) => [
|
|
@@ -22376,6 +22456,10 @@ module ${moduleName}.Swift {
|
|
|
22376
22456
|
import_node_path47.default.join(moduleRoot, "modules"),
|
|
22377
22457
|
moduleExcludes
|
|
22378
22458
|
) : prebuilt ? providedModulesPath(layout2.root, prebuilt.modules, moduleExcludes) : import_node_path47.default.join(layout2.root, ".build", WASM_TRIPLE, "release", "Modules"),
|
|
22459
|
+
...distribution ? distributionClangModuleOptions(
|
|
22460
|
+
layout2.root,
|
|
22461
|
+
import_node_path47.default.join(moduleRoot, "modules")
|
|
22462
|
+
) : [],
|
|
22379
22463
|
...prebuilt?.moduleMaps.flatMap((map2) => [
|
|
22380
22464
|
"-Xcc",
|
|
22381
22465
|
`-fmodule-map-file=${map2}`
|
|
@@ -22920,8 +23004,12 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
22920
23004
|
const linked = frameworkLinkClosure(scratch2, linkedTargets.targets);
|
|
22921
23005
|
const objects = linked.objects;
|
|
22922
23006
|
if (linked.modules.has("UniformTypeIdentifiers")) {
|
|
22923
|
-
const
|
|
22924
|
-
|
|
23007
|
+
const constantsDir = import_node_path47.default.join(scratch2, "uniform-type-constants");
|
|
23008
|
+
const constantsStamp = import_node_path47.default.join(constantsDir, ".complete");
|
|
23009
|
+
const object6 = import_node_path47.default.join(constantsDir, "UniformTypeIdentifiers-NativeConstants.o");
|
|
23010
|
+
if (!(0, import_node_fs50.existsSync)(constantsStamp) || (0, import_node_fs50.readFileSync)(constantsStamp, "utf8") !== args.frameworkKey) {
|
|
23011
|
+
(0, import_node_fs50.rmSync)(constantsDir, { recursive: true, force: true });
|
|
23012
|
+
(0, import_node_fs50.mkdirSync)(constantsDir);
|
|
22925
23013
|
const sdkPaths2 = swiftSdkPaths(args.moduleRoot, args.toolchainBin);
|
|
22926
23014
|
compileUniformTypeConstants({
|
|
22927
23015
|
bin: args.toolchainBin,
|
|
@@ -22929,8 +23017,9 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
22929
23017
|
darwin: sdkPaths2.darwin,
|
|
22930
23018
|
packageRoot: args.moduleRoot,
|
|
22931
23019
|
minimum: darwinRecordsMinimum(),
|
|
22932
|
-
out:
|
|
23020
|
+
out: constantsDir
|
|
22933
23021
|
});
|
|
23022
|
+
(0, import_node_fs50.writeFileSync)(constantsStamp, args.frameworkKey);
|
|
22934
23023
|
}
|
|
22935
23024
|
objects.push(object6);
|
|
22936
23025
|
linked.owners.set(object6, "UniformTypeIdentifiers");
|
|
@@ -23232,7 +23321,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
23232
23321
|
report("reusing verified disk artifact");
|
|
23233
23322
|
return retain(root, previous);
|
|
23234
23323
|
}
|
|
23235
|
-
if (!options.intermediates && process.platform === "darwin" && process.env.TM_SESSION && !windowAdmission() && process.env.CI !== "true" && moduleRoot === sourceSwiftCheckout() && !swiftDistributionAt(moduleRoot)) {
|
|
23324
|
+
if (!options.intermediates && process.platform === "darwin" && !options.intermediates && process.env.TM_SESSION && !windowAdmission() && process.env.CI !== "true" && moduleRoot === sourceSwiftCheckout() && !swiftDistributionAt(moduleRoot)) {
|
|
23236
23325
|
const requestRoot = (0, import_node_fs50.mkdtempSync)(`${root}.builder-request-`);
|
|
23237
23326
|
const output2 = import_node_path47.default.join(requestRoot, "output");
|
|
23238
23327
|
const request = import_node_path47.default.join(requestRoot, "request.json");
|
|
@@ -23615,7 +23704,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
23615
23704
|
options.signal
|
|
23616
23705
|
);
|
|
23617
23706
|
}
|
|
23618
|
-
var import_node_child_process27, import_node_crypto21, import_node_fs50, import_node_os11, import_node_path47, 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, 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;
|
|
23707
|
+
var import_node_child_process27, import_node_crypto21, import_node_fs50, import_node_os11, import_node_path47, 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;
|
|
23619
23708
|
var init_swift_compile = __esm({
|
|
23620
23709
|
"src/swift-compile.ts"() {
|
|
23621
23710
|
"use strict";
|
|
@@ -23750,6 +23839,53 @@ var init_swift_compile = __esm({
|
|
|
23750
23839
|
sdkPaths = /* @__PURE__ */ new Map();
|
|
23751
23840
|
availableModules = /* @__PURE__ */ new Map();
|
|
23752
23841
|
sdkOverlayFrameworks = /* @__PURE__ */ new Map();
|
|
23842
|
+
DISTRIBUTION_CLANG_MODULES = [
|
|
23843
|
+
{
|
|
23844
|
+
name: "EXStructuredHeaders",
|
|
23845
|
+
header: "EXStructuredHeaders/EXStructuredHeadersParser.h",
|
|
23846
|
+
source: `// Copyright \xA9 2021 650 Industries. All rights reserved.
|
|
23847
|
+
|
|
23848
|
+
#import <Foundation/Foundation.h>
|
|
23849
|
+
|
|
23850
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
23851
|
+
|
|
23852
|
+
typedef NS_ENUM(NSInteger, EXStructuredHeadersParserFieldType) {
|
|
23853
|
+
EXStructuredHeadersParserFieldTypeDictionary,
|
|
23854
|
+
EXStructuredHeadersParserFieldTypeList,
|
|
23855
|
+
EXStructuredHeadersParserFieldTypeItem
|
|
23856
|
+
};
|
|
23857
|
+
|
|
23858
|
+
@interface EXStructuredHeadersParser : NSObject
|
|
23859
|
+
|
|
23860
|
+
- (instancetype)initWithRawInput:(NSString *)raw
|
|
23861
|
+
fieldType:(EXStructuredHeadersParserFieldType)fieldType;
|
|
23862
|
+
|
|
23863
|
+
- (instancetype)initWithRawInput:(NSString *)raw
|
|
23864
|
+
fieldType:(EXStructuredHeadersParserFieldType)fieldType
|
|
23865
|
+
ignoringParameters:(BOOL)shouldIgnoreParameters;
|
|
23866
|
+
|
|
23867
|
+
- (nullable id)parseStructuredFieldsWithError:(NSError ** _Nullable)error;
|
|
23868
|
+
|
|
23869
|
+
@end
|
|
23870
|
+
|
|
23871
|
+
NS_ASSUME_NONNULL_END
|
|
23872
|
+
`
|
|
23873
|
+
},
|
|
23874
|
+
{
|
|
23875
|
+
name: "EXUpdatesBSPatch",
|
|
23876
|
+
header: "EXUpdatesBSPatch.h",
|
|
23877
|
+
source: `// Copyright 2015-present 650 Industries. All rights reserved.
|
|
23878
|
+
|
|
23879
|
+
#pragma once
|
|
23880
|
+
|
|
23881
|
+
#import <Foundation/Foundation.h>
|
|
23882
|
+
|
|
23883
|
+
int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
23884
|
+
const char * _Nonnull newFilePath,
|
|
23885
|
+
const char * _Nonnull patchFilePath);
|
|
23886
|
+
`
|
|
23887
|
+
}
|
|
23888
|
+
];
|
|
23753
23889
|
ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")';
|
|
23754
23890
|
SPRITEKIT_PRODUCT = '.product(name: "SpriteKit", package: "sootsim-swift")';
|
|
23755
23891
|
importsSpriteKit = (files2) => Object.entries(files2).some(
|
|
@@ -23781,7 +23917,7 @@ var init_swift_compile = __esm({
|
|
|
23781
23917
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
23782
23918
|
MULTI_MANIFEST_VERSION = 68;
|
|
23783
23919
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
23784
|
-
compilerSourceDigest = true ? "
|
|
23920
|
+
compilerSourceDigest = true ? "4fa3e84f8c3b585bc8e864c92f0682e6f02757d455de1ce784f0d40ba9df875a" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
23785
23921
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
23786
23922
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
23787
23923
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -24306,6 +24442,14 @@ var init_swift_compile = __esm({
|
|
|
24306
24442
|
predefines: /* @__PURE__ */ new Map(),
|
|
24307
24443
|
targetDefined: /* @__PURE__ */ new Set()
|
|
24308
24444
|
};
|
|
24445
|
+
wasmMacroEnvironment = {
|
|
24446
|
+
...emptyMacroEnvironment,
|
|
24447
|
+
defines: /* @__PURE__ */ new Map([
|
|
24448
|
+
["__wasm__", "1"],
|
|
24449
|
+
["__wasm32__", "1"],
|
|
24450
|
+
["__wasi__", "1"]
|
|
24451
|
+
])
|
|
24452
|
+
};
|
|
24309
24453
|
HIDDEN_UNITS = "PeachHiddenUnits";
|
|
24310
24454
|
LIBXML_REFERENCE = /(?:^|\n)[ \t]*#[ \t]*(?:include|import)[ \t]*["<][ \t]*libxml\/|@import[ \t]+libxml2[ \t]*;|(?:^|\n)[ \t]*import[ \t]+libxml2(?![\w.])/;
|
|
24311
24455
|
LIBXML_SOURCE = /\.(?:c|m|mm|cc|cpp|cxx|h|hh|hpp|hxx|swift)$/;
|
|
@@ -27890,7 +28034,7 @@ var init_swift_standin_digest = __esm({
|
|
|
27890
28034
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
27891
28035
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
27892
28036
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
27893
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
28037
|
+
STANDIN_SOURCE_DIGEST = true ? "9adf53d6f1cfece1b7a3e23bad712630278818d71b5b718384cf640144349600" : standinSourceDigest();
|
|
27894
28038
|
}
|
|
27895
28039
|
});
|
|
27896
28040
|
|
|
@@ -28439,6 +28583,13 @@ var init_native_static_libraries = __esm({
|
|
|
28439
28583
|
upstream: "b94213a11b3a2edadfae89f0c57a7f4ab72772c9",
|
|
28440
28584
|
recipe: "a2642115a5eeb04559c9f1daaa4b4cbe4b1c211533b4cc80cb8339a4477af205",
|
|
28441
28585
|
archive: "libsksg.a"
|
|
28586
|
+
},
|
|
28587
|
+
{
|
|
28588
|
+
name: "webgpu_dawn",
|
|
28589
|
+
nativeSha256: "95078993275bccc969b1dfa1ad0934cbacc05ae59e8aa2a6cc46ce93e97d4f69",
|
|
28590
|
+
upstream: "3d786993a7ded64c4ebb4884b9b079db9ad0e580",
|
|
28591
|
+
recipe: "c55468cc976e837ad894133f2231beb7d1ed64633af7b457b8a2610d7df45994",
|
|
28592
|
+
archive: "libwebgpu_dawn.a"
|
|
28442
28593
|
}
|
|
28443
28594
|
];
|
|
28444
28595
|
}
|
|
@@ -28533,6 +28684,72 @@ var init_numbered_lock = __esm({
|
|
|
28533
28684
|
}
|
|
28534
28685
|
});
|
|
28535
28686
|
|
|
28687
|
+
// src/swift-shipped-archives.json
|
|
28688
|
+
var swift_shipped_archives_default;
|
|
28689
|
+
var init_swift_shipped_archives = __esm({
|
|
28690
|
+
"src/swift-shipped-archives.json"() {
|
|
28691
|
+
swift_shipped_archives_default = {
|
|
28692
|
+
AppCheckCore: "a18d4e5aff27ff4b9bce8d6e73e55ccf1d11515311e219aa4473319cdff3187b",
|
|
28693
|
+
AppLovinSDK: "c00f052c4b15766a6a2734e2b3685234e6bd28dbc47fbe7cbc3edbf56f701d5c",
|
|
28694
|
+
AppsFlyerLib: "13bae495e63e22579dd9525a1c9e88d8eedc78b4586979b7e2d492cfd3efbe1f",
|
|
28695
|
+
FBAEMKit: "ceaf685683c6a23ae4893150d0d770aeeaec34811ac8c146b3aa351beade5fa0",
|
|
28696
|
+
FBAudienceNetwork: "4d84bf1e404a83852a93af2ae73e22e45bb2b11e0a9a445c3b461173a5d6aec3",
|
|
28697
|
+
FBLPromises: "3544fb457e7f60c69740cdd26617a75bdd613943e948becca643022c7edd76c0",
|
|
28698
|
+
FBSDKCoreKit: "1577edd62ec0c172928befed3b309dc59ae8915d2aaad091460d9d1be5ddc13d",
|
|
28699
|
+
FBSDKCoreKit_Basics: "c780833f204f9ec6eab70a3758a45c5c78bfb6f4e590289ccf395497f204cac1",
|
|
28700
|
+
FirebaseAnalytics: "e3253a494375c5174d20cb81925e20afa1ff6b1419125cb608d39b092b53ff2a",
|
|
28701
|
+
FirebaseAppCheck: "af82d72727d55d14f65eee96845d4d9495e4e603b4673709d6f3448b9595cc63",
|
|
28702
|
+
FirebaseAppCheckInterop: "7ffd54e6fe187bf8cd714e3d863e0095f7cbbb0fb802adb87a40c552de7cffcc",
|
|
28703
|
+
FirebaseAuth: "fcde09db8d45ffba67802e81c17b8046db6b56568226ace3fca898983b08c968",
|
|
28704
|
+
FirebaseAuthInterop: "e8e6f4fb42b3fa76c2bade7a522ab0f224558d27d2321175c791d307541787a8",
|
|
28705
|
+
FirebaseCore: "30e3505c715e17682c1dc20bb26ba475e99e6981a9a0dba3cf9352eea632fc1d",
|
|
28706
|
+
FirebaseCoreExtension: "e37ce2abcd4c218ab5426da78cbe7ab41f79ee7eba1d02dd4b0cde952ed2c4a0",
|
|
28707
|
+
FirebaseCoreInternal: "72a15c0c63585faf93e9ffa91e8a8c1c50b24749405804ffae19a29ec05b07ab",
|
|
28708
|
+
FirebaseCrashlytics: "e03c71913efd97678b895abb1e968c83e58b3fbd7955a81ec6e6581b95db16e3",
|
|
28709
|
+
FirebaseFirestore: "f7a1bb7fc4a2fb09298b514114d6aaca9a4f00fd8868667524a05bc4563bf1fd",
|
|
28710
|
+
FirebaseFirestoreInternal: "d9595a1784beaf5cd4a8e0dda0f4364ddfa6b536ad60f82746d81d14dce037a3",
|
|
28711
|
+
FirebaseInstallations: "141e313325bab001f2dbb79dc8a433f884f4c4a12a5feb665e6958098d637f7b",
|
|
28712
|
+
FirebaseRemoteConfig: "e0ae6d626a423d535bc67216f9f0cd66f98f1c0fb4b5bf88074d4496733e2db1",
|
|
28713
|
+
FirebaseRemoteConfigInterop: "794f599eb4232058715b606fa671639c8cc5d821655a0f739651d17c5ef65c37",
|
|
28714
|
+
FirebaseSessions: "1781d72e47dac0fc7a532412641021730bd5b659135633cd9ef7b97ccd31b0ce",
|
|
28715
|
+
FirebaseSharedSwift: "8d63b09a517733ef3a58390bf1e8cf054f058bdd618bb4f19a1f4b5a0b4f09e5",
|
|
28716
|
+
FirebaseStorage: "636b33180dd5ad60b4878357691fe6472cf3bd57ec691e9d661c5444f523df66",
|
|
28717
|
+
GTMSessionFetcher: "f58dc2bd9db39defd73f0f67e7a11893a0c6e6f0ba45cd83cf420b2b3c15f1bd",
|
|
28718
|
+
GoogleAdsOnDeviceConversion: "31a5a1f5204f4844a480d3889b6ebe2e69473ef32b868935c51812c0483cb08b",
|
|
28719
|
+
GoogleAppMeasurement: "5741e6334392e0345f1b5896111ffef4d5a78859970f5e197fa0b7d881165305",
|
|
28720
|
+
GoogleAppMeasurementIdentitySupport: "b70cb033eeb002ed1c5a8140953ccb3be0221ca754c05fe450ed9c9c6547f274",
|
|
28721
|
+
GoogleDataTransport: "7d08050419e0906f13039cc4d2dd69be075234c0bf5bbb34df9dd4891e48831d",
|
|
28722
|
+
GoogleMobileAds: "f2c09c60ee331ce029f563304ad73a481d57ace0d4bc11ce33a2bf59497c59bf",
|
|
28723
|
+
GoogleUtilities: "37a9d3d3810dad763a8a79bd4c7cc4c37b386240725aca07f45dba1826676c8c",
|
|
28724
|
+
Intercom: "fc8251f24b305b91f83304d4dffaf1a90c424a7bc37be8b595dd1fc5cff566ea",
|
|
28725
|
+
Promises: "6d8f1a4b3d561d67adfc2026834779b05685d1cdacea6e83c70d0641c39f24de",
|
|
28726
|
+
RecaptchaInterop: "cf5cc62ebc237b34d5267c1190d18f33b424dbc7f81713f127108d0ad8a592cf",
|
|
28727
|
+
RiveRuntime: "72b6ff5c5a1d153c9cdbea9a917c09be557cfcb1fafa02853fa06b0268551710",
|
|
28728
|
+
absl: "fff0388cf074c69a2da4bc197a005da0b8e5c23ebdcfa383600c540a342f9df1",
|
|
28729
|
+
grpc: "918737c9f8f93e14127b3894e31c7a0522475f2247b74f87d8166dff3a6bafb0",
|
|
28730
|
+
grpcpp: "b83f85e0256cf06df00cf0ed728b5c0d68373ca401742877935771447450b90a",
|
|
28731
|
+
leveldb: "5521a6e6e4cd01b2e31b099d4341f1bccae7e8ba43de648b028928573daf8bb4",
|
|
28732
|
+
nanopb: "a7fafe2e4e16d99de4c58f72e22dcc53221885aa6d678d1270123e4b01badfa3",
|
|
28733
|
+
openssl_grpc: "b2aaede82457cdd15915762a4f57b38e28ba0f47b9b48556a7e0c46881973096"
|
|
28734
|
+
};
|
|
28735
|
+
}
|
|
28736
|
+
});
|
|
28737
|
+
|
|
28738
|
+
// src/swift-shipped-binaries.ts
|
|
28739
|
+
function shippedBinaryDiffers(target, checksum) {
|
|
28740
|
+
const shipped = SHIPPED_ARCHIVES.get(target);
|
|
28741
|
+
return shipped !== void 0 && checksum !== null && checksum !== shipped;
|
|
28742
|
+
}
|
|
28743
|
+
var SHIPPED_ARCHIVES;
|
|
28744
|
+
var init_swift_shipped_binaries = __esm({
|
|
28745
|
+
"src/swift-shipped-binaries.ts"() {
|
|
28746
|
+
"use strict";
|
|
28747
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
28748
|
+
init_swift_shipped_archives();
|
|
28749
|
+
SHIPPED_ARCHIVES = new Map(Object.entries(swift_shipped_archives_default));
|
|
28750
|
+
}
|
|
28751
|
+
});
|
|
28752
|
+
|
|
28536
28753
|
// src/swift-packages.ts
|
|
28537
28754
|
function remoteSwiftCheckouts(root) {
|
|
28538
28755
|
const prepared = preparedSwiftCheckouts(root);
|
|
@@ -28541,16 +28758,22 @@ function remoteSwiftCheckouts(root) {
|
|
|
28541
28758
|
import_node_fs68.default.mkdirSync(cacheDir(), { recursive: true });
|
|
28542
28759
|
return import_node_path66.default.join(import_node_fs68.default.realpathSync(cacheDir()), "swift-packages", key2, "checkouts");
|
|
28543
28760
|
}
|
|
28544
|
-
function
|
|
28761
|
+
function unlowerableSources(files2, target) {
|
|
28762
|
+
if (target.declaresWasiNativeSettings) return [];
|
|
28763
|
+
return [
|
|
28764
|
+
...files2.filter((file) => UNSUPPORTED_NATIVE.test(file)),
|
|
28765
|
+
...files2.filter(isSwiftNativeTranslationUnit).filter((file) => swiftCTakesReturnAddress(import_node_fs68.default.readFileSync(file, "utf8")))
|
|
28766
|
+
];
|
|
28767
|
+
}
|
|
28768
|
+
function unloweredSources(files2, target) {
|
|
28545
28769
|
if (target.type !== "regular") return null;
|
|
28546
|
-
if (target.declaresWasiNativeSettings) return null;
|
|
28547
|
-
const assembly = files2.filter((file) => UNSUPPORTED_NATIVE.test(file));
|
|
28548
|
-
if (assembly.length === 0) return null;
|
|
28549
28770
|
if (!files2.some(isSwiftNativeTranslationUnit)) return null;
|
|
28771
|
+
const unlowered = unlowerableSources(files2, target);
|
|
28772
|
+
if (unlowered.length === 0) return null;
|
|
28550
28773
|
const headers = import_node_path66.default.resolve(target.dir, target.publicHeadersPath);
|
|
28551
28774
|
if (!files2.some((file) => file.startsWith(`${headers}${import_node_path66.default.sep}`) && file.endsWith(".h")))
|
|
28552
28775
|
return null;
|
|
28553
|
-
return
|
|
28776
|
+
return unlowered;
|
|
28554
28777
|
}
|
|
28555
28778
|
function resolvedPins(data) {
|
|
28556
28779
|
if (!data || typeof data !== "object") return null;
|
|
@@ -28846,9 +29069,9 @@ function resolveSwiftPackages(options) {
|
|
|
28846
29069
|
if (target.type === "macro") return preservePackage(pkg, [name3], "host");
|
|
28847
29070
|
const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
|
|
28848
29071
|
const gap = options.binaryGaps?.get(name3);
|
|
28849
|
-
const
|
|
29072
|
+
const unlowerable = unlowerableSources(files2, target);
|
|
28850
29073
|
const placeholder = placeholderPackage(pkg);
|
|
28851
|
-
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` :
|
|
29074
|
+
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_path66.default.relative(pkg.manifest.dir, file)).join(", ")}${gap ? `; ${gap}` : ""}` : null;
|
|
28852
29075
|
const reasons = target.dependencies.map((dependency) => {
|
|
28853
29076
|
if (dependency.kind === "target") return resolveTarget(pkg, dependency.name);
|
|
28854
29077
|
const nested = resolveDependencyProduct(pkg, dependency);
|
|
@@ -28927,7 +29150,7 @@ function resolveSwiftPackages(options) {
|
|
|
28927
29150
|
(file) => file.endsWith(".swift") && import_node_fs68.default.readFileSync(file, "utf8").trim() === ""
|
|
28928
29151
|
))
|
|
28929
29152
|
return false;
|
|
28930
|
-
if (
|
|
29153
|
+
if (unloweredSources(files2, target)) return false;
|
|
28931
29154
|
claimed.add(key2);
|
|
28932
29155
|
providedTargets.delete(name3);
|
|
28933
29156
|
for (const dependency of target.dependencies) {
|
|
@@ -28941,6 +29164,13 @@ function resolveSwiftPackages(options) {
|
|
|
28941
29164
|
};
|
|
28942
29165
|
const claimProduct = (pkg, product) => {
|
|
28943
29166
|
const roots = pkg.manifest.products.get(product)?.targets ?? [];
|
|
29167
|
+
for (const root of roots) {
|
|
29168
|
+
const target = pkg.manifest.targets.get(root);
|
|
29169
|
+
if (target?.type === "binary" && !options.standinTargets?.has(root) && shippedBinaryDiffers(root, target.checksum)) {
|
|
29170
|
+
providedTargets.delete(root);
|
|
29171
|
+
providedProducts.delete(product);
|
|
29172
|
+
}
|
|
29173
|
+
}
|
|
28944
29174
|
if (roots.map((name3) => claimTarget(pkg, name3)).some(Boolean))
|
|
28945
29175
|
providedProducts.delete(product);
|
|
28946
29176
|
};
|
|
@@ -28968,7 +29198,7 @@ function resolveSwiftPackages(options) {
|
|
|
28968
29198
|
if (target.type === "executable") continue;
|
|
28969
29199
|
const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
|
|
28970
29200
|
const objc = target.type === "regular" && files2.some((file) => /\.(m|mm)$/.test(file));
|
|
28971
|
-
const
|
|
29201
|
+
const unlowered = unloweredSources(files2, target);
|
|
28972
29202
|
const gap = placeholderPackage(pkg);
|
|
28973
29203
|
const sources = files2.filter((file) => file.endsWith(".swift"));
|
|
28974
29204
|
const release = (setting) => setting.configuration !== "debug";
|
|
@@ -28995,7 +29225,7 @@ function resolveSwiftPackages(options) {
|
|
|
28995
29225
|
]
|
|
28996
29226
|
}
|
|
28997
29227
|
});
|
|
28998
|
-
else if (target.type === "binary" || objc ||
|
|
29228
|
+
else if (target.type === "binary" || objc || unlowered)
|
|
28999
29229
|
result.binaries.push({
|
|
29000
29230
|
target: name3,
|
|
29001
29231
|
source: pkg.source,
|
|
@@ -29009,8 +29239,8 @@ function resolveSwiftPackages(options) {
|
|
|
29009
29239
|
import_node_path66.default.join(target.dir, target.publicHeadersPath)
|
|
29010
29240
|
)
|
|
29011
29241
|
},
|
|
29012
|
-
...
|
|
29013
|
-
|
|
29242
|
+
...unlowered ? {
|
|
29243
|
+
unloweredSources: unlowered.map(
|
|
29014
29244
|
(file) => import_node_path66.default.relative(pkg.manifest.dir, file)
|
|
29015
29245
|
)
|
|
29016
29246
|
} : {}
|
|
@@ -29231,8 +29461,10 @@ var init_swift_packages = __esm({
|
|
|
29231
29461
|
init_native_git();
|
|
29232
29462
|
init_numbered_lock();
|
|
29233
29463
|
init_prepared_xcode_phases();
|
|
29464
|
+
init_swift_compile();
|
|
29234
29465
|
init_swift_package();
|
|
29235
29466
|
init_swift_package_manifest();
|
|
29467
|
+
init_swift_shipped_binaries();
|
|
29236
29468
|
swiftBinaryOnDisk = (binary2) => binary2.url !== null || import_node_fs68.default.existsSync(binary2.dir);
|
|
29237
29469
|
SWIFT_PLACEHOLDER_PACKAGES = /* @__PURE__ */ new Map();
|
|
29238
29470
|
placeholderPackage = (pkg) => SWIFT_PLACEHOLDER_PACKAGES.get(swiftPackageIdentity(pkg.manifest.dir));
|
|
@@ -29810,6 +30042,244 @@ var init_swift_cxx_standin = __esm({
|
|
|
29810
30042
|
}
|
|
29811
30043
|
});
|
|
29812
30044
|
|
|
30045
|
+
// src/swift-standin-builtin-behavior.ts
|
|
30046
|
+
function withBuiltinStandinBehavior(behavior) {
|
|
30047
|
+
const merged = { ...behavior };
|
|
30048
|
+
for (const [module2, members2] of Object.entries(BUILTIN_STANDIN_BEHAVIOR))
|
|
30049
|
+
merged[module2] = {
|
|
30050
|
+
...Object.fromEntries(
|
|
30051
|
+
Object.entries(members2).map(([path74, entry]) => [
|
|
30052
|
+
path74,
|
|
30053
|
+
{ ...entry, builtin: true }
|
|
30054
|
+
])
|
|
30055
|
+
),
|
|
30056
|
+
...behavior[module2]
|
|
30057
|
+
};
|
|
30058
|
+
return merged;
|
|
30059
|
+
}
|
|
30060
|
+
var BUILTIN_STANDIN_BEHAVIOR;
|
|
30061
|
+
var init_swift_standin_builtin_behavior = __esm({
|
|
30062
|
+
"src/swift-standin-builtin-behavior.ts"() {
|
|
30063
|
+
"use strict";
|
|
30064
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
30065
|
+
BUILTIN_STANDIN_BEHAVIOR = {
|
|
30066
|
+
GoogleCast: {
|
|
30067
|
+
kGCKCastDeviceCategory: { body: 'return "com.google.cast.CastDevice"' },
|
|
30068
|
+
kGCKDefaultMediaReceiverApplicationID: { body: 'return "CC1AD845"' },
|
|
30069
|
+
kGCKErrorDomain: { body: 'return "com.google.cast.GCKError"' },
|
|
30070
|
+
"GCKError.init(code:)": {
|
|
30071
|
+
body: "super.init(domain: kGCKErrorDomain, code: code.rawValue, userInfo: nil)"
|
|
30072
|
+
},
|
|
30073
|
+
"GCKDiscoveryCriteria.applicationIDs": { stored: "" },
|
|
30074
|
+
"GCKDiscoveryCriteria.namespaces": { stored: "" },
|
|
30075
|
+
"GCKDiscoveryCriteria.hasApplicationIDs": { body: "return applicationIDs != nil" },
|
|
30076
|
+
"GCKDiscoveryCriteria.hasNamespaces": { body: "return namespaces != nil" },
|
|
30077
|
+
"GCKDiscoveryCriteria.init(applicationID:)": {
|
|
30078
|
+
body: "super.init(); applicationIDs = NSOrderedSet(object: applicationID)"
|
|
30079
|
+
},
|
|
30080
|
+
"GCKDiscoveryCriteria.init(namespaces:)": {
|
|
30081
|
+
body: "super.init(); self.namespaces = namespaces"
|
|
30082
|
+
},
|
|
30083
|
+
GCKLaunchOptions: {
|
|
30084
|
+
members: `
|
|
30085
|
+
private static var peachDeviceLanguageCode: String? { Locale.preferredLanguages.first }
|
|
30086
|
+
`
|
|
30087
|
+
},
|
|
30088
|
+
"GCKLaunchOptions.languageCode": { stored: "" },
|
|
30089
|
+
"GCKLaunchOptions.relaunchIfRunning": { stored: "false" },
|
|
30090
|
+
"GCKLaunchOptions.androidReceiverCompatible": { stored: "false" },
|
|
30091
|
+
"GCKLaunchOptions.init()": {
|
|
30092
|
+
body: "super.init(); languageCode = GCKLaunchOptions.peachDeviceLanguageCode"
|
|
30093
|
+
},
|
|
30094
|
+
"GCKLaunchOptions.init(relaunchIfRunning:)": {
|
|
30095
|
+
body: `
|
|
30096
|
+
super.init()
|
|
30097
|
+
languageCode = GCKLaunchOptions.peachDeviceLanguageCode
|
|
30098
|
+
self.relaunchIfRunning = relaunchIfRunning
|
|
30099
|
+
`
|
|
30100
|
+
},
|
|
30101
|
+
"GCKLaunchOptions.init(languageCode:relaunchIfRunning:)": {
|
|
30102
|
+
body: `
|
|
30103
|
+
super.init()
|
|
30104
|
+
self.languageCode = languageCode
|
|
30105
|
+
self.relaunchIfRunning = relaunchIfRunning
|
|
30106
|
+
`
|
|
30107
|
+
},
|
|
30108
|
+
"GCKLaunchOptions.init(relaunchIfRunning:androidReceiverCompatible:)": {
|
|
30109
|
+
body: `
|
|
30110
|
+
super.init()
|
|
30111
|
+
languageCode = GCKLaunchOptions.peachDeviceLanguageCode
|
|
30112
|
+
self.relaunchIfRunning = relaunchIfRunning
|
|
30113
|
+
self.androidReceiverCompatible = androidReceiverCompatible
|
|
30114
|
+
`
|
|
30115
|
+
},
|
|
30116
|
+
"GCKLaunchOptions.init(relaunchIfRunning:languageCode:androidReceiverCompatible:)": {
|
|
30117
|
+
body: `
|
|
30118
|
+
super.init()
|
|
30119
|
+
self.languageCode = languageCode
|
|
30120
|
+
self.relaunchIfRunning = relaunchIfRunning
|
|
30121
|
+
self.androidReceiverCompatible = androidReceiverCompatible
|
|
30122
|
+
`
|
|
30123
|
+
},
|
|
30124
|
+
GCKCastOptions: {
|
|
30125
|
+
members: "fileprivate var peachDiscoveryCriteria: GCKDiscoveryCriteria?"
|
|
30126
|
+
},
|
|
30127
|
+
"GCKCastOptions.init(discoveryCriteria:)": {
|
|
30128
|
+
body: "super.init(); peachDiscoveryCriteria = discoveryCriteria"
|
|
30129
|
+
},
|
|
30130
|
+
"GCKCastOptions.init(receiverApplicationID:)": {
|
|
30131
|
+
body: "super.init(); peachDiscoveryCriteria = GCKDiscoveryCriteria(applicationID: applicationID)"
|
|
30132
|
+
},
|
|
30133
|
+
"GCKCastOptions.init(supportedNamespaces:)": {
|
|
30134
|
+
body: "super.init(); peachDiscoveryCriteria = GCKDiscoveryCriteria(namespaces: Set(namespaces))"
|
|
30135
|
+
},
|
|
30136
|
+
"GCKCastOptions.physicalVolumeButtonsWillControlDeviceVolume": { stored: "false" },
|
|
30137
|
+
"GCKCastOptions.disableDiscoveryAutostart": { stored: "false" },
|
|
30138
|
+
"GCKCastOptions.disableAnalyticsLogging": { stored: "false" },
|
|
30139
|
+
"GCKCastOptions.launchOptions": { stored: "" },
|
|
30140
|
+
"GCKCastOptions.sharedContainerIdentifier": { stored: "" },
|
|
30141
|
+
"GCKCastOptions.suspendSessionsWhenBackgrounded": { stored: "true" },
|
|
30142
|
+
"GCKCastOptions.stopReceiverApplicationWhenEndingSession": { stored: "false" },
|
|
30143
|
+
"GCKCastOptions.startDiscoveryAfterFirstTapOnCastButton": { stored: "true" },
|
|
30144
|
+
GCKCastContext: {
|
|
30145
|
+
members: `
|
|
30146
|
+
nonisolated(unsafe) fileprivate static var peachShared: GCKCastContext?
|
|
30147
|
+
fileprivate let peachDiscoveryManager = GCKDiscoveryManager()
|
|
30148
|
+
fileprivate let peachSessionManager = GCKSessionManager()
|
|
30149
|
+
fileprivate var peachCredentialsData: GCKCredentialsData?
|
|
30150
|
+
fileprivate static func peachInitialize(_ options: GCKCastOptions) {
|
|
30151
|
+
let context = GCKCastContext()
|
|
30152
|
+
peachShared = context
|
|
30153
|
+
if !options.disableDiscoveryAutostart && !options.startDiscoveryAfterFirstTapOnCastButton {
|
|
30154
|
+
context.peachDiscoveryManager.startDiscovery()
|
|
30155
|
+
}
|
|
30156
|
+
}
|
|
30157
|
+
`
|
|
30158
|
+
},
|
|
30159
|
+
"GCKCastContext.imageCache": { stored: "" },
|
|
30160
|
+
"GCKCastContext.imagePicker": { stored: "" },
|
|
30161
|
+
"GCKCastContext.useDefaultExpandedMediaControls": { stored: "false" },
|
|
30162
|
+
"GCKCastContext.castState": { body: "return .noDevicesAvailable" },
|
|
30163
|
+
"GCKCastContext.discoveryManager": { body: "return peachDiscoveryManager" },
|
|
30164
|
+
"GCKCastContext.sessionManager": { body: "return peachSessionManager" },
|
|
30165
|
+
"GCKCastContext.setLaunch(_:)": { body: "peachCredentialsData = credentialsData" },
|
|
30166
|
+
"GCKCastContext.isSharedInstanceInitialized()": {
|
|
30167
|
+
body: "return peachShared != nil"
|
|
30168
|
+
},
|
|
30169
|
+
"GCKCastContext.sharedInstance()": {
|
|
30170
|
+
body: `
|
|
30171
|
+
guard let shared = peachShared else {
|
|
30172
|
+
fatalError("GCKCastContext.sharedInstance() was called before the shared instance was initialized")
|
|
30173
|
+
}
|
|
30174
|
+
return unsafeDowncast(shared, to: Self.self)
|
|
30175
|
+
`
|
|
30176
|
+
},
|
|
30177
|
+
"GCKCastContext.setSharedInstanceWith(_:)": {
|
|
30178
|
+
body: `
|
|
30179
|
+
if peachShared != nil {
|
|
30180
|
+
fatalError("GCKCastContext.setSharedInstanceWith(_:) was called when the shared instance was already initialized")
|
|
30181
|
+
}
|
|
30182
|
+
peachInitialize(options)
|
|
30183
|
+
`
|
|
30184
|
+
},
|
|
30185
|
+
"GCKCastContext.setSharedInstanceWith(_:error:)": {
|
|
30186
|
+
body: `
|
|
30187
|
+
if peachShared != nil {
|
|
30188
|
+
error?.pointee = GCKError(code: .alreadyInitialized)
|
|
30189
|
+
return false
|
|
30190
|
+
}
|
|
30191
|
+
peachInitialize(options)
|
|
30192
|
+
return true
|
|
30193
|
+
`
|
|
30194
|
+
},
|
|
30195
|
+
GCKDiscoveryManager: {
|
|
30196
|
+
members: `
|
|
30197
|
+
private final class PeachListener {
|
|
30198
|
+
weak var listener: (any GCKDiscoveryManagerListener)?
|
|
30199
|
+
init(_ listener: any GCKDiscoveryManagerListener) { self.listener = listener }
|
|
30200
|
+
}
|
|
30201
|
+
private var peachListeners: [PeachListener] = []
|
|
30202
|
+
private var peachState: GCKDiscoveryState = .stopped
|
|
30203
|
+
`
|
|
30204
|
+
},
|
|
30205
|
+
"GCKDiscoveryManager.discoveryState": { body: "return peachState" },
|
|
30206
|
+
"GCKDiscoveryManager.hasDiscoveredDevices": { body: "return false" },
|
|
30207
|
+
"GCKDiscoveryManager.passiveScan": { stored: "false" },
|
|
30208
|
+
"GCKDiscoveryManager.discoveryActive": { body: "return peachState == .running" },
|
|
30209
|
+
"GCKDiscoveryManager.deviceCount": { body: "return 0" },
|
|
30210
|
+
"GCKDiscoveryManager.add(_:)": {
|
|
30211
|
+
body: `
|
|
30212
|
+
peachListeners.removeAll { $0.listener == nil }
|
|
30213
|
+
if !peachListeners.contains(where: { $0.listener === listener }) {
|
|
30214
|
+
peachListeners.append(PeachListener(listener))
|
|
30215
|
+
}
|
|
30216
|
+
`
|
|
30217
|
+
},
|
|
30218
|
+
"GCKDiscoveryManager.remove(_:)": {
|
|
30219
|
+
body: "peachListeners.removeAll { $0.listener == nil || $0.listener === listener }"
|
|
30220
|
+
},
|
|
30221
|
+
"GCKDiscoveryManager.startDiscovery()": {
|
|
30222
|
+
body: `
|
|
30223
|
+
if peachState == .running { return }
|
|
30224
|
+
peachState = .running
|
|
30225
|
+
for entry in peachListeners {
|
|
30226
|
+
entry.listener?.didStartDiscovery(forDeviceCategory: kGCKCastDeviceCategory)
|
|
30227
|
+
}
|
|
30228
|
+
`
|
|
30229
|
+
},
|
|
30230
|
+
"GCKDiscoveryManager.stopDiscovery()": { body: "peachState = .stopped" },
|
|
30231
|
+
"GCKDiscoveryManager.isDiscoveryActive(forDeviceCategory:)": {
|
|
30232
|
+
body: "return peachState == .running && deviceCategory == kGCKCastDeviceCategory"
|
|
30233
|
+
},
|
|
30234
|
+
"GCKDiscoveryManager.device(at:)": {
|
|
30235
|
+
body: 'fatalError("GCKDiscoveryManager.device(at:) index \\(index) is out of range: no Cast device is discovered")'
|
|
30236
|
+
},
|
|
30237
|
+
"GCKDiscoveryManager.device(withUniqueID:)": { body: "return nil" },
|
|
30238
|
+
"GCKDiscoveryManager.cancelFindOperation()": { body: "" },
|
|
30239
|
+
GCKSessionManager: {
|
|
30240
|
+
members: `
|
|
30241
|
+
private var peachListeners: [any GCKSessionManagerListener] = []
|
|
30242
|
+
private var peachDefaultSessionOptions: [String: [String: any NSCoding & NSObjectProtocol]] = [:]
|
|
30243
|
+
`
|
|
30244
|
+
},
|
|
30245
|
+
"GCKSessionManager.currentSession": { body: "return nil" },
|
|
30246
|
+
"GCKSessionManager.currentCastSession": { body: "return nil" },
|
|
30247
|
+
"GCKSessionManager.connectionState": { body: "return .disconnected" },
|
|
30248
|
+
"GCKSessionManager.hasConnectedSession()": { body: "return false" },
|
|
30249
|
+
"GCKSessionManager.hasConnectedCastSession()": { body: "return false" },
|
|
30250
|
+
"GCKSessionManager.startSession(with:)": { body: "return false" },
|
|
30251
|
+
"GCKSessionManager.startSession(with:sessionOptions:)": { body: "return false" },
|
|
30252
|
+
"GCKSessionManager.suspendSession(with:)": { body: "return false" },
|
|
30253
|
+
"GCKSessionManager.endSession()": { body: "return false" },
|
|
30254
|
+
"GCKSessionManager.endSessionAndStopCasting(_:)": { body: "return false" },
|
|
30255
|
+
"GCKSessionManager.setDefaultSessionOptions(_:forDeviceCategory:)": {
|
|
30256
|
+
body: "peachDefaultSessionOptions[category] = sessionOptions"
|
|
30257
|
+
},
|
|
30258
|
+
"GCKSessionManager.defaultSessionOptions(forDeviceCategory:)": {
|
|
30259
|
+
body: "return peachDefaultSessionOptions[category]"
|
|
30260
|
+
},
|
|
30261
|
+
"GCKSessionManager.add(_:)": {
|
|
30262
|
+
body: `
|
|
30263
|
+
if !peachListeners.contains(where: { $0 === listener }) { peachListeners.append(listener) }
|
|
30264
|
+
`
|
|
30265
|
+
},
|
|
30266
|
+
"GCKSessionManager.remove(_:)": {
|
|
30267
|
+
body: "peachListeners.removeAll { $0 === listener }"
|
|
30268
|
+
},
|
|
30269
|
+
GCKLogger: {
|
|
30270
|
+
members: "nonisolated(unsafe) fileprivate static let peachShared = GCKLogger()"
|
|
30271
|
+
},
|
|
30272
|
+
"GCKLogger.sharedInstance()": { body: "return peachShared" },
|
|
30273
|
+
"GCKLogger.delegate": { stored: "" },
|
|
30274
|
+
"GCKLogger.filter": { stored: "" },
|
|
30275
|
+
"GCKLogger.loggingEnabled": { stored: "true" },
|
|
30276
|
+
"GCKLogger.fileLoggingEnabled": { stored: "false" },
|
|
30277
|
+
"GCKLogger.consoleLoggingEnabled": { stored: "false" }
|
|
30278
|
+
}
|
|
30279
|
+
};
|
|
30280
|
+
}
|
|
30281
|
+
});
|
|
30282
|
+
|
|
29813
30283
|
// src/swift-standins.ts
|
|
29814
30284
|
function exec(file, args, cwd) {
|
|
29815
30285
|
return (0, import_node_child_process37.execFileSync)(file, args, {
|
|
@@ -30593,7 +31063,7 @@ function interfaceEnumValues(graphs, interfaceText) {
|
|
|
30593
31063
|
const declarations = [
|
|
30594
31064
|
...interfaceText.matchAll(
|
|
30595
31065
|
new RegExp(
|
|
30596
|
-
`^([ \\t]*)(?:@[\\w.]+(?:\\([^)]*\\))?\\s+)*(?:nonisolated\\s+)?(?:public|open)\\s+enum\\s+${name3}\\s*:\\s*(?:Swift\\.)?U?Int(?:8|16|32|64)
|
|
31066
|
+
`^([ \\t]*)(?:@[\\w.]+(?:\\([^)]*\\))?\\s+)*(?:nonisolated\\s+)?(?:public|open)\\s+enum\\s+${name3}\\s*:\\s*(?:Swift\\.)?(?:U?Int(?:8|16|32|64)?|IntegerLiteralType)\\b[^{]*\\{[ \\t]*$`,
|
|
30597
31067
|
"gm"
|
|
30598
31068
|
)
|
|
30599
31069
|
)
|
|
@@ -30692,9 +31162,26 @@ function mixedStandin(surface, binary2, toolchain, work, behavior, frameworkDirs
|
|
|
30692
31162
|
view.protocolProperties ?? /* @__PURE__ */ new Map(),
|
|
30693
31163
|
null,
|
|
30694
31164
|
view.inheritedConformances,
|
|
30695
|
-
interfaceProjections(view.graphs, interfaceText)
|
|
31165
|
+
interfaceProjections(view.graphs, interfaceText),
|
|
31166
|
+
[],
|
|
31167
|
+
externalConformances(surface.module, interfaceText)
|
|
30696
31168
|
);
|
|
30697
31169
|
}
|
|
31170
|
+
function externalConformances(module2, interfaceText) {
|
|
31171
|
+
const lines = /* @__PURE__ */ new Set();
|
|
31172
|
+
for (const match of interfaceText.matchAll(
|
|
31173
|
+
/^(?:@\w+\s+)*extension\s+([\w.]+)\s*:\s*([^{\n]+?)\s*\{/gm
|
|
31174
|
+
)) {
|
|
31175
|
+
const [, extended, conformances] = match;
|
|
31176
|
+
if (extended.startsWith(`${module2}.`) || /\bwhere\b/.test(conformances)) continue;
|
|
31177
|
+
const own = conformances.split(",").map((name3) => name3.trim()).filter((name3) => name3.startsWith(`${module2}.`));
|
|
31178
|
+
const type = extended.startsWith("Swift.") ? extended : extended.split(".").slice(1).join(".");
|
|
31179
|
+
if (own.length > 0 && type) lines.add(`extension ${type} : ${own.join(", ")} {}
|
|
31180
|
+
`);
|
|
31181
|
+
}
|
|
31182
|
+
return lines.size > 0 ? `
|
|
31183
|
+
${[...lines].join("")}` : "";
|
|
31184
|
+
}
|
|
30698
31185
|
function wasmFlags(toolchain, imports2) {
|
|
30699
31186
|
const { sysroot, darwin, resources, cFlags } = swiftSdkPaths(
|
|
30700
31187
|
toolchain.moduleRoot,
|
|
@@ -30787,12 +31274,15 @@ function objcStandin(surface, binary2, toolchain, work, behavior, frameworks, si
|
|
|
30787
31274
|
dependencyGraphs
|
|
30788
31275
|
);
|
|
30789
31276
|
}
|
|
30790
|
-
function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, requiredInits2,
|
|
31277
|
+
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 = "") {
|
|
30791
31278
|
const paths = new Set(
|
|
30792
31279
|
graphs.flatMap(
|
|
30793
31280
|
(graph) => graph.symbols.map((symbol2) => symbol2.pathComponents.join("."))
|
|
30794
31281
|
)
|
|
30795
31282
|
);
|
|
31283
|
+
const behavior = new Map(
|
|
31284
|
+
[...declared].filter(([name3, entry]) => !entry.builtin || paths.has(name3))
|
|
31285
|
+
);
|
|
30796
31286
|
const swiftPaths = new Set(
|
|
30797
31287
|
requireSwift ? graphs.flatMap(
|
|
30798
31288
|
(graph) => graph.symbols.filter(isSwiftDeclaration).map((symbol2) => symbol2.pathComponents.join("."))
|
|
@@ -30825,6 +31315,8 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
30825
31315
|
const plain = /* @__PURE__ */ new Set();
|
|
30826
31316
|
const unobjc = /* @__PURE__ */ new Set();
|
|
30827
31317
|
const trapped = /* @__PURE__ */ new Set();
|
|
31318
|
+
const forced = /* @__PURE__ */ new Set();
|
|
31319
|
+
const nonfailable = /* @__PURE__ */ new Set();
|
|
30828
31320
|
const unconformed = /* @__PURE__ */ new Map();
|
|
30829
31321
|
const objcProtocols = new Set(
|
|
30830
31322
|
graphs.flatMap(
|
|
@@ -30834,7 +31326,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
30834
31326
|
)
|
|
30835
31327
|
);
|
|
30836
31328
|
const file = import_node_path70.default.join(work, `${module2}.swift`);
|
|
30837
|
-
const inert = binary2.placeholder !== void 0 || binary2.publicHeaders !== void 0 && binary2.
|
|
31329
|
+
const inert = binary2.placeholder !== void 0 || binary2.publicHeaders !== void 0 && binary2.unloweredSources === void 0;
|
|
30838
31330
|
for (; ; ) {
|
|
30839
31331
|
const { source, owners, skipped } = emitSwiftStandin(graphs, {
|
|
30840
31332
|
module: module2,
|
|
@@ -30847,6 +31339,8 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
30847
31339
|
unobjc,
|
|
30848
31340
|
unconformed,
|
|
30849
31341
|
trapped,
|
|
31342
|
+
forcedOverride: forced,
|
|
31343
|
+
coderNonfailable: nonfailable,
|
|
30850
31344
|
inert,
|
|
30851
31345
|
imports: [...placeholder?.peachImports ?? [], ...imports2],
|
|
30852
31346
|
family: [...imports2, ...placeholder?.peachImports ?? []],
|
|
@@ -30866,7 +31360,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
30866
31360
|
`Configured Swift behavior ${module2}.${entry.path} was not emitted: ${entry.reason}`
|
|
30867
31361
|
);
|
|
30868
31362
|
}
|
|
30869
|
-
import_node_fs73.default.writeFileSync(file, source);
|
|
31363
|
+
import_node_fs73.default.writeFileSync(file, source + trailer);
|
|
30870
31364
|
const check2 = (0, import_node_child_process37.spawnSync)(
|
|
30871
31365
|
import_node_path70.default.join(toolchain.toolchainBin, "swiftc"),
|
|
30872
31366
|
// emitting the module runs the diagnostics a typecheck skips, such as
|
|
@@ -30890,10 +31384,10 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
30890
31384
|
return {
|
|
30891
31385
|
module: module2,
|
|
30892
31386
|
target: binary2.target,
|
|
30893
|
-
files: { [`${module2}.swift`]: source },
|
|
31387
|
+
files: { [`${module2}.swift`]: source + trailer },
|
|
30894
31388
|
...imports2.length ? { dependencies: imports2 } : {}
|
|
30895
31389
|
};
|
|
30896
|
-
const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size;
|
|
31390
|
+
const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size + forced.size + nonfailable.size;
|
|
30897
31391
|
const elsewhere = [];
|
|
30898
31392
|
for (const match of check2.stderr.matchAll(/^(\S+?):(\d+):\d+: error: (.*)$/gm)) {
|
|
30899
31393
|
const owner = match[1] === file ? owners[Number(match[2]) - 1] : void 0;
|
|
@@ -30916,14 +31410,22 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
30916
31410
|
throw new Error(
|
|
30917
31411
|
`Configured Swift behavior ${module2}.${owner} does not typecheck: ${match[3]}`
|
|
30918
31412
|
);
|
|
30919
|
-
if (owner && /does not override any|overrides nothing/.test(
|
|
31413
|
+
if (owner && /does not override any|overrides nothing|does not override a designated initializer/.test(
|
|
31414
|
+
match[3]
|
|
31415
|
+
))
|
|
30920
31416
|
plain.add(owner);
|
|
31417
|
+
else if (owner && /failable initializer 'init\(coder:\)' cannot override a non-failable/.test(
|
|
31418
|
+
match[3]
|
|
31419
|
+
) && !nonfailable.has(owner))
|
|
31420
|
+
nonfailable.add(owner);
|
|
31421
|
+
else if (owner && /requires an 'override' keyword/.test(match[3]) && !forced.has(owner))
|
|
31422
|
+
forced.add(owner);
|
|
30921
31423
|
else if (owner && inert && INERT_VALUE.test(match[3]) && !trapped.has(owner))
|
|
30922
31424
|
trapped.add(owner);
|
|
30923
31425
|
else if (owner) omit.set(owner, `rejected by swiftc: ${match[3]}`);
|
|
30924
31426
|
else elsewhere.push(match[3]);
|
|
30925
31427
|
}
|
|
30926
|
-
if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size === before)
|
|
31428
|
+
if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size + forced.size + nonfailable.size === before)
|
|
30927
31429
|
throw new Error(
|
|
30928
31430
|
`its generated source does not typecheck: ${elsewhere.slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
|
|
30929
31431
|
);
|
|
@@ -31658,7 +32160,8 @@ function readStandinResults(receipt, generation, targets) {
|
|
|
31658
32160
|
}
|
|
31659
32161
|
return { standins, gaps };
|
|
31660
32162
|
}
|
|
31661
|
-
function standinGenerationInputs(binaries, toolchain,
|
|
32163
|
+
function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, sourceDir) {
|
|
32164
|
+
const behavior = withBuiltinStandinBehavior(configuredBehavior);
|
|
31662
32165
|
const { moduleRoot, release } = toolchain;
|
|
31663
32166
|
const sdk = swiftModuleSdk(moduleRoot);
|
|
31664
32167
|
const digest3 = sourceDir === void 0 ? STANDIN_SOURCE_DIGEST : standinSourceDigest(sourceDir);
|
|
@@ -31724,7 +32227,7 @@ function standinGenerationInputs(binaries, toolchain, behavior = {}, sourceDir)
|
|
|
31724
32227
|
...(binary2.headerDependencies ?? []).map(
|
|
31725
32228
|
(dependency) => `${swiftTargetModuleName(dependency.module)}\0${treeDigest2(import_node_path70.default.join(binary2.dir, dependency.path))}`
|
|
31726
32229
|
),
|
|
31727
|
-
...binary2.
|
|
32230
|
+
...binary2.unloweredSources ?? []
|
|
31728
32231
|
].join("\0") : swiftBinaryFramework(binary2).digest
|
|
31729
32232
|
);
|
|
31730
32233
|
} catch {
|
|
@@ -31921,8 +32424,13 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
31921
32424
|
}
|
|
31922
32425
|
return settle(result);
|
|
31923
32426
|
}
|
|
31924
|
-
async function swiftStandins(binaries, toolchain, provided = /* @__PURE__ */ new Set(),
|
|
31925
|
-
const built2 = await buildStandins(
|
|
32427
|
+
async function swiftStandins(binaries, toolchain, provided = /* @__PURE__ */ new Set(), configuredBehavior = {}, options = {}) {
|
|
32428
|
+
const built2 = await buildStandins(
|
|
32429
|
+
binaries,
|
|
32430
|
+
toolchain,
|
|
32431
|
+
provided,
|
|
32432
|
+
withBuiltinStandinBehavior(configuredBehavior)
|
|
32433
|
+
);
|
|
31926
32434
|
return {
|
|
31927
32435
|
standins: options.nativeSlices === false ? built2.standins : built2.standins.map((standin) => {
|
|
31928
32436
|
const binary2 = binaries.find((item) => item.target === standin.target);
|
|
@@ -31930,7 +32438,7 @@ async function swiftStandins(binaries, toolchain, provided = /* @__PURE__ */ new
|
|
|
31930
32438
|
standin,
|
|
31931
32439
|
toolchain.moduleRoot,
|
|
31932
32440
|
STANDIN_SOURCE_DIGEST,
|
|
31933
|
-
Object.keys(
|
|
32441
|
+
Object.keys(configuredBehavior[standin.module] ?? {}).length > 0,
|
|
31934
32442
|
() => swiftBinaryFramework(binary2).dir
|
|
31935
32443
|
) : standin;
|
|
31936
32444
|
}),
|
|
@@ -32114,6 +32622,7 @@ var init_swift_standins = __esm({
|
|
|
32114
32622
|
init_swift_package();
|
|
32115
32623
|
init_swift_packages();
|
|
32116
32624
|
init_swift_shared_sdk();
|
|
32625
|
+
init_swift_standin_builtin_behavior();
|
|
32117
32626
|
init_swift_standin_digest();
|
|
32118
32627
|
init_swift_standin_emit();
|
|
32119
32628
|
init_swift_toolchain();
|
|
@@ -32401,7 +32910,7 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
|
|
|
32401
32910
|
const binaryHeaders = binarySearch.flatMap((search) => search.headers);
|
|
32402
32911
|
const configuration = app.configuration === "Debug" ? "debug" : "release";
|
|
32403
32912
|
for (const binary2 of binaries) {
|
|
32404
|
-
if (!binary2.reached || binary2.publicHeaders === void 0 || binary2.
|
|
32913
|
+
if (!binary2.reached || binary2.publicHeaders === void 0 || binary2.unloweredSources !== void 0)
|
|
32405
32914
|
continue;
|
|
32406
32915
|
const manifest = swiftPackageManifest(binary2.dir);
|
|
32407
32916
|
const target = manifest.targets.get(binary2.target);
|
|
@@ -35825,9 +36334,9 @@ var init_self_invocation = __esm({
|
|
|
35825
36334
|
});
|
|
35826
36335
|
|
|
35827
36336
|
// src/swift-pdf-raster.ts
|
|
35828
|
-
function rasterBinary() {
|
|
35829
|
-
const tag = (0, import_node_crypto39.createHash)("sha256").update(
|
|
35830
|
-
const binary2 = import_node_path76.default.join(cacheDir(),
|
|
36337
|
+
function rasterBinary(swift = RASTER_SWIFT, name3 = "swift-pdf-raster") {
|
|
36338
|
+
const tag = (0, import_node_crypto39.createHash)("sha256").update(swift).digest("hex").slice(0, 16);
|
|
36339
|
+
const binary2 = import_node_path76.default.join(cacheDir(), `${name3}-${tag}`);
|
|
35831
36340
|
try {
|
|
35832
36341
|
import_node_fs79.default.accessSync(binary2, import_node_fs79.default.constants.X_OK);
|
|
35833
36342
|
return binary2;
|
|
@@ -35839,7 +36348,7 @@ function rasterBinary() {
|
|
|
35839
36348
|
import_node_fs79.default.mkdtempSync(import_node_path76.default.join(import_node_os16.default.tmpdir(), "swift-pdf-raster-")),
|
|
35840
36349
|
"raster.swift"
|
|
35841
36350
|
);
|
|
35842
|
-
import_node_fs79.default.writeFileSync(source,
|
|
36351
|
+
import_node_fs79.default.writeFileSync(source, swift);
|
|
35843
36352
|
try {
|
|
35844
36353
|
(0, import_node_child_process40.execFileSync)("xcrun", ["swiftc", "-o", binary2, source], { stdio: "pipe" });
|
|
35845
36354
|
} finally {
|
|
@@ -35897,7 +36406,31 @@ function rasterizePdfFile(diskPath, pdfSha256) {
|
|
|
35897
36406
|
import_node_fs79.default.rmSync(import_node_path76.default.dirname(out), { recursive: true, force: true });
|
|
35898
36407
|
}
|
|
35899
36408
|
}
|
|
35900
|
-
|
|
36409
|
+
function rasterizeSvgFile(diskPath, svgSha256) {
|
|
36410
|
+
if (process.platform !== "darwin") return null;
|
|
36411
|
+
const binary2 = rasterBinary(RASTER_SVG_SWIFT, "swift-svg-raster");
|
|
36412
|
+
const tag = (0, import_node_crypto39.createHash)("sha256").update(RASTER_SVG_SWIFT).digest("hex").slice(0, 16);
|
|
36413
|
+
const cached2 = import_node_path76.default.join(cacheDir(), `swift-svg-png-${tag}-${svgSha256}.png`);
|
|
36414
|
+
if (import_node_fs79.default.existsSync(cached2)) return { bytes: import_node_fs79.default.readFileSync(cached2) };
|
|
36415
|
+
const out = import_node_path76.default.join(
|
|
36416
|
+
import_node_fs79.default.mkdtempSync(import_node_path76.default.join(import_node_os16.default.tmpdir(), "swift-svg-png-")),
|
|
36417
|
+
"out.png"
|
|
36418
|
+
);
|
|
36419
|
+
try {
|
|
36420
|
+
(0, import_node_child_process40.execFileSync)(binary2, [diskPath, "3", out], { stdio: "pipe" });
|
|
36421
|
+
const bytes = import_node_fs79.default.readFileSync(out);
|
|
36422
|
+
import_node_fs79.default.mkdirSync(cacheDir(), { recursive: true });
|
|
36423
|
+
import_node_fs79.default.copyFileSync(out, cached2);
|
|
36424
|
+
return { bytes: Buffer.from(bytes) };
|
|
36425
|
+
} catch (error) {
|
|
36426
|
+
throw new Error(
|
|
36427
|
+
`swift svg asset ${diskPath} did not rasterize: ${error instanceof Error ? error.message : String(error)}`
|
|
36428
|
+
);
|
|
36429
|
+
} finally {
|
|
36430
|
+
import_node_fs79.default.rmSync(import_node_path76.default.dirname(out), { recursive: true, force: true });
|
|
36431
|
+
}
|
|
36432
|
+
}
|
|
36433
|
+
var import_node_child_process40, import_node_crypto39, import_node_fs79, import_node_os16, import_node_path76, RASTER_SWIFT, RASTER_SVG_SWIFT;
|
|
35901
36434
|
var init_swift_pdf_raster = __esm({
|
|
35902
36435
|
"src/swift-pdf-raster.ts"() {
|
|
35903
36436
|
"use strict";
|
|
@@ -35933,6 +36466,25 @@ guard let image = ctx.makeImage() else { exit(5) }
|
|
|
35933
36466
|
guard let dest = CGImageDestinationCreateWithURL(output as CFURL, UTType.png.identifier as CFString, 1, nil) else { exit(6) }
|
|
35934
36467
|
CGImageDestinationAddImage(dest, image, nil)
|
|
35935
36468
|
guard CGImageDestinationFinalize(dest) else { exit(7) }
|
|
36469
|
+
`;
|
|
36470
|
+
RASTER_SVG_SWIFT = `import AppKit
|
|
36471
|
+
guard CommandLine.arguments.count == 4 else { exit(1) }
|
|
36472
|
+
let input = URL(fileURLWithPath: CommandLine.arguments[1])
|
|
36473
|
+
let scale = CGFloat(Double(CommandLine.arguments[2]) ?? 3.0)
|
|
36474
|
+
let output = URL(fileURLWithPath: CommandLine.arguments[3])
|
|
36475
|
+
guard let image = NSImage(contentsOf: input), image.size.width > 0, image.size.height > 0 else { exit(2) }
|
|
36476
|
+
let width = Int(ceil(image.size.width * scale))
|
|
36477
|
+
let height = Int(ceil(image.size.height * scale))
|
|
36478
|
+
if width > 12000 || height > 12000 { exit(3) }
|
|
36479
|
+
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) }
|
|
36480
|
+
guard let context = NSGraphicsContext(bitmapImageRep: rep) else { exit(5) }
|
|
36481
|
+
NSGraphicsContext.saveGraphicsState()
|
|
36482
|
+
NSGraphicsContext.current = context
|
|
36483
|
+
context.imageInterpolation = .high
|
|
36484
|
+
image.draw(in: NSRect(x: 0, y: 0, width: width, height: height), from: .zero, operation: .copy, fraction: 1)
|
|
36485
|
+
NSGraphicsContext.restoreGraphicsState()
|
|
36486
|
+
guard let data = rep.representation(using: .png, properties: [:]) else { exit(6) }
|
|
36487
|
+
do { try data.write(to: output) } catch { exit(7) }
|
|
35936
36488
|
`;
|
|
35937
36489
|
}
|
|
35938
36490
|
});
|
|
@@ -36130,7 +36682,7 @@ async function swiftPackages(entry, app) {
|
|
|
36130
36682
|
] : []
|
|
36131
36683
|
);
|
|
36132
36684
|
let reached = [...cached2.binaries.filter((binary2) => binary2.reached), ...vendored];
|
|
36133
|
-
const standinArtifact = (binary2) => binary2.publicHeaders === void 0 || binary2.
|
|
36685
|
+
const standinArtifact = (binary2) => binary2.publicHeaders === void 0 || binary2.unloweredSources !== void 0;
|
|
36134
36686
|
const artifacts = reached.filter(standinArtifact);
|
|
36135
36687
|
if (entry.moduleRoot && entry.provided && artifacts.length > 0) {
|
|
36136
36688
|
const resolved = swiftModuleToolchain(entry.moduleRoot);
|
|
@@ -36149,10 +36701,13 @@ async function swiftPackages(entry, app) {
|
|
|
36149
36701
|
const cxxArtifacts = reached.filter(standinArtifact);
|
|
36150
36702
|
const generation = standinGenerationInputs(cxxArtifacts, toolchain, entry.behavior);
|
|
36151
36703
|
if (cached2.standinKey !== generation) {
|
|
36704
|
+
const replaced = new Set(
|
|
36705
|
+
cxxArtifacts.filter((binary2) => shippedBinaryDiffers(binary2.target, binary2.checksum)).map((binary2) => binary2.target)
|
|
36706
|
+
);
|
|
36152
36707
|
const built2 = await swiftStandins(
|
|
36153
36708
|
cxxArtifacts,
|
|
36154
36709
|
toolchain,
|
|
36155
|
-
entry.provided,
|
|
36710
|
+
new Set([...entry.provided].filter((name3) => !replaced.has(name3))),
|
|
36156
36711
|
entry.behavior
|
|
36157
36712
|
);
|
|
36158
36713
|
cached2.packages = await resolveSwiftPackagesAsync({
|
|
@@ -36166,6 +36721,9 @@ async function swiftPackages(entry, app) {
|
|
|
36166
36721
|
...entry.provided,
|
|
36167
36722
|
...cxxArtifacts.map((binary2) => binary2.target).filter((target) => !built2.gaps.has(target))
|
|
36168
36723
|
]),
|
|
36724
|
+
standinTargets: new Set(
|
|
36725
|
+
[...replaced].filter((target) => !built2.gaps.has(target))
|
|
36726
|
+
),
|
|
36169
36727
|
binaryGaps: built2.gaps,
|
|
36170
36728
|
owners
|
|
36171
36729
|
});
|
|
@@ -37075,6 +37633,12 @@ function buildSwiftResourceTable(project, baseUrl, inputs) {
|
|
|
37075
37633
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
37076
37634
|
}
|
|
37077
37635
|
bytes = readPackageFile2(project.packagePath, disk, limits.imageBytes);
|
|
37636
|
+
const svg = ext === ".svg" ? rasterizeSvgFile(disk, (0, import_node_crypto40.createHash)("sha256").update(bytes).digest("hex")) : null;
|
|
37637
|
+
if (svg) {
|
|
37638
|
+
bytes = svg.bytes;
|
|
37639
|
+
ext = ".png";
|
|
37640
|
+
uploadName = `${import_node_path77.default.posix.basename(file, import_node_path77.default.posix.extname(file))}.png`;
|
|
37641
|
+
}
|
|
37078
37642
|
}
|
|
37079
37643
|
if (imageBytes + bytes.length > limits.imageTotalBytes) {
|
|
37080
37644
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
@@ -37966,6 +38530,7 @@ var init_swift_host = __esm({
|
|
|
37966
38530
|
init_swift_package_manifest();
|
|
37967
38531
|
init_swift_packages();
|
|
37968
38532
|
init_swift_pdf_raster();
|
|
38533
|
+
init_swift_shipped_binaries();
|
|
37969
38534
|
init_swift_source_file();
|
|
37970
38535
|
init_swift_standin_config();
|
|
37971
38536
|
init_swift_standins();
|
|
@@ -48203,7 +48768,7 @@ init_swift_native_pin();
|
|
|
48203
48768
|
init_xcode_project();
|
|
48204
48769
|
var EXPO_NATIVE_ENTRY_NAME = "ios";
|
|
48205
48770
|
function expoNativeCompilerDigestValue() {
|
|
48206
|
-
return true ? "
|
|
48771
|
+
return true ? "5922e9285a81f56dda7ebf9adbf34c7d630c8a729a2ce226405b975c38ab854b" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
48207
48772
|
}
|
|
48208
48773
|
var IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
|
|
48209
48774
|
function readSources(value) {
|
|
@@ -49706,6 +50271,74 @@ ${source}` : source;
|
|
|
49706
50271
|
}
|
|
49707
50272
|
for (const unit2 of units) unit2.nativeFiles = { ...unit2.nativeFiles, ...support };
|
|
49708
50273
|
}
|
|
50274
|
+
function swiftAloneObjCClasses(ios, swift, resolveSource) {
|
|
50275
|
+
if (!import_node_fs86.default.existsSync(ios)) return null;
|
|
50276
|
+
const interfaces = /* @__PURE__ */ new Map();
|
|
50277
|
+
const visit3 = (dir) => {
|
|
50278
|
+
for (const child of import_node_fs86.default.readdirSync(resolveSource(dir), { withFileTypes: true })) {
|
|
50279
|
+
if (child.name.startsWith(".") || child.name === "build" || child.name === "node_modules" || /\.(?:xcframework|framework)$/.test(child.name))
|
|
50280
|
+
continue;
|
|
50281
|
+
const file = import_node_path84.default.join(dir, child.name);
|
|
50282
|
+
const resolved = resolveSource(file);
|
|
50283
|
+
const stat = import_node_fs86.default.statSync(resolved);
|
|
50284
|
+
if (stat.isDirectory()) {
|
|
50285
|
+
visit3(file);
|
|
50286
|
+
continue;
|
|
50287
|
+
}
|
|
50288
|
+
if (!stat.isFile() || !child.name.endsWith(".h")) continue;
|
|
50289
|
+
const text6 = import_node_fs86.default.readFileSync(resolved, "utf8");
|
|
50290
|
+
for (const match of text6.matchAll(
|
|
50291
|
+
/@interface\s+(\w+)\s*(\([^)\n]*\))?\s*(?::\s*(\w+))?\s*(?:<([^>\n]+)>)?/g
|
|
50292
|
+
)) {
|
|
50293
|
+
if (match[2]) continue;
|
|
50294
|
+
interfaces.set(match[1], {
|
|
50295
|
+
...match[3] ? { superName: match[3] } : {},
|
|
50296
|
+
protocols: (match[4] ?? "").split(",").map((name3) => name3.trim()).filter((name3) => name3.length > 0)
|
|
50297
|
+
});
|
|
50298
|
+
}
|
|
50299
|
+
}
|
|
50300
|
+
};
|
|
50301
|
+
visit3(ios);
|
|
50302
|
+
if (interfaces.size === 0) return null;
|
|
50303
|
+
const code = swiftCodeMask(swift);
|
|
50304
|
+
const declared = new Set(
|
|
50305
|
+
[
|
|
50306
|
+
...code.matchAll(
|
|
50307
|
+
/\b(?:class|struct|enum|protocol|actor|typealias)\s+([A-Za-z_]\w*)/g
|
|
50308
|
+
)
|
|
50309
|
+
].map((match) => match[1])
|
|
50310
|
+
);
|
|
50311
|
+
const referenced = new Set(code.match(/[A-Za-z_]\w*/g) ?? []);
|
|
50312
|
+
const needed = [...interfaces.keys()].filter((name3) => referenced.has(name3) && !declared.has(name3)).sort();
|
|
50313
|
+
if (needed.length === 0) return null;
|
|
50314
|
+
const protocolsOf = (name3, seen = /* @__PURE__ */ new Set()) => {
|
|
50315
|
+
if (seen.has(name3)) return [];
|
|
50316
|
+
seen.add(name3);
|
|
50317
|
+
const item = interfaces.get(name3);
|
|
50318
|
+
if (!item) return [];
|
|
50319
|
+
return [
|
|
50320
|
+
...item.protocols,
|
|
50321
|
+
...item.superName ? protocolsOf(item.superName, seen) : []
|
|
50322
|
+
];
|
|
50323
|
+
};
|
|
50324
|
+
const classes = needed.map((name3) => {
|
|
50325
|
+
if (!new Set(protocolsOf(name3)).has("EXPermissionsRequester"))
|
|
50326
|
+
return `public class ${name3}: NSObject {}`;
|
|
50327
|
+
return `public class ${name3}: NSObject, EXPermissionsRequester {
|
|
50328
|
+
public static func permissionType() -> String { "" }
|
|
50329
|
+
public func getPermissions() -> [AnyHashable: Any] { [:] }
|
|
50330
|
+
public func requestPermissions(
|
|
50331
|
+
resolver resolve: @escaping EXPromiseResolveBlock,
|
|
50332
|
+
rejecter reject: @escaping EXPromiseRejectBlock
|
|
50333
|
+
) {}
|
|
50334
|
+
}`;
|
|
50335
|
+
});
|
|
50336
|
+
return `import ExpoModulesCore
|
|
50337
|
+
import Foundation
|
|
50338
|
+
|
|
50339
|
+
${classes.join("\n\n")}
|
|
50340
|
+
`;
|
|
50341
|
+
}
|
|
49709
50342
|
async function collectExpoSwiftSources(appRoot, signal, installedWorkspace, prepareNative = false, iosTarget, options = {}) {
|
|
49710
50343
|
if (traceStore.getStore())
|
|
49711
50344
|
return collectExpoSwiftSourcesUncached(
|
|
@@ -50116,10 +50749,17 @@ ${import_node_fs86.default.readFileSync(source, "utf8")}`;
|
|
|
50116
50749
|
} else {
|
|
50117
50750
|
walk3(ios);
|
|
50118
50751
|
walkFrameworks(canonical);
|
|
50119
|
-
if (nativeSources.size > 0 && !prepareNative && !metadataOnly)
|
|
50752
|
+
if (nativeSources.size > 0 && !prepareNative && !metadataOnly) {
|
|
50120
50753
|
report(
|
|
50121
50754
|
`${packageName}: ${namespace} has Objective-C or C sources (${[...nativeSources].sort()[0]}), which compile only from a CocoaPods workspace a Mac prepares; compiling its Swift alone`
|
|
50122
50755
|
);
|
|
50756
|
+
const surface = swiftAloneObjCClasses(
|
|
50757
|
+
ios,
|
|
50758
|
+
Object.values(files2).join("\n"),
|
|
50759
|
+
resolveSource
|
|
50760
|
+
);
|
|
50761
|
+
if (surface) files2[`Sources/${namespace}/PeachObjCSurface.swift`] = surface;
|
|
50762
|
+
}
|
|
50123
50763
|
}
|
|
50124
50764
|
const podspec = import_node_fs86.default.existsSync(ios) ? import_node_fs86.default.readdirSync(ios).find((name3) => name3.endsWith(".podspec")) : void 0;
|
|
50125
50765
|
const absentFrameworks = [];
|