peachsim 0.1.2481 → 0.1.2482
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/commands/inspect.ts +2 -1
- 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 +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +2578 -2595
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-FYDDLFH7.mjs → acorn-3RG2YV22.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-DOTVMR2R.mjs → chunk-5VLHG64M.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-CIRF7MUH.mjs → chunk-7I4VWI2V.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MYAC4QOH.mjs → chunk-CEQOCRNV.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-6ALMBFOB.mjs → chunk-D5LOEF4I.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3AHKFCTP.mjs → chunk-DJKPHL72.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-XVGPPYRC.mjs → chunk-DYN7524Z.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-OMWELJZM.mjs → chunk-FKS6QFGF.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-DILJLCVN.mjs → chunk-GVLSR652.mjs} +12 -12
- package/dist-lib/esm-chunks/{chunk-VGOJCWU3.mjs → chunk-JNQJMRSO.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZNG6GMUS.mjs → chunk-MDEXPYPS.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-V27M6XEI.mjs → chunk-NFRYA23T.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DR66BWZR.mjs → chunk-RUKQSGNO.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-56VSEMVW.mjs → chunk-V7WDCR3N.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YBJYSS46.mjs → chunk-WC3CBCQF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MTWECGVY.mjs → chunk-WJCPHHTA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-RRHGYD5I.mjs → chunk-WPW4V4XH.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-IKMY4F25.mjs → chunk-YC2PEM6U.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HK2YIUS3.mjs → chunk-YOKV3RRM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YY4T7YSR.mjs → chunk-YSTOPLNH.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-55FEZERB.mjs → chunk-Z2NSDMD7.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-I2KV5OCI.mjs → chunk-ZXAHJ6YC.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-EEI7OVUC.mjs → metro-layout-parser-OPFP36W3.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-V5QMDVKG.mjs → swift-package-prebuilt-S7ECXF7I.mjs} +10 -10
- package/dist-lib/esm-chunks/{swift-sdk-app-module-QEWCSQWL.mjs → swift-sdk-app-module-7WOLAFJ6.mjs} +13 -13
- package/dist-lib/esm-chunks/{swift-sdk-image-XH4JSUEA.mjs → swift-sdk-image-WDWMRJ76.mjs} +13 -13
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-HQJ5Z6TE.mjs → swift-sdk-image-producer-ZXAKVKXN.mjs} +4 -4
- package/dist-lib/expo-swift-bundle.cjs +219 -230
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +391 -445
- package/dist-lib/host/fetch-proxy-handler.cjs +170 -340
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +79 -79
- package/dist-lib/public-origins-lib.json +77 -77
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- 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 +7 -7
- package/dist-lib/skills.cjs +445 -495
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +10 -10
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +5 -5
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/bplist-parser.cjs +1 -1
- package/dist-lib/vendor/ignore.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/plist.cjs +1 -1
- package/dist-lib/vendor/smol-toml.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/dist-types/packages/peach-engine/core-abi/style/style-schema.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -2
- package/package.json +1 -1
- package/src/expo-swift-host.ts +17 -35
- package/src/expo-widgets-bundle.ts +6 -4
- package/src/host/bridge-host.ts +4 -25
- package/src/native-preparation.ts +112 -120
- package/src/nitro-bundle.ts +26 -35
- package/src/one-sdk-bundle.ts +1 -0
- package/src/turbo-bundle.ts +5 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2482 | (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;
|
|
@@ -5662,7 +5662,7 @@ var init_swift_standin_digest = __esm({
|
|
|
5662
5662
|
|
|
5663
5663
|
// src/expo-native-compiler-digest.ts
|
|
5664
5664
|
function expoNativeCompilerDigestValue() {
|
|
5665
|
-
return true ? "
|
|
5665
|
+
return true ? "12aee4ee3bd89c1730fb89a657de22e7caf0a3e86af4e562a1a0238a7e3b38e6" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
5666
5666
|
}
|
|
5667
5667
|
var import_node_crypto11;
|
|
5668
5668
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -31308,13 +31308,6 @@ var init_storekit_test_store = __esm({
|
|
|
31308
31308
|
});
|
|
31309
31309
|
|
|
31310
31310
|
// src/app-config.ts
|
|
31311
|
-
var app_config_exports = {};
|
|
31312
|
-
__export(app_config_exports, {
|
|
31313
|
-
loadRNXAppConfig: () => loadRNXAppConfig,
|
|
31314
|
-
loadRNXAppStubs: () => loadRNXAppStubs,
|
|
31315
|
-
resolveRNXAppConfig: () => resolveRNXAppConfig,
|
|
31316
|
-
withConfiguredNativeSources: () => withConfiguredNativeSources
|
|
31317
|
-
});
|
|
31318
31311
|
function resolveFileEntries(entries2, configDir) {
|
|
31319
31312
|
if (!entries2) return entries2;
|
|
31320
31313
|
return Object.fromEntries(
|
|
@@ -31412,10 +31405,6 @@ async function withConfiguredNativeSources(appRoot, compile2) {
|
|
|
31412
31405
|
const config = await loadRNXAppConfig(resolveAppProject(appRoot));
|
|
31413
31406
|
return withUnansweredNativePackages(config?.compileNative ?? [], compile2);
|
|
31414
31407
|
}
|
|
31415
|
-
async function resolveRNXAppConfig(startDir = process.cwd()) {
|
|
31416
|
-
const project2 = resolveAppProject(startDir);
|
|
31417
|
-
return { project: project2, ...await loadRNXAppStubs(project2) };
|
|
31418
|
-
}
|
|
31419
31408
|
var import_node_fs45, import_node_module7, import_node_path45, WIRE_SLOTS;
|
|
31420
31409
|
var init_app_config = __esm({
|
|
31421
31410
|
"src/app-config.ts"() {
|
|
@@ -78978,137 +78967,134 @@ var init_expo_native_prebuilt = __esm({
|
|
|
78978
78967
|
}
|
|
78979
78968
|
});
|
|
78980
78969
|
|
|
78981
|
-
// src/
|
|
78982
|
-
|
|
78983
|
-
|
|
78984
|
-
|
|
78985
|
-
|
|
78986
|
-
|
|
78987
|
-
|
|
78988
|
-
setTimeoutNode(() => openRevisions.delete(key2), OPEN_RECEIPT_MS).unref();
|
|
78970
|
+
// src/nativePreparationContract.ts
|
|
78971
|
+
var NATIVE_PREPARE_QUERY_PARAM, NATIVE_PREPARED_QUERY_PARAM;
|
|
78972
|
+
var init_nativePreparationContract = __esm({
|
|
78973
|
+
"src/nativePreparationContract.ts"() {
|
|
78974
|
+
"use strict";
|
|
78975
|
+
NATIVE_PREPARE_QUERY_PARAM = "prepare";
|
|
78976
|
+
NATIVE_PREPARED_QUERY_PARAM = "prepared";
|
|
78989
78977
|
}
|
|
78990
|
-
|
|
78978
|
+
});
|
|
78979
|
+
|
|
78980
|
+
// src/native-preparation.ts
|
|
78981
|
+
function ignoredChange(relative5) {
|
|
78982
|
+
const parts = relative5.split(import_node_path108.default.sep);
|
|
78983
|
+
return relative5 === import_node_path108.default.join(".git", "index") || parts.includes(".cache") || parts.includes(".expo") || /(?:^|[\\/])node_modules[\\/]expo-widgets[\\/]bundle[\\/]build(?:[\\/]|$)/.test(
|
|
78984
|
+
relative5
|
|
78985
|
+
);
|
|
78991
78986
|
}
|
|
78992
|
-
|
|
78993
|
-
const
|
|
78994
|
-
const
|
|
78995
|
-
|
|
78996
|
-
|
|
78997
|
-
|
|
78998
|
-
const require2 = (0, import_node_module14.createRequire)(import_node_path108.default.join(app, "package.json"));
|
|
78999
|
-
let widgetsOutput;
|
|
79000
|
-
try {
|
|
79001
|
-
widgetsOutput = import_node_path108.default.join(
|
|
79002
|
-
import_node_path108.default.dirname(require2.resolve("expo-widgets/package.json")),
|
|
79003
|
-
"bundle",
|
|
79004
|
-
"build"
|
|
79005
|
-
);
|
|
79006
|
-
} catch (error) {
|
|
79007
|
-
if (!(error instanceof Error && "code" in error && error.code === "MODULE_NOT_FOUND"))
|
|
79008
|
-
throw error;
|
|
78987
|
+
function watchNativeInputs(root) {
|
|
78988
|
+
const workspace = findWorkspaceRoot(root);
|
|
78989
|
+
const existing = watchedInputs.get(workspace);
|
|
78990
|
+
if (existing) {
|
|
78991
|
+
existing.expiry.refresh();
|
|
78992
|
+
return existing;
|
|
79009
78993
|
}
|
|
79010
|
-
const
|
|
79011
|
-
hash.update(
|
|
79012
|
-
JSON.stringify([
|
|
79013
|
-
config,
|
|
79014
|
-
resolveActiveRuntimeRoot(),
|
|
79015
|
-
resolveDevCheckoutRuntimeAssetRoot()
|
|
79016
|
-
])
|
|
79017
|
-
);
|
|
78994
|
+
const watchers = [];
|
|
79018
78995
|
const visited = /* @__PURE__ */ new Set();
|
|
79019
|
-
const
|
|
79020
|
-
|
|
79021
|
-
|
|
79022
|
-
|
|
79023
|
-
|
|
78996
|
+
const expiry = setTimeoutNode(close, RETENTION_MS);
|
|
78997
|
+
expiry.unref();
|
|
78998
|
+
function close() {
|
|
78999
|
+
if (watchedInputs.get(workspace) === inputs2) watchedInputs.delete(workspace);
|
|
79000
|
+
(0, import_node_timers2.clearTimeout)(expiry);
|
|
79001
|
+
for (const watcher of watchers) watcher.close();
|
|
79002
|
+
}
|
|
79003
|
+
const inputs2 = { expiry };
|
|
79004
|
+
const watch3 = (directory2, recursive, name3) => {
|
|
79005
|
+
const watcher = import_node_fs105.default.watch(
|
|
79006
|
+
directory2,
|
|
79007
|
+
{ recursive, persistent: false },
|
|
79008
|
+
(_event, file) => {
|
|
79009
|
+
if (!file || (name3 ? file === name3 : !ignoredChange(file))) close();
|
|
79010
|
+
}
|
|
79011
|
+
);
|
|
79012
|
+
watchers.push(watcher);
|
|
79013
|
+
watcher.on("error", close);
|
|
79014
|
+
};
|
|
79015
|
+
const scan3 = (directory2, watchRoot2) => {
|
|
79016
|
+
if (visited.has(directory2)) return;
|
|
79024
79017
|
visited.add(directory2);
|
|
79025
|
-
const
|
|
79026
|
-
entries2.sort((a, b) => a.name < b.name ? -1 : Number(a.name !== b.name));
|
|
79027
|
-
for (const entry of entries2) {
|
|
79018
|
+
for (const entry of import_node_fs105.default.readdirSync(directory2, { withFileTypes: true })) {
|
|
79028
79019
|
const file = import_node_path108.default.join(directory2, entry.name);
|
|
79029
|
-
|
|
79030
|
-
if (
|
|
79031
|
-
if (!dependency && excluded(import_node_path108.default.relative(root, file), entry.isDirectory()))
|
|
79032
|
-
continue;
|
|
79033
|
-
hash.update(file).update("\0");
|
|
79034
|
-
if (entry.isDirectory()) {
|
|
79035
|
-
directories.push({ file, installed: dependency });
|
|
79036
|
-
continue;
|
|
79037
|
-
}
|
|
79038
|
-
const stat2 = import_node_fs105.default.lstatSync(file);
|
|
79039
|
-
hash.update(
|
|
79040
|
-
`${stat2.dev}:${stat2.ino}:${stat2.size}:${stat2.ctimeMs}:${stat2.mtimeMs}\0`
|
|
79041
|
-
);
|
|
79020
|
+
if (ignoredChange(import_node_path108.default.relative(watchRoot2, file)) || entry.name === ".git") continue;
|
|
79021
|
+
if (entry.isDirectory()) scan3(file, watchRoot2);
|
|
79042
79022
|
if (!entry.isSymbolicLink()) continue;
|
|
79043
|
-
const target = import_node_fs105.default.
|
|
79044
|
-
if (target
|
|
79045
|
-
|
|
79046
|
-
|
|
79047
|
-
|
|
79048
|
-
|
|
79049
|
-
);
|
|
79050
|
-
|
|
79023
|
+
const target = import_node_path108.default.resolve(directory2, import_node_fs105.default.readlinkSync(file));
|
|
79024
|
+
if (target === workspace || target.startsWith(workspace + import_node_path108.default.sep)) continue;
|
|
79025
|
+
const real = import_node_fs105.default.realpathSync(file);
|
|
79026
|
+
if (visited.has(real)) continue;
|
|
79027
|
+
watch3(import_node_path108.default.dirname(real), false, import_node_path108.default.basename(real));
|
|
79028
|
+
if (import_node_fs105.default.statSync(real).isDirectory()) {
|
|
79029
|
+
watch3(real, true);
|
|
79030
|
+
scan3(real, real);
|
|
79031
|
+
} else visited.add(real);
|
|
79051
79032
|
}
|
|
79052
|
-
|
|
79033
|
+
};
|
|
79034
|
+
try {
|
|
79035
|
+
watch3(workspace, true);
|
|
79036
|
+
scan3(workspace, workspace);
|
|
79037
|
+
} catch {
|
|
79038
|
+
close();
|
|
79039
|
+
return void 0;
|
|
79053
79040
|
}
|
|
79054
|
-
|
|
79041
|
+
watchedInputs.set(workspace, inputs2);
|
|
79042
|
+
return inputs2;
|
|
79055
79043
|
}
|
|
79056
|
-
var
|
|
79044
|
+
var import_node_fs105, import_node_path108, import_node_timers2, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
|
|
79057
79045
|
var init_native_preparation = __esm({
|
|
79058
79046
|
"src/native-preparation.ts"() {
|
|
79059
79047
|
"use strict";
|
|
79060
|
-
import_node_crypto63 = require("node:crypto");
|
|
79061
79048
|
import_node_fs105 = __toESM(require("node:fs"), 1);
|
|
79062
|
-
import_node_module14 = require("node:module");
|
|
79063
79049
|
import_node_path108 = __toESM(require("node:path"), 1);
|
|
79064
79050
|
import_node_timers2 = require("node:timers");
|
|
79065
|
-
|
|
79066
|
-
init_expo_workspace_exclusion();
|
|
79067
|
-
init_native_firebase_config();
|
|
79051
|
+
init_nativePreparationContract();
|
|
79068
79052
|
init_runtime_assets();
|
|
79069
79053
|
init_workspace_root();
|
|
79070
79054
|
setTimeoutNode = import_node_timers2.setTimeout;
|
|
79071
|
-
|
|
79072
|
-
|
|
79073
|
-
|
|
79055
|
+
RETENTION_MS = 30 * 60 * 1e3;
|
|
79056
|
+
watchedInputs = /* @__PURE__ */ new Map();
|
|
79057
|
+
NativePreparation = class {
|
|
79074
79058
|
compiling = /* @__PURE__ */ new Map();
|
|
79075
|
-
prepared = /* @__PURE__ */ new
|
|
79059
|
+
prepared = /* @__PURE__ */ new WeakMap();
|
|
79076
79060
|
receipts = /* @__PURE__ */ new Map();
|
|
79077
|
-
async
|
|
79078
|
-
const
|
|
79079
|
-
|
|
79080
|
-
|
|
79081
|
-
|
|
79082
|
-
|
|
79083
|
-
|
|
79084
|
-
|
|
79085
|
-
|
|
79086
|
-
|
|
79087
|
-
|
|
79088
|
-
|
|
79089
|
-
|
|
79090
|
-
if (prepared) (0, import_node_timers2.clearTimeout)(prepared.expiry);
|
|
79091
|
-
this.prepared.delete(owner);
|
|
79092
|
-
const result = compile2().then((value) => {
|
|
79093
|
-
if (revision) {
|
|
79094
|
-
const expiry = setTimeoutNode(
|
|
79095
|
-
() => this.prepared.delete(owner),
|
|
79096
|
-
OPEN_RECEIPT_MS
|
|
79097
|
-
);
|
|
79098
|
-
expiry.unref();
|
|
79099
|
-
this.prepared.set(owner, { revision, value, expiry });
|
|
79061
|
+
async resolve(root, owner, params, compile2, reusable = () => true) {
|
|
79062
|
+
const receipt = this.take(owner, params.get(NATIVE_PREPARED_QUERY_PARAM));
|
|
79063
|
+
if (receipt) return receipt.value;
|
|
79064
|
+
const token = params.get(NATIVE_PREPARE_QUERY_PARAM);
|
|
79065
|
+
const inputs2 = token ? watchNativeInputs(root) : void 0;
|
|
79066
|
+
const key2 = inputs2 ? `${owner}\0${resolveActiveRuntimeRoot() ?? ""}` : owner;
|
|
79067
|
+
let pending = this.compiling;
|
|
79068
|
+
if (inputs2) {
|
|
79069
|
+
const prepared = this.prepared.get(inputs2);
|
|
79070
|
+
if (prepared) pending = prepared;
|
|
79071
|
+
else {
|
|
79072
|
+
pending = /* @__PURE__ */ new Map();
|
|
79073
|
+
this.prepared.set(inputs2, pending);
|
|
79100
79074
|
}
|
|
79101
|
-
|
|
79102
|
-
|
|
79103
|
-
|
|
79104
|
-
|
|
79075
|
+
}
|
|
79076
|
+
let preparation = pending.get(key2);
|
|
79077
|
+
if (!preparation || preparation.ready && !reusable(preparation.ready.value)) {
|
|
79078
|
+
const next = { result: Promise.resolve().then(compile2) };
|
|
79079
|
+
preparation = next;
|
|
79080
|
+
pending.set(key2, next);
|
|
79081
|
+
void next.result.then(
|
|
79082
|
+
(value2) => {
|
|
79083
|
+
if (!inputs2 || !reusable(value2)) pending.delete(key2);
|
|
79084
|
+
else next.ready = { value: value2 };
|
|
79085
|
+
},
|
|
79086
|
+
() => pending.delete(key2)
|
|
79087
|
+
);
|
|
79088
|
+
}
|
|
79089
|
+
const value = await preparation.result;
|
|
79090
|
+
this.store(owner, token, value);
|
|
79091
|
+
return value;
|
|
79105
79092
|
}
|
|
79106
|
-
// each open hands its own response to the first tenant request, including null.
|
|
79107
79093
|
store(owner, token, value) {
|
|
79108
79094
|
if (!token) return;
|
|
79109
79095
|
const previous = this.receipts.get(token);
|
|
79110
79096
|
if (previous) (0, import_node_timers2.clearTimeout)(previous.expiry);
|
|
79111
|
-
const expiry = setTimeoutNode(() => this.receipts.delete(token),
|
|
79097
|
+
const expiry = setTimeoutNode(() => this.receipts.delete(token), RETENTION_MS);
|
|
79112
79098
|
expiry.unref();
|
|
79113
79099
|
this.receipts.set(token, { owner, value, expiry });
|
|
79114
79100
|
}
|
|
@@ -79238,7 +79224,7 @@ function nativeStaticLibraryEntry(recipe2, compiler, sdk2, distribution) {
|
|
|
79238
79224
|
return { name: recipe2.name, inputs: inputs2, key: nativeEntryKey(inputs2) };
|
|
79239
79225
|
}
|
|
79240
79226
|
function nativeStaticLibraryRecipe(bytes) {
|
|
79241
|
-
const digest3 = (0,
|
|
79227
|
+
const digest3 = (0, import_node_crypto63.createHash)("sha256").update(bytes).digest("hex");
|
|
79242
79228
|
return NATIVE_STATIC_LIBRARY_RECIPES.find((item) => item.nativeSha256 === digest3);
|
|
79243
79229
|
}
|
|
79244
79230
|
function nativeStaticLibrary(file, recipe2, moduleRoot) {
|
|
@@ -79281,7 +79267,7 @@ function isRustSymbol(name3, demangled) {
|
|
|
79281
79267
|
function rustStaticLibrary(file, moduleRoot) {
|
|
79282
79268
|
const toolchain = swiftModuleToolchain(moduleRoot);
|
|
79283
79269
|
const bytes = import_node_fs107.default.readFileSync(file);
|
|
79284
|
-
const key2 = (0,
|
|
79270
|
+
const key2 = (0, import_node_crypto63.createHash)("sha256").update("rust-c-abi-v4\0").update(toolchain.release).update("\0").update(bytes).digest("hex");
|
|
79285
79271
|
const directory2 = import_node_path110.default.join(cacheDir(), "native-archives", key2);
|
|
79286
79272
|
const archive = import_node_path110.default.join(directory2, "library.a");
|
|
79287
79273
|
if (import_node_fs107.default.existsSync(archive)) return archive;
|
|
@@ -79310,7 +79296,7 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
79310
79296
|
const members2 = readArMembers(bytes, true);
|
|
79311
79297
|
const seen = /* @__PURE__ */ new Set();
|
|
79312
79298
|
const unique2 = members2.filter(({ name: name3, bytes: bytes2 }) => {
|
|
79313
|
-
const identity2 = name3 + "\0" + (0,
|
|
79299
|
+
const identity2 = name3 + "\0" + (0, import_node_crypto63.createHash)("sha256").update(bytes2).digest("hex");
|
|
79314
79300
|
if (seen.has(identity2)) return false;
|
|
79315
79301
|
seen.add(identity2);
|
|
79316
79302
|
return true;
|
|
@@ -79357,14 +79343,14 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
79357
79343
|
function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
79358
79344
|
if (files2.length === 1) return files2[0];
|
|
79359
79345
|
const toolchain = swiftModuleToolchain(moduleRoot);
|
|
79360
|
-
const hash = (0,
|
|
79346
|
+
const hash = (0, import_node_crypto63.createHash)("sha256").update(toolchain.release);
|
|
79361
79347
|
for (const file of files2)
|
|
79362
79348
|
hash.update("\0").update(import_node_path110.default.basename(file)).update("\0").update(import_node_fs107.default.readFileSync(file));
|
|
79363
79349
|
const directory2 = import_node_path110.default.join(cacheDir(), "native-archives", hash.digest("hex"));
|
|
79364
79350
|
const archive = import_node_path110.default.join(directory2, "combined.a");
|
|
79365
79351
|
if (import_node_fs107.default.existsSync(archive)) return archive;
|
|
79366
79352
|
import_node_fs107.default.mkdirSync(directory2, { recursive: true });
|
|
79367
|
-
const temporary = import_node_path110.default.join(directory2, `combined-${(0,
|
|
79353
|
+
const temporary = import_node_path110.default.join(directory2, `combined-${(0, import_node_crypto63.randomUUID)()}.a`);
|
|
79368
79354
|
try {
|
|
79369
79355
|
(0, import_node_child_process48.execFileSync)(import_node_path110.default.join(toolchain.toolchainBin, "llvm-ar"), [
|
|
79370
79356
|
"qcsDL",
|
|
@@ -79377,12 +79363,12 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
|
79377
79363
|
}
|
|
79378
79364
|
return archive;
|
|
79379
79365
|
}
|
|
79380
|
-
var import_node_child_process48,
|
|
79366
|
+
var import_node_child_process48, import_node_crypto63, import_node_fs107, import_node_path110, WEBRTC_NATIVE_FRAMEWORK, SIGNAL_WEBRTC_NATIVE_FRAMEWORK, WEBRTC_NATIVE_FRAMEWORK_RECIPES, NATIVE_STATIC_LIBRARY_RECIPES;
|
|
79381
79367
|
var init_native_static_libraries = __esm({
|
|
79382
79368
|
"src/native-static-libraries.ts"() {
|
|
79383
79369
|
"use strict";
|
|
79384
79370
|
import_node_child_process48 = require("node:child_process");
|
|
79385
|
-
|
|
79371
|
+
import_node_crypto63 = require("node:crypto");
|
|
79386
79372
|
import_node_fs107 = __toESM(require("node:fs"), 1);
|
|
79387
79373
|
import_node_path110 = __toESM(require("node:path"), 1);
|
|
79388
79374
|
init_home_paths();
|
|
@@ -79680,16 +79666,6 @@ var init_native_static_libraries = __esm({
|
|
|
79680
79666
|
}
|
|
79681
79667
|
});
|
|
79682
79668
|
|
|
79683
|
-
// src/nativePreparationContract.ts
|
|
79684
|
-
var NATIVE_PREPARE_QUERY_PARAM, NATIVE_PREPARED_QUERY_PARAM;
|
|
79685
|
-
var init_nativePreparationContract = __esm({
|
|
79686
|
-
"src/nativePreparationContract.ts"() {
|
|
79687
|
-
"use strict";
|
|
79688
|
-
NATIVE_PREPARE_QUERY_PARAM = "prepare";
|
|
79689
|
-
NATIVE_PREPARED_QUERY_PARAM = "prepared";
|
|
79690
|
-
}
|
|
79691
|
-
});
|
|
79692
|
-
|
|
79693
79669
|
// ../../src/helpers/mapLimit.ts
|
|
79694
79670
|
async function mapLimit(items2, limit, worker) {
|
|
79695
79671
|
const results = new Array(items2.length);
|
|
@@ -79727,7 +79703,7 @@ function processAlive(pid) {
|
|
|
79727
79703
|
}
|
|
79728
79704
|
function tryAcquireNumberedLock(directory2, detail = "") {
|
|
79729
79705
|
(0, import_node_fs108.mkdirSync)(directory2, { recursive: true });
|
|
79730
|
-
const claim = (0, import_node_path111.join)(directory2, `claim-${process.pid}-${(0,
|
|
79706
|
+
const claim = (0, import_node_path111.join)(directory2, `claim-${process.pid}-${(0, import_node_crypto64.randomUUID)()}`);
|
|
79731
79707
|
for (; ; ) {
|
|
79732
79708
|
const numbers = (0, import_node_fs108.readdirSync)(directory2).filter((name3) => /^\d+$/.test(name3)).map(Number);
|
|
79733
79709
|
const top = Math.max(-1, ...numbers);
|
|
@@ -79766,11 +79742,11 @@ ${detail}` : ""}`);
|
|
|
79766
79742
|
};
|
|
79767
79743
|
}
|
|
79768
79744
|
}
|
|
79769
|
-
var
|
|
79745
|
+
var import_node_crypto64, import_node_fs108, import_node_path111, errorCode2;
|
|
79770
79746
|
var init_numbered_lock = __esm({
|
|
79771
79747
|
"src/numbered-lock.ts"() {
|
|
79772
79748
|
"use strict";
|
|
79773
|
-
|
|
79749
|
+
import_node_crypto64 = require("node:crypto");
|
|
79774
79750
|
import_node_fs108 = require("node:fs");
|
|
79775
79751
|
import_node_path111 = require("node:path");
|
|
79776
79752
|
errorCode2 = (error) => error instanceof Error && "code" in error ? error.code : void 0;
|
|
@@ -79797,7 +79773,7 @@ async function buildRiveRuntimeDependencies(checkout, moduleRoot) {
|
|
|
79797
79773
|
];
|
|
79798
79774
|
const objc = [...swiftObjCRuntimeFlags, "-fobjc-exceptions"];
|
|
79799
79775
|
const xcode = (0, import_node_child_process49.execFileSync)("xcodebuild", ["-version"], { encoding: "utf8" });
|
|
79800
|
-
const key2 = (0,
|
|
79776
|
+
const key2 = (0, import_node_crypto65.createHash)("sha256").update(
|
|
79801
79777
|
JSON.stringify([
|
|
79802
79778
|
RECIPE,
|
|
79803
79779
|
(0, import_node_child_process49.execFileSync)("git", ["-C", runtime, "rev-parse", "HEAD"], {
|
|
@@ -79814,7 +79790,7 @@ async function buildRiveRuntimeDependencies(checkout, moduleRoot) {
|
|
|
79814
79790
|
if (!import_node_fs109.default.existsSync(complete)) {
|
|
79815
79791
|
let release = tryAcquireNumberedLock(`${output}.lock`);
|
|
79816
79792
|
while (!release) {
|
|
79817
|
-
await (0,
|
|
79793
|
+
await (0, import_promises13.setTimeout)(1e3);
|
|
79818
79794
|
release = tryAcquireNumberedLock(`${output}.lock`);
|
|
79819
79795
|
}
|
|
79820
79796
|
try {
|
|
@@ -80008,16 +79984,16 @@ exec ${quote3(import_node_path112.default.join(toolchainBin, "llvm-ar"))} rcs "$
|
|
|
80008
79984
|
);
|
|
80009
79985
|
return directory2;
|
|
80010
79986
|
}
|
|
80011
|
-
var import_node_child_process49,
|
|
79987
|
+
var import_node_child_process49, import_node_crypto65, import_node_fs109, import_node_os22, import_node_path112, import_promises13, RECIPE, CONFIG, RUNTIME_LIBRARIES;
|
|
80012
79988
|
var init_rive_runtime_dependencies = __esm({
|
|
80013
79989
|
"src/rive-runtime-dependencies.ts"() {
|
|
80014
79990
|
"use strict";
|
|
80015
79991
|
import_node_child_process49 = require("node:child_process");
|
|
80016
|
-
|
|
79992
|
+
import_node_crypto65 = require("node:crypto");
|
|
80017
79993
|
import_node_fs109 = __toESM(require("node:fs"), 1);
|
|
80018
79994
|
import_node_os22 = __toESM(require("node:os"), 1);
|
|
80019
79995
|
import_node_path112 = __toESM(require("node:path"), 1);
|
|
80020
|
-
|
|
79996
|
+
import_promises13 = require("node:timers/promises");
|
|
80021
79997
|
init_home_paths();
|
|
80022
79998
|
init_numbered_lock();
|
|
80023
79999
|
init_swift_compile();
|
|
@@ -80112,7 +80088,7 @@ var init_swift_shipped_binaries = __esm({
|
|
|
80112
80088
|
|
|
80113
80089
|
// src/swift-packages.ts
|
|
80114
80090
|
function remoteSwiftCheckouts(root) {
|
|
80115
|
-
const key2 = (0,
|
|
80091
|
+
const key2 = (0, import_node_crypto66.createHash)("sha256").update(import_node_fs110.default.realpathSync(root)).digest("hex").slice(0, 32);
|
|
80116
80092
|
import_node_fs110.default.mkdirSync(cacheDir(), { recursive: true });
|
|
80117
80093
|
return import_node_path113.default.join(import_node_fs110.default.realpathSync(cacheDir()), "swift-packages", key2, "checkouts");
|
|
80118
80094
|
}
|
|
@@ -80219,7 +80195,7 @@ async function fetchCheckout(checkouts, identity2, pin2, signal) {
|
|
|
80219
80195
|
const lock = async () => {
|
|
80220
80196
|
let release = tryAcquireNumberedLock(`${dir}.lock`);
|
|
80221
80197
|
while (!release) {
|
|
80222
|
-
await (0,
|
|
80198
|
+
await (0, import_promises14.setTimeout)(25, void 0, { signal });
|
|
80223
80199
|
release = tryAcquireNumberedLock(`${dir}.lock`);
|
|
80224
80200
|
}
|
|
80225
80201
|
return release;
|
|
@@ -80846,15 +80822,15 @@ function resolveSwiftPackages(options2) {
|
|
|
80846
80822
|
result.nativeProducts.push({ name: name3, packageDir: manifest.dir, source });
|
|
80847
80823
|
return result;
|
|
80848
80824
|
}
|
|
80849
|
-
var import_node_child_process50,
|
|
80825
|
+
var import_node_child_process50, import_node_crypto66, import_node_fs110, import_node_path113, import_promises14, import_node_util13, swiftBinaryOnDisk, SWIFT_PLACEHOLDER_PACKAGES, placeholderPackage, sourceFrameworkRecipes, UNSUPPORTED_NATIVE, BINARY, blockers, verified, execFileAsync2, checkoutKey;
|
|
80850
80826
|
var init_swift_packages = __esm({
|
|
80851
80827
|
"src/swift-packages.ts"() {
|
|
80852
80828
|
"use strict";
|
|
80853
80829
|
import_node_child_process50 = require("node:child_process");
|
|
80854
|
-
|
|
80830
|
+
import_node_crypto66 = require("node:crypto");
|
|
80855
80831
|
import_node_fs110 = __toESM(require("node:fs"), 1);
|
|
80856
80832
|
import_node_path113 = __toESM(require("node:path"), 1);
|
|
80857
|
-
|
|
80833
|
+
import_promises14 = require("node:timers/promises");
|
|
80858
80834
|
import_node_util13 = require("node:util");
|
|
80859
80835
|
init_git_repo_env();
|
|
80860
80836
|
init_home_paths();
|
|
@@ -81461,7 +81437,7 @@ var init_genrule_library_builds = __esm({
|
|
|
81461
81437
|
function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
81462
81438
|
const distribution = swiftDistributionAt(moduleRoot);
|
|
81463
81439
|
const sdk2 = swiftSdkPaths(moduleRoot, toolchainBin);
|
|
81464
|
-
const identity2 = (0,
|
|
81440
|
+
const identity2 = (0, import_node_crypto67.createHash)("sha256").update(
|
|
81465
81441
|
JSON.stringify([
|
|
81466
81442
|
distribution?.id,
|
|
81467
81443
|
distribution?.link,
|
|
@@ -81487,7 +81463,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
|
81487
81463
|
for (const alias of product.frameworkAliases) {
|
|
81488
81464
|
if (alias.wasmSdkId !== distribution.wasmSdkId || alias.wasmSdkChecksum !== distribution.wasmSdkChecksum)
|
|
81489
81465
|
throw new Error(`framework SDK identity differs for ${alias.name}`);
|
|
81490
|
-
if ((0,
|
|
81466
|
+
if ((0, import_node_crypto67.createHash)("sha256").update(import_node_fs113.default.readFileSync(import_node_path116.default.join(moduleRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
|
|
81491
81467
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
81492
81468
|
const selected = /* @__PURE__ */ new Set();
|
|
81493
81469
|
const reach = (name3) => {
|
|
@@ -81528,7 +81504,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
|
81528
81504
|
for (const alias of owner.frameworkAliases) {
|
|
81529
81505
|
if (frameworkResponses[alias.name])
|
|
81530
81506
|
throw new Error(`ambiguous declared framework ${alias.name}`);
|
|
81531
|
-
if ((0,
|
|
81507
|
+
if ((0, import_node_crypto67.createHash)("sha256").update(import_node_fs113.default.readFileSync(import_node_path116.default.join(sdkRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
|
|
81532
81508
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
81533
81509
|
const file = import_node_path116.default.join(root, `${alias.name}.rsp`);
|
|
81534
81510
|
import_node_fs113.default.writeFileSync(file, aliasArtifacts.map(quote3).join("\n") + "\n");
|
|
@@ -81622,11 +81598,11 @@ exec ${shellQuote(configuration.compiler)} "$@"
|
|
|
81622
81598
|
};
|
|
81623
81599
|
return { cc: compiler("clang"), cxx: compiler("clang++"), identity: identity2 };
|
|
81624
81600
|
}
|
|
81625
|
-
var
|
|
81601
|
+
var import_node_crypto67, import_node_fs113, import_node_path116, v7;
|
|
81626
81602
|
var init_native_framework_compiler = __esm({
|
|
81627
81603
|
"src/native-framework-compiler.ts"() {
|
|
81628
81604
|
"use strict";
|
|
81629
|
-
|
|
81605
|
+
import_node_crypto67 = require("node:crypto");
|
|
81630
81606
|
import_node_fs113 = __toESM(require("node:fs"), 1);
|
|
81631
81607
|
import_node_path116 = __toESM(require("node:path"), 1);
|
|
81632
81608
|
v7 = __toESM(require("peachsim/vendor/valibot"), 1);
|
|
@@ -81656,7 +81632,7 @@ function llvmIdentity(toolchainBin, release) {
|
|
|
81656
81632
|
] : ["clang", "wasm-ld", "llvm-ar", "llvm-nm", "llvm-strip"].map(
|
|
81657
81633
|
(name3) => swiftFileChecksum(import_node_path117.default.join(toolchainBin, name3))
|
|
81658
81634
|
);
|
|
81659
|
-
const identity2 = (0,
|
|
81635
|
+
const identity2 = (0, import_node_crypto68.createHash)("sha256").update(JSON.stringify(components)).digest("hex");
|
|
81660
81636
|
toolIdentities.set(toolchainBin, identity2);
|
|
81661
81637
|
return identity2;
|
|
81662
81638
|
}
|
|
@@ -81664,7 +81640,7 @@ function cSdkIdentity(sysroot, resourceDir, frameworks) {
|
|
|
81664
81640
|
const key2 = JSON.stringify([sysroot, resourceDir, frameworks]);
|
|
81665
81641
|
const cached4 = sysrootIdentities.get(key2);
|
|
81666
81642
|
if (cached4) return cached4;
|
|
81667
|
-
const hash = (0,
|
|
81643
|
+
const hash = (0, import_node_crypto68.createHash)("sha256");
|
|
81668
81644
|
const add = (root, relative5) => {
|
|
81669
81645
|
const file = import_node_path117.default.join(root, relative5);
|
|
81670
81646
|
const stat2 = import_node_fs114.default.statSync(file, { throwIfNoEntry: false });
|
|
@@ -81699,7 +81675,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
81699
81675
|
import_node_fs114.default.readFileSync(import_node_path117.default.join(moduleRoot, SWIFT_FRAMEWORK_PRODUCT_FILE), "utf8")
|
|
81700
81676
|
)
|
|
81701
81677
|
);
|
|
81702
|
-
const hash = (0,
|
|
81678
|
+
const hash = (0, import_node_crypto68.createHash)("sha256").update(
|
|
81703
81679
|
JSON.stringify([
|
|
81704
81680
|
headers,
|
|
81705
81681
|
distribution.link,
|
|
@@ -81709,7 +81685,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
81709
81685
|
])
|
|
81710
81686
|
);
|
|
81711
81687
|
const objects = distribution.objects.map((file) => [file, distribution.files[file]]);
|
|
81712
|
-
const objectKey = (0,
|
|
81688
|
+
const objectKey = (0, import_node_crypto68.createHash)("sha256").update(JSON.stringify(objects)).digest("hex");
|
|
81713
81689
|
const cache = import_node_path117.default.join(cacheDir4, "framework-symbols-by-object", objectKey);
|
|
81714
81690
|
if (!import_node_fs114.default.existsSync(cache)) {
|
|
81715
81691
|
import_node_fs114.default.mkdirSync(import_node_path117.default.dirname(cache), { recursive: true });
|
|
@@ -81744,7 +81720,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
81744
81720
|
const digest3 = import_node_path117.default.join(temporary, "digest");
|
|
81745
81721
|
import_node_fs114.default.writeFileSync(
|
|
81746
81722
|
digest3,
|
|
81747
|
-
(0,
|
|
81723
|
+
(0, import_node_crypto68.createHash)("sha256").update(symbols.sort().join("\n")).digest("hex")
|
|
81748
81724
|
);
|
|
81749
81725
|
import_node_fs114.default.renameSync(digest3, cache);
|
|
81750
81726
|
} finally {
|
|
@@ -81799,7 +81775,7 @@ function buildable(declaration) {
|
|
|
81799
81775
|
return builderOf(declaration) !== null && declaration.dependencies.every(buildable);
|
|
81800
81776
|
}
|
|
81801
81777
|
function declarationInputs(declaration, builder, toolchain, dependencyKeys) {
|
|
81802
|
-
const hash = (0,
|
|
81778
|
+
const hash = (0, import_node_crypto68.createHash)("sha256");
|
|
81803
81779
|
const files2 = declaration.sources.filter(
|
|
81804
81780
|
(source) => !source.generator && !source.file.split(import_node_path117.default.sep).includes(".git")
|
|
81805
81781
|
).map((source) => import_node_path117.default.relative(declaration.packageDir, source.file));
|
|
@@ -81931,12 +81907,12 @@ function genruleArchive(declaration, library, moduleRoot) {
|
|
|
81931
81907
|
}
|
|
81932
81908
|
return combined;
|
|
81933
81909
|
}
|
|
81934
|
-
var import_node_child_process53,
|
|
81910
|
+
var import_node_child_process53, import_node_crypto68, import_node_fs114, import_node_os23, import_node_path117, v8, BUILDERS, cacheDir4, toolIdentities, sysrootIdentities, GENRULE_RECIPE, GENRULE_BUNDLE;
|
|
81935
81911
|
var init_genrule_archives = __esm({
|
|
81936
81912
|
"src/genrule-archives.ts"() {
|
|
81937
81913
|
"use strict";
|
|
81938
81914
|
import_node_child_process53 = require("node:child_process");
|
|
81939
|
-
|
|
81915
|
+
import_node_crypto68 = require("node:crypto");
|
|
81940
81916
|
import_node_fs114 = __toESM(require("node:fs"), 1);
|
|
81941
81917
|
import_node_os23 = __toESM(require("node:os"), 1);
|
|
81942
81918
|
import_node_path117 = __toESM(require("node:path"), 1);
|
|
@@ -82044,7 +82020,7 @@ function privateSentrySlice(entry, moduleRoot) {
|
|
|
82044
82020
|
function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact) {
|
|
82045
82021
|
if (standin.module !== SENTRY_SWIFT_SLICE.name) return standin;
|
|
82046
82022
|
const native = simulatorNativeLibrary(artifact());
|
|
82047
|
-
if (!native || (0,
|
|
82023
|
+
if (!native || (0, import_node_crypto69.createHash)("sha256").update(import_node_fs115.default.readFileSync(native.file)).digest("hex") !== SENTRY_SWIFT_SLICE.nativeSha256)
|
|
82048
82024
|
return standin;
|
|
82049
82025
|
if (configured)
|
|
82050
82026
|
throw new Error(
|
|
@@ -82102,12 +82078,12 @@ function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact)
|
|
|
82102
82078
|
}
|
|
82103
82079
|
};
|
|
82104
82080
|
}
|
|
82105
|
-
var import_node_child_process54,
|
|
82081
|
+
var import_node_child_process54, import_node_crypto69, import_node_fs115, import_node_os24, import_node_path118, SENTRY_SWIFT_SLICE;
|
|
82106
82082
|
var init_native_swift_slices = __esm({
|
|
82107
82083
|
"src/native-swift-slices.ts"() {
|
|
82108
82084
|
"use strict";
|
|
82109
82085
|
import_node_child_process54 = require("node:child_process");
|
|
82110
|
-
|
|
82086
|
+
import_node_crypto69 = require("node:crypto");
|
|
82111
82087
|
import_node_fs115 = __toESM(require("node:fs"), 1);
|
|
82112
82088
|
import_node_os24 = __toESM(require("node:os"), 1);
|
|
82113
82089
|
import_node_path118 = __toESM(require("node:path"), 1);
|
|
@@ -82165,7 +82141,7 @@ async function cxxDeclarations(astFile, headers) {
|
|
|
82165
82141
|
const result = [];
|
|
82166
82142
|
let lastFile = "";
|
|
82167
82143
|
let rootComplete = false;
|
|
82168
|
-
await (0,
|
|
82144
|
+
await (0, import_promises15.pipeline)(import_node_fs117.default.createReadStream(astFile), (0, import_stream_json.default)(), async (tokens2) => {
|
|
82169
82145
|
for await (const value of tokens2) {
|
|
82170
82146
|
if (!value || typeof value !== "object" || !("name" in value) || typeof value.name !== "string")
|
|
82171
82147
|
throw new Error("invalid clang AST token");
|
|
@@ -82259,13 +82235,13 @@ async function cxxDeclarations(astFile, headers) {
|
|
|
82259
82235
|
if (stack.length !== 0 || !rootComplete) throw new Error("truncated clang AST");
|
|
82260
82236
|
return result;
|
|
82261
82237
|
}
|
|
82262
|
-
var import_node_fs117, import_node_path119,
|
|
82238
|
+
var import_node_fs117, import_node_path119, import_promises15, import_stream_json, DECLARATIONS;
|
|
82263
82239
|
var init_swift_cxx_declarations = __esm({
|
|
82264
82240
|
"src/swift-cxx-declarations.ts"() {
|
|
82265
82241
|
"use strict";
|
|
82266
82242
|
import_node_fs117 = __toESM(require("node:fs"), 1);
|
|
82267
82243
|
import_node_path119 = __toESM(require("node:path"), 1);
|
|
82268
|
-
|
|
82244
|
+
import_promises15 = require("node:stream/promises");
|
|
82269
82245
|
import_stream_json = __toESM(require("peachsim/vendor/stream-json"), 1);
|
|
82270
82246
|
DECLARATIONS = /* @__PURE__ */ new Set([
|
|
82271
82247
|
"FunctionDecl",
|
|
@@ -82843,7 +82819,7 @@ function treeDigest2(root) {
|
|
|
82843
82819
|
}).join("\n");
|
|
82844
82820
|
const memo2 = digests.get(`tree\0${root}`);
|
|
82845
82821
|
if (memo2?.stamp === stamp) return memo2.digest;
|
|
82846
|
-
const hash = (0,
|
|
82822
|
+
const hash = (0, import_node_crypto70.createHash)("sha256");
|
|
82847
82823
|
for (const name3 of names) {
|
|
82848
82824
|
hash.update(`${name3}\0`);
|
|
82849
82825
|
hash.update(import_node_fs119.default.readFileSync(import_node_path121.default.join(root, name3)));
|
|
@@ -82890,7 +82866,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
82890
82866
|
const found4 = locateXcframework(import_node_path121.default.join(dir, "tree"));
|
|
82891
82867
|
if (found4) return { dir: found4, digest: stored.sha };
|
|
82892
82868
|
}
|
|
82893
|
-
const sha2 = (0,
|
|
82869
|
+
const sha2 = (0, import_node_crypto70.createHash)("sha256").update(import_node_fs119.default.readFileSync(binary2.dir)).digest("hex");
|
|
82894
82870
|
if (sha2 !== stored?.sha || !locateXcframework(import_node_path121.default.join(dir, "tree"))) {
|
|
82895
82871
|
import_node_fs119.default.rmSync(dir, { recursive: true, force: true });
|
|
82896
82872
|
import_node_fs119.default.mkdirSync(import_node_path121.default.join(dir, "tree"), { recursive: true });
|
|
@@ -82902,7 +82878,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
82902
82878
|
return { dir: found3, digest: sha2 };
|
|
82903
82879
|
}
|
|
82904
82880
|
if (stored && import_node_fs119.default.existsSync(archive)) {
|
|
82905
|
-
const sha2 = (0,
|
|
82881
|
+
const sha2 = (0, import_node_crypto70.createHash)("sha256").update(import_node_fs119.default.readFileSync(archive)).digest("hex");
|
|
82906
82882
|
if (sha2 !== expected)
|
|
82907
82883
|
throw new Error(`archive checksum ${sha2} is not the declared checksum ${expected}`);
|
|
82908
82884
|
const found3 = locateXcframework(import_node_path121.default.join(dir, "tree"));
|
|
@@ -82911,7 +82887,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
82911
82887
|
import_node_fs119.default.rmSync(dir, { recursive: true, force: true });
|
|
82912
82888
|
import_node_fs119.default.mkdirSync(import_node_path121.default.join(dir, "tree"), { recursive: true });
|
|
82913
82889
|
exec("curl", ["-fsSL", "--retry", "2", "-o", archive, binary2.url]);
|
|
82914
|
-
const sha = (0,
|
|
82890
|
+
const sha = (0, import_node_crypto70.createHash)("sha256").update(import_node_fs119.default.readFileSync(archive)).digest("hex");
|
|
82915
82891
|
if (sha !== expected) {
|
|
82916
82892
|
import_node_fs119.default.rmSync(dir, { recursive: true, force: true });
|
|
82917
82893
|
throw new Error(`archive checksum ${sha} is not the declared checksum ${expected}`);
|
|
@@ -83036,7 +83012,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
|
|
|
83036
83012
|
});
|
|
83037
83013
|
}
|
|
83038
83014
|
}
|
|
83039
|
-
const declaredDigest = (0,
|
|
83015
|
+
const declaredDigest = (0, import_node_crypto70.createHash)("sha256");
|
|
83040
83016
|
for (const framework of providedFrameworks)
|
|
83041
83017
|
declaredDigest.update(`provided/${import_node_path121.default.relative(artifact.dir, framework)}\0`);
|
|
83042
83018
|
for (const [framework, { declared: names, imports: imports2, sdkHeader }] of declared)
|
|
@@ -83106,7 +83082,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
|
|
|
83106
83082
|
import_node_fs119.default.copyFileSync(surface.modulemap, modulemap);
|
|
83107
83083
|
}
|
|
83108
83084
|
}
|
|
83109
|
-
const contents2 = (0,
|
|
83085
|
+
const contents2 = (0, import_node_crypto70.createHash)("sha256");
|
|
83110
83086
|
for (const framework of providedFrameworks.filter((item) => !declared.has(item))) {
|
|
83111
83087
|
const modulemap = import_node_path121.default.join(
|
|
83112
83088
|
pending,
|
|
@@ -84521,7 +84497,7 @@ function crateSourceRoots(manifest, searchRoot) {
|
|
|
84521
84497
|
return roots;
|
|
84522
84498
|
}
|
|
84523
84499
|
function crateSourceDigest(manifest, searchRoot) {
|
|
84524
|
-
const hash = (0,
|
|
84500
|
+
const hash = (0, import_node_crypto70.createHash)("sha256");
|
|
84525
84501
|
const walk4 = (dir, root) => {
|
|
84526
84502
|
for (const entry of import_node_fs119.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name < right.name ? -1 : 1)) {
|
|
84527
84503
|
const full = import_node_path121.default.join(dir, entry.name);
|
|
@@ -84968,7 +84944,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
|
|
|
84968
84944
|
...swiftSources.flags,
|
|
84969
84945
|
...swiftSources.sources.flatMap((source) => [
|
|
84970
84946
|
source,
|
|
84971
|
-
(0,
|
|
84947
|
+
(0, import_node_crypto70.createHash)("sha256").update(import_node_fs119.default.readFileSync(import_node_path121.default.join(binary2.dir, source))).digest("hex")
|
|
84972
84948
|
])
|
|
84973
84949
|
);
|
|
84974
84950
|
continue;
|
|
@@ -85004,7 +84980,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
|
|
|
85004
84980
|
);
|
|
85005
84981
|
}
|
|
85006
84982
|
}
|
|
85007
|
-
return (0,
|
|
84983
|
+
return (0, import_node_crypto70.createHash)("sha256").update(parts.join("\0")).digest("hex");
|
|
85008
84984
|
}
|
|
85009
84985
|
function missingArtifactGap(binary2) {
|
|
85010
84986
|
if (swiftBinaryOnDisk(binary2)) return null;
|
|
@@ -85086,7 +85062,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
85086
85062
|
return NO_IMPORTABLE_SURFACE;
|
|
85087
85063
|
}
|
|
85088
85064
|
const configured = new Map(Object.entries(behavior));
|
|
85089
|
-
const hash = (0,
|
|
85065
|
+
const hash = (0, import_node_crypto70.createHash)("sha256").update(
|
|
85090
85066
|
standinGenerationInputs([binary2], toolchain, behavior)
|
|
85091
85067
|
);
|
|
85092
85068
|
hash.update(digest3);
|
|
@@ -85326,7 +85302,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
85326
85302
|
);
|
|
85327
85303
|
if (binary2.moduleSources !== void 0)
|
|
85328
85304
|
frameworkInputs.push(
|
|
85329
|
-
`${binary2.target}\0${(0,
|
|
85305
|
+
`${binary2.target}\0${(0, import_node_crypto70.createHash)("sha256").update(
|
|
85330
85306
|
[iosSdkId(), ...swiftSources.flags, ...swiftSources.sources, ...texts].join(
|
|
85331
85307
|
"\0"
|
|
85332
85308
|
)
|
|
@@ -85367,7 +85343,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
85367
85343
|
import_node_fs119.default.mkdirSync(sourceFrameworks);
|
|
85368
85344
|
const frameworks = {
|
|
85369
85345
|
dirs: [...frameworkDirs, sourceFrameworks].sort(),
|
|
85370
|
-
digest: (0,
|
|
85346
|
+
digest: (0, import_node_crypto70.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
|
|
85371
85347
|
surfaces: frameworkSurfaces
|
|
85372
85348
|
};
|
|
85373
85349
|
const siblings = new Map(
|
|
@@ -85486,12 +85462,12 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
85486
85462
|
import_node_fs119.default.rmSync(modules, { recursive: true, force: true });
|
|
85487
85463
|
}
|
|
85488
85464
|
}
|
|
85489
|
-
var import_node_child_process56,
|
|
85465
|
+
var import_node_child_process56, import_node_crypto70, import_node_fs119, import_node_path121, TRIPLE, cacheDir5, key, digests, isBinaryLibraryFile, OBJC_IMPORT, files, OBJC, NO_IMPORTABLE_SURFACE, OBJC_ATTRIBUTE, TYPE_DECLARATION, OPTIONAL_REQUIREMENT, WASM_EH_FLAGS, OBJC_UNREPRESENTABLE, INERT_VALUE, identChar, RUST_TARGET, UNSEARCHED, RUST_TOOLCHAIN, built;
|
|
85490
85466
|
var init_swift_standins = __esm({
|
|
85491
85467
|
"src/swift-standins.ts"() {
|
|
85492
85468
|
"use strict";
|
|
85493
85469
|
import_node_child_process56 = require("node:child_process");
|
|
85494
|
-
|
|
85470
|
+
import_node_crypto70 = require("node:crypto");
|
|
85495
85471
|
import_node_fs119 = __toESM(require("node:fs"), 1);
|
|
85496
85472
|
import_node_path121 = __toESM(require("node:path"), 1);
|
|
85497
85473
|
init_forked_script_contract();
|
|
@@ -85523,7 +85499,7 @@ var init_swift_standins = __esm({
|
|
|
85523
85499
|
init_swiftTargetContract();
|
|
85524
85500
|
TRIPLE = SWIFT_WASM_TRIPLE;
|
|
85525
85501
|
cacheDir5 = import_node_path121.default.join(cacheDir(), "swift-standins");
|
|
85526
|
-
key = (...parts) => (0,
|
|
85502
|
+
key = (...parts) => (0, import_node_crypto70.createHash)("sha256").update(parts.join("\0")).digest("hex").slice(0, 32);
|
|
85527
85503
|
digests = /* @__PURE__ */ new Map();
|
|
85528
85504
|
isBinaryLibraryFile = (file) => /\.(?:a|dylib|o|tbd)$/i.test(file);
|
|
85529
85505
|
OBJC_IMPORT = /#\s*(?:import|include)\s*[<"](?:[\w+-]+\/)?([\w+.-]+\.h)[>"]/g;
|
|
@@ -85761,14 +85737,14 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
|
|
|
85761
85737
|
Infinity
|
|
85762
85738
|
);
|
|
85763
85739
|
const backport = DOUBLE_CONVERSION_WASM64_BACKPORT;
|
|
85764
|
-
if (import_node_path122.default.basename(file) !== "utils.h" || (0,
|
|
85740
|
+
if (import_node_path122.default.basename(file) !== "utils.h" || (0, import_node_crypto71.createHash)("sha256").update(bytes).digest("hex") !== backport.originalSha256) {
|
|
85765
85741
|
sources.set(file, bytes);
|
|
85766
85742
|
return;
|
|
85767
85743
|
}
|
|
85768
85744
|
const derived = Buffer.from(
|
|
85769
85745
|
bytes.toString("utf8").replace(backport.before, backport.after)
|
|
85770
85746
|
);
|
|
85771
|
-
if ((0,
|
|
85747
|
+
if ((0, import_node_crypto71.createHash)("sha256").update(derived).digest("hex") !== backport.derivedSha256)
|
|
85772
85748
|
throw new Error(`DoubleConversion backport derived source differs: ${file}`);
|
|
85773
85749
|
sources.set(file, derived);
|
|
85774
85750
|
derivations[file] = {
|
|
@@ -86174,7 +86150,7 @@ function prepareXcodeSwiftProducts(app, binaries, moduleRoot) {
|
|
|
86174
86150
|
const staged = withFrameworkCompanionImports(original);
|
|
86175
86151
|
if (staged !== original) sources.set(file, Buffer.from(staged));
|
|
86176
86152
|
}
|
|
86177
|
-
const digest3 = (bytes) => (0,
|
|
86153
|
+
const digest3 = (bytes) => (0, import_node_crypto71.createHash)("sha256").update(bytes).digest("hex");
|
|
86178
86154
|
const providers = /* @__PURE__ */ new Map();
|
|
86179
86155
|
for (const target of targets) {
|
|
86180
86156
|
if (!supplied.has(target.moduleName)) continue;
|
|
@@ -86528,7 +86504,7 @@ async function prepareXcodeNativeInputs(app, binaries, moduleRoot, purpose) {
|
|
|
86528
86504
|
products
|
|
86529
86505
|
);
|
|
86530
86506
|
const checkouts = remoteSwiftCheckouts(app.rootDir);
|
|
86531
|
-
const digest3 = (bytes) => (0,
|
|
86507
|
+
const digest3 = (bytes) => (0, import_node_crypto71.createHash)("sha256").update(bytes).digest("hex");
|
|
86532
86508
|
const inputs2 = Object.fromEntries(
|
|
86533
86509
|
[...sources].map(([file, bytes]) => [file, digest3(bytes)])
|
|
86534
86510
|
);
|
|
@@ -86892,12 +86868,12 @@ ${reported.trimEnd() || `Clang exited with status ${result.status}`}`;
|
|
|
86892
86868
|
import_node_fs120.default.closeSync(descriptor);
|
|
86893
86869
|
}
|
|
86894
86870
|
}
|
|
86895
|
-
var import_node_child_process57,
|
|
86871
|
+
var import_node_child_process57, import_node_crypto71, import_node_fs120, import_node_path122, SwiftObjCCompilationError, isDirectory4, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT;
|
|
86896
86872
|
var init_swift_objc_compile = __esm({
|
|
86897
86873
|
"src/swift-objc-compile.ts"() {
|
|
86898
86874
|
"use strict";
|
|
86899
86875
|
import_node_child_process57 = require("node:child_process");
|
|
86900
|
-
|
|
86876
|
+
import_node_crypto71 = require("node:crypto");
|
|
86901
86877
|
import_node_fs120 = __toESM(require("node:fs"), 1);
|
|
86902
86878
|
import_node_path122 = __toESM(require("node:path"), 1);
|
|
86903
86879
|
init_mapLimit();
|
|
@@ -87399,7 +87375,7 @@ function collectInstalledSwiftBridgeUnits(appRoot, units, installedNamespaces, s
|
|
|
87399
87375
|
const dependencies = manifest && typeof manifest === "object" ? Reflect.get(manifest, "dependencies") : null;
|
|
87400
87376
|
if (!dependencies || typeof dependencies !== "object" || Array.isArray(dependencies))
|
|
87401
87377
|
return;
|
|
87402
|
-
const appRequire = (0,
|
|
87378
|
+
const appRequire = (0, import_node_module14.createRequire)(manifestPath);
|
|
87403
87379
|
const namespacesSeen = new Set(units.map((unit2) => unit2.namespace));
|
|
87404
87380
|
for (const packageName2 of Object.keys(dependencies).sort()) {
|
|
87405
87381
|
signal?.throwIfAborted();
|
|
@@ -87493,12 +87469,12 @@ public func ${register}() -> RCTModuleHost.Registration {
|
|
|
87493
87469
|
}
|
|
87494
87470
|
}
|
|
87495
87471
|
}
|
|
87496
|
-
var import_node_fs121,
|
|
87472
|
+
var import_node_fs121, import_node_module14, import_node_path123, DIRECTIVE, swiftString, BRIDGE_MODULE_FILE_PREFIX;
|
|
87497
87473
|
var init_react_native_bridge_modules = __esm({
|
|
87498
87474
|
"src/react-native-bridge-modules.ts"() {
|
|
87499
87475
|
"use strict";
|
|
87500
87476
|
import_node_fs121 = __toESM(require("node:fs"), 1);
|
|
87501
|
-
|
|
87477
|
+
import_node_module14 = require("node:module");
|
|
87502
87478
|
import_node_path123 = __toESM(require("node:path"), 1);
|
|
87503
87479
|
init_answeredNativePackages();
|
|
87504
87480
|
init_swift_compile();
|
|
@@ -91027,11 +91003,11 @@ function coreDataModelDirectories(files2) {
|
|
|
91027
91003
|
}
|
|
91028
91004
|
return [...models].sort();
|
|
91029
91005
|
}
|
|
91030
|
-
var
|
|
91006
|
+
var import_node_crypto72, import_node_fs124, import_node_path126, attributeTypes, deleteRules, EXTERNAL_BINARY, PRESERVE_AFTER_DELETION, yes, common, uid, NULL, classChains, KeyedArchive, sha2563;
|
|
91031
91007
|
var init_core_data_model = __esm({
|
|
91032
91008
|
"src/core-data-model.ts"() {
|
|
91033
91009
|
"use strict";
|
|
91034
|
-
|
|
91010
|
+
import_node_crypto72 = require("node:crypto");
|
|
91035
91011
|
import_node_fs124 = require("node:fs");
|
|
91036
91012
|
import_node_path126 = __toESM(require("node:path"), 1);
|
|
91037
91013
|
init_core_data_entity_classes();
|
|
@@ -91150,7 +91126,7 @@ var init_core_data_model = __esm({
|
|
|
91150
91126
|
});
|
|
91151
91127
|
}
|
|
91152
91128
|
};
|
|
91153
|
-
sha2563 = (...parts) => (0,
|
|
91129
|
+
sha2563 = (...parts) => (0, import_node_crypto72.createHash)("sha256").update(
|
|
91154
91130
|
Buffer.concat(
|
|
91155
91131
|
parts.map(
|
|
91156
91132
|
(part) => Array.isArray(part) ? Buffer.from(part) : Buffer.from(part)
|
|
@@ -93348,7 +93324,7 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
93348
93324
|
(binary2) => binary2.publicHeaders === void 0 && binary2.placeholder === void 0 && swiftBinaryOnDisk(binary2) && binaryHeaderSearchPaths(binary2, staged, app.rootDir).headers.length === 1
|
|
93349
93325
|
))
|
|
93350
93326
|
return [...binaries];
|
|
93351
|
-
const hash = (0,
|
|
93327
|
+
const hash = (0, import_node_crypto73.createHash)("sha256");
|
|
93352
93328
|
hash.update(
|
|
93353
93329
|
JSON.stringify([
|
|
93354
93330
|
inputs2.targets,
|
|
@@ -93557,12 +93533,12 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
93557
93533
|
);
|
|
93558
93534
|
return result;
|
|
93559
93535
|
}
|
|
93560
|
-
var import_node_child_process59,
|
|
93536
|
+
var import_node_child_process59, import_node_crypto73, import_node_fs125, import_node_path127, cachedInputs;
|
|
93561
93537
|
var init_swift_cxx_reachable = __esm({
|
|
93562
93538
|
"src/swift-cxx-reachable.ts"() {
|
|
93563
93539
|
"use strict";
|
|
93564
93540
|
import_node_child_process59 = require("node:child_process");
|
|
93565
|
-
|
|
93541
|
+
import_node_crypto73 = require("node:crypto");
|
|
93566
93542
|
import_node_fs125 = __toESM(require("node:fs"), 1);
|
|
93567
93543
|
import_node_path127 = __toESM(require("node:path"), 1);
|
|
93568
93544
|
init_is_record();
|
|
@@ -94030,7 +94006,7 @@ function fetchSwiftSdkDataPlan({ url, dataPlan }) {
|
|
|
94030
94006
|
if (!response.ok)
|
|
94031
94007
|
throw new Error(`Swift SDK data plan ${address} answered ${response.status}`);
|
|
94032
94008
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
94033
|
-
if ((0,
|
|
94009
|
+
if ((0, import_node_crypto74.createHash)("sha256").update(bytes).digest("hex") !== dataPlan)
|
|
94034
94010
|
throw new Error(`Swift SDK data plan ${address} failed its digest check`);
|
|
94035
94011
|
return bytes;
|
|
94036
94012
|
});
|
|
@@ -94128,7 +94104,7 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
|
|
|
94128
94104
|
encode2(now),
|
|
94129
94105
|
encodeNativeSdkLater({
|
|
94130
94106
|
files: later.map((bytes) => ({
|
|
94131
|
-
sha256: (0,
|
|
94107
|
+
sha256: (0, import_node_crypto74.createHash)("sha256").update(bytes).digest("hex"),
|
|
94132
94108
|
byteLength: bytes.length
|
|
94133
94109
|
})),
|
|
94134
94110
|
...needs && {
|
|
@@ -94144,11 +94120,11 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
|
|
|
94144
94120
|
later
|
|
94145
94121
|
};
|
|
94146
94122
|
}
|
|
94147
|
-
var
|
|
94123
|
+
var import_node_crypto74, ADDRESS_REACH, sdkPieces, firstAtOrAfter, pieceAt, LATER_GROUP_BYTES, MAX_LATER_GROUPS, publishedPlans;
|
|
94148
94124
|
var init_swift_sdk_later_data = __esm({
|
|
94149
94125
|
"src/swift-sdk-later-data.ts"() {
|
|
94150
94126
|
"use strict";
|
|
94151
|
-
|
|
94127
|
+
import_node_crypto74 = require("node:crypto");
|
|
94152
94128
|
init_nativeSdkBindingContract();
|
|
94153
94129
|
init_nativeWasmContract();
|
|
94154
94130
|
init_swift_sdk_image();
|
|
@@ -94746,7 +94722,7 @@ function gpuChromeLaunchOptions(opts = {}, runtime = currentRuntime()) {
|
|
|
94746
94722
|
async function launchWithPauseAwareDeadline(launch, opts) {
|
|
94747
94723
|
const budget = typeof opts.timeout === "number" ? opts.timeout : DEFAULT_LAUNCH_TIMEOUT_MS;
|
|
94748
94724
|
if (budget === 0) return launch(opts);
|
|
94749
|
-
const marker = `--peach-launch-id=${(0,
|
|
94725
|
+
const marker = `--peach-launch-id=${(0, import_node_crypto75.randomUUID)()}`;
|
|
94750
94726
|
let expired = false;
|
|
94751
94727
|
const cleanupAttempted = [];
|
|
94752
94728
|
const lookupFailed = [];
|
|
@@ -94903,13 +94879,13 @@ async function launchReapedChrome(launch, opts = {}, rendererTarget, policy = {}
|
|
|
94903
94879
|
policy.admission
|
|
94904
94880
|
);
|
|
94905
94881
|
}
|
|
94906
|
-
var childProcess, import_node_child_process62,
|
|
94882
|
+
var childProcess, import_node_child_process62, import_node_crypto75, fs79, os21, path112, LINUX_CHROME_SCOPE_ENV, discoveredChromePids, discoveredChromeProcesses, reapPids, installed, signalShutdownClaimed, PLAYWRIGHT_DISABLED_FEATURES, PLAYWRIGHT_ENABLED_FEATURES, DISABLED_FEATURES, DEFAULT_LAUNCH_TIMEOUT_MS;
|
|
94907
94883
|
var init_reap_browser = __esm({
|
|
94908
94884
|
"src/reap-browser.ts"() {
|
|
94909
94885
|
"use strict";
|
|
94910
94886
|
childProcess = __toESM(require("node:child_process"), 1);
|
|
94911
94887
|
import_node_child_process62 = require("node:child_process");
|
|
94912
|
-
|
|
94888
|
+
import_node_crypto75 = require("node:crypto");
|
|
94913
94889
|
fs79 = __toESM(require("node:fs"), 1);
|
|
94914
94890
|
os21 = __toESM(require("node:os"), 1);
|
|
94915
94891
|
path112 = __toESM(require("node:path"), 1);
|
|
@@ -94975,14 +94951,14 @@ function resolvePlaywright() {
|
|
|
94975
94951
|
roots.push(`${pinnedRoot}/`);
|
|
94976
94952
|
for (const root of roots) {
|
|
94977
94953
|
try {
|
|
94978
|
-
const requireFromRoot = (0,
|
|
94954
|
+
const requireFromRoot = (0, import_node_module15.createRequire)(root);
|
|
94979
94955
|
for (const spec of ["playwright", "playwright-chromium", "playwright-core"]) {
|
|
94980
94956
|
try {
|
|
94981
94957
|
const modulePath = requireFromRoot.resolve(spec);
|
|
94982
94958
|
const packageJsonPath = requireFromRoot.resolve(`${spec}/package.json`);
|
|
94983
94959
|
const parsed2 = JSON.parse((0, import_node_fs129.readFileSync)(packageJsonPath, "utf8"));
|
|
94984
94960
|
if (!isRecord(parsed2) || typeof parsed2.version !== "string") continue;
|
|
94985
|
-
const corePackagePath = (0,
|
|
94961
|
+
const corePackagePath = (0, import_node_module15.createRequire)(modulePath).resolve(
|
|
94986
94962
|
"playwright-core/package.json"
|
|
94987
94963
|
);
|
|
94988
94964
|
const cliPath = (0, import_node_path129.join)((0, import_node_path129.dirname)(corePackagePath), "cli.js");
|
|
@@ -95210,7 +95186,7 @@ async function launchProvisionedPlaywright(options2 = {}) {
|
|
|
95210
95186
|
const env = { ...process.env };
|
|
95211
95187
|
const browser = await ensurePlaywrightBrowser(resolved, softwareChromeAllowed(), env);
|
|
95212
95188
|
if (!browser.ok) throw new Error(browser.message);
|
|
95213
|
-
const playwright = (0,
|
|
95189
|
+
const playwright = (0, import_node_module15.createRequire)(resolved.modulePath)(
|
|
95214
95190
|
resolved.modulePath
|
|
95215
95191
|
);
|
|
95216
95192
|
const browserEnv = browser.libraryPath ? {
|
|
@@ -95222,13 +95198,13 @@ async function launchProvisionedPlaywright(options2 = {}) {
|
|
|
95222
95198
|
{ ...options2, headless: true }
|
|
95223
95199
|
);
|
|
95224
95200
|
}
|
|
95225
|
-
var import_node_child_process63, import_node_fs129,
|
|
95201
|
+
var import_node_child_process63, import_node_fs129, import_node_module15, import_node_path129, CHROMIUM_PATHS_KEPT;
|
|
95226
95202
|
var init_playwright_provisioning = __esm({
|
|
95227
95203
|
"cli/drivers/playwright-provisioning.ts"() {
|
|
95228
95204
|
"use strict";
|
|
95229
95205
|
import_node_child_process63 = require("node:child_process");
|
|
95230
95206
|
import_node_fs129 = require("node:fs");
|
|
95231
|
-
|
|
95207
|
+
import_node_module15 = require("node:module");
|
|
95232
95208
|
import_node_path129 = require("node:path");
|
|
95233
95209
|
init_src();
|
|
95234
95210
|
init_home_paths();
|
|
@@ -96393,7 +96369,7 @@ async function splitNativeWasm(input, directory2, profile, binaryen, shared, kee
|
|
|
96393
96369
|
sides.push({
|
|
96394
96370
|
...part,
|
|
96395
96371
|
slots: slots2,
|
|
96396
|
-
sha256: (0,
|
|
96372
|
+
sha256: (0, import_node_crypto76.createHash)("sha256").update(bytes2).digest("hex")
|
|
96397
96373
|
});
|
|
96398
96374
|
}
|
|
96399
96375
|
if (!sides.length) return { primary: describePart(input), sides: [] };
|
|
@@ -96459,12 +96435,12 @@ function describePart(file) {
|
|
|
96459
96435
|
);
|
|
96460
96436
|
return { file, functions, byteLength: bytes.byteLength };
|
|
96461
96437
|
}
|
|
96462
|
-
var import_node_child_process64,
|
|
96438
|
+
var import_node_child_process64, import_node_crypto76, import_node_fs130, import_node_path130, import_node_util14, run10, MAX_MODULE_FUNCTIONS, MAX_START_FUNCTIONS, SIDE_FUNCTIONS, SIDE_CODE_BYTES, FEATURES2, featuresOf;
|
|
96463
96439
|
var init_wasm_lazy_split = __esm({
|
|
96464
96440
|
"src/wasm-lazy-split.ts"() {
|
|
96465
96441
|
"use strict";
|
|
96466
96442
|
import_node_child_process64 = require("node:child_process");
|
|
96467
|
-
|
|
96443
|
+
import_node_crypto76 = require("node:crypto");
|
|
96468
96444
|
import_node_fs130 = require("node:fs");
|
|
96469
96445
|
import_node_path130 = require("node:path");
|
|
96470
96446
|
import_node_util14 = require("node:util");
|
|
@@ -96576,7 +96552,7 @@ async function splitSwiftSdkImage(bytes, directory2, launch, app) {
|
|
|
96576
96552
|
const names = () => (0, import_node_fs131.readdirSync)(profiles2).filter((name3) => !name3.startsWith(".") && name3.endsWith(".profile")).sort();
|
|
96577
96553
|
const union = () => {
|
|
96578
96554
|
const files2 = names().map((name3) => (0, import_node_path131.join)(profiles2, name3));
|
|
96579
|
-
const hash = (0,
|
|
96555
|
+
const hash = (0, import_node_crypto77.createHash)("sha256");
|
|
96580
96556
|
for (const file of files2) hash.update((0, import_node_fs131.readFileSync)(file));
|
|
96581
96557
|
const cache = (0, import_node_path131.join)(
|
|
96582
96558
|
directory2,
|
|
@@ -96843,11 +96819,11 @@ async function bootSwiftPreview(launch, profile) {
|
|
|
96843
96819
|
server.close();
|
|
96844
96820
|
}
|
|
96845
96821
|
}
|
|
96846
|
-
var
|
|
96822
|
+
var import_node_crypto77, import_node_fs131, import_node_http3, import_node_https2, import_node_os26, import_node_path131, packageName, guestPath, appPath, profileWindowMs, postPaintProfileMs, digest2, partDigest, platform;
|
|
96847
96823
|
var init_swift_startup_split = __esm({
|
|
96848
96824
|
"src/swift-startup-split.ts"() {
|
|
96849
96825
|
"use strict";
|
|
96850
|
-
|
|
96826
|
+
import_node_crypto77 = require("node:crypto");
|
|
96851
96827
|
import_node_fs131 = require("node:fs");
|
|
96852
96828
|
import_node_http3 = require("node:http");
|
|
96853
96829
|
import_node_https2 = require("node:https");
|
|
@@ -96872,7 +96848,7 @@ var init_swift_startup_split = __esm({
|
|
|
96872
96848
|
appPath = "/__peach/swift/startup.wasm";
|
|
96873
96849
|
profileWindowMs = 3e4;
|
|
96874
96850
|
postPaintProfileMs = 850;
|
|
96875
|
-
digest2 = (bytes) => (0,
|
|
96851
|
+
digest2 = (bytes) => (0, import_node_crypto77.createHash)("sha256").update(bytes).digest("hex");
|
|
96876
96852
|
partDigest = /^[a-f0-9]{64}$/;
|
|
96877
96853
|
platform = `${process.platform}-${process.arch}`;
|
|
96878
96854
|
}
|
|
@@ -97027,7 +97003,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
97027
97003
|
const clang = import_node_path132.default.join(toolchainBin, "clang");
|
|
97028
97004
|
const empty = (binary2, file) => {
|
|
97029
97005
|
const source = import_node_path132.default.join(binary2.dir, file);
|
|
97030
|
-
const key2 = (0,
|
|
97006
|
+
const key2 = (0, import_node_crypto78.createHash)("sha256").update(
|
|
97031
97007
|
JSON.stringify([
|
|
97032
97008
|
clang,
|
|
97033
97009
|
sdk2.sysroot,
|
|
@@ -97072,7 +97048,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
97072
97048
|
return new Set(portable.flat());
|
|
97073
97049
|
}
|
|
97074
97050
|
async function swiftPackages(entry, app) {
|
|
97075
|
-
const stamp = (file) => import_node_fs132.default.existsSync(file) ? (0,
|
|
97051
|
+
const stamp = (file) => import_node_fs132.default.existsSync(file) ? (0, import_node_crypto78.createHash)("sha256").update(import_node_fs132.default.readFileSync(file)).digest("hex") : null;
|
|
97076
97052
|
const owners = [...app.frameworks, app].map((target) => ({
|
|
97077
97053
|
module: target.moduleName,
|
|
97078
97054
|
products: target.packageProducts ?? []
|
|
@@ -98235,7 +98211,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
98235
98211
|
const source = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(
|
|
98236
98212
|
bytes
|
|
98237
98213
|
);
|
|
98238
|
-
const sha2565 = (0,
|
|
98214
|
+
const sha2565 = (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex");
|
|
98239
98215
|
const bundle = swiftResourceBundleForFile(bundles, key2);
|
|
98240
98216
|
if (!bundle && inputs2["Package.swift"])
|
|
98241
98217
|
throw new Error(`metal source ${key2} has no resource target bundle`);
|
|
@@ -98258,7 +98234,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
98258
98234
|
const bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
|
|
98259
98235
|
pdfs.set(file, {
|
|
98260
98236
|
file: disk,
|
|
98261
|
-
sha256: (0,
|
|
98237
|
+
sha256: (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex")
|
|
98262
98238
|
});
|
|
98263
98239
|
}
|
|
98264
98240
|
const pdfRasters = rasterizePdfFiles([...pdfs.values()], limits);
|
|
@@ -98304,7 +98280,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
98304
98280
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
98305
98281
|
}
|
|
98306
98282
|
imageBytes += bytes.length;
|
|
98307
|
-
const hash = (0,
|
|
98283
|
+
const hash = (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
|
|
98308
98284
|
const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
|
|
98309
98285
|
const variant2 = {
|
|
98310
98286
|
uri: `${baseUrl}${RESOURCE_PATH}${hash}${ext}`,
|
|
@@ -98612,7 +98588,7 @@ function updateSwiftConfigStamp(hash, packagePath) {
|
|
|
98612
98588
|
hash.update(JSON.stringify(gates.map((name3) => swiftWasm64PlatformGates[name3])));
|
|
98613
98589
|
}
|
|
98614
98590
|
function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
98615
|
-
const hash = (0,
|
|
98591
|
+
const hash = (0, import_node_crypto78.createHash)("sha256");
|
|
98616
98592
|
hash.update(packagePath);
|
|
98617
98593
|
updateSwiftConfigStamp(hash, packagePath);
|
|
98618
98594
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -98641,7 +98617,7 @@ function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
|
98641
98617
|
return hash.digest("hex").slice(0, 16);
|
|
98642
98618
|
}
|
|
98643
98619
|
function sourceContentStamp(packagePath, moduleRootOverride) {
|
|
98644
|
-
const hash = (0,
|
|
98620
|
+
const hash = (0, import_node_crypto78.createHash)("sha256");
|
|
98645
98621
|
hash.update(compilerSourceDigest);
|
|
98646
98622
|
updateSwiftConfigStamp(hash, packagePath);
|
|
98647
98623
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -98673,7 +98649,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
98673
98649
|
(root) => import_node_fs132.default.existsSync(import_node_path132.default.join(root, "toolchain.json"))
|
|
98674
98650
|
);
|
|
98675
98651
|
if (!moduleRoot) return "";
|
|
98676
|
-
const hash = (0,
|
|
98652
|
+
const hash = (0, import_node_crypto78.createHash)("sha256");
|
|
98677
98653
|
hash.update(moduleRoot);
|
|
98678
98654
|
for (const relative5 of swiftModuleInputFiles(moduleRoot)) {
|
|
98679
98655
|
hash.update(relative5);
|
|
@@ -98683,7 +98659,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
98683
98659
|
}
|
|
98684
98660
|
function otherInputs(input, standalone) {
|
|
98685
98661
|
const { files: _files, ...rest } = input;
|
|
98686
|
-
return (0,
|
|
98662
|
+
return (0, import_node_crypto78.createHash)("sha256").update(JSON.stringify({ ...rest, standalone })).digest("hex");
|
|
98687
98663
|
}
|
|
98688
98664
|
function icuUrl(origin, artifact) {
|
|
98689
98665
|
return "url" in artifact.icu ? artifact.icu.url : `${origin}${ICU_PATH}${swiftIcuAddress(artifact.icu)}`;
|
|
@@ -98698,7 +98674,7 @@ function standinLibraries(binaries, standins, rootDir, toolchain, rustWasm64) {
|
|
|
98698
98674
|
for (const standin of standins) {
|
|
98699
98675
|
if (!standin.prebuilt) continue;
|
|
98700
98676
|
const bytes = Buffer.from(standin.prebuilt.library, "base64");
|
|
98701
|
-
const digest3 = (0,
|
|
98677
|
+
const digest3 = (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex");
|
|
98702
98678
|
const dir = import_node_path132.default.join(swiftCacheDir(), "native-archives", digest3);
|
|
98703
98679
|
import_node_fs132.default.mkdirSync(dir, { recursive: true });
|
|
98704
98680
|
const library = import_node_path132.default.join(dir, `lib${standin.module}.a`);
|
|
@@ -99029,7 +99005,7 @@ function swiftBuildRoot(packagePath, moduleRoot) {
|
|
|
99029
99005
|
return import_node_path132.default.join(
|
|
99030
99006
|
swiftCacheDir(),
|
|
99031
99007
|
"swift-builds",
|
|
99032
|
-
(0,
|
|
99008
|
+
(0, import_node_crypto78.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
|
|
99033
99009
|
);
|
|
99034
99010
|
}
|
|
99035
99011
|
function installedWorkspaceInput(packagePath, entry, moduleRoot) {
|
|
@@ -99331,7 +99307,7 @@ async function fetchSwiftDyldTable(moduleUrl, module2, signal) {
|
|
|
99331
99307
|
const response = await fetch(url, { signal });
|
|
99332
99308
|
if (!response.ok) throw new Error(`swift compile: ${url} answered ${response.status}`);
|
|
99333
99309
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
99334
|
-
if (bytes.length !== byteLength || (0,
|
|
99310
|
+
if (bytes.length !== byteLength || (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex") !== sha2565)
|
|
99335
99311
|
throw new Error(`swift compile: ${url} does not match its module's index`);
|
|
99336
99312
|
return { dyldTable: { sha256: sha2565, bytes } };
|
|
99337
99313
|
}
|
|
@@ -99562,7 +99538,7 @@ async function swiftPackageMetadata(packagePath, packageName2, moduleRoot, origi
|
|
|
99562
99538
|
});
|
|
99563
99539
|
const image = {
|
|
99564
99540
|
...artifact,
|
|
99565
|
-
hash: (0,
|
|
99541
|
+
hash: (0, import_node_crypto78.createHash)("sha256").update(result.primary).digest("hex"),
|
|
99566
99542
|
bytes: result.primary,
|
|
99567
99543
|
parts: result.parts
|
|
99568
99544
|
};
|
|
@@ -99590,10 +99566,10 @@ async function splitSdkBinding(sdk2, splitKey, plan) {
|
|
|
99590
99566
|
sdk2.binding.bytes,
|
|
99591
99567
|
plan
|
|
99592
99568
|
);
|
|
99593
|
-
const digest3 = (0,
|
|
99569
|
+
const digest3 = (0, import_node_crypto78.createHash)("sha256").update(split.binding).digest("hex");
|
|
99594
99570
|
sdkBindingFiles.set(digest3, split.binding);
|
|
99595
99571
|
for (const later of split.later)
|
|
99596
|
-
sdkBindingFiles.set((0,
|
|
99572
|
+
sdkBindingFiles.set((0, import_node_crypto78.createHash)("sha256").update(later).digest("hex"), later);
|
|
99597
99573
|
sdkSplitBindings.set(key2, digest3);
|
|
99598
99574
|
}
|
|
99599
99575
|
function swiftCodePartAssets(origin, appParts, sdkDigest) {
|
|
@@ -99621,7 +99597,7 @@ function swiftSdkEntryAssets(origin, image, sdkDigest = image.sdk?.sha256) {
|
|
|
99621
99597
|
}
|
|
99622
99598
|
function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch, runtimeRootOverride) {
|
|
99623
99599
|
const { key: key2 } = sdk2;
|
|
99624
|
-
const app = (0,
|
|
99600
|
+
const app = (0, import_node_crypto78.createHash)("sha256").update(
|
|
99625
99601
|
JSON.stringify([packagePath, launch.environment, runtimeRootOverride?.origin])
|
|
99626
99602
|
).update(launch.guest?.source ?? "").digest("hex").slice(0, 16);
|
|
99627
99603
|
const cacheKey = `${key2}/${app}`;
|
|
@@ -99648,7 +99624,7 @@ function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch, runt
|
|
|
99648
99624
|
},
|
|
99649
99625
|
app
|
|
99650
99626
|
);
|
|
99651
|
-
const name3 = (0,
|
|
99627
|
+
const name3 = (0, import_node_crypto78.createHash)("sha256").update(split.primary).digest("hex");
|
|
99652
99628
|
sdkPieces2.set(name3, split.primary);
|
|
99653
99629
|
for (const [digest3, bytes] of split.parts) sdkPieces2.set(digest3, bytes);
|
|
99654
99630
|
sdkStartupParts.set(name3, split.parts);
|
|
@@ -99816,13 +99792,13 @@ async function serveSwiftPackageAsset(pathname, res) {
|
|
|
99816
99792
|
res.end("swift artifact is stale");
|
|
99817
99793
|
return true;
|
|
99818
99794
|
}
|
|
99819
|
-
var import_node_async_hooks2, import_node_child_process65,
|
|
99795
|
+
var import_node_async_hooks2, import_node_child_process65, import_node_crypto78, import_node_fs132, import_node_os27, import_node_path132, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SDK_PATH, SDK_BINDING_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, startupImages, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS, sdkStartups, sdkStartupParts, sdkStartupPlans, sdkPieces2, sdkSplitBindings, sdkBindingFiles, servedSdkBinding;
|
|
99820
99796
|
var init_swift_host = __esm({
|
|
99821
99797
|
"src/swift-host.ts"() {
|
|
99822
99798
|
"use strict";
|
|
99823
99799
|
import_node_async_hooks2 = require("node:async_hooks");
|
|
99824
99800
|
import_node_child_process65 = require("node:child_process");
|
|
99825
|
-
|
|
99801
|
+
import_node_crypto78 = require("node:crypto");
|
|
99826
99802
|
import_node_fs132 = __toESM(require("node:fs"), 1);
|
|
99827
99803
|
import_node_os27 = __toESM(require("node:os"), 1);
|
|
99828
99804
|
import_node_path132 = __toESM(require("node:path"), 1);
|
|
@@ -100281,7 +100257,7 @@ function installedNativeLibraries(providers, projectRoot, moduleRoot, iosTarget,
|
|
|
100281
100257
|
const podsRoot = import_node_path134.default.dirname(app.cocoapods.manifestLock);
|
|
100282
100258
|
const localPods = app.cocoapods.localPodspecs;
|
|
100283
100259
|
const reactNativeRoot = import_node_path134.default.dirname(
|
|
100284
|
-
(0,
|
|
100260
|
+
(0, import_node_module16.createRequire)(import_node_path134.default.join(projectRoot, "package.json")).resolve(
|
|
100285
100261
|
"react-native/package.json"
|
|
100286
100262
|
)
|
|
100287
100263
|
);
|
|
@@ -100491,12 +100467,12 @@ function installedPodBinaries(directory2) {
|
|
|
100491
100467
|
}
|
|
100492
100468
|
return binaries.sort();
|
|
100493
100469
|
}
|
|
100494
|
-
var import_node_fs134,
|
|
100470
|
+
var import_node_fs134, import_node_module16, import_node_path134, BINARY_BUNDLE, SOURCE;
|
|
100495
100471
|
var init_installed_native_libraries = __esm({
|
|
100496
100472
|
"src/installed-native-libraries.ts"() {
|
|
100497
100473
|
"use strict";
|
|
100498
100474
|
import_node_fs134 = __toESM(require("node:fs"), 1);
|
|
100499
|
-
|
|
100475
|
+
import_node_module16 = require("node:module");
|
|
100500
100476
|
import_node_path134 = __toESM(require("node:path"), 1);
|
|
100501
100477
|
init_is_record();
|
|
100502
100478
|
init_native_static_libraries();
|
|
@@ -100579,7 +100555,7 @@ function hashTree(root) {
|
|
|
100579
100555
|
for (const entry of import_node_fs135.default.readdirSync(root, { recursive: true, withFileTypes: true })) {
|
|
100580
100556
|
if (!entry.isFile()) continue;
|
|
100581
100557
|
const file = import_node_path135.default.join(entry.parentPath, entry.name);
|
|
100582
|
-
hashes[import_node_path135.default.relative(root, file).split(import_node_path135.default.sep).join("/")] = (0,
|
|
100558
|
+
hashes[import_node_path135.default.relative(root, file).split(import_node_path135.default.sep).join("/")] = (0, import_node_crypto79.createHash)("sha256").update(import_node_fs135.default.readFileSync(file)).digest("hex");
|
|
100583
100559
|
}
|
|
100584
100560
|
return Object.fromEntries(Object.entries(hashes).sort(([a], [b]) => a < b ? -1 : 1));
|
|
100585
100561
|
}
|
|
@@ -100589,7 +100565,7 @@ function realTarget(target) {
|
|
|
100589
100565
|
return import_node_path135.default.join(realTarget(import_node_path135.default.dirname(resolved)), import_node_path135.default.basename(resolved));
|
|
100590
100566
|
}
|
|
100591
100567
|
async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
100592
|
-
const manifestPath = (0,
|
|
100568
|
+
const manifestPath = (0, import_node_module17.createRequire)(import_node_path135.default.join(appRoot, "package.json")).resolve(
|
|
100593
100569
|
"react-native/package.json"
|
|
100594
100570
|
);
|
|
100595
100571
|
const manifest = JSON.parse(import_node_fs135.default.readFileSync(manifestPath, "utf8"));
|
|
@@ -100629,14 +100605,14 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
100629
100605
|
files: hashTree(generatedRoot)
|
|
100630
100606
|
};
|
|
100631
100607
|
}
|
|
100632
|
-
var import_node_child_process66,
|
|
100608
|
+
var import_node_child_process66, import_node_crypto79, import_node_fs135, import_node_module17, import_node_path135, import_node_util15, run11, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
|
|
100633
100609
|
var init_turbo_codegen_intake = __esm({
|
|
100634
100610
|
"src/turbo-codegen-intake.ts"() {
|
|
100635
100611
|
"use strict";
|
|
100636
100612
|
import_node_child_process66 = require("node:child_process");
|
|
100637
|
-
|
|
100613
|
+
import_node_crypto79 = require("node:crypto");
|
|
100638
100614
|
import_node_fs135 = __toESM(require("node:fs"), 1);
|
|
100639
|
-
|
|
100615
|
+
import_node_module17 = require("node:module");
|
|
100640
100616
|
import_node_path135 = __toESM(require("node:path"), 1);
|
|
100641
100617
|
import_node_util15 = require("node:util");
|
|
100642
100618
|
init_forked_script_contract();
|
|
@@ -104474,11 +104450,11 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
|
|
|
104474
104450
|
}
|
|
104475
104451
|
`;
|
|
104476
104452
|
}
|
|
104477
|
-
var
|
|
104453
|
+
var import_node_crypto80, import_node_fs136, import_node_path136, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER5, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, podspecList, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_HOST_INCLUDES, FABRIC_HOST_PAPER_INCLUDES, PAPER_UIKIT_BRIDGE_SWIFT;
|
|
104478
104454
|
var init_turbo_source = __esm({
|
|
104479
104455
|
"src/turbo-source.ts"() {
|
|
104480
104456
|
"use strict";
|
|
104481
|
-
|
|
104457
|
+
import_node_crypto80 = require("node:crypto");
|
|
104482
104458
|
import_node_fs136 = __toESM(require("node:fs"), 1);
|
|
104483
104459
|
import_node_path136 = __toESM(require("node:path"), 1);
|
|
104484
104460
|
init_cocoapods_trunk();
|
|
@@ -104606,7 +104582,7 @@ var init_turbo_source = __esm({
|
|
|
104606
104582
|
];
|
|
104607
104583
|
DECLARED_MODULE_NAME = /\bName\(\s*"(\w+)"\s*\)/g;
|
|
104608
104584
|
EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
|
|
104609
|
-
sha2564 = (data) => (0,
|
|
104585
|
+
sha2564 = (data) => (0, import_node_crypto80.createHash)("sha256").update(data).digest("hex");
|
|
104610
104586
|
podspecList = podspecAttribute;
|
|
104611
104587
|
versionParts = (version2) => version2.split(/[.-]/).map((p) => Number(p) || 0);
|
|
104612
104588
|
iosOf = (member) => object6(member.ios) ? member.ios : null;
|
|
@@ -105365,7 +105341,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped) {
|
|
|
105365
105341
|
const reactNative = [options2.appRoot, options2.projectRoot].map(
|
|
105366
105342
|
(root) => import_node_path137.default.dirname(
|
|
105367
105343
|
import_node_fs137.default.realpathSync(
|
|
105368
|
-
(0,
|
|
105344
|
+
(0, import_node_module18.createRequire)(import_node_path137.default.join(root, "package.json")).resolve(
|
|
105369
105345
|
"react-native/package.json"
|
|
105370
105346
|
)
|
|
105371
105347
|
)
|
|
@@ -105400,7 +105376,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped) {
|
|
|
105400
105376
|
}
|
|
105401
105377
|
async function prepareTurboCompileInput(options2) {
|
|
105402
105378
|
await prepareTurboSourceDependencies(options2.reactNativeRoot);
|
|
105403
|
-
const key2 = (0,
|
|
105379
|
+
const key2 = (0, import_node_crypto81.createHash)("sha256").update(options2.providers.map(({ root }) => import_node_fs137.default.realpathSync(root)).join("\0")).update("\0").update(import_node_fs137.default.realpathSync(options2.moduleRoot)).digest("hex");
|
|
105404
105380
|
const scratch2 = import_node_path137.default.join(import_node_os28.default.tmpdir(), "peach-turbo-swift", key2);
|
|
105405
105381
|
import_node_fs137.default.mkdirSync(scratch2, { recursive: true });
|
|
105406
105382
|
const codegenDir = import_node_fs137.default.mkdtempSync(import_node_path137.default.join(scratch2, "codegen-"));
|
|
@@ -105601,13 +105577,13 @@ async function compileTurboModule(options2) {
|
|
|
105601
105577
|
collection
|
|
105602
105578
|
};
|
|
105603
105579
|
}
|
|
105604
|
-
var
|
|
105580
|
+
var import_node_crypto81, import_node_fs137, import_node_module18, import_node_os28, import_node_path137;
|
|
105605
105581
|
var init_turbo_compile = __esm({
|
|
105606
105582
|
"src/turbo-compile.ts"() {
|
|
105607
105583
|
"use strict";
|
|
105608
|
-
|
|
105584
|
+
import_node_crypto81 = require("node:crypto");
|
|
105609
105585
|
import_node_fs137 = __toESM(require("node:fs"), 1);
|
|
105610
|
-
|
|
105586
|
+
import_node_module18 = require("node:module");
|
|
105611
105587
|
import_node_os28 = __toESM(require("node:os"), 1);
|
|
105612
105588
|
import_node_path137 = __toESM(require("node:path"), 1);
|
|
105613
105589
|
init_native_app_identity_project();
|
|
@@ -105822,8 +105798,8 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
105822
105798
|
);
|
|
105823
105799
|
if (!isRecord(manifest) || typeof manifest.version !== "string")
|
|
105824
105800
|
throw new Error(`${reactNativeRoot}: react-native has no version`);
|
|
105825
|
-
const headers = (0,
|
|
105826
|
-
const sources = (0,
|
|
105801
|
+
const headers = (0, import_node_crypto82.createHash)("sha256");
|
|
105802
|
+
const sources = (0, import_node_crypto82.createHash)("sha256");
|
|
105827
105803
|
const walk4 = (relative5) => {
|
|
105828
105804
|
for (const file of import_node_fs139.default.readdirSync(import_node_path139.default.join(reactNativeRoot, relative5), { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
105829
105805
|
if (file.name === "node_modules" || file.name.startsWith(".")) continue;
|
|
@@ -105839,7 +105815,7 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
105839
105815
|
};
|
|
105840
105816
|
walk4("");
|
|
105841
105817
|
const codegenRoot = import_node_path139.default.dirname(
|
|
105842
|
-
(0,
|
|
105818
|
+
(0, import_node_module19.createRequire)(import_node_path139.default.join(reactNativeRoot, "package.json")).resolve(
|
|
105843
105819
|
"@react-native/codegen/package.json"
|
|
105844
105820
|
)
|
|
105845
105821
|
);
|
|
@@ -105930,7 +105906,7 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
105930
105906
|
const file = import_node_path139.default.join(
|
|
105931
105907
|
cacheDir(),
|
|
105932
105908
|
"native-archives",
|
|
105933
|
-
`${(0,
|
|
105909
|
+
`${(0, import_node_crypto82.createHash)("sha256").update(data).digest("hex")}.a`
|
|
105934
105910
|
);
|
|
105935
105911
|
import_node_fs139.default.mkdirSync(import_node_path139.default.dirname(file), { recursive: true });
|
|
105936
105912
|
if (!import_node_fs139.default.existsSync(file)) import_node_fs139.default.writeFileSync(file, Buffer.from(data, "base64"));
|
|
@@ -105940,13 +105916,13 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
105940
105916
|
}
|
|
105941
105917
|
}
|
|
105942
105918
|
}
|
|
105943
|
-
var
|
|
105919
|
+
var import_node_crypto82, import_node_fs139, import_node_module19, import_node_path139, import_node_util16, recipe, strings4, building;
|
|
105944
105920
|
var init_react_native_core = __esm({
|
|
105945
105921
|
"src/react-native-core.ts"() {
|
|
105946
105922
|
"use strict";
|
|
105947
|
-
|
|
105923
|
+
import_node_crypto82 = require("node:crypto");
|
|
105948
105924
|
import_node_fs139 = __toESM(require("node:fs"), 1);
|
|
105949
|
-
|
|
105925
|
+
import_node_module19 = require("node:module");
|
|
105950
105926
|
import_node_path139 = __toESM(require("node:path"), 1);
|
|
105951
105927
|
import_node_util16 = require("node:util");
|
|
105952
105928
|
init_home_paths();
|
|
@@ -105969,7 +105945,7 @@ function exportedNames(moduleRoot, name3) {
|
|
|
105969
105945
|
const modules = import_node_path140.default.join(moduleRoot, "modules");
|
|
105970
105946
|
const module2 = import_node_path140.default.join(modules, `${name3}.swiftmodule`);
|
|
105971
105947
|
if (!import_node_fs140.default.existsSync(module2)) return /* @__PURE__ */ new Set();
|
|
105972
|
-
const key2 = (0,
|
|
105948
|
+
const key2 = (0, import_node_crypto83.createHash)("sha256").update(import_node_fs140.default.readFileSync(module2)).digest("hex");
|
|
105973
105949
|
const directory2 = import_node_path140.default.join(swiftCacheDir(), "swift-public-names");
|
|
105974
105950
|
const receipt = import_node_path140.default.join(directory2, `${key2}.json`);
|
|
105975
105951
|
if (import_node_fs140.default.existsSync(receipt)) {
|
|
@@ -106052,12 +106028,12 @@ function clangTypeOwnership(moduleRoot, module2) {
|
|
|
106052
106028
|
}
|
|
106053
106029
|
);
|
|
106054
106030
|
}
|
|
106055
|
-
var import_node_child_process68,
|
|
106031
|
+
var import_node_child_process68, import_node_crypto83, import_node_fs140, import_node_path140, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
|
|
106056
106032
|
var init_swift_clang_type_ownership = __esm({
|
|
106057
106033
|
"src/swift-clang-type-ownership.ts"() {
|
|
106058
106034
|
"use strict";
|
|
106059
106035
|
import_node_child_process68 = require("node:child_process");
|
|
106060
|
-
|
|
106036
|
+
import_node_crypto83 = require("node:crypto");
|
|
106061
106037
|
import_node_fs140 = __toESM(require("node:fs"), 1);
|
|
106062
106038
|
import_node_path140 = __toESM(require("node:path"), 1);
|
|
106063
106039
|
init_is_record();
|
|
@@ -106533,7 +106509,7 @@ function enrichInstalledUnits(units, installed2, namespaceGroups, provided, modu
|
|
|
106533
106509
|
const byPath = [...installedTargets].sort((a, b) => b.path.length - a.path.length);
|
|
106534
106510
|
const reactNativeRoot = import_node_fs141.default.realpathSync(
|
|
106535
106511
|
import_node_path141.default.dirname(
|
|
106536
|
-
(0,
|
|
106512
|
+
(0, import_node_module20.createRequire)(import_node_path141.default.join(appRoot, "package.json")).resolve(
|
|
106537
106513
|
"react-native/package.json"
|
|
106538
106514
|
)
|
|
106539
106515
|
)
|
|
@@ -106980,7 +106956,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
106980
106956
|
signal?.throwIfAborted();
|
|
106981
106957
|
appRoot = import_node_fs141.default.realpathSync(appRoot);
|
|
106982
106958
|
const appConfig = await loadRNXAppConfig(resolveAppProject(appRoot));
|
|
106983
|
-
const appRequire = (0,
|
|
106959
|
+
const appRequire = (0, import_node_module20.createRequire)(import_node_path141.default.join(appRoot, "package.json"));
|
|
106984
106960
|
let expoRoot;
|
|
106985
106961
|
try {
|
|
106986
106962
|
expoRoot = import_node_path141.default.dirname(appRequire.resolve("expo/package.json"));
|
|
@@ -107712,7 +107688,7 @@ function targetSettings2(units) {
|
|
|
107712
107688
|
}
|
|
107713
107689
|
function oneSDKStamp(oneSDK) {
|
|
107714
107690
|
if (!oneSDK) return "";
|
|
107715
|
-
const hash = (0,
|
|
107691
|
+
const hash = (0, import_node_crypto84.createHash)("sha256");
|
|
107716
107692
|
for (const files2 of [oneSDK.targets, oneSDK.entry])
|
|
107717
107693
|
for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
|
|
107718
107694
|
hash.update(`${name3}\0${source}\0`);
|
|
@@ -107763,7 +107739,7 @@ ${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport On
|
|
|
107763
107739
|
`;
|
|
107764
107740
|
}
|
|
107765
107741
|
function expoSwiftPreparedKey(base2, units, reactProviderStamp) {
|
|
107766
|
-
const hash = (0,
|
|
107742
|
+
const hash = (0, import_node_crypto84.createHash)("sha256");
|
|
107767
107743
|
hash.update(base2);
|
|
107768
107744
|
hash.update(reactProviderStamp);
|
|
107769
107745
|
for (const unit2 of units) {
|
|
@@ -108110,7 +108086,7 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
108110
108086
|
const reactProvider = units.some((unit2) => unit2.reactNativeProvider) ? await (async () => {
|
|
108111
108087
|
const projectRoot = options2.installedWorkspace ? import_node_path141.default.dirname(import_node_path141.default.dirname(options2.installedWorkspace)) : (await prepareExpoNativeWorkspace(root, signal, options2.iosTarget)).app;
|
|
108112
108088
|
const reactNativeRoot = import_node_path141.default.dirname(
|
|
108113
|
-
(0,
|
|
108089
|
+
(0, import_node_module20.createRequire)(import_node_path141.default.join(projectRoot, "package.json")).resolve(
|
|
108114
108090
|
"react-native/package.json"
|
|
108115
108091
|
)
|
|
108116
108092
|
);
|
|
@@ -108137,8 +108113,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
108137
108113
|
}
|
|
108138
108114
|
return provider;
|
|
108139
108115
|
})() : void 0;
|
|
108140
|
-
const reactProviderStamp = reactProvider ? (0,
|
|
108141
|
-
const key2 = (0,
|
|
108116
|
+
const reactProviderStamp = reactProvider ? (0, import_node_crypto84.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
|
|
108117
|
+
const key2 = (0, import_node_crypto84.createHash)("sha256").update(import_node_fs141.default.realpathSync(root)).digest("hex");
|
|
108142
108118
|
const unitContentStamp = (unit2) => sourceContentStamp(expoSwiftPackage(key2, unit2.moduleId), module2.root) + (unit2.reactNativeProvider ? `:${reactProviderStamp}` : "");
|
|
108143
108119
|
const failures = /* @__PURE__ */ new Map();
|
|
108144
108120
|
const failureRecords = /* @__PURE__ */ new Map();
|
|
@@ -108524,13 +108500,11 @@ async function handleExpoSwiftRequest(req, res) {
|
|
|
108524
108500
|
const iosTarget = url.searchParams.get("iosTarget") ?? void 0;
|
|
108525
108501
|
if (url.searchParams.get("discover") === "1") {
|
|
108526
108502
|
try {
|
|
108527
|
-
const units = await
|
|
108503
|
+
const units = await withConfiguredNativeSources(
|
|
108528
108504
|
key2,
|
|
108529
|
-
void 0,
|
|
108530
|
-
|
|
108531
|
-
|
|
108532
|
-
iosTarget,
|
|
108533
|
-
{ metadataOnly: true }
|
|
108505
|
+
() => collectExpoSwiftSources(key2, void 0, void 0, false, iosTarget, {
|
|
108506
|
+
metadataOnly: true
|
|
108507
|
+
})
|
|
108534
108508
|
);
|
|
108535
108509
|
const metadata = units && {
|
|
108536
108510
|
namespaces: units.map((unit2) => unit2.moduleId)
|
|
@@ -108547,30 +108521,19 @@ async function handleExpoSwiftRequest(req, res) {
|
|
|
108547
108521
|
return true;
|
|
108548
108522
|
}
|
|
108549
108523
|
const flightKey = `${host2}\0${key2}\0${iosTarget ?? ""}`;
|
|
108550
|
-
const
|
|
108551
|
-
flightKey,
|
|
108552
|
-
url.searchParams.get(NATIVE_PREPARED_QUERY_PARAM)
|
|
108553
|
-
);
|
|
108554
|
-
if (prepared) {
|
|
108555
|
-
res.writeHead(200, {
|
|
108556
|
-
"Content-Type": "application/json",
|
|
108557
|
-
"Cache-Control": "no-store"
|
|
108558
|
-
});
|
|
108559
|
-
res.end(JSON.stringify(prepared.value));
|
|
108560
|
-
return true;
|
|
108561
|
-
}
|
|
108524
|
+
const assetOrigin = `http://${host2}`;
|
|
108562
108525
|
try {
|
|
108563
|
-
const
|
|
108564
|
-
const assetOrigin = `http://${host2}`;
|
|
108565
|
-
const metadata = await openPreparations.prepare(
|
|
108566
|
-
flightKey,
|
|
108526
|
+
const metadata = await openPreparations.resolve(
|
|
108567
108527
|
key2,
|
|
108568
|
-
|
|
108569
|
-
|
|
108570
|
-
(
|
|
108528
|
+
flightKey,
|
|
108529
|
+
url.searchParams,
|
|
108530
|
+
() => withConfiguredNativeSources(
|
|
108531
|
+
key2,
|
|
108532
|
+
() => compileExpoSwiftModules(key2, assetOrigin, void 0, { iosTarget })
|
|
108533
|
+
),
|
|
108534
|
+
(result) => !result?.failures.length && expoSwiftArtifactsAreAvailable(assetOrigin, result)
|
|
108571
108535
|
);
|
|
108572
108536
|
if (!res.destroyed) {
|
|
108573
|
-
openPreparations.store(flightKey, token, metadata);
|
|
108574
108537
|
res.writeHead(200, {
|
|
108575
108538
|
"Content-Type": "application/json",
|
|
108576
108539
|
"Cache-Control": "no-store"
|
|
@@ -108593,15 +108556,15 @@ ${diagnostics}`}`
|
|
|
108593
108556
|
}
|
|
108594
108557
|
return true;
|
|
108595
108558
|
}
|
|
108596
|
-
var import_node_async_hooks3, import_node_child_process69,
|
|
108559
|
+
var import_node_async_hooks3, import_node_child_process69, import_node_crypto84, import_node_fs141, import_node_module20, import_node_os29, import_node_path141, import_node_url7, import_node_util17, run12, scriptEnv, EXPO_SWIFT_ROUTE, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
|
|
108597
108560
|
var init_expo_swift_host = __esm({
|
|
108598
108561
|
"src/expo-swift-host.ts"() {
|
|
108599
108562
|
"use strict";
|
|
108600
108563
|
import_node_async_hooks3 = require("node:async_hooks");
|
|
108601
108564
|
import_node_child_process69 = require("node:child_process");
|
|
108602
|
-
|
|
108565
|
+
import_node_crypto84 = require("node:crypto");
|
|
108603
108566
|
import_node_fs141 = __toESM(require("node:fs"), 1);
|
|
108604
|
-
|
|
108567
|
+
import_node_module20 = require("node:module");
|
|
108605
108568
|
import_node_os29 = __toESM(require("node:os"), 1);
|
|
108606
108569
|
import_node_path141 = __toESM(require("node:path"), 1);
|
|
108607
108570
|
import_node_url7 = require("node:url");
|
|
@@ -108621,7 +108584,6 @@ var init_expo_swift_host = __esm({
|
|
|
108621
108584
|
init_native_firebase_config();
|
|
108622
108585
|
init_native_preparation();
|
|
108623
108586
|
init_native_static_libraries();
|
|
108624
|
-
init_nativePreparationContract();
|
|
108625
108587
|
init_react_native_bridge_modules();
|
|
108626
108588
|
init_react_native_core();
|
|
108627
108589
|
init_swift_binary_modules();
|
|
@@ -108649,7 +108611,7 @@ var init_expo_swift_host = __esm({
|
|
|
108649
108611
|
ownTemporaryRoots = /* @__PURE__ */ new Set();
|
|
108650
108612
|
EXPO_MODULE_SCAN_TIMEOUT_MS = 6e4;
|
|
108651
108613
|
preparedExpoSwift = /* @__PURE__ */ new Map();
|
|
108652
|
-
openPreparations = new
|
|
108614
|
+
openPreparations = new NativePreparation();
|
|
108653
108615
|
ExpoSwiftLinkRefusal = class extends Error {
|
|
108654
108616
|
};
|
|
108655
108617
|
}
|
|
@@ -111905,7 +111867,7 @@ __export(rolldown_bundle_forward_exports, {
|
|
|
111905
111867
|
async function forwardRolldownBundleResponse(upstream, res) {
|
|
111906
111868
|
res.setHeader(ROLLDOWN_INVENTORY_HEADER, "1");
|
|
111907
111869
|
if (upstream.headers[ROLLDOWN_INVENTORY_HEADER] === "1") {
|
|
111908
|
-
await (0,
|
|
111870
|
+
await (0, import_promises16.pipeline)(upstream, res);
|
|
111909
111871
|
return;
|
|
111910
111872
|
}
|
|
111911
111873
|
const contentType2 = typeof upstream.headers["content-type"] === "string" ? upstream.headers["content-type"] : "";
|
|
@@ -111947,14 +111909,14 @@ async function forwardRolldownBundleResponse(upstream, res) {
|
|
|
111947
111909
|
}
|
|
111948
111910
|
yield Buffer.from(annotated.slice(sent), "utf8");
|
|
111949
111911
|
};
|
|
111950
|
-
await (0,
|
|
111912
|
+
await (0, import_promises16.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
|
|
111951
111913
|
}
|
|
111952
|
-
var import_stream,
|
|
111914
|
+
var import_stream, import_promises16, ROLLDOWN_INVENTORY_HEADER;
|
|
111953
111915
|
var init_rolldown_bundle_forward = __esm({
|
|
111954
111916
|
"src/host/rolldown-bundle-forward.ts"() {
|
|
111955
111917
|
"use strict";
|
|
111956
111918
|
import_stream = require("stream");
|
|
111957
|
-
|
|
111919
|
+
import_promises16 = require("stream/promises");
|
|
111958
111920
|
init_cli_runtime();
|
|
111959
111921
|
ROLLDOWN_INVENTORY_HEADER = "x-peach-rolldown-inventory";
|
|
111960
111922
|
}
|
|
@@ -112269,7 +112231,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
112269
112231
|
await route.respond(proxyRes, hopCookies);
|
|
112270
112232
|
if (isNativeCookieRedirect(hop)) res.removeHeader("location");
|
|
112271
112233
|
res.statusCode = isNativeCookieRedirect(hop) ? 200 : status;
|
|
112272
|
-
await (0,
|
|
112234
|
+
await (0, import_promises17.pipeline)(proxyRes, res);
|
|
112273
112235
|
return;
|
|
112274
112236
|
}
|
|
112275
112237
|
if (location && (status === 301 || status === 302 || status === 303 || status === 307 || status === 308)) {
|
|
@@ -112280,7 +112242,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
112280
112242
|
const switchToGet = (status === 301 || status === 302) && method === "POST" || status === 303 && method !== "GET" && method !== "HEAD";
|
|
112281
112243
|
const redirectUrl = resolveRedirectUrl(location, targetUrl);
|
|
112282
112244
|
proxyRes.resume();
|
|
112283
|
-
await (0,
|
|
112245
|
+
await (0, import_promises17.finished)(proxyRes);
|
|
112284
112246
|
await proxy(
|
|
112285
112247
|
redirectUrl,
|
|
112286
112248
|
switchToGet ? "GET" : method,
|
|
@@ -112298,7 +112260,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
112298
112260
|
await forwardRolldownBundleResponse2(proxyRes, res);
|
|
112299
112261
|
return;
|
|
112300
112262
|
}
|
|
112301
|
-
await (0,
|
|
112263
|
+
await (0, import_promises17.pipeline)(proxyRes, res);
|
|
112302
112264
|
};
|
|
112303
112265
|
let upstreamAnswered = false;
|
|
112304
112266
|
let body;
|
|
@@ -112353,14 +112315,14 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
112353
112315
|
else req.socket.destroy();
|
|
112354
112316
|
}
|
|
112355
112317
|
}
|
|
112356
|
-
var import_http3, import_https2, import_node_http22,
|
|
112318
|
+
var import_http3, import_https2, import_node_http22, import_promises17, fetchProxyHttpAgent, fetchProxyHttpsAgent, tlsMinimumVersions, tlsMinimumAgents, FETCH_PROXY_CORS_HEADERS, APP_API_HEADER_REWRITES;
|
|
112357
112319
|
var init_fetch_proxy_handler = __esm({
|
|
112358
112320
|
"src/host/fetch-proxy-handler.ts"() {
|
|
112359
112321
|
"use strict";
|
|
112360
112322
|
import_http3 = __toESM(require("http"), 1);
|
|
112361
112323
|
import_https2 = __toESM(require("https"), 1);
|
|
112362
112324
|
import_node_http22 = require("node:http2");
|
|
112363
|
-
|
|
112325
|
+
import_promises17 = require("stream/promises");
|
|
112364
112326
|
init_package_versions();
|
|
112365
112327
|
init_backend_origin();
|
|
112366
112328
|
init_fetch_proxy_overrides();
|
|
@@ -112475,10 +112437,10 @@ function stageHostBytes(bytes, origin, extension = "") {
|
|
|
112475
112437
|
}
|
|
112476
112438
|
async function stageHostDerivedBytes(input, producer, origin, extension, derive) {
|
|
112477
112439
|
const directory2 = prepareStagedDirectory();
|
|
112478
|
-
const inputDigest = (0,
|
|
112440
|
+
const inputDigest = (0, import_node_crypto86.createHash)("sha256").update(input).digest("hex");
|
|
112479
112441
|
const index = import_node_path149.default.join(
|
|
112480
112442
|
directory2,
|
|
112481
|
-
`derived-${(0,
|
|
112443
|
+
`derived-${(0, import_node_crypto86.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
|
|
112482
112444
|
);
|
|
112483
112445
|
const recorded = import_node_fs149.default.existsSync(index) ? import_node_fs149.default.readFileSync(index, "utf8") : "";
|
|
112484
112446
|
if (STAGED_NAME.test(recorded) && import_node_fs149.default.existsSync(import_node_path149.default.join(directory2, recorded))) {
|
|
@@ -112489,7 +112451,7 @@ async function stageHostDerivedBytes(input, producer, origin, extension, derive)
|
|
|
112489
112451
|
return new URL(STAGED_PREFIX + recorded, origin).toString();
|
|
112490
112452
|
}
|
|
112491
112453
|
const staged = writeStagedBytes(await derive(), origin, extension, directory2);
|
|
112492
|
-
const temporary = import_node_path149.default.join(directory2, (0,
|
|
112454
|
+
const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto86.randomUUID)());
|
|
112493
112455
|
try {
|
|
112494
112456
|
import_node_fs149.default.writeFileSync(temporary, new URL(staged).pathname.slice(STAGED_PREFIX.length), {
|
|
112495
112457
|
flag: "wx"
|
|
@@ -112508,7 +112470,7 @@ function metroIndexName(url) {
|
|
|
112508
112470
|
url.searchParams.get("unstable_path"),
|
|
112509
112471
|
hashes[0]
|
|
112510
112472
|
]);
|
|
112511
|
-
return `metro-${(0,
|
|
112473
|
+
return `metro-${(0, import_node_crypto86.createHash)("sha256").update(key2).digest("hex")}`;
|
|
112512
112474
|
}
|
|
112513
112475
|
function metroRequestIndex(rawUrl) {
|
|
112514
112476
|
if (!rawUrl?.startsWith("/") || rawUrl.startsWith("//")) return null;
|
|
@@ -112536,7 +112498,7 @@ function prepareStagedDirectory() {
|
|
|
112536
112498
|
return directory2;
|
|
112537
112499
|
}
|
|
112538
112500
|
function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
112539
|
-
const digest3 = (0,
|
|
112501
|
+
const digest3 = (0, import_node_crypto86.createHash)("sha256").update(bytes).digest("hex");
|
|
112540
112502
|
extension = extension.toLowerCase();
|
|
112541
112503
|
const name3 = STAGED_NAME.test(digest3 + extension) ? digest3 + extension : digest3;
|
|
112542
112504
|
stagedCapture.getStore()?.add(name3);
|
|
@@ -112545,7 +112507,7 @@ function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
|
112545
112507
|
if (import_node_fs149.default.existsSync(destination)) {
|
|
112546
112508
|
import_node_fs149.default.utimesSync(destination, new Date(now), new Date(now));
|
|
112547
112509
|
} else {
|
|
112548
|
-
const temporary = import_node_path149.default.join(directory2, (0,
|
|
112510
|
+
const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto86.randomUUID)());
|
|
112549
112511
|
try {
|
|
112550
112512
|
import_node_fs149.default.writeFileSync(temporary, bytes, { flag: "wx" });
|
|
112551
112513
|
import_node_fs149.default.renameSync(temporary, destination);
|
|
@@ -112617,12 +112579,12 @@ async function handleStagedHostFileRequest(req, res) {
|
|
|
112617
112579
|
throw error;
|
|
112618
112580
|
}
|
|
112619
112581
|
}
|
|
112620
|
-
var import_node_async_hooks4,
|
|
112582
|
+
var import_node_async_hooks4, import_node_crypto86, import_node_fs149, import_node_path149, stagedCapture, STAGED_PREFIX, STAGED_NAME, METRO_INDEX_NAME, STAGED_RETENTION_MS;
|
|
112621
112583
|
var init_staged_host_files = __esm({
|
|
112622
112584
|
"src/host/staged-host-files.ts"() {
|
|
112623
112585
|
"use strict";
|
|
112624
112586
|
import_node_async_hooks4 = require("node:async_hooks");
|
|
112625
|
-
|
|
112587
|
+
import_node_crypto86 = require("node:crypto");
|
|
112626
112588
|
import_node_fs149 = __toESM(require("node:fs"), 1);
|
|
112627
112589
|
import_node_path149 = __toESM(require("node:path"), 1);
|
|
112628
112590
|
init_uttype_mime();
|
|
@@ -112837,7 +112799,7 @@ async function readOneWidgetSources(appRoot) {
|
|
|
112837
112799
|
if (!Buffer.from(text7).equals(bytes))
|
|
112838
112800
|
throw new Error(`One widget prebuild source is not UTF-8: ${file}`);
|
|
112839
112801
|
files2.set(name3, text7);
|
|
112840
|
-
sources[import_node_path151.default.relative(root, file).split(import_node_path151.default.sep).join("/")] = (0,
|
|
112802
|
+
sources[import_node_path151.default.relative(root, file).split(import_node_path151.default.sep).join("/")] = (0, import_node_crypto87.createHash)("sha256").update(bytes).digest("hex");
|
|
112841
112803
|
}
|
|
112842
112804
|
const contract = files2.get("OneWidgetContract.swift") ?? "";
|
|
112843
112805
|
const source = files2.get("OneWidget.swift") ?? "";
|
|
@@ -112861,17 +112823,17 @@ async function configuredOneWidget(appRoot, bundleUrl, packageUrl) {
|
|
|
112861
112823
|
return {
|
|
112862
112824
|
metadata: source.widget,
|
|
112863
112825
|
projectRoot: source.root,
|
|
112864
|
-
appIdentity: (0,
|
|
112826
|
+
appIdentity: (0, import_node_crypto87.createHash)("sha256").update(JSON.stringify([source.root, source.widget.bundleId])).digest("hex"),
|
|
112865
112827
|
bundleUrl,
|
|
112866
112828
|
packageUrl,
|
|
112867
112829
|
urlSchemes: source.urlSchemes
|
|
112868
112830
|
};
|
|
112869
112831
|
}
|
|
112870
|
-
var
|
|
112832
|
+
var import_node_crypto87, import_node_fs151, import_node_path151, ONE_WIDGET_PACKAGE, nonEmpty;
|
|
112871
112833
|
var init_one_widget_metadata = __esm({
|
|
112872
112834
|
"src/one-widget-metadata.ts"() {
|
|
112873
112835
|
"use strict";
|
|
112874
|
-
|
|
112836
|
+
import_node_crypto87 = require("node:crypto");
|
|
112875
112837
|
import_node_fs151 = __toESM(require("node:fs"), 1);
|
|
112876
112838
|
import_node_path151 = __toESM(require("node:path"), 1);
|
|
112877
112839
|
init_is_record();
|
|
@@ -112905,7 +112867,7 @@ async function oneWidgetPackage(appRoot) {
|
|
|
112905
112867
|
const packagePath = import_node_path152.default.join(
|
|
112906
112868
|
import_node_os31.default.tmpdir(),
|
|
112907
112869
|
"peach-one-widgets",
|
|
112908
|
-
(0,
|
|
112870
|
+
(0, import_node_crypto88.createHash)("sha256").update(root).digest("hex"),
|
|
112909
112871
|
ONE_WIDGET_PACKAGE
|
|
112910
112872
|
);
|
|
112911
112873
|
import_node_fs152.default.mkdirSync(packagePath, { recursive: true });
|
|
@@ -112919,11 +112881,11 @@ async function oneWidgetPackage(appRoot) {
|
|
|
112919
112881
|
widget
|
|
112920
112882
|
};
|
|
112921
112883
|
}
|
|
112922
|
-
var
|
|
112884
|
+
var import_node_crypto88, import_node_fs152, import_node_os31, import_node_path152;
|
|
112923
112885
|
var init_one_widget_package = __esm({
|
|
112924
112886
|
"src/one-widget-package.ts"() {
|
|
112925
112887
|
"use strict";
|
|
112926
|
-
|
|
112888
|
+
import_node_crypto88 = require("node:crypto");
|
|
112927
112889
|
import_node_fs152 = __toESM(require("node:fs"), 1);
|
|
112928
112890
|
import_node_os31 = __toESM(require("node:os"), 1);
|
|
112929
112891
|
import_node_path152 = __toESM(require("node:path"), 1);
|
|
@@ -113139,7 +113101,7 @@ var init_android_view_classes = __esm({
|
|
|
113139
113101
|
|
|
113140
113102
|
// src/java-module-abi.ts
|
|
113141
113103
|
async function readJavaModuleSpecs(files2, sdkRoot, toolchain) {
|
|
113142
|
-
const digest3 = (0,
|
|
113104
|
+
const digest3 = (0, import_node_crypto89.createHash)("sha256");
|
|
113143
113105
|
const parent = import_node_path154.default.join(kotlinHome(), "java-specs");
|
|
113144
113106
|
import_node_fs154.default.mkdirSync(parent, { recursive: true });
|
|
113145
113107
|
const work = import_node_fs154.default.mkdtempSync(import_node_path154.default.join(parent, ".read-"));
|
|
@@ -113236,12 +113198,12 @@ async function compileJavaModuleAbi(input) {
|
|
|
113236
113198
|
);
|
|
113237
113199
|
return library;
|
|
113238
113200
|
}
|
|
113239
|
-
var import_node_child_process72,
|
|
113201
|
+
var import_node_child_process72, import_node_crypto89, import_node_fs154, import_node_path154, import_node_util18, run13, JAVA_BINDINGS_INITIALIZER;
|
|
113240
113202
|
var init_java_module_abi = __esm({
|
|
113241
113203
|
"src/java-module-abi.ts"() {
|
|
113242
113204
|
"use strict";
|
|
113243
113205
|
import_node_child_process72 = require("node:child_process");
|
|
113244
|
-
|
|
113206
|
+
import_node_crypto89 = require("node:crypto");
|
|
113245
113207
|
import_node_fs154 = __toESM(require("node:fs"), 1);
|
|
113246
113208
|
import_node_path154 = __toESM(require("node:path"), 1);
|
|
113247
113209
|
import_node_util18 = require("node:util");
|
|
@@ -113497,13 +113459,13 @@ function verifyKotlinSdkDirectory(root, compiler) {
|
|
|
113497
113459
|
if (!stat2.isFile() || stat2.nlink !== 1)
|
|
113498
113460
|
throw new Error(`Kotlin SDK binary is not a regular file: ${name3}`);
|
|
113499
113461
|
const bytes = import_node_fs155.default.readFileSync(target);
|
|
113500
|
-
if (bytes.length !== expected.bytes || (0,
|
|
113462
|
+
if (bytes.length !== expected.bytes || (0, import_node_crypto90.createHash)("sha256").update(bytes).digest("hex") !== expected.sha256)
|
|
113501
113463
|
throw new Error(`Kotlin SDK binary differs from its manifest: ${name3}`);
|
|
113502
113464
|
}
|
|
113503
113465
|
return manifest;
|
|
113504
113466
|
}
|
|
113505
113467
|
async function installKotlinSdkArchive(archive, compiler) {
|
|
113506
|
-
const sha2565 = (0,
|
|
113468
|
+
const sha2565 = (0, import_node_crypto90.createHash)("sha256").update(archive).digest("hex");
|
|
113507
113469
|
const parent = import_node_path155.default.join(kotlinHome(), "sdk");
|
|
113508
113470
|
const root = import_node_path155.default.join(parent, sha2565);
|
|
113509
113471
|
if (import_node_fs155.default.existsSync(root))
|
|
@@ -113532,12 +113494,12 @@ async function installKotlinSdkArchive(archive, compiler) {
|
|
|
113532
113494
|
import_node_fs155.default.rmSync(work, { recursive: true, force: true });
|
|
113533
113495
|
}
|
|
113534
113496
|
}
|
|
113535
|
-
var import_node_child_process73,
|
|
113497
|
+
var import_node_child_process73, import_node_crypto90, import_node_fs155, import_node_path155, import_node_util19, run14;
|
|
113536
113498
|
var init_kotlin_sdk = __esm({
|
|
113537
113499
|
"src/kotlin-sdk.ts"() {
|
|
113538
113500
|
"use strict";
|
|
113539
113501
|
import_node_child_process73 = require("node:child_process");
|
|
113540
|
-
|
|
113502
|
+
import_node_crypto90 = require("node:crypto");
|
|
113541
113503
|
import_node_fs155 = __toESM(require("node:fs"), 1);
|
|
113542
113504
|
import_node_path155 = __toESM(require("node:path"), 1);
|
|
113543
113505
|
import_node_util19 = require("node:util");
|
|
@@ -113674,7 +113636,7 @@ function peachKotlinModuleRoot() {
|
|
|
113674
113636
|
return import_node_path156.default.resolve(import_node_path156.default.dirname((0, import_node_url8.fileURLToPath)(__sootsim_import_meta_url)), "..", "kotlin");
|
|
113675
113637
|
if (installedRoot) return installedRoot;
|
|
113676
113638
|
const files2 = JSON.parse(__PEACH_BUNDLED_KOTLIN__);
|
|
113677
|
-
const digest3 = (0,
|
|
113639
|
+
const digest3 = (0, import_node_crypto91.createHash)("sha256").update(__PEACH_BUNDLED_KOTLIN__).digest("hex");
|
|
113678
113640
|
const parent = import_node_path156.default.join(rnxHomeDir(), "kotlin", "modules");
|
|
113679
113641
|
const root = import_node_path156.default.join(parent, digest3);
|
|
113680
113642
|
import_node_fs156.default.mkdirSync(parent, { recursive: true });
|
|
@@ -113703,11 +113665,11 @@ function peachKotlinModuleRoot() {
|
|
|
113703
113665
|
installedRoot = root;
|
|
113704
113666
|
return root;
|
|
113705
113667
|
}
|
|
113706
|
-
var
|
|
113668
|
+
var import_node_crypto91, import_node_fs156, import_node_path156, import_node_url8, installedRoot;
|
|
113707
113669
|
var init_kotlin_module = __esm({
|
|
113708
113670
|
"src/kotlin-module.ts"() {
|
|
113709
113671
|
"use strict";
|
|
113710
|
-
|
|
113672
|
+
import_node_crypto91 = require("node:crypto");
|
|
113711
113673
|
import_node_fs156 = __toESM(require("node:fs"), 1);
|
|
113712
113674
|
import_node_path156 = __toESM(require("node:path"), 1);
|
|
113713
113675
|
import_node_url8 = require("node:url");
|
|
@@ -113741,7 +113703,7 @@ async function resolveAndroidGradleSources(request) {
|
|
|
113741
113703
|
const parent = import_node_path157.default.join(kotlinHome(), "gradle-sources");
|
|
113742
113704
|
import_node_fs157.default.mkdirSync(parent, { recursive: true });
|
|
113743
113705
|
const work = import_node_fs157.default.mkdtempSync(import_node_path157.default.join(parent, ".query-"));
|
|
113744
|
-
const task = `peachAndroidSources${(0,
|
|
113706
|
+
const task = `peachAndroidSources${(0, import_node_crypto92.randomBytes)(8).toString("hex")}`;
|
|
113745
113707
|
const script = import_node_path157.default.join(work, "sources.gradle");
|
|
113746
113708
|
const encoded = Buffer.from(
|
|
113747
113709
|
JSON.stringify({
|
|
@@ -113862,12 +113824,12 @@ function readDependencySources(value) {
|
|
|
113862
113824
|
};
|
|
113863
113825
|
});
|
|
113864
113826
|
}
|
|
113865
|
-
var import_node_child_process74,
|
|
113827
|
+
var import_node_child_process74, import_node_crypto92, import_node_fs157, import_node_path157, import_node_util20, run15, modelQuery;
|
|
113866
113828
|
var init_android_gradle_sources = __esm({
|
|
113867
113829
|
"src/android-gradle-sources.ts"() {
|
|
113868
113830
|
"use strict";
|
|
113869
113831
|
import_node_child_process74 = require("node:child_process");
|
|
113870
|
-
|
|
113832
|
+
import_node_crypto92 = require("node:crypto");
|
|
113871
113833
|
import_node_fs157 = __toESM(require("node:fs"), 1);
|
|
113872
113834
|
import_node_path157 = __toESM(require("node:path"), 1);
|
|
113873
113835
|
import_node_util20 = require("node:util");
|
|
@@ -114063,7 +114025,7 @@ function loadKotlinSdk(moduleRoot, toolchain) {
|
|
|
114063
114025
|
}
|
|
114064
114026
|
function appKotlinLanguage(root) {
|
|
114065
114027
|
const reactNative = import_node_path158.default.dirname(
|
|
114066
|
-
(0,
|
|
114028
|
+
(0, import_node_module21.createRequire)(import_node_path158.default.join(root, "package.json")).resolve("react-native/package.json")
|
|
114067
114029
|
);
|
|
114068
114030
|
const versions = import_node_fs158.default.readFileSync(
|
|
114069
114031
|
import_node_path158.default.join(reactNative, "gradle", "libs.versions.toml"),
|
|
@@ -114238,7 +114200,7 @@ function readExpoTypes(output) {
|
|
|
114238
114200
|
});
|
|
114239
114201
|
}
|
|
114240
114202
|
async function scanSources(tool, parse17, toolchain, moduleRoot, files2) {
|
|
114241
|
-
const digest3 = (0,
|
|
114203
|
+
const digest3 = (0, import_node_crypto93.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
|
|
114242
114204
|
const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
|
|
114243
114205
|
digest3.update(import_node_fs158.default.readFileSync(import_node_path158.default.join(moduleRoot, "sdk.tar.gz")));
|
|
114244
114206
|
digest3.update(tool);
|
|
@@ -114898,7 +114860,7 @@ async function compileKotlin(input, origin) {
|
|
|
114898
114860
|
bytes: import_node_fs158.default.readFileSync(file)
|
|
114899
114861
|
}));
|
|
114900
114862
|
const { composeArchive, ...compilerInputs } = toolchain;
|
|
114901
|
-
const digest3 = (0,
|
|
114863
|
+
const digest3 = (0, import_node_crypto93.createHash)("sha256");
|
|
114902
114864
|
digest3.update(
|
|
114903
114865
|
JSON.stringify({
|
|
114904
114866
|
format: BUILD_FORMAT,
|
|
@@ -115190,14 +115152,14 @@ async function serveKotlinRequest(pathname, res, app) {
|
|
|
115190
115152
|
}
|
|
115191
115153
|
return true;
|
|
115192
115154
|
}
|
|
115193
|
-
var import_node_child_process75,
|
|
115155
|
+
var import_node_child_process75, import_node_crypto93, import_node_fs158, import_node_module21, import_node_path158, import_node_util21, run16, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal3, CONTENT_TYPES;
|
|
115194
115156
|
var init_kotlin_host = __esm({
|
|
115195
115157
|
"src/kotlin-host.ts"() {
|
|
115196
115158
|
"use strict";
|
|
115197
115159
|
import_node_child_process75 = require("node:child_process");
|
|
115198
|
-
|
|
115160
|
+
import_node_crypto93 = require("node:crypto");
|
|
115199
115161
|
import_node_fs158 = __toESM(require("node:fs"), 1);
|
|
115200
|
-
|
|
115162
|
+
import_node_module21 = require("node:module");
|
|
115201
115163
|
import_node_path158 = __toESM(require("node:path"), 1);
|
|
115202
115164
|
import_node_util21 = require("node:util");
|
|
115203
115165
|
init_kotlinDiscoveryContract();
|
|
@@ -115341,7 +115303,7 @@ function send2(app, change) {
|
|
|
115341
115303
|
if (client2.readyState === import_ws2.WebSocket.OPEN) client2.send(message);
|
|
115342
115304
|
}
|
|
115343
115305
|
async function swiftPackages2(root) {
|
|
115344
|
-
const resolved = (0,
|
|
115306
|
+
const resolved = (0, import_node_module22.createRequire)(import_node_path159.default.join(root, "package.json")).resolve(
|
|
115345
115307
|
"vxrn/swift-package-id"
|
|
115346
115308
|
);
|
|
115347
115309
|
const loaded4 = await import((0, import_node_url9.pathToFileURL)(resolved).href);
|
|
@@ -115489,12 +115451,12 @@ function handleOneNativeSourceUpgrade(req, socket, head) {
|
|
|
115489
115451
|
});
|
|
115490
115452
|
return true;
|
|
115491
115453
|
}
|
|
115492
|
-
var import_node_fs159,
|
|
115454
|
+
var import_node_fs159, import_node_module22, import_node_path159, import_node_url9, import_ws2, apps;
|
|
115493
115455
|
var init_one_native_source = __esm({
|
|
115494
115456
|
"src/one-native-source.ts"() {
|
|
115495
115457
|
"use strict";
|
|
115496
115458
|
import_node_fs159 = __toESM(require("node:fs"), 1);
|
|
115497
|
-
|
|
115459
|
+
import_node_module22 = require("node:module");
|
|
115498
115460
|
import_node_path159 = __toESM(require("node:path"), 1);
|
|
115499
115461
|
import_node_url9 = require("node:url");
|
|
115500
115462
|
init_kotlinDiscoveryContract();
|
|
@@ -115608,7 +115570,7 @@ async function stagePreparedExpoWidgetAssets(preparedApp, origin) {
|
|
|
115608
115570
|
const ext = import_node_path162.default.extname(file);
|
|
115609
115571
|
if (ext.toLowerCase() === ".svg") return stageCatalogSvg(file, scale, origin, bytes);
|
|
115610
115572
|
if (ext.toLowerCase() === ".pdf") {
|
|
115611
|
-
const sha2565 = (0,
|
|
115573
|
+
const sha2565 = (0, import_node_crypto94.createHash)("sha256").update(bytes).digest("hex");
|
|
115612
115574
|
const png = rasterizePdfFiles([{ file: members2.get(file), sha256: sha2565 }]).get(sha2565);
|
|
115613
115575
|
return stageHostBytes(png, origin, ".png");
|
|
115614
115576
|
}
|
|
@@ -115621,11 +115583,11 @@ async function stageExpoWidgetAssets(appRoot, origin) {
|
|
|
115621
115583
|
const prepared = await prepareExpoNativeProject(appRoot);
|
|
115622
115584
|
return stagePreparedExpoWidgetAssets(prepared.app, origin);
|
|
115623
115585
|
}
|
|
115624
|
-
var
|
|
115586
|
+
var import_node_crypto94, import_node_fs161, import_node_path162;
|
|
115625
115587
|
var init_expo_widget_assets = __esm({
|
|
115626
115588
|
"src/expo-widget-assets.ts"() {
|
|
115627
115589
|
"use strict";
|
|
115628
|
-
|
|
115590
|
+
import_node_crypto94 = require("node:crypto");
|
|
115629
115591
|
import_node_fs161 = __toESM(require("node:fs"), 1);
|
|
115630
115592
|
import_node_path162 = __toESM(require("node:path"), 1);
|
|
115631
115593
|
init_app_catalog();
|
|
@@ -115680,11 +115642,11 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
|
|
|
115680
115642
|
"specifications",
|
|
115681
115643
|
`${checksum}.json`
|
|
115682
115644
|
);
|
|
115683
|
-
const sha1 = (value) => (0,
|
|
115645
|
+
const sha1 = (value) => (0, import_node_crypto95.createHash)("sha1").update(value).digest("hex");
|
|
115684
115646
|
let text7;
|
|
115685
115647
|
if (import_node_fs162.default.existsSync(file)) text7 = import_node_fs162.default.readFileSync(file, "utf8");
|
|
115686
115648
|
else {
|
|
115687
|
-
const shard2 = (0,
|
|
115649
|
+
const shard2 = (0, import_node_crypto95.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
|
|
115688
115650
|
const specPath = `Specs/${shard2}/${root}/${version2}/${root}.podspec.json`;
|
|
115689
115651
|
const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
|
|
115690
115652
|
if (!response.ok)
|
|
@@ -115813,7 +115775,7 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
115813
115775
|
"end",
|
|
115814
115776
|
""
|
|
115815
115777
|
].join("\n");
|
|
115816
|
-
const key2 = (0,
|
|
115778
|
+
const key2 = (0, import_node_crypto95.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
|
|
115817
115779
|
JSON.stringify(
|
|
115818
115780
|
Object.entries(specificationChecksums).sort(([a], [b]) => a.localeCompare(b))
|
|
115819
115781
|
)
|
|
@@ -115882,11 +115844,11 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
115882
115844
|
);
|
|
115883
115845
|
});
|
|
115884
115846
|
}
|
|
115885
|
-
var
|
|
115847
|
+
var import_node_crypto95, import_node_fs162, import_node_path163, APP, record5, project, podModuleName;
|
|
115886
115848
|
var init_swift_source_pods = __esm({
|
|
115887
115849
|
"src/swift-source-pods.ts"() {
|
|
115888
115850
|
"use strict";
|
|
115889
|
-
|
|
115851
|
+
import_node_crypto95 = require("node:crypto");
|
|
115890
115852
|
import_node_fs162 = __toESM(require("node:fs"), 1);
|
|
115891
115853
|
import_node_path163 = __toESM(require("node:path"), 1);
|
|
115892
115854
|
init_browser();
|
|
@@ -116563,7 +116525,7 @@ async function prepareNitroCompileInput(options2) {
|
|
|
116563
116525
|
input.libraries ??= {};
|
|
116564
116526
|
input.libraries[nitroProviderTarget({ name: name3 })] = library;
|
|
116565
116527
|
}
|
|
116566
|
-
const key2 = (0,
|
|
116528
|
+
const key2 = (0, import_node_crypto96.createHash)("sha256").update(
|
|
116567
116529
|
collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
|
|
116568
116530
|
).update("\0").update(import_node_fs163.default.realpathSync(options2.moduleRoot)).update("\0").update(options2.configuration).digest("hex");
|
|
116569
116531
|
const packagePath = import_node_path164.default.join(import_node_os32.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
|
|
@@ -116620,11 +116582,11 @@ function nitrogenGeneratedSources(podDirectory) {
|
|
|
116620
116582
|
...sources(import_node_path164.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
|
|
116621
116583
|
];
|
|
116622
116584
|
}
|
|
116623
|
-
var
|
|
116585
|
+
var import_node_crypto96, import_node_fs163, import_node_os32, import_node_path164, BUNDLED_CXX_NAMESPACES, REACT_INCLUDE_PATTERN, REACT_LINKING_PATTERN, REACT_VERSION_PATTERN, RN_HEADER_DIR_MAP, RN_COMMON_ROOTS;
|
|
116624
116586
|
var init_nitro_compile = __esm({
|
|
116625
116587
|
"src/nitro-compile.ts"() {
|
|
116626
116588
|
"use strict";
|
|
116627
|
-
|
|
116589
|
+
import_node_crypto96 = require("node:crypto");
|
|
116628
116590
|
import_node_fs163 = __toESM(require("node:fs"), 1);
|
|
116629
116591
|
import_node_os32 = __toESM(require("node:os"), 1);
|
|
116630
116592
|
import_node_path164 = __toESM(require("node:path"), 1);
|
|
@@ -116701,11 +116663,11 @@ var init_nitro_compile = __esm({
|
|
|
116701
116663
|
});
|
|
116702
116664
|
|
|
116703
116665
|
// src/nitro-compiler-digest.ts
|
|
116704
|
-
var
|
|
116666
|
+
var import_node_crypto97, import_node_fs164, import_node_path165;
|
|
116705
116667
|
var init_nitro_compiler_digest = __esm({
|
|
116706
116668
|
"src/nitro-compiler-digest.ts"() {
|
|
116707
116669
|
"use strict";
|
|
116708
|
-
|
|
116670
|
+
import_node_crypto97 = require("node:crypto");
|
|
116709
116671
|
import_node_fs164 = require("node:fs");
|
|
116710
116672
|
import_node_path165 = __toESM(require("node:path"), 1);
|
|
116711
116673
|
init_swift_compiler_digest();
|
|
@@ -116714,7 +116676,7 @@ var init_nitro_compiler_digest = __esm({
|
|
|
116714
116676
|
|
|
116715
116677
|
// src/nitro-superset-inputs.ts
|
|
116716
116678
|
async function nitroSupersetInputs(options2) {
|
|
116717
|
-
const resolve10 = (0,
|
|
116679
|
+
const resolve10 = (0, import_node_module23.createRequire)((0, import_node_path166.join)(options2.appRoot, "package.json")).resolve;
|
|
116718
116680
|
const pin2 = swiftNativePin();
|
|
116719
116681
|
const inputs2 = {
|
|
116720
116682
|
configuration: options2.configuration,
|
|
@@ -116731,12 +116693,12 @@ async function nitroSupersetInputs(options2) {
|
|
|
116731
116693
|
inputs2[`provider:${name3}`] = `${packageVersion(root)}\0${await packageTreeDigest(root)}`;
|
|
116732
116694
|
return inputs2;
|
|
116733
116695
|
}
|
|
116734
|
-
var import_node_fs165,
|
|
116696
|
+
var import_node_fs165, import_node_module23, import_node_path166, packageVersion;
|
|
116735
116697
|
var init_nitro_superset_inputs = __esm({
|
|
116736
116698
|
"src/nitro-superset-inputs.ts"() {
|
|
116737
116699
|
"use strict";
|
|
116738
116700
|
import_node_fs165 = require("node:fs");
|
|
116739
|
-
|
|
116701
|
+
import_node_module23 = require("node:module");
|
|
116740
116702
|
import_node_path166 = require("node:path");
|
|
116741
116703
|
init_package_tree_digest();
|
|
116742
116704
|
init_swift_native_pin();
|
|
@@ -116843,7 +116805,7 @@ var init_nitro_superset = __esm({
|
|
|
116843
116805
|
init_nitroContract();
|
|
116844
116806
|
init_swift_standin_digest();
|
|
116845
116807
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
116846
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
116808
|
+
NITRO_COMPILER_DIGEST = true ? "be2b5e4714f1ef32a5d71a997e6e92500c4aedcafce342be588a1abb6f2f8991" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
116847
116809
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
116848
116810
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
116849
116811
|
published3 = /* @__PURE__ */ new Map();
|
|
@@ -116940,8 +116902,8 @@ async function buildNitroBundle(appRoot, configuration, moduleRoot, shared = tru
|
|
|
116940
116902
|
assets: compiled.artifact ? await compiledModuleAssets(compiled.artifact) : []
|
|
116941
116903
|
};
|
|
116942
116904
|
}
|
|
116943
|
-
function compiledModuleRequestHandler(label, compile2,
|
|
116944
|
-
const
|
|
116905
|
+
function compiledModuleRequestHandler(label, compile2, options2) {
|
|
116906
|
+
const preparations = new NativePreparation();
|
|
116945
116907
|
return async (req, res) => {
|
|
116946
116908
|
const url = new URL(req.url ?? "/", "http://localhost");
|
|
116947
116909
|
const remote = req.socket.remoteAddress?.replace(/^::ffff:/, "");
|
|
@@ -116964,30 +116926,20 @@ function compiledModuleRequestHandler(label, compile2, isAvailable) {
|
|
|
116964
116926
|
try {
|
|
116965
116927
|
const iosTarget = url.searchParams.get("iosTarget") ?? void 0;
|
|
116966
116928
|
const app = import_node_fs166.default.realpathSync(root);
|
|
116967
|
-
const assetOrigin = `http://${host2}`;
|
|
116968
116929
|
const key2 = `${host2}\0${app}\0${iosTarget ?? ""}\0${url.searchParams.get("configuration") ?? ""}`;
|
|
116969
|
-
const
|
|
116970
|
-
|
|
116971
|
-
|
|
116972
|
-
);
|
|
116973
|
-
if (prepared) {
|
|
116974
|
-
res.writeHead(200, {
|
|
116975
|
-
"Content-Type": "application/json",
|
|
116976
|
-
"Cache-Control": "no-store"
|
|
116977
|
-
});
|
|
116978
|
-
res.end(JSON.stringify(prepared.value));
|
|
116979
|
-
return;
|
|
116980
|
-
}
|
|
116981
|
-
const token = url.searchParams.get(NATIVE_PREPARE_QUERY_PARAM);
|
|
116982
|
-
const metadata = await openPreparations2.prepare(
|
|
116983
|
-
key2,
|
|
116930
|
+
const assetOrigin = `http://${host2}`;
|
|
116931
|
+
const build2 = () => compile2(app, assetOrigin, iosTarget, url.searchParams);
|
|
116932
|
+
const metadata = await preparations.resolve(
|
|
116984
116933
|
app,
|
|
116985
|
-
|
|
116986
|
-
|
|
116987
|
-
|
|
116934
|
+
key2,
|
|
116935
|
+
url.searchParams,
|
|
116936
|
+
async () => {
|
|
116937
|
+
const built2 = await (options2?.configuredNativeSources ? withConfiguredNativeSources(app, build2) : build2());
|
|
116938
|
+
return built2?.metadata ?? null;
|
|
116939
|
+
},
|
|
116940
|
+
(metadata2) => metadata2 === null || (options2?.reusable?.(assetOrigin, metadata2) ?? true)
|
|
116988
116941
|
);
|
|
116989
116942
|
if (res.destroyed) return;
|
|
116990
|
-
openPreparations2.store(key2, token, metadata);
|
|
116991
116943
|
res.writeHead(200, {
|
|
116992
116944
|
"Content-Type": "application/json",
|
|
116993
116945
|
"Cache-Control": "no-store"
|
|
@@ -117006,11 +116958,11 @@ var init_nitro_bundle = __esm({
|
|
|
117006
116958
|
"use strict";
|
|
117007
116959
|
import_node_fs166 = __toESM(require("node:fs"), 1);
|
|
117008
116960
|
import_node_path167 = __toESM(require("node:path"), 1);
|
|
116961
|
+
init_app_config();
|
|
117009
116962
|
init_backend_origin();
|
|
117010
116963
|
init_expo_native_workspace();
|
|
117011
116964
|
init_native_app_identity_project();
|
|
117012
116965
|
init_native_preparation();
|
|
117013
|
-
init_nativePreparationContract();
|
|
117014
116966
|
init_nitro_app_providers();
|
|
117015
116967
|
init_nitro_compile();
|
|
117016
116968
|
init_swift_distribution();
|
|
@@ -117025,7 +116977,10 @@ var init_nitro_bundle = __esm({
|
|
|
117025
116977
|
throw new Error("Nitro compilation needs configuration=Debug or Release");
|
|
117026
116978
|
return compileNitroApp(root, origin, configuration, void 0, true, iosTarget);
|
|
117027
116979
|
},
|
|
117028
|
-
|
|
116980
|
+
{
|
|
116981
|
+
configuredNativeSources: true,
|
|
116982
|
+
reusable: (origin, { url, hash }) => swiftArtifactIsAvailable(origin, url, hash)
|
|
116983
|
+
}
|
|
117029
116984
|
);
|
|
117030
116985
|
}
|
|
117031
116986
|
});
|
|
@@ -117038,7 +116993,7 @@ __export(expo_widgets_bundle_exports, {
|
|
|
117038
116993
|
handleExpoWidgetsRequest: () => handleExpoWidgetsRequest
|
|
117039
116994
|
});
|
|
117040
116995
|
async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
117041
|
-
const require2 = (0,
|
|
116996
|
+
const require2 = (0, import_node_module24.createRequire)(import_node_path168.default.join(appRoot, "package.json"));
|
|
117042
116997
|
let manifest;
|
|
117043
116998
|
try {
|
|
117044
116999
|
manifest = require2.resolve("expo-widgets/package.json");
|
|
@@ -117049,14 +117004,14 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
117049
117004
|
}
|
|
117050
117005
|
const packageDir = import_node_path168.default.dirname(manifest);
|
|
117051
117006
|
const runtimeBundle = await withSwiftRootLock(
|
|
117052
|
-
import_node_path168.default.join(await
|
|
117007
|
+
import_node_path168.default.join(await import_promises19.default.realpath(packageDir), "bundle"),
|
|
117053
117008
|
async () => {
|
|
117054
117009
|
await (0, import_node_util22.promisify)(import_node_child_process76.execFile)(
|
|
117055
117010
|
process.env.NODE_BINARY || "node",
|
|
117056
117011
|
[import_node_path168.default.join(packageDir, "scripts/build-bundle.mjs"), appRoot],
|
|
117057
117012
|
{ cwd: appRoot, maxBuffer: 16 * 1024 * 1024 }
|
|
117058
117013
|
);
|
|
117059
|
-
return
|
|
117014
|
+
return import_promises19.default.readFile(import_node_path168.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"), "utf8");
|
|
117060
117015
|
}
|
|
117061
117016
|
);
|
|
117062
117017
|
const catalog = await stageExpoWidgetAssets(appRoot, origin);
|
|
@@ -117067,13 +117022,13 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
117067
117022
|
}
|
|
117068
117023
|
};
|
|
117069
117024
|
}
|
|
117070
|
-
var import_node_child_process76,
|
|
117025
|
+
var import_node_child_process76, import_promises19, import_node_module24, import_node_path168, import_node_util22, EXPO_WIDGETS_ROUTE, handleExpoWidgetsRequest;
|
|
117071
117026
|
var init_expo_widgets_bundle = __esm({
|
|
117072
117027
|
"src/expo-widgets-bundle.ts"() {
|
|
117073
117028
|
"use strict";
|
|
117074
117029
|
import_node_child_process76 = require("node:child_process");
|
|
117075
|
-
|
|
117076
|
-
|
|
117030
|
+
import_promises19 = __toESM(require("node:fs/promises"), 1);
|
|
117031
|
+
import_node_module24 = require("node:module");
|
|
117077
117032
|
import_node_path168 = __toESM(require("node:path"), 1);
|
|
117078
117033
|
import_node_util22 = require("node:util");
|
|
117079
117034
|
init_expo_widget_assets();
|
|
@@ -117084,9 +117039,11 @@ var init_expo_widgets_bundle = __esm({
|
|
|
117084
117039
|
handleExpoWidgetsRequest = compiledModuleRequestHandler(
|
|
117085
117040
|
"Expo widget extension",
|
|
117086
117041
|
buildExpoWidgetsBundle,
|
|
117087
|
-
|
|
117088
|
-
(
|
|
117089
|
-
|
|
117042
|
+
{
|
|
117043
|
+
reusable: (origin, { images }) => Object.values(images).every(
|
|
117044
|
+
(variants) => variants.every(({ uri }) => hasStagedHostFile(origin, uri))
|
|
117045
|
+
)
|
|
117046
|
+
}
|
|
117090
117047
|
);
|
|
117091
117048
|
}
|
|
117092
117049
|
});
|
|
@@ -117726,7 +117683,7 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
|
|
|
117726
117683
|
const packagePath = import_node_path169.default.join(
|
|
117727
117684
|
swiftCacheDir(),
|
|
117728
117685
|
"peach-one-sdk-swift",
|
|
117729
|
-
(0,
|
|
117686
|
+
(0, import_node_crypto98.createHash)("sha256").update(import_node_fs167.default.realpathSync(appRoot)).digest("hex").slice(0, 16),
|
|
117730
117687
|
"sdk"
|
|
117731
117688
|
);
|
|
117732
117689
|
const bindingFlags = optimize ? '["-suppress-warnings"]' : '["-suppress-warnings", "-Onone", "-no-whole-module-optimization"]';
|
|
@@ -117773,11 +117730,11 @@ async function buildOneSDKBundle(appRoot) {
|
|
|
117773
117730
|
assets: await compiledModuleAssets(compiled.artifact)
|
|
117774
117731
|
};
|
|
117775
117732
|
}
|
|
117776
|
-
var
|
|
117733
|
+
var import_node_crypto98, import_node_fs167, import_node_path169, ONE_SDK_ROUTE, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES, handleOneSDKRequest;
|
|
117777
117734
|
var init_one_sdk_bundle = __esm({
|
|
117778
117735
|
"src/one-sdk-bundle.ts"() {
|
|
117779
117736
|
"use strict";
|
|
117780
|
-
|
|
117737
|
+
import_node_crypto98 = require("node:crypto");
|
|
117781
117738
|
import_node_fs167 = __toESM(require("node:fs"), 1);
|
|
117782
117739
|
import_node_path169 = __toESM(require("node:path"), 1);
|
|
117783
117740
|
init_expo_native_workspace();
|
|
@@ -117794,7 +117751,8 @@ var init_one_sdk_bundle = __esm({
|
|
|
117794
117751
|
ONE_SDK_BINDING_SHARD_MIN_BYTES = 256 * 1024;
|
|
117795
117752
|
handleOneSDKRequest = compiledModuleRequestHandler(
|
|
117796
117753
|
"One SDK",
|
|
117797
|
-
(root, origin) => compileOneSDKApp(root, origin)
|
|
117754
|
+
(root, origin) => compileOneSDKApp(root, origin),
|
|
117755
|
+
{ configuredNativeSources: true }
|
|
117798
117756
|
);
|
|
117799
117757
|
}
|
|
117800
117758
|
});
|
|
@@ -117856,7 +117814,7 @@ async function compileTurboApp(appRoot, origin, moduleRoot, iosTarget, prepareRe
|
|
|
117856
117814
|
const { artifact, collection } = await compileTurboModule({
|
|
117857
117815
|
appRoot,
|
|
117858
117816
|
reactNativeRoot: import_node_path170.default.dirname(
|
|
117859
|
-
(0,
|
|
117817
|
+
(0, import_node_module25.createRequire)(import_node_path170.default.join(projectRoot, "package.json")).resolve(
|
|
117860
117818
|
"react-native/package.json"
|
|
117861
117819
|
)
|
|
117862
117820
|
),
|
|
@@ -117894,11 +117852,11 @@ async function buildTurboBundle(appRoot, moduleRoot, prepareReactNativeCore) {
|
|
|
117894
117852
|
assets: compiled.artifact ? await compiledModuleAssets(compiled.artifact) : []
|
|
117895
117853
|
};
|
|
117896
117854
|
}
|
|
117897
|
-
var
|
|
117855
|
+
var import_node_module25, import_node_path170, TURBO_ROUTE, handleTurboRequest;
|
|
117898
117856
|
var init_turbo_bundle = __esm({
|
|
117899
117857
|
"src/turbo-bundle.ts"() {
|
|
117900
117858
|
"use strict";
|
|
117901
|
-
|
|
117859
|
+
import_node_module25 = require("node:module");
|
|
117902
117860
|
import_node_path170 = __toESM(require("node:path"), 1);
|
|
117903
117861
|
init_app_project();
|
|
117904
117862
|
init_app_config();
|
|
@@ -117916,7 +117874,10 @@ var init_turbo_bundle = __esm({
|
|
|
117916
117874
|
handleTurboRequest = compiledModuleRequestHandler(
|
|
117917
117875
|
"TurboModule",
|
|
117918
117876
|
(root, origin, iosTarget) => compileTurboApp(root, origin, void 0, iosTarget),
|
|
117919
|
-
|
|
117877
|
+
{
|
|
117878
|
+
configuredNativeSources: true,
|
|
117879
|
+
reusable: (origin, { unavailable: unavailable2, url, hash }) => !unavailable2?.length && swiftArtifactIsAvailable(origin, url, hash)
|
|
117880
|
+
}
|
|
117920
117881
|
);
|
|
117921
117882
|
}
|
|
117922
117883
|
});
|
|
@@ -117962,7 +117923,7 @@ async function resolveExpoAndroidAutolinking(appRoot) {
|
|
|
117962
117923
|
async function resolveAndroidModules(appRoot) {
|
|
117963
117924
|
let autolinker;
|
|
117964
117925
|
try {
|
|
117965
|
-
autolinker = (0,
|
|
117926
|
+
autolinker = (0, import_node_module26.createRequire)(import_node_path171.default.join(appRoot, "package.json")).resolve(
|
|
117966
117927
|
"expo-modules-autolinking/package.json"
|
|
117967
117928
|
);
|
|
117968
117929
|
} catch (error) {
|
|
@@ -118016,12 +117977,12 @@ async function resolveReactNativeAndroidAutolinking(appRoot) {
|
|
|
118016
117977
|
}
|
|
118017
117978
|
return linked;
|
|
118018
117979
|
}
|
|
118019
|
-
var import_node_fs168,
|
|
117980
|
+
var import_node_fs168, import_node_module26, import_node_path171, resolving;
|
|
118020
117981
|
var init_android_autolinking = __esm({
|
|
118021
117982
|
"src/android-autolinking.ts"() {
|
|
118022
117983
|
"use strict";
|
|
118023
117984
|
import_node_fs168 = __toESM(require("node:fs"), 1);
|
|
118024
|
-
|
|
117985
|
+
import_node_module26 = require("node:module");
|
|
118025
117986
|
import_node_path171 = __toESM(require("node:path"), 1);
|
|
118026
117987
|
init_androidAutolinkingContract();
|
|
118027
117988
|
init_autolinker_process();
|
|
@@ -118436,11 +118397,11 @@ function readSharedDesktopAuthSession() {
|
|
|
118436
118397
|
return null;
|
|
118437
118398
|
}
|
|
118438
118399
|
}
|
|
118439
|
-
var
|
|
118400
|
+
var import_node_crypto99, import_node_fs171, import_node_path174, SESSION_VERSION, SESSION_FILE_ENV, DEFAULT_ORIGIN;
|
|
118440
118401
|
var init_shared_session = __esm({
|
|
118441
118402
|
"src/auth/shared-session.ts"() {
|
|
118442
118403
|
"use strict";
|
|
118443
|
-
|
|
118404
|
+
import_node_crypto99 = require("node:crypto");
|
|
118444
118405
|
import_node_fs171 = require("node:fs");
|
|
118445
118406
|
import_node_path174 = require("node:path");
|
|
118446
118407
|
init_home_paths();
|
|
@@ -118478,7 +118439,7 @@ var init_run_rnx = __esm({
|
|
|
118478
118439
|
// cli/secure-file.ts
|
|
118479
118440
|
function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
|
|
118480
118441
|
(0, import_node_fs172.mkdirSync)((0, import_node_path175.dirname)(filepath), { recursive: true });
|
|
118481
|
-
const temporary = `${filepath}.tmp-${process.pid}-${(0,
|
|
118442
|
+
const temporary = `${filepath}.tmp-${process.pid}-${(0, import_node_crypto100.randomUUID)()}`;
|
|
118482
118443
|
let descriptor = null;
|
|
118483
118444
|
try {
|
|
118484
118445
|
descriptor = (0, import_node_fs172.openSync)(temporary, "wx", 384);
|
|
@@ -118495,11 +118456,11 @@ function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
|
|
|
118495
118456
|
throw error;
|
|
118496
118457
|
}
|
|
118497
118458
|
}
|
|
118498
|
-
var
|
|
118459
|
+
var import_node_crypto100, import_node_fs172, import_node_path175;
|
|
118499
118460
|
var init_secure_file = __esm({
|
|
118500
118461
|
"cli/secure-file.ts"() {
|
|
118501
118462
|
"use strict";
|
|
118502
|
-
|
|
118463
|
+
import_node_crypto100 = require("node:crypto");
|
|
118503
118464
|
import_node_fs172 = require("node:fs");
|
|
118504
118465
|
import_node_path175 = require("node:path");
|
|
118505
118466
|
}
|
|
@@ -120861,11 +120822,11 @@ function createCloudSession(input) {
|
|
|
120861
120822
|
}
|
|
120862
120823
|
return session;
|
|
120863
120824
|
}
|
|
120864
|
-
var
|
|
120825
|
+
var import_node_crypto101, import_node_fs174, import_node_path177, CLOUD_SESSION_VERSION, MAX_ENCODED_SESSION_BYTES, RNX_SHELL_UPDATE_PREFIX, RNX_SHELL_UPDATE_SET_PREFIX, RNX_SHELL_UPDATE_UNSET;
|
|
120865
120826
|
var init_cloud_session = __esm({
|
|
120866
120827
|
"cli/cloud-session.ts"() {
|
|
120867
120828
|
"use strict";
|
|
120868
|
-
|
|
120829
|
+
import_node_crypto101 = require("node:crypto");
|
|
120869
120830
|
import_node_fs174 = require("node:fs");
|
|
120870
120831
|
import_node_path177 = require("node:path");
|
|
120871
120832
|
init_backend_origin();
|
|
@@ -121096,7 +121057,7 @@ function listMetroAssetDest(assetsPath) {
|
|
|
121096
121057
|
return { directory: directory2, files: files2, truncated };
|
|
121097
121058
|
}
|
|
121098
121059
|
function metroDescriptorHash(scaleBytes) {
|
|
121099
|
-
const hasher = (0,
|
|
121060
|
+
const hasher = (0, import_node_crypto102.createHash)("md5");
|
|
121100
121061
|
for (const bytes of scaleBytes) hasher.update(bytes);
|
|
121101
121062
|
return hasher.digest("hex");
|
|
121102
121063
|
}
|
|
@@ -121125,7 +121086,7 @@ function distinctByContent(directory2, options2) {
|
|
|
121125
121086
|
} catch {
|
|
121126
121087
|
continue;
|
|
121127
121088
|
}
|
|
121128
|
-
const digest3 = (0,
|
|
121089
|
+
const digest3 = (0, import_node_crypto102.createHash)("md5").update(bytes).digest("hex");
|
|
121129
121090
|
if (!byContent.has(digest3)) byContent.set(digest3, relative5);
|
|
121130
121091
|
}
|
|
121131
121092
|
return [...byContent.values()];
|
|
@@ -121173,7 +121134,7 @@ function placeMetroDescriptor(listing, descriptor) {
|
|
|
121173
121134
|
continue;
|
|
121174
121135
|
}
|
|
121175
121136
|
const identical = fileHashes2 ? bytes.every((file, index) => {
|
|
121176
|
-
const digest3 = (0,
|
|
121137
|
+
const digest3 = (0, import_node_crypto102.createHash)("md5").update(file).digest("hex");
|
|
121177
121138
|
return descriptor.scales.some(
|
|
121178
121139
|
(scale, declared) => scale === scales[index] && fileHashes2[declared] === digest3
|
|
121179
121140
|
);
|
|
@@ -121198,7 +121159,7 @@ function unverifiedContentKey(dest, fileDigests2) {
|
|
|
121198
121159
|
const file = (0, import_node_path178.join)(dest.directory, relative5);
|
|
121199
121160
|
let digest3 = fileDigests2.get(file);
|
|
121200
121161
|
if (digest3 === void 0) {
|
|
121201
|
-
digest3 = (0,
|
|
121162
|
+
digest3 = (0, import_node_crypto102.createHash)("sha256").update((0, import_node_fs175.readFileSync)(file)).digest("hex");
|
|
121202
121163
|
fileDigests2.set(file, digest3);
|
|
121203
121164
|
}
|
|
121204
121165
|
return [scale, digest3];
|
|
@@ -121487,7 +121448,7 @@ async function produceArtifact(prepared, maxBytes, command) {
|
|
|
121487
121448
|
}
|
|
121488
121449
|
return {
|
|
121489
121450
|
bytes,
|
|
121490
|
-
sha256: (0,
|
|
121451
|
+
sha256: (0, import_node_crypto102.createHash)("sha256").update(bytes).digest("hex"),
|
|
121491
121452
|
receipt: artifact.receipt,
|
|
121492
121453
|
assetsDirectory: prepared.dest?.directory ?? null,
|
|
121493
121454
|
warnings
|
|
@@ -121592,11 +121553,11 @@ async function createCloudBox(options2) {
|
|
|
121592
121553
|
warnings: artifact.warnings
|
|
121593
121554
|
};
|
|
121594
121555
|
}
|
|
121595
|
-
var
|
|
121556
|
+
var import_node_crypto102, import_node_fs175, import_node_path178, import_node_vm, DEFAULT_RNX_CLOUD_ORIGIN, MAX_RNX_CLOUD_BUNDLE_BYTES, REMOTE_COMMAND, PREVIEW_COMMAND, NanoDevelopmentOnlyError, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS;
|
|
121596
121557
|
var init_cloud_client = __esm({
|
|
121597
121558
|
"cli/cloud-client.ts"() {
|
|
121598
121559
|
"use strict";
|
|
121599
|
-
|
|
121560
|
+
import_node_crypto102 = require("node:crypto");
|
|
121600
121561
|
import_node_fs175 = require("node:fs");
|
|
121601
121562
|
import_node_path178 = require("node:path");
|
|
121602
121563
|
import_node_vm = require("node:vm");
|
|
@@ -123370,7 +123331,7 @@ function serveAppPackageResource(req, res) {
|
|
|
123370
123331
|
init_fetch_proxy_handler();
|
|
123371
123332
|
|
|
123372
123333
|
// src/host/fetch-proxy-transport.ts
|
|
123373
|
-
var
|
|
123334
|
+
var import_node_crypto85 = require("node:crypto");
|
|
123374
123335
|
var import_node_fs145 = require("node:fs");
|
|
123375
123336
|
var import_node_http23 = require("node:http2");
|
|
123376
123337
|
var import_node_path145 = __toESM(require("node:path"), 1);
|
|
@@ -123403,7 +123364,7 @@ async function createIdentity() {
|
|
|
123403
123364
|
const keys = await crypto.subtle.generateKey(algorithm, true, ["sign", "verify"]);
|
|
123404
123365
|
const certificate = await import_x5092.X509CertificateGenerator.createSelfSigned(
|
|
123405
123366
|
{
|
|
123406
|
-
serialNumber: (0,
|
|
123367
|
+
serialNumber: (0, import_node_crypto85.randomBytes)(16).toString("hex"),
|
|
123407
123368
|
name: "CN=localhost",
|
|
123408
123369
|
notBefore: new Date(Date.now() - 6e4),
|
|
123409
123370
|
notAfter: new Date(Date.now() + 365 * 24 * 60 * 6e4),
|
|
@@ -123422,7 +123383,7 @@ async function createIdentity() {
|
|
|
123422
123383
|
${privateKey.toString("base64").match(/.{1,64}/g)?.join("\n")}
|
|
123423
123384
|
-----END PRIVATE KEY-----
|
|
123424
123385
|
`,
|
|
123425
|
-
spki: (0,
|
|
123386
|
+
spki: (0, import_node_crypto85.createHash)("sha256").update(Buffer.from(await crypto.subtle.exportKey("spki", keys.publicKey))).digest("base64")
|
|
123426
123387
|
};
|
|
123427
123388
|
}
|
|
123428
123389
|
async function startFetchProxyTransport(identityPath, hasLiveSims = () => false) {
|
|
@@ -123985,7 +123946,7 @@ var PlaneHost = class {
|
|
|
123985
123946
|
|
|
123986
123947
|
// src/host/replacement-module-handler.ts
|
|
123987
123948
|
var import_node_fs148 = require("node:fs");
|
|
123988
|
-
var
|
|
123949
|
+
var import_promises18 = __toESM(require("node:fs/promises"), 1);
|
|
123989
123950
|
var import_node_path148 = __toESM(require("node:path"), 1);
|
|
123990
123951
|
|
|
123991
123952
|
// ../contrast-bundler/src/replacementModule.ts
|
|
@@ -124404,7 +124365,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
|
|
|
124404
124365
|
}
|
|
124405
124366
|
let resolvedTargetPath;
|
|
124406
124367
|
try {
|
|
124407
|
-
resolvedTargetPath = await
|
|
124368
|
+
resolvedTargetPath = await import_promises18.default.realpath(targetPath);
|
|
124408
124369
|
} catch (error) {
|
|
124409
124370
|
const message = error instanceof Error ? error.message : String(error);
|
|
124410
124371
|
res.writeHead(404, { "Content-Type": "text/plain; charset=utf-8" });
|
|
@@ -124412,7 +124373,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
|
|
|
124412
124373
|
return true;
|
|
124413
124374
|
}
|
|
124414
124375
|
if (servedRoots) {
|
|
124415
|
-
const realRoots = (await Promise.all(servedRoots.map((root) =>
|
|
124376
|
+
const realRoots = (await Promise.all(servedRoots.map((root) => import_promises18.default.realpath(root).catch(() => null)))).filter((root) => root !== null);
|
|
124416
124377
|
if (!isInsideAny(realRoots, resolvedTargetPath)) {
|
|
124417
124378
|
res.writeHead(403, { "Content-Type": "text/plain; charset=utf-8" });
|
|
124418
124379
|
res.end("replacement file must be inside a folder the bundler serves");
|
|
@@ -124422,7 +124383,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
|
|
|
124422
124383
|
try {
|
|
124423
124384
|
const compiled = compileReplacementModule({
|
|
124424
124385
|
filePath: resolvedTargetPath,
|
|
124425
|
-
source: await
|
|
124386
|
+
source: await import_promises18.default.readFile(resolvedTargetPath, "utf8"),
|
|
124426
124387
|
runtimePackages,
|
|
124427
124388
|
// the imported file's url is this request's with only its path changed,
|
|
124428
124389
|
// so the token, cache key and runtime packages carry over.
|
|
@@ -125620,21 +125581,15 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
125620
125581
|
return;
|
|
125621
125582
|
}
|
|
125622
125583
|
if (route === ONE_SDK_ROUTE2) {
|
|
125623
|
-
void Promise.resolve().then(() => (init_one_sdk_bundle(), one_sdk_bundle_exports)).then(
|
|
125624
|
-
({ handleOneSDKRequest: handleOneSDKRequest2 }) => withRequestNativeSources(req, () => handleOneSDKRequest2(req, res))
|
|
125625
|
-
).catch(failLazyRoute);
|
|
125584
|
+
void Promise.resolve().then(() => (init_one_sdk_bundle(), one_sdk_bundle_exports)).then(({ handleOneSDKRequest: handleOneSDKRequest2 }) => handleOneSDKRequest2(req, res)).catch(failLazyRoute);
|
|
125626
125585
|
return;
|
|
125627
125586
|
}
|
|
125628
125587
|
if (route === NITRO_ROUTE2) {
|
|
125629
|
-
void Promise.resolve().then(() => (init_nitro_bundle(), nitro_bundle_exports)).then(
|
|
125630
|
-
({ handleNitroRequest: handleNitroRequest2 }) => withRequestNativeSources(req, () => handleNitroRequest2(req, res))
|
|
125631
|
-
).catch(failLazyRoute);
|
|
125588
|
+
void Promise.resolve().then(() => (init_nitro_bundle(), nitro_bundle_exports)).then(({ handleNitroRequest: handleNitroRequest2 }) => handleNitroRequest2(req, res)).catch(failLazyRoute);
|
|
125632
125589
|
return;
|
|
125633
125590
|
}
|
|
125634
125591
|
if (route === TURBO_ROUTE2) {
|
|
125635
|
-
void Promise.resolve().then(() => (init_turbo_bundle(), turbo_bundle_exports)).then(
|
|
125636
|
-
({ handleTurboRequest: handleTurboRequest2 }) => withRequestNativeSources(req, () => handleTurboRequest2(req, res))
|
|
125637
|
-
).catch(failLazyRoute);
|
|
125592
|
+
void Promise.resolve().then(() => (init_turbo_bundle(), turbo_bundle_exports)).then(({ handleTurboRequest: handleTurboRequest2 }) => handleTurboRequest2(req, res)).catch(failLazyRoute);
|
|
125638
125593
|
return;
|
|
125639
125594
|
}
|
|
125640
125595
|
if (route.startsWith(SWIFT_PACKAGE_PATH) || route === KOTLIN_PACKAGE_PATH || route === ONE_WIDGET_PATH) {
|
|
@@ -125644,9 +125599,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
125644
125599
|
return;
|
|
125645
125600
|
}
|
|
125646
125601
|
if (req.url?.startsWith("/__peach/expo-swift") || req.url?.startsWith("/__peach/swift")) {
|
|
125647
|
-
void Promise.resolve().then(() => (init_expo_swift_host(), expo_swift_host_exports)).then(
|
|
125648
|
-
({ handleExpoSwiftRequest: handleExpoSwiftRequest2 }) => withRequestNativeSources(req, () => handleExpoSwiftRequest2(req, res))
|
|
125649
|
-
).then((handled) => {
|
|
125602
|
+
void Promise.resolve().then(() => (init_expo_swift_host(), expo_swift_host_exports)).then(({ handleExpoSwiftRequest: handleExpoSwiftRequest2 }) => handleExpoSwiftRequest2(req, res)).then((handled) => {
|
|
125650
125603
|
if (!handled) {
|
|
125651
125604
|
res.writeHead(404);
|
|
125652
125605
|
res.end("Swift artifact not found");
|
|
@@ -126693,13 +126646,6 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
126693
126646
|
}
|
|
126694
126647
|
}
|
|
126695
126648
|
};
|
|
126696
|
-
function withRequestNativeSources(req, serve) {
|
|
126697
|
-
const root = new URL(req.url ?? "/", "http://localhost").searchParams.get("root");
|
|
126698
|
-
if (!root || !import_path5.default.isAbsolute(root)) return serve();
|
|
126699
|
-
return Promise.resolve().then(() => (init_app_config(), app_config_exports)).then(
|
|
126700
|
-
({ withConfiguredNativeSources: withConfiguredNativeSources2 }) => withConfiguredNativeSources2(root, serve)
|
|
126701
|
-
);
|
|
126702
|
-
}
|
|
126703
126649
|
// Annotate the CommonJS export names for ESM import in node:
|
|
126704
126650
|
0 && (module.exports = {
|
|
126705
126651
|
SootSimBridgeHost,
|