peachsim 0.1.2481 → 0.1.2483
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 +2620 -2599
- 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 +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-FYDDLFH7.mjs → acorn-5IUVEQ5U.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-XVGPPYRC.mjs → chunk-3XA33ML6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-I2KV5OCI.mjs → chunk-3Y4O3MOM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-CIRF7MUH.mjs → chunk-4LW6LZ6Z.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-56VSEMVW.mjs → chunk-4PY2AMHM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-6ALMBFOB.mjs → chunk-74BYI5ME.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YY4T7YSR.mjs → chunk-DMZ7YRB2.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-MYAC4QOH.mjs → chunk-DV6RVJXG.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-IKMY4F25.mjs → chunk-HHIU36JR.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VGOJCWU3.mjs → chunk-HK2PVWZR.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZNG6GMUS.mjs → chunk-HPATKEHW.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HK2YIUS3.mjs → chunk-IGRHCKP6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3AHKFCTP.mjs → chunk-JNWWQ6IK.mjs} +1 -1
- package/dist-lib/esm-chunks/chunk-KK3WVSF7.mjs +12 -0
- package/dist-lib/esm-chunks/{chunk-RRHGYD5I.mjs → chunk-M4YWLFJD.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-55FEZERB.mjs → chunk-NWAG7YWU.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DILJLCVN.mjs → chunk-NZ4SCX34.mjs} +12 -12
- package/dist-lib/esm-chunks/{chunk-DR66BWZR.mjs → chunk-QQJEXO33.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-OMWELJZM.mjs → chunk-REMZIJ6Q.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-MTWECGVY.mjs → chunk-UCAXXDBC.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YBJYSS46.mjs → chunk-UETKYQXI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DOTVMR2R.mjs → chunk-UTFTGMVS.mjs} +5 -5
- package/dist-lib/esm-chunks/{metro-layout-parser-EEI7OVUC.mjs → metro-layout-parser-ONZA2XYW.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-V5QMDVKG.mjs → swift-package-prebuilt-W7ES3LDK.mjs} +10 -10
- package/dist-lib/esm-chunks/{swift-sdk-app-module-QEWCSQWL.mjs → swift-sdk-app-module-XYSH4J23.mjs} +13 -13
- package/dist-lib/esm-chunks/{swift-sdk-image-XH4JSUEA.mjs → swift-sdk-image-KNCQQOMT.mjs} +13 -13
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-HQJ5Z6TE.mjs → swift-sdk-image-producer-DC6U6VUF.mjs} +4 -4
- package/dist-lib/expo-swift-bundle.cjs +260 -233
- package/dist-lib/expo-swift-metadata.cjs +2 -2
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +440 -453
- package/dist-lib/host/fetch-proxy-handler.cjs +181 -343
- 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 +2 -2
- 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 +82 -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 +494 -503
- 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/runtime-companion.json +1 -1
- package/src/assetCatalogContract.ts +8 -0
- package/src/expo-swift-host.ts +17 -35
- package/src/expo-widgets-bundle.ts +6 -4
- package/src/guest-bundle.ts +8 -3
- 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/swift-host.ts +3 -0
- package/src/turbo-bundle.ts +5 -1
- package/dist-lib/esm-chunks/chunk-V27M6XEI.mjs +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2483 | (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;
|
|
@@ -2058,7 +2058,7 @@ var init_runtime_assets = __esm({
|
|
|
2058
2058
|
var runtime_companion_default;
|
|
2059
2059
|
var init_runtime_companion = __esm({
|
|
2060
2060
|
"runtime-companion.json"() {
|
|
2061
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
2061
|
+
runtime_companion_default = { abi: 1, sha256: "9dda127e78522f05b54bc95961690c19bc971c4c3cbc27d560808da72d9642f1", file: "node/cli-9dda127e78522f05b54bc95961690c19bc971c4c3cbc27d560808da72d9642f1.cjs" };
|
|
2062
2062
|
}
|
|
2063
2063
|
});
|
|
2064
2064
|
|
|
@@ -2520,7 +2520,7 @@ var init_is_record = __esm({
|
|
|
2520
2520
|
// src/assetCatalogContract.ts
|
|
2521
2521
|
function isSwiftImageVariants(value) {
|
|
2522
2522
|
return Array.isArray(value) && value.length > 0 && value.every(
|
|
2523
|
-
(image) => typeof image === "object" && image !== null && typeof image.uri === "string" && typeof image.scale === "number" && Number.isFinite(image.scale) && image.scale > 0 && (image.appearance === void 0 || image.appearance === "light" || image.appearance === "dark") && (image.renderingMode === void 0 || image.renderingMode === "template" || image.renderingMode === "original")
|
|
2523
|
+
(image) => typeof image === "object" && image !== null && typeof image.uri === "string" && typeof image.scale === "number" && Number.isFinite(image.scale) && image.scale > 0 && (image.pixelSize === void 0 || typeof image.pixelSize === "object" && image.pixelSize !== null && Number.isInteger(image.pixelSize.width) && image.pixelSize.width > 0 && Number.isInteger(image.pixelSize.height) && image.pixelSize.height > 0) && (image.appearance === void 0 || image.appearance === "light" || image.appearance === "dark") && (image.renderingMode === void 0 || image.renderingMode === "template" || image.renderingMode === "original")
|
|
2524
2524
|
);
|
|
2525
2525
|
}
|
|
2526
2526
|
function sfSymbolVariantKey(variant2) {
|
|
@@ -5656,13 +5656,13 @@ var init_swift_standin_digest = __esm({
|
|
|
5656
5656
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
5657
5657
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
5658
5658
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
5659
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
5659
|
+
STANDIN_SOURCE_DIGEST = true ? "85f1e7cbeb527885fc58cf92a8723307e9e5239bfa66c1d45020f2cae6b61e3f" : standinSourceDigest();
|
|
5660
5660
|
}
|
|
5661
5661
|
});
|
|
5662
5662
|
|
|
5663
5663
|
// src/expo-native-compiler-digest.ts
|
|
5664
5664
|
function expoNativeCompilerDigestValue() {
|
|
5665
|
-
return true ? "
|
|
5665
|
+
return true ? "f9671a1c1eddca137b78f44455f0e3f062609c1fae0e7694d60d1eafc2bf55d1" : 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();
|
|
@@ -87639,6 +87615,41 @@ var init_nitro_adapter = __esm({
|
|
|
87639
87615
|
}
|
|
87640
87616
|
});
|
|
87641
87617
|
|
|
87618
|
+
// ../../src/ios/pngHeader.ts
|
|
87619
|
+
function readPngHeader(bytes) {
|
|
87620
|
+
if (bytes.byteLength < 26) return null;
|
|
87621
|
+
for (let i = 0; i < PNG_SIGNATURE.length; i++) {
|
|
87622
|
+
if (bytes[i] !== PNG_SIGNATURE[i]) return null;
|
|
87623
|
+
}
|
|
87624
|
+
if (bytes[12] !== 73 || bytes[13] !== 72 || bytes[14] !== 68 || bytes[15] !== 82) {
|
|
87625
|
+
return null;
|
|
87626
|
+
}
|
|
87627
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
87628
|
+
const width = view.getUint32(16, false);
|
|
87629
|
+
const height = view.getUint32(20, false);
|
|
87630
|
+
const bitDepth = bytes[24] ?? 0;
|
|
87631
|
+
const colorType = bytes[25] ?? 0;
|
|
87632
|
+
return {
|
|
87633
|
+
width,
|
|
87634
|
+
height,
|
|
87635
|
+
bitDepth,
|
|
87636
|
+
colorType,
|
|
87637
|
+
hasAlpha: ALPHA_COLOR_TYPES.has(colorType)
|
|
87638
|
+
};
|
|
87639
|
+
}
|
|
87640
|
+
function readPngDimensions(bytes) {
|
|
87641
|
+
const h = readPngHeader(bytes);
|
|
87642
|
+
return h ? { width: h.width, height: h.height } : null;
|
|
87643
|
+
}
|
|
87644
|
+
var PNG_SIGNATURE, ALPHA_COLOR_TYPES;
|
|
87645
|
+
var init_pngHeader = __esm({
|
|
87646
|
+
"../../src/ios/pngHeader.ts"() {
|
|
87647
|
+
"use strict";
|
|
87648
|
+
PNG_SIGNATURE = [137, 80, 78, 71, 13, 10, 26, 10];
|
|
87649
|
+
ALPHA_COLOR_TYPES = /* @__PURE__ */ new Set([4, 6]);
|
|
87650
|
+
}
|
|
87651
|
+
});
|
|
87652
|
+
|
|
87642
87653
|
// ../../node_modules/svgpath/lib/path_parse.js
|
|
87643
87654
|
var require_path_parse = __commonJS({
|
|
87644
87655
|
"../../node_modules/svgpath/lib/path_parse.js"(exports2, module2) {
|
|
@@ -91027,11 +91038,11 @@ function coreDataModelDirectories(files2) {
|
|
|
91027
91038
|
}
|
|
91028
91039
|
return [...models].sort();
|
|
91029
91040
|
}
|
|
91030
|
-
var
|
|
91041
|
+
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
91042
|
var init_core_data_model = __esm({
|
|
91032
91043
|
"src/core-data-model.ts"() {
|
|
91033
91044
|
"use strict";
|
|
91034
|
-
|
|
91045
|
+
import_node_crypto72 = require("node:crypto");
|
|
91035
91046
|
import_node_fs124 = require("node:fs");
|
|
91036
91047
|
import_node_path126 = __toESM(require("node:path"), 1);
|
|
91037
91048
|
init_core_data_entity_classes();
|
|
@@ -91150,7 +91161,7 @@ var init_core_data_model = __esm({
|
|
|
91150
91161
|
});
|
|
91151
91162
|
}
|
|
91152
91163
|
};
|
|
91153
|
-
sha2563 = (...parts) => (0,
|
|
91164
|
+
sha2563 = (...parts) => (0, import_node_crypto72.createHash)("sha256").update(
|
|
91154
91165
|
Buffer.concat(
|
|
91155
91166
|
parts.map(
|
|
91156
91167
|
(part) => Array.isArray(part) ? Buffer.from(part) : Buffer.from(part)
|
|
@@ -93348,7 +93359,7 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
93348
93359
|
(binary2) => binary2.publicHeaders === void 0 && binary2.placeholder === void 0 && swiftBinaryOnDisk(binary2) && binaryHeaderSearchPaths(binary2, staged, app.rootDir).headers.length === 1
|
|
93349
93360
|
))
|
|
93350
93361
|
return [...binaries];
|
|
93351
|
-
const hash = (0,
|
|
93362
|
+
const hash = (0, import_node_crypto73.createHash)("sha256");
|
|
93352
93363
|
hash.update(
|
|
93353
93364
|
JSON.stringify([
|
|
93354
93365
|
inputs2.targets,
|
|
@@ -93557,12 +93568,12 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
93557
93568
|
);
|
|
93558
93569
|
return result;
|
|
93559
93570
|
}
|
|
93560
|
-
var import_node_child_process59,
|
|
93571
|
+
var import_node_child_process59, import_node_crypto73, import_node_fs125, import_node_path127, cachedInputs;
|
|
93561
93572
|
var init_swift_cxx_reachable = __esm({
|
|
93562
93573
|
"src/swift-cxx-reachable.ts"() {
|
|
93563
93574
|
"use strict";
|
|
93564
93575
|
import_node_child_process59 = require("node:child_process");
|
|
93565
|
-
|
|
93576
|
+
import_node_crypto73 = require("node:crypto");
|
|
93566
93577
|
import_node_fs125 = __toESM(require("node:fs"), 1);
|
|
93567
93578
|
import_node_path127 = __toESM(require("node:path"), 1);
|
|
93568
93579
|
init_is_record();
|
|
@@ -94030,7 +94041,7 @@ function fetchSwiftSdkDataPlan({ url, dataPlan }) {
|
|
|
94030
94041
|
if (!response.ok)
|
|
94031
94042
|
throw new Error(`Swift SDK data plan ${address} answered ${response.status}`);
|
|
94032
94043
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
94033
|
-
if ((0,
|
|
94044
|
+
if ((0, import_node_crypto74.createHash)("sha256").update(bytes).digest("hex") !== dataPlan)
|
|
94034
94045
|
throw new Error(`Swift SDK data plan ${address} failed its digest check`);
|
|
94035
94046
|
return bytes;
|
|
94036
94047
|
});
|
|
@@ -94128,7 +94139,7 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
|
|
|
94128
94139
|
encode2(now),
|
|
94129
94140
|
encodeNativeSdkLater({
|
|
94130
94141
|
files: later.map((bytes) => ({
|
|
94131
|
-
sha256: (0,
|
|
94142
|
+
sha256: (0, import_node_crypto74.createHash)("sha256").update(bytes).digest("hex"),
|
|
94132
94143
|
byteLength: bytes.length
|
|
94133
94144
|
})),
|
|
94134
94145
|
...needs && {
|
|
@@ -94144,11 +94155,11 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
|
|
|
94144
94155
|
later
|
|
94145
94156
|
};
|
|
94146
94157
|
}
|
|
94147
|
-
var
|
|
94158
|
+
var import_node_crypto74, ADDRESS_REACH, sdkPieces, firstAtOrAfter, pieceAt, LATER_GROUP_BYTES, MAX_LATER_GROUPS, publishedPlans;
|
|
94148
94159
|
var init_swift_sdk_later_data = __esm({
|
|
94149
94160
|
"src/swift-sdk-later-data.ts"() {
|
|
94150
94161
|
"use strict";
|
|
94151
|
-
|
|
94162
|
+
import_node_crypto74 = require("node:crypto");
|
|
94152
94163
|
init_nativeSdkBindingContract();
|
|
94153
94164
|
init_nativeWasmContract();
|
|
94154
94165
|
init_swift_sdk_image();
|
|
@@ -94746,7 +94757,7 @@ function gpuChromeLaunchOptions(opts = {}, runtime = currentRuntime()) {
|
|
|
94746
94757
|
async function launchWithPauseAwareDeadline(launch, opts) {
|
|
94747
94758
|
const budget = typeof opts.timeout === "number" ? opts.timeout : DEFAULT_LAUNCH_TIMEOUT_MS;
|
|
94748
94759
|
if (budget === 0) return launch(opts);
|
|
94749
|
-
const marker = `--peach-launch-id=${(0,
|
|
94760
|
+
const marker = `--peach-launch-id=${(0, import_node_crypto75.randomUUID)()}`;
|
|
94750
94761
|
let expired = false;
|
|
94751
94762
|
const cleanupAttempted = [];
|
|
94752
94763
|
const lookupFailed = [];
|
|
@@ -94903,13 +94914,13 @@ async function launchReapedChrome(launch, opts = {}, rendererTarget, policy = {}
|
|
|
94903
94914
|
policy.admission
|
|
94904
94915
|
);
|
|
94905
94916
|
}
|
|
94906
|
-
var childProcess, import_node_child_process62,
|
|
94917
|
+
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
94918
|
var init_reap_browser = __esm({
|
|
94908
94919
|
"src/reap-browser.ts"() {
|
|
94909
94920
|
"use strict";
|
|
94910
94921
|
childProcess = __toESM(require("node:child_process"), 1);
|
|
94911
94922
|
import_node_child_process62 = require("node:child_process");
|
|
94912
|
-
|
|
94923
|
+
import_node_crypto75 = require("node:crypto");
|
|
94913
94924
|
fs79 = __toESM(require("node:fs"), 1);
|
|
94914
94925
|
os21 = __toESM(require("node:os"), 1);
|
|
94915
94926
|
path112 = __toESM(require("node:path"), 1);
|
|
@@ -94975,14 +94986,14 @@ function resolvePlaywright() {
|
|
|
94975
94986
|
roots.push(`${pinnedRoot}/`);
|
|
94976
94987
|
for (const root of roots) {
|
|
94977
94988
|
try {
|
|
94978
|
-
const requireFromRoot = (0,
|
|
94989
|
+
const requireFromRoot = (0, import_node_module15.createRequire)(root);
|
|
94979
94990
|
for (const spec of ["playwright", "playwright-chromium", "playwright-core"]) {
|
|
94980
94991
|
try {
|
|
94981
94992
|
const modulePath = requireFromRoot.resolve(spec);
|
|
94982
94993
|
const packageJsonPath = requireFromRoot.resolve(`${spec}/package.json`);
|
|
94983
94994
|
const parsed2 = JSON.parse((0, import_node_fs129.readFileSync)(packageJsonPath, "utf8"));
|
|
94984
94995
|
if (!isRecord(parsed2) || typeof parsed2.version !== "string") continue;
|
|
94985
|
-
const corePackagePath = (0,
|
|
94996
|
+
const corePackagePath = (0, import_node_module15.createRequire)(modulePath).resolve(
|
|
94986
94997
|
"playwright-core/package.json"
|
|
94987
94998
|
);
|
|
94988
94999
|
const cliPath = (0, import_node_path129.join)((0, import_node_path129.dirname)(corePackagePath), "cli.js");
|
|
@@ -95210,7 +95221,7 @@ async function launchProvisionedPlaywright(options2 = {}) {
|
|
|
95210
95221
|
const env = { ...process.env };
|
|
95211
95222
|
const browser = await ensurePlaywrightBrowser(resolved, softwareChromeAllowed(), env);
|
|
95212
95223
|
if (!browser.ok) throw new Error(browser.message);
|
|
95213
|
-
const playwright = (0,
|
|
95224
|
+
const playwright = (0, import_node_module15.createRequire)(resolved.modulePath)(
|
|
95214
95225
|
resolved.modulePath
|
|
95215
95226
|
);
|
|
95216
95227
|
const browserEnv = browser.libraryPath ? {
|
|
@@ -95222,13 +95233,13 @@ async function launchProvisionedPlaywright(options2 = {}) {
|
|
|
95222
95233
|
{ ...options2, headless: true }
|
|
95223
95234
|
);
|
|
95224
95235
|
}
|
|
95225
|
-
var import_node_child_process63, import_node_fs129,
|
|
95236
|
+
var import_node_child_process63, import_node_fs129, import_node_module15, import_node_path129, CHROMIUM_PATHS_KEPT;
|
|
95226
95237
|
var init_playwright_provisioning = __esm({
|
|
95227
95238
|
"cli/drivers/playwright-provisioning.ts"() {
|
|
95228
95239
|
"use strict";
|
|
95229
95240
|
import_node_child_process63 = require("node:child_process");
|
|
95230
95241
|
import_node_fs129 = require("node:fs");
|
|
95231
|
-
|
|
95242
|
+
import_node_module15 = require("node:module");
|
|
95232
95243
|
import_node_path129 = require("node:path");
|
|
95233
95244
|
init_src();
|
|
95234
95245
|
init_home_paths();
|
|
@@ -95292,6 +95303,9 @@ var init_metro_runtime_source = __esm({
|
|
|
95292
95303
|
});
|
|
95293
95304
|
|
|
95294
95305
|
// src/guest-bundle.ts
|
|
95306
|
+
function productionNativeGuestSource(source) {
|
|
95307
|
+
return source.startsWith(productionPrelude) ? source : productionPrelude + source;
|
|
95308
|
+
}
|
|
95295
95309
|
function swiftGuestBundle(packageName2) {
|
|
95296
95310
|
return guestBundle(
|
|
95297
95311
|
"peachsim/swift",
|
|
@@ -95326,8 +95340,7 @@ ${registration}`,
|
|
|
95326
95340
|
return serializeGuestBundle(modules, { "react-native": import_package.default.version });
|
|
95327
95341
|
}
|
|
95328
95342
|
function serializeGuestBundle(modules, versions, footer = "") {
|
|
95329
|
-
const
|
|
95330
|
-
`var __DEV__=false;`,
|
|
95343
|
+
const source = [
|
|
95331
95344
|
`var __METRO_GLOBAL_PREFIX__='';`,
|
|
95332
95345
|
`(function(global){${METRO_REQUIRE_POLYFILL}})(globalThis);`,
|
|
95333
95346
|
...modules.map(
|
|
@@ -95338,7 +95351,7 @@ ${module2.code}
|
|
|
95338
95351
|
"__r(0);"
|
|
95339
95352
|
].join("\n");
|
|
95340
95353
|
return appendRNXMetroModuleIdentityFooter(
|
|
95341
|
-
insertPackageVersionsFooter(
|
|
95354
|
+
insertPackageVersionsFooter(productionNativeGuestSource(source) + footer, versions),
|
|
95342
95355
|
{
|
|
95343
95356
|
version: RNX_METRO_MODULE_IDENTITY_VERSION,
|
|
95344
95357
|
identitySource: "contrast-bundler",
|
|
@@ -95349,7 +95362,7 @@ ${module2.code}
|
|
|
95349
95362
|
}
|
|
95350
95363
|
);
|
|
95351
95364
|
}
|
|
95352
|
-
var import_package;
|
|
95365
|
+
var import_package, productionPrelude;
|
|
95353
95366
|
var init_guest_bundle = __esm({
|
|
95354
95367
|
"src/guest-bundle.ts"() {
|
|
95355
95368
|
"use strict";
|
|
@@ -95357,6 +95370,7 @@ var init_guest_bundle = __esm({
|
|
|
95357
95370
|
import_package = __toESM(require("react-native/package.json"), 1);
|
|
95358
95371
|
init_metro_production_bundle();
|
|
95359
95372
|
init_metro_runtime_source();
|
|
95373
|
+
productionPrelude = "var __DEV__=false;\n";
|
|
95360
95374
|
}
|
|
95361
95375
|
});
|
|
95362
95376
|
|
|
@@ -96393,7 +96407,7 @@ async function splitNativeWasm(input, directory2, profile, binaryen, shared, kee
|
|
|
96393
96407
|
sides.push({
|
|
96394
96408
|
...part,
|
|
96395
96409
|
slots: slots2,
|
|
96396
|
-
sha256: (0,
|
|
96410
|
+
sha256: (0, import_node_crypto76.createHash)("sha256").update(bytes2).digest("hex")
|
|
96397
96411
|
});
|
|
96398
96412
|
}
|
|
96399
96413
|
if (!sides.length) return { primary: describePart(input), sides: [] };
|
|
@@ -96459,12 +96473,12 @@ function describePart(file) {
|
|
|
96459
96473
|
);
|
|
96460
96474
|
return { file, functions, byteLength: bytes.byteLength };
|
|
96461
96475
|
}
|
|
96462
|
-
var import_node_child_process64,
|
|
96476
|
+
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
96477
|
var init_wasm_lazy_split = __esm({
|
|
96464
96478
|
"src/wasm-lazy-split.ts"() {
|
|
96465
96479
|
"use strict";
|
|
96466
96480
|
import_node_child_process64 = require("node:child_process");
|
|
96467
|
-
|
|
96481
|
+
import_node_crypto76 = require("node:crypto");
|
|
96468
96482
|
import_node_fs130 = require("node:fs");
|
|
96469
96483
|
import_node_path130 = require("node:path");
|
|
96470
96484
|
import_node_util14 = require("node:util");
|
|
@@ -96576,7 +96590,7 @@ async function splitSwiftSdkImage(bytes, directory2, launch, app) {
|
|
|
96576
96590
|
const names = () => (0, import_node_fs131.readdirSync)(profiles2).filter((name3) => !name3.startsWith(".") && name3.endsWith(".profile")).sort();
|
|
96577
96591
|
const union = () => {
|
|
96578
96592
|
const files2 = names().map((name3) => (0, import_node_path131.join)(profiles2, name3));
|
|
96579
|
-
const hash = (0,
|
|
96593
|
+
const hash = (0, import_node_crypto77.createHash)("sha256");
|
|
96580
96594
|
for (const file of files2) hash.update((0, import_node_fs131.readFileSync)(file));
|
|
96581
96595
|
const cache = (0, import_node_path131.join)(
|
|
96582
96596
|
directory2,
|
|
@@ -96843,11 +96857,11 @@ async function bootSwiftPreview(launch, profile) {
|
|
|
96843
96857
|
server.close();
|
|
96844
96858
|
}
|
|
96845
96859
|
}
|
|
96846
|
-
var
|
|
96860
|
+
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
96861
|
var init_swift_startup_split = __esm({
|
|
96848
96862
|
"src/swift-startup-split.ts"() {
|
|
96849
96863
|
"use strict";
|
|
96850
|
-
|
|
96864
|
+
import_node_crypto77 = require("node:crypto");
|
|
96851
96865
|
import_node_fs131 = require("node:fs");
|
|
96852
96866
|
import_node_http3 = require("node:http");
|
|
96853
96867
|
import_node_https2 = require("node:https");
|
|
@@ -96872,7 +96886,7 @@ var init_swift_startup_split = __esm({
|
|
|
96872
96886
|
appPath = "/__peach/swift/startup.wasm";
|
|
96873
96887
|
profileWindowMs = 3e4;
|
|
96874
96888
|
postPaintProfileMs = 850;
|
|
96875
|
-
digest2 = (bytes) => (0,
|
|
96889
|
+
digest2 = (bytes) => (0, import_node_crypto77.createHash)("sha256").update(bytes).digest("hex");
|
|
96876
96890
|
partDigest = /^[a-f0-9]{64}$/;
|
|
96877
96891
|
platform = `${process.platform}-${process.arch}`;
|
|
96878
96892
|
}
|
|
@@ -97027,7 +97041,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
97027
97041
|
const clang = import_node_path132.default.join(toolchainBin, "clang");
|
|
97028
97042
|
const empty = (binary2, file) => {
|
|
97029
97043
|
const source = import_node_path132.default.join(binary2.dir, file);
|
|
97030
|
-
const key2 = (0,
|
|
97044
|
+
const key2 = (0, import_node_crypto78.createHash)("sha256").update(
|
|
97031
97045
|
JSON.stringify([
|
|
97032
97046
|
clang,
|
|
97033
97047
|
sdk2.sysroot,
|
|
@@ -97072,7 +97086,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
97072
97086
|
return new Set(portable.flat());
|
|
97073
97087
|
}
|
|
97074
97088
|
async function swiftPackages(entry, app) {
|
|
97075
|
-
const stamp = (file) => import_node_fs132.default.existsSync(file) ? (0,
|
|
97089
|
+
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
97090
|
const owners = [...app.frameworks, app].map((target) => ({
|
|
97077
97091
|
module: target.moduleName,
|
|
97078
97092
|
products: target.packageProducts ?? []
|
|
@@ -98235,7 +98249,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
98235
98249
|
const source = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(
|
|
98236
98250
|
bytes
|
|
98237
98251
|
);
|
|
98238
|
-
const sha2565 = (0,
|
|
98252
|
+
const sha2565 = (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex");
|
|
98239
98253
|
const bundle = swiftResourceBundleForFile(bundles, key2);
|
|
98240
98254
|
if (!bundle && inputs2["Package.swift"])
|
|
98241
98255
|
throw new Error(`metal source ${key2} has no resource target bundle`);
|
|
@@ -98258,7 +98272,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
98258
98272
|
const bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
|
|
98259
98273
|
pdfs.set(file, {
|
|
98260
98274
|
file: disk,
|
|
98261
|
-
sha256: (0,
|
|
98275
|
+
sha256: (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex")
|
|
98262
98276
|
});
|
|
98263
98277
|
}
|
|
98264
98278
|
const pdfRasters = rasterizePdfFiles([...pdfs.values()], limits);
|
|
@@ -98304,13 +98318,15 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
98304
98318
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
98305
98319
|
}
|
|
98306
98320
|
imageBytes += bytes.length;
|
|
98307
|
-
const hash = (0,
|
|
98321
|
+
const hash = (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
|
|
98308
98322
|
const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
|
|
98323
|
+
const pixelSize = ext === ".png" ? readPngDimensions(bytes) : null;
|
|
98309
98324
|
const variant2 = {
|
|
98310
98325
|
uri: `${baseUrl}${RESOURCE_PATH}${hash}${ext}`,
|
|
98311
98326
|
scale,
|
|
98312
98327
|
...appearance === void 0 ? {} : { appearance },
|
|
98313
|
-
...renderingMode ? { renderingMode } : {}
|
|
98328
|
+
...renderingMode ? { renderingMode } : {},
|
|
98329
|
+
...pixelSize?.width && pixelSize.height ? { pixelSize } : {}
|
|
98314
98330
|
};
|
|
98315
98331
|
for (const lookup4 of [name3, ...fileNames ?? []]) {
|
|
98316
98332
|
const variants = bundle[lookup4] ??= [];
|
|
@@ -98612,7 +98628,7 @@ function updateSwiftConfigStamp(hash, packagePath) {
|
|
|
98612
98628
|
hash.update(JSON.stringify(gates.map((name3) => swiftWasm64PlatformGates[name3])));
|
|
98613
98629
|
}
|
|
98614
98630
|
function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
98615
|
-
const hash = (0,
|
|
98631
|
+
const hash = (0, import_node_crypto78.createHash)("sha256");
|
|
98616
98632
|
hash.update(packagePath);
|
|
98617
98633
|
updateSwiftConfigStamp(hash, packagePath);
|
|
98618
98634
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -98641,7 +98657,7 @@ function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
|
98641
98657
|
return hash.digest("hex").slice(0, 16);
|
|
98642
98658
|
}
|
|
98643
98659
|
function sourceContentStamp(packagePath, moduleRootOverride) {
|
|
98644
|
-
const hash = (0,
|
|
98660
|
+
const hash = (0, import_node_crypto78.createHash)("sha256");
|
|
98645
98661
|
hash.update(compilerSourceDigest);
|
|
98646
98662
|
updateSwiftConfigStamp(hash, packagePath);
|
|
98647
98663
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -98673,7 +98689,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
98673
98689
|
(root) => import_node_fs132.default.existsSync(import_node_path132.default.join(root, "toolchain.json"))
|
|
98674
98690
|
);
|
|
98675
98691
|
if (!moduleRoot) return "";
|
|
98676
|
-
const hash = (0,
|
|
98692
|
+
const hash = (0, import_node_crypto78.createHash)("sha256");
|
|
98677
98693
|
hash.update(moduleRoot);
|
|
98678
98694
|
for (const relative5 of swiftModuleInputFiles(moduleRoot)) {
|
|
98679
98695
|
hash.update(relative5);
|
|
@@ -98683,7 +98699,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
98683
98699
|
}
|
|
98684
98700
|
function otherInputs(input, standalone) {
|
|
98685
98701
|
const { files: _files, ...rest } = input;
|
|
98686
|
-
return (0,
|
|
98702
|
+
return (0, import_node_crypto78.createHash)("sha256").update(JSON.stringify({ ...rest, standalone })).digest("hex");
|
|
98687
98703
|
}
|
|
98688
98704
|
function icuUrl(origin, artifact) {
|
|
98689
98705
|
return "url" in artifact.icu ? artifact.icu.url : `${origin}${ICU_PATH}${swiftIcuAddress(artifact.icu)}`;
|
|
@@ -98698,7 +98714,7 @@ function standinLibraries(binaries, standins, rootDir, toolchain, rustWasm64) {
|
|
|
98698
98714
|
for (const standin of standins) {
|
|
98699
98715
|
if (!standin.prebuilt) continue;
|
|
98700
98716
|
const bytes = Buffer.from(standin.prebuilt.library, "base64");
|
|
98701
|
-
const digest3 = (0,
|
|
98717
|
+
const digest3 = (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex");
|
|
98702
98718
|
const dir = import_node_path132.default.join(swiftCacheDir(), "native-archives", digest3);
|
|
98703
98719
|
import_node_fs132.default.mkdirSync(dir, { recursive: true });
|
|
98704
98720
|
const library = import_node_path132.default.join(dir, `lib${standin.module}.a`);
|
|
@@ -99029,7 +99045,7 @@ function swiftBuildRoot(packagePath, moduleRoot) {
|
|
|
99029
99045
|
return import_node_path132.default.join(
|
|
99030
99046
|
swiftCacheDir(),
|
|
99031
99047
|
"swift-builds",
|
|
99032
|
-
(0,
|
|
99048
|
+
(0, import_node_crypto78.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
|
|
99033
99049
|
);
|
|
99034
99050
|
}
|
|
99035
99051
|
function installedWorkspaceInput(packagePath, entry, moduleRoot) {
|
|
@@ -99331,7 +99347,7 @@ async function fetchSwiftDyldTable(moduleUrl, module2, signal) {
|
|
|
99331
99347
|
const response = await fetch(url, { signal });
|
|
99332
99348
|
if (!response.ok) throw new Error(`swift compile: ${url} answered ${response.status}`);
|
|
99333
99349
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
99334
|
-
if (bytes.length !== byteLength || (0,
|
|
99350
|
+
if (bytes.length !== byteLength || (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex") !== sha2565)
|
|
99335
99351
|
throw new Error(`swift compile: ${url} does not match its module's index`);
|
|
99336
99352
|
return { dyldTable: { sha256: sha2565, bytes } };
|
|
99337
99353
|
}
|
|
@@ -99562,7 +99578,7 @@ async function swiftPackageMetadata(packagePath, packageName2, moduleRoot, origi
|
|
|
99562
99578
|
});
|
|
99563
99579
|
const image = {
|
|
99564
99580
|
...artifact,
|
|
99565
|
-
hash: (0,
|
|
99581
|
+
hash: (0, import_node_crypto78.createHash)("sha256").update(result.primary).digest("hex"),
|
|
99566
99582
|
bytes: result.primary,
|
|
99567
99583
|
parts: result.parts
|
|
99568
99584
|
};
|
|
@@ -99590,10 +99606,10 @@ async function splitSdkBinding(sdk2, splitKey, plan) {
|
|
|
99590
99606
|
sdk2.binding.bytes,
|
|
99591
99607
|
plan
|
|
99592
99608
|
);
|
|
99593
|
-
const digest3 = (0,
|
|
99609
|
+
const digest3 = (0, import_node_crypto78.createHash)("sha256").update(split.binding).digest("hex");
|
|
99594
99610
|
sdkBindingFiles.set(digest3, split.binding);
|
|
99595
99611
|
for (const later of split.later)
|
|
99596
|
-
sdkBindingFiles.set((0,
|
|
99612
|
+
sdkBindingFiles.set((0, import_node_crypto78.createHash)("sha256").update(later).digest("hex"), later);
|
|
99597
99613
|
sdkSplitBindings.set(key2, digest3);
|
|
99598
99614
|
}
|
|
99599
99615
|
function swiftCodePartAssets(origin, appParts, sdkDigest) {
|
|
@@ -99621,7 +99637,7 @@ function swiftSdkEntryAssets(origin, image, sdkDigest = image.sdk?.sha256) {
|
|
|
99621
99637
|
}
|
|
99622
99638
|
function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch, runtimeRootOverride) {
|
|
99623
99639
|
const { key: key2 } = sdk2;
|
|
99624
|
-
const app = (0,
|
|
99640
|
+
const app = (0, import_node_crypto78.createHash)("sha256").update(
|
|
99625
99641
|
JSON.stringify([packagePath, launch.environment, runtimeRootOverride?.origin])
|
|
99626
99642
|
).update(launch.guest?.source ?? "").digest("hex").slice(0, 16);
|
|
99627
99643
|
const cacheKey = `${key2}/${app}`;
|
|
@@ -99648,7 +99664,7 @@ function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch, runt
|
|
|
99648
99664
|
},
|
|
99649
99665
|
app
|
|
99650
99666
|
);
|
|
99651
|
-
const name3 = (0,
|
|
99667
|
+
const name3 = (0, import_node_crypto78.createHash)("sha256").update(split.primary).digest("hex");
|
|
99652
99668
|
sdkPieces2.set(name3, split.primary);
|
|
99653
99669
|
for (const [digest3, bytes] of split.parts) sdkPieces2.set(digest3, bytes);
|
|
99654
99670
|
sdkStartupParts.set(name3, split.parts);
|
|
@@ -99816,16 +99832,17 @@ async function serveSwiftPackageAsset(pathname, res) {
|
|
|
99816
99832
|
res.end("swift artifact is stale");
|
|
99817
99833
|
return true;
|
|
99818
99834
|
}
|
|
99819
|
-
var import_node_async_hooks2, import_node_child_process65,
|
|
99835
|
+
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
99836
|
var init_swift_host = __esm({
|
|
99821
99837
|
"src/swift-host.ts"() {
|
|
99822
99838
|
"use strict";
|
|
99823
99839
|
import_node_async_hooks2 = require("node:async_hooks");
|
|
99824
99840
|
import_node_child_process65 = require("node:child_process");
|
|
99825
|
-
|
|
99841
|
+
import_node_crypto78 = require("node:crypto");
|
|
99826
99842
|
import_node_fs132 = __toESM(require("node:fs"), 1);
|
|
99827
99843
|
import_node_os27 = __toESM(require("node:os"), 1);
|
|
99828
99844
|
import_node_path132 = __toESM(require("node:path"), 1);
|
|
99845
|
+
init_pngHeader();
|
|
99829
99846
|
init_nativeDyldTableContract();
|
|
99830
99847
|
init_nativeSdkBindingContract();
|
|
99831
99848
|
init_bundleAssets();
|
|
@@ -100281,7 +100298,7 @@ function installedNativeLibraries(providers, projectRoot, moduleRoot, iosTarget,
|
|
|
100281
100298
|
const podsRoot = import_node_path134.default.dirname(app.cocoapods.manifestLock);
|
|
100282
100299
|
const localPods = app.cocoapods.localPodspecs;
|
|
100283
100300
|
const reactNativeRoot = import_node_path134.default.dirname(
|
|
100284
|
-
(0,
|
|
100301
|
+
(0, import_node_module16.createRequire)(import_node_path134.default.join(projectRoot, "package.json")).resolve(
|
|
100285
100302
|
"react-native/package.json"
|
|
100286
100303
|
)
|
|
100287
100304
|
);
|
|
@@ -100491,12 +100508,12 @@ function installedPodBinaries(directory2) {
|
|
|
100491
100508
|
}
|
|
100492
100509
|
return binaries.sort();
|
|
100493
100510
|
}
|
|
100494
|
-
var import_node_fs134,
|
|
100511
|
+
var import_node_fs134, import_node_module16, import_node_path134, BINARY_BUNDLE, SOURCE;
|
|
100495
100512
|
var init_installed_native_libraries = __esm({
|
|
100496
100513
|
"src/installed-native-libraries.ts"() {
|
|
100497
100514
|
"use strict";
|
|
100498
100515
|
import_node_fs134 = __toESM(require("node:fs"), 1);
|
|
100499
|
-
|
|
100516
|
+
import_node_module16 = require("node:module");
|
|
100500
100517
|
import_node_path134 = __toESM(require("node:path"), 1);
|
|
100501
100518
|
init_is_record();
|
|
100502
100519
|
init_native_static_libraries();
|
|
@@ -100579,7 +100596,7 @@ function hashTree(root) {
|
|
|
100579
100596
|
for (const entry of import_node_fs135.default.readdirSync(root, { recursive: true, withFileTypes: true })) {
|
|
100580
100597
|
if (!entry.isFile()) continue;
|
|
100581
100598
|
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,
|
|
100599
|
+
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
100600
|
}
|
|
100584
100601
|
return Object.fromEntries(Object.entries(hashes).sort(([a], [b]) => a < b ? -1 : 1));
|
|
100585
100602
|
}
|
|
@@ -100589,7 +100606,7 @@ function realTarget(target) {
|
|
|
100589
100606
|
return import_node_path135.default.join(realTarget(import_node_path135.default.dirname(resolved)), import_node_path135.default.basename(resolved));
|
|
100590
100607
|
}
|
|
100591
100608
|
async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
100592
|
-
const manifestPath = (0,
|
|
100609
|
+
const manifestPath = (0, import_node_module17.createRequire)(import_node_path135.default.join(appRoot, "package.json")).resolve(
|
|
100593
100610
|
"react-native/package.json"
|
|
100594
100611
|
);
|
|
100595
100612
|
const manifest = JSON.parse(import_node_fs135.default.readFileSync(manifestPath, "utf8"));
|
|
@@ -100629,14 +100646,14 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
100629
100646
|
files: hashTree(generatedRoot)
|
|
100630
100647
|
};
|
|
100631
100648
|
}
|
|
100632
|
-
var import_node_child_process66,
|
|
100649
|
+
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
100650
|
var init_turbo_codegen_intake = __esm({
|
|
100634
100651
|
"src/turbo-codegen-intake.ts"() {
|
|
100635
100652
|
"use strict";
|
|
100636
100653
|
import_node_child_process66 = require("node:child_process");
|
|
100637
|
-
|
|
100654
|
+
import_node_crypto79 = require("node:crypto");
|
|
100638
100655
|
import_node_fs135 = __toESM(require("node:fs"), 1);
|
|
100639
|
-
|
|
100656
|
+
import_node_module17 = require("node:module");
|
|
100640
100657
|
import_node_path135 = __toESM(require("node:path"), 1);
|
|
100641
100658
|
import_node_util15 = require("node:util");
|
|
100642
100659
|
init_forked_script_contract();
|
|
@@ -104474,11 +104491,11 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
|
|
|
104474
104491
|
}
|
|
104475
104492
|
`;
|
|
104476
104493
|
}
|
|
104477
|
-
var
|
|
104494
|
+
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
104495
|
var init_turbo_source = __esm({
|
|
104479
104496
|
"src/turbo-source.ts"() {
|
|
104480
104497
|
"use strict";
|
|
104481
|
-
|
|
104498
|
+
import_node_crypto80 = require("node:crypto");
|
|
104482
104499
|
import_node_fs136 = __toESM(require("node:fs"), 1);
|
|
104483
104500
|
import_node_path136 = __toESM(require("node:path"), 1);
|
|
104484
104501
|
init_cocoapods_trunk();
|
|
@@ -104606,7 +104623,7 @@ var init_turbo_source = __esm({
|
|
|
104606
104623
|
];
|
|
104607
104624
|
DECLARED_MODULE_NAME = /\bName\(\s*"(\w+)"\s*\)/g;
|
|
104608
104625
|
EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
|
|
104609
|
-
sha2564 = (data) => (0,
|
|
104626
|
+
sha2564 = (data) => (0, import_node_crypto80.createHash)("sha256").update(data).digest("hex");
|
|
104610
104627
|
podspecList = podspecAttribute;
|
|
104611
104628
|
versionParts = (version2) => version2.split(/[.-]/).map((p) => Number(p) || 0);
|
|
104612
104629
|
iosOf = (member) => object6(member.ios) ? member.ios : null;
|
|
@@ -105365,7 +105382,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped) {
|
|
|
105365
105382
|
const reactNative = [options2.appRoot, options2.projectRoot].map(
|
|
105366
105383
|
(root) => import_node_path137.default.dirname(
|
|
105367
105384
|
import_node_fs137.default.realpathSync(
|
|
105368
|
-
(0,
|
|
105385
|
+
(0, import_node_module18.createRequire)(import_node_path137.default.join(root, "package.json")).resolve(
|
|
105369
105386
|
"react-native/package.json"
|
|
105370
105387
|
)
|
|
105371
105388
|
)
|
|
@@ -105400,7 +105417,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped) {
|
|
|
105400
105417
|
}
|
|
105401
105418
|
async function prepareTurboCompileInput(options2) {
|
|
105402
105419
|
await prepareTurboSourceDependencies(options2.reactNativeRoot);
|
|
105403
|
-
const key2 = (0,
|
|
105420
|
+
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
105421
|
const scratch2 = import_node_path137.default.join(import_node_os28.default.tmpdir(), "peach-turbo-swift", key2);
|
|
105405
105422
|
import_node_fs137.default.mkdirSync(scratch2, { recursive: true });
|
|
105406
105423
|
const codegenDir = import_node_fs137.default.mkdtempSync(import_node_path137.default.join(scratch2, "codegen-"));
|
|
@@ -105601,13 +105618,13 @@ async function compileTurboModule(options2) {
|
|
|
105601
105618
|
collection
|
|
105602
105619
|
};
|
|
105603
105620
|
}
|
|
105604
|
-
var
|
|
105621
|
+
var import_node_crypto81, import_node_fs137, import_node_module18, import_node_os28, import_node_path137;
|
|
105605
105622
|
var init_turbo_compile = __esm({
|
|
105606
105623
|
"src/turbo-compile.ts"() {
|
|
105607
105624
|
"use strict";
|
|
105608
|
-
|
|
105625
|
+
import_node_crypto81 = require("node:crypto");
|
|
105609
105626
|
import_node_fs137 = __toESM(require("node:fs"), 1);
|
|
105610
|
-
|
|
105627
|
+
import_node_module18 = require("node:module");
|
|
105611
105628
|
import_node_os28 = __toESM(require("node:os"), 1);
|
|
105612
105629
|
import_node_path137 = __toESM(require("node:path"), 1);
|
|
105613
105630
|
init_native_app_identity_project();
|
|
@@ -105822,8 +105839,8 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
105822
105839
|
);
|
|
105823
105840
|
if (!isRecord(manifest) || typeof manifest.version !== "string")
|
|
105824
105841
|
throw new Error(`${reactNativeRoot}: react-native has no version`);
|
|
105825
|
-
const headers = (0,
|
|
105826
|
-
const sources = (0,
|
|
105842
|
+
const headers = (0, import_node_crypto82.createHash)("sha256");
|
|
105843
|
+
const sources = (0, import_node_crypto82.createHash)("sha256");
|
|
105827
105844
|
const walk4 = (relative5) => {
|
|
105828
105845
|
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
105846
|
if (file.name === "node_modules" || file.name.startsWith(".")) continue;
|
|
@@ -105839,7 +105856,7 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
105839
105856
|
};
|
|
105840
105857
|
walk4("");
|
|
105841
105858
|
const codegenRoot = import_node_path139.default.dirname(
|
|
105842
|
-
(0,
|
|
105859
|
+
(0, import_node_module19.createRequire)(import_node_path139.default.join(reactNativeRoot, "package.json")).resolve(
|
|
105843
105860
|
"@react-native/codegen/package.json"
|
|
105844
105861
|
)
|
|
105845
105862
|
);
|
|
@@ -105930,7 +105947,7 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
105930
105947
|
const file = import_node_path139.default.join(
|
|
105931
105948
|
cacheDir(),
|
|
105932
105949
|
"native-archives",
|
|
105933
|
-
`${(0,
|
|
105950
|
+
`${(0, import_node_crypto82.createHash)("sha256").update(data).digest("hex")}.a`
|
|
105934
105951
|
);
|
|
105935
105952
|
import_node_fs139.default.mkdirSync(import_node_path139.default.dirname(file), { recursive: true });
|
|
105936
105953
|
if (!import_node_fs139.default.existsSync(file)) import_node_fs139.default.writeFileSync(file, Buffer.from(data, "base64"));
|
|
@@ -105940,13 +105957,13 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
105940
105957
|
}
|
|
105941
105958
|
}
|
|
105942
105959
|
}
|
|
105943
|
-
var
|
|
105960
|
+
var import_node_crypto82, import_node_fs139, import_node_module19, import_node_path139, import_node_util16, recipe, strings4, building;
|
|
105944
105961
|
var init_react_native_core = __esm({
|
|
105945
105962
|
"src/react-native-core.ts"() {
|
|
105946
105963
|
"use strict";
|
|
105947
|
-
|
|
105964
|
+
import_node_crypto82 = require("node:crypto");
|
|
105948
105965
|
import_node_fs139 = __toESM(require("node:fs"), 1);
|
|
105949
|
-
|
|
105966
|
+
import_node_module19 = require("node:module");
|
|
105950
105967
|
import_node_path139 = __toESM(require("node:path"), 1);
|
|
105951
105968
|
import_node_util16 = require("node:util");
|
|
105952
105969
|
init_home_paths();
|
|
@@ -105969,7 +105986,7 @@ function exportedNames(moduleRoot, name3) {
|
|
|
105969
105986
|
const modules = import_node_path140.default.join(moduleRoot, "modules");
|
|
105970
105987
|
const module2 = import_node_path140.default.join(modules, `${name3}.swiftmodule`);
|
|
105971
105988
|
if (!import_node_fs140.default.existsSync(module2)) return /* @__PURE__ */ new Set();
|
|
105972
|
-
const key2 = (0,
|
|
105989
|
+
const key2 = (0, import_node_crypto83.createHash)("sha256").update(import_node_fs140.default.readFileSync(module2)).digest("hex");
|
|
105973
105990
|
const directory2 = import_node_path140.default.join(swiftCacheDir(), "swift-public-names");
|
|
105974
105991
|
const receipt = import_node_path140.default.join(directory2, `${key2}.json`);
|
|
105975
105992
|
if (import_node_fs140.default.existsSync(receipt)) {
|
|
@@ -106052,12 +106069,12 @@ function clangTypeOwnership(moduleRoot, module2) {
|
|
|
106052
106069
|
}
|
|
106053
106070
|
);
|
|
106054
106071
|
}
|
|
106055
|
-
var import_node_child_process68,
|
|
106072
|
+
var import_node_child_process68, import_node_crypto83, import_node_fs140, import_node_path140, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
|
|
106056
106073
|
var init_swift_clang_type_ownership = __esm({
|
|
106057
106074
|
"src/swift-clang-type-ownership.ts"() {
|
|
106058
106075
|
"use strict";
|
|
106059
106076
|
import_node_child_process68 = require("node:child_process");
|
|
106060
|
-
|
|
106077
|
+
import_node_crypto83 = require("node:crypto");
|
|
106061
106078
|
import_node_fs140 = __toESM(require("node:fs"), 1);
|
|
106062
106079
|
import_node_path140 = __toESM(require("node:path"), 1);
|
|
106063
106080
|
init_is_record();
|
|
@@ -106533,7 +106550,7 @@ function enrichInstalledUnits(units, installed2, namespaceGroups, provided, modu
|
|
|
106533
106550
|
const byPath = [...installedTargets].sort((a, b) => b.path.length - a.path.length);
|
|
106534
106551
|
const reactNativeRoot = import_node_fs141.default.realpathSync(
|
|
106535
106552
|
import_node_path141.default.dirname(
|
|
106536
|
-
(0,
|
|
106553
|
+
(0, import_node_module20.createRequire)(import_node_path141.default.join(appRoot, "package.json")).resolve(
|
|
106537
106554
|
"react-native/package.json"
|
|
106538
106555
|
)
|
|
106539
106556
|
)
|
|
@@ -106980,7 +106997,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
106980
106997
|
signal?.throwIfAborted();
|
|
106981
106998
|
appRoot = import_node_fs141.default.realpathSync(appRoot);
|
|
106982
106999
|
const appConfig = await loadRNXAppConfig(resolveAppProject(appRoot));
|
|
106983
|
-
const appRequire = (0,
|
|
107000
|
+
const appRequire = (0, import_node_module20.createRequire)(import_node_path141.default.join(appRoot, "package.json"));
|
|
106984
107001
|
let expoRoot;
|
|
106985
107002
|
try {
|
|
106986
107003
|
expoRoot = import_node_path141.default.dirname(appRequire.resolve("expo/package.json"));
|
|
@@ -107712,7 +107729,7 @@ function targetSettings2(units) {
|
|
|
107712
107729
|
}
|
|
107713
107730
|
function oneSDKStamp(oneSDK) {
|
|
107714
107731
|
if (!oneSDK) return "";
|
|
107715
|
-
const hash = (0,
|
|
107732
|
+
const hash = (0, import_node_crypto84.createHash)("sha256");
|
|
107716
107733
|
for (const files2 of [oneSDK.targets, oneSDK.entry])
|
|
107717
107734
|
for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
|
|
107718
107735
|
hash.update(`${name3}\0${source}\0`);
|
|
@@ -107763,7 +107780,7 @@ ${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport On
|
|
|
107763
107780
|
`;
|
|
107764
107781
|
}
|
|
107765
107782
|
function expoSwiftPreparedKey(base2, units, reactProviderStamp) {
|
|
107766
|
-
const hash = (0,
|
|
107783
|
+
const hash = (0, import_node_crypto84.createHash)("sha256");
|
|
107767
107784
|
hash.update(base2);
|
|
107768
107785
|
hash.update(reactProviderStamp);
|
|
107769
107786
|
for (const unit2 of units) {
|
|
@@ -108110,7 +108127,7 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
108110
108127
|
const reactProvider = units.some((unit2) => unit2.reactNativeProvider) ? await (async () => {
|
|
108111
108128
|
const projectRoot = options2.installedWorkspace ? import_node_path141.default.dirname(import_node_path141.default.dirname(options2.installedWorkspace)) : (await prepareExpoNativeWorkspace(root, signal, options2.iosTarget)).app;
|
|
108112
108129
|
const reactNativeRoot = import_node_path141.default.dirname(
|
|
108113
|
-
(0,
|
|
108130
|
+
(0, import_node_module20.createRequire)(import_node_path141.default.join(projectRoot, "package.json")).resolve(
|
|
108114
108131
|
"react-native/package.json"
|
|
108115
108132
|
)
|
|
108116
108133
|
);
|
|
@@ -108137,8 +108154,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
108137
108154
|
}
|
|
108138
108155
|
return provider;
|
|
108139
108156
|
})() : void 0;
|
|
108140
|
-
const reactProviderStamp = reactProvider ? (0,
|
|
108141
|
-
const key2 = (0,
|
|
108157
|
+
const reactProviderStamp = reactProvider ? (0, import_node_crypto84.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
|
|
108158
|
+
const key2 = (0, import_node_crypto84.createHash)("sha256").update(import_node_fs141.default.realpathSync(root)).digest("hex");
|
|
108142
108159
|
const unitContentStamp = (unit2) => sourceContentStamp(expoSwiftPackage(key2, unit2.moduleId), module2.root) + (unit2.reactNativeProvider ? `:${reactProviderStamp}` : "");
|
|
108143
108160
|
const failures = /* @__PURE__ */ new Map();
|
|
108144
108161
|
const failureRecords = /* @__PURE__ */ new Map();
|
|
@@ -108524,13 +108541,11 @@ async function handleExpoSwiftRequest(req, res) {
|
|
|
108524
108541
|
const iosTarget = url.searchParams.get("iosTarget") ?? void 0;
|
|
108525
108542
|
if (url.searchParams.get("discover") === "1") {
|
|
108526
108543
|
try {
|
|
108527
|
-
const units = await
|
|
108544
|
+
const units = await withConfiguredNativeSources(
|
|
108528
108545
|
key2,
|
|
108529
|
-
void 0,
|
|
108530
|
-
|
|
108531
|
-
|
|
108532
|
-
iosTarget,
|
|
108533
|
-
{ metadataOnly: true }
|
|
108546
|
+
() => collectExpoSwiftSources(key2, void 0, void 0, false, iosTarget, {
|
|
108547
|
+
metadataOnly: true
|
|
108548
|
+
})
|
|
108534
108549
|
);
|
|
108535
108550
|
const metadata = units && {
|
|
108536
108551
|
namespaces: units.map((unit2) => unit2.moduleId)
|
|
@@ -108547,30 +108562,19 @@ async function handleExpoSwiftRequest(req, res) {
|
|
|
108547
108562
|
return true;
|
|
108548
108563
|
}
|
|
108549
108564
|
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
|
-
}
|
|
108565
|
+
const assetOrigin = `http://${host2}`;
|
|
108562
108566
|
try {
|
|
108563
|
-
const
|
|
108564
|
-
const assetOrigin = `http://${host2}`;
|
|
108565
|
-
const metadata = await openPreparations.prepare(
|
|
108566
|
-
flightKey,
|
|
108567
|
+
const metadata = await openPreparations.resolve(
|
|
108567
108568
|
key2,
|
|
108568
|
-
|
|
108569
|
-
|
|
108570
|
-
(
|
|
108569
|
+
flightKey,
|
|
108570
|
+
url.searchParams,
|
|
108571
|
+
() => withConfiguredNativeSources(
|
|
108572
|
+
key2,
|
|
108573
|
+
() => compileExpoSwiftModules(key2, assetOrigin, void 0, { iosTarget })
|
|
108574
|
+
),
|
|
108575
|
+
(result) => !result?.failures.length && expoSwiftArtifactsAreAvailable(assetOrigin, result)
|
|
108571
108576
|
);
|
|
108572
108577
|
if (!res.destroyed) {
|
|
108573
|
-
openPreparations.store(flightKey, token, metadata);
|
|
108574
108578
|
res.writeHead(200, {
|
|
108575
108579
|
"Content-Type": "application/json",
|
|
108576
108580
|
"Cache-Control": "no-store"
|
|
@@ -108593,15 +108597,15 @@ ${diagnostics}`}`
|
|
|
108593
108597
|
}
|
|
108594
108598
|
return true;
|
|
108595
108599
|
}
|
|
108596
|
-
var import_node_async_hooks3, import_node_child_process69,
|
|
108600
|
+
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
108601
|
var init_expo_swift_host = __esm({
|
|
108598
108602
|
"src/expo-swift-host.ts"() {
|
|
108599
108603
|
"use strict";
|
|
108600
108604
|
import_node_async_hooks3 = require("node:async_hooks");
|
|
108601
108605
|
import_node_child_process69 = require("node:child_process");
|
|
108602
|
-
|
|
108606
|
+
import_node_crypto84 = require("node:crypto");
|
|
108603
108607
|
import_node_fs141 = __toESM(require("node:fs"), 1);
|
|
108604
|
-
|
|
108608
|
+
import_node_module20 = require("node:module");
|
|
108605
108609
|
import_node_os29 = __toESM(require("node:os"), 1);
|
|
108606
108610
|
import_node_path141 = __toESM(require("node:path"), 1);
|
|
108607
108611
|
import_node_url7 = require("node:url");
|
|
@@ -108621,7 +108625,6 @@ var init_expo_swift_host = __esm({
|
|
|
108621
108625
|
init_native_firebase_config();
|
|
108622
108626
|
init_native_preparation();
|
|
108623
108627
|
init_native_static_libraries();
|
|
108624
|
-
init_nativePreparationContract();
|
|
108625
108628
|
init_react_native_bridge_modules();
|
|
108626
108629
|
init_react_native_core();
|
|
108627
108630
|
init_swift_binary_modules();
|
|
@@ -108649,7 +108652,7 @@ var init_expo_swift_host = __esm({
|
|
|
108649
108652
|
ownTemporaryRoots = /* @__PURE__ */ new Set();
|
|
108650
108653
|
EXPO_MODULE_SCAN_TIMEOUT_MS = 6e4;
|
|
108651
108654
|
preparedExpoSwift = /* @__PURE__ */ new Map();
|
|
108652
|
-
openPreparations = new
|
|
108655
|
+
openPreparations = new NativePreparation();
|
|
108653
108656
|
ExpoSwiftLinkRefusal = class extends Error {
|
|
108654
108657
|
};
|
|
108655
108658
|
}
|
|
@@ -111905,7 +111908,7 @@ __export(rolldown_bundle_forward_exports, {
|
|
|
111905
111908
|
async function forwardRolldownBundleResponse(upstream, res) {
|
|
111906
111909
|
res.setHeader(ROLLDOWN_INVENTORY_HEADER, "1");
|
|
111907
111910
|
if (upstream.headers[ROLLDOWN_INVENTORY_HEADER] === "1") {
|
|
111908
|
-
await (0,
|
|
111911
|
+
await (0, import_promises16.pipeline)(upstream, res);
|
|
111909
111912
|
return;
|
|
111910
111913
|
}
|
|
111911
111914
|
const contentType2 = typeof upstream.headers["content-type"] === "string" ? upstream.headers["content-type"] : "";
|
|
@@ -111947,14 +111950,14 @@ async function forwardRolldownBundleResponse(upstream, res) {
|
|
|
111947
111950
|
}
|
|
111948
111951
|
yield Buffer.from(annotated.slice(sent), "utf8");
|
|
111949
111952
|
};
|
|
111950
|
-
await (0,
|
|
111953
|
+
await (0, import_promises16.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
|
|
111951
111954
|
}
|
|
111952
|
-
var import_stream,
|
|
111955
|
+
var import_stream, import_promises16, ROLLDOWN_INVENTORY_HEADER;
|
|
111953
111956
|
var init_rolldown_bundle_forward = __esm({
|
|
111954
111957
|
"src/host/rolldown-bundle-forward.ts"() {
|
|
111955
111958
|
"use strict";
|
|
111956
111959
|
import_stream = require("stream");
|
|
111957
|
-
|
|
111960
|
+
import_promises16 = require("stream/promises");
|
|
111958
111961
|
init_cli_runtime();
|
|
111959
111962
|
ROLLDOWN_INVENTORY_HEADER = "x-peach-rolldown-inventory";
|
|
111960
111963
|
}
|
|
@@ -112269,7 +112272,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
112269
112272
|
await route.respond(proxyRes, hopCookies);
|
|
112270
112273
|
if (isNativeCookieRedirect(hop)) res.removeHeader("location");
|
|
112271
112274
|
res.statusCode = isNativeCookieRedirect(hop) ? 200 : status;
|
|
112272
|
-
await (0,
|
|
112275
|
+
await (0, import_promises17.pipeline)(proxyRes, res);
|
|
112273
112276
|
return;
|
|
112274
112277
|
}
|
|
112275
112278
|
if (location && (status === 301 || status === 302 || status === 303 || status === 307 || status === 308)) {
|
|
@@ -112280,7 +112283,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
112280
112283
|
const switchToGet = (status === 301 || status === 302) && method === "POST" || status === 303 && method !== "GET" && method !== "HEAD";
|
|
112281
112284
|
const redirectUrl = resolveRedirectUrl(location, targetUrl);
|
|
112282
112285
|
proxyRes.resume();
|
|
112283
|
-
await (0,
|
|
112286
|
+
await (0, import_promises17.finished)(proxyRes);
|
|
112284
112287
|
await proxy(
|
|
112285
112288
|
redirectUrl,
|
|
112286
112289
|
switchToGet ? "GET" : method,
|
|
@@ -112298,7 +112301,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
112298
112301
|
await forwardRolldownBundleResponse2(proxyRes, res);
|
|
112299
112302
|
return;
|
|
112300
112303
|
}
|
|
112301
|
-
await (0,
|
|
112304
|
+
await (0, import_promises17.pipeline)(proxyRes, res);
|
|
112302
112305
|
};
|
|
112303
112306
|
let upstreamAnswered = false;
|
|
112304
112307
|
let body;
|
|
@@ -112353,14 +112356,14 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
112353
112356
|
else req.socket.destroy();
|
|
112354
112357
|
}
|
|
112355
112358
|
}
|
|
112356
|
-
var import_http3, import_https2, import_node_http22,
|
|
112359
|
+
var import_http3, import_https2, import_node_http22, import_promises17, fetchProxyHttpAgent, fetchProxyHttpsAgent, tlsMinimumVersions, tlsMinimumAgents, FETCH_PROXY_CORS_HEADERS, APP_API_HEADER_REWRITES;
|
|
112357
112360
|
var init_fetch_proxy_handler = __esm({
|
|
112358
112361
|
"src/host/fetch-proxy-handler.ts"() {
|
|
112359
112362
|
"use strict";
|
|
112360
112363
|
import_http3 = __toESM(require("http"), 1);
|
|
112361
112364
|
import_https2 = __toESM(require("https"), 1);
|
|
112362
112365
|
import_node_http22 = require("node:http2");
|
|
112363
|
-
|
|
112366
|
+
import_promises17 = require("stream/promises");
|
|
112364
112367
|
init_package_versions();
|
|
112365
112368
|
init_backend_origin();
|
|
112366
112369
|
init_fetch_proxy_overrides();
|
|
@@ -112475,10 +112478,10 @@ function stageHostBytes(bytes, origin, extension = "") {
|
|
|
112475
112478
|
}
|
|
112476
112479
|
async function stageHostDerivedBytes(input, producer, origin, extension, derive) {
|
|
112477
112480
|
const directory2 = prepareStagedDirectory();
|
|
112478
|
-
const inputDigest = (0,
|
|
112481
|
+
const inputDigest = (0, import_node_crypto86.createHash)("sha256").update(input).digest("hex");
|
|
112479
112482
|
const index = import_node_path149.default.join(
|
|
112480
112483
|
directory2,
|
|
112481
|
-
`derived-${(0,
|
|
112484
|
+
`derived-${(0, import_node_crypto86.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
|
|
112482
112485
|
);
|
|
112483
112486
|
const recorded = import_node_fs149.default.existsSync(index) ? import_node_fs149.default.readFileSync(index, "utf8") : "";
|
|
112484
112487
|
if (STAGED_NAME.test(recorded) && import_node_fs149.default.existsSync(import_node_path149.default.join(directory2, recorded))) {
|
|
@@ -112489,7 +112492,7 @@ async function stageHostDerivedBytes(input, producer, origin, extension, derive)
|
|
|
112489
112492
|
return new URL(STAGED_PREFIX + recorded, origin).toString();
|
|
112490
112493
|
}
|
|
112491
112494
|
const staged = writeStagedBytes(await derive(), origin, extension, directory2);
|
|
112492
|
-
const temporary = import_node_path149.default.join(directory2, (0,
|
|
112495
|
+
const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto86.randomUUID)());
|
|
112493
112496
|
try {
|
|
112494
112497
|
import_node_fs149.default.writeFileSync(temporary, new URL(staged).pathname.slice(STAGED_PREFIX.length), {
|
|
112495
112498
|
flag: "wx"
|
|
@@ -112508,7 +112511,7 @@ function metroIndexName(url) {
|
|
|
112508
112511
|
url.searchParams.get("unstable_path"),
|
|
112509
112512
|
hashes[0]
|
|
112510
112513
|
]);
|
|
112511
|
-
return `metro-${(0,
|
|
112514
|
+
return `metro-${(0, import_node_crypto86.createHash)("sha256").update(key2).digest("hex")}`;
|
|
112512
112515
|
}
|
|
112513
112516
|
function metroRequestIndex(rawUrl) {
|
|
112514
112517
|
if (!rawUrl?.startsWith("/") || rawUrl.startsWith("//")) return null;
|
|
@@ -112536,7 +112539,7 @@ function prepareStagedDirectory() {
|
|
|
112536
112539
|
return directory2;
|
|
112537
112540
|
}
|
|
112538
112541
|
function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
112539
|
-
const digest3 = (0,
|
|
112542
|
+
const digest3 = (0, import_node_crypto86.createHash)("sha256").update(bytes).digest("hex");
|
|
112540
112543
|
extension = extension.toLowerCase();
|
|
112541
112544
|
const name3 = STAGED_NAME.test(digest3 + extension) ? digest3 + extension : digest3;
|
|
112542
112545
|
stagedCapture.getStore()?.add(name3);
|
|
@@ -112545,7 +112548,7 @@ function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
|
112545
112548
|
if (import_node_fs149.default.existsSync(destination)) {
|
|
112546
112549
|
import_node_fs149.default.utimesSync(destination, new Date(now), new Date(now));
|
|
112547
112550
|
} else {
|
|
112548
|
-
const temporary = import_node_path149.default.join(directory2, (0,
|
|
112551
|
+
const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto86.randomUUID)());
|
|
112549
112552
|
try {
|
|
112550
112553
|
import_node_fs149.default.writeFileSync(temporary, bytes, { flag: "wx" });
|
|
112551
112554
|
import_node_fs149.default.renameSync(temporary, destination);
|
|
@@ -112617,12 +112620,12 @@ async function handleStagedHostFileRequest(req, res) {
|
|
|
112617
112620
|
throw error;
|
|
112618
112621
|
}
|
|
112619
112622
|
}
|
|
112620
|
-
var import_node_async_hooks4,
|
|
112623
|
+
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
112624
|
var init_staged_host_files = __esm({
|
|
112622
112625
|
"src/host/staged-host-files.ts"() {
|
|
112623
112626
|
"use strict";
|
|
112624
112627
|
import_node_async_hooks4 = require("node:async_hooks");
|
|
112625
|
-
|
|
112628
|
+
import_node_crypto86 = require("node:crypto");
|
|
112626
112629
|
import_node_fs149 = __toESM(require("node:fs"), 1);
|
|
112627
112630
|
import_node_path149 = __toESM(require("node:path"), 1);
|
|
112628
112631
|
init_uttype_mime();
|
|
@@ -112837,7 +112840,7 @@ async function readOneWidgetSources(appRoot) {
|
|
|
112837
112840
|
if (!Buffer.from(text7).equals(bytes))
|
|
112838
112841
|
throw new Error(`One widget prebuild source is not UTF-8: ${file}`);
|
|
112839
112842
|
files2.set(name3, text7);
|
|
112840
|
-
sources[import_node_path151.default.relative(root, file).split(import_node_path151.default.sep).join("/")] = (0,
|
|
112843
|
+
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
112844
|
}
|
|
112842
112845
|
const contract = files2.get("OneWidgetContract.swift") ?? "";
|
|
112843
112846
|
const source = files2.get("OneWidget.swift") ?? "";
|
|
@@ -112861,17 +112864,17 @@ async function configuredOneWidget(appRoot, bundleUrl, packageUrl) {
|
|
|
112861
112864
|
return {
|
|
112862
112865
|
metadata: source.widget,
|
|
112863
112866
|
projectRoot: source.root,
|
|
112864
|
-
appIdentity: (0,
|
|
112867
|
+
appIdentity: (0, import_node_crypto87.createHash)("sha256").update(JSON.stringify([source.root, source.widget.bundleId])).digest("hex"),
|
|
112865
112868
|
bundleUrl,
|
|
112866
112869
|
packageUrl,
|
|
112867
112870
|
urlSchemes: source.urlSchemes
|
|
112868
112871
|
};
|
|
112869
112872
|
}
|
|
112870
|
-
var
|
|
112873
|
+
var import_node_crypto87, import_node_fs151, import_node_path151, ONE_WIDGET_PACKAGE, nonEmpty;
|
|
112871
112874
|
var init_one_widget_metadata = __esm({
|
|
112872
112875
|
"src/one-widget-metadata.ts"() {
|
|
112873
112876
|
"use strict";
|
|
112874
|
-
|
|
112877
|
+
import_node_crypto87 = require("node:crypto");
|
|
112875
112878
|
import_node_fs151 = __toESM(require("node:fs"), 1);
|
|
112876
112879
|
import_node_path151 = __toESM(require("node:path"), 1);
|
|
112877
112880
|
init_is_record();
|
|
@@ -112905,7 +112908,7 @@ async function oneWidgetPackage(appRoot) {
|
|
|
112905
112908
|
const packagePath = import_node_path152.default.join(
|
|
112906
112909
|
import_node_os31.default.tmpdir(),
|
|
112907
112910
|
"peach-one-widgets",
|
|
112908
|
-
(0,
|
|
112911
|
+
(0, import_node_crypto88.createHash)("sha256").update(root).digest("hex"),
|
|
112909
112912
|
ONE_WIDGET_PACKAGE
|
|
112910
112913
|
);
|
|
112911
112914
|
import_node_fs152.default.mkdirSync(packagePath, { recursive: true });
|
|
@@ -112919,11 +112922,11 @@ async function oneWidgetPackage(appRoot) {
|
|
|
112919
112922
|
widget
|
|
112920
112923
|
};
|
|
112921
112924
|
}
|
|
112922
|
-
var
|
|
112925
|
+
var import_node_crypto88, import_node_fs152, import_node_os31, import_node_path152;
|
|
112923
112926
|
var init_one_widget_package = __esm({
|
|
112924
112927
|
"src/one-widget-package.ts"() {
|
|
112925
112928
|
"use strict";
|
|
112926
|
-
|
|
112929
|
+
import_node_crypto88 = require("node:crypto");
|
|
112927
112930
|
import_node_fs152 = __toESM(require("node:fs"), 1);
|
|
112928
112931
|
import_node_os31 = __toESM(require("node:os"), 1);
|
|
112929
112932
|
import_node_path152 = __toESM(require("node:path"), 1);
|
|
@@ -113139,7 +113142,7 @@ var init_android_view_classes = __esm({
|
|
|
113139
113142
|
|
|
113140
113143
|
// src/java-module-abi.ts
|
|
113141
113144
|
async function readJavaModuleSpecs(files2, sdkRoot, toolchain) {
|
|
113142
|
-
const digest3 = (0,
|
|
113145
|
+
const digest3 = (0, import_node_crypto89.createHash)("sha256");
|
|
113143
113146
|
const parent = import_node_path154.default.join(kotlinHome(), "java-specs");
|
|
113144
113147
|
import_node_fs154.default.mkdirSync(parent, { recursive: true });
|
|
113145
113148
|
const work = import_node_fs154.default.mkdtempSync(import_node_path154.default.join(parent, ".read-"));
|
|
@@ -113236,12 +113239,12 @@ async function compileJavaModuleAbi(input) {
|
|
|
113236
113239
|
);
|
|
113237
113240
|
return library;
|
|
113238
113241
|
}
|
|
113239
|
-
var import_node_child_process72,
|
|
113242
|
+
var import_node_child_process72, import_node_crypto89, import_node_fs154, import_node_path154, import_node_util18, run13, JAVA_BINDINGS_INITIALIZER;
|
|
113240
113243
|
var init_java_module_abi = __esm({
|
|
113241
113244
|
"src/java-module-abi.ts"() {
|
|
113242
113245
|
"use strict";
|
|
113243
113246
|
import_node_child_process72 = require("node:child_process");
|
|
113244
|
-
|
|
113247
|
+
import_node_crypto89 = require("node:crypto");
|
|
113245
113248
|
import_node_fs154 = __toESM(require("node:fs"), 1);
|
|
113246
113249
|
import_node_path154 = __toESM(require("node:path"), 1);
|
|
113247
113250
|
import_node_util18 = require("node:util");
|
|
@@ -113497,13 +113500,13 @@ function verifyKotlinSdkDirectory(root, compiler) {
|
|
|
113497
113500
|
if (!stat2.isFile() || stat2.nlink !== 1)
|
|
113498
113501
|
throw new Error(`Kotlin SDK binary is not a regular file: ${name3}`);
|
|
113499
113502
|
const bytes = import_node_fs155.default.readFileSync(target);
|
|
113500
|
-
if (bytes.length !== expected.bytes || (0,
|
|
113503
|
+
if (bytes.length !== expected.bytes || (0, import_node_crypto90.createHash)("sha256").update(bytes).digest("hex") !== expected.sha256)
|
|
113501
113504
|
throw new Error(`Kotlin SDK binary differs from its manifest: ${name3}`);
|
|
113502
113505
|
}
|
|
113503
113506
|
return manifest;
|
|
113504
113507
|
}
|
|
113505
113508
|
async function installKotlinSdkArchive(archive, compiler) {
|
|
113506
|
-
const sha2565 = (0,
|
|
113509
|
+
const sha2565 = (0, import_node_crypto90.createHash)("sha256").update(archive).digest("hex");
|
|
113507
113510
|
const parent = import_node_path155.default.join(kotlinHome(), "sdk");
|
|
113508
113511
|
const root = import_node_path155.default.join(parent, sha2565);
|
|
113509
113512
|
if (import_node_fs155.default.existsSync(root))
|
|
@@ -113532,12 +113535,12 @@ async function installKotlinSdkArchive(archive, compiler) {
|
|
|
113532
113535
|
import_node_fs155.default.rmSync(work, { recursive: true, force: true });
|
|
113533
113536
|
}
|
|
113534
113537
|
}
|
|
113535
|
-
var import_node_child_process73,
|
|
113538
|
+
var import_node_child_process73, import_node_crypto90, import_node_fs155, import_node_path155, import_node_util19, run14;
|
|
113536
113539
|
var init_kotlin_sdk = __esm({
|
|
113537
113540
|
"src/kotlin-sdk.ts"() {
|
|
113538
113541
|
"use strict";
|
|
113539
113542
|
import_node_child_process73 = require("node:child_process");
|
|
113540
|
-
|
|
113543
|
+
import_node_crypto90 = require("node:crypto");
|
|
113541
113544
|
import_node_fs155 = __toESM(require("node:fs"), 1);
|
|
113542
113545
|
import_node_path155 = __toESM(require("node:path"), 1);
|
|
113543
113546
|
import_node_util19 = require("node:util");
|
|
@@ -113674,7 +113677,7 @@ function peachKotlinModuleRoot() {
|
|
|
113674
113677
|
return import_node_path156.default.resolve(import_node_path156.default.dirname((0, import_node_url8.fileURLToPath)(__sootsim_import_meta_url)), "..", "kotlin");
|
|
113675
113678
|
if (installedRoot) return installedRoot;
|
|
113676
113679
|
const files2 = JSON.parse(__PEACH_BUNDLED_KOTLIN__);
|
|
113677
|
-
const digest3 = (0,
|
|
113680
|
+
const digest3 = (0, import_node_crypto91.createHash)("sha256").update(__PEACH_BUNDLED_KOTLIN__).digest("hex");
|
|
113678
113681
|
const parent = import_node_path156.default.join(rnxHomeDir(), "kotlin", "modules");
|
|
113679
113682
|
const root = import_node_path156.default.join(parent, digest3);
|
|
113680
113683
|
import_node_fs156.default.mkdirSync(parent, { recursive: true });
|
|
@@ -113703,11 +113706,11 @@ function peachKotlinModuleRoot() {
|
|
|
113703
113706
|
installedRoot = root;
|
|
113704
113707
|
return root;
|
|
113705
113708
|
}
|
|
113706
|
-
var
|
|
113709
|
+
var import_node_crypto91, import_node_fs156, import_node_path156, import_node_url8, installedRoot;
|
|
113707
113710
|
var init_kotlin_module = __esm({
|
|
113708
113711
|
"src/kotlin-module.ts"() {
|
|
113709
113712
|
"use strict";
|
|
113710
|
-
|
|
113713
|
+
import_node_crypto91 = require("node:crypto");
|
|
113711
113714
|
import_node_fs156 = __toESM(require("node:fs"), 1);
|
|
113712
113715
|
import_node_path156 = __toESM(require("node:path"), 1);
|
|
113713
113716
|
import_node_url8 = require("node:url");
|
|
@@ -113741,7 +113744,7 @@ async function resolveAndroidGradleSources(request) {
|
|
|
113741
113744
|
const parent = import_node_path157.default.join(kotlinHome(), "gradle-sources");
|
|
113742
113745
|
import_node_fs157.default.mkdirSync(parent, { recursive: true });
|
|
113743
113746
|
const work = import_node_fs157.default.mkdtempSync(import_node_path157.default.join(parent, ".query-"));
|
|
113744
|
-
const task = `peachAndroidSources${(0,
|
|
113747
|
+
const task = `peachAndroidSources${(0, import_node_crypto92.randomBytes)(8).toString("hex")}`;
|
|
113745
113748
|
const script = import_node_path157.default.join(work, "sources.gradle");
|
|
113746
113749
|
const encoded = Buffer.from(
|
|
113747
113750
|
JSON.stringify({
|
|
@@ -113862,12 +113865,12 @@ function readDependencySources(value) {
|
|
|
113862
113865
|
};
|
|
113863
113866
|
});
|
|
113864
113867
|
}
|
|
113865
|
-
var import_node_child_process74,
|
|
113868
|
+
var import_node_child_process74, import_node_crypto92, import_node_fs157, import_node_path157, import_node_util20, run15, modelQuery;
|
|
113866
113869
|
var init_android_gradle_sources = __esm({
|
|
113867
113870
|
"src/android-gradle-sources.ts"() {
|
|
113868
113871
|
"use strict";
|
|
113869
113872
|
import_node_child_process74 = require("node:child_process");
|
|
113870
|
-
|
|
113873
|
+
import_node_crypto92 = require("node:crypto");
|
|
113871
113874
|
import_node_fs157 = __toESM(require("node:fs"), 1);
|
|
113872
113875
|
import_node_path157 = __toESM(require("node:path"), 1);
|
|
113873
113876
|
import_node_util20 = require("node:util");
|
|
@@ -114063,7 +114066,7 @@ function loadKotlinSdk(moduleRoot, toolchain) {
|
|
|
114063
114066
|
}
|
|
114064
114067
|
function appKotlinLanguage(root) {
|
|
114065
114068
|
const reactNative = import_node_path158.default.dirname(
|
|
114066
|
-
(0,
|
|
114069
|
+
(0, import_node_module21.createRequire)(import_node_path158.default.join(root, "package.json")).resolve("react-native/package.json")
|
|
114067
114070
|
);
|
|
114068
114071
|
const versions = import_node_fs158.default.readFileSync(
|
|
114069
114072
|
import_node_path158.default.join(reactNative, "gradle", "libs.versions.toml"),
|
|
@@ -114238,7 +114241,7 @@ function readExpoTypes(output) {
|
|
|
114238
114241
|
});
|
|
114239
114242
|
}
|
|
114240
114243
|
async function scanSources(tool, parse17, toolchain, moduleRoot, files2) {
|
|
114241
|
-
const digest3 = (0,
|
|
114244
|
+
const digest3 = (0, import_node_crypto93.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
|
|
114242
114245
|
const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
|
|
114243
114246
|
digest3.update(import_node_fs158.default.readFileSync(import_node_path158.default.join(moduleRoot, "sdk.tar.gz")));
|
|
114244
114247
|
digest3.update(tool);
|
|
@@ -114898,7 +114901,7 @@ async function compileKotlin(input, origin) {
|
|
|
114898
114901
|
bytes: import_node_fs158.default.readFileSync(file)
|
|
114899
114902
|
}));
|
|
114900
114903
|
const { composeArchive, ...compilerInputs } = toolchain;
|
|
114901
|
-
const digest3 = (0,
|
|
114904
|
+
const digest3 = (0, import_node_crypto93.createHash)("sha256");
|
|
114902
114905
|
digest3.update(
|
|
114903
114906
|
JSON.stringify({
|
|
114904
114907
|
format: BUILD_FORMAT,
|
|
@@ -115190,14 +115193,14 @@ async function serveKotlinRequest(pathname, res, app) {
|
|
|
115190
115193
|
}
|
|
115191
115194
|
return true;
|
|
115192
115195
|
}
|
|
115193
|
-
var import_node_child_process75,
|
|
115196
|
+
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
115197
|
var init_kotlin_host = __esm({
|
|
115195
115198
|
"src/kotlin-host.ts"() {
|
|
115196
115199
|
"use strict";
|
|
115197
115200
|
import_node_child_process75 = require("node:child_process");
|
|
115198
|
-
|
|
115201
|
+
import_node_crypto93 = require("node:crypto");
|
|
115199
115202
|
import_node_fs158 = __toESM(require("node:fs"), 1);
|
|
115200
|
-
|
|
115203
|
+
import_node_module21 = require("node:module");
|
|
115201
115204
|
import_node_path158 = __toESM(require("node:path"), 1);
|
|
115202
115205
|
import_node_util21 = require("node:util");
|
|
115203
115206
|
init_kotlinDiscoveryContract();
|
|
@@ -115341,7 +115344,7 @@ function send2(app, change) {
|
|
|
115341
115344
|
if (client2.readyState === import_ws2.WebSocket.OPEN) client2.send(message);
|
|
115342
115345
|
}
|
|
115343
115346
|
async function swiftPackages2(root) {
|
|
115344
|
-
const resolved = (0,
|
|
115347
|
+
const resolved = (0, import_node_module22.createRequire)(import_node_path159.default.join(root, "package.json")).resolve(
|
|
115345
115348
|
"vxrn/swift-package-id"
|
|
115346
115349
|
);
|
|
115347
115350
|
const loaded4 = await import((0, import_node_url9.pathToFileURL)(resolved).href);
|
|
@@ -115489,12 +115492,12 @@ function handleOneNativeSourceUpgrade(req, socket, head) {
|
|
|
115489
115492
|
});
|
|
115490
115493
|
return true;
|
|
115491
115494
|
}
|
|
115492
|
-
var import_node_fs159,
|
|
115495
|
+
var import_node_fs159, import_node_module22, import_node_path159, import_node_url9, import_ws2, apps;
|
|
115493
115496
|
var init_one_native_source = __esm({
|
|
115494
115497
|
"src/one-native-source.ts"() {
|
|
115495
115498
|
"use strict";
|
|
115496
115499
|
import_node_fs159 = __toESM(require("node:fs"), 1);
|
|
115497
|
-
|
|
115500
|
+
import_node_module22 = require("node:module");
|
|
115498
115501
|
import_node_path159 = __toESM(require("node:path"), 1);
|
|
115499
115502
|
import_node_url9 = require("node:url");
|
|
115500
115503
|
init_kotlinDiscoveryContract();
|
|
@@ -115608,7 +115611,7 @@ async function stagePreparedExpoWidgetAssets(preparedApp, origin) {
|
|
|
115608
115611
|
const ext = import_node_path162.default.extname(file);
|
|
115609
115612
|
if (ext.toLowerCase() === ".svg") return stageCatalogSvg(file, scale, origin, bytes);
|
|
115610
115613
|
if (ext.toLowerCase() === ".pdf") {
|
|
115611
|
-
const sha2565 = (0,
|
|
115614
|
+
const sha2565 = (0, import_node_crypto94.createHash)("sha256").update(bytes).digest("hex");
|
|
115612
115615
|
const png = rasterizePdfFiles([{ file: members2.get(file), sha256: sha2565 }]).get(sha2565);
|
|
115613
115616
|
return stageHostBytes(png, origin, ".png");
|
|
115614
115617
|
}
|
|
@@ -115621,11 +115624,11 @@ async function stageExpoWidgetAssets(appRoot, origin) {
|
|
|
115621
115624
|
const prepared = await prepareExpoNativeProject(appRoot);
|
|
115622
115625
|
return stagePreparedExpoWidgetAssets(prepared.app, origin);
|
|
115623
115626
|
}
|
|
115624
|
-
var
|
|
115627
|
+
var import_node_crypto94, import_node_fs161, import_node_path162;
|
|
115625
115628
|
var init_expo_widget_assets = __esm({
|
|
115626
115629
|
"src/expo-widget-assets.ts"() {
|
|
115627
115630
|
"use strict";
|
|
115628
|
-
|
|
115631
|
+
import_node_crypto94 = require("node:crypto");
|
|
115629
115632
|
import_node_fs161 = __toESM(require("node:fs"), 1);
|
|
115630
115633
|
import_node_path162 = __toESM(require("node:path"), 1);
|
|
115631
115634
|
init_app_catalog();
|
|
@@ -115680,11 +115683,11 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
|
|
|
115680
115683
|
"specifications",
|
|
115681
115684
|
`${checksum}.json`
|
|
115682
115685
|
);
|
|
115683
|
-
const sha1 = (value) => (0,
|
|
115686
|
+
const sha1 = (value) => (0, import_node_crypto95.createHash)("sha1").update(value).digest("hex");
|
|
115684
115687
|
let text7;
|
|
115685
115688
|
if (import_node_fs162.default.existsSync(file)) text7 = import_node_fs162.default.readFileSync(file, "utf8");
|
|
115686
115689
|
else {
|
|
115687
|
-
const shard2 = (0,
|
|
115690
|
+
const shard2 = (0, import_node_crypto95.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
|
|
115688
115691
|
const specPath = `Specs/${shard2}/${root}/${version2}/${root}.podspec.json`;
|
|
115689
115692
|
const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
|
|
115690
115693
|
if (!response.ok)
|
|
@@ -115813,7 +115816,7 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
115813
115816
|
"end",
|
|
115814
115817
|
""
|
|
115815
115818
|
].join("\n");
|
|
115816
|
-
const key2 = (0,
|
|
115819
|
+
const key2 = (0, import_node_crypto95.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
|
|
115817
115820
|
JSON.stringify(
|
|
115818
115821
|
Object.entries(specificationChecksums).sort(([a], [b]) => a.localeCompare(b))
|
|
115819
115822
|
)
|
|
@@ -115882,11 +115885,11 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
115882
115885
|
);
|
|
115883
115886
|
});
|
|
115884
115887
|
}
|
|
115885
|
-
var
|
|
115888
|
+
var import_node_crypto95, import_node_fs162, import_node_path163, APP, record5, project, podModuleName;
|
|
115886
115889
|
var init_swift_source_pods = __esm({
|
|
115887
115890
|
"src/swift-source-pods.ts"() {
|
|
115888
115891
|
"use strict";
|
|
115889
|
-
|
|
115892
|
+
import_node_crypto95 = require("node:crypto");
|
|
115890
115893
|
import_node_fs162 = __toESM(require("node:fs"), 1);
|
|
115891
115894
|
import_node_path163 = __toESM(require("node:path"), 1);
|
|
115892
115895
|
init_browser();
|
|
@@ -116563,7 +116566,7 @@ async function prepareNitroCompileInput(options2) {
|
|
|
116563
116566
|
input.libraries ??= {};
|
|
116564
116567
|
input.libraries[nitroProviderTarget({ name: name3 })] = library;
|
|
116565
116568
|
}
|
|
116566
|
-
const key2 = (0,
|
|
116569
|
+
const key2 = (0, import_node_crypto96.createHash)("sha256").update(
|
|
116567
116570
|
collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
|
|
116568
116571
|
).update("\0").update(import_node_fs163.default.realpathSync(options2.moduleRoot)).update("\0").update(options2.configuration).digest("hex");
|
|
116569
116572
|
const packagePath = import_node_path164.default.join(import_node_os32.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
|
|
@@ -116620,11 +116623,11 @@ function nitrogenGeneratedSources(podDirectory) {
|
|
|
116620
116623
|
...sources(import_node_path164.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
|
|
116621
116624
|
];
|
|
116622
116625
|
}
|
|
116623
|
-
var
|
|
116626
|
+
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
116627
|
var init_nitro_compile = __esm({
|
|
116625
116628
|
"src/nitro-compile.ts"() {
|
|
116626
116629
|
"use strict";
|
|
116627
|
-
|
|
116630
|
+
import_node_crypto96 = require("node:crypto");
|
|
116628
116631
|
import_node_fs163 = __toESM(require("node:fs"), 1);
|
|
116629
116632
|
import_node_os32 = __toESM(require("node:os"), 1);
|
|
116630
116633
|
import_node_path164 = __toESM(require("node:path"), 1);
|
|
@@ -116701,11 +116704,11 @@ var init_nitro_compile = __esm({
|
|
|
116701
116704
|
});
|
|
116702
116705
|
|
|
116703
116706
|
// src/nitro-compiler-digest.ts
|
|
116704
|
-
var
|
|
116707
|
+
var import_node_crypto97, import_node_fs164, import_node_path165;
|
|
116705
116708
|
var init_nitro_compiler_digest = __esm({
|
|
116706
116709
|
"src/nitro-compiler-digest.ts"() {
|
|
116707
116710
|
"use strict";
|
|
116708
|
-
|
|
116711
|
+
import_node_crypto97 = require("node:crypto");
|
|
116709
116712
|
import_node_fs164 = require("node:fs");
|
|
116710
116713
|
import_node_path165 = __toESM(require("node:path"), 1);
|
|
116711
116714
|
init_swift_compiler_digest();
|
|
@@ -116714,7 +116717,7 @@ var init_nitro_compiler_digest = __esm({
|
|
|
116714
116717
|
|
|
116715
116718
|
// src/nitro-superset-inputs.ts
|
|
116716
116719
|
async function nitroSupersetInputs(options2) {
|
|
116717
|
-
const resolve10 = (0,
|
|
116720
|
+
const resolve10 = (0, import_node_module23.createRequire)((0, import_node_path166.join)(options2.appRoot, "package.json")).resolve;
|
|
116718
116721
|
const pin2 = swiftNativePin();
|
|
116719
116722
|
const inputs2 = {
|
|
116720
116723
|
configuration: options2.configuration,
|
|
@@ -116731,12 +116734,12 @@ async function nitroSupersetInputs(options2) {
|
|
|
116731
116734
|
inputs2[`provider:${name3}`] = `${packageVersion(root)}\0${await packageTreeDigest(root)}`;
|
|
116732
116735
|
return inputs2;
|
|
116733
116736
|
}
|
|
116734
|
-
var import_node_fs165,
|
|
116737
|
+
var import_node_fs165, import_node_module23, import_node_path166, packageVersion;
|
|
116735
116738
|
var init_nitro_superset_inputs = __esm({
|
|
116736
116739
|
"src/nitro-superset-inputs.ts"() {
|
|
116737
116740
|
"use strict";
|
|
116738
116741
|
import_node_fs165 = require("node:fs");
|
|
116739
|
-
|
|
116742
|
+
import_node_module23 = require("node:module");
|
|
116740
116743
|
import_node_path166 = require("node:path");
|
|
116741
116744
|
init_package_tree_digest();
|
|
116742
116745
|
init_swift_native_pin();
|
|
@@ -116843,7 +116846,7 @@ var init_nitro_superset = __esm({
|
|
|
116843
116846
|
init_nitroContract();
|
|
116844
116847
|
init_swift_standin_digest();
|
|
116845
116848
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
116846
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
116849
|
+
NITRO_COMPILER_DIGEST = true ? "b0c420cd284cebdbc1131ebcbd442b5e7e67c7636e380761381d183362fd120b" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
116847
116850
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
116848
116851
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
116849
116852
|
published3 = /* @__PURE__ */ new Map();
|
|
@@ -116940,8 +116943,8 @@ async function buildNitroBundle(appRoot, configuration, moduleRoot, shared = tru
|
|
|
116940
116943
|
assets: compiled.artifact ? await compiledModuleAssets(compiled.artifact) : []
|
|
116941
116944
|
};
|
|
116942
116945
|
}
|
|
116943
|
-
function compiledModuleRequestHandler(label, compile2,
|
|
116944
|
-
const
|
|
116946
|
+
function compiledModuleRequestHandler(label, compile2, options2) {
|
|
116947
|
+
const preparations = new NativePreparation();
|
|
116945
116948
|
return async (req, res) => {
|
|
116946
116949
|
const url = new URL(req.url ?? "/", "http://localhost");
|
|
116947
116950
|
const remote = req.socket.remoteAddress?.replace(/^::ffff:/, "");
|
|
@@ -116964,30 +116967,20 @@ function compiledModuleRequestHandler(label, compile2, isAvailable) {
|
|
|
116964
116967
|
try {
|
|
116965
116968
|
const iosTarget = url.searchParams.get("iosTarget") ?? void 0;
|
|
116966
116969
|
const app = import_node_fs166.default.realpathSync(root);
|
|
116967
|
-
const assetOrigin = `http://${host2}`;
|
|
116968
116970
|
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,
|
|
116971
|
+
const assetOrigin = `http://${host2}`;
|
|
116972
|
+
const build2 = () => compile2(app, assetOrigin, iosTarget, url.searchParams);
|
|
116973
|
+
const metadata = await preparations.resolve(
|
|
116984
116974
|
app,
|
|
116985
|
-
|
|
116986
|
-
|
|
116987
|
-
|
|
116975
|
+
key2,
|
|
116976
|
+
url.searchParams,
|
|
116977
|
+
async () => {
|
|
116978
|
+
const built2 = await (options2?.configuredNativeSources ? withConfiguredNativeSources(app, build2) : build2());
|
|
116979
|
+
return built2?.metadata ?? null;
|
|
116980
|
+
},
|
|
116981
|
+
(metadata2) => metadata2 === null || (options2?.reusable?.(assetOrigin, metadata2) ?? true)
|
|
116988
116982
|
);
|
|
116989
116983
|
if (res.destroyed) return;
|
|
116990
|
-
openPreparations2.store(key2, token, metadata);
|
|
116991
116984
|
res.writeHead(200, {
|
|
116992
116985
|
"Content-Type": "application/json",
|
|
116993
116986
|
"Cache-Control": "no-store"
|
|
@@ -117006,11 +116999,11 @@ var init_nitro_bundle = __esm({
|
|
|
117006
116999
|
"use strict";
|
|
117007
117000
|
import_node_fs166 = __toESM(require("node:fs"), 1);
|
|
117008
117001
|
import_node_path167 = __toESM(require("node:path"), 1);
|
|
117002
|
+
init_app_config();
|
|
117009
117003
|
init_backend_origin();
|
|
117010
117004
|
init_expo_native_workspace();
|
|
117011
117005
|
init_native_app_identity_project();
|
|
117012
117006
|
init_native_preparation();
|
|
117013
|
-
init_nativePreparationContract();
|
|
117014
117007
|
init_nitro_app_providers();
|
|
117015
117008
|
init_nitro_compile();
|
|
117016
117009
|
init_swift_distribution();
|
|
@@ -117025,7 +117018,10 @@ var init_nitro_bundle = __esm({
|
|
|
117025
117018
|
throw new Error("Nitro compilation needs configuration=Debug or Release");
|
|
117026
117019
|
return compileNitroApp(root, origin, configuration, void 0, true, iosTarget);
|
|
117027
117020
|
},
|
|
117028
|
-
|
|
117021
|
+
{
|
|
117022
|
+
configuredNativeSources: true,
|
|
117023
|
+
reusable: (origin, { url, hash }) => swiftArtifactIsAvailable(origin, url, hash)
|
|
117024
|
+
}
|
|
117029
117025
|
);
|
|
117030
117026
|
}
|
|
117031
117027
|
});
|
|
@@ -117038,7 +117034,7 @@ __export(expo_widgets_bundle_exports, {
|
|
|
117038
117034
|
handleExpoWidgetsRequest: () => handleExpoWidgetsRequest
|
|
117039
117035
|
});
|
|
117040
117036
|
async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
117041
|
-
const require2 = (0,
|
|
117037
|
+
const require2 = (0, import_node_module24.createRequire)(import_node_path168.default.join(appRoot, "package.json"));
|
|
117042
117038
|
let manifest;
|
|
117043
117039
|
try {
|
|
117044
117040
|
manifest = require2.resolve("expo-widgets/package.json");
|
|
@@ -117049,14 +117045,14 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
117049
117045
|
}
|
|
117050
117046
|
const packageDir = import_node_path168.default.dirname(manifest);
|
|
117051
117047
|
const runtimeBundle = await withSwiftRootLock(
|
|
117052
|
-
import_node_path168.default.join(await
|
|
117048
|
+
import_node_path168.default.join(await import_promises19.default.realpath(packageDir), "bundle"),
|
|
117053
117049
|
async () => {
|
|
117054
117050
|
await (0, import_node_util22.promisify)(import_node_child_process76.execFile)(
|
|
117055
117051
|
process.env.NODE_BINARY || "node",
|
|
117056
117052
|
[import_node_path168.default.join(packageDir, "scripts/build-bundle.mjs"), appRoot],
|
|
117057
117053
|
{ cwd: appRoot, maxBuffer: 16 * 1024 * 1024 }
|
|
117058
117054
|
);
|
|
117059
|
-
return
|
|
117055
|
+
return import_promises19.default.readFile(import_node_path168.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"), "utf8");
|
|
117060
117056
|
}
|
|
117061
117057
|
);
|
|
117062
117058
|
const catalog = await stageExpoWidgetAssets(appRoot, origin);
|
|
@@ -117067,13 +117063,13 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
117067
117063
|
}
|
|
117068
117064
|
};
|
|
117069
117065
|
}
|
|
117070
|
-
var import_node_child_process76,
|
|
117066
|
+
var import_node_child_process76, import_promises19, import_node_module24, import_node_path168, import_node_util22, EXPO_WIDGETS_ROUTE, handleExpoWidgetsRequest;
|
|
117071
117067
|
var init_expo_widgets_bundle = __esm({
|
|
117072
117068
|
"src/expo-widgets-bundle.ts"() {
|
|
117073
117069
|
"use strict";
|
|
117074
117070
|
import_node_child_process76 = require("node:child_process");
|
|
117075
|
-
|
|
117076
|
-
|
|
117071
|
+
import_promises19 = __toESM(require("node:fs/promises"), 1);
|
|
117072
|
+
import_node_module24 = require("node:module");
|
|
117077
117073
|
import_node_path168 = __toESM(require("node:path"), 1);
|
|
117078
117074
|
import_node_util22 = require("node:util");
|
|
117079
117075
|
init_expo_widget_assets();
|
|
@@ -117084,9 +117080,11 @@ var init_expo_widgets_bundle = __esm({
|
|
|
117084
117080
|
handleExpoWidgetsRequest = compiledModuleRequestHandler(
|
|
117085
117081
|
"Expo widget extension",
|
|
117086
117082
|
buildExpoWidgetsBundle,
|
|
117087
|
-
|
|
117088
|
-
(
|
|
117089
|
-
|
|
117083
|
+
{
|
|
117084
|
+
reusable: (origin, { images }) => Object.values(images).every(
|
|
117085
|
+
(variants) => variants.every(({ uri }) => hasStagedHostFile(origin, uri))
|
|
117086
|
+
)
|
|
117087
|
+
}
|
|
117090
117088
|
);
|
|
117091
117089
|
}
|
|
117092
117090
|
});
|
|
@@ -117726,7 +117724,7 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
|
|
|
117726
117724
|
const packagePath = import_node_path169.default.join(
|
|
117727
117725
|
swiftCacheDir(),
|
|
117728
117726
|
"peach-one-sdk-swift",
|
|
117729
|
-
(0,
|
|
117727
|
+
(0, import_node_crypto98.createHash)("sha256").update(import_node_fs167.default.realpathSync(appRoot)).digest("hex").slice(0, 16),
|
|
117730
117728
|
"sdk"
|
|
117731
117729
|
);
|
|
117732
117730
|
const bindingFlags = optimize ? '["-suppress-warnings"]' : '["-suppress-warnings", "-Onone", "-no-whole-module-optimization"]';
|
|
@@ -117773,11 +117771,11 @@ async function buildOneSDKBundle(appRoot) {
|
|
|
117773
117771
|
assets: await compiledModuleAssets(compiled.artifact)
|
|
117774
117772
|
};
|
|
117775
117773
|
}
|
|
117776
|
-
var
|
|
117774
|
+
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
117775
|
var init_one_sdk_bundle = __esm({
|
|
117778
117776
|
"src/one-sdk-bundle.ts"() {
|
|
117779
117777
|
"use strict";
|
|
117780
|
-
|
|
117778
|
+
import_node_crypto98 = require("node:crypto");
|
|
117781
117779
|
import_node_fs167 = __toESM(require("node:fs"), 1);
|
|
117782
117780
|
import_node_path169 = __toESM(require("node:path"), 1);
|
|
117783
117781
|
init_expo_native_workspace();
|
|
@@ -117794,7 +117792,8 @@ var init_one_sdk_bundle = __esm({
|
|
|
117794
117792
|
ONE_SDK_BINDING_SHARD_MIN_BYTES = 256 * 1024;
|
|
117795
117793
|
handleOneSDKRequest = compiledModuleRequestHandler(
|
|
117796
117794
|
"One SDK",
|
|
117797
|
-
(root, origin) => compileOneSDKApp(root, origin)
|
|
117795
|
+
(root, origin) => compileOneSDKApp(root, origin),
|
|
117796
|
+
{ configuredNativeSources: true }
|
|
117798
117797
|
);
|
|
117799
117798
|
}
|
|
117800
117799
|
});
|
|
@@ -117856,7 +117855,7 @@ async function compileTurboApp(appRoot, origin, moduleRoot, iosTarget, prepareRe
|
|
|
117856
117855
|
const { artifact, collection } = await compileTurboModule({
|
|
117857
117856
|
appRoot,
|
|
117858
117857
|
reactNativeRoot: import_node_path170.default.dirname(
|
|
117859
|
-
(0,
|
|
117858
|
+
(0, import_node_module25.createRequire)(import_node_path170.default.join(projectRoot, "package.json")).resolve(
|
|
117860
117859
|
"react-native/package.json"
|
|
117861
117860
|
)
|
|
117862
117861
|
),
|
|
@@ -117894,11 +117893,11 @@ async function buildTurboBundle(appRoot, moduleRoot, prepareReactNativeCore) {
|
|
|
117894
117893
|
assets: compiled.artifact ? await compiledModuleAssets(compiled.artifact) : []
|
|
117895
117894
|
};
|
|
117896
117895
|
}
|
|
117897
|
-
var
|
|
117896
|
+
var import_node_module25, import_node_path170, TURBO_ROUTE, handleTurboRequest;
|
|
117898
117897
|
var init_turbo_bundle = __esm({
|
|
117899
117898
|
"src/turbo-bundle.ts"() {
|
|
117900
117899
|
"use strict";
|
|
117901
|
-
|
|
117900
|
+
import_node_module25 = require("node:module");
|
|
117902
117901
|
import_node_path170 = __toESM(require("node:path"), 1);
|
|
117903
117902
|
init_app_project();
|
|
117904
117903
|
init_app_config();
|
|
@@ -117916,7 +117915,10 @@ var init_turbo_bundle = __esm({
|
|
|
117916
117915
|
handleTurboRequest = compiledModuleRequestHandler(
|
|
117917
117916
|
"TurboModule",
|
|
117918
117917
|
(root, origin, iosTarget) => compileTurboApp(root, origin, void 0, iosTarget),
|
|
117919
|
-
|
|
117918
|
+
{
|
|
117919
|
+
configuredNativeSources: true,
|
|
117920
|
+
reusable: (origin, { unavailable: unavailable2, url, hash }) => !unavailable2?.length && swiftArtifactIsAvailable(origin, url, hash)
|
|
117921
|
+
}
|
|
117920
117922
|
);
|
|
117921
117923
|
}
|
|
117922
117924
|
});
|
|
@@ -117962,7 +117964,7 @@ async function resolveExpoAndroidAutolinking(appRoot) {
|
|
|
117962
117964
|
async function resolveAndroidModules(appRoot) {
|
|
117963
117965
|
let autolinker;
|
|
117964
117966
|
try {
|
|
117965
|
-
autolinker = (0,
|
|
117967
|
+
autolinker = (0, import_node_module26.createRequire)(import_node_path171.default.join(appRoot, "package.json")).resolve(
|
|
117966
117968
|
"expo-modules-autolinking/package.json"
|
|
117967
117969
|
);
|
|
117968
117970
|
} catch (error) {
|
|
@@ -118016,12 +118018,12 @@ async function resolveReactNativeAndroidAutolinking(appRoot) {
|
|
|
118016
118018
|
}
|
|
118017
118019
|
return linked;
|
|
118018
118020
|
}
|
|
118019
|
-
var import_node_fs168,
|
|
118021
|
+
var import_node_fs168, import_node_module26, import_node_path171, resolving;
|
|
118020
118022
|
var init_android_autolinking = __esm({
|
|
118021
118023
|
"src/android-autolinking.ts"() {
|
|
118022
118024
|
"use strict";
|
|
118023
118025
|
import_node_fs168 = __toESM(require("node:fs"), 1);
|
|
118024
|
-
|
|
118026
|
+
import_node_module26 = require("node:module");
|
|
118025
118027
|
import_node_path171 = __toESM(require("node:path"), 1);
|
|
118026
118028
|
init_androidAutolinkingContract();
|
|
118027
118029
|
init_autolinker_process();
|
|
@@ -118436,11 +118438,11 @@ function readSharedDesktopAuthSession() {
|
|
|
118436
118438
|
return null;
|
|
118437
118439
|
}
|
|
118438
118440
|
}
|
|
118439
|
-
var
|
|
118441
|
+
var import_node_crypto99, import_node_fs171, import_node_path174, SESSION_VERSION, SESSION_FILE_ENV, DEFAULT_ORIGIN;
|
|
118440
118442
|
var init_shared_session = __esm({
|
|
118441
118443
|
"src/auth/shared-session.ts"() {
|
|
118442
118444
|
"use strict";
|
|
118443
|
-
|
|
118445
|
+
import_node_crypto99 = require("node:crypto");
|
|
118444
118446
|
import_node_fs171 = require("node:fs");
|
|
118445
118447
|
import_node_path174 = require("node:path");
|
|
118446
118448
|
init_home_paths();
|
|
@@ -118478,7 +118480,7 @@ var init_run_rnx = __esm({
|
|
|
118478
118480
|
// cli/secure-file.ts
|
|
118479
118481
|
function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
|
|
118480
118482
|
(0, import_node_fs172.mkdirSync)((0, import_node_path175.dirname)(filepath), { recursive: true });
|
|
118481
|
-
const temporary = `${filepath}.tmp-${process.pid}-${(0,
|
|
118483
|
+
const temporary = `${filepath}.tmp-${process.pid}-${(0, import_node_crypto100.randomUUID)()}`;
|
|
118482
118484
|
let descriptor = null;
|
|
118483
118485
|
try {
|
|
118484
118486
|
descriptor = (0, import_node_fs172.openSync)(temporary, "wx", 384);
|
|
@@ -118495,11 +118497,11 @@ function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
|
|
|
118495
118497
|
throw error;
|
|
118496
118498
|
}
|
|
118497
118499
|
}
|
|
118498
|
-
var
|
|
118500
|
+
var import_node_crypto100, import_node_fs172, import_node_path175;
|
|
118499
118501
|
var init_secure_file = __esm({
|
|
118500
118502
|
"cli/secure-file.ts"() {
|
|
118501
118503
|
"use strict";
|
|
118502
|
-
|
|
118504
|
+
import_node_crypto100 = require("node:crypto");
|
|
118503
118505
|
import_node_fs172 = require("node:fs");
|
|
118504
118506
|
import_node_path175 = require("node:path");
|
|
118505
118507
|
}
|
|
@@ -120861,11 +120863,11 @@ function createCloudSession(input) {
|
|
|
120861
120863
|
}
|
|
120862
120864
|
return session;
|
|
120863
120865
|
}
|
|
120864
|
-
var
|
|
120866
|
+
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
120867
|
var init_cloud_session = __esm({
|
|
120866
120868
|
"cli/cloud-session.ts"() {
|
|
120867
120869
|
"use strict";
|
|
120868
|
-
|
|
120870
|
+
import_node_crypto101 = require("node:crypto");
|
|
120869
120871
|
import_node_fs174 = require("node:fs");
|
|
120870
120872
|
import_node_path177 = require("node:path");
|
|
120871
120873
|
init_backend_origin();
|
|
@@ -121096,7 +121098,7 @@ function listMetroAssetDest(assetsPath) {
|
|
|
121096
121098
|
return { directory: directory2, files: files2, truncated };
|
|
121097
121099
|
}
|
|
121098
121100
|
function metroDescriptorHash(scaleBytes) {
|
|
121099
|
-
const hasher = (0,
|
|
121101
|
+
const hasher = (0, import_node_crypto102.createHash)("md5");
|
|
121100
121102
|
for (const bytes of scaleBytes) hasher.update(bytes);
|
|
121101
121103
|
return hasher.digest("hex");
|
|
121102
121104
|
}
|
|
@@ -121125,7 +121127,7 @@ function distinctByContent(directory2, options2) {
|
|
|
121125
121127
|
} catch {
|
|
121126
121128
|
continue;
|
|
121127
121129
|
}
|
|
121128
|
-
const digest3 = (0,
|
|
121130
|
+
const digest3 = (0, import_node_crypto102.createHash)("md5").update(bytes).digest("hex");
|
|
121129
121131
|
if (!byContent.has(digest3)) byContent.set(digest3, relative5);
|
|
121130
121132
|
}
|
|
121131
121133
|
return [...byContent.values()];
|
|
@@ -121173,7 +121175,7 @@ function placeMetroDescriptor(listing, descriptor) {
|
|
|
121173
121175
|
continue;
|
|
121174
121176
|
}
|
|
121175
121177
|
const identical = fileHashes2 ? bytes.every((file, index) => {
|
|
121176
|
-
const digest3 = (0,
|
|
121178
|
+
const digest3 = (0, import_node_crypto102.createHash)("md5").update(file).digest("hex");
|
|
121177
121179
|
return descriptor.scales.some(
|
|
121178
121180
|
(scale, declared) => scale === scales[index] && fileHashes2[declared] === digest3
|
|
121179
121181
|
);
|
|
@@ -121198,7 +121200,7 @@ function unverifiedContentKey(dest, fileDigests2) {
|
|
|
121198
121200
|
const file = (0, import_node_path178.join)(dest.directory, relative5);
|
|
121199
121201
|
let digest3 = fileDigests2.get(file);
|
|
121200
121202
|
if (digest3 === void 0) {
|
|
121201
|
-
digest3 = (0,
|
|
121203
|
+
digest3 = (0, import_node_crypto102.createHash)("sha256").update((0, import_node_fs175.readFileSync)(file)).digest("hex");
|
|
121202
121204
|
fileDigests2.set(file, digest3);
|
|
121203
121205
|
}
|
|
121204
121206
|
return [scale, digest3];
|
|
@@ -121487,7 +121489,7 @@ async function produceArtifact(prepared, maxBytes, command) {
|
|
|
121487
121489
|
}
|
|
121488
121490
|
return {
|
|
121489
121491
|
bytes,
|
|
121490
|
-
sha256: (0,
|
|
121492
|
+
sha256: (0, import_node_crypto102.createHash)("sha256").update(bytes).digest("hex"),
|
|
121491
121493
|
receipt: artifact.receipt,
|
|
121492
121494
|
assetsDirectory: prepared.dest?.directory ?? null,
|
|
121493
121495
|
warnings
|
|
@@ -121592,11 +121594,11 @@ async function createCloudBox(options2) {
|
|
|
121592
121594
|
warnings: artifact.warnings
|
|
121593
121595
|
};
|
|
121594
121596
|
}
|
|
121595
|
-
var
|
|
121597
|
+
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
121598
|
var init_cloud_client = __esm({
|
|
121597
121599
|
"cli/cloud-client.ts"() {
|
|
121598
121600
|
"use strict";
|
|
121599
|
-
|
|
121601
|
+
import_node_crypto102 = require("node:crypto");
|
|
121600
121602
|
import_node_fs175 = require("node:fs");
|
|
121601
121603
|
import_node_path178 = require("node:path");
|
|
121602
121604
|
import_node_vm = require("node:vm");
|
|
@@ -123370,7 +123372,7 @@ function serveAppPackageResource(req, res) {
|
|
|
123370
123372
|
init_fetch_proxy_handler();
|
|
123371
123373
|
|
|
123372
123374
|
// src/host/fetch-proxy-transport.ts
|
|
123373
|
-
var
|
|
123375
|
+
var import_node_crypto85 = require("node:crypto");
|
|
123374
123376
|
var import_node_fs145 = require("node:fs");
|
|
123375
123377
|
var import_node_http23 = require("node:http2");
|
|
123376
123378
|
var import_node_path145 = __toESM(require("node:path"), 1);
|
|
@@ -123403,7 +123405,7 @@ async function createIdentity() {
|
|
|
123403
123405
|
const keys = await crypto.subtle.generateKey(algorithm, true, ["sign", "verify"]);
|
|
123404
123406
|
const certificate = await import_x5092.X509CertificateGenerator.createSelfSigned(
|
|
123405
123407
|
{
|
|
123406
|
-
serialNumber: (0,
|
|
123408
|
+
serialNumber: (0, import_node_crypto85.randomBytes)(16).toString("hex"),
|
|
123407
123409
|
name: "CN=localhost",
|
|
123408
123410
|
notBefore: new Date(Date.now() - 6e4),
|
|
123409
123411
|
notAfter: new Date(Date.now() + 365 * 24 * 60 * 6e4),
|
|
@@ -123422,7 +123424,7 @@ async function createIdentity() {
|
|
|
123422
123424
|
${privateKey.toString("base64").match(/.{1,64}/g)?.join("\n")}
|
|
123423
123425
|
-----END PRIVATE KEY-----
|
|
123424
123426
|
`,
|
|
123425
|
-
spki: (0,
|
|
123427
|
+
spki: (0, import_node_crypto85.createHash)("sha256").update(Buffer.from(await crypto.subtle.exportKey("spki", keys.publicKey))).digest("base64")
|
|
123426
123428
|
};
|
|
123427
123429
|
}
|
|
123428
123430
|
async function startFetchProxyTransport(identityPath, hasLiveSims = () => false) {
|
|
@@ -123985,7 +123987,7 @@ var PlaneHost = class {
|
|
|
123985
123987
|
|
|
123986
123988
|
// src/host/replacement-module-handler.ts
|
|
123987
123989
|
var import_node_fs148 = require("node:fs");
|
|
123988
|
-
var
|
|
123990
|
+
var import_promises18 = __toESM(require("node:fs/promises"), 1);
|
|
123989
123991
|
var import_node_path148 = __toESM(require("node:path"), 1);
|
|
123990
123992
|
|
|
123991
123993
|
// ../contrast-bundler/src/replacementModule.ts
|
|
@@ -124404,7 +124406,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
|
|
|
124404
124406
|
}
|
|
124405
124407
|
let resolvedTargetPath;
|
|
124406
124408
|
try {
|
|
124407
|
-
resolvedTargetPath = await
|
|
124409
|
+
resolvedTargetPath = await import_promises18.default.realpath(targetPath);
|
|
124408
124410
|
} catch (error) {
|
|
124409
124411
|
const message = error instanceof Error ? error.message : String(error);
|
|
124410
124412
|
res.writeHead(404, { "Content-Type": "text/plain; charset=utf-8" });
|
|
@@ -124412,7 +124414,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
|
|
|
124412
124414
|
return true;
|
|
124413
124415
|
}
|
|
124414
124416
|
if (servedRoots) {
|
|
124415
|
-
const realRoots = (await Promise.all(servedRoots.map((root) =>
|
|
124417
|
+
const realRoots = (await Promise.all(servedRoots.map((root) => import_promises18.default.realpath(root).catch(() => null)))).filter((root) => root !== null);
|
|
124416
124418
|
if (!isInsideAny(realRoots, resolvedTargetPath)) {
|
|
124417
124419
|
res.writeHead(403, { "Content-Type": "text/plain; charset=utf-8" });
|
|
124418
124420
|
res.end("replacement file must be inside a folder the bundler serves");
|
|
@@ -124422,7 +124424,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
|
|
|
124422
124424
|
try {
|
|
124423
124425
|
const compiled = compileReplacementModule({
|
|
124424
124426
|
filePath: resolvedTargetPath,
|
|
124425
|
-
source: await
|
|
124427
|
+
source: await import_promises18.default.readFile(resolvedTargetPath, "utf8"),
|
|
124426
124428
|
runtimePackages,
|
|
124427
124429
|
// the imported file's url is this request's with only its path changed,
|
|
124428
124430
|
// so the token, cache key and runtime packages carry over.
|
|
@@ -125620,21 +125622,15 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
125620
125622
|
return;
|
|
125621
125623
|
}
|
|
125622
125624
|
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);
|
|
125625
|
+
void Promise.resolve().then(() => (init_one_sdk_bundle(), one_sdk_bundle_exports)).then(({ handleOneSDKRequest: handleOneSDKRequest2 }) => handleOneSDKRequest2(req, res)).catch(failLazyRoute);
|
|
125626
125626
|
return;
|
|
125627
125627
|
}
|
|
125628
125628
|
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);
|
|
125629
|
+
void Promise.resolve().then(() => (init_nitro_bundle(), nitro_bundle_exports)).then(({ handleNitroRequest: handleNitroRequest2 }) => handleNitroRequest2(req, res)).catch(failLazyRoute);
|
|
125632
125630
|
return;
|
|
125633
125631
|
}
|
|
125634
125632
|
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);
|
|
125633
|
+
void Promise.resolve().then(() => (init_turbo_bundle(), turbo_bundle_exports)).then(({ handleTurboRequest: handleTurboRequest2 }) => handleTurboRequest2(req, res)).catch(failLazyRoute);
|
|
125638
125634
|
return;
|
|
125639
125635
|
}
|
|
125640
125636
|
if (route.startsWith(SWIFT_PACKAGE_PATH) || route === KOTLIN_PACKAGE_PATH || route === ONE_WIDGET_PATH) {
|
|
@@ -125644,9 +125640,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
125644
125640
|
return;
|
|
125645
125641
|
}
|
|
125646
125642
|
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) => {
|
|
125643
|
+
void Promise.resolve().then(() => (init_expo_swift_host(), expo_swift_host_exports)).then(({ handleExpoSwiftRequest: handleExpoSwiftRequest2 }) => handleExpoSwiftRequest2(req, res)).then((handled) => {
|
|
125650
125644
|
if (!handled) {
|
|
125651
125645
|
res.writeHead(404);
|
|
125652
125646
|
res.end("Swift artifact not found");
|
|
@@ -126693,13 +126687,6 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
126693
126687
|
}
|
|
126694
126688
|
}
|
|
126695
126689
|
};
|
|
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
126690
|
// Annotate the CommonJS export names for ESM import in node:
|
|
126704
126691
|
0 && (module.exports = {
|
|
126705
126692
|
SootSimBridgeHost,
|