peachsim 0.1.2487 → 0.1.2489
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/control.ts +1 -0
- package/cli/commands/shell-url.ts +12 -6
- 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 +167 -167
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-MHBKEX4S.mjs → acorn-46P725QB.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-RUTCB73U.mjs → chunk-2ZAKSUG3.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HE7EAGQL.mjs → chunk-5F5TV3M5.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-2ZLORBLV.mjs → chunk-75IXYYPA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-RCU5GHCK.mjs → chunk-CB2MREW2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-J2F3WW7E.mjs → chunk-E7Z6E4VM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-WM3ZQJPN.mjs → chunk-FMR76G4M.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-N77R5GZV.mjs → chunk-FNFDX5OA.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-OXWMTMC4.mjs → chunk-FXOLLJ7N.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QXT6KHA4.mjs → chunk-G4KFSINI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-X2P3BLT5.mjs → chunk-HO4COZOG.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-OZIZZTJU.mjs → chunk-K3NXHJBV.mjs} +12 -12
- package/dist-lib/esm-chunks/{chunk-WBFRHLQG.mjs → chunk-KFJJOPLU.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-NM27TWXD.mjs → chunk-MOGXM5NJ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-FQLC3QU7.mjs → chunk-NN6KHA6F.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VTJKZ25F.mjs → chunk-PWLDSFLP.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-RCXANTR3.mjs → chunk-QR4AFBNL.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-VNI6WHVI.mjs → chunk-ST7BG6HB.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-23DLL3LB.mjs → chunk-T53UQ6V7.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-2BZEUT66.mjs → chunk-XYRP56S5.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-KF6HW3YA.mjs → chunk-YH2VVDO2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-4WGIAUCS.mjs → chunk-ZGCWGHEX.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-5W4FZUHK.mjs → metro-layout-parser-FPL6XENQ.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-KJQO5GSC.mjs → swift-package-prebuilt-FYUAWFYO.mjs} +10 -10
- package/dist-lib/esm-chunks/{swift-sdk-app-module-JM6D76SD.mjs → swift-sdk-app-module-RVHNFMEY.mjs} +13 -13
- package/dist-lib/esm-chunks/{swift-sdk-image-JUXW737Q.mjs → swift-sdk-image-JHQ6DP5G.mjs} +13 -13
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-X55F2PAV.mjs → swift-sdk-image-producer-XQ5W4ONP.mjs} +4 -4
- package/dist-lib/expo-swift-bundle.cjs +99 -99
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +972 -760
- package/dist-lib/host/fetch-proxy-handler.cjs +42 -42
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +79 -79
- package/dist-lib/public-origins-lib.json +74 -72
- 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 +1421 -1324
- 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 +5 -0
- package/dist-types/packages/peach-engine/src/render-worker/canvaskit-webgpu.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-wire-server.d.ts +2 -0
- package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +4 -0
- package/package.json +1 -1
- package/src/expo-native-prebuilt.ts +16 -25
- package/src/host/bridge-host.ts +8 -0
- package/src/managed-expo-identity.ts +110 -0
- package/src/native-preparation.ts +8 -2
- package/src/nativePreparationContract.ts +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2489 | (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;
|
|
@@ -491,12 +491,12 @@ var init_bridge_constants = __esm({
|
|
|
491
491
|
|
|
492
492
|
// src/chromium-admission.ts
|
|
493
493
|
function readChromiumQueue(deps, verified2, own2) {
|
|
494
|
-
const { fs:
|
|
495
|
-
const dir =
|
|
494
|
+
const { fs: fs121, os: os29, path: path159, childProcess: childProcess3 } = deps;
|
|
495
|
+
const dir = path159.join(
|
|
496
496
|
process.platform === "win32" ? os29.tmpdir() : "/tmp",
|
|
497
497
|
"chromium-admission"
|
|
498
498
|
);
|
|
499
|
-
|
|
499
|
+
fs121.mkdirSync(dir, { recursive: true });
|
|
500
500
|
const limit = Math.max(2, Math.floor(os29.cpus().length / 2));
|
|
501
501
|
const alive = (pid) => {
|
|
502
502
|
try {
|
|
@@ -506,7 +506,7 @@ function readChromiumQueue(deps, verified2, own2) {
|
|
|
506
506
|
return err instanceof Error && "code" in err && err.code === "EPERM";
|
|
507
507
|
}
|
|
508
508
|
};
|
|
509
|
-
const entries2 =
|
|
509
|
+
const entries2 = fs121.readdirSync(dir).map((entry) => {
|
|
510
510
|
const match = /^(\d+)-(\d+)-/.exec(entry);
|
|
511
511
|
const pid = match ? Number(match[1]) : 0;
|
|
512
512
|
const held = entry === own2 || match !== null && alive(pid);
|
|
@@ -537,7 +537,7 @@ function readChromiumQueue(deps, verified2, own2) {
|
|
|
537
537
|
for (const { entry, held } of entries2) {
|
|
538
538
|
if (!held || verified2.get(entry) === false) {
|
|
539
539
|
try {
|
|
540
|
-
|
|
540
|
+
fs121.unlinkSync(path159.join(dir, entry));
|
|
541
541
|
} catch {
|
|
542
542
|
}
|
|
543
543
|
continue;
|
|
@@ -545,7 +545,7 @@ function readChromiumQueue(deps, verified2, own2) {
|
|
|
545
545
|
try {
|
|
546
546
|
tickets.push({
|
|
547
547
|
entry,
|
|
548
|
-
created:
|
|
548
|
+
created: fs121.statSync(path159.join(dir, entry), { bigint: true }).ctimeNs
|
|
549
549
|
});
|
|
550
550
|
} catch {
|
|
551
551
|
}
|
|
@@ -556,21 +556,21 @@ function readChromiumQueue(deps, verified2, own2) {
|
|
|
556
556
|
return { dir, limit, tickets: tickets.map((t) => t.entry) };
|
|
557
557
|
}
|
|
558
558
|
async function acquireChromiumAdmission(deps) {
|
|
559
|
-
const { fs:
|
|
559
|
+
const { fs: fs121, path: path159, label, readQueue, signal } = deps;
|
|
560
560
|
signal?.throwIfAborted();
|
|
561
561
|
const queuedAt = Date.now();
|
|
562
562
|
const verified2 = /* @__PURE__ */ new Map();
|
|
563
563
|
const startedAt = Math.round(Date.now() / 1e3 - process.uptime());
|
|
564
564
|
const name3 = `${process.pid}-${startedAt}-${Math.random().toString(36).slice(2, 10)}`;
|
|
565
|
-
const ticket =
|
|
566
|
-
|
|
565
|
+
const ticket = path159.join(readQueue(deps, verified2, name3).dir, name3);
|
|
566
|
+
fs121.closeSync(fs121.openSync(ticket, "wx"));
|
|
567
567
|
let released = false;
|
|
568
568
|
const release = () => {
|
|
569
569
|
if (released) return;
|
|
570
570
|
released = true;
|
|
571
571
|
process.removeListener("exit", release);
|
|
572
572
|
try {
|
|
573
|
-
|
|
573
|
+
fs121.unlinkSync(ticket);
|
|
574
574
|
} catch {
|
|
575
575
|
}
|
|
576
576
|
};
|
|
@@ -650,6 +650,42 @@ var init_public_brand = __esm({
|
|
|
650
650
|
}
|
|
651
651
|
});
|
|
652
652
|
|
|
653
|
+
// src/cli-version.ts
|
|
654
|
+
function getCliVersion() {
|
|
655
|
+
if (cached != null) return cached;
|
|
656
|
+
if (typeof __PEACH_CLI_VERSION__ !== "undefined" && typeof __PEACH_CLI_VERSION__ === "string" && __PEACH_CLI_VERSION__) {
|
|
657
|
+
cached = __PEACH_CLI_VERSION__;
|
|
658
|
+
return cached;
|
|
659
|
+
}
|
|
660
|
+
const candidates = [
|
|
661
|
+
() => (0, import_node_url.fileURLToPath)(import_meta.resolve(`${rnxPublicBrand.packageName}/package.json`)),
|
|
662
|
+
() => (0, import_node_url.fileURLToPath)(new URL("../package.json", __sootsim_import_meta_url))
|
|
663
|
+
];
|
|
664
|
+
for (const resolve10 of candidates) {
|
|
665
|
+
try {
|
|
666
|
+
const version2 = JSON.parse((0, import_node_fs3.readFileSync)(resolve10(), "utf8")).version;
|
|
667
|
+
if (typeof version2 === "string" && version2) {
|
|
668
|
+
cached = version2;
|
|
669
|
+
return cached;
|
|
670
|
+
}
|
|
671
|
+
} catch {
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
cached = "0.0.0";
|
|
675
|
+
return cached;
|
|
676
|
+
}
|
|
677
|
+
var import_node_fs3, import_node_url, import_meta, cached;
|
|
678
|
+
var init_cli_version = __esm({
|
|
679
|
+
"src/cli-version.ts"() {
|
|
680
|
+
"use strict";
|
|
681
|
+
import_node_fs3 = require("node:fs");
|
|
682
|
+
import_node_url = require("node:url");
|
|
683
|
+
init_public_brand();
|
|
684
|
+
import_meta = {};
|
|
685
|
+
cached = null;
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
|
|
653
689
|
// src/process-table.ts
|
|
654
690
|
function linuxClockTicks() {
|
|
655
691
|
const auxv = (0, import_node_fs4.readFileSync)("/proc/self/auxv");
|
|
@@ -1831,6 +1867,17 @@ var init_desktop_host_delivery = __esm({
|
|
|
1831
1867
|
}
|
|
1832
1868
|
});
|
|
1833
1869
|
|
|
1870
|
+
// src/nativePreparationContract.ts
|
|
1871
|
+
var NATIVE_PREPARE_QUERY_PARAM, NATIVE_PREPARED_QUERY_PARAM, MANAGED_EXPO_INPUTS_ROUTE;
|
|
1872
|
+
var init_nativePreparationContract = __esm({
|
|
1873
|
+
"src/nativePreparationContract.ts"() {
|
|
1874
|
+
"use strict";
|
|
1875
|
+
NATIVE_PREPARE_QUERY_PARAM = "prepare";
|
|
1876
|
+
NATIVE_PREPARED_QUERY_PARAM = "prepared";
|
|
1877
|
+
MANAGED_EXPO_INPUTS_ROUTE = "/__peach/managed-expo-inputs";
|
|
1878
|
+
}
|
|
1879
|
+
});
|
|
1880
|
+
|
|
1834
1881
|
// src/oneWidgetContract.ts
|
|
1835
1882
|
function isHomeWidgetFamily(value) {
|
|
1836
1883
|
return HOME_WIDGET_FAMILIES.some((family) => family === value);
|
|
@@ -3540,9 +3587,9 @@ function safeChildPlistName(value) {
|
|
|
3540
3587
|
name: file.toLowerCase().endsWith(".plist") ? file : `${file}.plist`
|
|
3541
3588
|
};
|
|
3542
3589
|
}
|
|
3543
|
-
async function readableSettingsBundle(
|
|
3590
|
+
async function readableSettingsBundle(path159) {
|
|
3544
3591
|
try {
|
|
3545
|
-
const root = await (0, import_promises3.stat)((0, import_node_path10.join)(
|
|
3592
|
+
const root = await (0, import_promises3.stat)((0, import_node_path10.join)(path159, "Root.plist"));
|
|
3546
3593
|
return root.isFile() && root.size <= MAX_PLIST_BYTES;
|
|
3547
3594
|
} catch {
|
|
3548
3595
|
return false;
|
|
@@ -3587,11 +3634,11 @@ async function settingsBundleFingerprint(bundlePath) {
|
|
|
3587
3634
|
return null;
|
|
3588
3635
|
}
|
|
3589
3636
|
}
|
|
3590
|
-
async function parsePlistRecord(
|
|
3637
|
+
async function parsePlistRecord(path159) {
|
|
3591
3638
|
try {
|
|
3592
|
-
const metadata = await (0, import_promises3.stat)(
|
|
3639
|
+
const metadata = await (0, import_promises3.stat)(path159);
|
|
3593
3640
|
if (!metadata.isFile() || metadata.size > MAX_PLIST_BYTES) return null;
|
|
3594
|
-
const source = await (0, import_promises3.readFile)(
|
|
3641
|
+
const source = await (0, import_promises3.readFile)(path159, "utf8");
|
|
3595
3642
|
const parsed2 = parsePlistSource(source);
|
|
3596
3643
|
return isRecord(parsed2) ? parsed2 : null;
|
|
3597
3644
|
} catch {
|
|
@@ -4071,7 +4118,7 @@ async function tcpPing(port, timeout = TCP_GATE_MS) {
|
|
|
4071
4118
|
return null;
|
|
4072
4119
|
}
|
|
4073
4120
|
}
|
|
4074
|
-
function httpGet(hostname2, port,
|
|
4121
|
+
function httpGet(hostname2, port, path159, method = "GET", timeout = TIMEOUT_MS, headers = {}) {
|
|
4075
4122
|
return new Promise((resolve10) => {
|
|
4076
4123
|
let settled = false;
|
|
4077
4124
|
let killing = false;
|
|
@@ -4080,7 +4127,7 @@ function httpGet(hostname2, port, path158, method = "GET", timeout = TIMEOUT_MS,
|
|
|
4080
4127
|
settled = true;
|
|
4081
4128
|
resolve10(value);
|
|
4082
4129
|
};
|
|
4083
|
-
const req = import_http.default.request({ hostname: hostname2, port, path:
|
|
4130
|
+
const req = import_http.default.request({ hostname: hostname2, port, path: path159, method, headers }, (res) => {
|
|
4084
4131
|
let body = "";
|
|
4085
4132
|
res.on("data", (c) => body += c.toString());
|
|
4086
4133
|
const contentType2 = (() => {
|
|
@@ -4889,8 +4936,8 @@ function sourceEntryPath() {
|
|
|
4889
4936
|
return null;
|
|
4890
4937
|
}
|
|
4891
4938
|
}
|
|
4892
|
-
function isCliEntry(
|
|
4893
|
-
const name3 = (0, import_node_path13.basename)(
|
|
4939
|
+
function isCliEntry(path159) {
|
|
4940
|
+
const name3 = (0, import_node_path13.basename)(path159);
|
|
4894
4941
|
return name3 === "bin.ts" || name3 === "bin.js";
|
|
4895
4942
|
}
|
|
4896
4943
|
function rnxSelfInvocation() {
|
|
@@ -5663,7 +5710,7 @@ var init_swift_standin_digest = __esm({
|
|
|
5663
5710
|
|
|
5664
5711
|
// src/expo-native-compiler-digest.ts
|
|
5665
5712
|
function expoNativeCompilerDigestValue() {
|
|
5666
|
-
return true ? "
|
|
5713
|
+
return true ? "ecafe9dff251decb45af7e610bd212d9ce7e82092d88a9781627d952631dc0b0" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
5667
5714
|
}
|
|
5668
5715
|
var import_node_crypto11;
|
|
5669
5716
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -9992,9 +10039,9 @@ var init_podspec_ruby = __esm({
|
|
|
9992
10039
|
}
|
|
9993
10040
|
// ---- errors
|
|
9994
10041
|
exceptionClass(name3) {
|
|
9995
|
-
const
|
|
10042
|
+
const path159 = name3.split("::");
|
|
9996
10043
|
let module2 = this.object;
|
|
9997
|
-
for (const part of
|
|
10044
|
+
for (const part of path159) {
|
|
9998
10045
|
const next = module2.consts.get(part);
|
|
9999
10046
|
if (!(next instanceof RModule))
|
|
10000
10047
|
throw new UnsupportedRuby(`no exception class ${name3}`);
|
|
@@ -14378,8 +14425,8 @@ export *
|
|
|
14378
14425
|
}`;
|
|
14379
14426
|
}
|
|
14380
14427
|
function swiftPackageIdentity(url) {
|
|
14381
|
-
const
|
|
14382
|
-
return (
|
|
14428
|
+
const path159 = url.endsWith("/") ? url.slice(0, -1) : url;
|
|
14429
|
+
return (path159.split("/").pop() ?? path159).replace(/\.git$/, "").toLowerCase();
|
|
14383
14430
|
}
|
|
14384
14431
|
function clangSettingEntries(settings, tool) {
|
|
14385
14432
|
return (settings ?? []).flatMap(
|
|
@@ -15025,10 +15072,10 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs2) {
|
|
|
15025
15072
|
const enclosing = scopes.length > 0 ? scopes[scopes.length - 1].prefix : [];
|
|
15026
15073
|
if (scope2?.[3] === "enum" && opens > 0 && /(^|\s)(public|open)\s/.test(scope2[2] ?? "") && !/\bwhere\b/.test(first.masked) && first.masked[scope2.index + scope2[0].length] !== "<") {
|
|
15027
15074
|
const name3 = scope2[4];
|
|
15028
|
-
const
|
|
15029
|
-
if (!byPath.has(
|
|
15075
|
+
const path159 = scopeOf(name3, enclosing, false);
|
|
15076
|
+
if (!byPath.has(path159.join(".")) && (path159.length === 1 || byPath.has(path159.slice(0, -1).join(".")))) {
|
|
15030
15077
|
const keptAttrs = [...(scope2[1] ?? "").matchAll(/@\w+(?:\([^)]*\))?/g)].map((attr) => attr[0]).filter((attr) => !attr.startsWith("@objc"));
|
|
15031
|
-
const id = `s:peach-synthesized-${module2}-${
|
|
15078
|
+
const id = `s:peach-synthesized-${module2}-${path159.join(".")}`;
|
|
15032
15079
|
const body = [];
|
|
15033
15080
|
let inner = 1;
|
|
15034
15081
|
let closed = false;
|
|
@@ -15083,15 +15130,15 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs2) {
|
|
|
15083
15130
|
symbols.push({
|
|
15084
15131
|
kind: { identifier: "swift.enum" },
|
|
15085
15132
|
identifier: { precise: id },
|
|
15086
|
-
pathComponents:
|
|
15133
|
+
pathComponents: path159,
|
|
15087
15134
|
declarationFragments: fragments,
|
|
15088
15135
|
accessLevel: "public"
|
|
15089
15136
|
});
|
|
15090
|
-
if (
|
|
15137
|
+
if (path159.length > 1)
|
|
15091
15138
|
relationships.push({
|
|
15092
15139
|
kind: "memberOf",
|
|
15093
15140
|
source: id,
|
|
15094
|
-
target: byPath.get(
|
|
15141
|
+
target: byPath.get(path159.slice(0, -1).join("."))
|
|
15095
15142
|
});
|
|
15096
15143
|
for (const kase of cases) {
|
|
15097
15144
|
const memberId = `${id}-${kase.leaf}`;
|
|
@@ -15100,7 +15147,7 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs2) {
|
|
|
15100
15147
|
symbols.push({
|
|
15101
15148
|
kind: { identifier: "swift.enum.case" },
|
|
15102
15149
|
identifier: { precise: memberId },
|
|
15103
|
-
pathComponents: [...
|
|
15150
|
+
pathComponents: [...path159, kase.leaf],
|
|
15104
15151
|
declarationFragments: [
|
|
15105
15152
|
{ kind: "keyword", spelling: "case" },
|
|
15106
15153
|
{ kind: "text", spelling: " " },
|
|
@@ -15116,7 +15163,7 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs2) {
|
|
|
15116
15163
|
symbols.push({
|
|
15117
15164
|
kind: { identifier: "swift.init" },
|
|
15118
15165
|
identifier: { precise: initId },
|
|
15119
|
-
pathComponents: [...
|
|
15166
|
+
pathComponents: [...path159, "init(rawValue:)"],
|
|
15120
15167
|
declarationFragments: [
|
|
15121
15168
|
{ kind: "keyword", spelling: "init" },
|
|
15122
15169
|
{ kind: "text", spelling: "?(" },
|
|
@@ -15195,7 +15242,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15195
15242
|
})
|
|
15196
15243
|
)
|
|
15197
15244
|
);
|
|
15198
|
-
const trap = (
|
|
15245
|
+
const trap = (path159) => `fatalError("${path159} is ${options2.placeholder === void 0 ? "a binary framework" : "a placeholder"} peach cannot run")`;
|
|
15199
15246
|
const skipped = [];
|
|
15200
15247
|
const behavior = options2.behavior ?? /* @__PURE__ */ new Map();
|
|
15201
15248
|
const used = /* @__PURE__ */ new Set();
|
|
@@ -15546,34 +15593,34 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15546
15593
|
lines.push(...physical);
|
|
15547
15594
|
owners.push(...physical.map(() => current2));
|
|
15548
15595
|
};
|
|
15549
|
-
const emitAt = (
|
|
15550
|
-
if (omit.has(
|
|
15596
|
+
const emitAt = (path159, line) => {
|
|
15597
|
+
if (omit.has(path159)) return;
|
|
15551
15598
|
const previous = current2;
|
|
15552
|
-
current2 =
|
|
15599
|
+
current2 = path159;
|
|
15553
15600
|
emit(line);
|
|
15554
15601
|
current2 = previous;
|
|
15555
15602
|
};
|
|
15556
15603
|
const emitInertState = (id, indent2, build2) => {
|
|
15557
|
-
const
|
|
15604
|
+
const path159 = pathOf(byId.get(id));
|
|
15558
15605
|
emitAt(hiddenInit(id), `${indent2}init(_peachInert: Void) { ${build2} }`);
|
|
15559
15606
|
const list2 = conforms.get(id) ?? [];
|
|
15560
15607
|
const has = (name3) => (children.get(id) ?? []).some((member) => leaf(member) === name3);
|
|
15561
15608
|
if (list2.includes("Encodable") && !has("encode(to:)"))
|
|
15562
15609
|
emitAt(
|
|
15563
|
-
`${
|
|
15610
|
+
`${path159}.encode(to:)`,
|
|
15564
15611
|
`${indent2}public func encode(to encoder: Encoder) throws {}`
|
|
15565
15612
|
);
|
|
15566
15613
|
if (list2.includes("Decodable") && !has("init(from:)"))
|
|
15567
15614
|
emitAt(
|
|
15568
|
-
`${
|
|
15615
|
+
`${path159}.init(from:)`,
|
|
15569
15616
|
`${indent2}public init(from decoder: Decoder) throws { self.init(_peachInert: ()) }`
|
|
15570
15617
|
);
|
|
15571
15618
|
};
|
|
15572
15619
|
const scoped = (body) => (symbol2, ...rest) => {
|
|
15573
|
-
const
|
|
15574
|
-
if (omit.has(
|
|
15620
|
+
const path159 = pathOf(symbol2);
|
|
15621
|
+
if (omit.has(path159)) return void skipped.push({ path: path159, reason: omit.get(path159) });
|
|
15575
15622
|
const previous = current2;
|
|
15576
|
-
current2 =
|
|
15623
|
+
current2 = path159;
|
|
15577
15624
|
try {
|
|
15578
15625
|
body(symbol2, ...rest);
|
|
15579
15626
|
} finally {
|
|
@@ -15605,7 +15652,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15605
15652
|
};
|
|
15606
15653
|
const emitMember = scoped(
|
|
15607
15654
|
(member, indent2, context) => {
|
|
15608
|
-
const
|
|
15655
|
+
const path159 = pathOf(member);
|
|
15609
15656
|
if (TYPE_KINDS.has(member.kind.identifier)) {
|
|
15610
15657
|
const origin = origins.get(member.identifier.precise)?.split(".")[0];
|
|
15611
15658
|
const parent = owner.get(member.identifier.precise);
|
|
@@ -15622,7 +15669,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15622
15669
|
))
|
|
15623
15670
|
return;
|
|
15624
15671
|
if (!MEMBER_KINDS.has(member.kind.identifier)) {
|
|
15625
|
-
skipped.push({ path:
|
|
15672
|
+
skipped.push({ path: path159, reason: `unhandled ${member.kind.identifier}` });
|
|
15626
15673
|
return;
|
|
15627
15674
|
}
|
|
15628
15675
|
const { 1: spelledAttrs, 2: rest } = LEADING_ATTRS.exec(text2(member));
|
|
@@ -15633,15 +15680,15 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15633
15680
|
const selector = context.inClass && !options2.inert && member.kind.identifier === "swift.type.method" && !/\basync\b/.test(rest) ? /^c:objc\(cs\)\w+\(cm\)([A-Za-z_][A-Za-z_0-9:]*)$/.exec(
|
|
15634
15681
|
member.identifier.precise
|
|
15635
15682
|
)?.[1] : void 0;
|
|
15636
|
-
const attrs = options2.unobjc?.has(
|
|
15683
|
+
const attrs = options2.unobjc?.has(path159) ? wrapped.replace(/@objc(?:\([^)]*\))?\s*/g, "") : `${wrapped}${selector ? `@objc(${selector}) ` : ""}`;
|
|
15637
15684
|
const modifiers = /^((?:(?:required|final|override|convenience|unowned(?:\(\w+\))?|weak|lazy|nonisolated|mutating|nonmutating) )*)(.*)$/s.exec(
|
|
15638
15685
|
rest
|
|
15639
15686
|
);
|
|
15640
15687
|
const flags = new Set(
|
|
15641
15688
|
modifiers[1].trim().split(/\s+/).filter(Boolean).map((flag) => flag.replace(/\(.*/, ""))
|
|
15642
15689
|
);
|
|
15643
|
-
const requiredInit = context.inClass && !!options2.requiredInits?.has(
|
|
15644
|
-
const restatesRequired = context.inClass &&
|
|
15690
|
+
const requiredInit = context.inClass && !!options2.requiredInits?.has(path159);
|
|
15691
|
+
const restatesRequired = context.inClass && path159.endsWith(".init()") && [...superChain(owner.get(member.identifier.precise) ?? "")].some(
|
|
15645
15692
|
(at) => options2.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
|
|
15646
15693
|
);
|
|
15647
15694
|
const protocolInit = member.kind.identifier === "swift.init" && /^c:objc\(pl\)\w+\(im\).*::SYNTHESIZED::c:objc\(cs\)/.test(
|
|
@@ -15651,7 +15698,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15651
15698
|
const final = context.inClass && flags.has("final") ? "final " : "";
|
|
15652
15699
|
const mutating = flags.has("mutating") ? "mutating " : flags.has("nonmutating") ? "nonmutating " : "";
|
|
15653
15700
|
let core = `${flags.has("convenience") ? "convenience " : ""}${modifiers[2]}`;
|
|
15654
|
-
for (const type of options2.unwrappedParameters?.get(
|
|
15701
|
+
for (const type of options2.unwrappedParameters?.get(path159) ?? [])
|
|
15655
15702
|
core = core.replace(
|
|
15656
15703
|
new RegExp(
|
|
15657
15704
|
`(:\\s*(?:\\w+\\.)*${type.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})(?=\\s*[,)])`,
|
|
@@ -15659,12 +15706,12 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15659
15706
|
),
|
|
15660
15707
|
"$1!"
|
|
15661
15708
|
);
|
|
15662
|
-
const override = context.inClass && !options2.plain?.has(
|
|
15709
|
+
const override = context.inClass && !options2.plain?.has(path159) && !restatesRequired && (flags.has("override") || overrides.has(member.identifier.precise) || options2.forcedOverride?.has(path159) || isObjC(member) && path159.endsWith(".init()")) ? "override " : "";
|
|
15663
15710
|
const head = `${indent2}${attrs}${access(member, context.openOwner)} ${required ? "required " : ""}${final}${override}${mutating}`;
|
|
15664
|
-
const measured = behavior.get(
|
|
15665
|
-
if (measured) used.add(
|
|
15711
|
+
const measured = behavior.get(path159);
|
|
15712
|
+
if (measured) used.add(path159);
|
|
15666
15713
|
const overloadBody = /\basync\b/.test(core) ? measured?.asyncBody : /\bResult</.test(core) ? measured?.resultBody : void 0;
|
|
15667
|
-
const body = overloadBody ?? measured?.body ?? (options2.inert ? inertBody(member) : trap(
|
|
15714
|
+
const body = overloadBody ?? measured?.body ?? (options2.inert ? inertBody(member) : trap(path159));
|
|
15668
15715
|
switch (member.kind.identifier) {
|
|
15669
15716
|
case "swift.property":
|
|
15670
15717
|
case "swift.type.property":
|
|
@@ -15677,13 +15724,13 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15677
15724
|
const parameter = !measured && !options2.inert && !settable && /:\s*some\s/.test(decl) ? opaqueParameter(member) : void 0;
|
|
15678
15725
|
const getter = parameter ? `return ({ () -> ${parameter} in ${body} })()` : body;
|
|
15679
15726
|
const computed = decl.replace(/^((?:static |class )*)let /, "$1var ");
|
|
15680
|
-
const wrapper = options2.projections?.get(
|
|
15727
|
+
const wrapper = options2.projections?.get(path159);
|
|
15681
15728
|
if (wrapper) {
|
|
15682
15729
|
const type = /^var\s+`?\w+`?\s*:\s*(.+)$/s.exec(computed)?.[1];
|
|
15683
|
-
const initial = type && inertValue(type, /* @__PURE__ */ new Set(), [
|
|
15730
|
+
const initial = type && inertValue(type, /* @__PURE__ */ new Set(), [path159]);
|
|
15684
15731
|
if (!initial)
|
|
15685
15732
|
return void skipped.push({
|
|
15686
|
-
path:
|
|
15733
|
+
path: path159,
|
|
15687
15734
|
reason: `wrapped by ${wrapper} with no inert initial value`
|
|
15688
15735
|
});
|
|
15689
15736
|
const own2 = new RegExp(
|
|
@@ -15704,7 +15751,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15704
15751
|
return;
|
|
15705
15752
|
}
|
|
15706
15753
|
emit(
|
|
15707
|
-
`${head.replace(/@NSCopying\b\s*/g, "")}${computed} { get${effects} { ${getter} }${settable && !effects ? ` ${parsed2.nonmutating ? "nonmutating " : ""}set { ${measured?.set ?? (options2.inert ? "" : trap(
|
|
15754
|
+
`${head.replace(/@NSCopying\b\s*/g, "")}${computed} { get${effects} { ${getter} }${settable && !effects ? ` ${parsed2.nonmutating ? "nonmutating " : ""}set { ${measured?.set ?? (options2.inert ? "" : trap(path159))} }` : ""} }`
|
|
15708
15755
|
);
|
|
15709
15756
|
return;
|
|
15710
15757
|
}
|
|
@@ -15763,7 +15810,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15763
15810
|
};
|
|
15764
15811
|
const emitType = scoped(
|
|
15765
15812
|
(symbol2, indent2) => {
|
|
15766
|
-
const
|
|
15813
|
+
const path159 = pathOf(symbol2);
|
|
15767
15814
|
const id = symbol2.identifier.precise;
|
|
15768
15815
|
const inner = `${indent2} `;
|
|
15769
15816
|
switch (symbol2.kind.identifier) {
|
|
@@ -15780,10 +15827,10 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15780
15827
|
case "swift.class": {
|
|
15781
15828
|
const shape = header(symbol2, "class", indent2);
|
|
15782
15829
|
if (!shape)
|
|
15783
|
-
return void skipped.push({ path:
|
|
15784
|
-
const parent = options2.superclasses?.get(
|
|
15830
|
+
return void skipped.push({ path: path159, reason: `unparsed class ${text2(symbol2)}` });
|
|
15831
|
+
const parent = options2.superclasses?.get(path159) ?? superclass.get(id);
|
|
15785
15832
|
const blocked = classBlocked(id);
|
|
15786
|
-
if (blocked) return void skipped.push({ path:
|
|
15833
|
+
if (blocked) return void skipped.push({ path: path159, reason: blocked });
|
|
15787
15834
|
const ancestors = /* @__PURE__ */ new Set();
|
|
15788
15835
|
const inherited = /* @__PURE__ */ new Set();
|
|
15789
15836
|
for (let at = superId.get(id); at; at = superId.get(at)) {
|
|
@@ -15799,7 +15846,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15799
15846
|
"Equatable",
|
|
15800
15847
|
"CustomStringConvertible",
|
|
15801
15848
|
"CustomDebugStringConvertible"
|
|
15802
|
-
].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options2.unconformed?.get(
|
|
15849
|
+
].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options2.unconformed?.get(path159)?.has(name3.split(/::|\./).pop()) && !options2.unconformed?.get(path159)?.has(name3)
|
|
15803
15850
|
)
|
|
15804
15851
|
].filter((name3, at, all2) => all2.indexOf(name3) === at);
|
|
15805
15852
|
const parentSymbol = superId.has(id) ? byId.get(superId.get(id)) : void 0;
|
|
@@ -15811,9 +15858,9 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15811
15858
|
`${indent2}${shape.attrs}${objcName ? `@objc(${objcName}) ` : ""}${shape.final}${open ? "open" : "public"} class ${shape.name}${shape.generics}${list2.length ? `: ${list2.join(", ")}` : ""}${selfConforming(shape.where)} {`
|
|
15812
15859
|
);
|
|
15813
15860
|
const members2 = membersOf(id);
|
|
15814
|
-
const extra = options2.behavior?.get(
|
|
15861
|
+
const extra = options2.behavior?.get(path159)?.members;
|
|
15815
15862
|
if (extra) {
|
|
15816
|
-
used.add(
|
|
15863
|
+
used.add(path159);
|
|
15817
15864
|
emit(`${inner}${extra}`);
|
|
15818
15865
|
}
|
|
15819
15866
|
for (const member of members2)
|
|
@@ -15869,11 +15916,11 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15869
15916
|
if (protocol && member.kind.identifier === "swift.method" && leaf(member).endsWith("()") && have.has(`instance|leaf|${leaf(member).slice(0, -2)}`))
|
|
15870
15917
|
propertyWitnesses.push({
|
|
15871
15918
|
owner: current2,
|
|
15872
|
-
head: `extension ${pathOf(protocol)} where Self: ${
|
|
15919
|
+
head: `extension ${pathOf(protocol)} where Self: ${path159} {`,
|
|
15873
15920
|
member,
|
|
15874
|
-
path:
|
|
15921
|
+
path: path159
|
|
15875
15922
|
});
|
|
15876
|
-
else emitWitness(member, inner,
|
|
15923
|
+
else emitWitness(member, inner, path159, open && isObjC(member));
|
|
15877
15924
|
}
|
|
15878
15925
|
}
|
|
15879
15926
|
if (options2.inert && designated2 && classBuild(id) === "hidden")
|
|
@@ -15881,13 +15928,13 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15881
15928
|
const coder = members2.some((member) => leaf(member) === "init(coder:)");
|
|
15882
15929
|
if (designated2 && !coder && externalRoot(id) !== "NSObject" && externalRoot(id) !== null)
|
|
15883
15930
|
emit(
|
|
15884
|
-
`${inner}public required init${options2.coderNonfailable?.has(
|
|
15931
|
+
`${inner}public required init${options2.coderNonfailable?.has(path159) ? "" : "?"}(coder: NSCoder) { ${options2.inert && !options2.coderNonfailable?.has(path159) ? "return nil" : trap(`${path159}.init(coder:)`)} }`
|
|
15885
15932
|
);
|
|
15886
15933
|
if (designated2 && !members2.some((member) => leaf(member) === "init()") && [...superChain(id)].some(
|
|
15887
15934
|
(at) => options2.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
|
|
15888
15935
|
))
|
|
15889
15936
|
emit(
|
|
15890
|
-
`${inner}public required init() { ${options2.inert ? superInit(id) : trap(`${
|
|
15937
|
+
`${inner}public required init() { ${options2.inert ? superInit(id) : trap(`${path159}.init()`)} }`
|
|
15891
15938
|
);
|
|
15892
15939
|
emit(`${indent2}}`);
|
|
15893
15940
|
return;
|
|
@@ -15895,7 +15942,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15895
15942
|
case "swift.struct": {
|
|
15896
15943
|
const shape = header(symbol2, "struct", indent2);
|
|
15897
15944
|
if (!shape)
|
|
15898
|
-
return void skipped.push({ path:
|
|
15945
|
+
return void skipped.push({ path: path159, reason: `unparsed struct ${text2(symbol2)}` });
|
|
15899
15946
|
const members2 = membersOf(id);
|
|
15900
15947
|
const raw2 = rawType(members2);
|
|
15901
15948
|
const list2 = inheritance(id);
|
|
@@ -15935,7 +15982,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15935
15982
|
emitInertState(
|
|
15936
15983
|
id,
|
|
15937
15984
|
inner,
|
|
15938
|
-
raw2 ? `self.rawValue = ${inertValue(raw2, /* @__PURE__ */ new Set(), [
|
|
15985
|
+
raw2 ? `self.rawValue = ${inertValue(raw2, /* @__PURE__ */ new Set(), [path159]) ?? "0"}` : ""
|
|
15939
15986
|
);
|
|
15940
15987
|
emit(`${indent2}}`);
|
|
15941
15988
|
return;
|
|
@@ -15943,7 +15990,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15943
15990
|
case "swift.enum": {
|
|
15944
15991
|
const shape = header(symbol2, "enum", indent2);
|
|
15945
15992
|
if (!shape)
|
|
15946
|
-
return void skipped.push({ path:
|
|
15993
|
+
return void skipped.push({ path: path159, reason: `unparsed enum ${text2(symbol2)}` });
|
|
15947
15994
|
const members2 = membersOf(id);
|
|
15948
15995
|
const cases = members2.filter(
|
|
15949
15996
|
(member) => member.kind.identifier === "swift.enum.case"
|
|
@@ -15953,7 +16000,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15953
16000
|
const missing2 = raw2 ? cases.filter((member) => !values.has(member.identifier.precise)) : [];
|
|
15954
16001
|
if (raw2 && (isObjC(symbol2) || /^c:@C?M@[^@]+@E@/.test(id)) && missing2.length > 0)
|
|
15955
16002
|
return void skipped.push({
|
|
15956
|
-
path:
|
|
16003
|
+
path: path159,
|
|
15957
16004
|
reason: `no header value for ${missing2.map(leaf).join(", ")}`
|
|
15958
16005
|
});
|
|
15959
16006
|
const list2 = inheritance(id, raw2 ?? void 0).filter(
|
|
@@ -15992,8 +16039,8 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
15992
16039
|
});
|
|
15993
16040
|
}
|
|
15994
16041
|
if (options2.inert) {
|
|
15995
|
-
const value = options2.trapped?.has(hiddenInit(id)) ? null : inertValue(
|
|
15996
|
-
emitInertState(id, inner, value === null ? trap(
|
|
16042
|
+
const value = options2.trapped?.has(hiddenInit(id)) ? null : inertValue(path159, /* @__PURE__ */ new Set(), []);
|
|
16043
|
+
emitInertState(id, inner, value === null ? trap(path159) : `self = ${value}`);
|
|
15997
16044
|
}
|
|
15998
16045
|
emit(`${indent2}}`);
|
|
15999
16046
|
return;
|
|
@@ -16002,14 +16049,14 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
16002
16049
|
const shape = header(symbol2, "protocol", indent2);
|
|
16003
16050
|
if (!shape)
|
|
16004
16051
|
return void skipped.push({
|
|
16005
|
-
path:
|
|
16052
|
+
path: path159,
|
|
16006
16053
|
reason: `unparsed protocol ${text2(symbol2)}`
|
|
16007
16054
|
});
|
|
16008
16055
|
const native = nativeObjcProtocols.has(id);
|
|
16009
16056
|
const objcName = native ? /^c:objc\(pl\)(\w+)$/.exec(id)?.[1] : void 0;
|
|
16010
16057
|
if (native && !objcName)
|
|
16011
16058
|
return void skipped.push({
|
|
16012
|
-
path:
|
|
16059
|
+
path: path159,
|
|
16013
16060
|
reason: `unknown Objective-C protocol identity ${id}`
|
|
16014
16061
|
});
|
|
16015
16062
|
const list2 = [
|
|
@@ -16037,7 +16084,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
16037
16084
|
}
|
|
16038
16085
|
emit(`${indent2}}`);
|
|
16039
16086
|
if (defaults.length > 0) {
|
|
16040
|
-
emit(`${indent2}extension ${
|
|
16087
|
+
emit(`${indent2}extension ${path159} {`);
|
|
16041
16088
|
for (const member of defaults) {
|
|
16042
16089
|
const decl = text2(member);
|
|
16043
16090
|
if (optional3.has(member.identifier.precise) && member.kind.identifier === "swift.method" && !decl.replace(/\([^)]*\)/g, "").includes("->") && !/ async\b/.test(decl))
|
|
@@ -16131,7 +16178,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
16131
16178
|
return null;
|
|
16132
16179
|
};
|
|
16133
16180
|
const emitGlobal = scoped((symbol2) => {
|
|
16134
|
-
const
|
|
16181
|
+
const path159 = pathOf(symbol2);
|
|
16135
16182
|
const kind = symbol2.kind.identifier;
|
|
16136
16183
|
if (kind === "swift.func" || kind === "swift.func.op" || kind === "swift.method" || kind === "swift.type.method") {
|
|
16137
16184
|
const { 1: attrs, 2: rest } = LEADING_ATTRS.exec(text2(symbol2));
|
|
@@ -16140,20 +16187,20 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
16140
16187
|
if (leaf(symbol2).endsWith("(_:)") && !/^(?:prefix|infix|postfix)\b/.test(spelled2))
|
|
16141
16188
|
spelled2 = `prefix ${spelled2}`;
|
|
16142
16189
|
}
|
|
16143
|
-
const measured = behavior.get(
|
|
16144
|
-
if (measured) used.add(
|
|
16190
|
+
const measured = behavior.get(path159);
|
|
16191
|
+
if (measured) used.add(path159);
|
|
16145
16192
|
const overloadBody = /\basync\b/.test(spelled2) ? measured?.asyncBody : /\bResult</.test(spelled2) ? measured?.resultBody : void 0;
|
|
16146
16193
|
emit(
|
|
16147
|
-
`${attrs}public ${spelled2} { ${overloadBody ?? measured?.body ?? (options2.inert ? inertBody(symbol2) : trap(
|
|
16194
|
+
`${attrs}public ${spelled2} { ${overloadBody ?? measured?.body ?? (options2.inert ? inertBody(symbol2) : trap(path159))} }`
|
|
16148
16195
|
);
|
|
16149
16196
|
} else if (kind === "swift.var") {
|
|
16150
16197
|
const parsed2 = splitAccessors(text2(symbol2).replace(/^let /, "var "));
|
|
16151
|
-
const measured = behavior.get(
|
|
16152
|
-
if (measured) used.add(
|
|
16198
|
+
const measured = behavior.get(path159);
|
|
16199
|
+
if (measured) used.add(path159);
|
|
16153
16200
|
emit(
|
|
16154
|
-
`public ${parsed2.decl} { ${measured?.body ?? (options2.inert ? inertBody(symbol2) : trap(
|
|
16201
|
+
`public ${parsed2.decl} { ${measured?.body ?? (options2.inert ? inertBody(symbol2) : trap(path159))} }`
|
|
16155
16202
|
);
|
|
16156
|
-
} else skipped.push({ path:
|
|
16203
|
+
} else skipped.push({ path: path159, reason: `unhandled top-level ${kind}` });
|
|
16157
16204
|
});
|
|
16158
16205
|
const cExports = new Set(
|
|
16159
16206
|
[...byId.values()].flatMap((symbol2) => {
|
|
@@ -16170,7 +16217,7 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
16170
16217
|
return !name3 || !cExports.has(`${name3}|${text2(symbol2)}`);
|
|
16171
16218
|
}).sort((a, b) => pathOf(a).localeCompare(pathOf(b)));
|
|
16172
16219
|
for (const symbol2 of roots) {
|
|
16173
|
-
const
|
|
16220
|
+
const path159 = pathOf(symbol2);
|
|
16174
16221
|
if (TYPE_KINDS.has(symbol2.kind.identifier)) emitType(symbol2, "");
|
|
16175
16222
|
else emitGlobal(symbol2);
|
|
16176
16223
|
}
|
|
@@ -16250,9 +16297,9 @@ function emitSwiftStandin(sourceGraphs, options2) {
|
|
|
16250
16297
|
"#endif",
|
|
16251
16298
|
""
|
|
16252
16299
|
];
|
|
16253
|
-
for (const
|
|
16254
|
-
if (!used.has(
|
|
16255
|
-
skipped.push({ path:
|
|
16300
|
+
for (const path159 of behavior.keys())
|
|
16301
|
+
if (!used.has(path159))
|
|
16302
|
+
skipped.push({ path: path159, reason: "behavior names no emitted declaration" });
|
|
16256
16303
|
return {
|
|
16257
16304
|
source: `${[...banner, ...lines].join("\n")}
|
|
16258
16305
|
`,
|
|
@@ -21744,17 +21791,17 @@ function visit(node, visitor) {
|
|
|
21744
21791
|
} else
|
|
21745
21792
|
visit_(null, node, visitor_, Object.freeze([]));
|
|
21746
21793
|
}
|
|
21747
|
-
function visit_(key2, node, visitor,
|
|
21748
|
-
const ctrl = callVisitor(key2, node, visitor,
|
|
21794
|
+
function visit_(key2, node, visitor, path159) {
|
|
21795
|
+
const ctrl = callVisitor(key2, node, visitor, path159);
|
|
21749
21796
|
if (isNode2(ctrl) || isPair(ctrl)) {
|
|
21750
|
-
replaceNode(key2,
|
|
21751
|
-
return visit_(key2, ctrl, visitor,
|
|
21797
|
+
replaceNode(key2, path159, ctrl);
|
|
21798
|
+
return visit_(key2, ctrl, visitor, path159);
|
|
21752
21799
|
}
|
|
21753
21800
|
if (typeof ctrl !== "symbol") {
|
|
21754
21801
|
if (isCollection(node)) {
|
|
21755
|
-
|
|
21802
|
+
path159 = Object.freeze(path159.concat(node));
|
|
21756
21803
|
for (let i = 0; i < node.items.length; ++i) {
|
|
21757
|
-
const ci = visit_(i, node.items[i], visitor,
|
|
21804
|
+
const ci = visit_(i, node.items[i], visitor, path159);
|
|
21758
21805
|
if (typeof ci === "number")
|
|
21759
21806
|
i = ci - 1;
|
|
21760
21807
|
else if (ci === BREAK)
|
|
@@ -21765,13 +21812,13 @@ function visit_(key2, node, visitor, path158) {
|
|
|
21765
21812
|
}
|
|
21766
21813
|
}
|
|
21767
21814
|
} else if (isPair(node)) {
|
|
21768
|
-
|
|
21769
|
-
const ck = visit_("key", node.key, visitor,
|
|
21815
|
+
path159 = Object.freeze(path159.concat(node));
|
|
21816
|
+
const ck = visit_("key", node.key, visitor, path159);
|
|
21770
21817
|
if (ck === BREAK)
|
|
21771
21818
|
return BREAK;
|
|
21772
21819
|
else if (ck === REMOVE)
|
|
21773
21820
|
node.key = null;
|
|
21774
|
-
const cv = visit_("value", node.value, visitor,
|
|
21821
|
+
const cv = visit_("value", node.value, visitor, path159);
|
|
21775
21822
|
if (cv === BREAK)
|
|
21776
21823
|
return BREAK;
|
|
21777
21824
|
else if (cv === REMOVE)
|
|
@@ -21789,17 +21836,17 @@ async function visitAsync(node, visitor) {
|
|
|
21789
21836
|
} else
|
|
21790
21837
|
await visitAsync_(null, node, visitor_, Object.freeze([]));
|
|
21791
21838
|
}
|
|
21792
|
-
async function visitAsync_(key2, node, visitor,
|
|
21793
|
-
const ctrl = await callVisitor(key2, node, visitor,
|
|
21839
|
+
async function visitAsync_(key2, node, visitor, path159) {
|
|
21840
|
+
const ctrl = await callVisitor(key2, node, visitor, path159);
|
|
21794
21841
|
if (isNode2(ctrl) || isPair(ctrl)) {
|
|
21795
|
-
replaceNode(key2,
|
|
21796
|
-
return visitAsync_(key2, ctrl, visitor,
|
|
21842
|
+
replaceNode(key2, path159, ctrl);
|
|
21843
|
+
return visitAsync_(key2, ctrl, visitor, path159);
|
|
21797
21844
|
}
|
|
21798
21845
|
if (typeof ctrl !== "symbol") {
|
|
21799
21846
|
if (isCollection(node)) {
|
|
21800
|
-
|
|
21847
|
+
path159 = Object.freeze(path159.concat(node));
|
|
21801
21848
|
for (let i = 0; i < node.items.length; ++i) {
|
|
21802
|
-
const ci = await visitAsync_(i, node.items[i], visitor,
|
|
21849
|
+
const ci = await visitAsync_(i, node.items[i], visitor, path159);
|
|
21803
21850
|
if (typeof ci === "number")
|
|
21804
21851
|
i = ci - 1;
|
|
21805
21852
|
else if (ci === BREAK)
|
|
@@ -21810,13 +21857,13 @@ async function visitAsync_(key2, node, visitor, path158) {
|
|
|
21810
21857
|
}
|
|
21811
21858
|
}
|
|
21812
21859
|
} else if (isPair(node)) {
|
|
21813
|
-
|
|
21814
|
-
const ck = await visitAsync_("key", node.key, visitor,
|
|
21860
|
+
path159 = Object.freeze(path159.concat(node));
|
|
21861
|
+
const ck = await visitAsync_("key", node.key, visitor, path159);
|
|
21815
21862
|
if (ck === BREAK)
|
|
21816
21863
|
return BREAK;
|
|
21817
21864
|
else if (ck === REMOVE)
|
|
21818
21865
|
node.key = null;
|
|
21819
|
-
const cv = await visitAsync_("value", node.value, visitor,
|
|
21866
|
+
const cv = await visitAsync_("value", node.value, visitor, path159);
|
|
21820
21867
|
if (cv === BREAK)
|
|
21821
21868
|
return BREAK;
|
|
21822
21869
|
else if (cv === REMOVE)
|
|
@@ -21843,23 +21890,23 @@ function initVisitor(visitor) {
|
|
|
21843
21890
|
}
|
|
21844
21891
|
return visitor;
|
|
21845
21892
|
}
|
|
21846
|
-
function callVisitor(key2, node, visitor,
|
|
21893
|
+
function callVisitor(key2, node, visitor, path159) {
|
|
21847
21894
|
if (typeof visitor === "function")
|
|
21848
|
-
return visitor(key2, node,
|
|
21895
|
+
return visitor(key2, node, path159);
|
|
21849
21896
|
if (isMap(node))
|
|
21850
|
-
return visitor.Map?.(key2, node,
|
|
21897
|
+
return visitor.Map?.(key2, node, path159);
|
|
21851
21898
|
if (isSeq(node))
|
|
21852
|
-
return visitor.Seq?.(key2, node,
|
|
21899
|
+
return visitor.Seq?.(key2, node, path159);
|
|
21853
21900
|
if (isPair(node))
|
|
21854
|
-
return visitor.Pair?.(key2, node,
|
|
21901
|
+
return visitor.Pair?.(key2, node, path159);
|
|
21855
21902
|
if (isScalar(node))
|
|
21856
|
-
return visitor.Scalar?.(key2, node,
|
|
21903
|
+
return visitor.Scalar?.(key2, node, path159);
|
|
21857
21904
|
if (isAlias(node))
|
|
21858
|
-
return visitor.Alias?.(key2, node,
|
|
21905
|
+
return visitor.Alias?.(key2, node, path159);
|
|
21859
21906
|
return void 0;
|
|
21860
21907
|
}
|
|
21861
|
-
function replaceNode(key2,
|
|
21862
|
-
const parent =
|
|
21908
|
+
function replaceNode(key2, path159, node) {
|
|
21909
|
+
const parent = path159[path159.length - 1];
|
|
21863
21910
|
if (isCollection(parent)) {
|
|
21864
21911
|
parent.items[key2] = node;
|
|
21865
21912
|
} else if (isPair(parent)) {
|
|
@@ -22459,10 +22506,10 @@ var init_createNode = __esm({
|
|
|
22459
22506
|
});
|
|
22460
22507
|
|
|
22461
22508
|
// ../../node_modules/yaml/browser/dist/nodes/Collection.js
|
|
22462
|
-
function collectionFromPath(schema4,
|
|
22509
|
+
function collectionFromPath(schema4, path159, value) {
|
|
22463
22510
|
let v10 = value;
|
|
22464
|
-
for (let i =
|
|
22465
|
-
const k =
|
|
22511
|
+
for (let i = path159.length - 1; i >= 0; --i) {
|
|
22512
|
+
const k = path159[i];
|
|
22466
22513
|
if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
|
|
22467
22514
|
const a = [];
|
|
22468
22515
|
a[k] = v10;
|
|
@@ -22487,7 +22534,7 @@ var init_Collection = __esm({
|
|
|
22487
22534
|
init_createNode();
|
|
22488
22535
|
init_identity();
|
|
22489
22536
|
init_Node();
|
|
22490
|
-
isEmptyPath = (
|
|
22537
|
+
isEmptyPath = (path159) => path159 == null || typeof path159 === "object" && !!path159[Symbol.iterator]().next().done;
|
|
22491
22538
|
Collection = class extends NodeBase {
|
|
22492
22539
|
constructor(type, schema4) {
|
|
22493
22540
|
super(type);
|
|
@@ -22517,11 +22564,11 @@ var init_Collection = __esm({
|
|
|
22517
22564
|
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
22518
22565
|
* that already exists in the map.
|
|
22519
22566
|
*/
|
|
22520
|
-
addIn(
|
|
22521
|
-
if (isEmptyPath(
|
|
22567
|
+
addIn(path159, value) {
|
|
22568
|
+
if (isEmptyPath(path159))
|
|
22522
22569
|
this.add(value);
|
|
22523
22570
|
else {
|
|
22524
|
-
const [key2, ...rest] =
|
|
22571
|
+
const [key2, ...rest] = path159;
|
|
22525
22572
|
const node = this.get(key2, true);
|
|
22526
22573
|
if (isCollection(node))
|
|
22527
22574
|
node.addIn(rest, value);
|
|
@@ -22535,8 +22582,8 @@ var init_Collection = __esm({
|
|
|
22535
22582
|
* Removes a value from the collection.
|
|
22536
22583
|
* @returns `true` if the item was found and removed.
|
|
22537
22584
|
*/
|
|
22538
|
-
deleteIn(
|
|
22539
|
-
const [key2, ...rest] =
|
|
22585
|
+
deleteIn(path159) {
|
|
22586
|
+
const [key2, ...rest] = path159;
|
|
22540
22587
|
if (rest.length === 0)
|
|
22541
22588
|
return this.delete(key2);
|
|
22542
22589
|
const node = this.get(key2, true);
|
|
@@ -22550,8 +22597,8 @@ var init_Collection = __esm({
|
|
|
22550
22597
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
22551
22598
|
* `true` (collections are always returned intact).
|
|
22552
22599
|
*/
|
|
22553
|
-
getIn(
|
|
22554
|
-
const [key2, ...rest] =
|
|
22600
|
+
getIn(path159, keepScalar) {
|
|
22601
|
+
const [key2, ...rest] = path159;
|
|
22555
22602
|
const node = this.get(key2, true);
|
|
22556
22603
|
if (rest.length === 0)
|
|
22557
22604
|
return !keepScalar && isScalar(node) ? node.value : node;
|
|
@@ -22569,8 +22616,8 @@ var init_Collection = __esm({
|
|
|
22569
22616
|
/**
|
|
22570
22617
|
* Checks if the collection includes a value with the key `key`.
|
|
22571
22618
|
*/
|
|
22572
|
-
hasIn(
|
|
22573
|
-
const [key2, ...rest] =
|
|
22619
|
+
hasIn(path159) {
|
|
22620
|
+
const [key2, ...rest] = path159;
|
|
22574
22621
|
if (rest.length === 0)
|
|
22575
22622
|
return this.has(key2);
|
|
22576
22623
|
const node = this.get(key2, true);
|
|
@@ -22580,8 +22627,8 @@ var init_Collection = __esm({
|
|
|
22580
22627
|
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
22581
22628
|
* boolean to add/remove the item from the set.
|
|
22582
22629
|
*/
|
|
22583
|
-
setIn(
|
|
22584
|
-
const [key2, ...rest] =
|
|
22630
|
+
setIn(path159, value) {
|
|
22631
|
+
const [key2, ...rest] = path159;
|
|
22585
22632
|
if (rest.length === 0) {
|
|
22586
22633
|
this.set(key2, value);
|
|
22587
22634
|
} else {
|
|
@@ -25015,9 +25062,9 @@ var init_Document = __esm({
|
|
|
25015
25062
|
this.contents.add(value);
|
|
25016
25063
|
}
|
|
25017
25064
|
/** Adds a value to the document. */
|
|
25018
|
-
addIn(
|
|
25065
|
+
addIn(path159, value) {
|
|
25019
25066
|
if (assertCollection(this.contents))
|
|
25020
|
-
this.contents.addIn(
|
|
25067
|
+
this.contents.addIn(path159, value);
|
|
25021
25068
|
}
|
|
25022
25069
|
/**
|
|
25023
25070
|
* Create a new `Alias` node, ensuring that the target `node` has the required anchor.
|
|
@@ -25092,14 +25139,14 @@ var init_Document = __esm({
|
|
|
25092
25139
|
* Removes a value from the document.
|
|
25093
25140
|
* @returns `true` if the item was found and removed.
|
|
25094
25141
|
*/
|
|
25095
|
-
deleteIn(
|
|
25096
|
-
if (isEmptyPath(
|
|
25142
|
+
deleteIn(path159) {
|
|
25143
|
+
if (isEmptyPath(path159)) {
|
|
25097
25144
|
if (this.contents == null)
|
|
25098
25145
|
return false;
|
|
25099
25146
|
this.contents = null;
|
|
25100
25147
|
return true;
|
|
25101
25148
|
}
|
|
25102
|
-
return assertCollection(this.contents) ? this.contents.deleteIn(
|
|
25149
|
+
return assertCollection(this.contents) ? this.contents.deleteIn(path159) : false;
|
|
25103
25150
|
}
|
|
25104
25151
|
/**
|
|
25105
25152
|
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
@@ -25114,10 +25161,10 @@ var init_Document = __esm({
|
|
|
25114
25161
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
25115
25162
|
* `true` (collections are always returned intact).
|
|
25116
25163
|
*/
|
|
25117
|
-
getIn(
|
|
25118
|
-
if (isEmptyPath(
|
|
25164
|
+
getIn(path159, keepScalar) {
|
|
25165
|
+
if (isEmptyPath(path159))
|
|
25119
25166
|
return !keepScalar && isScalar(this.contents) ? this.contents.value : this.contents;
|
|
25120
|
-
return isCollection(this.contents) ? this.contents.getIn(
|
|
25167
|
+
return isCollection(this.contents) ? this.contents.getIn(path159, keepScalar) : void 0;
|
|
25121
25168
|
}
|
|
25122
25169
|
/**
|
|
25123
25170
|
* Checks if the document includes a value with the key `key`.
|
|
@@ -25128,10 +25175,10 @@ var init_Document = __esm({
|
|
|
25128
25175
|
/**
|
|
25129
25176
|
* Checks if the document includes a value at `path`.
|
|
25130
25177
|
*/
|
|
25131
|
-
hasIn(
|
|
25132
|
-
if (isEmptyPath(
|
|
25178
|
+
hasIn(path159) {
|
|
25179
|
+
if (isEmptyPath(path159))
|
|
25133
25180
|
return this.contents !== void 0;
|
|
25134
|
-
return isCollection(this.contents) ? this.contents.hasIn(
|
|
25181
|
+
return isCollection(this.contents) ? this.contents.hasIn(path159) : false;
|
|
25135
25182
|
}
|
|
25136
25183
|
/**
|
|
25137
25184
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
@@ -25148,13 +25195,13 @@ var init_Document = __esm({
|
|
|
25148
25195
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
25149
25196
|
* boolean to add/remove the item from the set.
|
|
25150
25197
|
*/
|
|
25151
|
-
setIn(
|
|
25152
|
-
if (isEmptyPath(
|
|
25198
|
+
setIn(path159, value) {
|
|
25199
|
+
if (isEmptyPath(path159)) {
|
|
25153
25200
|
this.contents = value;
|
|
25154
25201
|
} else if (this.contents == null) {
|
|
25155
|
-
this.contents = collectionFromPath(this.schema, Array.from(
|
|
25202
|
+
this.contents = collectionFromPath(this.schema, Array.from(path159), value);
|
|
25156
25203
|
} else if (assertCollection(this.contents)) {
|
|
25157
|
-
this.contents.setIn(
|
|
25204
|
+
this.contents.setIn(path159, value);
|
|
25158
25205
|
}
|
|
25159
25206
|
}
|
|
25160
25207
|
/**
|
|
@@ -27059,15 +27106,15 @@ function visit2(cst, visitor) {
|
|
|
27059
27106
|
cst = { start: cst.start, value: cst.value };
|
|
27060
27107
|
_visit(Object.freeze([]), cst, visitor);
|
|
27061
27108
|
}
|
|
27062
|
-
function _visit(
|
|
27063
|
-
let ctrl = visitor(item,
|
|
27109
|
+
function _visit(path159, item, visitor) {
|
|
27110
|
+
let ctrl = visitor(item, path159);
|
|
27064
27111
|
if (typeof ctrl === "symbol")
|
|
27065
27112
|
return ctrl;
|
|
27066
27113
|
for (const field of ["key", "value"]) {
|
|
27067
27114
|
const token = item[field];
|
|
27068
27115
|
if (token && "items" in token) {
|
|
27069
27116
|
for (let i = 0; i < token.items.length; ++i) {
|
|
27070
|
-
const ci = _visit(Object.freeze(
|
|
27117
|
+
const ci = _visit(Object.freeze(path159.concat([[field, i]])), token.items[i], visitor);
|
|
27071
27118
|
if (typeof ci === "number")
|
|
27072
27119
|
i = ci - 1;
|
|
27073
27120
|
else if (ci === BREAK2)
|
|
@@ -27078,10 +27125,10 @@ function _visit(path158, item, visitor) {
|
|
|
27078
27125
|
}
|
|
27079
27126
|
}
|
|
27080
27127
|
if (typeof ctrl === "function" && field === "key")
|
|
27081
|
-
ctrl = ctrl(item,
|
|
27128
|
+
ctrl = ctrl(item, path159);
|
|
27082
27129
|
}
|
|
27083
27130
|
}
|
|
27084
|
-
return typeof ctrl === "function" ? ctrl(item,
|
|
27131
|
+
return typeof ctrl === "function" ? ctrl(item, path159) : ctrl;
|
|
27085
27132
|
}
|
|
27086
27133
|
var BREAK2, SKIP2, REMOVE2;
|
|
27087
27134
|
var init_cst_visit = __esm({
|
|
@@ -27092,9 +27139,9 @@ var init_cst_visit = __esm({
|
|
|
27092
27139
|
visit2.BREAK = BREAK2;
|
|
27093
27140
|
visit2.SKIP = SKIP2;
|
|
27094
27141
|
visit2.REMOVE = REMOVE2;
|
|
27095
|
-
visit2.itemAtPath = (cst,
|
|
27142
|
+
visit2.itemAtPath = (cst, path159) => {
|
|
27096
27143
|
let item = cst;
|
|
27097
|
-
for (const [field, index] of
|
|
27144
|
+
for (const [field, index] of path159) {
|
|
27098
27145
|
const tok = item?.[field];
|
|
27099
27146
|
if (tok && "items" in tok) {
|
|
27100
27147
|
item = tok.items[index];
|
|
@@ -27103,9 +27150,9 @@ var init_cst_visit = __esm({
|
|
|
27103
27150
|
}
|
|
27104
27151
|
return item;
|
|
27105
27152
|
};
|
|
27106
|
-
visit2.parentCollection = (cst,
|
|
27107
|
-
const parent = visit2.itemAtPath(cst,
|
|
27108
|
-
const field =
|
|
27153
|
+
visit2.parentCollection = (cst, path159) => {
|
|
27154
|
+
const parent = visit2.itemAtPath(cst, path159.slice(0, -1));
|
|
27155
|
+
const field = path159[path159.length - 1][0];
|
|
27109
27156
|
const coll = parent?.[field];
|
|
27110
27157
|
if (coll && "items" in coll)
|
|
27111
27158
|
return coll;
|
|
@@ -28408,14 +28455,14 @@ var init_parser = __esm({
|
|
|
28408
28455
|
case "scalar":
|
|
28409
28456
|
case "single-quoted-scalar":
|
|
28410
28457
|
case "double-quoted-scalar": {
|
|
28411
|
-
const
|
|
28458
|
+
const fs121 = this.flowScalar(this.type);
|
|
28412
28459
|
if (atNextItem || it.value) {
|
|
28413
|
-
map2.items.push({ start, key:
|
|
28460
|
+
map2.items.push({ start, key: fs121, sep: [] });
|
|
28414
28461
|
this.onKeyLine = true;
|
|
28415
28462
|
} else if (it.sep) {
|
|
28416
|
-
this.stack.push(
|
|
28463
|
+
this.stack.push(fs121);
|
|
28417
28464
|
} else {
|
|
28418
|
-
Object.assign(it, { key:
|
|
28465
|
+
Object.assign(it, { key: fs121, sep: [] });
|
|
28419
28466
|
this.onKeyLine = true;
|
|
28420
28467
|
}
|
|
28421
28468
|
return;
|
|
@@ -28543,13 +28590,13 @@ var init_parser = __esm({
|
|
|
28543
28590
|
case "scalar":
|
|
28544
28591
|
case "single-quoted-scalar":
|
|
28545
28592
|
case "double-quoted-scalar": {
|
|
28546
|
-
const
|
|
28593
|
+
const fs121 = this.flowScalar(this.type);
|
|
28547
28594
|
if (!it || it.value)
|
|
28548
|
-
fc.items.push({ start: [], key:
|
|
28595
|
+
fc.items.push({ start: [], key: fs121, sep: [] });
|
|
28549
28596
|
else if (it.sep)
|
|
28550
|
-
this.stack.push(
|
|
28597
|
+
this.stack.push(fs121);
|
|
28551
28598
|
else
|
|
28552
|
-
Object.assign(it, { key:
|
|
28599
|
+
Object.assign(it, { key: fs121, sep: [] });
|
|
28553
28600
|
return;
|
|
28554
28601
|
}
|
|
28555
28602
|
case "flow-map-end":
|
|
@@ -28989,8 +29036,8 @@ function metadataValue(value, key2) {
|
|
|
28989
29036
|
if (!value || typeof value !== "object") return void 0;
|
|
28990
29037
|
return Object.getOwnPropertyDescriptor(value, key2)?.value;
|
|
28991
29038
|
}
|
|
28992
|
-
function readProjectJson(
|
|
28993
|
-
const text7 = readProjectMetadata(
|
|
29039
|
+
function readProjectJson(path159, files2 = nodeRepoFileReader) {
|
|
29040
|
+
const text7 = readProjectMetadata(path159, files2);
|
|
28994
29041
|
if (text7 === null) return null;
|
|
28995
29042
|
try {
|
|
28996
29043
|
const value = JSON.parse(text7);
|
|
@@ -29594,7 +29641,7 @@ function scanLocalNative(appDir, pkg, answered, platform3, knownPackages = /* @_
|
|
|
29594
29641
|
expoModule: moduleDir ? (0, import_node_path43.relative)(appDir, moduleDir) || "." : null,
|
|
29595
29642
|
optional: optional3,
|
|
29596
29643
|
swift: moduleDir ? (nativeFilesByModule.get(moduleDir) ?? []).some(
|
|
29597
|
-
(
|
|
29644
|
+
(path159) => path159.endsWith(".swift") && [...(readSmallFile(path159) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
|
|
29598
29645
|
(match) => match[1] === name3
|
|
29599
29646
|
)
|
|
29600
29647
|
) : false,
|
|
@@ -29740,6 +29787,9 @@ var init_profilerContract = __esm({
|
|
|
29740
29787
|
});
|
|
29741
29788
|
|
|
29742
29789
|
// src/runtimePlatformContract.ts
|
|
29790
|
+
function getRuntimePlatformAdapter(platform3) {
|
|
29791
|
+
return RUNTIME_PLATFORM_ADAPTERS[platform3];
|
|
29792
|
+
}
|
|
29743
29793
|
var IOS_ADAPTER, ANDROID_ADAPTER, RUNTIME_PLATFORM_ADAPTERS;
|
|
29744
29794
|
var init_runtimePlatformContract = __esm({
|
|
29745
29795
|
"src/runtimePlatformContract.ts"() {
|
|
@@ -35272,9 +35322,9 @@ function originalColumn(line, column) {
|
|
|
35272
35322
|
}
|
|
35273
35323
|
function designTimeDiagnostic(output, files2) {
|
|
35274
35324
|
const rewritten = /* @__PURE__ */ new Map();
|
|
35275
|
-
const linesOf = (
|
|
35325
|
+
const linesOf = (path159) => {
|
|
35276
35326
|
const file = Object.keys(files2).find(
|
|
35277
|
-
(name3) => name3.endsWith(".swift") && (
|
|
35327
|
+
(name3) => name3.endsWith(".swift") && (path159 === name3 || path159.endsWith(`/${name3}`))
|
|
35278
35328
|
);
|
|
35279
35329
|
if (file === void 0) return null;
|
|
35280
35330
|
let lines = rewritten.get(file);
|
|
@@ -36647,15 +36697,15 @@ function readWasmLinkMap(file, partition) {
|
|
|
36647
36697
|
if (!input) continue;
|
|
36648
36698
|
const name3 = input[4];
|
|
36649
36699
|
const split = /^(.*?):\((.*)\)$/s.exec(name3);
|
|
36650
|
-
const
|
|
36651
|
-
const member = /\(([^()]+)\)$/.exec(
|
|
36700
|
+
const path159 = split ? split[1] : name3;
|
|
36701
|
+
const member = /\(([^()]+)\)$/.exec(path159);
|
|
36652
36702
|
previous = {
|
|
36653
|
-
inputFile:
|
|
36703
|
+
inputFile: path159,
|
|
36654
36704
|
segment: segment2,
|
|
36655
36705
|
address: hex(input[1]),
|
|
36656
36706
|
offset: parseInt(input[2], 16),
|
|
36657
36707
|
size: parseInt(input[3], 16),
|
|
36658
|
-
object: (member ? member[1] : (0, import_node_path56.basename)(
|
|
36708
|
+
object: (member ? member[1] : (0, import_node_path56.basename)(path159)).replace(/^lib\w*?__/, ""),
|
|
36659
36709
|
section: split ? split[2] : "",
|
|
36660
36710
|
symbols: []
|
|
36661
36711
|
};
|
|
@@ -44979,13 +45029,13 @@ function swiftSdkGuestLookups(moduleRoot, sdkRoot, objects) {
|
|
|
44979
45029
|
const shared = /* @__PURE__ */ new Set();
|
|
44980
45030
|
const sdkWeakReferences = /* @__PURE__ */ new Map();
|
|
44981
45031
|
for (const objects2 of groups.values())
|
|
44982
|
-
for (const { path:
|
|
45032
|
+
for (const { path: path159, bytes } of objects2) {
|
|
44983
45033
|
const defined = guestWasmSymbols(bytes);
|
|
44984
45034
|
for (const name3 of defined.defined) symbols.add(name3);
|
|
44985
45035
|
for (const name3 of defined.tags) shared.add(name3);
|
|
44986
45036
|
for (const name3 of defined.globals) shared.add(name3);
|
|
44987
45037
|
if (defined.weakUndefined.length)
|
|
44988
|
-
sdkWeakReferences.set(
|
|
45038
|
+
sdkWeakReferences.set(path159, new Set(defined.weakUndefined));
|
|
44989
45039
|
}
|
|
44990
45040
|
return createGuestImageLedger({
|
|
44991
45041
|
images,
|
|
@@ -50086,7 +50136,7 @@ async function compileGuestLink(options2) {
|
|
|
50086
50136
|
let lazyFunctions = [];
|
|
50087
50137
|
let dyldSymbols = [];
|
|
50088
50138
|
const bundlePaths = new Map(
|
|
50089
|
-
options2.resourceBundles.map(({ target, path:
|
|
50139
|
+
options2.resourceBundles.map(({ target, path: path159 }) => [target, path159])
|
|
50090
50140
|
);
|
|
50091
50141
|
const imageMetadata = (products) => {
|
|
50092
50142
|
const source = sourceImages.map((image) => {
|
|
@@ -52774,7 +52824,7 @@ function swiftTargetDependencies(files2, targets, frameworks = OPTIONAL_FRAMEWOR
|
|
|
52774
52824
|
);
|
|
52775
52825
|
const names = /* @__PURE__ */ new Set([...frameworks, ...targets.map((target) => target.name)]);
|
|
52776
52826
|
const entriesByPrefix = new Map(
|
|
52777
|
-
targets.map(({ path:
|
|
52827
|
+
targets.map(({ path: path159 }) => [path159 === "." ? "" : `${path159}/`, []])
|
|
52778
52828
|
);
|
|
52779
52829
|
for (const entry of Object.entries(files2)) {
|
|
52780
52830
|
const [file] = entry;
|
|
@@ -52809,7 +52859,7 @@ function swiftTargetDependencies(files2, targets, frameworks = OPTIONAL_FRAMEWOR
|
|
|
52809
52859
|
(excluded) => relative5 === excluded || relative5.startsWith(`${excluded}/`)
|
|
52810
52860
|
))
|
|
52811
52861
|
continue;
|
|
52812
|
-
if (nested.some((
|
|
52862
|
+
if (nested.some((path159) => file.startsWith(path159))) continue;
|
|
52813
52863
|
const imports2 = file.endsWith(".swift") ? swiftImportNames(contents2) : SWIFT_NATIVE_SOURCE_EXTENSIONS.some((extension) => file.endsWith(extension)) ? clangImportNames(contents2, ownsHeader) : [];
|
|
52814
52864
|
for (const name3 of imports2) {
|
|
52815
52865
|
if (names.has(name3) && name3 !== target.name && !(target.dependencies !== void 0 && localNames.has(name3)))
|
|
@@ -61514,16 +61564,16 @@ var init_pods_files = __esm({
|
|
|
61514
61564
|
};
|
|
61515
61565
|
unique = (values) => [...new Set(values)];
|
|
61516
61566
|
XCFramework = class {
|
|
61517
|
-
constructor(targetName,
|
|
61567
|
+
constructor(targetName, path159) {
|
|
61518
61568
|
this.targetName = targetName;
|
|
61519
|
-
this.path =
|
|
61520
|
-
const plist6 = parsePlistBytes(import_node_fs85.default.readFileSync(`${
|
|
61569
|
+
this.path = path159;
|
|
61570
|
+
const plist6 = parsePlistBytes(import_node_fs85.default.readFileSync(`${path159}/Info.plist`));
|
|
61521
61571
|
if (!isRecord(plist6) || !Array.isArray(plist6.AvailableLibraries))
|
|
61522
|
-
throw new Error(`${
|
|
61572
|
+
throw new Error(`${path159}/Info.plist declares no AvailableLibraries`);
|
|
61523
61573
|
this.slices = plist6.AvailableLibraries.map((library) => {
|
|
61524
61574
|
if (!isRecord(library) || typeof library.LibraryIdentifier !== "string" || typeof library.LibraryPath !== "string" || typeof library.SupportedPlatform !== "string")
|
|
61525
|
-
throw new Error(`${
|
|
61526
|
-
const root = `${
|
|
61575
|
+
throw new Error(`${path159}/Info.plist has an invalid library entry`);
|
|
61576
|
+
const root = `${path159}/${library.LibraryIdentifier}`;
|
|
61527
61577
|
const slicePath = `${root}/${library.LibraryPath}`;
|
|
61528
61578
|
const extension = slicePath.slice(slicePath.lastIndexOf("."));
|
|
61529
61579
|
const packaging = extension === ".framework" ? "framework" : extension === ".a" || extension === ".dylib" ? "library" : null;
|
|
@@ -61545,7 +61595,7 @@ var init_pods_files = __esm({
|
|
|
61545
61595
|
}).sort((a, b) => byBytes2(a.identifier, b.identifier));
|
|
61546
61596
|
if (this.slices.length === 0)
|
|
61547
61597
|
throw new Error(
|
|
61548
|
-
`XCFramework at ${
|
|
61598
|
+
`XCFramework at ${path159} does not contain any frameworks or libraries.`
|
|
61549
61599
|
);
|
|
61550
61600
|
}
|
|
61551
61601
|
slices;
|
|
@@ -63399,9 +63449,9 @@ echo "SUCCESS" > "\${SCRIPT_OUTPUT_FILE_0}"
|
|
|
63399
63449
|
DEFAULT_SHELL_SCRIPT = "# Type a script or drag a script file from your workspace to insert its path.\n";
|
|
63400
63450
|
stringList2 = (value) => Array.isArray(value) && value.every((item) => typeof item === "string") ? value : null;
|
|
63401
63451
|
UserProject = class {
|
|
63402
|
-
constructor(table,
|
|
63452
|
+
constructor(table, path159, objectVersion) {
|
|
63403
63453
|
this.table = table;
|
|
63404
|
-
this.path =
|
|
63454
|
+
this.path = path159;
|
|
63405
63455
|
this.objectVersion = objectVersion;
|
|
63406
63456
|
}
|
|
63407
63457
|
get projectDir() {
|
|
@@ -69914,6 +69964,20 @@ function resolveNativeBundleIcons(icons, catalogNames, resolveReference) {
|
|
|
69914
69964
|
function isNativeAppIconArtwork(value) {
|
|
69915
69965
|
return isRecord(value) && (value.primary === void 0 || isSwiftImageVariants(value.primary)) && isRecord(value.alternates) && Object.values(value.alternates).every(isSwiftImageVariants);
|
|
69916
69966
|
}
|
|
69967
|
+
function readNativeAppIconArtwork(value) {
|
|
69968
|
+
if (value === void 0) return void 0;
|
|
69969
|
+
if (!isNativeAppIconArtwork(value))
|
|
69970
|
+
throw new Error("native app icon artwork is malformed");
|
|
69971
|
+
return {
|
|
69972
|
+
...value.primary ? { primary: value.primary.map((image) => ({ ...image })) } : {},
|
|
69973
|
+
alternates: Object.fromEntries(
|
|
69974
|
+
Object.entries(value.alternates).map(([name3, images]) => [
|
|
69975
|
+
name3,
|
|
69976
|
+
images.map((image) => ({ ...image }))
|
|
69977
|
+
])
|
|
69978
|
+
)
|
|
69979
|
+
};
|
|
69980
|
+
}
|
|
69917
69981
|
function resolveNativeAppIconArtwork(resources, readText, resourceUri, icons, primaryName, alternateNames, resolveReference) {
|
|
69918
69982
|
const members2 = new Set(resources);
|
|
69919
69983
|
const dictionary3 = isRecord(icons) ? icons : {};
|
|
@@ -70245,6 +70309,75 @@ function isNativeAppIdentity(value) {
|
|
|
70245
70309
|
if (platform3 === "android" && !/^[1-9][0-9]*$/.test(buildVersion)) return false;
|
|
70246
70310
|
return true;
|
|
70247
70311
|
}
|
|
70312
|
+
function readNativeAppIdentity(value) {
|
|
70313
|
+
if (value === void 0 || value === null) return null;
|
|
70314
|
+
if (!isNativeAppIdentity(value)) {
|
|
70315
|
+
throw new Error("native app identity is malformed");
|
|
70316
|
+
}
|
|
70317
|
+
return {
|
|
70318
|
+
applicationName: value.applicationName,
|
|
70319
|
+
...value.applicationDisplayName === void 0 ? {} : { applicationDisplayName: value.applicationDisplayName },
|
|
70320
|
+
...value.rootModuleName === void 0 ? {} : { rootModuleName: value.rootModuleName },
|
|
70321
|
+
...value.rootViewBackgroundColor === void 0 ? {} : { rootViewBackgroundColor: value.rootViewBackgroundColor },
|
|
70322
|
+
...value.designRequiresCompatibility === void 0 ? {} : { designRequiresCompatibility: value.designRequiresCompatibility },
|
|
70323
|
+
...value.statusBarHidden === void 0 ? {} : { statusBarHidden: value.statusBarHidden },
|
|
70324
|
+
...value.viewControllerBasedStatusBarAppearance === void 0 ? {} : {
|
|
70325
|
+
viewControllerBasedStatusBarAppearance: value.viewControllerBasedStatusBarAppearance
|
|
70326
|
+
},
|
|
70327
|
+
...value.sceneManifest === void 0 ? {} : { sceneManifest: value.sceneManifest },
|
|
70328
|
+
...value.dtPlatformVersion === void 0 ? {} : { dtPlatformVersion: value.dtPlatformVersion },
|
|
70329
|
+
...value.bundleName === void 0 ? {} : { bundleName: value.bundleName },
|
|
70330
|
+
appVersion: value.appVersion,
|
|
70331
|
+
buildVersion: value.buildVersion,
|
|
70332
|
+
bundleIdentifier: value.bundleIdentifier,
|
|
70333
|
+
platform: value.platform,
|
|
70334
|
+
...value.reanimatedStaticFeatureFlags === void 0 ? {} : { reanimatedStaticFeatureFlags: { ...value.reanimatedStaticFeatureFlags } },
|
|
70335
|
+
...value.appIconArtwork === void 0 ? {} : { appIconArtwork: readNativeAppIconArtwork(value.appIconArtwork) },
|
|
70336
|
+
...value.alternateIconNames === void 0 ? {} : { alternateIconNames: [...value.alternateIconNames] },
|
|
70337
|
+
...value.bundleIcons === void 0 ? {} : { bundleIcons: structuredClone(value.bundleIcons) },
|
|
70338
|
+
...value.androidManifestPermissions === void 0 ? {} : {
|
|
70339
|
+
androidManifestPermissions: value.androidManifestPermissions.map(
|
|
70340
|
+
(permission) => ({ ...permission })
|
|
70341
|
+
)
|
|
70342
|
+
},
|
|
70343
|
+
...value.androidPhotoLibraryAddOnly === void 0 ? {} : { androidPhotoLibraryAddOnly: value.androidPhotoLibraryAddOnly },
|
|
70344
|
+
...value.googleSignIn === void 0 ? {} : { googleSignIn: structuredClone(value.googleSignIn) },
|
|
70345
|
+
...value.permissionUsageDescriptions === void 0 ? {} : {
|
|
70346
|
+
permissionUsageDescriptions: { ...value.permissionUsageDescriptions }
|
|
70347
|
+
},
|
|
70348
|
+
...value.infoPlistStrings === void 0 ? {} : { infoPlistStrings: { ...value.infoPlistStrings } },
|
|
70349
|
+
...value.infoPlistBooleans === void 0 ? {} : { infoPlistBooleans: { ...value.infoPlistBooleans } },
|
|
70350
|
+
...value.appIntentIdentifiers === void 0 ? {} : { appIntentIdentifiers: [...value.appIntentIdentifiers] },
|
|
70351
|
+
...value.backgroundTaskIdentifiers === void 0 ? {} : { backgroundTaskIdentifiers: [...value.backgroundTaskIdentifiers] },
|
|
70352
|
+
...value.supportedInterfaceOrientations === void 0 ? {} : {
|
|
70353
|
+
supportedInterfaceOrientations: [...value.supportedInterfaceOrientations]
|
|
70354
|
+
},
|
|
70355
|
+
...value.ipadSupportedInterfaceOrientations === void 0 ? {} : {
|
|
70356
|
+
ipadSupportedInterfaceOrientations: [
|
|
70357
|
+
...value.ipadSupportedInterfaceOrientations
|
|
70358
|
+
]
|
|
70359
|
+
},
|
|
70360
|
+
...value.defaultScreenOrientationMask === void 0 ? {} : { defaultScreenOrientationMask: value.defaultScreenOrientationMask },
|
|
70361
|
+
...value.backgroundModes === void 0 ? {} : { backgroundModes: [...value.backgroundModes] },
|
|
70362
|
+
...value.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: [...value.keychainAccessGroups] },
|
|
70363
|
+
...value.siriEntitled === void 0 ? {} : { siriEntitled: value.siriEntitled },
|
|
70364
|
+
...value.shareIntoAppGroupId === void 0 ? {} : { shareIntoAppGroupId: value.shareIntoAppGroupId },
|
|
70365
|
+
...value.rtcAppGroupIdentifier === void 0 ? {} : { rtcAppGroupIdentifier: value.rtcAppGroupIdentifier },
|
|
70366
|
+
...value.screenShareExtensionBundleId === void 0 ? {} : { screenShareExtensionBundleId: value.screenShareExtensionBundleId },
|
|
70367
|
+
...value.urlQuerySchemes === void 0 ? {} : { urlQuerySchemes: [...value.urlQuerySchemes] },
|
|
70368
|
+
...value.oneUpdates === void 0 ? {} : {
|
|
70369
|
+
oneUpdates: {
|
|
70370
|
+
enabled: value.oneUpdates.enabled,
|
|
70371
|
+
url: value.oneUpdates.url,
|
|
70372
|
+
runtimeVersion: value.oneUpdates.runtimeVersion,
|
|
70373
|
+
embeddedManifestJson: value.oneUpdates.embeddedManifestJson
|
|
70374
|
+
}
|
|
70375
|
+
}
|
|
70376
|
+
};
|
|
70377
|
+
}
|
|
70378
|
+
function createNativeAppIdentityHeader(identity2) {
|
|
70379
|
+
return encodeURIComponent(JSON.stringify(readNativeAppIdentity(identity2)));
|
|
70380
|
+
}
|
|
70248
70381
|
function readGoogleSignInConfiguration(plist6, resources) {
|
|
70249
70382
|
const clientIds = {};
|
|
70250
70383
|
for (const [file, value] of Object.entries(resources)) {
|
|
@@ -70514,14 +70647,14 @@ function addAsset(into, asset) {
|
|
|
70514
70647
|
function checkStack(dir, type, devices2) {
|
|
70515
70648
|
const sets = (parent, allowed) => (0, import_node_fs94.readdirSync)(parent, { withFileTypes: true }).flatMap((entry) => {
|
|
70516
70649
|
if (entry.name.startsWith(".") || entry.isFile()) return [];
|
|
70517
|
-
const
|
|
70650
|
+
const path159 = (0, import_node_path96.join)(parent, entry.name);
|
|
70518
70651
|
const extension = (0, import_node_path96.extname)(entry.name);
|
|
70519
70652
|
if (!entry.isDirectory() || !allowed.includes(extension))
|
|
70520
70653
|
return refuse(
|
|
70521
|
-
|
|
70654
|
+
path159,
|
|
70522
70655
|
`image stack content other than ${allowed.join(", ")} is unproven`
|
|
70523
70656
|
);
|
|
70524
|
-
return [{ path:
|
|
70657
|
+
return [{ path: path159, extension }];
|
|
70525
70658
|
});
|
|
70526
70659
|
for (const layer of sets(dir, [`.${type}layer`, ".imageset", ".colorset"])) {
|
|
70527
70660
|
if (layer.extension !== `.${type}layer`) continue;
|
|
@@ -70533,37 +70666,37 @@ function checkStack(dir, type, devices2) {
|
|
|
70533
70666
|
function walk(dir, into, devices2, extensions) {
|
|
70534
70667
|
for (const entry of (0, import_node_fs94.readdirSync)(dir, { withFileTypes: true })) {
|
|
70535
70668
|
if (entry.name.startsWith(".") || entry.isFile()) continue;
|
|
70536
|
-
const
|
|
70537
|
-
if (!entry.isDirectory()) return refuse(
|
|
70669
|
+
const path159 = (0, import_node_path96.join)(dir, entry.name);
|
|
70670
|
+
if (!entry.isDirectory()) return refuse(path159, "it is neither a file nor a directory");
|
|
70538
70671
|
const extension = (0, import_node_path96.extname)(entry.name).slice(1);
|
|
70539
70672
|
const type = extension.toLowerCase();
|
|
70540
70673
|
const base2 = entry.name.slice(0, entry.name.length - extension.length - 1);
|
|
70541
70674
|
if (type !== extension && knownTypes.has(type))
|
|
70542
|
-
return refuse(
|
|
70675
|
+
return refuse(path159, "its type extension is not lowercase");
|
|
70543
70676
|
if (type === "colorset" || type === "imageset" || type === "symbolset") {
|
|
70544
70677
|
addAsset(into, {
|
|
70545
70678
|
kind: type === "colorset" ? "color" : "image",
|
|
70546
70679
|
name: base2,
|
|
70547
|
-
...assetState(
|
|
70680
|
+
...assetState(path159, type, devices2),
|
|
70548
70681
|
extensions,
|
|
70549
|
-
source:
|
|
70682
|
+
source: path159
|
|
70550
70683
|
});
|
|
70551
70684
|
continue;
|
|
70552
70685
|
}
|
|
70553
70686
|
if (silentTypes.has(type)) continue;
|
|
70554
70687
|
if (stackTypes.has(type)) {
|
|
70555
|
-
checkStack(
|
|
70688
|
+
checkStack(path159, type, devices2);
|
|
70556
70689
|
continue;
|
|
70557
70690
|
}
|
|
70558
|
-
if (unprovenTypes.has(type)) return refuse(
|
|
70691
|
+
if (unprovenTypes.has(type)) return refuse(path159, `${type} assets are unproven`);
|
|
70559
70692
|
const name3 = type === "spriteatlas" ? base2 : entry.name;
|
|
70560
|
-
if (!folderProperties((0, import_node_path96.join)(
|
|
70561
|
-
walk(
|
|
70693
|
+
if (!folderProperties((0, import_node_path96.join)(path159, "Contents.json")).namespace) {
|
|
70694
|
+
walk(path159, into, devices2, extensions);
|
|
70562
70695
|
continue;
|
|
70563
70696
|
}
|
|
70564
|
-
const child = into.namespaces.get(name3) ?? scope(
|
|
70697
|
+
const child = into.namespaces.get(name3) ?? scope(path159);
|
|
70565
70698
|
into.namespaces.set(name3, child);
|
|
70566
|
-
walk(
|
|
70699
|
+
walk(path159, child, devices2, extensions);
|
|
70567
70700
|
}
|
|
70568
70701
|
}
|
|
70569
70702
|
function words(name3) {
|
|
@@ -70610,11 +70743,11 @@ function members(into, kind, prefix, extensions) {
|
|
|
70610
70743
|
const assets2 = /* @__PURE__ */ new Set();
|
|
70611
70744
|
const out = [];
|
|
70612
70745
|
for (const entry of entries2) {
|
|
70613
|
-
const
|
|
70746
|
+
const path159 = `${prefix}${entry.name}`;
|
|
70614
70747
|
const source = entry.child ? entry.child.source : entry.asset.source;
|
|
70615
70748
|
if (Array.from(entry.name).some((char) => char.charCodeAt(0) > 127))
|
|
70616
70749
|
refuse(source, "its name is not ASCII");
|
|
70617
|
-
const named = (text8) => `The \\"${escape(
|
|
70750
|
+
const named = (text8) => `The \\"${escape(path159)}\\" ${text8}`;
|
|
70618
70751
|
if (entry.child) {
|
|
70619
70752
|
const text8 = symbol(entry.name, true);
|
|
70620
70753
|
if (!text8)
|
|
@@ -70637,9 +70770,9 @@ function members(into, kind, prefix, extensions) {
|
|
|
70637
70770
|
namespaces.add(text8);
|
|
70638
70771
|
out.push({
|
|
70639
70772
|
type: "namespace",
|
|
70640
|
-
path:
|
|
70773
|
+
path: path159,
|
|
70641
70774
|
symbol: spelled(text8),
|
|
70642
|
-
members: members(entry.child, kind, `${
|
|
70775
|
+
members: members(entry.child, kind, `${path159}/`, extensions)
|
|
70643
70776
|
});
|
|
70644
70777
|
}
|
|
70645
70778
|
continue;
|
|
@@ -70666,7 +70799,7 @@ function members(into, kind, prefix, extensions) {
|
|
|
70666
70799
|
else if (!omitted)
|
|
70667
70800
|
out.push({
|
|
70668
70801
|
type: "asset",
|
|
70669
|
-
path:
|
|
70802
|
+
path: path159,
|
|
70670
70803
|
name: entry.name,
|
|
70671
70804
|
symbol: spelled(text7),
|
|
70672
70805
|
thinnable: asset.thinnable,
|
|
@@ -70947,8 +71080,8 @@ var init_xcode_asset_symbols = __esm({
|
|
|
70947
71080
|
import_node_path96 = require("node:path");
|
|
70948
71081
|
Refusal = class extends Error {
|
|
70949
71082
|
};
|
|
70950
|
-
refuse = (
|
|
70951
|
-
throw new Refusal(`Generated asset symbols are unproven for ${
|
|
71083
|
+
refuse = (path159, reason) => {
|
|
71084
|
+
throw new Refusal(`Generated asset symbols are unproven for ${path159}: ${reason}`);
|
|
70952
71085
|
};
|
|
70953
71086
|
isRecord5 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
70954
71087
|
scope = (source) => ({
|
|
@@ -71394,11 +71527,11 @@ function catalogDigest(directory2) {
|
|
|
71394
71527
|
for (const entry of (0, import_node_fs95.readdirSync)(dir, { withFileTypes: true }).sort(
|
|
71395
71528
|
(a, b) => a.name.localeCompare(b.name)
|
|
71396
71529
|
)) {
|
|
71397
|
-
const
|
|
71398
|
-
if (entry.isDirectory()) walk4(
|
|
71399
|
-
else if (entry.isFile() && (0, import_node_fs95.statSync)(
|
|
71400
|
-
hashes.push([(0, import_node_path97.relative)(directory2,
|
|
71401
|
-
else throw new Error(`Unsupported asset catalog entry: ${
|
|
71530
|
+
const path159 = (0, import_node_path97.join)(dir, entry.name);
|
|
71531
|
+
if (entry.isDirectory()) walk4(path159);
|
|
71532
|
+
else if (entry.isFile() && (0, import_node_fs95.statSync)(path159).size <= 64 * 1024 * 1024)
|
|
71533
|
+
hashes.push([(0, import_node_path97.relative)(directory2, path159), sha2562((0, import_node_fs95.readFileSync)(path159))]);
|
|
71534
|
+
else throw new Error(`Unsupported asset catalog entry: ${path159}`);
|
|
71402
71535
|
}
|
|
71403
71536
|
};
|
|
71404
71537
|
walk4(directory2);
|
|
@@ -71409,7 +71542,7 @@ function symbolSource(plan, root) {
|
|
|
71409
71542
|
const known = symbolTexts.get(key2);
|
|
71410
71543
|
if (known !== void 0) return { status: "source", text: known };
|
|
71411
71544
|
const source = assetSymbolSource(
|
|
71412
|
-
plan.catalogs.map(({ path:
|
|
71545
|
+
plan.catalogs.map(({ path: path159 }) => (0, import_node_path97.join)(root, path159)),
|
|
71413
71546
|
plan.settings
|
|
71414
71547
|
);
|
|
71415
71548
|
if (source.status === "source") symbolTexts.set(key2, source.text);
|
|
@@ -71468,9 +71601,9 @@ function planAssetSymbols(resources, root, settings) {
|
|
|
71468
71601
|
`Generated asset symbols are proven only for TARGETED_DEVICE_FAMILY 1, 2, 1,2, 1,7, 1,3,7, 1,2,6 or 1,2,7; this target resolves to "${families}".`
|
|
71469
71602
|
);
|
|
71470
71603
|
const plan = {
|
|
71471
|
-
catalogs: catalogs.map((
|
|
71472
|
-
path:
|
|
71473
|
-
sha256: catalogDigest((0, import_node_path97.join)(root,
|
|
71604
|
+
catalogs: catalogs.map((path159) => ({
|
|
71605
|
+
path: path159,
|
|
71606
|
+
sha256: catalogDigest((0, import_node_path97.join)(root, path159))
|
|
71474
71607
|
})),
|
|
71475
71608
|
settings: { deployment: target, devices: devices2, extensions: extensions === "YES" }
|
|
71476
71609
|
};
|
|
@@ -78692,9 +78825,9 @@ function hashPackageTree(root, options2) {
|
|
|
78692
78825
|
(a, b) => options2.compareNames(a.name, b.name)
|
|
78693
78826
|
)) {
|
|
78694
78827
|
if (entry.name === "node_modules") continue;
|
|
78695
|
-
const
|
|
78696
|
-
if (entry.isDirectory()) walk4((0, import_node_path106.join)(directory2, entry.name), `${
|
|
78697
|
-
else if (entry.isFile() && !options2.skipFile?.(entry.name)) files2.push(
|
|
78828
|
+
const path159 = `${relative5}${entry.name}`;
|
|
78829
|
+
if (entry.isDirectory()) walk4((0, import_node_path106.join)(directory2, entry.name), `${path159}/`);
|
|
78830
|
+
else if (entry.isFile() && !options2.skipFile?.(entry.name)) files2.push(path159);
|
|
78698
78831
|
}
|
|
78699
78832
|
};
|
|
78700
78833
|
walk4(root, "");
|
|
@@ -78907,6 +79040,18 @@ async function prebuiltAppTarget(appRoot, signal, dependencies = "lockfile") {
|
|
|
78907
79040
|
requireSources: false
|
|
78908
79041
|
});
|
|
78909
79042
|
}
|
|
79043
|
+
function isManagedExpoApp(appRoot) {
|
|
79044
|
+
return !findXcodeProject(import_node_path107.default.join(appRoot, "ios")) && declaresNativeDependency(
|
|
79045
|
+
JSON.parse(import_node_fs104.default.readFileSync(import_node_path107.default.join(appRoot, "package.json"), "utf8")),
|
|
79046
|
+
"expo"
|
|
79047
|
+
);
|
|
79048
|
+
}
|
|
79049
|
+
async function managedExpoNativeAppIdentity(appRoot, iosTarget) {
|
|
79050
|
+
const entry = iosTarget === void 0 ? await lookup2(appRoot) : null;
|
|
79051
|
+
return readNativeAppIdentityFromXcodeTarget(
|
|
79052
|
+
await prebuiltAppTarget(appRoot, void 0, entry ? "installed" : "lockfile")
|
|
79053
|
+
);
|
|
79054
|
+
}
|
|
78910
79055
|
function servedExpoSwift(appRoot, entry, app) {
|
|
78911
79056
|
if (!entry.expoSwift) return null;
|
|
78912
79057
|
const rootId = `${(0, import_node_crypto62.createHash)("sha256").update(import_node_fs104.default.realpathSync(appRoot)).digest("hex")}/Expo`;
|
|
@@ -78952,7 +79097,6 @@ var init_expo_native_prebuilt = __esm({
|
|
|
78952
79097
|
init_expo_native_workspace();
|
|
78953
79098
|
init_expoSwiftContract();
|
|
78954
79099
|
init_is_record();
|
|
78955
|
-
init_native_app_identity();
|
|
78956
79100
|
init_native_app_identity_project();
|
|
78957
79101
|
init_native_firebase_config();
|
|
78958
79102
|
init_native_prebuilt();
|
|
@@ -78971,16 +79115,6 @@ var init_expo_native_prebuilt = __esm({
|
|
|
78971
79115
|
}
|
|
78972
79116
|
});
|
|
78973
79117
|
|
|
78974
|
-
// src/nativePreparationContract.ts
|
|
78975
|
-
var NATIVE_PREPARE_QUERY_PARAM, NATIVE_PREPARED_QUERY_PARAM;
|
|
78976
|
-
var init_nativePreparationContract = __esm({
|
|
78977
|
-
"src/nativePreparationContract.ts"() {
|
|
78978
|
-
"use strict";
|
|
78979
|
-
NATIVE_PREPARE_QUERY_PARAM = "prepare";
|
|
78980
|
-
NATIVE_PREPARED_QUERY_PARAM = "prepared";
|
|
78981
|
-
}
|
|
78982
|
-
});
|
|
78983
|
-
|
|
78984
79118
|
// src/native-preparation.ts
|
|
78985
79119
|
function ignoredChange(relative5) {
|
|
78986
79120
|
const parts = relative5.split(import_node_path108.default.sep);
|
|
@@ -79004,7 +79138,7 @@ function watchNativeInputs(root) {
|
|
|
79004
79138
|
(0, import_node_timers2.clearTimeout)(expiry);
|
|
79005
79139
|
for (const watcher of watchers) watcher.close();
|
|
79006
79140
|
}
|
|
79007
|
-
const inputs2 = { expiry };
|
|
79141
|
+
const inputs2 = { expiry, revision: (0, import_node_crypto63.randomUUID)() };
|
|
79008
79142
|
const watch3 = (directory2, recursive, name3) => {
|
|
79009
79143
|
const watcher = import_node_fs105.default.watch(
|
|
79010
79144
|
directory2,
|
|
@@ -79045,10 +79179,15 @@ function watchNativeInputs(root) {
|
|
|
79045
79179
|
watchedInputs.set(workspace, inputs2);
|
|
79046
79180
|
return inputs2;
|
|
79047
79181
|
}
|
|
79048
|
-
|
|
79182
|
+
function nativeInputRevision(root) {
|
|
79183
|
+
const inputs2 = watchNativeInputs(root);
|
|
79184
|
+
if (inputs2) return JSON.stringify([inputs2.revision, resolveActiveRuntimeRoot()]);
|
|
79185
|
+
}
|
|
79186
|
+
var import_node_crypto63, import_node_fs105, import_node_path108, import_node_timers2, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
|
|
79049
79187
|
var init_native_preparation = __esm({
|
|
79050
79188
|
"src/native-preparation.ts"() {
|
|
79051
79189
|
"use strict";
|
|
79190
|
+
import_node_crypto63 = require("node:crypto");
|
|
79052
79191
|
import_node_fs105 = __toESM(require("node:fs"), 1);
|
|
79053
79192
|
import_node_path108 = __toESM(require("node:path"), 1);
|
|
79054
79193
|
import_node_timers2 = require("node:timers");
|
|
@@ -79228,7 +79367,7 @@ function nativeStaticLibraryEntry(recipe2, compiler, sdk2, distribution) {
|
|
|
79228
79367
|
return { name: recipe2.name, inputs: inputs2, key: nativeEntryKey(inputs2) };
|
|
79229
79368
|
}
|
|
79230
79369
|
function nativeStaticLibraryRecipe(bytes) {
|
|
79231
|
-
const digest3 = (0,
|
|
79370
|
+
const digest3 = (0, import_node_crypto64.createHash)("sha256").update(bytes).digest("hex");
|
|
79232
79371
|
return NATIVE_STATIC_LIBRARY_RECIPES.find((item) => item.nativeSha256 === digest3);
|
|
79233
79372
|
}
|
|
79234
79373
|
function nativeStaticLibrary(file, recipe2, moduleRoot) {
|
|
@@ -79271,7 +79410,7 @@ function isRustSymbol(name3, demangled) {
|
|
|
79271
79410
|
function rustStaticLibrary(file, moduleRoot) {
|
|
79272
79411
|
const toolchain = swiftModuleToolchain(moduleRoot);
|
|
79273
79412
|
const bytes = import_node_fs107.default.readFileSync(file);
|
|
79274
|
-
const key2 = (0,
|
|
79413
|
+
const key2 = (0, import_node_crypto64.createHash)("sha256").update("rust-c-abi-v4\0").update(toolchain.release).update("\0").update(bytes).digest("hex");
|
|
79275
79414
|
const directory2 = import_node_path110.default.join(cacheDir(), "native-archives", key2);
|
|
79276
79415
|
const archive = import_node_path110.default.join(directory2, "library.a");
|
|
79277
79416
|
if (import_node_fs107.default.existsSync(archive)) return archive;
|
|
@@ -79300,7 +79439,7 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
79300
79439
|
const members2 = readArMembers(bytes, true);
|
|
79301
79440
|
const seen = /* @__PURE__ */ new Set();
|
|
79302
79441
|
const unique2 = members2.filter(({ name: name3, bytes: bytes2 }) => {
|
|
79303
|
-
const identity2 = name3 + "\0" + (0,
|
|
79442
|
+
const identity2 = name3 + "\0" + (0, import_node_crypto64.createHash)("sha256").update(bytes2).digest("hex");
|
|
79304
79443
|
if (seen.has(identity2)) return false;
|
|
79305
79444
|
seen.add(identity2);
|
|
79306
79445
|
return true;
|
|
@@ -79347,14 +79486,14 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
79347
79486
|
function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
79348
79487
|
if (files2.length === 1) return files2[0];
|
|
79349
79488
|
const toolchain = swiftModuleToolchain(moduleRoot);
|
|
79350
|
-
const hash = (0,
|
|
79489
|
+
const hash = (0, import_node_crypto64.createHash)("sha256").update(toolchain.release);
|
|
79351
79490
|
for (const file of files2)
|
|
79352
79491
|
hash.update("\0").update(import_node_path110.default.basename(file)).update("\0").update(import_node_fs107.default.readFileSync(file));
|
|
79353
79492
|
const directory2 = import_node_path110.default.join(cacheDir(), "native-archives", hash.digest("hex"));
|
|
79354
79493
|
const archive = import_node_path110.default.join(directory2, "combined.a");
|
|
79355
79494
|
if (import_node_fs107.default.existsSync(archive)) return archive;
|
|
79356
79495
|
import_node_fs107.default.mkdirSync(directory2, { recursive: true });
|
|
79357
|
-
const temporary = import_node_path110.default.join(directory2, `combined-${(0,
|
|
79496
|
+
const temporary = import_node_path110.default.join(directory2, `combined-${(0, import_node_crypto64.randomUUID)()}.a`);
|
|
79358
79497
|
try {
|
|
79359
79498
|
(0, import_node_child_process48.execFileSync)(import_node_path110.default.join(toolchain.toolchainBin, "llvm-ar"), [
|
|
79360
79499
|
"qcsDL",
|
|
@@ -79367,12 +79506,12 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
|
79367
79506
|
}
|
|
79368
79507
|
return archive;
|
|
79369
79508
|
}
|
|
79370
|
-
var import_node_child_process48,
|
|
79509
|
+
var import_node_child_process48, import_node_crypto64, import_node_fs107, import_node_path110, WEBRTC_NATIVE_FRAMEWORK, SIGNAL_WEBRTC_NATIVE_FRAMEWORK, WEBRTC_NATIVE_FRAMEWORK_RECIPES, NATIVE_STATIC_LIBRARY_RECIPES;
|
|
79371
79510
|
var init_native_static_libraries = __esm({
|
|
79372
79511
|
"src/native-static-libraries.ts"() {
|
|
79373
79512
|
"use strict";
|
|
79374
79513
|
import_node_child_process48 = require("node:child_process");
|
|
79375
|
-
|
|
79514
|
+
import_node_crypto64 = require("node:crypto");
|
|
79376
79515
|
import_node_fs107 = __toESM(require("node:fs"), 1);
|
|
79377
79516
|
import_node_path110 = __toESM(require("node:path"), 1);
|
|
79378
79517
|
init_home_paths();
|
|
@@ -79707,7 +79846,7 @@ function processAlive(pid) {
|
|
|
79707
79846
|
}
|
|
79708
79847
|
function tryAcquireNumberedLock(directory2, detail = "") {
|
|
79709
79848
|
(0, import_node_fs108.mkdirSync)(directory2, { recursive: true });
|
|
79710
|
-
const claim = (0, import_node_path111.join)(directory2, `claim-${process.pid}-${(0,
|
|
79849
|
+
const claim = (0, import_node_path111.join)(directory2, `claim-${process.pid}-${(0, import_node_crypto65.randomUUID)()}`);
|
|
79711
79850
|
for (; ; ) {
|
|
79712
79851
|
const numbers = (0, import_node_fs108.readdirSync)(directory2).filter((name3) => /^\d+$/.test(name3)).map(Number);
|
|
79713
79852
|
const top = Math.max(-1, ...numbers);
|
|
@@ -79746,11 +79885,11 @@ ${detail}` : ""}`);
|
|
|
79746
79885
|
};
|
|
79747
79886
|
}
|
|
79748
79887
|
}
|
|
79749
|
-
var
|
|
79888
|
+
var import_node_crypto65, import_node_fs108, import_node_path111, errorCode2;
|
|
79750
79889
|
var init_numbered_lock = __esm({
|
|
79751
79890
|
"src/numbered-lock.ts"() {
|
|
79752
79891
|
"use strict";
|
|
79753
|
-
|
|
79892
|
+
import_node_crypto65 = require("node:crypto");
|
|
79754
79893
|
import_node_fs108 = require("node:fs");
|
|
79755
79894
|
import_node_path111 = require("node:path");
|
|
79756
79895
|
errorCode2 = (error) => error instanceof Error && "code" in error ? error.code : void 0;
|
|
@@ -79777,7 +79916,7 @@ async function buildRiveRuntimeDependencies(checkout, moduleRoot) {
|
|
|
79777
79916
|
];
|
|
79778
79917
|
const objc = [...swiftObjCRuntimeFlags, "-fobjc-exceptions"];
|
|
79779
79918
|
const xcode = (0, import_node_child_process49.execFileSync)("xcodebuild", ["-version"], { encoding: "utf8" });
|
|
79780
|
-
const key2 = (0,
|
|
79919
|
+
const key2 = (0, import_node_crypto66.createHash)("sha256").update(
|
|
79781
79920
|
JSON.stringify([
|
|
79782
79921
|
RECIPE,
|
|
79783
79922
|
(0, import_node_child_process49.execFileSync)("git", ["-C", runtime, "rev-parse", "HEAD"], {
|
|
@@ -79988,12 +80127,12 @@ exec ${quote3(import_node_path112.default.join(toolchainBin, "llvm-ar"))} rcs "$
|
|
|
79988
80127
|
);
|
|
79989
80128
|
return directory2;
|
|
79990
80129
|
}
|
|
79991
|
-
var import_node_child_process49,
|
|
80130
|
+
var import_node_child_process49, import_node_crypto66, import_node_fs109, import_node_os22, import_node_path112, import_promises13, RECIPE, CONFIG, RUNTIME_LIBRARIES;
|
|
79992
80131
|
var init_rive_runtime_dependencies = __esm({
|
|
79993
80132
|
"src/rive-runtime-dependencies.ts"() {
|
|
79994
80133
|
"use strict";
|
|
79995
80134
|
import_node_child_process49 = require("node:child_process");
|
|
79996
|
-
|
|
80135
|
+
import_node_crypto66 = require("node:crypto");
|
|
79997
80136
|
import_node_fs109 = __toESM(require("node:fs"), 1);
|
|
79998
80137
|
import_node_os22 = __toESM(require("node:os"), 1);
|
|
79999
80138
|
import_node_path112 = __toESM(require("node:path"), 1);
|
|
@@ -80092,7 +80231,7 @@ var init_swift_shipped_binaries = __esm({
|
|
|
80092
80231
|
|
|
80093
80232
|
// src/swift-packages.ts
|
|
80094
80233
|
function remoteSwiftCheckouts(root) {
|
|
80095
|
-
const key2 = (0,
|
|
80234
|
+
const key2 = (0, import_node_crypto67.createHash)("sha256").update(import_node_fs110.default.realpathSync(root)).digest("hex").slice(0, 32);
|
|
80096
80235
|
import_node_fs110.default.mkdirSync(cacheDir(), { recursive: true });
|
|
80097
80236
|
return import_node_path113.default.join(import_node_fs110.default.realpathSync(cacheDir()), "swift-packages", key2, "checkouts");
|
|
80098
80237
|
}
|
|
@@ -80692,7 +80831,7 @@ function resolveSwiftPackages(options2) {
|
|
|
80692
80831
|
headers.set(name3, import_node_path113.default.relative(binary2.dir, dir));
|
|
80693
80832
|
};
|
|
80694
80833
|
visit3(pkg, binary2.target);
|
|
80695
|
-
binary2.headerDependencies = [...headers].map(([module2,
|
|
80834
|
+
binary2.headerDependencies = [...headers].map(([module2, path159]) => ({ module: module2, path: path159 }));
|
|
80696
80835
|
}
|
|
80697
80836
|
for (const owner of options2.owners ?? []) {
|
|
80698
80837
|
const found2 = productClosure(owner.products);
|
|
@@ -80826,12 +80965,12 @@ function resolveSwiftPackages(options2) {
|
|
|
80826
80965
|
result.nativeProducts.push({ name: name3, packageDir: manifest.dir, source });
|
|
80827
80966
|
return result;
|
|
80828
80967
|
}
|
|
80829
|
-
var import_node_child_process50,
|
|
80968
|
+
var import_node_child_process50, import_node_crypto67, import_node_fs110, import_node_path113, import_promises14, import_node_util13, swiftBinaryOnDisk, SWIFT_PLACEHOLDER_PACKAGES, placeholderPackage, sourceFrameworkRecipes, UNSUPPORTED_NATIVE, BINARY, blockers, verified, execFileAsync2, checkoutKey;
|
|
80830
80969
|
var init_swift_packages = __esm({
|
|
80831
80970
|
"src/swift-packages.ts"() {
|
|
80832
80971
|
"use strict";
|
|
80833
80972
|
import_node_child_process50 = require("node:child_process");
|
|
80834
|
-
|
|
80973
|
+
import_node_crypto67 = require("node:crypto");
|
|
80835
80974
|
import_node_fs110 = __toESM(require("node:fs"), 1);
|
|
80836
80975
|
import_node_path113 = __toESM(require("node:path"), 1);
|
|
80837
80976
|
import_promises14 = require("node:timers/promises");
|
|
@@ -81441,7 +81580,7 @@ var init_genrule_library_builds = __esm({
|
|
|
81441
81580
|
function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
81442
81581
|
const distribution = swiftDistributionAt(moduleRoot);
|
|
81443
81582
|
const sdk2 = swiftSdkPaths(moduleRoot, toolchainBin);
|
|
81444
|
-
const identity2 = (0,
|
|
81583
|
+
const identity2 = (0, import_node_crypto68.createHash)("sha256").update(
|
|
81445
81584
|
JSON.stringify([
|
|
81446
81585
|
distribution?.id,
|
|
81447
81586
|
distribution?.link,
|
|
@@ -81467,7 +81606,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
|
81467
81606
|
for (const alias of product.frameworkAliases) {
|
|
81468
81607
|
if (alias.wasmSdkId !== distribution.wasmSdkId || alias.wasmSdkChecksum !== distribution.wasmSdkChecksum)
|
|
81469
81608
|
throw new Error(`framework SDK identity differs for ${alias.name}`);
|
|
81470
|
-
if ((0,
|
|
81609
|
+
if ((0, import_node_crypto68.createHash)("sha256").update(import_node_fs113.default.readFileSync(import_node_path116.default.join(moduleRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
|
|
81471
81610
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
81472
81611
|
const selected = /* @__PURE__ */ new Set();
|
|
81473
81612
|
const reach = (name3) => {
|
|
@@ -81508,7 +81647,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
|
81508
81647
|
for (const alias of owner.frameworkAliases) {
|
|
81509
81648
|
if (frameworkResponses[alias.name])
|
|
81510
81649
|
throw new Error(`ambiguous declared framework ${alias.name}`);
|
|
81511
|
-
if ((0,
|
|
81650
|
+
if ((0, import_node_crypto68.createHash)("sha256").update(import_node_fs113.default.readFileSync(import_node_path116.default.join(sdkRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
|
|
81512
81651
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
81513
81652
|
const file = import_node_path116.default.join(root, `${alias.name}.rsp`);
|
|
81514
81653
|
import_node_fs113.default.writeFileSync(file, aliasArtifacts.map(quote3).join("\n") + "\n");
|
|
@@ -81602,11 +81741,11 @@ exec ${shellQuote(configuration.compiler)} "$@"
|
|
|
81602
81741
|
};
|
|
81603
81742
|
return { cc: compiler("clang"), cxx: compiler("clang++"), identity: identity2 };
|
|
81604
81743
|
}
|
|
81605
|
-
var
|
|
81744
|
+
var import_node_crypto68, import_node_fs113, import_node_path116, v7;
|
|
81606
81745
|
var init_native_framework_compiler = __esm({
|
|
81607
81746
|
"src/native-framework-compiler.ts"() {
|
|
81608
81747
|
"use strict";
|
|
81609
|
-
|
|
81748
|
+
import_node_crypto68 = require("node:crypto");
|
|
81610
81749
|
import_node_fs113 = __toESM(require("node:fs"), 1);
|
|
81611
81750
|
import_node_path116 = __toESM(require("node:path"), 1);
|
|
81612
81751
|
v7 = __toESM(require("peachsim/vendor/valibot"), 1);
|
|
@@ -81636,7 +81775,7 @@ function llvmIdentity(toolchainBin, release) {
|
|
|
81636
81775
|
] : ["clang", "wasm-ld", "llvm-ar", "llvm-nm", "llvm-strip"].map(
|
|
81637
81776
|
(name3) => swiftFileChecksum(import_node_path117.default.join(toolchainBin, name3))
|
|
81638
81777
|
);
|
|
81639
|
-
const identity2 = (0,
|
|
81778
|
+
const identity2 = (0, import_node_crypto69.createHash)("sha256").update(JSON.stringify(components)).digest("hex");
|
|
81640
81779
|
toolIdentities.set(toolchainBin, identity2);
|
|
81641
81780
|
return identity2;
|
|
81642
81781
|
}
|
|
@@ -81644,7 +81783,7 @@ function cSdkIdentity(sysroot, resourceDir, frameworks) {
|
|
|
81644
81783
|
const key2 = JSON.stringify([sysroot, resourceDir, frameworks]);
|
|
81645
81784
|
const cached4 = sysrootIdentities.get(key2);
|
|
81646
81785
|
if (cached4) return cached4;
|
|
81647
|
-
const hash = (0,
|
|
81786
|
+
const hash = (0, import_node_crypto69.createHash)("sha256");
|
|
81648
81787
|
const add = (root, relative5) => {
|
|
81649
81788
|
const file = import_node_path117.default.join(root, relative5);
|
|
81650
81789
|
const stat2 = import_node_fs114.default.statSync(file, { throwIfNoEntry: false });
|
|
@@ -81679,7 +81818,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
81679
81818
|
import_node_fs114.default.readFileSync(import_node_path117.default.join(moduleRoot, SWIFT_FRAMEWORK_PRODUCT_FILE), "utf8")
|
|
81680
81819
|
)
|
|
81681
81820
|
);
|
|
81682
|
-
const hash = (0,
|
|
81821
|
+
const hash = (0, import_node_crypto69.createHash)("sha256").update(
|
|
81683
81822
|
JSON.stringify([
|
|
81684
81823
|
headers,
|
|
81685
81824
|
distribution.link,
|
|
@@ -81689,7 +81828,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
81689
81828
|
])
|
|
81690
81829
|
);
|
|
81691
81830
|
const objects = distribution.objects.map((file) => [file, distribution.files[file]]);
|
|
81692
|
-
const objectKey = (0,
|
|
81831
|
+
const objectKey = (0, import_node_crypto69.createHash)("sha256").update(JSON.stringify(objects)).digest("hex");
|
|
81693
81832
|
const cache = import_node_path117.default.join(cacheDir4, "framework-symbols-by-object", objectKey);
|
|
81694
81833
|
if (!import_node_fs114.default.existsSync(cache)) {
|
|
81695
81834
|
import_node_fs114.default.mkdirSync(import_node_path117.default.dirname(cache), { recursive: true });
|
|
@@ -81724,7 +81863,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
81724
81863
|
const digest3 = import_node_path117.default.join(temporary, "digest");
|
|
81725
81864
|
import_node_fs114.default.writeFileSync(
|
|
81726
81865
|
digest3,
|
|
81727
|
-
(0,
|
|
81866
|
+
(0, import_node_crypto69.createHash)("sha256").update(symbols.sort().join("\n")).digest("hex")
|
|
81728
81867
|
);
|
|
81729
81868
|
import_node_fs114.default.renameSync(digest3, cache);
|
|
81730
81869
|
} finally {
|
|
@@ -81779,7 +81918,7 @@ function buildable(declaration) {
|
|
|
81779
81918
|
return builderOf(declaration) !== null && declaration.dependencies.every(buildable);
|
|
81780
81919
|
}
|
|
81781
81920
|
function declarationInputs(declaration, builder, toolchain, dependencyKeys) {
|
|
81782
|
-
const hash = (0,
|
|
81921
|
+
const hash = (0, import_node_crypto69.createHash)("sha256");
|
|
81783
81922
|
const files2 = declaration.sources.filter(
|
|
81784
81923
|
(source) => !source.generator && !source.file.split(import_node_path117.default.sep).includes(".git")
|
|
81785
81924
|
).map((source) => import_node_path117.default.relative(declaration.packageDir, source.file));
|
|
@@ -81911,12 +82050,12 @@ function genruleArchive(declaration, library, moduleRoot) {
|
|
|
81911
82050
|
}
|
|
81912
82051
|
return combined;
|
|
81913
82052
|
}
|
|
81914
|
-
var import_node_child_process53,
|
|
82053
|
+
var import_node_child_process53, import_node_crypto69, import_node_fs114, import_node_os23, import_node_path117, v8, BUILDERS, cacheDir4, toolIdentities, sysrootIdentities, GENRULE_RECIPE, GENRULE_BUNDLE;
|
|
81915
82054
|
var init_genrule_archives = __esm({
|
|
81916
82055
|
"src/genrule-archives.ts"() {
|
|
81917
82056
|
"use strict";
|
|
81918
82057
|
import_node_child_process53 = require("node:child_process");
|
|
81919
|
-
|
|
82058
|
+
import_node_crypto69 = require("node:crypto");
|
|
81920
82059
|
import_node_fs114 = __toESM(require("node:fs"), 1);
|
|
81921
82060
|
import_node_os23 = __toESM(require("node:os"), 1);
|
|
81922
82061
|
import_node_path117 = __toESM(require("node:path"), 1);
|
|
@@ -82024,7 +82163,7 @@ function privateSentrySlice(entry, moduleRoot) {
|
|
|
82024
82163
|
function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact) {
|
|
82025
82164
|
if (standin.module !== SENTRY_SWIFT_SLICE.name) return standin;
|
|
82026
82165
|
const native = simulatorNativeLibrary(artifact());
|
|
82027
|
-
if (!native || (0,
|
|
82166
|
+
if (!native || (0, import_node_crypto70.createHash)("sha256").update(import_node_fs115.default.readFileSync(native.file)).digest("hex") !== SENTRY_SWIFT_SLICE.nativeSha256)
|
|
82028
82167
|
return standin;
|
|
82029
82168
|
if (configured)
|
|
82030
82169
|
throw new Error(
|
|
@@ -82082,12 +82221,12 @@ function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact)
|
|
|
82082
82221
|
}
|
|
82083
82222
|
};
|
|
82084
82223
|
}
|
|
82085
|
-
var import_node_child_process54,
|
|
82224
|
+
var import_node_child_process54, import_node_crypto70, import_node_fs115, import_node_os24, import_node_path118, SENTRY_SWIFT_SLICE;
|
|
82086
82225
|
var init_native_swift_slices = __esm({
|
|
82087
82226
|
"src/native-swift-slices.ts"() {
|
|
82088
82227
|
"use strict";
|
|
82089
82228
|
import_node_child_process54 = require("node:child_process");
|
|
82090
|
-
|
|
82229
|
+
import_node_crypto70 = require("node:crypto");
|
|
82091
82230
|
import_node_fs115 = __toESM(require("node:fs"), 1);
|
|
82092
82231
|
import_node_os24 = __toESM(require("node:os"), 1);
|
|
82093
82232
|
import_node_path118 = __toESM(require("node:path"), 1);
|
|
@@ -82514,8 +82653,8 @@ function withBuiltinStandinBehavior(behavior) {
|
|
|
82514
82653
|
for (const [module2, members2] of Object.entries(BUILTIN_STANDIN_BEHAVIOR))
|
|
82515
82654
|
merged[module2] = {
|
|
82516
82655
|
...Object.fromEntries(
|
|
82517
|
-
Object.entries(members2).map(([
|
|
82518
|
-
|
|
82656
|
+
Object.entries(members2).map(([path159, entry]) => [
|
|
82657
|
+
path159,
|
|
82519
82658
|
{ ...entry, builtin: true }
|
|
82520
82659
|
])
|
|
82521
82660
|
),
|
|
@@ -82823,7 +82962,7 @@ function treeDigest2(root) {
|
|
|
82823
82962
|
}).join("\n");
|
|
82824
82963
|
const memo2 = digests.get(`tree\0${root}`);
|
|
82825
82964
|
if (memo2?.stamp === stamp) return memo2.digest;
|
|
82826
|
-
const hash = (0,
|
|
82965
|
+
const hash = (0, import_node_crypto71.createHash)("sha256");
|
|
82827
82966
|
for (const name3 of names) {
|
|
82828
82967
|
hash.update(`${name3}\0`);
|
|
82829
82968
|
hash.update(import_node_fs119.default.readFileSync(import_node_path121.default.join(root, name3)));
|
|
@@ -82870,7 +83009,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
82870
83009
|
const found4 = locateXcframework(import_node_path121.default.join(dir, "tree"));
|
|
82871
83010
|
if (found4) return { dir: found4, digest: stored.sha };
|
|
82872
83011
|
}
|
|
82873
|
-
const sha2 = (0,
|
|
83012
|
+
const sha2 = (0, import_node_crypto71.createHash)("sha256").update(import_node_fs119.default.readFileSync(binary2.dir)).digest("hex");
|
|
82874
83013
|
if (sha2 !== stored?.sha || !locateXcframework(import_node_path121.default.join(dir, "tree"))) {
|
|
82875
83014
|
import_node_fs119.default.rmSync(dir, { recursive: true, force: true });
|
|
82876
83015
|
import_node_fs119.default.mkdirSync(import_node_path121.default.join(dir, "tree"), { recursive: true });
|
|
@@ -82882,7 +83021,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
82882
83021
|
return { dir: found3, digest: sha2 };
|
|
82883
83022
|
}
|
|
82884
83023
|
if (stored && import_node_fs119.default.existsSync(archive)) {
|
|
82885
|
-
const sha2 = (0,
|
|
83024
|
+
const sha2 = (0, import_node_crypto71.createHash)("sha256").update(import_node_fs119.default.readFileSync(archive)).digest("hex");
|
|
82886
83025
|
if (sha2 !== expected)
|
|
82887
83026
|
throw new Error(`archive checksum ${sha2} is not the declared checksum ${expected}`);
|
|
82888
83027
|
const found3 = locateXcframework(import_node_path121.default.join(dir, "tree"));
|
|
@@ -82891,7 +83030,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
82891
83030
|
import_node_fs119.default.rmSync(dir, { recursive: true, force: true });
|
|
82892
83031
|
import_node_fs119.default.mkdirSync(import_node_path121.default.join(dir, "tree"), { recursive: true });
|
|
82893
83032
|
exec("curl", ["-fsSL", "--retry", "2", "-o", archive, binary2.url]);
|
|
82894
|
-
const sha = (0,
|
|
83033
|
+
const sha = (0, import_node_crypto71.createHash)("sha256").update(import_node_fs119.default.readFileSync(archive)).digest("hex");
|
|
82895
83034
|
if (sha !== expected) {
|
|
82896
83035
|
import_node_fs119.default.rmSync(dir, { recursive: true, force: true });
|
|
82897
83036
|
throw new Error(`archive checksum ${sha} is not the declared checksum ${expected}`);
|
|
@@ -83016,7 +83155,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
|
|
|
83016
83155
|
});
|
|
83017
83156
|
}
|
|
83018
83157
|
}
|
|
83019
|
-
const declaredDigest = (0,
|
|
83158
|
+
const declaredDigest = (0, import_node_crypto71.createHash)("sha256");
|
|
83020
83159
|
for (const framework of providedFrameworks)
|
|
83021
83160
|
declaredDigest.update(`provided/${import_node_path121.default.relative(artifact.dir, framework)}\0`);
|
|
83022
83161
|
for (const [framework, { declared: names, imports: imports2, sdkHeader }] of declared)
|
|
@@ -83086,7 +83225,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
|
|
|
83086
83225
|
import_node_fs119.default.copyFileSync(surface.modulemap, modulemap);
|
|
83087
83226
|
}
|
|
83088
83227
|
}
|
|
83089
|
-
const contents2 = (0,
|
|
83228
|
+
const contents2 = (0, import_node_crypto71.createHash)("sha256");
|
|
83090
83229
|
for (const framework of providedFrameworks.filter((item) => !declared.has(item))) {
|
|
83091
83230
|
const modulemap = import_node_path121.default.join(
|
|
83092
83231
|
pending,
|
|
@@ -84501,7 +84640,7 @@ function crateSourceRoots(manifest, searchRoot) {
|
|
|
84501
84640
|
return roots;
|
|
84502
84641
|
}
|
|
84503
84642
|
function crateSourceDigest(manifest, searchRoot) {
|
|
84504
|
-
const hash = (0,
|
|
84643
|
+
const hash = (0, import_node_crypto71.createHash)("sha256");
|
|
84505
84644
|
const walk4 = (dir, root) => {
|
|
84506
84645
|
for (const entry of import_node_fs119.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name < right.name ? -1 : 1)) {
|
|
84507
84646
|
const full = import_node_path121.default.join(dir, entry.name);
|
|
@@ -84948,7 +85087,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
|
|
|
84948
85087
|
...swiftSources.flags,
|
|
84949
85088
|
...swiftSources.sources.flatMap((source) => [
|
|
84950
85089
|
source,
|
|
84951
|
-
(0,
|
|
85090
|
+
(0, import_node_crypto71.createHash)("sha256").update(import_node_fs119.default.readFileSync(import_node_path121.default.join(binary2.dir, source))).digest("hex")
|
|
84952
85091
|
])
|
|
84953
85092
|
);
|
|
84954
85093
|
continue;
|
|
@@ -84984,7 +85123,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
|
|
|
84984
85123
|
);
|
|
84985
85124
|
}
|
|
84986
85125
|
}
|
|
84987
|
-
return (0,
|
|
85126
|
+
return (0, import_node_crypto71.createHash)("sha256").update(parts.join("\0")).digest("hex");
|
|
84988
85127
|
}
|
|
84989
85128
|
function missingArtifactGap(binary2) {
|
|
84990
85129
|
if (swiftBinaryOnDisk(binary2)) return null;
|
|
@@ -85066,7 +85205,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
85066
85205
|
return NO_IMPORTABLE_SURFACE;
|
|
85067
85206
|
}
|
|
85068
85207
|
const configured = new Map(Object.entries(behavior));
|
|
85069
|
-
const hash = (0,
|
|
85208
|
+
const hash = (0, import_node_crypto71.createHash)("sha256").update(
|
|
85070
85209
|
standinGenerationInputs([binary2], toolchain, behavior)
|
|
85071
85210
|
);
|
|
85072
85211
|
hash.update(digest3);
|
|
@@ -85306,7 +85445,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
85306
85445
|
);
|
|
85307
85446
|
if (binary2.moduleSources !== void 0)
|
|
85308
85447
|
frameworkInputs.push(
|
|
85309
|
-
`${binary2.target}\0${(0,
|
|
85448
|
+
`${binary2.target}\0${(0, import_node_crypto71.createHash)("sha256").update(
|
|
85310
85449
|
[iosSdkId(), ...swiftSources.flags, ...swiftSources.sources, ...texts].join(
|
|
85311
85450
|
"\0"
|
|
85312
85451
|
)
|
|
@@ -85347,7 +85486,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
85347
85486
|
import_node_fs119.default.mkdirSync(sourceFrameworks);
|
|
85348
85487
|
const frameworks = {
|
|
85349
85488
|
dirs: [...frameworkDirs, sourceFrameworks].sort(),
|
|
85350
|
-
digest: (0,
|
|
85489
|
+
digest: (0, import_node_crypto71.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
|
|
85351
85490
|
surfaces: frameworkSurfaces
|
|
85352
85491
|
};
|
|
85353
85492
|
const siblings = new Map(
|
|
@@ -85466,12 +85605,12 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
85466
85605
|
import_node_fs119.default.rmSync(modules, { recursive: true, force: true });
|
|
85467
85606
|
}
|
|
85468
85607
|
}
|
|
85469
|
-
var import_node_child_process56,
|
|
85608
|
+
var import_node_child_process56, import_node_crypto71, 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;
|
|
85470
85609
|
var init_swift_standins = __esm({
|
|
85471
85610
|
"src/swift-standins.ts"() {
|
|
85472
85611
|
"use strict";
|
|
85473
85612
|
import_node_child_process56 = require("node:child_process");
|
|
85474
|
-
|
|
85613
|
+
import_node_crypto71 = require("node:crypto");
|
|
85475
85614
|
import_node_fs119 = __toESM(require("node:fs"), 1);
|
|
85476
85615
|
import_node_path121 = __toESM(require("node:path"), 1);
|
|
85477
85616
|
init_forked_script_contract();
|
|
@@ -85503,7 +85642,7 @@ var init_swift_standins = __esm({
|
|
|
85503
85642
|
init_swiftTargetContract();
|
|
85504
85643
|
TRIPLE = SWIFT_WASM_TRIPLE;
|
|
85505
85644
|
cacheDir5 = import_node_path121.default.join(cacheDir(), "swift-standins");
|
|
85506
|
-
key = (...parts) => (0,
|
|
85645
|
+
key = (...parts) => (0, import_node_crypto71.createHash)("sha256").update(parts.join("\0")).digest("hex").slice(0, 32);
|
|
85507
85646
|
digests = /* @__PURE__ */ new Map();
|
|
85508
85647
|
isBinaryLibraryFile = (file) => /\.(?:a|dylib|o|tbd)$/i.test(file);
|
|
85509
85648
|
OBJC_IMPORT = /#\s*(?:import|include)\s*[<"](?:[\w+-]+\/)?([\w+.-]+\.h)[>"]/g;
|
|
@@ -85741,14 +85880,14 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
|
|
|
85741
85880
|
Infinity
|
|
85742
85881
|
);
|
|
85743
85882
|
const backport = DOUBLE_CONVERSION_WASM64_BACKPORT;
|
|
85744
|
-
if (import_node_path122.default.basename(file) !== "utils.h" || (0,
|
|
85883
|
+
if (import_node_path122.default.basename(file) !== "utils.h" || (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex") !== backport.originalSha256) {
|
|
85745
85884
|
sources.set(file, bytes);
|
|
85746
85885
|
return;
|
|
85747
85886
|
}
|
|
85748
85887
|
const derived = Buffer.from(
|
|
85749
85888
|
bytes.toString("utf8").replace(backport.before, backport.after)
|
|
85750
85889
|
);
|
|
85751
|
-
if ((0,
|
|
85890
|
+
if ((0, import_node_crypto72.createHash)("sha256").update(derived).digest("hex") !== backport.derivedSha256)
|
|
85752
85891
|
throw new Error(`DoubleConversion backport derived source differs: ${file}`);
|
|
85753
85892
|
sources.set(file, derived);
|
|
85754
85893
|
derivations[file] = {
|
|
@@ -86154,7 +86293,7 @@ function prepareXcodeSwiftProducts(app, binaries, moduleRoot) {
|
|
|
86154
86293
|
const staged = withFrameworkCompanionImports(original);
|
|
86155
86294
|
if (staged !== original) sources.set(file, Buffer.from(staged));
|
|
86156
86295
|
}
|
|
86157
|
-
const digest3 = (bytes) => (0,
|
|
86296
|
+
const digest3 = (bytes) => (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex");
|
|
86158
86297
|
const providers = /* @__PURE__ */ new Map();
|
|
86159
86298
|
for (const target of targets) {
|
|
86160
86299
|
if (!supplied.has(target.moduleName)) continue;
|
|
@@ -86508,7 +86647,7 @@ async function prepareXcodeNativeInputs(app, binaries, moduleRoot, purpose) {
|
|
|
86508
86647
|
products
|
|
86509
86648
|
);
|
|
86510
86649
|
const checkouts = remoteSwiftCheckouts(app.rootDir);
|
|
86511
|
-
const digest3 = (bytes) => (0,
|
|
86650
|
+
const digest3 = (bytes) => (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex");
|
|
86512
86651
|
const inputs2 = Object.fromEntries(
|
|
86513
86652
|
[...sources].map(([file, bytes]) => [file, digest3(bytes)])
|
|
86514
86653
|
);
|
|
@@ -86872,12 +87011,12 @@ ${reported.trimEnd() || `Clang exited with status ${result.status}`}`;
|
|
|
86872
87011
|
import_node_fs120.default.closeSync(descriptor);
|
|
86873
87012
|
}
|
|
86874
87013
|
}
|
|
86875
|
-
var import_node_child_process57,
|
|
87014
|
+
var import_node_child_process57, import_node_crypto72, import_node_fs120, import_node_path122, SwiftObjCCompilationError, isDirectory4, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT;
|
|
86876
87015
|
var init_swift_objc_compile = __esm({
|
|
86877
87016
|
"src/swift-objc-compile.ts"() {
|
|
86878
87017
|
"use strict";
|
|
86879
87018
|
import_node_child_process57 = require("node:child_process");
|
|
86880
|
-
|
|
87019
|
+
import_node_crypto72 = require("node:crypto");
|
|
86881
87020
|
import_node_fs120 = __toESM(require("node:fs"), 1);
|
|
86882
87021
|
import_node_path122 = __toESM(require("node:path"), 1);
|
|
86883
87022
|
init_mapLimit();
|
|
@@ -87712,10 +87851,10 @@ var require_path_parse = __commonJS({
|
|
|
87712
87851
|
code === 45 || /* - */
|
|
87713
87852
|
code === 46;
|
|
87714
87853
|
}
|
|
87715
|
-
function State(
|
|
87854
|
+
function State(path159) {
|
|
87716
87855
|
this.index = 0;
|
|
87717
|
-
this.path =
|
|
87718
|
-
this.max =
|
|
87856
|
+
this.path = path159;
|
|
87857
|
+
this.max = path159.length;
|
|
87719
87858
|
this.result = [];
|
|
87720
87859
|
this.param = 0;
|
|
87721
87860
|
this.err = "";
|
|
@@ -88089,7 +88228,7 @@ var require_a2c = __commonJS({
|
|
|
88089
88228
|
}
|
|
88090
88229
|
return sign * Math.acos(dot);
|
|
88091
88230
|
}
|
|
88092
|
-
function get_arc_center(x1, y1, x2, y2, fa,
|
|
88231
|
+
function get_arc_center(x1, y1, x2, y2, fa, fs121, rx, ry, sin_phi, cos_phi) {
|
|
88093
88232
|
var x1p = cos_phi * (x1 - x2) / 2 + sin_phi * (y1 - y2) / 2;
|
|
88094
88233
|
var y1p = -sin_phi * (x1 - x2) / 2 + cos_phi * (y1 - y2) / 2;
|
|
88095
88234
|
var rx_sq = rx * rx;
|
|
@@ -88101,7 +88240,7 @@ var require_a2c = __commonJS({
|
|
|
88101
88240
|
radicant = 0;
|
|
88102
88241
|
}
|
|
88103
88242
|
radicant /= rx_sq * y1p_sq + ry_sq * x1p_sq;
|
|
88104
|
-
radicant = Math.sqrt(radicant) * (fa ===
|
|
88243
|
+
radicant = Math.sqrt(radicant) * (fa === fs121 ? -1 : 1);
|
|
88105
88244
|
var cxp = radicant * rx / ry * y1p;
|
|
88106
88245
|
var cyp = radicant * -ry / rx * x1p;
|
|
88107
88246
|
var cx = cos_phi * cxp - sin_phi * cyp + (x1 + x2) / 2;
|
|
@@ -88112,10 +88251,10 @@ var require_a2c = __commonJS({
|
|
|
88112
88251
|
var v2y = (-y1p - cyp) / ry;
|
|
88113
88252
|
var theta1 = unit_vector_angle(1, 0, v1x, v1y);
|
|
88114
88253
|
var delta_theta = unit_vector_angle(v1x, v1y, v2x, v2y);
|
|
88115
|
-
if (
|
|
88254
|
+
if (fs121 === 0 && delta_theta > 0) {
|
|
88116
88255
|
delta_theta -= TAU;
|
|
88117
88256
|
}
|
|
88118
|
-
if (
|
|
88257
|
+
if (fs121 === 1 && delta_theta < 0) {
|
|
88119
88258
|
delta_theta += TAU;
|
|
88120
88259
|
}
|
|
88121
88260
|
return [cx, cy, theta1, delta_theta];
|
|
@@ -88128,7 +88267,7 @@ var require_a2c = __commonJS({
|
|
|
88128
88267
|
var y2 = Math.sin(theta1 + delta_theta);
|
|
88129
88268
|
return [x1, y1, x1 - y1 * alpha, y1 + x1 * alpha, x2 + y2 * alpha, y2 - x2 * alpha, x2, y2];
|
|
88130
88269
|
}
|
|
88131
|
-
module2.exports = function a2c(x1, y1, x2, y2, fa,
|
|
88270
|
+
module2.exports = function a2c(x1, y1, x2, y2, fa, fs121, rx, ry, phi) {
|
|
88132
88271
|
var sin_phi = Math.sin(phi * TAU / 360);
|
|
88133
88272
|
var cos_phi = Math.cos(phi * TAU / 360);
|
|
88134
88273
|
var x1p = cos_phi * (x1 - x2) / 2 + sin_phi * (y1 - y2) / 2;
|
|
@@ -88146,7 +88285,7 @@ var require_a2c = __commonJS({
|
|
|
88146
88285
|
rx *= Math.sqrt(lambda);
|
|
88147
88286
|
ry *= Math.sqrt(lambda);
|
|
88148
88287
|
}
|
|
88149
|
-
var cc = get_arc_center(x1, y1, x2, y2, fa,
|
|
88288
|
+
var cc = get_arc_center(x1, y1, x2, y2, fa, fs121, rx, ry, sin_phi, cos_phi);
|
|
88150
88289
|
var result = [];
|
|
88151
88290
|
var theta1 = cc[2];
|
|
88152
88291
|
var delta_theta = cc[3];
|
|
@@ -88235,11 +88374,11 @@ var require_svgpath = __commonJS({
|
|
|
88235
88374
|
var matrix = require_matrix();
|
|
88236
88375
|
var a2c = require_a2c();
|
|
88237
88376
|
var ellipse = require_ellipse();
|
|
88238
|
-
function SvgPath(
|
|
88377
|
+
function SvgPath(path159) {
|
|
88239
88378
|
if (!(this instanceof SvgPath)) {
|
|
88240
|
-
return new SvgPath(
|
|
88379
|
+
return new SvgPath(path159);
|
|
88241
88380
|
}
|
|
88242
|
-
var pstate = pathParse(
|
|
88381
|
+
var pstate = pathParse(path159);
|
|
88243
88382
|
this.segments = pstate.segments;
|
|
88244
88383
|
this.err = pstate.err;
|
|
88245
88384
|
this.__stack = [];
|
|
@@ -88722,8 +88861,8 @@ function imagesetFiles(images) {
|
|
|
88722
88861
|
function bundleImageRenditionKey(file, scale) {
|
|
88723
88862
|
return extOf(file) === ".svg" ? `${file}/${scale}x.png` : file;
|
|
88724
88863
|
}
|
|
88725
|
-
function flatScale(
|
|
88726
|
-
const match = /@([23])x\.[^./]+$/.exec(
|
|
88864
|
+
function flatScale(path159) {
|
|
88865
|
+
const match = /@([23])x\.[^./]+$/.exec(path159);
|
|
88727
88866
|
return match ? Number(match[1]) : 1;
|
|
88728
88867
|
}
|
|
88729
88868
|
function providesNamespace(text7) {
|
|
@@ -88750,8 +88889,8 @@ function catalogEntryName(contentsPath, kind, readText) {
|
|
|
88750
88889
|
}
|
|
88751
88890
|
return segments.join("/");
|
|
88752
88891
|
}
|
|
88753
|
-
function isFlatResourceImage(
|
|
88754
|
-
return
|
|
88892
|
+
function isFlatResourceImage(path159) {
|
|
88893
|
+
return path159.split("/").includes("Resources") && RASTER_EXTENSIONS.has(extOf(path159));
|
|
88755
88894
|
}
|
|
88756
88895
|
function enumerateBundleImages(paths, readText, bundleForFile = () => ".") {
|
|
88757
88896
|
const table = [];
|
|
@@ -88764,7 +88903,7 @@ function enumerateBundleImages(paths, readText, bundleForFile = () => ".") {
|
|
|
88764
88903
|
seen.set(bundlePath, names);
|
|
88765
88904
|
return { bundlePath, names };
|
|
88766
88905
|
};
|
|
88767
|
-
const catalogs = paths.filter((
|
|
88906
|
+
const catalogs = paths.filter((path159) => baseOf(path159) === "Contents.json");
|
|
88768
88907
|
for (const contentsPath of catalogs) {
|
|
88769
88908
|
const name3 = catalogEntryName(contentsPath, ".imageset", readText);
|
|
88770
88909
|
if (name3 === null) continue;
|
|
@@ -88797,16 +88936,16 @@ function enumerateBundleImages(paths, readText, bundleForFile = () => ".") {
|
|
|
88797
88936
|
...intent === "template" || intent === "original" ? { renderingMode: intent } : {}
|
|
88798
88937
|
});
|
|
88799
88938
|
}
|
|
88800
|
-
for (const
|
|
88801
|
-
if (!isFlatResourceImage(
|
|
88802
|
-
const filename = baseOf(
|
|
88939
|
+
for (const path159 of paths) {
|
|
88940
|
+
if (!isFlatResourceImage(path159)) continue;
|
|
88941
|
+
const filename = baseOf(path159);
|
|
88803
88942
|
const name3 = filename.slice(0, -extOf(filename).length);
|
|
88804
|
-
const { bundlePath, names } = namesFor(
|
|
88943
|
+
const { bundlePath, names } = namesFor(path159);
|
|
88805
88944
|
if (name3 === "" || names.has(name3)) continue;
|
|
88806
88945
|
names.add(name3);
|
|
88807
88946
|
const scaledFilename = filename.replace(/@[23]x(?=\.[^./]+$)/, "");
|
|
88808
88947
|
const fileNames = (scaledFilename === filename ? [filename] : [filename, scaledFilename]).filter((lookup4) => !names.has(lookup4));
|
|
88809
|
-
table.push({ name: name3, file:
|
|
88948
|
+
table.push({ name: name3, file: path159, scale: flatScale(path159), bundlePath, fileNames });
|
|
88810
88949
|
}
|
|
88811
88950
|
return table;
|
|
88812
88951
|
}
|
|
@@ -88841,7 +88980,7 @@ function colorsetValue(color) {
|
|
|
88841
88980
|
}
|
|
88842
88981
|
function enumerateBundleColors(paths, readText) {
|
|
88843
88982
|
const table = {};
|
|
88844
|
-
for (const contentsPath of paths.filter((
|
|
88983
|
+
for (const contentsPath of paths.filter((path159) => baseOf(path159) === "Contents.json")) {
|
|
88845
88984
|
const name3 = catalogEntryName(contentsPath, ".colorset", readText);
|
|
88846
88985
|
if (name3 === null || name3 in table) continue;
|
|
88847
88986
|
let colors;
|
|
@@ -88905,8 +89044,8 @@ function axisExtremes(points) {
|
|
|
88905
89044
|
function pathBounds(d) {
|
|
88906
89045
|
const xs = [];
|
|
88907
89046
|
const ys = [];
|
|
88908
|
-
for (const
|
|
88909
|
-
(0, import_svgpath.default)(
|
|
89047
|
+
for (const path159 of d)
|
|
89048
|
+
(0, import_svgpath.default)(path159).abs().unshort().unarc().iterate((segment2, _index, x, y) => {
|
|
88910
89049
|
const [command, ...args] = segment2;
|
|
88911
89050
|
if (command === "M" || command === "L") {
|
|
88912
89051
|
xs.push(Number(args[0]));
|
|
@@ -88972,7 +89111,7 @@ function guide(elements, id, axis) {
|
|
|
88972
89111
|
}
|
|
88973
89112
|
function enumerateBundleSymbols(paths, readText, bundleForFile) {
|
|
88974
89113
|
const table = {};
|
|
88975
|
-
for (const contentsPath of paths.filter((
|
|
89114
|
+
for (const contentsPath of paths.filter((path159) => baseOf(path159) === "Contents.json")) {
|
|
88976
89115
|
const name3 = catalogEntryName(contentsPath, ".symbolset", readText);
|
|
88977
89116
|
if (name3 === null) continue;
|
|
88978
89117
|
const bundle = bundleForFile(contentsPath);
|
|
@@ -89038,8 +89177,8 @@ function enumerateBundleSymbols(paths, readText, bundleForFile) {
|
|
|
89038
89177
|
advance,
|
|
89039
89178
|
box: [12 - wide2 / 2, 12 - tall / 2, wide2, tall],
|
|
89040
89179
|
...bearings ? { customLayout: { bearings, verticalOutset, descent } } : {},
|
|
89041
|
-
layers: d.map((
|
|
89042
|
-
d: (0, import_svgpath.default)(
|
|
89180
|
+
layers: d.map((path159) => ({
|
|
89181
|
+
d: (0, import_svgpath.default)(path159).abs().scale(em).translate(translateX, translateY).round(3).toString()
|
|
89043
89182
|
}))
|
|
89044
89183
|
};
|
|
89045
89184
|
table[vectorKey] = vector;
|
|
@@ -89050,13 +89189,13 @@ function enumerateBundleSymbols(paths, readText, bundleForFile) {
|
|
|
89050
89189
|
}
|
|
89051
89190
|
return table;
|
|
89052
89191
|
}
|
|
89053
|
-
function isCopiedResource(
|
|
89054
|
-
const segments =
|
|
89192
|
+
function isCopiedResource(path159, copiedBundle, copyLooseRasters) {
|
|
89193
|
+
const segments = path159.split("/");
|
|
89055
89194
|
if (segments.some((segment2) => /\.(atlasc|bundle|storyboardc|nib|momd)$/.test(segment2)))
|
|
89056
89195
|
return true;
|
|
89057
89196
|
if (segments.some((segment2) => /\.xcdatamodeld?$/.test(segment2))) return false;
|
|
89058
89197
|
if (copiedBundle) return true;
|
|
89059
|
-
const ext = extOf(
|
|
89198
|
+
const ext = extOf(path159);
|
|
89060
89199
|
if (ext === ".json" || ext === ".xcstrings") return true;
|
|
89061
89200
|
return !COMPILED_EXTENSIONS.has(ext) && (copyLooseRasters || !RASTER_EXTENSIONS.has(ext)) && !segments.some((segment2) => segment2.endsWith(".xcassets"));
|
|
89062
89201
|
}
|
|
@@ -89064,7 +89203,7 @@ function enumerateBundleResources(paths, { copiedBundle = false, copyLooseRaster
|
|
|
89064
89203
|
const found2 = [];
|
|
89065
89204
|
const seen = /* @__PURE__ */ new Set();
|
|
89066
89205
|
const ordered = [...paths].filter(
|
|
89067
|
-
(
|
|
89206
|
+
(path159) => path159.split("/").includes("Resources") && path159.split("/").every((segment2) => segment2 !== "" && segment2 !== "..") && isCopiedResource(path159, copiedBundle, copyLooseRasters)
|
|
89068
89207
|
).sort((a, b) => {
|
|
89069
89208
|
const aDepth = a.split("/").length;
|
|
89070
89209
|
const bDepth = b.split("/").length;
|
|
@@ -89229,31 +89368,31 @@ function tokens(text7) {
|
|
|
89229
89368
|
}
|
|
89230
89369
|
return result;
|
|
89231
89370
|
}
|
|
89232
|
-
function qualified(language, key2,
|
|
89233
|
-
return `(${language}: ${key2}${
|
|
89371
|
+
function qualified(language, key2, path159) {
|
|
89372
|
+
return `(${language}: ${key2}${path159 === "" ? "" : "|==|" + path159})`;
|
|
89234
89373
|
}
|
|
89235
|
-
function requiresNumber(language, key2,
|
|
89374
|
+
function requiresNumber(language, key2, path159) {
|
|
89236
89375
|
return Error(
|
|
89237
|
-
"Plural variation requires referencing the number in the string. To maintain grammatical correctness for strings that do not reference the number of items, use separate top-level strings for one and greater than one. " + qualified(language, key2,
|
|
89376
|
+
"Plural variation requires referencing the number in the string. To maintain grammatical correctness for strings that do not reference the number of items, use separate top-level strings for one and greater than one. " + qualified(language, key2, path159)
|
|
89238
89377
|
);
|
|
89239
89378
|
}
|
|
89240
|
-
function moreThanOne(language, key2,
|
|
89379
|
+
function moreThanOne(language, key2, path159) {
|
|
89241
89380
|
return Error(
|
|
89242
|
-
"Cannot infer format specifier for string group because more than one numerical specifier was found " + qualified(language, key2,
|
|
89381
|
+
"Cannot infer format specifier for string group because more than one numerical specifier was found " + qualified(language, key2, path159)
|
|
89243
89382
|
);
|
|
89244
89383
|
}
|
|
89245
89384
|
function schemaPath(segments) {
|
|
89246
89385
|
return segments.map((segment2) => `'${segment2}'`).join(" -> ");
|
|
89247
89386
|
}
|
|
89248
|
-
function checkUnitShape(node,
|
|
89387
|
+
function checkUnitShape(node, path159) {
|
|
89249
89388
|
const raw2 = node.stringUnit;
|
|
89250
89389
|
if (raw2 === void 0)
|
|
89251
|
-
throw Error(`Missing required key 'stringUnit' inside ${schemaPath(
|
|
89390
|
+
throw Error(`Missing required key 'stringUnit' inside ${schemaPath(path159)}`);
|
|
89252
89391
|
if (raw2 === null)
|
|
89253
|
-
throw Error(`Missing required value for key 'stringUnit' inside ${schemaPath(
|
|
89392
|
+
throw Error(`Missing required value for key 'stringUnit' inside ${schemaPath(path159)}`);
|
|
89254
89393
|
if (!isRecord6(raw2))
|
|
89255
|
-
throw Error(`Expected dictionary for key 'stringUnit' inside ${schemaPath(
|
|
89256
|
-
const unitPath = [...
|
|
89394
|
+
throw Error(`Expected dictionary for key 'stringUnit' inside ${schemaPath(path159)}`);
|
|
89395
|
+
const unitPath = [...path159, "stringUnit"];
|
|
89257
89396
|
if (!Object.hasOwn(raw2, "state"))
|
|
89258
89397
|
throw Error(`Missing required key 'state' inside ${schemaPath(unitPath)}`);
|
|
89259
89398
|
const state = raw2.state;
|
|
@@ -89270,38 +89409,38 @@ function checkUnitShape(node, path158) {
|
|
|
89270
89409
|
throw Error(`Expected string for key 'value' inside ${schemaPath(unitPath)}`);
|
|
89271
89410
|
return value;
|
|
89272
89411
|
}
|
|
89273
|
-
function checkPluralShape(node,
|
|
89412
|
+
function checkPluralShape(node, path159) {
|
|
89274
89413
|
for (const [category, raw2] of Object.entries(node)) {
|
|
89275
|
-
const categoryPath = [...
|
|
89414
|
+
const categoryPath = [...path159, category];
|
|
89276
89415
|
if (raw2 === null)
|
|
89277
89416
|
throw Error(
|
|
89278
|
-
`Missing required value for key '${category}' inside ${schemaPath(
|
|
89417
|
+
`Missing required value for key '${category}' inside ${schemaPath(path159)}`
|
|
89279
89418
|
);
|
|
89280
89419
|
if (!isRecord6(raw2))
|
|
89281
|
-
throw Error(`Expected dictionary for key '${category}' inside ${schemaPath(
|
|
89420
|
+
throw Error(`Expected dictionary for key '${category}' inside ${schemaPath(path159)}`);
|
|
89282
89421
|
checkUnitShape(raw2, categoryPath);
|
|
89283
89422
|
}
|
|
89284
89423
|
}
|
|
89285
|
-
function checkLocalizationShape(node,
|
|
89424
|
+
function checkLocalizationShape(node, path159, deviceValue = false) {
|
|
89286
89425
|
if (node === null)
|
|
89287
89426
|
throw Error(
|
|
89288
|
-
`Missing required value for key '${
|
|
89427
|
+
`Missing required value for key '${path159[path159.length - 1]}' inside ${schemaPath(path159.slice(0, -1))}`
|
|
89289
89428
|
);
|
|
89290
89429
|
if (!isRecord6(node))
|
|
89291
89430
|
throw Error(
|
|
89292
|
-
`Expected dictionary for key '${
|
|
89431
|
+
`Expected dictionary for key '${path159[path159.length - 1]}' inside ${schemaPath(path159.slice(0, -1))}`
|
|
89293
89432
|
);
|
|
89294
|
-
if (Object.hasOwn(node, "variations")) checkVariationsShape(node.variations,
|
|
89433
|
+
if (Object.hasOwn(node, "variations")) checkVariationsShape(node.variations, path159);
|
|
89295
89434
|
if (!deviceValue && Object.hasOwn(node, "substitutions"))
|
|
89296
|
-
checkSubstitutionsShape(node.substitutions,
|
|
89297
|
-
if (!Object.hasOwn(node, "variations")) checkUnitShape(node,
|
|
89435
|
+
checkSubstitutionsShape(node.substitutions, path159);
|
|
89436
|
+
if (!Object.hasOwn(node, "variations")) checkUnitShape(node, path159);
|
|
89298
89437
|
}
|
|
89299
|
-
function checkVariationsShape(variations,
|
|
89438
|
+
function checkVariationsShape(variations, path159) {
|
|
89300
89439
|
if (variations === null)
|
|
89301
|
-
throw Error(`Missing required value for key 'variations' inside ${schemaPath(
|
|
89440
|
+
throw Error(`Missing required value for key 'variations' inside ${schemaPath(path159)}`);
|
|
89302
89441
|
if (!isRecord6(variations))
|
|
89303
|
-
throw Error(`Expected dictionary for key 'variations' inside ${schemaPath(
|
|
89304
|
-
const variationsPath = [...
|
|
89442
|
+
throw Error(`Expected dictionary for key 'variations' inside ${schemaPath(path159)}`);
|
|
89443
|
+
const variationsPath = [...path159, "variations"];
|
|
89305
89444
|
for (const [type, raw2] of Object.entries(variations)) {
|
|
89306
89445
|
if (raw2 === null)
|
|
89307
89446
|
throw Error(
|
|
@@ -89327,11 +89466,11 @@ function checkVariationsShape(variations, path158) {
|
|
|
89327
89466
|
}
|
|
89328
89467
|
}
|
|
89329
89468
|
}
|
|
89330
|
-
function checkSubstitutionsShape(substitutions,
|
|
89469
|
+
function checkSubstitutionsShape(substitutions, path159) {
|
|
89331
89470
|
if (substitutions === null) return;
|
|
89332
89471
|
if (!isRecord6(substitutions))
|
|
89333
|
-
throw Error(`Expected dictionary for key 'substitutions' inside ${schemaPath(
|
|
89334
|
-
const substitutionsPath = [...
|
|
89472
|
+
throw Error(`Expected dictionary for key 'substitutions' inside ${schemaPath(path159)}`);
|
|
89473
|
+
const substitutionsPath = [...path159, "substitutions"];
|
|
89335
89474
|
for (const [name3, raw2] of Object.entries(substitutions)) {
|
|
89336
89475
|
const subPath = [...substitutionsPath, name3];
|
|
89337
89476
|
if (raw2 === null)
|
|
@@ -89373,10 +89512,10 @@ function scanSpecs(forms) {
|
|
|
89373
89512
|
}
|
|
89374
89513
|
return specs;
|
|
89375
89514
|
}
|
|
89376
|
-
function inferPlural(forms, language, key2,
|
|
89515
|
+
function inferPlural(forms, language, key2, path159) {
|
|
89377
89516
|
const specs = scanSpecs(forms);
|
|
89378
|
-
if (specs.size === 0) throw requiresNumber(language, key2,
|
|
89379
|
-
if (specs.size > 1) throw moreThanOne(language, key2,
|
|
89517
|
+
if (specs.size === 0) throw requiresNumber(language, key2, path159);
|
|
89518
|
+
if (specs.size > 1) throw moreThanOne(language, key2, path159);
|
|
89380
89519
|
return [...specs.values()][0] ?? { specifier: "", argument: 0 };
|
|
89381
89520
|
}
|
|
89382
89521
|
function unit(value) {
|
|
@@ -89845,8 +89984,8 @@ function plist5(value, depth) {
|
|
|
89845
89984
|
}
|
|
89846
89985
|
function compileStringCatalog(source, name3) {
|
|
89847
89986
|
return Object.fromEntries(
|
|
89848
|
-
Object.entries(compileCatalogTables(source, name3)).map(([
|
|
89849
|
-
|
|
89987
|
+
Object.entries(compileCatalogTables(source, name3)).map(([path159, table]) => [
|
|
89988
|
+
path159,
|
|
89850
89989
|
'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n<plist version="1.0">\n' + plist5(table, 0) + "</plist>\n"
|
|
89851
89990
|
])
|
|
89852
89991
|
);
|
|
@@ -91042,11 +91181,11 @@ function coreDataModelDirectories(files2) {
|
|
|
91042
91181
|
}
|
|
91043
91182
|
return [...models].sort();
|
|
91044
91183
|
}
|
|
91045
|
-
var
|
|
91184
|
+
var import_node_crypto73, import_node_fs124, import_node_path126, attributeTypes, deleteRules, EXTERNAL_BINARY, PRESERVE_AFTER_DELETION, yes, common, uid, NULL, classChains, KeyedArchive, sha2563;
|
|
91046
91185
|
var init_core_data_model = __esm({
|
|
91047
91186
|
"src/core-data-model.ts"() {
|
|
91048
91187
|
"use strict";
|
|
91049
|
-
|
|
91188
|
+
import_node_crypto73 = require("node:crypto");
|
|
91050
91189
|
import_node_fs124 = require("node:fs");
|
|
91051
91190
|
import_node_path126 = __toESM(require("node:path"), 1);
|
|
91052
91191
|
init_core_data_entity_classes();
|
|
@@ -91165,7 +91304,7 @@ var init_core_data_model = __esm({
|
|
|
91165
91304
|
});
|
|
91166
91305
|
}
|
|
91167
91306
|
};
|
|
91168
|
-
sha2563 = (...parts) => (0,
|
|
91307
|
+
sha2563 = (...parts) => (0, import_node_crypto73.createHash)("sha256").update(
|
|
91169
91308
|
Buffer.concat(
|
|
91170
91309
|
parts.map(
|
|
91171
91310
|
(part) => Array.isArray(part) ? Buffer.from(part) : Buffer.from(part)
|
|
@@ -93363,7 +93502,7 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
93363
93502
|
(binary2) => binary2.publicHeaders === void 0 && binary2.placeholder === void 0 && swiftBinaryOnDisk(binary2) && binaryHeaderSearchPaths(binary2, staged, app.rootDir).headers.length === 1
|
|
93364
93503
|
))
|
|
93365
93504
|
return [...binaries];
|
|
93366
|
-
const hash = (0,
|
|
93505
|
+
const hash = (0, import_node_crypto74.createHash)("sha256");
|
|
93367
93506
|
hash.update(
|
|
93368
93507
|
JSON.stringify([
|
|
93369
93508
|
inputs2.targets,
|
|
@@ -93572,12 +93711,12 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
93572
93711
|
);
|
|
93573
93712
|
return result;
|
|
93574
93713
|
}
|
|
93575
|
-
var import_node_child_process59,
|
|
93714
|
+
var import_node_child_process59, import_node_crypto74, import_node_fs125, import_node_path127, cachedInputs;
|
|
93576
93715
|
var init_swift_cxx_reachable = __esm({
|
|
93577
93716
|
"src/swift-cxx-reachable.ts"() {
|
|
93578
93717
|
"use strict";
|
|
93579
93718
|
import_node_child_process59 = require("node:child_process");
|
|
93580
|
-
|
|
93719
|
+
import_node_crypto74 = require("node:crypto");
|
|
93581
93720
|
import_node_fs125 = __toESM(require("node:fs"), 1);
|
|
93582
93721
|
import_node_path127 = __toESM(require("node:path"), 1);
|
|
93583
93722
|
init_is_record();
|
|
@@ -94045,7 +94184,7 @@ function fetchSwiftSdkDataPlan({ url, dataPlan }) {
|
|
|
94045
94184
|
if (!response.ok)
|
|
94046
94185
|
throw new Error(`Swift SDK data plan ${address} answered ${response.status}`);
|
|
94047
94186
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
94048
|
-
if ((0,
|
|
94187
|
+
if ((0, import_node_crypto75.createHash)("sha256").update(bytes).digest("hex") !== dataPlan)
|
|
94049
94188
|
throw new Error(`Swift SDK data plan ${address} failed its digest check`);
|
|
94050
94189
|
return bytes;
|
|
94051
94190
|
});
|
|
@@ -94143,7 +94282,7 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
|
|
|
94143
94282
|
encode2(now),
|
|
94144
94283
|
encodeNativeSdkLater({
|
|
94145
94284
|
files: later.map((bytes) => ({
|
|
94146
|
-
sha256: (0,
|
|
94285
|
+
sha256: (0, import_node_crypto75.createHash)("sha256").update(bytes).digest("hex"),
|
|
94147
94286
|
byteLength: bytes.length
|
|
94148
94287
|
})),
|
|
94149
94288
|
...needs && {
|
|
@@ -94159,11 +94298,11 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
|
|
|
94159
94298
|
later
|
|
94160
94299
|
};
|
|
94161
94300
|
}
|
|
94162
|
-
var
|
|
94301
|
+
var import_node_crypto75, ADDRESS_REACH, sdkPieces, firstAtOrAfter, pieceAt, LATER_GROUP_BYTES, MAX_LATER_GROUPS, publishedPlans;
|
|
94163
94302
|
var init_swift_sdk_later_data = __esm({
|
|
94164
94303
|
"src/swift-sdk-later-data.ts"() {
|
|
94165
94304
|
"use strict";
|
|
94166
|
-
|
|
94305
|
+
import_node_crypto75 = require("node:crypto");
|
|
94167
94306
|
init_nativeSdkBindingContract();
|
|
94168
94307
|
init_nativeWasmContract();
|
|
94169
94308
|
init_swift_sdk_image();
|
|
@@ -94761,7 +94900,7 @@ function gpuChromeLaunchOptions(opts = {}, runtime = currentRuntime()) {
|
|
|
94761
94900
|
async function launchWithPauseAwareDeadline(launch, opts) {
|
|
94762
94901
|
const budget = typeof opts.timeout === "number" ? opts.timeout : DEFAULT_LAUNCH_TIMEOUT_MS;
|
|
94763
94902
|
if (budget === 0) return launch(opts);
|
|
94764
|
-
const marker = `--peach-launch-id=${(0,
|
|
94903
|
+
const marker = `--peach-launch-id=${(0, import_node_crypto76.randomUUID)()}`;
|
|
94765
94904
|
let expired = false;
|
|
94766
94905
|
const cleanupAttempted = [];
|
|
94767
94906
|
const lookupFailed = [];
|
|
@@ -94918,13 +95057,13 @@ async function launchReapedChrome(launch, opts = {}, rendererTarget, policy = {}
|
|
|
94918
95057
|
policy.admission
|
|
94919
95058
|
);
|
|
94920
95059
|
}
|
|
94921
|
-
var childProcess, import_node_child_process62,
|
|
95060
|
+
var childProcess, import_node_child_process62, import_node_crypto76, fs79, os21, path112, LINUX_CHROME_SCOPE_ENV, discoveredChromePids, discoveredChromeProcesses, reapPids, installed, signalShutdownClaimed, PLAYWRIGHT_DISABLED_FEATURES, PLAYWRIGHT_ENABLED_FEATURES, DISABLED_FEATURES, DEFAULT_LAUNCH_TIMEOUT_MS;
|
|
94922
95061
|
var init_reap_browser = __esm({
|
|
94923
95062
|
"src/reap-browser.ts"() {
|
|
94924
95063
|
"use strict";
|
|
94925
95064
|
childProcess = __toESM(require("node:child_process"), 1);
|
|
94926
95065
|
import_node_child_process62 = require("node:child_process");
|
|
94927
|
-
|
|
95066
|
+
import_node_crypto76 = require("node:crypto");
|
|
94928
95067
|
fs79 = __toESM(require("node:fs"), 1);
|
|
94929
95068
|
os21 = __toESM(require("node:os"), 1);
|
|
94930
95069
|
path112 = __toESM(require("node:path"), 1);
|
|
@@ -95107,9 +95246,9 @@ function packageChromiumPath(resolved, env) {
|
|
|
95107
95246
|
(0, import_node_fs129.renameSync)(staged, chromiumPathsFile());
|
|
95108
95247
|
return { ok: true, path: parsed2.expectedPath };
|
|
95109
95248
|
}
|
|
95110
|
-
function isExecutable(
|
|
95249
|
+
function isExecutable(path159) {
|
|
95111
95250
|
try {
|
|
95112
|
-
(0, import_node_fs129.accessSync)(
|
|
95251
|
+
(0, import_node_fs129.accessSync)(path159, import_node_fs129.constants.X_OK);
|
|
95113
95252
|
return true;
|
|
95114
95253
|
} catch {
|
|
95115
95254
|
return false;
|
|
@@ -95154,7 +95293,7 @@ function probeBrowser(resolved, env, shell) {
|
|
|
95154
95293
|
(name3) => name3.startsWith(prefix) && /^\d+$/.test(name3.slice(prefix.length))
|
|
95155
95294
|
).sort((a, b) => Number(b.slice(prefix.length)) - Number(a.slice(prefix.length))) : [];
|
|
95156
95295
|
for (const revision of revisions) {
|
|
95157
|
-
const installed2 = paths.map((
|
|
95296
|
+
const installed2 = paths.map((path159) => (0, import_node_path129.join)(browsersDir, revision, path159)).find(isExecutable);
|
|
95158
95297
|
if (installed2) {
|
|
95159
95298
|
executablePath = installed2;
|
|
95160
95299
|
break;
|
|
@@ -96411,7 +96550,7 @@ async function splitNativeWasm(input, directory2, profile, binaryen, shared, kee
|
|
|
96411
96550
|
sides.push({
|
|
96412
96551
|
...part,
|
|
96413
96552
|
slots: slots2,
|
|
96414
|
-
sha256: (0,
|
|
96553
|
+
sha256: (0, import_node_crypto77.createHash)("sha256").update(bytes2).digest("hex")
|
|
96415
96554
|
});
|
|
96416
96555
|
}
|
|
96417
96556
|
if (!sides.length) return { primary: describePart(input), sides: [] };
|
|
@@ -96477,12 +96616,12 @@ function describePart(file) {
|
|
|
96477
96616
|
);
|
|
96478
96617
|
return { file, functions, byteLength: bytes.byteLength };
|
|
96479
96618
|
}
|
|
96480
|
-
var import_node_child_process64,
|
|
96619
|
+
var import_node_child_process64, import_node_crypto77, import_node_fs130, import_node_path130, import_node_util14, run10, MAX_MODULE_FUNCTIONS, MAX_START_FUNCTIONS, SIDE_FUNCTIONS, SIDE_CODE_BYTES, FEATURES2, featuresOf;
|
|
96481
96620
|
var init_wasm_lazy_split = __esm({
|
|
96482
96621
|
"src/wasm-lazy-split.ts"() {
|
|
96483
96622
|
"use strict";
|
|
96484
96623
|
import_node_child_process64 = require("node:child_process");
|
|
96485
|
-
|
|
96624
|
+
import_node_crypto77 = require("node:crypto");
|
|
96486
96625
|
import_node_fs130 = require("node:fs");
|
|
96487
96626
|
import_node_path130 = require("node:path");
|
|
96488
96627
|
import_node_util14 = require("node:util");
|
|
@@ -96594,7 +96733,7 @@ async function splitSwiftSdkImage(bytes, directory2, launch, app) {
|
|
|
96594
96733
|
const names = () => (0, import_node_fs131.readdirSync)(profiles2).filter((name3) => !name3.startsWith(".") && name3.endsWith(".profile")).sort();
|
|
96595
96734
|
const union = () => {
|
|
96596
96735
|
const files2 = names().map((name3) => (0, import_node_path131.join)(profiles2, name3));
|
|
96597
|
-
const hash = (0,
|
|
96736
|
+
const hash = (0, import_node_crypto78.createHash)("sha256");
|
|
96598
96737
|
for (const file of files2) hash.update((0, import_node_fs131.readFileSync)(file));
|
|
96599
96738
|
const cache = (0, import_node_path131.join)(
|
|
96600
96739
|
directory2,
|
|
@@ -96861,11 +97000,11 @@ async function bootSwiftPreview(launch, profile) {
|
|
|
96861
97000
|
server.close();
|
|
96862
97001
|
}
|
|
96863
97002
|
}
|
|
96864
|
-
var
|
|
97003
|
+
var import_node_crypto78, import_node_fs131, import_node_http3, import_node_https2, import_node_os26, import_node_path131, packageName, guestPath, appPath, profileWindowMs, postPaintProfileMs, digest2, partDigest, platform;
|
|
96865
97004
|
var init_swift_startup_split = __esm({
|
|
96866
97005
|
"src/swift-startup-split.ts"() {
|
|
96867
97006
|
"use strict";
|
|
96868
|
-
|
|
97007
|
+
import_node_crypto78 = require("node:crypto");
|
|
96869
97008
|
import_node_fs131 = require("node:fs");
|
|
96870
97009
|
import_node_http3 = require("node:http");
|
|
96871
97010
|
import_node_https2 = require("node:https");
|
|
@@ -96890,7 +97029,7 @@ var init_swift_startup_split = __esm({
|
|
|
96890
97029
|
appPath = "/__peach/swift/startup.wasm";
|
|
96891
97030
|
profileWindowMs = 3e4;
|
|
96892
97031
|
postPaintProfileMs = 850;
|
|
96893
|
-
digest2 = (bytes) => (0,
|
|
97032
|
+
digest2 = (bytes) => (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex");
|
|
96894
97033
|
partDigest = /^[a-f0-9]{64}$/;
|
|
96895
97034
|
platform = `${process.platform}-${process.arch}`;
|
|
96896
97035
|
}
|
|
@@ -97045,7 +97184,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
97045
97184
|
const clang = import_node_path132.default.join(toolchainBin, "clang");
|
|
97046
97185
|
const empty = (binary2, file) => {
|
|
97047
97186
|
const source = import_node_path132.default.join(binary2.dir, file);
|
|
97048
|
-
const key2 = (0,
|
|
97187
|
+
const key2 = (0, import_node_crypto79.createHash)("sha256").update(
|
|
97049
97188
|
JSON.stringify([
|
|
97050
97189
|
clang,
|
|
97051
97190
|
sdk2.sysroot,
|
|
@@ -97090,7 +97229,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
97090
97229
|
return new Set(portable.flat());
|
|
97091
97230
|
}
|
|
97092
97231
|
async function swiftPackages(entry, app) {
|
|
97093
|
-
const stamp = (file) => import_node_fs132.default.existsSync(file) ? (0,
|
|
97232
|
+
const stamp = (file) => import_node_fs132.default.existsSync(file) ? (0, import_node_crypto79.createHash)("sha256").update(import_node_fs132.default.readFileSync(file)).digest("hex") : null;
|
|
97094
97233
|
const owners = [...app.frameworks, app].map((target) => ({
|
|
97095
97234
|
module: target.moduleName,
|
|
97096
97235
|
products: target.packageProducts ?? []
|
|
@@ -97300,7 +97439,7 @@ async function buildXcodeLayout(root) {
|
|
|
97300
97439
|
});
|
|
97301
97440
|
if (framework.moduleName !== module2 || framework.allSources.length === 0)
|
|
97302
97441
|
throw new Error(`${project2}: ${target} did not produce source module ${module2}`);
|
|
97303
|
-
if (framework.linkedProducts.length > 0 || framework.binaryFrameworks.some(({ path:
|
|
97442
|
+
if (framework.linkedProducts.length > 0 || framework.binaryFrameworks.some(({ path: path159 }) => path159))
|
|
97304
97443
|
throw new Error(
|
|
97305
97444
|
`${project2}: ${target} has external dependencies outside the source framework build`
|
|
97306
97445
|
);
|
|
@@ -98253,7 +98392,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
98253
98392
|
const source = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(
|
|
98254
98393
|
bytes
|
|
98255
98394
|
);
|
|
98256
|
-
const sha2565 = (0,
|
|
98395
|
+
const sha2565 = (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex");
|
|
98257
98396
|
const bundle = swiftResourceBundleForFile(bundles, key2);
|
|
98258
98397
|
if (!bundle && inputs2["Package.swift"])
|
|
98259
98398
|
throw new Error(`metal source ${key2} has no resource target bundle`);
|
|
@@ -98276,7 +98415,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
98276
98415
|
const bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
|
|
98277
98416
|
pdfs.set(file, {
|
|
98278
98417
|
file: disk,
|
|
98279
|
-
sha256: (0,
|
|
98418
|
+
sha256: (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex")
|
|
98280
98419
|
});
|
|
98281
98420
|
}
|
|
98282
98421
|
const pdfRasters = rasterizePdfFiles([...pdfs.values()], limits);
|
|
@@ -98322,7 +98461,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
98322
98461
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
98323
98462
|
}
|
|
98324
98463
|
imageBytes += bytes.length;
|
|
98325
|
-
const hash = (0,
|
|
98464
|
+
const hash = (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
|
|
98326
98465
|
const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
|
|
98327
98466
|
const pixelSize = ext === ".png" ? readPngDimensions(bytes) : null;
|
|
98328
98467
|
const variant2 = {
|
|
@@ -98632,7 +98771,7 @@ function updateSwiftConfigStamp(hash, packagePath) {
|
|
|
98632
98771
|
hash.update(JSON.stringify(gates.map((name3) => swiftWasm64PlatformGates[name3])));
|
|
98633
98772
|
}
|
|
98634
98773
|
function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
98635
|
-
const hash = (0,
|
|
98774
|
+
const hash = (0, import_node_crypto79.createHash)("sha256");
|
|
98636
98775
|
hash.update(packagePath);
|
|
98637
98776
|
updateSwiftConfigStamp(hash, packagePath);
|
|
98638
98777
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -98661,7 +98800,7 @@ function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
|
98661
98800
|
return hash.digest("hex").slice(0, 16);
|
|
98662
98801
|
}
|
|
98663
98802
|
function sourceContentStamp(packagePath, moduleRootOverride) {
|
|
98664
|
-
const hash = (0,
|
|
98803
|
+
const hash = (0, import_node_crypto79.createHash)("sha256");
|
|
98665
98804
|
hash.update(compilerSourceDigest);
|
|
98666
98805
|
updateSwiftConfigStamp(hash, packagePath);
|
|
98667
98806
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -98693,7 +98832,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
98693
98832
|
(root) => import_node_fs132.default.existsSync(import_node_path132.default.join(root, "toolchain.json"))
|
|
98694
98833
|
);
|
|
98695
98834
|
if (!moduleRoot) return "";
|
|
98696
|
-
const hash = (0,
|
|
98835
|
+
const hash = (0, import_node_crypto79.createHash)("sha256");
|
|
98697
98836
|
hash.update(moduleRoot);
|
|
98698
98837
|
for (const relative5 of swiftModuleInputFiles(moduleRoot)) {
|
|
98699
98838
|
hash.update(relative5);
|
|
@@ -98703,7 +98842,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
98703
98842
|
}
|
|
98704
98843
|
function otherInputs(input, standalone) {
|
|
98705
98844
|
const { files: _files, ...rest } = input;
|
|
98706
|
-
return (0,
|
|
98845
|
+
return (0, import_node_crypto79.createHash)("sha256").update(JSON.stringify({ ...rest, standalone })).digest("hex");
|
|
98707
98846
|
}
|
|
98708
98847
|
function icuUrl(origin, artifact) {
|
|
98709
98848
|
return "url" in artifact.icu ? artifact.icu.url : `${origin}${ICU_PATH}${swiftIcuAddress(artifact.icu)}`;
|
|
@@ -98718,7 +98857,7 @@ function standinLibraries(binaries, standins, rootDir, toolchain, rustWasm64) {
|
|
|
98718
98857
|
for (const standin of standins) {
|
|
98719
98858
|
if (!standin.prebuilt) continue;
|
|
98720
98859
|
const bytes = Buffer.from(standin.prebuilt.library, "base64");
|
|
98721
|
-
const digest3 = (0,
|
|
98860
|
+
const digest3 = (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex");
|
|
98722
98861
|
const dir = import_node_path132.default.join(swiftCacheDir(), "native-archives", digest3);
|
|
98723
98862
|
import_node_fs132.default.mkdirSync(dir, { recursive: true });
|
|
98724
98863
|
const library = import_node_path132.default.join(dir, `lib${standin.module}.a`);
|
|
@@ -99049,7 +99188,7 @@ function swiftBuildRoot(packagePath, moduleRoot) {
|
|
|
99049
99188
|
return import_node_path132.default.join(
|
|
99050
99189
|
swiftCacheDir(),
|
|
99051
99190
|
"swift-builds",
|
|
99052
|
-
(0,
|
|
99191
|
+
(0, import_node_crypto79.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
|
|
99053
99192
|
);
|
|
99054
99193
|
}
|
|
99055
99194
|
function installedWorkspaceInput(packagePath, entry, moduleRoot) {
|
|
@@ -99351,7 +99490,7 @@ async function fetchSwiftDyldTable(moduleUrl, module2, signal) {
|
|
|
99351
99490
|
const response = await fetch(url, { signal });
|
|
99352
99491
|
if (!response.ok) throw new Error(`swift compile: ${url} answered ${response.status}`);
|
|
99353
99492
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
99354
|
-
if (bytes.length !== byteLength || (0,
|
|
99493
|
+
if (bytes.length !== byteLength || (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex") !== sha2565)
|
|
99355
99494
|
throw new Error(`swift compile: ${url} does not match its module's index`);
|
|
99356
99495
|
return { dyldTable: { sha256: sha2565, bytes } };
|
|
99357
99496
|
}
|
|
@@ -99582,7 +99721,7 @@ async function swiftPackageMetadata(packagePath, packageName2, moduleRoot, origi
|
|
|
99582
99721
|
});
|
|
99583
99722
|
const image = {
|
|
99584
99723
|
...artifact,
|
|
99585
|
-
hash: (0,
|
|
99724
|
+
hash: (0, import_node_crypto79.createHash)("sha256").update(result.primary).digest("hex"),
|
|
99586
99725
|
bytes: result.primary,
|
|
99587
99726
|
parts: result.parts
|
|
99588
99727
|
};
|
|
@@ -99610,10 +99749,10 @@ async function splitSdkBinding(sdk2, splitKey, plan) {
|
|
|
99610
99749
|
sdk2.binding.bytes,
|
|
99611
99750
|
plan
|
|
99612
99751
|
);
|
|
99613
|
-
const digest3 = (0,
|
|
99752
|
+
const digest3 = (0, import_node_crypto79.createHash)("sha256").update(split.binding).digest("hex");
|
|
99614
99753
|
sdkBindingFiles.set(digest3, split.binding);
|
|
99615
99754
|
for (const later of split.later)
|
|
99616
|
-
sdkBindingFiles.set((0,
|
|
99755
|
+
sdkBindingFiles.set((0, import_node_crypto79.createHash)("sha256").update(later).digest("hex"), later);
|
|
99617
99756
|
sdkSplitBindings.set(key2, digest3);
|
|
99618
99757
|
}
|
|
99619
99758
|
function swiftCodePartAssets(origin, appParts, sdkDigest) {
|
|
@@ -99641,7 +99780,7 @@ function swiftSdkEntryAssets(origin, image, sdkDigest = image.sdk?.sha256) {
|
|
|
99641
99780
|
}
|
|
99642
99781
|
function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch, runtimeRootOverride) {
|
|
99643
99782
|
const { key: key2 } = sdk2;
|
|
99644
|
-
const app = (0,
|
|
99783
|
+
const app = (0, import_node_crypto79.createHash)("sha256").update(
|
|
99645
99784
|
JSON.stringify([packagePath, launch.environment, runtimeRootOverride?.origin])
|
|
99646
99785
|
).update(launch.guest?.source ?? "").digest("hex").slice(0, 16);
|
|
99647
99786
|
const cacheKey = `${key2}/${app}`;
|
|
@@ -99668,7 +99807,7 @@ function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch, runt
|
|
|
99668
99807
|
},
|
|
99669
99808
|
app
|
|
99670
99809
|
);
|
|
99671
|
-
const name3 = (0,
|
|
99810
|
+
const name3 = (0, import_node_crypto79.createHash)("sha256").update(split.primary).digest("hex");
|
|
99672
99811
|
sdkPieces2.set(name3, split.primary);
|
|
99673
99812
|
for (const [digest3, bytes] of split.parts) sdkPieces2.set(digest3, bytes);
|
|
99674
99813
|
sdkStartupParts.set(name3, split.parts);
|
|
@@ -99836,13 +99975,13 @@ async function serveSwiftPackageAsset(pathname, res) {
|
|
|
99836
99975
|
res.end("swift artifact is stale");
|
|
99837
99976
|
return true;
|
|
99838
99977
|
}
|
|
99839
|
-
var import_node_async_hooks2, import_node_child_process65,
|
|
99978
|
+
var import_node_async_hooks2, import_node_child_process65, import_node_crypto79, 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;
|
|
99840
99979
|
var init_swift_host = __esm({
|
|
99841
99980
|
"src/swift-host.ts"() {
|
|
99842
99981
|
"use strict";
|
|
99843
99982
|
import_node_async_hooks2 = require("node:async_hooks");
|
|
99844
99983
|
import_node_child_process65 = require("node:child_process");
|
|
99845
|
-
|
|
99984
|
+
import_node_crypto79 = require("node:crypto");
|
|
99846
99985
|
import_node_fs132 = __toESM(require("node:fs"), 1);
|
|
99847
99986
|
import_node_os27 = __toESM(require("node:os"), 1);
|
|
99848
99987
|
import_node_path132 = __toESM(require("node:path"), 1);
|
|
@@ -100600,7 +100739,7 @@ function hashTree(root) {
|
|
|
100600
100739
|
for (const entry of import_node_fs135.default.readdirSync(root, { recursive: true, withFileTypes: true })) {
|
|
100601
100740
|
if (!entry.isFile()) continue;
|
|
100602
100741
|
const file = import_node_path135.default.join(entry.parentPath, entry.name);
|
|
100603
|
-
hashes[import_node_path135.default.relative(root, file).split(import_node_path135.default.sep).join("/")] = (0,
|
|
100742
|
+
hashes[import_node_path135.default.relative(root, file).split(import_node_path135.default.sep).join("/")] = (0, import_node_crypto80.createHash)("sha256").update(import_node_fs135.default.readFileSync(file)).digest("hex");
|
|
100604
100743
|
}
|
|
100605
100744
|
return Object.fromEntries(Object.entries(hashes).sort(([a], [b]) => a < b ? -1 : 1));
|
|
100606
100745
|
}
|
|
@@ -100650,12 +100789,12 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
100650
100789
|
files: hashTree(generatedRoot)
|
|
100651
100790
|
};
|
|
100652
100791
|
}
|
|
100653
|
-
var import_node_child_process66,
|
|
100792
|
+
var import_node_child_process66, import_node_crypto80, 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;
|
|
100654
100793
|
var init_turbo_codegen_intake = __esm({
|
|
100655
100794
|
"src/turbo-codegen-intake.ts"() {
|
|
100656
100795
|
"use strict";
|
|
100657
100796
|
import_node_child_process66 = require("node:child_process");
|
|
100658
|
-
|
|
100797
|
+
import_node_crypto80 = require("node:crypto");
|
|
100659
100798
|
import_node_fs135 = __toESM(require("node:fs"), 1);
|
|
100660
100799
|
import_node_module17 = require("node:module");
|
|
100661
100800
|
import_node_path135 = __toESM(require("node:path"), 1);
|
|
@@ -100902,11 +101041,11 @@ function stringList3(value) {
|
|
|
100902
101041
|
function externalSpecMembers(root, requested) {
|
|
100903
101042
|
const children = (spec) => Array.isArray(spec.subspecs) ? spec.subspecs.filter(object6) : [];
|
|
100904
101043
|
const chains = /* @__PURE__ */ new Map();
|
|
100905
|
-
const select = (
|
|
100906
|
-
const key2 =
|
|
101044
|
+
const select = (path159) => {
|
|
101045
|
+
const key2 = path159.join("/");
|
|
100907
101046
|
if (chains.has(key2)) return;
|
|
100908
101047
|
const chain = [root];
|
|
100909
|
-
for (const part of
|
|
101048
|
+
for (const part of path159) {
|
|
100910
101049
|
const child = children(chain.at(-1)).find((sub) => sub.name === part);
|
|
100911
101050
|
if (!child) throw new Error(`${String(root.name)} has no subspec ${key2}`);
|
|
100912
101051
|
chain.push(child);
|
|
@@ -100915,7 +101054,7 @@ function externalSpecMembers(root, requested) {
|
|
|
100915
101054
|
const spec = chain.at(-1);
|
|
100916
101055
|
const defaults = stringList3(spec.default_subspecs ?? spec.default_subspec);
|
|
100917
101056
|
const activated = defaults[0] === "none" ? [] : defaults.length > 0 ? defaults : children(spec).map((sub) => String(sub.name));
|
|
100918
|
-
for (const name3 of activated) select([...
|
|
101057
|
+
for (const name3 of activated) select([...path159, ...name3.split("/")]);
|
|
100919
101058
|
for (const member of chain)
|
|
100920
101059
|
for (const dependencies of [member.dependencies, iosOf(member)?.dependencies])
|
|
100921
101060
|
for (const dependency of object6(dependencies) ? Object.keys(dependencies) : []) {
|
|
@@ -104495,11 +104634,11 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
|
|
|
104495
104634
|
}
|
|
104496
104635
|
`;
|
|
104497
104636
|
}
|
|
104498
|
-
var
|
|
104637
|
+
var import_node_crypto81, 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;
|
|
104499
104638
|
var init_turbo_source = __esm({
|
|
104500
104639
|
"src/turbo-source.ts"() {
|
|
104501
104640
|
"use strict";
|
|
104502
|
-
|
|
104641
|
+
import_node_crypto81 = require("node:crypto");
|
|
104503
104642
|
import_node_fs136 = __toESM(require("node:fs"), 1);
|
|
104504
104643
|
import_node_path136 = __toESM(require("node:path"), 1);
|
|
104505
104644
|
init_cocoapods_trunk();
|
|
@@ -104627,7 +104766,7 @@ var init_turbo_source = __esm({
|
|
|
104627
104766
|
];
|
|
104628
104767
|
DECLARED_MODULE_NAME = /\bName\(\s*"(\w+)"\s*\)/g;
|
|
104629
104768
|
EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
|
|
104630
|
-
sha2564 = (data) => (0,
|
|
104769
|
+
sha2564 = (data) => (0, import_node_crypto81.createHash)("sha256").update(data).digest("hex");
|
|
104631
104770
|
podspecList = podspecAttribute;
|
|
104632
104771
|
versionParts = (version2) => version2.split(/[.-]/).map((p) => Number(p) || 0);
|
|
104633
104772
|
iosOf = (member) => object6(member.ios) ? member.ios : null;
|
|
@@ -105421,7 +105560,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped) {
|
|
|
105421
105560
|
}
|
|
105422
105561
|
async function prepareTurboCompileInput(options2) {
|
|
105423
105562
|
await prepareTurboSourceDependencies(options2.reactNativeRoot);
|
|
105424
|
-
const key2 = (0,
|
|
105563
|
+
const key2 = (0, import_node_crypto82.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");
|
|
105425
105564
|
const scratch2 = import_node_path137.default.join(import_node_os28.default.tmpdir(), "peach-turbo-swift", key2);
|
|
105426
105565
|
import_node_fs137.default.mkdirSync(scratch2, { recursive: true });
|
|
105427
105566
|
const codegenDir = import_node_fs137.default.mkdtempSync(import_node_path137.default.join(scratch2, "codegen-"));
|
|
@@ -105622,11 +105761,11 @@ async function compileTurboModule(options2) {
|
|
|
105622
105761
|
collection
|
|
105623
105762
|
};
|
|
105624
105763
|
}
|
|
105625
|
-
var
|
|
105764
|
+
var import_node_crypto82, import_node_fs137, import_node_module18, import_node_os28, import_node_path137;
|
|
105626
105765
|
var init_turbo_compile = __esm({
|
|
105627
105766
|
"src/turbo-compile.ts"() {
|
|
105628
105767
|
"use strict";
|
|
105629
|
-
|
|
105768
|
+
import_node_crypto82 = require("node:crypto");
|
|
105630
105769
|
import_node_fs137 = __toESM(require("node:fs"), 1);
|
|
105631
105770
|
import_node_module18 = require("node:module");
|
|
105632
105771
|
import_node_os28 = __toESM(require("node:os"), 1);
|
|
@@ -105843,8 +105982,8 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
105843
105982
|
);
|
|
105844
105983
|
if (!isRecord(manifest) || typeof manifest.version !== "string")
|
|
105845
105984
|
throw new Error(`${reactNativeRoot}: react-native has no version`);
|
|
105846
|
-
const headers = (0,
|
|
105847
|
-
const sources = (0,
|
|
105985
|
+
const headers = (0, import_node_crypto83.createHash)("sha256");
|
|
105986
|
+
const sources = (0, import_node_crypto83.createHash)("sha256");
|
|
105848
105987
|
const walk4 = (relative5) => {
|
|
105849
105988
|
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)) {
|
|
105850
105989
|
if (file.name === "node_modules" || file.name.startsWith(".")) continue;
|
|
@@ -105951,7 +106090,7 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
105951
106090
|
const file = import_node_path139.default.join(
|
|
105952
106091
|
cacheDir(),
|
|
105953
106092
|
"native-archives",
|
|
105954
|
-
`${(0,
|
|
106093
|
+
`${(0, import_node_crypto83.createHash)("sha256").update(data).digest("hex")}.a`
|
|
105955
106094
|
);
|
|
105956
106095
|
import_node_fs139.default.mkdirSync(import_node_path139.default.dirname(file), { recursive: true });
|
|
105957
106096
|
if (!import_node_fs139.default.existsSync(file)) import_node_fs139.default.writeFileSync(file, Buffer.from(data, "base64"));
|
|
@@ -105961,11 +106100,11 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
105961
106100
|
}
|
|
105962
106101
|
}
|
|
105963
106102
|
}
|
|
105964
|
-
var
|
|
106103
|
+
var import_node_crypto83, import_node_fs139, import_node_module19, import_node_path139, import_node_util16, recipe, strings4, building;
|
|
105965
106104
|
var init_react_native_core = __esm({
|
|
105966
106105
|
"src/react-native-core.ts"() {
|
|
105967
106106
|
"use strict";
|
|
105968
|
-
|
|
106107
|
+
import_node_crypto83 = require("node:crypto");
|
|
105969
106108
|
import_node_fs139 = __toESM(require("node:fs"), 1);
|
|
105970
106109
|
import_node_module19 = require("node:module");
|
|
105971
106110
|
import_node_path139 = __toESM(require("node:path"), 1);
|
|
@@ -105990,7 +106129,7 @@ function exportedNames(moduleRoot, name3) {
|
|
|
105990
106129
|
const modules = import_node_path140.default.join(moduleRoot, "modules");
|
|
105991
106130
|
const module2 = import_node_path140.default.join(modules, `${name3}.swiftmodule`);
|
|
105992
106131
|
if (!import_node_fs140.default.existsSync(module2)) return /* @__PURE__ */ new Set();
|
|
105993
|
-
const key2 = (0,
|
|
106132
|
+
const key2 = (0, import_node_crypto84.createHash)("sha256").update(import_node_fs140.default.readFileSync(module2)).digest("hex");
|
|
105994
106133
|
const directory2 = import_node_path140.default.join(swiftCacheDir(), "swift-public-names");
|
|
105995
106134
|
const receipt = import_node_path140.default.join(directory2, `${key2}.json`);
|
|
105996
106135
|
if (import_node_fs140.default.existsSync(receipt)) {
|
|
@@ -106073,12 +106212,12 @@ function clangTypeOwnership(moduleRoot, module2) {
|
|
|
106073
106212
|
}
|
|
106074
106213
|
);
|
|
106075
106214
|
}
|
|
106076
|
-
var import_node_child_process68,
|
|
106215
|
+
var import_node_child_process68, import_node_crypto84, import_node_fs140, import_node_path140, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
|
|
106077
106216
|
var init_swift_clang_type_ownership = __esm({
|
|
106078
106217
|
"src/swift-clang-type-ownership.ts"() {
|
|
106079
106218
|
"use strict";
|
|
106080
106219
|
import_node_child_process68 = require("node:child_process");
|
|
106081
|
-
|
|
106220
|
+
import_node_crypto84 = require("node:crypto");
|
|
106082
106221
|
import_node_fs140 = __toESM(require("node:fs"), 1);
|
|
106083
106222
|
import_node_path140 = __toESM(require("node:path"), 1);
|
|
106084
106223
|
init_is_record();
|
|
@@ -107733,7 +107872,7 @@ function targetSettings2(units) {
|
|
|
107733
107872
|
}
|
|
107734
107873
|
function oneSDKStamp(oneSDK) {
|
|
107735
107874
|
if (!oneSDK) return "";
|
|
107736
|
-
const hash = (0,
|
|
107875
|
+
const hash = (0, import_node_crypto85.createHash)("sha256");
|
|
107737
107876
|
for (const files2 of [oneSDK.targets, oneSDK.entry])
|
|
107738
107877
|
for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
|
|
107739
107878
|
hash.update(`${name3}\0${source}\0`);
|
|
@@ -107784,7 +107923,7 @@ ${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport On
|
|
|
107784
107923
|
`;
|
|
107785
107924
|
}
|
|
107786
107925
|
function expoSwiftPreparedKey(base2, units, reactProviderStamp) {
|
|
107787
|
-
const hash = (0,
|
|
107926
|
+
const hash = (0, import_node_crypto85.createHash)("sha256");
|
|
107788
107927
|
hash.update(base2);
|
|
107789
107928
|
hash.update(reactProviderStamp);
|
|
107790
107929
|
for (const unit2 of units) {
|
|
@@ -108158,8 +108297,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
108158
108297
|
}
|
|
108159
108298
|
return provider;
|
|
108160
108299
|
})() : void 0;
|
|
108161
|
-
const reactProviderStamp = reactProvider ? (0,
|
|
108162
|
-
const key2 = (0,
|
|
108300
|
+
const reactProviderStamp = reactProvider ? (0, import_node_crypto85.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
|
|
108301
|
+
const key2 = (0, import_node_crypto85.createHash)("sha256").update(import_node_fs141.default.realpathSync(root)).digest("hex");
|
|
108163
108302
|
const unitContentStamp = (unit2) => sourceContentStamp(expoSwiftPackage(key2, unit2.moduleId), module2.root) + (unit2.reactNativeProvider ? `:${reactProviderStamp}` : "");
|
|
108164
108303
|
const failures = /* @__PURE__ */ new Map();
|
|
108165
108304
|
const failureRecords = /* @__PURE__ */ new Map();
|
|
@@ -108601,13 +108740,13 @@ ${diagnostics}`}`
|
|
|
108601
108740
|
}
|
|
108602
108741
|
return true;
|
|
108603
108742
|
}
|
|
108604
|
-
var import_node_async_hooks3, import_node_child_process69,
|
|
108743
|
+
var import_node_async_hooks3, import_node_child_process69, import_node_crypto85, 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;
|
|
108605
108744
|
var init_expo_swift_host = __esm({
|
|
108606
108745
|
"src/expo-swift-host.ts"() {
|
|
108607
108746
|
"use strict";
|
|
108608
108747
|
import_node_async_hooks3 = require("node:async_hooks");
|
|
108609
108748
|
import_node_child_process69 = require("node:child_process");
|
|
108610
|
-
|
|
108749
|
+
import_node_crypto85 = require("node:crypto");
|
|
108611
108750
|
import_node_fs141 = __toESM(require("node:fs"), 1);
|
|
108612
108751
|
import_node_module20 = require("node:module");
|
|
108613
108752
|
import_node_os29 = __toESM(require("node:os"), 1);
|
|
@@ -112482,10 +112621,10 @@ function stageHostBytes(bytes, origin, extension = "") {
|
|
|
112482
112621
|
}
|
|
112483
112622
|
async function stageHostDerivedBytes(input, producer, origin, extension, derive) {
|
|
112484
112623
|
const directory2 = prepareStagedDirectory();
|
|
112485
|
-
const inputDigest = (0,
|
|
112624
|
+
const inputDigest = (0, import_node_crypto87.createHash)("sha256").update(input).digest("hex");
|
|
112486
112625
|
const index = import_node_path149.default.join(
|
|
112487
112626
|
directory2,
|
|
112488
|
-
`derived-${(0,
|
|
112627
|
+
`derived-${(0, import_node_crypto87.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
|
|
112489
112628
|
);
|
|
112490
112629
|
const recorded = import_node_fs149.default.existsSync(index) ? import_node_fs149.default.readFileSync(index, "utf8") : "";
|
|
112491
112630
|
if (STAGED_NAME.test(recorded) && import_node_fs149.default.existsSync(import_node_path149.default.join(directory2, recorded))) {
|
|
@@ -112496,7 +112635,7 @@ async function stageHostDerivedBytes(input, producer, origin, extension, derive)
|
|
|
112496
112635
|
return new URL(STAGED_PREFIX + recorded, origin).toString();
|
|
112497
112636
|
}
|
|
112498
112637
|
const staged = writeStagedBytes(await derive(), origin, extension, directory2);
|
|
112499
|
-
const temporary = import_node_path149.default.join(directory2, (0,
|
|
112638
|
+
const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto87.randomUUID)());
|
|
112500
112639
|
try {
|
|
112501
112640
|
import_node_fs149.default.writeFileSync(temporary, new URL(staged).pathname.slice(STAGED_PREFIX.length), {
|
|
112502
112641
|
flag: "wx"
|
|
@@ -112515,7 +112654,7 @@ function metroIndexName(url) {
|
|
|
112515
112654
|
url.searchParams.get("unstable_path"),
|
|
112516
112655
|
hashes[0]
|
|
112517
112656
|
]);
|
|
112518
|
-
return `metro-${(0,
|
|
112657
|
+
return `metro-${(0, import_node_crypto87.createHash)("sha256").update(key2).digest("hex")}`;
|
|
112519
112658
|
}
|
|
112520
112659
|
function metroRequestIndex(rawUrl) {
|
|
112521
112660
|
if (!rawUrl?.startsWith("/") || rawUrl.startsWith("//")) return null;
|
|
@@ -112543,7 +112682,7 @@ function prepareStagedDirectory() {
|
|
|
112543
112682
|
return directory2;
|
|
112544
112683
|
}
|
|
112545
112684
|
function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
112546
|
-
const digest3 = (0,
|
|
112685
|
+
const digest3 = (0, import_node_crypto87.createHash)("sha256").update(bytes).digest("hex");
|
|
112547
112686
|
extension = extension.toLowerCase();
|
|
112548
112687
|
const name3 = STAGED_NAME.test(digest3 + extension) ? digest3 + extension : digest3;
|
|
112549
112688
|
stagedCapture.getStore()?.add(name3);
|
|
@@ -112552,7 +112691,7 @@ function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
|
112552
112691
|
if (import_node_fs149.default.existsSync(destination)) {
|
|
112553
112692
|
import_node_fs149.default.utimesSync(destination, new Date(now), new Date(now));
|
|
112554
112693
|
} else {
|
|
112555
|
-
const temporary = import_node_path149.default.join(directory2, (0,
|
|
112694
|
+
const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto87.randomUUID)());
|
|
112556
112695
|
try {
|
|
112557
112696
|
import_node_fs149.default.writeFileSync(temporary, bytes, { flag: "wx" });
|
|
112558
112697
|
import_node_fs149.default.renameSync(temporary, destination);
|
|
@@ -112624,12 +112763,12 @@ async function handleStagedHostFileRequest(req, res) {
|
|
|
112624
112763
|
throw error;
|
|
112625
112764
|
}
|
|
112626
112765
|
}
|
|
112627
|
-
var import_node_async_hooks4,
|
|
112766
|
+
var import_node_async_hooks4, import_node_crypto87, import_node_fs149, import_node_path149, stagedCapture, STAGED_PREFIX, STAGED_NAME, METRO_INDEX_NAME, STAGED_RETENTION_MS;
|
|
112628
112767
|
var init_staged_host_files = __esm({
|
|
112629
112768
|
"src/host/staged-host-files.ts"() {
|
|
112630
112769
|
"use strict";
|
|
112631
112770
|
import_node_async_hooks4 = require("node:async_hooks");
|
|
112632
|
-
|
|
112771
|
+
import_node_crypto87 = require("node:crypto");
|
|
112633
112772
|
import_node_fs149 = __toESM(require("node:fs"), 1);
|
|
112634
112773
|
import_node_path149 = __toESM(require("node:path"), 1);
|
|
112635
112774
|
init_uttype_mime();
|
|
@@ -112844,7 +112983,7 @@ async function readOneWidgetSources(appRoot) {
|
|
|
112844
112983
|
if (!Buffer.from(text7).equals(bytes))
|
|
112845
112984
|
throw new Error(`One widget prebuild source is not UTF-8: ${file}`);
|
|
112846
112985
|
files2.set(name3, text7);
|
|
112847
|
-
sources[import_node_path151.default.relative(root, file).split(import_node_path151.default.sep).join("/")] = (0,
|
|
112986
|
+
sources[import_node_path151.default.relative(root, file).split(import_node_path151.default.sep).join("/")] = (0, import_node_crypto88.createHash)("sha256").update(bytes).digest("hex");
|
|
112848
112987
|
}
|
|
112849
112988
|
const contract = files2.get("OneWidgetContract.swift") ?? "";
|
|
112850
112989
|
const source = files2.get("OneWidget.swift") ?? "";
|
|
@@ -112868,17 +113007,17 @@ async function configuredOneWidget(appRoot, bundleUrl, packageUrl) {
|
|
|
112868
113007
|
return {
|
|
112869
113008
|
metadata: source.widget,
|
|
112870
113009
|
projectRoot: source.root,
|
|
112871
|
-
appIdentity: (0,
|
|
113010
|
+
appIdentity: (0, import_node_crypto88.createHash)("sha256").update(JSON.stringify([source.root, source.widget.bundleId])).digest("hex"),
|
|
112872
113011
|
bundleUrl,
|
|
112873
113012
|
packageUrl,
|
|
112874
113013
|
urlSchemes: source.urlSchemes
|
|
112875
113014
|
};
|
|
112876
113015
|
}
|
|
112877
|
-
var
|
|
113016
|
+
var import_node_crypto88, import_node_fs151, import_node_path151, ONE_WIDGET_PACKAGE, nonEmpty;
|
|
112878
113017
|
var init_one_widget_metadata = __esm({
|
|
112879
113018
|
"src/one-widget-metadata.ts"() {
|
|
112880
113019
|
"use strict";
|
|
112881
|
-
|
|
113020
|
+
import_node_crypto88 = require("node:crypto");
|
|
112882
113021
|
import_node_fs151 = __toESM(require("node:fs"), 1);
|
|
112883
113022
|
import_node_path151 = __toESM(require("node:path"), 1);
|
|
112884
113023
|
init_is_record();
|
|
@@ -112912,7 +113051,7 @@ async function oneWidgetPackage(appRoot) {
|
|
|
112912
113051
|
const packagePath = import_node_path152.default.join(
|
|
112913
113052
|
import_node_os31.default.tmpdir(),
|
|
112914
113053
|
"peach-one-widgets",
|
|
112915
|
-
(0,
|
|
113054
|
+
(0, import_node_crypto89.createHash)("sha256").update(root).digest("hex"),
|
|
112916
113055
|
ONE_WIDGET_PACKAGE
|
|
112917
113056
|
);
|
|
112918
113057
|
import_node_fs152.default.mkdirSync(packagePath, { recursive: true });
|
|
@@ -112926,11 +113065,11 @@ async function oneWidgetPackage(appRoot) {
|
|
|
112926
113065
|
widget
|
|
112927
113066
|
};
|
|
112928
113067
|
}
|
|
112929
|
-
var
|
|
113068
|
+
var import_node_crypto89, import_node_fs152, import_node_os31, import_node_path152;
|
|
112930
113069
|
var init_one_widget_package = __esm({
|
|
112931
113070
|
"src/one-widget-package.ts"() {
|
|
112932
113071
|
"use strict";
|
|
112933
|
-
|
|
113072
|
+
import_node_crypto89 = require("node:crypto");
|
|
112934
113073
|
import_node_fs152 = __toESM(require("node:fs"), 1);
|
|
112935
113074
|
import_node_os31 = __toESM(require("node:os"), 1);
|
|
112936
113075
|
import_node_path152 = __toESM(require("node:path"), 1);
|
|
@@ -113146,7 +113285,7 @@ var init_android_view_classes = __esm({
|
|
|
113146
113285
|
|
|
113147
113286
|
// src/java-module-abi.ts
|
|
113148
113287
|
async function readJavaModuleSpecs(files2, sdkRoot, toolchain) {
|
|
113149
|
-
const digest3 = (0,
|
|
113288
|
+
const digest3 = (0, import_node_crypto90.createHash)("sha256");
|
|
113150
113289
|
const parent = import_node_path154.default.join(kotlinHome(), "java-specs");
|
|
113151
113290
|
import_node_fs154.default.mkdirSync(parent, { recursive: true });
|
|
113152
113291
|
const work = import_node_fs154.default.mkdtempSync(import_node_path154.default.join(parent, ".read-"));
|
|
@@ -113243,12 +113382,12 @@ async function compileJavaModuleAbi(input) {
|
|
|
113243
113382
|
);
|
|
113244
113383
|
return library;
|
|
113245
113384
|
}
|
|
113246
|
-
var import_node_child_process72,
|
|
113385
|
+
var import_node_child_process72, import_node_crypto90, import_node_fs154, import_node_path154, import_node_util18, run13, JAVA_BINDINGS_INITIALIZER;
|
|
113247
113386
|
var init_java_module_abi = __esm({
|
|
113248
113387
|
"src/java-module-abi.ts"() {
|
|
113249
113388
|
"use strict";
|
|
113250
113389
|
import_node_child_process72 = require("node:child_process");
|
|
113251
|
-
|
|
113390
|
+
import_node_crypto90 = require("node:crypto");
|
|
113252
113391
|
import_node_fs154 = __toESM(require("node:fs"), 1);
|
|
113253
113392
|
import_node_path154 = __toESM(require("node:path"), 1);
|
|
113254
113393
|
import_node_util18 = require("node:util");
|
|
@@ -113504,13 +113643,13 @@ function verifyKotlinSdkDirectory(root, compiler) {
|
|
|
113504
113643
|
if (!stat2.isFile() || stat2.nlink !== 1)
|
|
113505
113644
|
throw new Error(`Kotlin SDK binary is not a regular file: ${name3}`);
|
|
113506
113645
|
const bytes = import_node_fs155.default.readFileSync(target);
|
|
113507
|
-
if (bytes.length !== expected.bytes || (0,
|
|
113646
|
+
if (bytes.length !== expected.bytes || (0, import_node_crypto91.createHash)("sha256").update(bytes).digest("hex") !== expected.sha256)
|
|
113508
113647
|
throw new Error(`Kotlin SDK binary differs from its manifest: ${name3}`);
|
|
113509
113648
|
}
|
|
113510
113649
|
return manifest;
|
|
113511
113650
|
}
|
|
113512
113651
|
async function installKotlinSdkArchive(archive, compiler) {
|
|
113513
|
-
const sha2565 = (0,
|
|
113652
|
+
const sha2565 = (0, import_node_crypto91.createHash)("sha256").update(archive).digest("hex");
|
|
113514
113653
|
const parent = import_node_path155.default.join(kotlinHome(), "sdk");
|
|
113515
113654
|
const root = import_node_path155.default.join(parent, sha2565);
|
|
113516
113655
|
if (import_node_fs155.default.existsSync(root))
|
|
@@ -113539,12 +113678,12 @@ async function installKotlinSdkArchive(archive, compiler) {
|
|
|
113539
113678
|
import_node_fs155.default.rmSync(work, { recursive: true, force: true });
|
|
113540
113679
|
}
|
|
113541
113680
|
}
|
|
113542
|
-
var import_node_child_process73,
|
|
113681
|
+
var import_node_child_process73, import_node_crypto91, import_node_fs155, import_node_path155, import_node_util19, run14;
|
|
113543
113682
|
var init_kotlin_sdk = __esm({
|
|
113544
113683
|
"src/kotlin-sdk.ts"() {
|
|
113545
113684
|
"use strict";
|
|
113546
113685
|
import_node_child_process73 = require("node:child_process");
|
|
113547
|
-
|
|
113686
|
+
import_node_crypto91 = require("node:crypto");
|
|
113548
113687
|
import_node_fs155 = __toESM(require("node:fs"), 1);
|
|
113549
113688
|
import_node_path155 = __toESM(require("node:path"), 1);
|
|
113550
113689
|
import_node_util19 = require("node:util");
|
|
@@ -113681,7 +113820,7 @@ function peachKotlinModuleRoot() {
|
|
|
113681
113820
|
return import_node_path156.default.resolve(import_node_path156.default.dirname((0, import_node_url8.fileURLToPath)(__sootsim_import_meta_url)), "..", "kotlin");
|
|
113682
113821
|
if (installedRoot) return installedRoot;
|
|
113683
113822
|
const files2 = JSON.parse(__PEACH_BUNDLED_KOTLIN__);
|
|
113684
|
-
const digest3 = (0,
|
|
113823
|
+
const digest3 = (0, import_node_crypto92.createHash)("sha256").update(__PEACH_BUNDLED_KOTLIN__).digest("hex");
|
|
113685
113824
|
const parent = import_node_path156.default.join(rnxHomeDir(), "kotlin", "modules");
|
|
113686
113825
|
const root = import_node_path156.default.join(parent, digest3);
|
|
113687
113826
|
import_node_fs156.default.mkdirSync(parent, { recursive: true });
|
|
@@ -113710,11 +113849,11 @@ function peachKotlinModuleRoot() {
|
|
|
113710
113849
|
installedRoot = root;
|
|
113711
113850
|
return root;
|
|
113712
113851
|
}
|
|
113713
|
-
var
|
|
113852
|
+
var import_node_crypto92, import_node_fs156, import_node_path156, import_node_url8, installedRoot;
|
|
113714
113853
|
var init_kotlin_module = __esm({
|
|
113715
113854
|
"src/kotlin-module.ts"() {
|
|
113716
113855
|
"use strict";
|
|
113717
|
-
|
|
113856
|
+
import_node_crypto92 = require("node:crypto");
|
|
113718
113857
|
import_node_fs156 = __toESM(require("node:fs"), 1);
|
|
113719
113858
|
import_node_path156 = __toESM(require("node:path"), 1);
|
|
113720
113859
|
import_node_url8 = require("node:url");
|
|
@@ -113748,7 +113887,7 @@ async function resolveAndroidGradleSources(request) {
|
|
|
113748
113887
|
const parent = import_node_path157.default.join(kotlinHome(), "gradle-sources");
|
|
113749
113888
|
import_node_fs157.default.mkdirSync(parent, { recursive: true });
|
|
113750
113889
|
const work = import_node_fs157.default.mkdtempSync(import_node_path157.default.join(parent, ".query-"));
|
|
113751
|
-
const task = `peachAndroidSources${(0,
|
|
113890
|
+
const task = `peachAndroidSources${(0, import_node_crypto93.randomBytes)(8).toString("hex")}`;
|
|
113752
113891
|
const script = import_node_path157.default.join(work, "sources.gradle");
|
|
113753
113892
|
const encoded = Buffer.from(
|
|
113754
113893
|
JSON.stringify({
|
|
@@ -113869,12 +114008,12 @@ function readDependencySources(value) {
|
|
|
113869
114008
|
};
|
|
113870
114009
|
});
|
|
113871
114010
|
}
|
|
113872
|
-
var import_node_child_process74,
|
|
114011
|
+
var import_node_child_process74, import_node_crypto93, import_node_fs157, import_node_path157, import_node_util20, run15, modelQuery;
|
|
113873
114012
|
var init_android_gradle_sources = __esm({
|
|
113874
114013
|
"src/android-gradle-sources.ts"() {
|
|
113875
114014
|
"use strict";
|
|
113876
114015
|
import_node_child_process74 = require("node:child_process");
|
|
113877
|
-
|
|
114016
|
+
import_node_crypto93 = require("node:crypto");
|
|
113878
114017
|
import_node_fs157 = __toESM(require("node:fs"), 1);
|
|
113879
114018
|
import_node_path157 = __toESM(require("node:path"), 1);
|
|
113880
114019
|
import_node_util20 = require("node:util");
|
|
@@ -114245,7 +114384,7 @@ function readExpoTypes(output) {
|
|
|
114245
114384
|
});
|
|
114246
114385
|
}
|
|
114247
114386
|
async function scanSources(tool, parse17, toolchain, moduleRoot, files2) {
|
|
114248
|
-
const digest3 = (0,
|
|
114387
|
+
const digest3 = (0, import_node_crypto94.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
|
|
114249
114388
|
const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
|
|
114250
114389
|
digest3.update(import_node_fs158.default.readFileSync(import_node_path158.default.join(moduleRoot, "sdk.tar.gz")));
|
|
114251
114390
|
digest3.update(tool);
|
|
@@ -114905,7 +115044,7 @@ async function compileKotlin(input, origin) {
|
|
|
114905
115044
|
bytes: import_node_fs158.default.readFileSync(file)
|
|
114906
115045
|
}));
|
|
114907
115046
|
const { composeArchive, ...compilerInputs } = toolchain;
|
|
114908
|
-
const digest3 = (0,
|
|
115047
|
+
const digest3 = (0, import_node_crypto94.createHash)("sha256");
|
|
114909
115048
|
digest3.update(
|
|
114910
115049
|
JSON.stringify({
|
|
114911
115050
|
format: BUILD_FORMAT,
|
|
@@ -115197,12 +115336,12 @@ async function serveKotlinRequest(pathname, res, app) {
|
|
|
115197
115336
|
}
|
|
115198
115337
|
return true;
|
|
115199
115338
|
}
|
|
115200
|
-
var import_node_child_process75,
|
|
115339
|
+
var import_node_child_process75, import_node_crypto94, 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;
|
|
115201
115340
|
var init_kotlin_host = __esm({
|
|
115202
115341
|
"src/kotlin-host.ts"() {
|
|
115203
115342
|
"use strict";
|
|
115204
115343
|
import_node_child_process75 = require("node:child_process");
|
|
115205
|
-
|
|
115344
|
+
import_node_crypto94 = require("node:crypto");
|
|
115206
115345
|
import_node_fs158 = __toESM(require("node:fs"), 1);
|
|
115207
115346
|
import_node_module21 = require("node:module");
|
|
115208
115347
|
import_node_path158 = __toESM(require("node:path"), 1);
|
|
@@ -115517,12 +115656,111 @@ var init_one_native_source = __esm({
|
|
|
115517
115656
|
}
|
|
115518
115657
|
});
|
|
115519
115658
|
|
|
115659
|
+
// src/managed-expo-identity.ts
|
|
115660
|
+
var managed_expo_identity_exports = {};
|
|
115661
|
+
__export(managed_expo_identity_exports, {
|
|
115662
|
+
handleManagedExpoInputs: () => handleManagedExpoInputs,
|
|
115663
|
+
readManagedExpoIdentity: () => readManagedExpoIdentity
|
|
115664
|
+
});
|
|
115665
|
+
async function prepareIdentity(root, iosTarget) {
|
|
115666
|
+
try {
|
|
115667
|
+
const identity2 = await managedExpoNativeAppIdentity(root, iosTarget);
|
|
115668
|
+
return identity2 && createNativeAppIdentityHeader(identity2);
|
|
115669
|
+
} catch (error) {
|
|
115670
|
+
if (error instanceof NativeAppTargetSelectionError) return null;
|
|
115671
|
+
throw error;
|
|
115672
|
+
}
|
|
115673
|
+
}
|
|
115674
|
+
async function readManagedExpoIdentity(root, platform3, iosTarget, bridgeOrigin) {
|
|
115675
|
+
if (!getRuntimePlatformAdapter(platform3).isIOS || !isManagedExpoApp(root)) return null;
|
|
115676
|
+
if (bridgeOrigin) {
|
|
115677
|
+
const url = new URL(MANAGED_EXPO_INPUTS_ROUTE, bridgeOrigin);
|
|
115678
|
+
url.searchParams.set("root", root);
|
|
115679
|
+
const response = await nodeHttpFetch(url.href);
|
|
115680
|
+
if (response.ok && response.headers.get("content-type") === revisionType) {
|
|
115681
|
+
const environment = (0, import_node_crypto95.createHash)("sha256").update(JSON.stringify(Object.entries(process.env).sort())).digest("hex");
|
|
115682
|
+
const inputs2 = Buffer.from(
|
|
115683
|
+
JSON.stringify([
|
|
115684
|
+
await response.text(),
|
|
115685
|
+
root,
|
|
115686
|
+
iosTarget,
|
|
115687
|
+
getCliVersion(),
|
|
115688
|
+
environment
|
|
115689
|
+
])
|
|
115690
|
+
);
|
|
115691
|
+
const staged = await stageHostDerivedBytes(
|
|
115692
|
+
inputs2,
|
|
115693
|
+
"managed-expo-identity-1",
|
|
115694
|
+
bridgeOrigin,
|
|
115695
|
+
".txt",
|
|
115696
|
+
async () => Buffer.from(await prepareIdentity(root, iosTarget) ?? "")
|
|
115697
|
+
);
|
|
115698
|
+
const identity2 = await nodeHttpFetch(staged);
|
|
115699
|
+
if (!identity2.ok)
|
|
115700
|
+
throw new Error(`Managed Expo identity answered ${identity2.status}`);
|
|
115701
|
+
return await identity2.text() || null;
|
|
115702
|
+
}
|
|
115703
|
+
if (!response.ok && response.status !== 404) throw new Error(await response.text());
|
|
115704
|
+
await response.body?.cancel();
|
|
115705
|
+
}
|
|
115706
|
+
return prepareIdentity(root, iosTarget);
|
|
115707
|
+
}
|
|
115708
|
+
function handleManagedExpoInputs(req, res, url) {
|
|
115709
|
+
const remote = req.socket.remoteAddress?.replace(/^::ffff:/, "");
|
|
115710
|
+
if (!remote || !isLoopbackHost(remote) || req.headers.origin || req.headers["sec-fetch-mode"]) {
|
|
115711
|
+
res.writeHead(403);
|
|
115712
|
+
res.end("Managed Expo identity requires a local CLI client");
|
|
115713
|
+
return;
|
|
115714
|
+
}
|
|
115715
|
+
if (req.method !== "GET") {
|
|
115716
|
+
res.writeHead(405);
|
|
115717
|
+
res.end("GET required");
|
|
115718
|
+
return;
|
|
115719
|
+
}
|
|
115720
|
+
const source = url.searchParams.get("root");
|
|
115721
|
+
if (!source || !import_node_path160.default.isAbsolute(source)) {
|
|
115722
|
+
res.writeHead(400);
|
|
115723
|
+
res.end("Missing absolute app root");
|
|
115724
|
+
return;
|
|
115725
|
+
}
|
|
115726
|
+
const root = import_node_fs160.default.realpathSync(source);
|
|
115727
|
+
const revision = nativeInputRevision(root);
|
|
115728
|
+
res.setHeader("Cache-Control", "no-store");
|
|
115729
|
+
if (!revision) {
|
|
115730
|
+
res.writeHead(204);
|
|
115731
|
+
res.end();
|
|
115732
|
+
return;
|
|
115733
|
+
}
|
|
115734
|
+
res.writeHead(200, { "Content-Type": revisionType });
|
|
115735
|
+
res.end(revision);
|
|
115736
|
+
}
|
|
115737
|
+
var import_node_crypto95, import_node_fs160, import_node_path160, revisionType;
|
|
115738
|
+
var init_managed_expo_identity = __esm({
|
|
115739
|
+
"src/managed-expo-identity.ts"() {
|
|
115740
|
+
"use strict";
|
|
115741
|
+
import_node_crypto95 = require("node:crypto");
|
|
115742
|
+
import_node_fs160 = __toESM(require("node:fs"), 1);
|
|
115743
|
+
import_node_path160 = __toESM(require("node:path"), 1);
|
|
115744
|
+
init_backend_origin();
|
|
115745
|
+
init_cli_version();
|
|
115746
|
+
init_expo_native_prebuilt();
|
|
115747
|
+
init_staged_host_files();
|
|
115748
|
+
init_native_app_identity();
|
|
115749
|
+
init_native_app_identity_project();
|
|
115750
|
+
init_native_preparation();
|
|
115751
|
+
init_nativePreparationContract();
|
|
115752
|
+
init_node_http_fetch();
|
|
115753
|
+
init_runtimePlatformContract();
|
|
115754
|
+
revisionType = "application/vnd.peach.native-input-revision";
|
|
115755
|
+
}
|
|
115756
|
+
});
|
|
115757
|
+
|
|
115520
115758
|
// src/one-native-app-catalog.ts
|
|
115521
|
-
var
|
|
115759
|
+
var import_node_path161;
|
|
115522
115760
|
var init_one_native_app_catalog = __esm({
|
|
115523
115761
|
"src/one-native-app-catalog.ts"() {
|
|
115524
115762
|
"use strict";
|
|
115525
|
-
|
|
115763
|
+
import_node_path161 = __toESM(require("node:path"), 1);
|
|
115526
115764
|
init_is_record();
|
|
115527
115765
|
init_one_native_app_config();
|
|
115528
115766
|
}
|
|
@@ -115571,12 +115809,12 @@ async function stageCatalogSvg(file, scale, origin, bytes) {
|
|
|
115571
115809
|
}
|
|
115572
115810
|
);
|
|
115573
115811
|
}
|
|
115574
|
-
var
|
|
115812
|
+
var import_node_fs161, import_node_path162;
|
|
115575
115813
|
var init_app_catalog = __esm({
|
|
115576
115814
|
"cli/app-catalog.ts"() {
|
|
115577
115815
|
"use strict";
|
|
115578
|
-
|
|
115579
|
-
|
|
115816
|
+
import_node_fs161 = __toESM(require("node:fs"), 1);
|
|
115817
|
+
import_node_path162 = __toESM(require("node:path"), 1);
|
|
115580
115818
|
init_bundleAssets();
|
|
115581
115819
|
init_expo_native_workspace();
|
|
115582
115820
|
init_staged_host_files();
|
|
@@ -115587,17 +115825,17 @@ var init_app_catalog = __esm({
|
|
|
115587
115825
|
|
|
115588
115826
|
// src/expo-widget-assets.ts
|
|
115589
115827
|
async function stagePreparedExpoWidgetAssets(preparedApp, origin) {
|
|
115590
|
-
const ios =
|
|
115591
|
-
const targets =
|
|
115828
|
+
const ios = import_node_path163.default.join(preparedApp, "ios");
|
|
115829
|
+
const targets = import_node_fs162.default.readdirSync(ios, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).flatMap((entry) => readXcodeExtensionTargets(import_node_path163.default.join(ios, entry.name))).filter(
|
|
115592
115830
|
({ infoPlist: infoPlist2 }) => isRecord(infoPlist2.NSExtension) && infoPlist2.NSExtension.NSExtensionPointIdentifier === "com.apple.widgetkit-extension" && typeof infoPlist2.ExpoWidgetsAppGroupIdentifier === "string"
|
|
115593
115831
|
);
|
|
115594
115832
|
if (targets.length === 0) return null;
|
|
115595
115833
|
if (targets.length !== 1) throw new Error("expected one Expo Widgets extension target");
|
|
115596
115834
|
const target = targets[0];
|
|
115597
|
-
const root =
|
|
115835
|
+
const root = import_node_fs162.default.realpathSync(findWorkspaceRoot(preparedApp));
|
|
115598
115836
|
const members2 = new Map(
|
|
115599
115837
|
target.resources.map((file) => [
|
|
115600
|
-
|
|
115838
|
+
import_node_path163.default.relative(root, file).split(import_node_path163.default.sep).join("/"),
|
|
115601
115839
|
file
|
|
115602
115840
|
])
|
|
115603
115841
|
);
|
|
@@ -115612,10 +115850,10 @@ async function stagePreparedExpoWidgetAssets(preparedApp, origin) {
|
|
|
115612
115850
|
(file) => members2.has(file) ? read(file).toString("utf8") : null,
|
|
115613
115851
|
(file, scale) => {
|
|
115614
115852
|
const bytes = read(file);
|
|
115615
|
-
const ext =
|
|
115853
|
+
const ext = import_node_path163.default.extname(file);
|
|
115616
115854
|
if (ext.toLowerCase() === ".svg") return stageCatalogSvg(file, scale, origin, bytes);
|
|
115617
115855
|
if (ext.toLowerCase() === ".pdf") {
|
|
115618
|
-
const sha2565 = (0,
|
|
115856
|
+
const sha2565 = (0, import_node_crypto96.createHash)("sha256").update(bytes).digest("hex");
|
|
115619
115857
|
const png = rasterizePdfFiles([{ file: members2.get(file), sha256: sha2565 }]).get(sha2565);
|
|
115620
115858
|
return stageHostBytes(png, origin, ".png");
|
|
115621
115859
|
}
|
|
@@ -115628,13 +115866,13 @@ async function stageExpoWidgetAssets(appRoot, origin) {
|
|
|
115628
115866
|
const prepared = await prepareExpoNativeProject(appRoot);
|
|
115629
115867
|
return stagePreparedExpoWidgetAssets(prepared.app, origin);
|
|
115630
115868
|
}
|
|
115631
|
-
var
|
|
115869
|
+
var import_node_crypto96, import_node_fs162, import_node_path163;
|
|
115632
115870
|
var init_expo_widget_assets = __esm({
|
|
115633
115871
|
"src/expo-widget-assets.ts"() {
|
|
115634
115872
|
"use strict";
|
|
115635
|
-
|
|
115636
|
-
|
|
115637
|
-
|
|
115873
|
+
import_node_crypto96 = require("node:crypto");
|
|
115874
|
+
import_node_fs162 = __toESM(require("node:fs"), 1);
|
|
115875
|
+
import_node_path163 = __toESM(require("node:path"), 1);
|
|
115638
115876
|
init_app_catalog();
|
|
115639
115877
|
init_expo_native_workspace();
|
|
115640
115878
|
init_staged_host_files();
|
|
@@ -115681,17 +115919,17 @@ var init_nitro_app_providers = __esm({
|
|
|
115681
115919
|
async function trunkSpecification(lockFile, root, version2, checksum) {
|
|
115682
115920
|
if (typeof checksum !== "string" || !/^[a-f0-9]{40}$/.test(checksum))
|
|
115683
115921
|
throw new Error(`${lockFile}: missing checksum for ${root}`);
|
|
115684
|
-
const file =
|
|
115922
|
+
const file = import_node_path164.default.join(
|
|
115685
115923
|
cacheDir(),
|
|
115686
115924
|
"swift-source-pods",
|
|
115687
115925
|
"specifications",
|
|
115688
115926
|
`${checksum}.json`
|
|
115689
115927
|
);
|
|
115690
|
-
const sha1 = (value) => (0,
|
|
115928
|
+
const sha1 = (value) => (0, import_node_crypto97.createHash)("sha1").update(value).digest("hex");
|
|
115691
115929
|
let text7;
|
|
115692
|
-
if (
|
|
115930
|
+
if (import_node_fs163.default.existsSync(file)) text7 = import_node_fs163.default.readFileSync(file, "utf8");
|
|
115693
115931
|
else {
|
|
115694
|
-
const shard2 = (0,
|
|
115932
|
+
const shard2 = (0, import_node_crypto97.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
|
|
115695
115933
|
const specPath = `Specs/${shard2}/${root}/${version2}/${root}.podspec.json`;
|
|
115696
115934
|
const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
|
|
115697
115935
|
if (!response.ok)
|
|
@@ -115726,21 +115964,21 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
|
|
|
115726
115964
|
const spec = JSON.parse(text7);
|
|
115727
115965
|
if (!record5(spec) || spec.name !== root || spec.version !== version2)
|
|
115728
115966
|
throw new Error(`specification identity differs for ${root} ${version2}`);
|
|
115729
|
-
if (!
|
|
115730
|
-
|
|
115731
|
-
|
|
115967
|
+
if (!import_node_fs163.default.existsSync(file)) {
|
|
115968
|
+
import_node_fs163.default.mkdirSync(import_node_path164.default.dirname(file), { recursive: true });
|
|
115969
|
+
import_node_fs163.default.writeFileSync(file, text7);
|
|
115732
115970
|
}
|
|
115733
115971
|
return { text: text7, spec };
|
|
115734
115972
|
}
|
|
115735
115973
|
function appPodfileLock(appRoot) {
|
|
115736
115974
|
return [
|
|
115737
|
-
|
|
115738
|
-
|
|
115739
|
-
].find((file) =>
|
|
115975
|
+
import_node_path164.default.join(appRoot, "ios", "Podfile.lock"),
|
|
115976
|
+
import_node_path164.default.join(appRoot, "Podfile.lock")
|
|
115977
|
+
].find((file) => import_node_fs163.default.existsSync(file));
|
|
115740
115978
|
}
|
|
115741
115979
|
async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModules = []) {
|
|
115742
115980
|
if (modules.length === 0 && headerModules.length === 0) return null;
|
|
115743
|
-
const original =
|
|
115981
|
+
const original = import_node_fs163.default.readFileSync(lockFile, "utf8");
|
|
115744
115982
|
const lock = browser_default.parse(original);
|
|
115745
115983
|
const pods = lockedPods(lock);
|
|
115746
115984
|
if (!record5(lock) || !record5(lock["SPEC CHECKSUMS"]))
|
|
@@ -115820,17 +116058,17 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
115820
116058
|
"end",
|
|
115821
116059
|
""
|
|
115822
116060
|
].join("\n");
|
|
115823
|
-
const key2 = (0,
|
|
116061
|
+
const key2 = (0, import_node_crypto97.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
|
|
115824
116062
|
JSON.stringify(
|
|
115825
116063
|
Object.entries(specificationChecksums).sort(([a], [b]) => a.localeCompare(b))
|
|
115826
116064
|
)
|
|
115827
116065
|
).digest("hex");
|
|
115828
|
-
const work =
|
|
116066
|
+
const work = import_node_path164.default.join(cacheDir(), "swift-source-pods", key2);
|
|
115829
116067
|
return withSwiftRootLock(work, async () => {
|
|
115830
|
-
const ios =
|
|
115831
|
-
const complete =
|
|
115832
|
-
if (!
|
|
115833
|
-
|
|
116068
|
+
const ios = import_node_path164.default.join(work, "ios");
|
|
116069
|
+
const complete = import_node_path164.default.join(work, "pods-installed");
|
|
116070
|
+
if (!import_node_fs163.default.existsSync(complete)) {
|
|
116071
|
+
import_node_fs163.default.mkdirSync(import_node_path164.default.join(ios, `${APP}.xcodeproj`), { recursive: true });
|
|
115834
116072
|
for (const root of [...roots].sort()) {
|
|
115835
116073
|
const { text: text7 } = await trunkSpecification(
|
|
115836
116074
|
lockFile,
|
|
@@ -115838,26 +116076,26 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
115838
116076
|
rootVersion(root),
|
|
115839
116077
|
specificationChecksums[root]
|
|
115840
116078
|
);
|
|
115841
|
-
|
|
116079
|
+
import_node_fs163.default.writeFileSync(import_node_path164.default.join(ios, `${root}.podspec.json`), text7);
|
|
115842
116080
|
}
|
|
115843
|
-
|
|
115844
|
-
|
|
115845
|
-
|
|
116081
|
+
import_node_fs163.default.writeFileSync(import_node_path164.default.join(ios, `${APP}.xcodeproj/project.pbxproj`), project);
|
|
116082
|
+
import_node_fs163.default.writeFileSync(import_node_path164.default.join(ios, "main.swift"), "import Foundation\n");
|
|
116083
|
+
import_node_fs163.default.writeFileSync(import_node_path164.default.join(ios, "Podfile"), podfile);
|
|
115846
116084
|
await installPods(
|
|
115847
116085
|
work,
|
|
115848
116086
|
{ ...process.env, LANG: "en_US.UTF-8", LC_ALL: "en_US.UTF-8" },
|
|
115849
116087
|
work
|
|
115850
116088
|
);
|
|
115851
|
-
|
|
116089
|
+
import_node_fs163.default.writeFileSync(complete, key2);
|
|
115852
116090
|
}
|
|
115853
116091
|
const actual = lockedPods(
|
|
115854
|
-
browser_default.parse(
|
|
116092
|
+
browser_default.parse(import_node_fs163.default.readFileSync(import_node_path164.default.join(ios, "Pods/Manifest.lock"), "utf8"))
|
|
115855
116093
|
);
|
|
115856
116094
|
if (JSON.stringify([...actual].sort(([a], [b]) => a.localeCompare(b))) !== JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b))))
|
|
115857
116095
|
throw new Error(
|
|
115858
116096
|
`${work}: installed pod versions or dependencies differ from ${lockFile}`
|
|
115859
116097
|
);
|
|
115860
|
-
const workspace =
|
|
116098
|
+
const workspace = import_node_path164.default.join(ios, `${APP}.xcworkspace`);
|
|
115861
116099
|
await prepareXcodeSwiftPackages(workspace, APP, "Release");
|
|
115862
116100
|
const app = readXcodeAppTarget(workspace, APP, "Release", { installedPods: true });
|
|
115863
116101
|
if (app.binaryFrameworks.length > 0)
|
|
@@ -115889,13 +116127,13 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
115889
116127
|
);
|
|
115890
116128
|
});
|
|
115891
116129
|
}
|
|
115892
|
-
var
|
|
116130
|
+
var import_node_crypto97, import_node_fs163, import_node_path164, APP, record5, project, podModuleName;
|
|
115893
116131
|
var init_swift_source_pods = __esm({
|
|
115894
116132
|
"src/swift-source-pods.ts"() {
|
|
115895
116133
|
"use strict";
|
|
115896
|
-
|
|
115897
|
-
|
|
115898
|
-
|
|
116134
|
+
import_node_crypto97 = require("node:crypto");
|
|
116135
|
+
import_node_fs163 = __toESM(require("node:fs"), 1);
|
|
116136
|
+
import_node_path164 = __toESM(require("node:path"), 1);
|
|
115899
116137
|
init_browser();
|
|
115900
116138
|
init_home_paths();
|
|
115901
116139
|
init_pod_lockfile();
|
|
@@ -116155,11 +116393,11 @@ function stageMissingReactHeaders(supportFiles, collectionFiles, reactNativeRoot
|
|
|
116155
116393
|
const coreUpstream = `Sources/${TURBO_CORE_TARGET}/upstream/react-native`;
|
|
116156
116394
|
const flatMap = /* @__PURE__ */ new Map();
|
|
116157
116395
|
for (const { from, to } of RN_HEADER_DIR_MAP) {
|
|
116158
|
-
const dir =
|
|
116159
|
-
if (!
|
|
116160
|
-
for (const entry of
|
|
116396
|
+
const dir = import_node_path165.default.join(reactNativeRoot, from);
|
|
116397
|
+
if (!import_node_fs164.default.existsSync(dir)) continue;
|
|
116398
|
+
for (const entry of import_node_fs164.default.readdirSync(dir, { recursive: true, withFileTypes: true })) {
|
|
116161
116399
|
if (!entry.isFile() || !/\.(?:h|hpp)$/.test(entry.name)) continue;
|
|
116162
|
-
const rel =
|
|
116400
|
+
const rel = import_node_path165.default.relative(reactNativeRoot, import_node_path165.default.join(entry.parentPath, entry.name)).split(import_node_path165.default.sep).join("/");
|
|
116163
116401
|
const key2 = `${to}/${entry.name}`;
|
|
116164
116402
|
if (!flatMap.has(key2)) flatMap.set(key2, rel);
|
|
116165
116403
|
}
|
|
@@ -116168,12 +116406,12 @@ function stageMissingReactHeaders(supportFiles, collectionFiles, reactNativeRoot
|
|
|
116168
116406
|
const scanQueue = [];
|
|
116169
116407
|
const stageRelative = (rel) => {
|
|
116170
116408
|
const clean2 = rel.replace(/^\//, "");
|
|
116171
|
-
const full =
|
|
116172
|
-
if (!
|
|
116409
|
+
const full = import_node_path165.default.join(reactNativeRoot, clean2);
|
|
116410
|
+
if (!import_node_fs164.default.statSync(full, { throwIfNoEntry: false })?.isFile()) return null;
|
|
116173
116411
|
const targetKey = `${coreUpstream}/${clean2}`;
|
|
116174
116412
|
if (!Object.hasOwn(supportFiles, targetKey)) {
|
|
116175
|
-
supportFiles[targetKey] =
|
|
116176
|
-
scanQueue.push({ key: targetKey, dir:
|
|
116413
|
+
supportFiles[targetKey] = import_node_fs164.default.readFileSync(full, "utf8");
|
|
116414
|
+
scanQueue.push({ key: targetKey, dir: import_node_path165.default.posix.dirname(clean2) });
|
|
116177
116415
|
}
|
|
116178
116416
|
return targetKey;
|
|
116179
116417
|
};
|
|
@@ -116182,7 +116420,7 @@ function stageMissingReactHeaders(supportFiles, collectionFiles, reactNativeRoot
|
|
|
116182
116420
|
if (Object.hasOwn(supportFiles, outKey)) return;
|
|
116183
116421
|
let targetKey = null;
|
|
116184
116422
|
if (fromDir) {
|
|
116185
|
-
const candidate =
|
|
116423
|
+
const candidate = import_node_path165.default.posix.normalize(import_node_path165.default.posix.join(fromDir, include));
|
|
116186
116424
|
if (!candidate.startsWith("..")) targetKey = stageRelative(candidate);
|
|
116187
116425
|
}
|
|
116188
116426
|
if (!targetKey && flatMap.has(include)) {
|
|
@@ -116190,12 +116428,12 @@ function stageMissingReactHeaders(supportFiles, collectionFiles, reactNativeRoot
|
|
|
116190
116428
|
}
|
|
116191
116429
|
if (!targetKey) {
|
|
116192
116430
|
for (const root of RN_COMMON_ROOTS) {
|
|
116193
|
-
targetKey = stageRelative(
|
|
116431
|
+
targetKey = stageRelative(import_node_path165.default.posix.join(root, include));
|
|
116194
116432
|
if (targetKey) break;
|
|
116195
116433
|
}
|
|
116196
116434
|
}
|
|
116197
116435
|
if (targetKey) {
|
|
116198
|
-
const rel =
|
|
116436
|
+
const rel = import_node_path165.default.posix.relative(import_node_path165.default.posix.dirname(outKey), targetKey);
|
|
116199
116437
|
supportFiles[outKey] = `#pragma once
|
|
116200
116438
|
#ifdef __OBJC__
|
|
116201
116439
|
#import ${JSON.stringify(rel)}
|
|
@@ -116208,7 +116446,7 @@ function stageMissingReactHeaders(supportFiles, collectionFiles, reactNativeRoot
|
|
|
116208
116446
|
const dep = dependencyHeader(include);
|
|
116209
116447
|
if (dep) {
|
|
116210
116448
|
supportFiles[outKey] = dep.text;
|
|
116211
|
-
scanQueue.push({ key: outKey, dir:
|
|
116449
|
+
scanQueue.push({ key: outKey, dir: import_node_path165.default.posix.dirname(include) });
|
|
116212
116450
|
for (const extra of nitroDependencyIncludes(
|
|
116213
116451
|
reactNativeVersion,
|
|
116214
116452
|
reactNativeRoot,
|
|
@@ -116219,7 +116457,7 @@ function stageMissingReactHeaders(supportFiles, collectionFiles, reactNativeRoot
|
|
|
116219
116457
|
const extraDep = dependencyHeader(extra);
|
|
116220
116458
|
if (extraDep) {
|
|
116221
116459
|
supportFiles[extraOut] = extraDep.text;
|
|
116222
|
-
scanQueue.push({ key: extraOut, dir:
|
|
116460
|
+
scanQueue.push({ key: extraOut, dir: import_node_path165.default.posix.dirname(extra) });
|
|
116223
116461
|
}
|
|
116224
116462
|
}
|
|
116225
116463
|
}
|
|
@@ -116263,7 +116501,7 @@ function nitroDependencyHeaderSettings(target, dependencies, files2) {
|
|
|
116263
116501
|
return { extraDeps: [], cEntries: [], cxxEntries: [], usesTurboCore: false };
|
|
116264
116502
|
}
|
|
116265
116503
|
const turboInclude = `.headerSearchPath(${JSON.stringify(
|
|
116266
|
-
|
|
116504
|
+
import_node_path165.default.posix.relative(target.path, `Sources/${TURBO_CORE_TARGET}/include`)
|
|
116267
116505
|
)})`;
|
|
116268
116506
|
const pchPath = `Sources/${TURBO_CORE_TARGET}/include/PeachTurboPrefix.pch`;
|
|
116269
116507
|
const pchFlag = files2[pchPath] ? [`.unsafeFlags(${JSON.stringify(["-include", pchPath])})`] : [];
|
|
@@ -116299,7 +116537,7 @@ async function prepareNitroCompileInput(options2) {
|
|
|
116299
116537
|
const ndebug = options2.configuration === "Release" ? ["-DNDEBUG"] : [];
|
|
116300
116538
|
await prepareNitroSourceDependencies(options2);
|
|
116301
116539
|
const workspace = installedXcodeWorkspace(options2.projectRoot);
|
|
116302
|
-
const installedRoot2 =
|
|
116540
|
+
const installedRoot2 = import_node_fs164.default.realpathSync(options2.projectRoot);
|
|
116303
116541
|
const autolinked = await iosAutolinkedDependencies(
|
|
116304
116542
|
options2.appRoot ?? options2.projectRoot
|
|
116305
116543
|
);
|
|
@@ -116314,11 +116552,11 @@ async function prepareNitroCompileInput(options2) {
|
|
|
116314
116552
|
peerPackageRoots: autolinked.map(({ root }) => root)
|
|
116315
116553
|
});
|
|
116316
116554
|
const activePods = autolinked.flatMap(
|
|
116317
|
-
({ name: name3, root, podspecPath }) => !answered.has(name3) && podspecPath !== null && activeNitroRoots.has(
|
|
116555
|
+
({ name: name3, root, podspecPath }) => !answered.has(name3) && podspecPath !== null && activeNitroRoots.has(import_node_fs164.default.realpathSync(root)) ? [{ name: name3, root, podspecPath }] : []
|
|
116318
116556
|
);
|
|
116319
116557
|
const podSources = (pod) => [
|
|
116320
116558
|
...podspecSourceFiles2(pod, options2.appRoot ?? options2.projectRoot),
|
|
116321
|
-
...nitrogenGeneratedSources(
|
|
116559
|
+
...nitrogenGeneratedSources(import_node_path165.default.dirname(pod.podspecPath))
|
|
116322
116560
|
].map((file) => projectSourceKey([installedRoot2], file));
|
|
116323
116561
|
let nativeSourceKeys;
|
|
116324
116562
|
if (workspace) {
|
|
@@ -116340,7 +116578,7 @@ async function prepareNitroCompileInput(options2) {
|
|
|
116340
116578
|
const collection = collectNitroSources(
|
|
116341
116579
|
{ ...options2, peerPackageRoots: autolinked.map(({ root }) => root) },
|
|
116342
116580
|
nativeSourceKeys,
|
|
116343
|
-
|
|
116581
|
+
import_node_fs164.default.realpathSync(options2.appRoot ?? options2.projectRoot)
|
|
116344
116582
|
);
|
|
116345
116583
|
const providerNames = new Set(collection.providers.map(({ name: name3 }) => name3));
|
|
116346
116584
|
const installedLibraries = workspace ? installedNativeLibraries(
|
|
@@ -116411,7 +116649,7 @@ async function prepareNitroCompileInput(options2) {
|
|
|
116411
116649
|
)
|
|
116412
116650
|
);
|
|
116413
116651
|
const views = new Set(
|
|
116414
|
-
|
|
116652
|
+
import_node_fs164.default.readdirSync(import_node_path165.default.join(collection.nitro.root, "cpp/views"))
|
|
116415
116653
|
);
|
|
116416
116654
|
for (const [file, source] of Object.entries(collection.files))
|
|
116417
116655
|
if (file.endsWith("/NitroModules-umbrella.h"))
|
|
@@ -116480,8 +116718,8 @@ async function prepareNitroCompileInput(options2) {
|
|
|
116480
116718
|
([file, text7]) => /\.(?:h|hh|hpp|hxx|c|cc|cpp|cxx|m|mm)$/.test(file) && REACT_VERSION_PATTERN.test(text7)
|
|
116481
116719
|
);
|
|
116482
116720
|
if (reactProviders.length > 0 || usesReactHeaders) {
|
|
116483
|
-
const nitroReactCodegenDir =
|
|
116484
|
-
|
|
116721
|
+
const nitroReactCodegenDir = import_node_fs164.default.mkdtempSync(
|
|
116722
|
+
import_node_path165.default.join(import_node_os32.default.tmpdir(), "peach-nitro-react-")
|
|
116485
116723
|
);
|
|
116486
116724
|
let support;
|
|
116487
116725
|
try {
|
|
@@ -116496,7 +116734,7 @@ async function prepareNitroCompileInput(options2) {
|
|
|
116496
116734
|
installedPods: nativeLibraries
|
|
116497
116735
|
});
|
|
116498
116736
|
} finally {
|
|
116499
|
-
|
|
116737
|
+
import_node_fs164.default.rmSync(nitroReactCodegenDir, { recursive: true, force: true });
|
|
116500
116738
|
}
|
|
116501
116739
|
if (support.providers.length > 0 || usesReactHeaders && support.targets.some(({ name: name3 }) => name3 === TURBO_CORE_TARGET)) {
|
|
116502
116740
|
linkReactNativeCore(
|
|
@@ -116566,23 +116804,23 @@ async function prepareNitroCompileInput(options2) {
|
|
|
116566
116804
|
);
|
|
116567
116805
|
for (const [name3, pod] of nativeLibraries) {
|
|
116568
116806
|
if (pod.library === void 0) continue;
|
|
116569
|
-
const library =
|
|
116807
|
+
const library = import_node_fs164.default.readFileSync(pod.library).toString("base64");
|
|
116570
116808
|
input.libraries ??= {};
|
|
116571
116809
|
input.libraries[nitroProviderTarget({ name: name3 })] = library;
|
|
116572
116810
|
}
|
|
116573
|
-
const key2 = (0,
|
|
116811
|
+
const key2 = (0, import_node_crypto98.createHash)("sha256").update(
|
|
116574
116812
|
collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
|
|
116575
|
-
).update("\0").update(
|
|
116576
|
-
const packagePath =
|
|
116813
|
+
).update("\0").update(import_node_fs164.default.realpathSync(options2.moduleRoot)).update("\0").update(options2.configuration).digest("hex");
|
|
116814
|
+
const packagePath = import_node_path165.default.join(import_node_os32.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
|
|
116577
116815
|
const sharedLibrary = [...nativeLibraries.values()].find(
|
|
116578
116816
|
(pod) => pod.sharedLibrary
|
|
116579
116817
|
)?.sharedLibrary;
|
|
116580
116818
|
if (sharedLibrary) {
|
|
116581
|
-
|
|
116582
|
-
const core =
|
|
116583
|
-
|
|
116819
|
+
import_node_fs164.default.mkdirSync(packagePath, { recursive: true });
|
|
116820
|
+
const core = import_node_path165.default.join(packagePath, "adapter.a");
|
|
116821
|
+
import_node_fs164.default.writeFileSync(core, Buffer.from(adapter.base64, "base64"));
|
|
116584
116822
|
input.libraries ??= {};
|
|
116585
|
-
input.libraries.NitroCore =
|
|
116823
|
+
input.libraries.NitroCore = import_node_fs164.default.readFileSync(
|
|
116586
116824
|
combineNativeStaticLibraries([core, sharedLibrary], options2.moduleRoot)
|
|
116587
116825
|
).toString("base64");
|
|
116588
116826
|
}
|
|
@@ -116594,7 +116832,7 @@ async function compileNitroModule(options2) {
|
|
|
116594
116832
|
packagePath,
|
|
116595
116833
|
new Map(
|
|
116596
116834
|
Object.entries(input.files).map(([file, source]) => [
|
|
116597
|
-
|
|
116835
|
+
import_node_path165.default.join(packagePath, file),
|
|
116598
116836
|
source
|
|
116599
116837
|
])
|
|
116600
116838
|
)
|
|
@@ -116620,21 +116858,21 @@ async function compileNitroModule(options2) {
|
|
|
116620
116858
|
};
|
|
116621
116859
|
}
|
|
116622
116860
|
function nitrogenGeneratedSources(podDirectory) {
|
|
116623
|
-
const generated =
|
|
116624
|
-
const sources = (directory2, extension) =>
|
|
116861
|
+
const generated = import_node_path165.default.join(podDirectory, "nitrogen", "generated");
|
|
116862
|
+
const sources = (directory2, extension) => import_node_fs164.default.existsSync(directory2) ? import_node_fs164.default.readdirSync(directory2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile() && extension.test(entry.name)).map((entry) => import_node_path165.default.join(entry.parentPath, entry.name)) : [];
|
|
116625
116863
|
return [
|
|
116626
|
-
...sources(
|
|
116627
|
-
...sources(
|
|
116864
|
+
...sources(import_node_path165.default.join(generated, "shared"), /\.(h|hpp|c|cpp|swift)$/),
|
|
116865
|
+
...sources(import_node_path165.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
|
|
116628
116866
|
];
|
|
116629
116867
|
}
|
|
116630
|
-
var
|
|
116868
|
+
var import_node_crypto98, import_node_fs164, import_node_os32, import_node_path165, BUNDLED_CXX_NAMESPACES, REACT_INCLUDE_PATTERN, REACT_LINKING_PATTERN, REACT_VERSION_PATTERN, RN_HEADER_DIR_MAP, RN_COMMON_ROOTS;
|
|
116631
116869
|
var init_nitro_compile = __esm({
|
|
116632
116870
|
"src/nitro-compile.ts"() {
|
|
116633
116871
|
"use strict";
|
|
116634
|
-
|
|
116635
|
-
|
|
116872
|
+
import_node_crypto98 = require("node:crypto");
|
|
116873
|
+
import_node_fs164 = __toESM(require("node:fs"), 1);
|
|
116636
116874
|
import_node_os32 = __toESM(require("node:os"), 1);
|
|
116637
|
-
|
|
116875
|
+
import_node_path165 = __toESM(require("node:path"), 1);
|
|
116638
116876
|
init_answeredNativePackages();
|
|
116639
116877
|
init_installed_native_libraries();
|
|
116640
116878
|
init_native_app_identity_project();
|
|
@@ -116708,29 +116946,29 @@ var init_nitro_compile = __esm({
|
|
|
116708
116946
|
});
|
|
116709
116947
|
|
|
116710
116948
|
// src/nitro-compiler-digest.ts
|
|
116711
|
-
var
|
|
116949
|
+
var import_node_crypto99, import_node_fs165, import_node_path166;
|
|
116712
116950
|
var init_nitro_compiler_digest = __esm({
|
|
116713
116951
|
"src/nitro-compiler-digest.ts"() {
|
|
116714
116952
|
"use strict";
|
|
116715
|
-
|
|
116716
|
-
|
|
116717
|
-
|
|
116953
|
+
import_node_crypto99 = require("node:crypto");
|
|
116954
|
+
import_node_fs165 = require("node:fs");
|
|
116955
|
+
import_node_path166 = __toESM(require("node:path"), 1);
|
|
116718
116956
|
init_swift_compiler_digest();
|
|
116719
116957
|
}
|
|
116720
116958
|
});
|
|
116721
116959
|
|
|
116722
116960
|
// src/nitro-superset-inputs.ts
|
|
116723
116961
|
async function nitroSupersetInputs(options2) {
|
|
116724
|
-
const resolve10 = (0, import_node_module23.createRequire)((0,
|
|
116962
|
+
const resolve10 = (0, import_node_module23.createRequire)((0, import_node_path167.join)(options2.appRoot, "package.json")).resolve;
|
|
116725
116963
|
const pin2 = swiftNativePin();
|
|
116726
116964
|
const inputs2 = {
|
|
116727
116965
|
configuration: options2.configuration,
|
|
116728
116966
|
"ios-deployment-target": options2.iosDeploymentTarget,
|
|
116729
|
-
"react-native": packageVersion((0,
|
|
116967
|
+
"react-native": packageVersion((0, import_node_path167.dirname)(resolve10("react-native/package.json"))),
|
|
116730
116968
|
"swift-distribution": pin2.distribution.id,
|
|
116731
116969
|
"nitro-runtime": JSON.stringify(pin2.adapters.nitro)
|
|
116732
116970
|
};
|
|
116733
|
-
const nitroModules = (0,
|
|
116971
|
+
const nitroModules = (0, import_node_path167.dirname)(resolve10("react-native-nitro-modules/package.json"));
|
|
116734
116972
|
for (const { name: name3, root } of [
|
|
116735
116973
|
...options2.providers,
|
|
116736
116974
|
{ name: "react-native-nitro-modules", root: nitroModules }
|
|
@@ -116738,16 +116976,16 @@ async function nitroSupersetInputs(options2) {
|
|
|
116738
116976
|
inputs2[`provider:${name3}`] = `${packageVersion(root)}\0${await packageTreeDigest(root)}`;
|
|
116739
116977
|
return inputs2;
|
|
116740
116978
|
}
|
|
116741
|
-
var
|
|
116979
|
+
var import_node_fs166, import_node_module23, import_node_path167, packageVersion;
|
|
116742
116980
|
var init_nitro_superset_inputs = __esm({
|
|
116743
116981
|
"src/nitro-superset-inputs.ts"() {
|
|
116744
116982
|
"use strict";
|
|
116745
|
-
|
|
116983
|
+
import_node_fs166 = require("node:fs");
|
|
116746
116984
|
import_node_module23 = require("node:module");
|
|
116747
|
-
|
|
116985
|
+
import_node_path167 = require("node:path");
|
|
116748
116986
|
init_package_tree_digest();
|
|
116749
116987
|
init_swift_native_pin();
|
|
116750
|
-
packageVersion = (root) => JSON.parse((0,
|
|
116988
|
+
packageVersion = (root) => JSON.parse((0, import_node_fs166.readFileSync)((0, import_node_path167.join)(root, "package.json"), "utf8")).version;
|
|
116751
116989
|
}
|
|
116752
116990
|
});
|
|
116753
116991
|
|
|
@@ -116878,7 +117116,7 @@ __export(nitro_bundle_exports, {
|
|
|
116878
117116
|
handleNitroRequest: () => handleNitroRequest
|
|
116879
117117
|
});
|
|
116880
117118
|
async function compileNitroApp(appRoot, origin, configure, moduleRoot, shared = true, iosTarget, answered) {
|
|
116881
|
-
appRoot =
|
|
117119
|
+
appRoot = import_node_fs167.default.realpathSync(appRoot);
|
|
116882
117120
|
const selection = await selectCompiledNitroProviders(appRoot, answered);
|
|
116883
117121
|
if (!selection) return null;
|
|
116884
117122
|
const { packageRoots, answers: answers2 } = selection;
|
|
@@ -116901,7 +117139,7 @@ async function compileNitroApp(appRoot, origin, configure, moduleRoot, shared =
|
|
|
116901
117139
|
const { artifact, collection } = await compileNitroModule({
|
|
116902
117140
|
appRoot: projectRoot,
|
|
116903
117141
|
packageRoots: packageRoots.map(
|
|
116904
|
-
(root) =>
|
|
117142
|
+
(root) => import_node_path168.default.resolve(projectRoot, import_node_path168.default.relative(appRoot, root))
|
|
116905
117143
|
),
|
|
116906
117144
|
answers: answers2,
|
|
116907
117145
|
moduleRoot: module2,
|
|
@@ -116963,14 +117201,14 @@ function compiledModuleRequestHandler(label, compile2, options2) {
|
|
|
116963
117201
|
res.setHeader("Cross-Origin-Resource-Policy", "cross-origin");
|
|
116964
117202
|
const root = url.searchParams.get("root");
|
|
116965
117203
|
const host2 = req.headers.host;
|
|
116966
|
-
if (req.method !== "GET" || !root || !
|
|
117204
|
+
if (req.method !== "GET" || !root || !import_node_path168.default.isAbsolute(root) || !host2) {
|
|
116967
117205
|
res.writeHead(400);
|
|
116968
117206
|
res.end(`${label} compilation needs GET with an absolute app root`);
|
|
116969
117207
|
return;
|
|
116970
117208
|
}
|
|
116971
117209
|
try {
|
|
116972
117210
|
const iosTarget = url.searchParams.get("iosTarget") ?? void 0;
|
|
116973
|
-
const app =
|
|
117211
|
+
const app = import_node_fs167.default.realpathSync(root);
|
|
116974
117212
|
const key2 = `${host2}\0${app}\0${iosTarget ?? ""}\0${url.searchParams.get("configuration") ?? ""}`;
|
|
116975
117213
|
const assetOrigin = `http://${host2}`;
|
|
116976
117214
|
const build2 = () => compile2(app, assetOrigin, iosTarget, url.searchParams);
|
|
@@ -116997,12 +117235,12 @@ function compiledModuleRequestHandler(label, compile2, options2) {
|
|
|
116997
117235
|
}
|
|
116998
117236
|
};
|
|
116999
117237
|
}
|
|
117000
|
-
var
|
|
117238
|
+
var import_node_fs167, import_node_path168, NITRO_ROUTE, handleNitroRequest;
|
|
117001
117239
|
var init_nitro_bundle = __esm({
|
|
117002
117240
|
"src/nitro-bundle.ts"() {
|
|
117003
117241
|
"use strict";
|
|
117004
|
-
|
|
117005
|
-
|
|
117242
|
+
import_node_fs167 = __toESM(require("node:fs"), 1);
|
|
117243
|
+
import_node_path168 = __toESM(require("node:path"), 1);
|
|
117006
117244
|
init_app_config();
|
|
117007
117245
|
init_backend_origin();
|
|
117008
117246
|
init_expo_native_workspace();
|
|
@@ -117038,7 +117276,7 @@ __export(expo_widgets_bundle_exports, {
|
|
|
117038
117276
|
handleExpoWidgetsRequest: () => handleExpoWidgetsRequest
|
|
117039
117277
|
});
|
|
117040
117278
|
async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
117041
|
-
const require2 = (0, import_node_module24.createRequire)(
|
|
117279
|
+
const require2 = (0, import_node_module24.createRequire)(import_node_path169.default.join(appRoot, "package.json"));
|
|
117042
117280
|
let manifest;
|
|
117043
117281
|
try {
|
|
117044
117282
|
manifest = require2.resolve("expo-widgets/package.json");
|
|
@@ -117047,16 +117285,16 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
117047
117285
|
return null;
|
|
117048
117286
|
throw error;
|
|
117049
117287
|
}
|
|
117050
|
-
const packageDir =
|
|
117288
|
+
const packageDir = import_node_path169.default.dirname(manifest);
|
|
117051
117289
|
const runtimeBundle = await withSwiftRootLock(
|
|
117052
|
-
|
|
117290
|
+
import_node_path169.default.join(await import_promises19.default.realpath(packageDir), "bundle"),
|
|
117053
117291
|
async () => {
|
|
117054
117292
|
await (0, import_node_util22.promisify)(import_node_child_process76.execFile)(
|
|
117055
117293
|
process.env.NODE_BINARY || "node",
|
|
117056
|
-
[
|
|
117294
|
+
[import_node_path169.default.join(packageDir, "scripts/build-bundle.mjs"), appRoot],
|
|
117057
117295
|
{ cwd: appRoot, maxBuffer: 16 * 1024 * 1024 }
|
|
117058
117296
|
);
|
|
117059
|
-
return import_promises19.default.readFile(
|
|
117297
|
+
return import_promises19.default.readFile(import_node_path169.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"), "utf8");
|
|
117060
117298
|
}
|
|
117061
117299
|
);
|
|
117062
117300
|
const catalog = await stageExpoWidgetAssets(appRoot, origin);
|
|
@@ -117067,14 +117305,14 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
117067
117305
|
}
|
|
117068
117306
|
};
|
|
117069
117307
|
}
|
|
117070
|
-
var import_node_child_process76, import_promises19, import_node_module24,
|
|
117308
|
+
var import_node_child_process76, import_promises19, import_node_module24, import_node_path169, import_node_util22, EXPO_WIDGETS_ROUTE, handleExpoWidgetsRequest;
|
|
117071
117309
|
var init_expo_widgets_bundle = __esm({
|
|
117072
117310
|
"src/expo-widgets-bundle.ts"() {
|
|
117073
117311
|
"use strict";
|
|
117074
117312
|
import_node_child_process76 = require("node:child_process");
|
|
117075
117313
|
import_promises19 = __toESM(require("node:fs/promises"), 1);
|
|
117076
117314
|
import_node_module24 = require("node:module");
|
|
117077
|
-
|
|
117315
|
+
import_node_path169 = __toESM(require("node:path"), 1);
|
|
117078
117316
|
import_node_util22 = require("node:util");
|
|
117079
117317
|
init_expo_widget_assets();
|
|
117080
117318
|
init_staged_host_files();
|
|
@@ -117663,16 +117901,16 @@ async function oneSDKLinkSources(appRoot, preparedRoot, options2 = {}) {
|
|
|
117663
117901
|
const selected = await selectOneSDK(appRoot);
|
|
117664
117902
|
if (!selected) throw new Error("prepared app has no One SDK imports");
|
|
117665
117903
|
const { one, frameworks } = selected;
|
|
117666
|
-
const sourceRoot =
|
|
117904
|
+
const sourceRoot = import_node_path170.default.join(preparedRoot, ONE_SDK_SOURCE_DIRECTORY);
|
|
117667
117905
|
const generated = readOneSDKSourceManifest(
|
|
117668
|
-
JSON.parse(
|
|
117906
|
+
JSON.parse(import_node_fs168.default.readFileSync(import_node_path170.default.join(sourceRoot, "manifest.json"), "utf8"))
|
|
117669
117907
|
);
|
|
117670
117908
|
const { generation } = JSON.parse(
|
|
117671
|
-
|
|
117909
|
+
import_node_fs168.default.readFileSync(import_node_path170.default.join(one, "ios-bindings/manifest.json"), "utf8")
|
|
117672
117910
|
);
|
|
117673
117911
|
if (generated.generation !== generation) {
|
|
117674
117912
|
const { version: version2 } = JSON.parse(
|
|
117675
|
-
|
|
117913
|
+
import_node_fs168.default.readFileSync(import_node_path170.default.join(one, "package.json"), "utf8")
|
|
117676
117914
|
);
|
|
117677
117915
|
throw new Error(
|
|
117678
117916
|
`${appRoot} has One ${version2} installed, which differs from the One its lockfile resolves. Install its dependencies, restart its dev server and open it again.`
|
|
@@ -117692,12 +117930,12 @@ async function oneSDKLinkSources(appRoot, preparedRoot, options2 = {}) {
|
|
|
117692
117930
|
"SDKViews/OneNativeViewsTable.swift"
|
|
117693
117931
|
])
|
|
117694
117932
|
targets.set(
|
|
117695
|
-
`Sources/One/${
|
|
117696
|
-
|
|
117933
|
+
`Sources/One/${import_node_path170.default.basename(source)}`,
|
|
117934
|
+
import_node_fs168.default.readFileSync(import_node_path170.default.join(one, "ios", source), "utf8")
|
|
117697
117935
|
);
|
|
117698
117936
|
for (const name3 of generated.files) {
|
|
117699
117937
|
const filePath = `Sources/OneSDKBindings/${name3}`;
|
|
117700
|
-
const source =
|
|
117938
|
+
const source = import_node_fs168.default.readFileSync(import_node_path170.default.join(sourceRoot, name3), "utf8");
|
|
117701
117939
|
if (options2.shard) {
|
|
117702
117940
|
for (const [shardedName, shardedSource] of shardOneSDKBindingSource(
|
|
117703
117941
|
filePath,
|
|
@@ -117725,10 +117963,10 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
|
|
|
117725
117963
|
const optimize = options2.optimize ?? true;
|
|
117726
117964
|
const sources = await oneSDKLinkSources(appRoot, preparedRoot, { shard: !optimize });
|
|
117727
117965
|
const moduleRoot = moduleRootOverride ?? (await resolveSwiftModule()).root;
|
|
117728
|
-
const packagePath =
|
|
117966
|
+
const packagePath = import_node_path170.default.join(
|
|
117729
117967
|
swiftCacheDir(),
|
|
117730
117968
|
"peach-one-sdk-swift",
|
|
117731
|
-
(0,
|
|
117969
|
+
(0, import_node_crypto100.createHash)("sha256").update(import_node_fs168.default.realpathSync(appRoot)).digest("hex").slice(0, 16),
|
|
117732
117970
|
"sdk"
|
|
117733
117971
|
);
|
|
117734
117972
|
const bindingFlags = optimize ? '["-suppress-warnings"]' : '["-suppress-warnings", "-Onone", "-no-whole-module-optimization"]';
|
|
@@ -117747,10 +117985,10 @@ let package = Package(name: "OneSDKGuest", targets: [
|
|
|
117747
117985
|
for (const [name3, source] of sources.targets) files2.set(name3, source);
|
|
117748
117986
|
for (const [name3, source] of sources.entry) files2.set(`Sources/App/${name3}`, source);
|
|
117749
117987
|
files2.set("Sources/App/App.swift", oneSDKApp);
|
|
117750
|
-
|
|
117988
|
+
import_node_fs168.default.mkdirSync(packagePath, { recursive: true });
|
|
117751
117989
|
syncSwiftTree(
|
|
117752
117990
|
packagePath,
|
|
117753
|
-
new Map([...files2].map(([name3, source]) => [
|
|
117991
|
+
new Map([...files2].map(([name3, source]) => [import_node_path170.default.join(packagePath, name3), source]))
|
|
117754
117992
|
);
|
|
117755
117993
|
const project2 = projectFor(packagePath);
|
|
117756
117994
|
project2.oneModule = false;
|
|
@@ -117775,13 +118013,13 @@ async function buildOneSDKBundle(appRoot) {
|
|
|
117775
118013
|
assets: await compiledModuleAssets(compiled.artifact)
|
|
117776
118014
|
};
|
|
117777
118015
|
}
|
|
117778
|
-
var
|
|
118016
|
+
var import_node_crypto100, import_node_fs168, import_node_path170, ONE_SDK_ROUTE, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES, handleOneSDKRequest;
|
|
117779
118017
|
var init_one_sdk_bundle = __esm({
|
|
117780
118018
|
"src/one-sdk-bundle.ts"() {
|
|
117781
118019
|
"use strict";
|
|
117782
|
-
|
|
117783
|
-
|
|
117784
|
-
|
|
118020
|
+
import_node_crypto100 = require("node:crypto");
|
|
118021
|
+
import_node_fs168 = __toESM(require("node:fs"), 1);
|
|
118022
|
+
import_node_path170 = __toESM(require("node:path"), 1);
|
|
117785
118023
|
init_expo_native_workspace();
|
|
117786
118024
|
init_nitro_bundle();
|
|
117787
118025
|
init_one_sdk_preparation();
|
|
@@ -117858,8 +118096,8 @@ async function compileTurboApp(appRoot, origin, moduleRoot, iosTarget, prepareRe
|
|
|
117858
118096
|
}
|
|
117859
118097
|
const { artifact, collection } = await compileTurboModule({
|
|
117860
118098
|
appRoot,
|
|
117861
|
-
reactNativeRoot:
|
|
117862
|
-
(0, import_node_module25.createRequire)(
|
|
118099
|
+
reactNativeRoot: import_node_path171.default.dirname(
|
|
118100
|
+
(0, import_node_module25.createRequire)(import_node_path171.default.join(projectRoot, "package.json")).resolve(
|
|
117863
118101
|
"react-native/package.json"
|
|
117864
118102
|
)
|
|
117865
118103
|
),
|
|
@@ -117897,12 +118135,12 @@ async function buildTurboBundle(appRoot, moduleRoot, prepareReactNativeCore) {
|
|
|
117897
118135
|
assets: compiled.artifact ? await compiledModuleAssets(compiled.artifact) : []
|
|
117898
118136
|
};
|
|
117899
118137
|
}
|
|
117900
|
-
var import_node_module25,
|
|
118138
|
+
var import_node_module25, import_node_path171, TURBO_ROUTE, handleTurboRequest;
|
|
117901
118139
|
var init_turbo_bundle = __esm({
|
|
117902
118140
|
"src/turbo-bundle.ts"() {
|
|
117903
118141
|
"use strict";
|
|
117904
118142
|
import_node_module25 = require("node:module");
|
|
117905
|
-
|
|
118143
|
+
import_node_path171 = __toESM(require("node:path"), 1);
|
|
117906
118144
|
init_app_project();
|
|
117907
118145
|
init_app_config();
|
|
117908
118146
|
init_expo_native_prebuilt();
|
|
@@ -117954,7 +118192,7 @@ var init_androidAutolinkingContract = __esm({
|
|
|
117954
118192
|
|
|
117955
118193
|
// src/android-autolinking.ts
|
|
117956
118194
|
async function resolveExpoAndroidAutolinking(appRoot) {
|
|
117957
|
-
const root =
|
|
118195
|
+
const root = import_node_fs169.default.realpathSync(appRoot);
|
|
117958
118196
|
const existing = resolving.get(root);
|
|
117959
118197
|
if (existing) return existing;
|
|
117960
118198
|
const pending = resolveAndroidModules(root);
|
|
@@ -117968,7 +118206,7 @@ async function resolveExpoAndroidAutolinking(appRoot) {
|
|
|
117968
118206
|
async function resolveAndroidModules(appRoot) {
|
|
117969
118207
|
let autolinker;
|
|
117970
118208
|
try {
|
|
117971
|
-
autolinker = (0, import_node_module26.createRequire)(
|
|
118209
|
+
autolinker = (0, import_node_module26.createRequire)(import_node_path172.default.join(appRoot, "package.json")).resolve(
|
|
117972
118210
|
"expo-modules-autolinking/package.json"
|
|
117973
118211
|
);
|
|
117974
118212
|
} catch (error) {
|
|
@@ -117976,7 +118214,7 @@ async function resolveAndroidModules(appRoot) {
|
|
|
117976
118214
|
throw error;
|
|
117977
118215
|
}
|
|
117978
118216
|
const output = await runAutolinker(
|
|
117979
|
-
|
|
118217
|
+
import_node_path172.default.join(import_node_path172.default.dirname(autolinker), "bin/expo-modules-autolinking.js"),
|
|
117980
118218
|
["resolve", "--platform", "android", "--project-root", appRoot, "--json"],
|
|
117981
118219
|
{
|
|
117982
118220
|
timeout: 3e4,
|
|
@@ -118022,13 +118260,13 @@ async function resolveReactNativeAndroidAutolinking(appRoot) {
|
|
|
118022
118260
|
}
|
|
118023
118261
|
return linked;
|
|
118024
118262
|
}
|
|
118025
|
-
var
|
|
118263
|
+
var import_node_fs169, import_node_module26, import_node_path172, resolving;
|
|
118026
118264
|
var init_android_autolinking = __esm({
|
|
118027
118265
|
"src/android-autolinking.ts"() {
|
|
118028
118266
|
"use strict";
|
|
118029
|
-
|
|
118267
|
+
import_node_fs169 = __toESM(require("node:fs"), 1);
|
|
118030
118268
|
import_node_module26 = require("node:module");
|
|
118031
|
-
|
|
118269
|
+
import_node_path172 = __toESM(require("node:path"), 1);
|
|
118032
118270
|
init_androidAutolinkingContract();
|
|
118033
118271
|
init_autolinker_process();
|
|
118034
118272
|
init_is_record();
|
|
@@ -118039,8 +118277,8 @@ var init_android_autolinking = __esm({
|
|
|
118039
118277
|
|
|
118040
118278
|
// src/android-bridge-dependencies.ts
|
|
118041
118279
|
async function collectAndroidBridgeDependencies(appRoot, moduleRoot) {
|
|
118042
|
-
const root =
|
|
118043
|
-
if (!
|
|
118280
|
+
const root = import_node_path173.default.join(appRoot, "android");
|
|
118281
|
+
if (!import_node_fs170.default.existsSync(import_node_path173.default.join(root, "gradlew"))) return null;
|
|
118044
118282
|
const dependencies = (await resolveReactNativeAndroidAutolinking(appRoot)).flatMap(
|
|
118045
118283
|
(dependency) => dependency.sourceDir === null || dependency.packageInstance === null ? [] : [
|
|
118046
118284
|
{
|
|
@@ -118054,7 +118292,7 @@ async function collectAndroidBridgeDependencies(appRoot, moduleRoot) {
|
|
|
118054
118292
|
const models = await resolveAndroidGradleSources({
|
|
118055
118293
|
root,
|
|
118056
118294
|
projects: [
|
|
118057
|
-
|
|
118295
|
+
import_node_path173.default.join(root, "app"),
|
|
118058
118296
|
...dependencies.map((dependency) => dependency.sourceDir)
|
|
118059
118297
|
],
|
|
118060
118298
|
variant: "debug"
|
|
@@ -118064,7 +118302,7 @@ async function collectAndroidBridgeDependencies(appRoot, moduleRoot) {
|
|
|
118064
118302
|
const toolchain = readToolchain(moduleRoot);
|
|
118065
118303
|
const [sdk2, ready] = await Promise.all([
|
|
118066
118304
|
installKotlinSdkArchive(
|
|
118067
|
-
|
|
118305
|
+
import_node_fs170.default.readFileSync(import_node_path173.default.join(moduleRoot, "sdk.tar.gz")),
|
|
118068
118306
|
toolchain.compiler
|
|
118069
118307
|
),
|
|
118070
118308
|
ensureToolchain(toolchain)
|
|
@@ -118072,7 +118310,7 @@ async function collectAndroidBridgeDependencies(appRoot, moduleRoot) {
|
|
|
118072
118310
|
const packages = [];
|
|
118073
118311
|
for (const dependency of dependencies) {
|
|
118074
118312
|
const model = models.find(
|
|
118075
|
-
(entry) => entry.projectDir ===
|
|
118313
|
+
(entry) => entry.projectDir === import_node_fs170.default.realpathSync(dependency.sourceDir)
|
|
118076
118314
|
);
|
|
118077
118315
|
try {
|
|
118078
118316
|
const className2 = /^import\s+([\w.]+)\s*;$/.exec(
|
|
@@ -118111,12 +118349,12 @@ async function collectAndroidBridgeDependencies(appRoot, moduleRoot) {
|
|
|
118111
118349
|
}
|
|
118112
118350
|
return packages.length ? { applicationId, packages } : null;
|
|
118113
118351
|
}
|
|
118114
|
-
var
|
|
118352
|
+
var import_node_fs170, import_node_path173;
|
|
118115
118353
|
var init_android_bridge_dependencies = __esm({
|
|
118116
118354
|
"src/android-bridge-dependencies.ts"() {
|
|
118117
118355
|
"use strict";
|
|
118118
|
-
|
|
118119
|
-
|
|
118356
|
+
import_node_fs170 = __toESM(require("node:fs"), 1);
|
|
118357
|
+
import_node_path173 = __toESM(require("node:path"), 1);
|
|
118120
118358
|
init_android_autolinking();
|
|
118121
118359
|
init_android_gradle_sources();
|
|
118122
118360
|
init_java_module_abi();
|
|
@@ -118144,8 +118382,8 @@ async function collectExpoKotlinModules(appRoot) {
|
|
|
118144
118382
|
for (const project2 of entry.projects) {
|
|
118145
118383
|
if (!isRecord(project2) || typeof project2.sourceDir !== "string" || !Array.isArray(project2.modules))
|
|
118146
118384
|
throw new Error("invalid Expo Android project");
|
|
118147
|
-
const sourceDir =
|
|
118148
|
-
const installed2 = sourceDir.split(
|
|
118385
|
+
const sourceDir = import_node_fs171.default.realpathSync(project2.sourceDir);
|
|
118386
|
+
const installed2 = sourceDir.split(import_node_path174.default.sep).includes("node_modules");
|
|
118149
118387
|
if (installed2) {
|
|
118150
118388
|
if (typeof entry.packageName !== "string") continue;
|
|
118151
118389
|
if (peachAnsweredNativePackages().has(entry.packageName)) {
|
|
@@ -118173,9 +118411,9 @@ async function collectExpoKotlinModules(appRoot) {
|
|
|
118173
118411
|
group.unsupported ??= reason;
|
|
118174
118412
|
};
|
|
118175
118413
|
const walk4 = (dir) => {
|
|
118176
|
-
if (!
|
|
118177
|
-
for (const child of
|
|
118178
|
-
const file =
|
|
118414
|
+
if (!import_node_fs171.default.existsSync(dir)) return;
|
|
118415
|
+
for (const child of import_node_fs171.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
118416
|
+
const file = import_node_path174.default.join(dir, child.name);
|
|
118179
118417
|
if (child.isSymbolicLink()) reject(`Expo Kotlin source is a symlink: ${file}`);
|
|
118180
118418
|
else if (child.isDirectory()) walk4(file);
|
|
118181
118419
|
else if (child.name.endsWith(".java"))
|
|
@@ -118183,8 +118421,8 @@ async function collectExpoKotlinModules(appRoot) {
|
|
|
118183
118421
|
else if (child.name.endsWith(".kt")) group.sources.push(file);
|
|
118184
118422
|
}
|
|
118185
118423
|
};
|
|
118186
|
-
walk4(
|
|
118187
|
-
walk4(
|
|
118424
|
+
walk4(import_node_path174.default.join(sourceDir, "src", "main", "java"));
|
|
118425
|
+
walk4(import_node_path174.default.join(sourceDir, "src", "main", "kotlin"));
|
|
118188
118426
|
result.push(group);
|
|
118189
118427
|
}
|
|
118190
118428
|
}
|
|
@@ -118197,7 +118435,7 @@ async function collectBridgePackages(appRoot) {
|
|
|
118197
118435
|
);
|
|
118198
118436
|
const app = androidAppSources(appRoot);
|
|
118199
118437
|
if (!app || !app.kotlin.some(
|
|
118200
|
-
(file) => /\b(?:Base|Turbo)?ReactPackage\b/.test(
|
|
118438
|
+
(file) => /\b(?:Base|Turbo)?ReactPackage\b/.test(import_node_fs171.default.readFileSync(file, "utf8"))
|
|
118201
118439
|
))
|
|
118202
118440
|
return dependencies;
|
|
118203
118441
|
const { scanBridgeFiles: scanBridgeFiles2 } = await Promise.resolve().then(() => (init_kotlin_host(), kotlin_host_exports));
|
|
@@ -118312,7 +118550,7 @@ async function handleExpoKotlinRequest(req, res) {
|
|
|
118312
118550
|
return true;
|
|
118313
118551
|
}
|
|
118314
118552
|
const root = url.searchParams.get("root");
|
|
118315
|
-
if (!root || !
|
|
118553
|
+
if (!root || !import_node_path174.default.isAbsolute(root)) {
|
|
118316
118554
|
res.writeHead(400);
|
|
118317
118555
|
res.end("missing absolute app root");
|
|
118318
118556
|
return true;
|
|
@@ -118343,12 +118581,12 @@ async function handleExpoKotlinRequest(req, res) {
|
|
|
118343
118581
|
}
|
|
118344
118582
|
return true;
|
|
118345
118583
|
}
|
|
118346
|
-
var
|
|
118584
|
+
var import_node_fs171, import_node_path174, EXPO_KOTLIN_ROUTE, compiling;
|
|
118347
118585
|
var init_expo_kotlin_host = __esm({
|
|
118348
118586
|
"src/expo-kotlin-host.ts"() {
|
|
118349
118587
|
"use strict";
|
|
118350
|
-
|
|
118351
|
-
|
|
118588
|
+
import_node_fs171 = __toESM(require("node:fs"), 1);
|
|
118589
|
+
import_node_path174 = __toESM(require("node:path"), 1);
|
|
118352
118590
|
init_android_autolinking();
|
|
118353
118591
|
init_android_bridge_dependencies();
|
|
118354
118592
|
init_android_bridge_packages();
|
|
@@ -118371,14 +118609,14 @@ function sharedDesktopAuthAccounts(user) {
|
|
|
118371
118609
|
function getBaseDir() {
|
|
118372
118610
|
const explicit = process.env[SESSION_FILE_ENV];
|
|
118373
118611
|
if (explicit?.trim()) {
|
|
118374
|
-
return (0,
|
|
118612
|
+
return (0, import_node_path175.dirname)((0, import_node_path175.resolve)(explicit));
|
|
118375
118613
|
}
|
|
118376
118614
|
return electronUserDataDir();
|
|
118377
118615
|
}
|
|
118378
118616
|
function getSharedDesktopAuthFilePath() {
|
|
118379
118617
|
const explicit = process.env[SESSION_FILE_ENV];
|
|
118380
|
-
if (explicit?.trim()) return (0,
|
|
118381
|
-
return (0,
|
|
118618
|
+
if (explicit?.trim()) return (0, import_node_path175.resolve)(explicit);
|
|
118619
|
+
return (0, import_node_path175.join)(getBaseDir(), "desktop-auth.json");
|
|
118382
118620
|
}
|
|
118383
118621
|
function normalizeUser(input) {
|
|
118384
118622
|
if (!input || typeof input !== "object") return null;
|
|
@@ -118428,27 +118666,27 @@ function normalizeSession(input) {
|
|
|
118428
118666
|
}
|
|
118429
118667
|
function readSharedDesktopAuthSession() {
|
|
118430
118668
|
const filepath = getSharedDesktopAuthFilePath();
|
|
118431
|
-
if (!(0,
|
|
118669
|
+
if (!(0, import_node_fs172.existsSync)(filepath)) return null;
|
|
118432
118670
|
try {
|
|
118433
|
-
const parsed2 = JSON.parse((0,
|
|
118671
|
+
const parsed2 = JSON.parse((0, import_node_fs172.readFileSync)(filepath, "utf8"));
|
|
118434
118672
|
const normalized = normalizeSession(parsed2);
|
|
118435
118673
|
if (!normalized) {
|
|
118436
|
-
(0,
|
|
118674
|
+
(0, import_node_fs172.rmSync)(filepath, { force: true });
|
|
118437
118675
|
return null;
|
|
118438
118676
|
}
|
|
118439
118677
|
return normalized;
|
|
118440
118678
|
} catch {
|
|
118441
|
-
(0,
|
|
118679
|
+
(0, import_node_fs172.rmSync)(filepath, { force: true });
|
|
118442
118680
|
return null;
|
|
118443
118681
|
}
|
|
118444
118682
|
}
|
|
118445
|
-
var
|
|
118683
|
+
var import_node_crypto101, import_node_fs172, import_node_path175, SESSION_VERSION, SESSION_FILE_ENV, DEFAULT_ORIGIN;
|
|
118446
118684
|
var init_shared_session = __esm({
|
|
118447
118685
|
"src/auth/shared-session.ts"() {
|
|
118448
118686
|
"use strict";
|
|
118449
|
-
|
|
118450
|
-
|
|
118451
|
-
|
|
118687
|
+
import_node_crypto101 = require("node:crypto");
|
|
118688
|
+
import_node_fs172 = require("node:fs");
|
|
118689
|
+
import_node_path175 = require("node:path");
|
|
118452
118690
|
init_home_paths();
|
|
118453
118691
|
init_public_brand();
|
|
118454
118692
|
SESSION_VERSION = 1;
|
|
@@ -118483,31 +118721,31 @@ var init_run_rnx = __esm({
|
|
|
118483
118721
|
|
|
118484
118722
|
// cli/secure-file.ts
|
|
118485
118723
|
function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
|
|
118486
|
-
(0,
|
|
118487
|
-
const temporary = `${filepath}.tmp-${process.pid}-${(0,
|
|
118724
|
+
(0, import_node_fs173.mkdirSync)((0, import_node_path176.dirname)(filepath), { recursive: true });
|
|
118725
|
+
const temporary = `${filepath}.tmp-${process.pid}-${(0, import_node_crypto102.randomUUID)()}`;
|
|
118488
118726
|
let descriptor = null;
|
|
118489
118727
|
try {
|
|
118490
|
-
descriptor = (0,
|
|
118491
|
-
(0,
|
|
118492
|
-
(0,
|
|
118728
|
+
descriptor = (0, import_node_fs173.openSync)(temporary, "wx", 384);
|
|
118729
|
+
(0, import_node_fs173.fchmodSync)(descriptor, 384);
|
|
118730
|
+
(0, import_node_fs173.writeFileSync)(descriptor, `${JSON.stringify(value, null, 2)}
|
|
118493
118731
|
`);
|
|
118494
|
-
if (durable) (0,
|
|
118495
|
-
(0,
|
|
118732
|
+
if (durable) (0, import_node_fs173.fsyncSync)(descriptor);
|
|
118733
|
+
(0, import_node_fs173.closeSync)(descriptor);
|
|
118496
118734
|
descriptor = null;
|
|
118497
|
-
(0,
|
|
118735
|
+
(0, import_node_fs173.renameSync)(temporary, filepath);
|
|
118498
118736
|
} catch (error) {
|
|
118499
|
-
if (descriptor !== null) (0,
|
|
118500
|
-
(0,
|
|
118737
|
+
if (descriptor !== null) (0, import_node_fs173.closeSync)(descriptor);
|
|
118738
|
+
(0, import_node_fs173.rmSync)(temporary, { force: true });
|
|
118501
118739
|
throw error;
|
|
118502
118740
|
}
|
|
118503
118741
|
}
|
|
118504
|
-
var
|
|
118742
|
+
var import_node_crypto102, import_node_fs173, import_node_path176;
|
|
118505
118743
|
var init_secure_file = __esm({
|
|
118506
118744
|
"cli/secure-file.ts"() {
|
|
118507
118745
|
"use strict";
|
|
118508
|
-
|
|
118509
|
-
|
|
118510
|
-
|
|
118746
|
+
import_node_crypto102 = require("node:crypto");
|
|
118747
|
+
import_node_fs173 = require("node:fs");
|
|
118748
|
+
import_node_path176 = require("node:path");
|
|
118511
118749
|
}
|
|
118512
118750
|
});
|
|
118513
118751
|
|
|
@@ -118557,25 +118795,25 @@ function isCliApiKeySecret(secret) {
|
|
|
118557
118795
|
return secret.startsWith("sk_rnx_");
|
|
118558
118796
|
}
|
|
118559
118797
|
function savedApiKeyFile() {
|
|
118560
|
-
return
|
|
118798
|
+
return import_node_path177.default.join(rnxHomeDir(), "api-key.json");
|
|
118561
118799
|
}
|
|
118562
118800
|
function readApiKeyFile(file) {
|
|
118563
|
-
if (!(0,
|
|
118564
|
-
const secret = (0,
|
|
118801
|
+
if (!(0, import_node_fs174.existsSync)(file)) return null;
|
|
118802
|
+
const secret = (0, import_node_fs174.readFileSync)(file, "utf8").trim();
|
|
118565
118803
|
return isCliApiKeySecret(secret) ? secret : null;
|
|
118566
118804
|
}
|
|
118567
118805
|
function saveApiKey(secret) {
|
|
118568
118806
|
writeSecureJsonAtomic(savedApiKeyFile(), { secret });
|
|
118569
118807
|
}
|
|
118570
118808
|
function forgetApiKey() {
|
|
118571
|
-
if (!(0,
|
|
118572
|
-
(0,
|
|
118809
|
+
if (!(0, import_node_fs174.existsSync)(savedApiKeyFile())) return false;
|
|
118810
|
+
(0, import_node_fs174.rmSync)(savedApiKeyFile());
|
|
118573
118811
|
return true;
|
|
118574
118812
|
}
|
|
118575
118813
|
function readSavedApiKey() {
|
|
118576
|
-
if (!(0,
|
|
118814
|
+
if (!(0, import_node_fs174.existsSync)(savedApiKeyFile())) return null;
|
|
118577
118815
|
const saved = savedKeySchema.safeParse(
|
|
118578
|
-
JSON.parse((0,
|
|
118816
|
+
JSON.parse((0, import_node_fs174.readFileSync)(savedApiKeyFile(), "utf8"))
|
|
118579
118817
|
);
|
|
118580
118818
|
return saved.success && isCliApiKeySecret(saved.data.secret) ? saved.data.secret : null;
|
|
118581
118819
|
}
|
|
@@ -118633,12 +118871,12 @@ function authHeaderOrExit(commandLabel) {
|
|
|
118633
118871
|
);
|
|
118634
118872
|
rnxExit(1);
|
|
118635
118873
|
}
|
|
118636
|
-
var
|
|
118874
|
+
var import_node_fs174, import_node_path177, import_zod3, GITHUB_TOKEN_PREFIXES, DOWNLOADED_API_KEY_FILE, savedKeySchema, CHOOSE_ACCOUNT_HINT;
|
|
118637
118875
|
var init_auth = __esm({
|
|
118638
118876
|
"cli/auth.ts"() {
|
|
118639
118877
|
"use strict";
|
|
118640
|
-
|
|
118641
|
-
|
|
118878
|
+
import_node_fs174 = require("node:fs");
|
|
118879
|
+
import_node_path177 = __toESM(require("node:path"), 1);
|
|
118642
118880
|
import_zod3 = require("peachsim/vendor/zod");
|
|
118643
118881
|
init_shared_session();
|
|
118644
118882
|
init_home_paths();
|
|
@@ -119441,8 +119679,8 @@ function metroIosAssetDestRelatives(httpServerLocation, filename) {
|
|
|
119441
119679
|
}
|
|
119442
119680
|
const out = [];
|
|
119443
119681
|
for (const dir of dirs) {
|
|
119444
|
-
const
|
|
119445
|
-
if (!out.includes(
|
|
119682
|
+
const path159 = `${dir}/${filename}`;
|
|
119683
|
+
if (!out.includes(path159)) out.push(path159);
|
|
119446
119684
|
}
|
|
119447
119685
|
if (!out.includes(filename)) out.push(filename);
|
|
119448
119686
|
return out;
|
|
@@ -119915,16 +120153,16 @@ function parseAbsoluteUrl(input) {
|
|
|
119915
120153
|
}
|
|
119916
120154
|
function parseFileUrl(input) {
|
|
119917
120155
|
const match = fileRegex.exec(input);
|
|
119918
|
-
const
|
|
119919
|
-
return makeUrl("file:", "", match[1] || "", "", isAbsolutePath(
|
|
120156
|
+
const path159 = match[2];
|
|
120157
|
+
return makeUrl("file:", "", match[1] || "", "", isAbsolutePath(path159) ? path159 : "/" + path159, match[3] || "", match[4] || "");
|
|
119920
120158
|
}
|
|
119921
|
-
function makeUrl(scheme, user, host2, port,
|
|
120159
|
+
function makeUrl(scheme, user, host2, port, path159, query, hash) {
|
|
119922
120160
|
return {
|
|
119923
120161
|
scheme,
|
|
119924
120162
|
user,
|
|
119925
120163
|
host: host2,
|
|
119926
120164
|
port,
|
|
119927
|
-
path:
|
|
120165
|
+
path: path159,
|
|
119928
120166
|
query,
|
|
119929
120167
|
hash,
|
|
119930
120168
|
type: 7
|
|
@@ -119954,11 +120192,11 @@ function parseUrl(input) {
|
|
|
119954
120192
|
url.type = input ? input.startsWith("?") ? 3 : input.startsWith("#") ? 2 : 4 : 1;
|
|
119955
120193
|
return url;
|
|
119956
120194
|
}
|
|
119957
|
-
function stripPathFilename(
|
|
119958
|
-
if (
|
|
119959
|
-
return
|
|
119960
|
-
const index =
|
|
119961
|
-
return
|
|
120195
|
+
function stripPathFilename(path159) {
|
|
120196
|
+
if (path159.endsWith("/.."))
|
|
120197
|
+
return path159;
|
|
120198
|
+
const index = path159.lastIndexOf("/");
|
|
120199
|
+
return path159.slice(0, index + 1);
|
|
119962
120200
|
}
|
|
119963
120201
|
function mergePaths(url, base2) {
|
|
119964
120202
|
normalizePath(base2, base2.type);
|
|
@@ -119996,14 +120234,14 @@ function normalizePath(url, type) {
|
|
|
119996
120234
|
pieces[pointer2++] = piece;
|
|
119997
120235
|
positive++;
|
|
119998
120236
|
}
|
|
119999
|
-
let
|
|
120237
|
+
let path159 = "";
|
|
120000
120238
|
for (let i = 1; i < pointer2; i++) {
|
|
120001
|
-
|
|
120239
|
+
path159 += "/" + pieces[i];
|
|
120002
120240
|
}
|
|
120003
|
-
if (!
|
|
120004
|
-
|
|
120241
|
+
if (!path159 || addTrailingSlash && !path159.endsWith("/..")) {
|
|
120242
|
+
path159 += "/";
|
|
120005
120243
|
}
|
|
120006
|
-
url.path =
|
|
120244
|
+
url.path = path159;
|
|
120007
120245
|
}
|
|
120008
120246
|
function resolve7(input, base2) {
|
|
120009
120247
|
if (!input && !base2)
|
|
@@ -120044,13 +120282,13 @@ function resolve7(input, base2) {
|
|
|
120044
120282
|
case 3:
|
|
120045
120283
|
return queryHash;
|
|
120046
120284
|
case 4: {
|
|
120047
|
-
const
|
|
120048
|
-
if (!
|
|
120285
|
+
const path159 = url.path.slice(1);
|
|
120286
|
+
if (!path159)
|
|
120049
120287
|
return queryHash || ".";
|
|
120050
|
-
if (isRelative(base2 || input) && !isRelative(
|
|
120051
|
-
return "./" +
|
|
120288
|
+
if (isRelative(base2 || input) && !isRelative(path159)) {
|
|
120289
|
+
return "./" + path159 + queryHash;
|
|
120052
120290
|
}
|
|
120053
|
-
return
|
|
120291
|
+
return path159 + queryHash;
|
|
120054
120292
|
}
|
|
120055
120293
|
case 5:
|
|
120056
120294
|
return url.path + queryHash;
|
|
@@ -120068,10 +120306,10 @@ var init_resolve_uri = __esm({
|
|
|
120068
120306
|
});
|
|
120069
120307
|
|
|
120070
120308
|
// ../../node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
|
|
120071
|
-
function stripFilename(
|
|
120072
|
-
if (!
|
|
120073
|
-
const index =
|
|
120074
|
-
return
|
|
120309
|
+
function stripFilename(path159) {
|
|
120310
|
+
if (!path159) return "";
|
|
120311
|
+
const index = path159.lastIndexOf("/");
|
|
120312
|
+
return path159.slice(0, index + 1);
|
|
120075
120313
|
}
|
|
120076
120314
|
function resolver(mapUrl, sourceRoot) {
|
|
120077
120315
|
const from = stripFilename(mapUrl);
|
|
@@ -120867,13 +121105,13 @@ function createCloudSession(input) {
|
|
|
120867
121105
|
}
|
|
120868
121106
|
return session;
|
|
120869
121107
|
}
|
|
120870
|
-
var
|
|
121108
|
+
var import_node_crypto103, import_node_fs175, import_node_path178, CLOUD_SESSION_VERSION, MAX_ENCODED_SESSION_BYTES, RNX_SHELL_UPDATE_PREFIX, RNX_SHELL_UPDATE_SET_PREFIX, RNX_SHELL_UPDATE_UNSET;
|
|
120871
121109
|
var init_cloud_session = __esm({
|
|
120872
121110
|
"cli/cloud-session.ts"() {
|
|
120873
121111
|
"use strict";
|
|
120874
|
-
|
|
120875
|
-
|
|
120876
|
-
|
|
121112
|
+
import_node_crypto103 = require("node:crypto");
|
|
121113
|
+
import_node_fs175 = require("node:fs");
|
|
121114
|
+
import_node_path178 = require("node:path");
|
|
120877
121115
|
init_backend_origin();
|
|
120878
121116
|
init_home_paths();
|
|
120879
121117
|
init_is_record();
|
|
@@ -120986,27 +121224,27 @@ function resolveCloudOrigin(value) {
|
|
|
120986
121224
|
return normalizeCloudOrigin(source);
|
|
120987
121225
|
}
|
|
120988
121226
|
function readImmutableBundleSource(bundlePath, command) {
|
|
120989
|
-
const filepath = (0,
|
|
120990
|
-
if ((0,
|
|
121227
|
+
const filepath = (0, import_node_path179.resolve)(bundlePath);
|
|
121228
|
+
if ((0, import_node_path179.extname)(filepath) === ".hbc") {
|
|
120991
121229
|
const platform3 = filepath.includes("/android/") ? "android" : "ios";
|
|
120992
121230
|
throw new Error(
|
|
120993
121231
|
`${command} cannot preview Hermes bytecode (${bundlePath}). Export plain JavaScript with \`npx expo export --platform ${platform3} --no-bytecode\` and preview the .js bundle instead.`
|
|
120994
121232
|
);
|
|
120995
121233
|
}
|
|
120996
|
-
if ((0,
|
|
121234
|
+
if ((0, import_node_path179.extname)(filepath) !== ".js") {
|
|
120997
121235
|
throw new Error(`${command} requires one local .js bundle`);
|
|
120998
121236
|
}
|
|
120999
|
-
const descriptor = (0,
|
|
121237
|
+
const descriptor = (0, import_node_fs176.openSync)(filepath, "r");
|
|
121000
121238
|
try {
|
|
121001
|
-
const before = (0,
|
|
121239
|
+
const before = (0, import_node_fs176.fstatSync)(descriptor, { bigint: true });
|
|
121002
121240
|
if (!before.isFile()) {
|
|
121003
121241
|
throw new Error(`${command} bundle must be a regular local file`);
|
|
121004
121242
|
}
|
|
121005
121243
|
if (before.size <= 0n) {
|
|
121006
121244
|
throw new Error(`${command} bundle is empty`);
|
|
121007
121245
|
}
|
|
121008
|
-
const bytes = (0,
|
|
121009
|
-
const after = (0,
|
|
121246
|
+
const bytes = (0, import_node_fs176.readFileSync)(descriptor);
|
|
121247
|
+
const after = (0, import_node_fs176.fstatSync)(descriptor, { bigint: true });
|
|
121010
121248
|
if (before.dev !== after.dev || before.ino !== after.ino || before.size !== after.size || before.mtimeNs !== after.mtimeNs || bytes.length !== Number(before.size)) {
|
|
121011
121249
|
throw new Error(`${command} bundle changed while it was being read`);
|
|
121012
121250
|
}
|
|
@@ -121018,7 +121256,7 @@ function readImmutableBundleSource(bundlePath, command) {
|
|
|
121018
121256
|
}
|
|
121019
121257
|
return source;
|
|
121020
121258
|
} finally {
|
|
121021
|
-
(0,
|
|
121259
|
+
(0, import_node_fs176.closeSync)(descriptor);
|
|
121022
121260
|
}
|
|
121023
121261
|
}
|
|
121024
121262
|
async function fetchBundleSource(bundleUrl, command) {
|
|
@@ -121072,15 +121310,15 @@ async function loadBundleSource(bundleInput, command) {
|
|
|
121072
121310
|
return source;
|
|
121073
121311
|
}
|
|
121074
121312
|
function listMetroAssetDest(assetsPath) {
|
|
121075
|
-
const directory2 = (0,
|
|
121076
|
-
if (!(0,
|
|
121077
|
-
const skipNested = (0,
|
|
121313
|
+
const directory2 = (0, import_node_path179.resolve)(assetsPath);
|
|
121314
|
+
if (!(0, import_node_fs176.existsSync)(directory2)) return { directory: directory2, files: [], truncated: false };
|
|
121315
|
+
const skipNested = (0, import_node_fs176.existsSync)((0, import_node_path179.join)(directory2, "package.json"));
|
|
121078
121316
|
const files2 = [];
|
|
121079
121317
|
let truncated = false;
|
|
121080
121318
|
const walk4 = (dir, prefix) => {
|
|
121081
121319
|
let entries2;
|
|
121082
121320
|
try {
|
|
121083
|
-
entries2 = (0,
|
|
121321
|
+
entries2 = (0, import_node_fs176.readdirSync)(dir, { withFileTypes: true });
|
|
121084
121322
|
} catch {
|
|
121085
121323
|
return;
|
|
121086
121324
|
}
|
|
@@ -121092,7 +121330,7 @@ function listMetroAssetDest(assetsPath) {
|
|
|
121092
121330
|
if (entry.isDirectory()) {
|
|
121093
121331
|
if (entry.name === ".git") continue;
|
|
121094
121332
|
if (skipNested && PROJECT_ONLY_DIRECTORIES.has(entry.name)) continue;
|
|
121095
|
-
walk4((0,
|
|
121333
|
+
walk4((0, import_node_path179.join)(dir, entry.name), prefix ? `${prefix}/${entry.name}` : entry.name);
|
|
121096
121334
|
} else if (entry.isFile()) {
|
|
121097
121335
|
files2.push(prefix ? `${prefix}/${entry.name}` : entry.name);
|
|
121098
121336
|
}
|
|
@@ -121102,7 +121340,7 @@ function listMetroAssetDest(assetsPath) {
|
|
|
121102
121340
|
return { directory: directory2, files: files2, truncated };
|
|
121103
121341
|
}
|
|
121104
121342
|
function metroDescriptorHash(scaleBytes) {
|
|
121105
|
-
const hasher = (0,
|
|
121343
|
+
const hasher = (0, import_node_crypto104.createHash)("md5");
|
|
121106
121344
|
for (const bytes of scaleBytes) hasher.update(bytes);
|
|
121107
121345
|
return hasher.digest("hex");
|
|
121108
121346
|
}
|
|
@@ -121127,11 +121365,11 @@ function distinctByContent(directory2, options2) {
|
|
|
121127
121365
|
for (const relative5 of options2) {
|
|
121128
121366
|
let bytes;
|
|
121129
121367
|
try {
|
|
121130
|
-
bytes = (0,
|
|
121368
|
+
bytes = (0, import_node_fs176.readFileSync)((0, import_node_path179.join)(directory2, relative5));
|
|
121131
121369
|
} catch {
|
|
121132
121370
|
continue;
|
|
121133
121371
|
}
|
|
121134
|
-
const digest3 = (0,
|
|
121372
|
+
const digest3 = (0, import_node_crypto104.createHash)("md5").update(bytes).digest("hex");
|
|
121135
121373
|
if (!byContent.has(digest3)) byContent.set(digest3, relative5);
|
|
121136
121374
|
}
|
|
121137
121375
|
return [...byContent.values()];
|
|
@@ -121173,13 +121411,13 @@ function placeMetroDescriptor(listing, descriptor) {
|
|
|
121173
121411
|
let bytes;
|
|
121174
121412
|
try {
|
|
121175
121413
|
bytes = combination.map(
|
|
121176
|
-
(relative5) => (0,
|
|
121414
|
+
(relative5) => (0, import_node_fs176.readFileSync)((0, import_node_path179.join)(listing.directory, relative5))
|
|
121177
121415
|
);
|
|
121178
121416
|
} catch {
|
|
121179
121417
|
continue;
|
|
121180
121418
|
}
|
|
121181
121419
|
const identical = fileHashes2 ? bytes.every((file, index) => {
|
|
121182
|
-
const digest3 = (0,
|
|
121420
|
+
const digest3 = (0, import_node_crypto104.createHash)("md5").update(file).digest("hex");
|
|
121183
121421
|
return descriptor.scales.some(
|
|
121184
121422
|
(scale, declared) => scale === scales[index] && fileHashes2[declared] === digest3
|
|
121185
121423
|
);
|
|
@@ -121201,10 +121439,10 @@ function unverifiedContentKey(dest, fileDigests2) {
|
|
|
121201
121439
|
return JSON.stringify(
|
|
121202
121440
|
dest.placements.map(
|
|
121203
121441
|
(placement) => placement.verified ? null : [...placement.files].map(([scale, relative5]) => {
|
|
121204
|
-
const file = (0,
|
|
121442
|
+
const file = (0, import_node_path179.join)(dest.directory, relative5);
|
|
121205
121443
|
let digest3 = fileDigests2.get(file);
|
|
121206
121444
|
if (digest3 === void 0) {
|
|
121207
|
-
digest3 = (0,
|
|
121445
|
+
digest3 = (0, import_node_crypto104.createHash)("sha256").update((0, import_node_fs176.readFileSync)(file)).digest("hex");
|
|
121208
121446
|
fileDigests2.set(file, digest3);
|
|
121209
121447
|
}
|
|
121210
121448
|
return [scale, digest3];
|
|
@@ -121213,42 +121451,42 @@ function unverifiedContentKey(dest, fileDigests2) {
|
|
|
121213
121451
|
);
|
|
121214
121452
|
}
|
|
121215
121453
|
function findExpoExportRoot(bundleDirectory) {
|
|
121216
|
-
let directory2 = (0,
|
|
121454
|
+
let directory2 = (0, import_node_path179.resolve)(bundleDirectory);
|
|
121217
121455
|
for (let depth = 0; depth < 6; depth++) {
|
|
121218
|
-
const metadata = (0,
|
|
121219
|
-
if ((0,
|
|
121456
|
+
const metadata = (0, import_node_path179.join)(directory2, "metadata.json");
|
|
121457
|
+
if ((0, import_node_fs176.existsSync)(metadata) && (0, import_node_fs176.existsSync)((0, import_node_path179.join)(directory2, "assets"))) {
|
|
121220
121458
|
try {
|
|
121221
|
-
if ((0,
|
|
121459
|
+
if ((0, import_node_fs176.readFileSync)(metadata, "utf8").includes('"fileMetadata"')) {
|
|
121222
121460
|
return directory2;
|
|
121223
121461
|
}
|
|
121224
121462
|
} catch {
|
|
121225
121463
|
}
|
|
121226
121464
|
}
|
|
121227
|
-
const parent = (0,
|
|
121465
|
+
const parent = (0, import_node_path179.dirname)(directory2);
|
|
121228
121466
|
if (parent === directory2) return null;
|
|
121229
121467
|
directory2 = parent;
|
|
121230
121468
|
}
|
|
121231
121469
|
return null;
|
|
121232
121470
|
}
|
|
121233
121471
|
function searchMetroAssetDest(bundlePath, descriptors, command, assetsDirectory) {
|
|
121234
|
-
const bundleDirectory = (0,
|
|
121472
|
+
const bundleDirectory = (0, import_node_path179.dirname)((0, import_node_path179.resolve)(bundlePath));
|
|
121235
121473
|
const expoRoot = assetsDirectory || isRemoteBundleInput(bundlePath) ? null : findExpoExportRoot(bundleDirectory);
|
|
121236
|
-
const candidates = assetsDirectory ? [(0,
|
|
121237
|
-
...expoRoot ? [(0,
|
|
121238
|
-
(0,
|
|
121474
|
+
const candidates = assetsDirectory ? [(0, import_node_path179.resolve)(assetsDirectory)] : [
|
|
121475
|
+
...expoRoot ? [(0, import_node_path179.join)(expoRoot, "assets")] : [],
|
|
121476
|
+
(0, import_node_path179.join)(bundleDirectory, "assets"),
|
|
121239
121477
|
bundleDirectory,
|
|
121240
|
-
(0,
|
|
121478
|
+
(0, import_node_path179.resolve)(bundleDirectory, "..", "assets")
|
|
121241
121479
|
];
|
|
121242
121480
|
const cwd = process.cwd();
|
|
121243
121481
|
let projectDirectory = null;
|
|
121244
121482
|
for (const start of assetsDirectory ? [] : [bundleDirectory, cwd]) {
|
|
121245
|
-
let directory2 = (0,
|
|
121483
|
+
let directory2 = (0, import_node_path179.resolve)(start);
|
|
121246
121484
|
while (true) {
|
|
121247
121485
|
if (detectProject(directory2)?.hasMetroConfig) {
|
|
121248
121486
|
projectDirectory = directory2;
|
|
121249
121487
|
break;
|
|
121250
121488
|
}
|
|
121251
|
-
const parent = (0,
|
|
121489
|
+
const parent = (0, import_node_path179.dirname)(directory2);
|
|
121252
121490
|
if (parent === directory2) break;
|
|
121253
121491
|
directory2 = parent;
|
|
121254
121492
|
}
|
|
@@ -121256,11 +121494,11 @@ function searchMetroAssetDest(bundlePath, descriptors, command, assetsDirectory)
|
|
|
121256
121494
|
}
|
|
121257
121495
|
if (projectDirectory) {
|
|
121258
121496
|
candidates.push(
|
|
121259
|
-
(0,
|
|
121260
|
-
(0,
|
|
121261
|
-
(0,
|
|
121262
|
-
(0,
|
|
121263
|
-
(0,
|
|
121497
|
+
(0, import_node_path179.join)(projectDirectory, "assets"),
|
|
121498
|
+
(0, import_node_path179.join)(projectDirectory, "dist"),
|
|
121499
|
+
(0, import_node_path179.join)(projectDirectory, "dist", "assets"),
|
|
121500
|
+
(0, import_node_path179.join)(projectDirectory, "build"),
|
|
121501
|
+
(0, import_node_path179.join)(projectDirectory, "build", "assets")
|
|
121264
121502
|
);
|
|
121265
121503
|
}
|
|
121266
121504
|
const searched = [];
|
|
@@ -121268,7 +121506,7 @@ function searchMetroAssetDest(bundlePath, descriptors, command, assetsDirectory)
|
|
|
121268
121506
|
const stale = [];
|
|
121269
121507
|
let truncated = false;
|
|
121270
121508
|
for (const candidate of candidates) {
|
|
121271
|
-
const directory2 = (0,
|
|
121509
|
+
const directory2 = (0, import_node_path179.resolve)(candidate);
|
|
121272
121510
|
if (searched.includes(directory2)) continue;
|
|
121273
121511
|
searched.push(directory2);
|
|
121274
121512
|
const listing = listMetroAssetDest(directory2);
|
|
@@ -121349,20 +121587,20 @@ async function produceCloudArtifact(bundlePath, maxBytes = MAX_RNX_CLOUD_BUNDLE_
|
|
|
121349
121587
|
}
|
|
121350
121588
|
function bundleAppProject(bundlePath) {
|
|
121351
121589
|
if (isRemoteBundleInput(bundlePath)) return null;
|
|
121352
|
-
for (let dir = (0,
|
|
121353
|
-
const manifest = (0,
|
|
121354
|
-
if ((0,
|
|
121355
|
-
const json = JSON.parse((0,
|
|
121590
|
+
for (let dir = (0, import_node_path179.dirname)((0, import_node_path179.resolve)(bundlePath)); ; dir = (0, import_node_path179.dirname)(dir)) {
|
|
121591
|
+
const manifest = (0, import_node_path179.join)(dir, "package.json");
|
|
121592
|
+
if ((0, import_node_fs176.existsSync)(manifest)) {
|
|
121593
|
+
const json = JSON.parse((0, import_node_fs176.readFileSync)(manifest, "utf8"));
|
|
121356
121594
|
if (isRecord(json) && [json.dependencies, json.devDependencies].some(
|
|
121357
121595
|
(dependencies) => isRecord(dependencies) && "react-native" in dependencies
|
|
121358
121596
|
))
|
|
121359
121597
|
return dir;
|
|
121360
121598
|
}
|
|
121361
|
-
if ((0,
|
|
121599
|
+
if ((0, import_node_path179.dirname)(dir) === dir) return null;
|
|
121362
121600
|
}
|
|
121363
121601
|
}
|
|
121364
121602
|
async function embedBundleAssets(bundlePath, command, assetPolicy, assetsDirectory, assetServer, nativeProjectDir) {
|
|
121365
|
-
const project2 = nativeProjectDir ? (0,
|
|
121603
|
+
const project2 = nativeProjectDir ? (0, import_node_path179.resolve)(nativeProjectDir) : bundleAppProject(bundlePath);
|
|
121366
121604
|
const loaded4 = await loadBundleSource(bundlePath, command);
|
|
121367
121605
|
const source = project2 && !readPackageVersionsFooter(loaded4)?.["react-native"] ? insertPackageVersionsFooter(
|
|
121368
121606
|
loaded4,
|
|
@@ -121403,7 +121641,7 @@ async function embedBundleAssets(bundlePath, command, assetPolicy, assetsDirecto
|
|
|
121403
121641
|
);
|
|
121404
121642
|
}
|
|
121405
121643
|
const relative5 = placement?.files.get(variant2.scale);
|
|
121406
|
-
if (relative5 && dest) return (0,
|
|
121644
|
+
if (relative5 && dest) return (0, import_node_fs176.readFileSync)((0, import_node_path179.join)(dest.directory, relative5));
|
|
121407
121645
|
if (assetServer) {
|
|
121408
121646
|
const filename2 = metroAssetScaleFilename(
|
|
121409
121647
|
variant2.descriptor.name,
|
|
@@ -121451,7 +121689,7 @@ async function embedBundleAssets(bundlePath, command, assetPolicy, assetsDirecto
|
|
|
121451
121689
|
);
|
|
121452
121690
|
const classic = metroIosAssetDestRelatives(variant2.descriptor.httpServerLocation, filename)[0] ?? filename;
|
|
121453
121691
|
throw new Error(
|
|
121454
|
-
`${command} could not read ${(0,
|
|
121692
|
+
`${command} could not read ${(0, import_node_path179.join)(dest?.directory ?? ".", classic)} for ${variant2.descriptor.name}.${variant2.descriptor.type} at scale ${variant2.scale}, and has no stand-in for a .${variant2.descriptor.type} asset. Rebuild with \`react-native bundle --assets-dest\`.`
|
|
121455
121693
|
);
|
|
121456
121694
|
});
|
|
121457
121695
|
return {
|
|
@@ -121493,7 +121731,7 @@ async function produceArtifact(prepared, maxBytes, command) {
|
|
|
121493
121731
|
}
|
|
121494
121732
|
return {
|
|
121495
121733
|
bytes,
|
|
121496
|
-
sha256: (0,
|
|
121734
|
+
sha256: (0, import_node_crypto104.createHash)("sha256").update(bytes).digest("hex"),
|
|
121497
121735
|
receipt: artifact.receipt,
|
|
121498
121736
|
assetsDirectory: prepared.dest?.directory ?? null,
|
|
121499
121737
|
warnings
|
|
@@ -121598,13 +121836,13 @@ async function createCloudBox(options2) {
|
|
|
121598
121836
|
warnings: artifact.warnings
|
|
121599
121837
|
};
|
|
121600
121838
|
}
|
|
121601
|
-
var
|
|
121839
|
+
var import_node_crypto104, import_node_fs176, import_node_path179, 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;
|
|
121602
121840
|
var init_cloud_client = __esm({
|
|
121603
121841
|
"cli/cloud-client.ts"() {
|
|
121604
121842
|
"use strict";
|
|
121605
|
-
|
|
121606
|
-
|
|
121607
|
-
|
|
121843
|
+
import_node_crypto104 = require("node:crypto");
|
|
121844
|
+
import_node_fs176 = require("node:fs");
|
|
121845
|
+
import_node_path179 = require("node:path");
|
|
121608
121846
|
import_node_vm = require("node:vm");
|
|
121609
121847
|
init_package_versions();
|
|
121610
121848
|
init_metroAssetArtifact();
|
|
@@ -121767,40 +122005,10 @@ function commandWritesSim(msg) {
|
|
|
121767
122005
|
|
|
121768
122006
|
// src/host/bridge-host.ts
|
|
121769
122007
|
init_chromium_admission();
|
|
121770
|
-
|
|
121771
|
-
// src/cli-version.ts
|
|
121772
|
-
var import_node_fs3 = require("node:fs");
|
|
121773
|
-
var import_node_url = require("node:url");
|
|
121774
|
-
init_public_brand();
|
|
121775
|
-
var import_meta = {};
|
|
121776
|
-
var cached = null;
|
|
121777
|
-
function getCliVersion() {
|
|
121778
|
-
if (cached != null) return cached;
|
|
121779
|
-
if (typeof __PEACH_CLI_VERSION__ !== "undefined" && typeof __PEACH_CLI_VERSION__ === "string" && __PEACH_CLI_VERSION__) {
|
|
121780
|
-
cached = __PEACH_CLI_VERSION__;
|
|
121781
|
-
return cached;
|
|
121782
|
-
}
|
|
121783
|
-
const candidates = [
|
|
121784
|
-
() => (0, import_node_url.fileURLToPath)(import_meta.resolve(`${rnxPublicBrand.packageName}/package.json`)),
|
|
121785
|
-
() => (0, import_node_url.fileURLToPath)(new URL("../package.json", __sootsim_import_meta_url))
|
|
121786
|
-
];
|
|
121787
|
-
for (const resolve10 of candidates) {
|
|
121788
|
-
try {
|
|
121789
|
-
const version2 = JSON.parse((0, import_node_fs3.readFileSync)(resolve10(), "utf8")).version;
|
|
121790
|
-
if (typeof version2 === "string" && version2) {
|
|
121791
|
-
cached = version2;
|
|
121792
|
-
return cached;
|
|
121793
|
-
}
|
|
121794
|
-
} catch {
|
|
121795
|
-
}
|
|
121796
|
-
}
|
|
121797
|
-
cached = "0.0.0";
|
|
121798
|
-
return cached;
|
|
121799
|
-
}
|
|
121800
|
-
|
|
121801
|
-
// src/host/bridge-host.ts
|
|
122008
|
+
init_cli_version();
|
|
121802
122009
|
init_desktop_host_delivery();
|
|
121803
122010
|
init_home_paths();
|
|
122011
|
+
init_nativePreparationContract();
|
|
121804
122012
|
init_oneWidgetContract();
|
|
121805
122013
|
init_process_liveness();
|
|
121806
122014
|
init_public_brand();
|
|
@@ -123376,7 +123584,7 @@ function serveAppPackageResource(req, res) {
|
|
|
123376
123584
|
init_fetch_proxy_handler();
|
|
123377
123585
|
|
|
123378
123586
|
// src/host/fetch-proxy-transport.ts
|
|
123379
|
-
var
|
|
123587
|
+
var import_node_crypto86 = require("node:crypto");
|
|
123380
123588
|
var import_node_fs145 = require("node:fs");
|
|
123381
123589
|
var import_node_http23 = require("node:http2");
|
|
123382
123590
|
var import_node_path145 = __toESM(require("node:path"), 1);
|
|
@@ -123409,7 +123617,7 @@ async function createIdentity() {
|
|
|
123409
123617
|
const keys = await crypto.subtle.generateKey(algorithm, true, ["sign", "verify"]);
|
|
123410
123618
|
const certificate = await import_x5092.X509CertificateGenerator.createSelfSigned(
|
|
123411
123619
|
{
|
|
123412
|
-
serialNumber: (0,
|
|
123620
|
+
serialNumber: (0, import_node_crypto86.randomBytes)(16).toString("hex"),
|
|
123413
123621
|
name: "CN=localhost",
|
|
123414
123622
|
notBefore: new Date(Date.now() - 6e4),
|
|
123415
123623
|
notAfter: new Date(Date.now() + 365 * 24 * 60 * 6e4),
|
|
@@ -123428,7 +123636,7 @@ async function createIdentity() {
|
|
|
123428
123636
|
${privateKey.toString("base64").match(/.{1,64}/g)?.join("\n")}
|
|
123429
123637
|
-----END PRIVATE KEY-----
|
|
123430
123638
|
`,
|
|
123431
|
-
spki: (0,
|
|
123639
|
+
spki: (0, import_node_crypto86.createHash)("sha256").update(Buffer.from(await crypto.subtle.exportKey("spki", keys.publicKey))).digest("base64")
|
|
123432
123640
|
};
|
|
123433
123641
|
}
|
|
123434
123642
|
async function startFetchProxyTransport(identityPath, hasLiveSims = () => false) {
|
|
@@ -125602,7 +125810,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
125602
125810
|
return;
|
|
125603
125811
|
}
|
|
125604
125812
|
const route = req.url?.split("?")[0] ?? "";
|
|
125605
|
-
if (route === EXPO_WIDGETS_ROUTE2 || route === WIDGET_EXTENSION_ROUTE2 || route === NITRO_ROUTE2 || route === ONE_SDK_ROUTE2 || route === TURBO_ROUTE2 || /^\/__peach\/(?:expo-swift|swift|expo-kotlin|kotlin-artifact\/|kotlin-package)/.test(
|
|
125813
|
+
if (route === EXPO_WIDGETS_ROUTE2 || route === WIDGET_EXTENSION_ROUTE2 || route === NITRO_ROUTE2 || route === ONE_SDK_ROUTE2 || route === TURBO_ROUTE2 || route === MANAGED_EXPO_INPUTS_ROUTE || /^\/__peach\/(?:expo-swift|swift|expo-kotlin|kotlin-artifact\/|kotlin-package)/.test(
|
|
125606
125814
|
route
|
|
125607
125815
|
)) {
|
|
125608
125816
|
this.nativeWorkInFlight++;
|
|
@@ -125615,6 +125823,10 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
125615
125823
|
if (!res.headersSent) res.writeHead(500);
|
|
125616
125824
|
res.end(String(error));
|
|
125617
125825
|
};
|
|
125826
|
+
if (route === MANAGED_EXPO_INPUTS_ROUTE) {
|
|
125827
|
+
void Promise.resolve().then(() => (init_managed_expo_identity(), managed_expo_identity_exports)).then(({ handleManagedExpoInputs: handleManagedExpoInputs2 }) => handleManagedExpoInputs2(req, res, url)).catch(failLazyRoute);
|
|
125828
|
+
return;
|
|
125829
|
+
}
|
|
125618
125830
|
if (route === EXPO_WIDGETS_ROUTE2) {
|
|
125619
125831
|
void Promise.resolve().then(() => (init_expo_widgets_bundle(), expo_widgets_bundle_exports)).then(({ handleExpoWidgetsRequest: handleExpoWidgetsRequest2 }) => handleExpoWidgetsRequest2(req, res)).catch(failLazyRoute);
|
|
125620
125832
|
return;
|