peachsim 0.1.2624 → 0.1.2626
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/diagnose-native.ts +717 -0
- package/cli/commands/perf-native.ts +120 -51
- 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 +424 -339
- 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-DH6VFUJ3.mjs → acorn-JXJYSAIN.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-YOD53JTM.mjs → chunk-26TN2VTX.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-T7C6Z5UH.mjs → chunk-2NVWTTQ4.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LT533AHJ.mjs → chunk-2R77YMAI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-XONCLAVA.mjs → chunk-4KZSU4Q6.mjs} +21 -13
- package/dist-lib/esm-chunks/{chunk-IMI2NE4A.mjs → chunk-5STOTQGG.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HKPKCJI5.mjs → chunk-5TQNPFPN.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-OLAYY7SG.mjs → chunk-5UEXET5Y.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LMWSFXYN.mjs → chunk-62JXISPM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-A2WMBGJO.mjs → chunk-7ASIV44B.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-JHMD4G4V.mjs → chunk-AETFJFSQ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-UJORQHAE.mjs → chunk-AVFNDICR.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-AV7G5PTE.mjs → chunk-BFQUJ4RC.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-265THLTP.mjs → chunk-BSNIUHSI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-CM2NU5MS.mjs → chunk-F6KLM535.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-LOQBWIPM.mjs → chunk-HESCA2JF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-N4ZJZUCO.mjs → chunk-IYJG62ST.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QNXV766K.mjs → chunk-LBDHHUER.mjs} +81 -15
- package/dist-lib/esm-chunks/{chunk-EFQFJ7M6.mjs → chunk-LWOZ3LUO.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3XA5HYI5.mjs → chunk-T4ZKKV6P.mjs} +9 -8
- package/dist-lib/esm-chunks/{chunk-2YHIYKY2.mjs → chunk-UD7ON4ZV.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-LCO2EXKF.mjs → chunk-V4CRDOYA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LD7Z3NDO.mjs → chunk-WC43FELF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QZ5HTMWV.mjs → chunk-XCUDQYYK.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VH4BJS5V.mjs → chunk-YPBNNV6N.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-MDVTDJ65.mjs → metro-layout-parser-E34XATI4.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-ZN7I4FYC.mjs → swift-package-prebuilt-73BSTPFQ.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-DUVE2OXH.mjs → swift-sdk-app-module-L7AT6SCB.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-YSWQBCYV.mjs → swift-sdk-image-5NH574IM.mjs} +16 -18
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-MZ235WSK.mjs → swift-sdk-image-producer-YVZHH2LX.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +325 -240
- 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 +428 -343
- package/dist-lib/host/fetch-proxy-handler.cjs +76 -8
- 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 +4 -3
- 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 +87 -86
- package/dist-lib/public-origins-lib.json +69 -64
- 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 +8 -8
- package/dist-lib/skills.cjs +465 -380
- package/dist-lib/swift-compile.cjs +142 -62
- package/dist-lib/swift-compile.mjs +12 -12
- 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 +6 -6
- 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/acorn.cjs +1 -1
- package/dist-lib/vendor/magic-string.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/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/src/react-native-core-build.ts +12 -12
- package/src/react-native-core.ts +3 -7
- package/src/swift-compiler-digest.ts +37 -10
- package/src/swift-distribution-contract.ts +6 -1
- package/src/swift-distribution.lock.json +4 -2
- package/src/swift-sdk-image-recipe.ts +20 -0
- package/src/swift-sdk-image.ts +2 -4
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2626 | (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;
|
|
@@ -35749,7 +35749,10 @@ var init_swift_objc_sdk_tree = __esm({
|
|
|
35749
35749
|
});
|
|
35750
35750
|
|
|
35751
35751
|
// src/swift-compiler-digest.ts
|
|
35752
|
-
|
|
35752
|
+
function swiftArchiveCompilerDigestValue() {
|
|
35753
|
+
return true ? "53326609252f356d24373d653503ae1ad7e08db0a4b20c5236e7e7d1c769ee7f" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname, "archive");
|
|
35754
|
+
}
|
|
35755
|
+
var import_node_crypto10, import_node_fs25, import_node_path23, SWIFT_DIGEST_SOURCES, LINKED_IMAGE_SOURCES, SWIFT_ARCHIVE_DIGEST_SOURCES;
|
|
35753
35756
|
var init_swift_compiler_digest = __esm({
|
|
35754
35757
|
"src/swift-compiler-digest.ts"() {
|
|
35755
35758
|
"use strict";
|
|
@@ -35757,6 +35760,72 @@ var init_swift_compiler_digest = __esm({
|
|
|
35757
35760
|
import_node_fs25 = require("node:fs");
|
|
35758
35761
|
import_node_path23 = __toESM(require("node:path"), 1);
|
|
35759
35762
|
init_swift_objc_sdk_tree();
|
|
35763
|
+
SWIFT_DIGEST_SOURCES = [
|
|
35764
|
+
"swift-compile.ts",
|
|
35765
|
+
"swift-sdk-surface.ts",
|
|
35766
|
+
"swift-wasm-archive.ts",
|
|
35767
|
+
"swift-lexical.ts",
|
|
35768
|
+
"swift-header-compiler.ts",
|
|
35769
|
+
"swift-header-dependencies.ts",
|
|
35770
|
+
"swift-reproducible.ts",
|
|
35771
|
+
"write-build-file.ts",
|
|
35772
|
+
"xcode-header-search.ts",
|
|
35773
|
+
"case-insensitive-header-overlay.ts",
|
|
35774
|
+
"swift-package.ts",
|
|
35775
|
+
"swift-package-prebuilt.ts",
|
|
35776
|
+
"swift-package-prebuilt-targets.ts",
|
|
35777
|
+
"swift-objc-prebuilt.ts",
|
|
35778
|
+
"swift-objc-prebuilt-catalog.ts",
|
|
35779
|
+
"swift-toolchain.ts",
|
|
35780
|
+
"swift-shared-sdk.ts",
|
|
35781
|
+
"swift-distribution-mirror.ts",
|
|
35782
|
+
"swift-design-time.ts",
|
|
35783
|
+
"binaryen.lock.json",
|
|
35784
|
+
"swift-root-lock.ts",
|
|
35785
|
+
"process-table.ts",
|
|
35786
|
+
"swift-link-roots.ts",
|
|
35787
|
+
"swift-wasm-prune.ts",
|
|
35788
|
+
"wasm-optimize.ts",
|
|
35789
|
+
"wasm-features.ts",
|
|
35790
|
+
"wasm-narrow-boundary.ts",
|
|
35791
|
+
"../../peach-kit/src/nativeWasmContract.ts",
|
|
35792
|
+
"swift-guest-image-ledger.ts",
|
|
35793
|
+
"swift-guest-archive.ts",
|
|
35794
|
+
"swift-guest-link-plan.ts",
|
|
35795
|
+
"swift-guest-link.ts",
|
|
35796
|
+
"swift-guest-compile.ts",
|
|
35797
|
+
"swift-guest-dyld-functions.ts",
|
|
35798
|
+
"swift-guest-linked-spans.ts",
|
|
35799
|
+
"swift-guest-source-plan.ts",
|
|
35800
|
+
"swift-guest-runtime-plan.ts",
|
|
35801
|
+
"swift-guest-source-inputs.ts",
|
|
35802
|
+
"swift-guest-manifest.ts",
|
|
35803
|
+
"swift-guest-projection.ts",
|
|
35804
|
+
"swift-guest-projection-storage.ts",
|
|
35805
|
+
"swiftGuestImageContract.ts",
|
|
35806
|
+
"swift-runtime-products.ts",
|
|
35807
|
+
"swift-sdk-app-module.ts",
|
|
35808
|
+
"swift-sdk-image-map.ts",
|
|
35809
|
+
"swift-sdk-image-wasm.ts",
|
|
35810
|
+
"swift-sdk-image.ts",
|
|
35811
|
+
"../../peach-kit/src/nativeSdkBindingContract.ts",
|
|
35812
|
+
"swiftRuntimeProductContract.ts",
|
|
35813
|
+
"swiftTargetContract.ts",
|
|
35814
|
+
"swift-objc-import.ts",
|
|
35815
|
+
"swiftContract.ts",
|
|
35816
|
+
"swift-objc-platform.ts",
|
|
35817
|
+
"swift-objc-standin.ts",
|
|
35818
|
+
"swift-objc-sdk.ts"
|
|
35819
|
+
];
|
|
35820
|
+
LINKED_IMAGE_SOURCES = /* @__PURE__ */ new Set([
|
|
35821
|
+
"binaryen.lock.json",
|
|
35822
|
+
"swift-sdk-app-module.ts",
|
|
35823
|
+
"swift-sdk-image.ts",
|
|
35824
|
+
"wasm-optimize.ts"
|
|
35825
|
+
]);
|
|
35826
|
+
SWIFT_ARCHIVE_DIGEST_SOURCES = SWIFT_DIGEST_SOURCES.filter(
|
|
35827
|
+
(file) => !LINKED_IMAGE_SOURCES.has(file)
|
|
35828
|
+
);
|
|
35760
35829
|
}
|
|
35761
35830
|
});
|
|
35762
35831
|
|
|
@@ -35826,13 +35895,13 @@ var init_swift_standin_digest = __esm({
|
|
|
35826
35895
|
];
|
|
35827
35896
|
RUNTIME_IMPORT = /(?:^|[;\n])[ \t]*(?:import|export)\s+(?!type(?:\s|\{))([\s\S]*?)\s+from\s*['"]([^'"]+)['"]|(?:^|[;\n])[ \t]*import\s+['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
35828
35897
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS, STANDIN_DIGEST_EXCLUDED_FILES);
|
|
35829
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
35898
|
+
STANDIN_SOURCE_DIGEST = true ? "c87e0b7f1ae69b2a4e76611266612d6218f81a3244e592800c02f78c4f8e48f6" : standinSourceDigest();
|
|
35830
35899
|
}
|
|
35831
35900
|
});
|
|
35832
35901
|
|
|
35833
35902
|
// src/expo-native-compiler-digest.ts
|
|
35834
35903
|
function expoNativeCompilerDigestValue() {
|
|
35835
|
-
return true ? "
|
|
35904
|
+
return true ? "e9c127a6fe6b767d364983920ce71499b88057f966ac63fcb102ddd3ae4209fd" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
35836
35905
|
}
|
|
35837
35906
|
var import_node_crypto12;
|
|
35838
35907
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -57448,12 +57517,13 @@ function parseSwiftDistributionLock(value) {
|
|
|
57448
57517
|
if (runtime === void 0) return void 0;
|
|
57449
57518
|
if (!isRecord(runtime) || typeof runtime.source !== "string" || !/^[a-f0-9]{64}$/.test(runtime.source) || typeof runtime.url !== "string" || !/^https:\/\/[a-z0-9.-]+(?::\d+)?\/compile\/asset\/[a-f0-9]{64}$/.test(
|
|
57450
57519
|
runtime.url
|
|
57451
|
-
) || runtime.dataPlan !== void 0 && (typeof runtime.dataPlan !== "string" || !/^[a-f0-9]{64}$/.test(runtime.dataPlan)))
|
|
57520
|
+
) || runtime.dataPlan !== void 0 && (typeof runtime.dataPlan !== "string" || !/^[a-f0-9]{64}$/.test(runtime.dataPlan)) || runtime.recipe !== void 0 && (typeof runtime.recipe !== "string" || !/^[a-f0-9]{16}$/.test(runtime.recipe)))
|
|
57452
57521
|
throw new Error("invalid shared SDK runtime publication in Swift distribution lock");
|
|
57453
57522
|
return {
|
|
57454
57523
|
source: runtime.source,
|
|
57455
57524
|
url: runtime.url,
|
|
57456
|
-
...runtime.dataPlan && { dataPlan: runtime.dataPlan }
|
|
57525
|
+
...runtime.dataPlan && { dataPlan: runtime.dataPlan },
|
|
57526
|
+
...runtime.recipe && { recipe: runtime.recipe }
|
|
57457
57527
|
};
|
|
57458
57528
|
};
|
|
57459
57529
|
const sdkRuntime = publication(value.sdkRuntime);
|
|
@@ -73693,6 +73763,21 @@ var init_swift_root_lock = __esm({
|
|
|
73693
73763
|
}
|
|
73694
73764
|
});
|
|
73695
73765
|
|
|
73766
|
+
// src/swift-sdk-image-recipe.ts
|
|
73767
|
+
var import_node_crypto43, SWIFT_SDK_IMAGE_VERSION, swiftSdkImageScope, SWIFT_SDK_IMAGE_RECIPE;
|
|
73768
|
+
var init_swift_sdk_image_recipe = __esm({
|
|
73769
|
+
"src/swift-sdk-image-recipe.ts"() {
|
|
73770
|
+
"use strict";
|
|
73771
|
+
import_node_crypto43 = require("node:crypto");
|
|
73772
|
+
init_wasm_optimize();
|
|
73773
|
+
SWIFT_SDK_IMAGE_VERSION = 13;
|
|
73774
|
+
swiftSdkImageScope = (scopedLookups) => scopedLookups ? "guest image scopes 9\n" : "unscoped constructor order 1\n";
|
|
73775
|
+
SWIFT_SDK_IMAGE_RECIPE = (0, import_node_crypto43.createHash)("sha256").update(`swift-sdk-image
|
|
73776
|
+
${SWIFT_SDK_IMAGE_VERSION}
|
|
73777
|
+
`).update(WASM_LOWER_IDENTITY).update(swiftSdkImageScope(false)).update(swiftSdkImageScope(true)).digest("hex").slice(0, 16);
|
|
73778
|
+
}
|
|
73779
|
+
});
|
|
73780
|
+
|
|
73696
73781
|
// src/swift-sdk-image-producer.ts
|
|
73697
73782
|
var swift_sdk_image_producer_exports = {};
|
|
73698
73783
|
__export(swift_sdk_image_producer_exports, {
|
|
@@ -73733,7 +73818,7 @@ function applySwiftSdkProducerEnvironment(environment) {
|
|
|
73733
73818
|
}
|
|
73734
73819
|
}
|
|
73735
73820
|
function writeSwiftSdkProducerResult(file, launchId, error) {
|
|
73736
|
-
const temporary = `${file}.${(0,
|
|
73821
|
+
const temporary = `${file}.${(0, import_node_crypto44.randomUUID)()}`;
|
|
73737
73822
|
(0, import_node_fs73.writeFileSync)(temporary, JSON.stringify({ launchId, error: error ?? null }));
|
|
73738
73823
|
(0, import_node_fs73.renameSync)(temporary, file);
|
|
73739
73824
|
}
|
|
@@ -73845,7 +73930,7 @@ async function produceSwiftSdkImage(input) {
|
|
|
73845
73930
|
}
|
|
73846
73931
|
}
|
|
73847
73932
|
const repo = import_node_path71.default.resolve(input.moduleRoot, "../..");
|
|
73848
|
-
const launchId = (0,
|
|
73933
|
+
const launchId = (0, import_node_crypto44.randomUUID)();
|
|
73849
73934
|
const directory3 = import_node_path71.default.join(root, launchId);
|
|
73850
73935
|
const requestFile = import_node_path71.default.join(directory3, "request.json");
|
|
73851
73936
|
const sessionFile2 = import_node_path71.default.join(directory3, "session");
|
|
@@ -73943,12 +74028,12 @@ async function produceSwiftSdkImage(input) {
|
|
|
73943
74028
|
await (0, import_promises10.setTimeout)(2e3, void 0, { signal: input.signal });
|
|
73944
74029
|
}
|
|
73945
74030
|
}
|
|
73946
|
-
var import_node_child_process38,
|
|
74031
|
+
var import_node_child_process38, import_node_crypto44, import_node_fs73, import_node_path71, import_promises10, import_node_util9, run4, environmentNames, launcher;
|
|
73947
74032
|
var init_swift_sdk_image_producer = __esm({
|
|
73948
74033
|
"src/swift-sdk-image-producer.ts"() {
|
|
73949
74034
|
"use strict";
|
|
73950
74035
|
import_node_child_process38 = require("node:child_process");
|
|
73951
|
-
|
|
74036
|
+
import_node_crypto44 = require("node:crypto");
|
|
73952
74037
|
import_node_fs73 = require("node:fs");
|
|
73953
74038
|
import_node_path71 = __toESM(require("node:path"), 1);
|
|
73954
74039
|
import_promises10 = require("node:timers/promises");
|
|
@@ -73988,7 +74073,6 @@ __export(swift_sdk_image_exports, {
|
|
|
73988
74073
|
SWIFT_SDK_APP_TABLE_BASE: () => SWIFT_SDK_APP_TABLE_BASE,
|
|
73989
74074
|
SWIFT_SDK_IMAGE_BUNDLE: () => SWIFT_SDK_IMAGE_BUNDLE,
|
|
73990
74075
|
SWIFT_SDK_IMAGE_FILES: () => SWIFT_SDK_IMAGE_FILES,
|
|
73991
|
-
SWIFT_SDK_IMAGE_VERSION: () => SWIFT_SDK_IMAGE_VERSION,
|
|
73992
74076
|
SWIFT_SDK_MEMORY_BASE: () => SWIFT_SDK_MEMORY_BASE,
|
|
73993
74077
|
SWIFT_SDK_PIECE_FIELDS: () => SWIFT_SDK_PIECE_FIELDS,
|
|
73994
74078
|
buildSwiftSdkImage: () => buildSwiftSdkImage,
|
|
@@ -74023,9 +74107,9 @@ function swiftSdkImageProducts(moduleRoot, frameworkImports2) {
|
|
|
74023
74107
|
function swiftSdkImageKey(moduleRoot, scopedLookups = false, products = []) {
|
|
74024
74108
|
const distribution = swiftDistributionAt(moduleRoot);
|
|
74025
74109
|
const inputs2 = distribution ? swiftSdkDistributionInputs(distribution) : swiftModuleDigest(moduleRoot);
|
|
74026
|
-
return (0,
|
|
74110
|
+
return (0, import_node_crypto45.createHash)("sha256").update(`swift-sdk-image
|
|
74027
74111
|
${SWIFT_SDK_IMAGE_VERSION}
|
|
74028
|
-
`).update(WASM_LOWER_IDENTITY).update(KEEP_WASM_NAMES ? "\nnames\n" : "\n").update(scopedLookups
|
|
74112
|
+
`).update(WASM_LOWER_IDENTITY).update(KEEP_WASM_NAMES ? "\nnames\n" : "\n").update(swiftSdkImageScope(scopedLookups)).update(inputs2).update(products.length === 0 ? "" : `
|
|
74029
74113
|
products ${products.join(" ")}`).digest("hex").slice(0, 32);
|
|
74030
74114
|
}
|
|
74031
74115
|
function swiftSdkImageEntry(key2, scopedLookups) {
|
|
@@ -74114,7 +74198,7 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
|
|
|
74114
74198
|
stage
|
|
74115
74199
|
]);
|
|
74116
74200
|
const image = cached3(stage, key2);
|
|
74117
|
-
if (!image || (0,
|
|
74201
|
+
if (!image || (0, import_node_crypto45.createHash)("sha256").update((0, import_node_fs74.readFileSync)(image.image)).digest("hex") !== image.sha256)
|
|
74118
74202
|
throw new Error(`invalid published Swift SDK image ${key2}`);
|
|
74119
74203
|
(0, import_node_fs74.rmSync)(directory2, { recursive: true, force: true });
|
|
74120
74204
|
(0, import_node_fs74.renameSync)(stage, directory2);
|
|
@@ -74384,7 +74468,7 @@ async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLooku
|
|
|
74384
74468
|
(0, import_node_fs74.writeFileSync)(import_node_path72.default.join(work, INTERFACE_FILE), JSON.stringify(sdkInterface));
|
|
74385
74469
|
(0, import_node_fs74.writeFileSync)(
|
|
74386
74470
|
import_node_path72.default.join(work, IMAGE_DIGEST),
|
|
74387
|
-
typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(image).digest("hex") : (0,
|
|
74471
|
+
typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(image).digest("hex") : (0, import_node_crypto45.createHash)("sha256").update(image).digest("hex")
|
|
74388
74472
|
);
|
|
74389
74473
|
if (swiftSdkImageKey(
|
|
74390
74474
|
moduleRoot,
|
|
@@ -74653,12 +74737,12 @@ function readSwiftSdkManifest(image) {
|
|
|
74653
74737
|
}));
|
|
74654
74738
|
return setBoundedCache(cachedSdkManifests, cacheKey, { manifest, block: block2, segments });
|
|
74655
74739
|
}
|
|
74656
|
-
var import_node_child_process39,
|
|
74740
|
+
var import_node_child_process39, import_node_crypto45, import_node_fs74, import_node_path72, import_node_util10, run5, SWIFT_SDK_APP_MEMORY_BASE, SWIFT_SDK_MEMORY_BASE, SWIFT_SDK_APP_TABLE_BASE, EMPTY_APP, IMAGE_TABLES, IMAGE_ENTRY, imageApp, IMAGE_FILE, IMAGE_DIGEST, swiftSdkImageFile, INTERFACE_FILE, MANIFEST_FILE, MANIFEST_DATA_FILE, SWIFT_SDK_IMAGE_FILES, SWIFT_SDK_IMAGE_BUNDLE, MAX_CACHED_SDK_IMAGES, cachedSdkInterfaces, cachedSdkManifestIndices, cachedSdkManifests, SWIFT_SDK_PIECE_FIELDS, MANIFEST_BLOCKS, isManifestBlock;
|
|
74657
74741
|
var init_swift_sdk_image = __esm({
|
|
74658
74742
|
"src/swift-sdk-image.ts"() {
|
|
74659
74743
|
"use strict";
|
|
74660
74744
|
import_node_child_process39 = require("node:child_process");
|
|
74661
|
-
|
|
74745
|
+
import_node_crypto45 = require("node:crypto");
|
|
74662
74746
|
import_node_fs74 = require("node:fs");
|
|
74663
74747
|
import_node_path72 = __toESM(require("node:path"), 1);
|
|
74664
74748
|
import_node_util10 = require("node:util");
|
|
@@ -74670,13 +74754,13 @@ var init_swift_sdk_image = __esm({
|
|
|
74670
74754
|
init_swift_root_lock();
|
|
74671
74755
|
init_swift_sdk_guest_lookups();
|
|
74672
74756
|
init_swift_sdk_image_map();
|
|
74757
|
+
init_swift_sdk_image_recipe();
|
|
74673
74758
|
init_swift_sdk_image_wasm();
|
|
74674
74759
|
init_swift_toolchain();
|
|
74675
74760
|
init_swift_wasm_prune();
|
|
74676
74761
|
init_swiftTargetContract();
|
|
74677
74762
|
init_wasm_optimize();
|
|
74678
74763
|
run5 = (0, import_node_util10.promisify)(import_node_child_process39.execFile);
|
|
74679
|
-
SWIFT_SDK_IMAGE_VERSION = 13;
|
|
74680
74764
|
SWIFT_SDK_APP_MEMORY_BASE = 8372224;
|
|
74681
74765
|
SWIFT_SDK_MEMORY_BASE = 128 * 1024 * 1024;
|
|
74682
74766
|
SWIFT_SDK_APP_TABLE_BASE = 524288;
|
|
@@ -75320,7 +75404,7 @@ async function linkSwiftAppModule(options2) {
|
|
|
75320
75404
|
lazy,
|
|
75321
75405
|
KEEP_WASM_NAMES
|
|
75322
75406
|
])
|
|
75323
|
-
).update(bytes).digest("hex") : (0,
|
|
75407
|
+
).update(bytes).digest("hex") : (0, import_node_crypto46.createHash)("sha256").update(
|
|
75324
75408
|
JSON.stringify([
|
|
75325
75409
|
loweringCache.compilerDigest,
|
|
75326
75410
|
optimize,
|
|
@@ -75939,7 +76023,7 @@ function createSwiftSdkBinding(linkage, sdk2, usage, projection) {
|
|
|
75939
76023
|
bindSwiftAppModule(linkage, sdk2),
|
|
75940
76024
|
selectSwiftSdkData(sdk2, usage, linkage, projection)
|
|
75941
76025
|
]);
|
|
75942
|
-
const sha2565 = typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(bytes).digest("hex") : (0,
|
|
76026
|
+
const sha2565 = typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(bytes).digest("hex") : (0, import_node_crypto46.createHash)("sha256").update(bytes).digest("hex");
|
|
75943
76027
|
return { bytes, sha256: sha2565 };
|
|
75944
76028
|
}
|
|
75945
76029
|
function readSwiftSdkUsage(mapFile, linkedFile, sdkObjects) {
|
|
@@ -76486,12 +76570,12 @@ function partitionParent(section2) {
|
|
|
76486
76570
|
"__objc_class_refs"
|
|
76487
76571
|
].find((name3) => section2 === name3 || section2.startsWith(`${name3}.`));
|
|
76488
76572
|
}
|
|
76489
|
-
var import_node_child_process40,
|
|
76573
|
+
var import_node_child_process40, import_node_crypto46, import_node_fs75, import_node_path73, import_node_util11, import_node_zlib5, run6, RELOCATION_WIDTHS, GLOBAL_INDEX, TLS_SLEB64, SDK_TLS_HELPER, SDK_TLS_DELTA, OBJC_SECTION_BOUNDARY, uleb4, sleb2, encodedName2, SCANNED, RUN_GAP;
|
|
76490
76574
|
var init_swift_sdk_app_module = __esm({
|
|
76491
76575
|
"src/swift-sdk-app-module.ts"() {
|
|
76492
76576
|
"use strict";
|
|
76493
76577
|
import_node_child_process40 = require("node:child_process");
|
|
76494
|
-
|
|
76578
|
+
import_node_crypto46 = require("node:crypto");
|
|
76495
76579
|
import_node_fs75 = require("node:fs");
|
|
76496
76580
|
import_node_path73 = __toESM(require("node:path"), 1);
|
|
76497
76581
|
import_node_util11 = require("node:util");
|
|
@@ -77197,7 +77281,7 @@ function compilerCheckpoint(root, recipe2, args, header) {
|
|
|
77197
77281
|
}
|
|
77198
77282
|
if (!objects.length) return;
|
|
77199
77283
|
const outputs = [module2, header, map2[""].dependencies, ...objects];
|
|
77200
|
-
const digest3 = (0,
|
|
77284
|
+
const digest3 = (0, import_node_crypto47.createHash)("sha256").update(recipe2).update(JSON.stringify(args)).update(mapText);
|
|
77201
77285
|
for (const flag of args) {
|
|
77202
77286
|
if (!flag.startsWith("@")) continue;
|
|
77203
77287
|
const response = flag.slice(1);
|
|
@@ -77291,11 +77375,11 @@ async function withSwiftHeaderCompiler(root, toolchainBin, recipe2, producers, b
|
|
|
77291
77375
|
(0, import_node_fs77.rmSync)(directory2, { recursive: true, force: true });
|
|
77292
77376
|
}
|
|
77293
77377
|
}
|
|
77294
|
-
var
|
|
77378
|
+
var import_node_crypto47, import_node_fs77, import_node_http2, import_node_path75, SWIFT_HEADER_COMPILER_WRAPPER, argument, client;
|
|
77295
77379
|
var init_swift_header_compiler = __esm({
|
|
77296
77380
|
"src/swift-header-compiler.ts"() {
|
|
77297
77381
|
"use strict";
|
|
77298
|
-
|
|
77382
|
+
import_node_crypto47 = require("node:crypto");
|
|
77299
77383
|
import_node_fs77 = require("node:fs");
|
|
77300
77384
|
import_node_http2 = require("node:http");
|
|
77301
77385
|
import_node_path75 = __toESM(require("node:path"), 1);
|
|
@@ -77559,7 +77643,7 @@ var init_icuData = __esm({
|
|
|
77559
77643
|
|
|
77560
77644
|
// src/swift-icu.ts
|
|
77561
77645
|
async function cachedBrotli(bytes, quality, cacheKey) {
|
|
77562
|
-
const key2 = cacheKey && /^[a-f0-9]{64}$/.test(cacheKey) ? cacheKey : (0,
|
|
77646
|
+
const key2 = cacheKey && /^[a-f0-9]{64}$/.test(cacheKey) ? cacheKey : (0, import_node_crypto48.createHash)("sha256").update(bytes).digest("hex");
|
|
77563
77647
|
const cacheId = `${quality}:${key2}`;
|
|
77564
77648
|
const cached5 = brotliMemoryCache.get(cacheId);
|
|
77565
77649
|
if (cached5) return cached5;
|
|
@@ -77577,7 +77661,7 @@ async function cachedBrotli(bytes, quality, cacheKey) {
|
|
|
77577
77661
|
});
|
|
77578
77662
|
try {
|
|
77579
77663
|
await (0, import_promises11.mkdir)(dir, { recursive: true });
|
|
77580
|
-
const tmp = `${file}.${(0,
|
|
77664
|
+
const tmp = `${file}.${(0, import_node_crypto48.randomUUID)()}.tmp`;
|
|
77581
77665
|
await (0, import_promises11.writeFile)(tmp, compressed);
|
|
77582
77666
|
await (0, import_promises11.rename)(tmp, file);
|
|
77583
77667
|
} catch {
|
|
@@ -77615,7 +77699,7 @@ function swiftIcuAsset(toolchainBin, sdk2) {
|
|
|
77615
77699
|
JSON.stringify([toolchainBin, sdk2, swiftSdkOptions()]),
|
|
77616
77700
|
async () => {
|
|
77617
77701
|
const zipped = await deflate(await swiftIcuData(toolchainBin, sdk2));
|
|
77618
|
-
return { sha256: (0,
|
|
77702
|
+
return { sha256: (0, import_node_crypto48.createHash)("sha256").update(zipped).digest("hex"), gzip: zipped };
|
|
77619
77703
|
}
|
|
77620
77704
|
);
|
|
77621
77705
|
}
|
|
@@ -77717,7 +77801,7 @@ function swiftIcuPacked(icu) {
|
|
|
77717
77801
|
)
|
|
77718
77802
|
);
|
|
77719
77803
|
await (0, import_promises11.mkdir)(import_node_path77.default.dirname(file), { recursive: true });
|
|
77720
|
-
const tmp = `${file}.${(0,
|
|
77804
|
+
const tmp = `${file}.${(0, import_node_crypto48.randomUUID)()}.tmp`;
|
|
77721
77805
|
await (0, import_promises11.writeFile)(tmp, packed);
|
|
77722
77806
|
await (0, import_promises11.rename)(tmp, file);
|
|
77723
77807
|
return packed;
|
|
@@ -77730,12 +77814,12 @@ async function swiftIcuBundleAsset(icu) {
|
|
|
77730
77814
|
contentType: "application/octet-stream"
|
|
77731
77815
|
};
|
|
77732
77816
|
}
|
|
77733
|
-
var import_node_child_process42,
|
|
77817
|
+
var import_node_child_process42, import_node_crypto48, import_node_fs78, import_promises11, import_node_os16, import_node_path77, import_node_util12, import_node_zlib6, run7, deflate, compressBrotli, inflateGzip, ARCHIVE, MEMBER, raw, assets, brotliMemoryCache, packedFiles;
|
|
77734
77818
|
var init_swift_icu = __esm({
|
|
77735
77819
|
"src/swift-icu.ts"() {
|
|
77736
77820
|
"use strict";
|
|
77737
77821
|
import_node_child_process42 = require("node:child_process");
|
|
77738
|
-
|
|
77822
|
+
import_node_crypto48 = require("node:crypto");
|
|
77739
77823
|
import_node_fs78 = require("node:fs");
|
|
77740
77824
|
import_promises11 = require("node:fs/promises");
|
|
77741
77825
|
import_node_os16 = __toESM(require("node:os"), 1);
|
|
@@ -77938,7 +78022,7 @@ function swiftObjCPrebuiltCompiler(clang, root, sysroot, distribution, targets,
|
|
|
77938
78022
|
);
|
|
77939
78023
|
if (!modules.length) return [];
|
|
77940
78024
|
const { executable, prefixArgs } = rnxSelfInvocation();
|
|
77941
|
-
const compiler = (0,
|
|
78025
|
+
const compiler = (0, import_node_crypto49.createHash)("sha256").update(import_node_fs79.default.readFileSync(clang)).digest("hex");
|
|
77942
78026
|
return [
|
|
77943
78027
|
'case "$module" in',
|
|
77944
78028
|
` ${modules.join("|")}) exec ${[
|
|
@@ -77956,12 +78040,12 @@ function swiftObjCPrebuiltCompiler(clang, root, sysroot, distribution, targets,
|
|
|
77956
78040
|
"esac"
|
|
77957
78041
|
];
|
|
77958
78042
|
}
|
|
77959
|
-
var import_node_child_process43,
|
|
78043
|
+
var import_node_child_process43, import_node_crypto49, import_node_fs79, import_node_path78, quote2;
|
|
77960
78044
|
var init_swift_objc_prebuilt = __esm({
|
|
77961
78045
|
"src/swift-objc-prebuilt.ts"() {
|
|
77962
78046
|
"use strict";
|
|
77963
78047
|
import_node_child_process43 = require("node:child_process");
|
|
77964
|
-
|
|
78048
|
+
import_node_crypto49 = require("node:crypto");
|
|
77965
78049
|
import_node_fs79 = __toESM(require("node:fs"), 1);
|
|
77966
78050
|
import_node_path78 = __toESM(require("node:path"), 1);
|
|
77967
78051
|
init_internal_child_contract();
|
|
@@ -78314,7 +78398,7 @@ function swiftPackagePrebuiltEntries(input, moduleRoot, toolchainBin) {
|
|
|
78314
78398
|
([file, source]) => !/\.(?:swift|c|h|inc|modulemap)$/.test(file) || file.endsWith(".swift") && swiftImportNames(source, available2).some((name4) => !available2.has(name4))
|
|
78315
78399
|
))
|
|
78316
78400
|
return [];
|
|
78317
|
-
const hash = (0,
|
|
78401
|
+
const hash = (0, import_node_crypto50.createHash)("sha256");
|
|
78318
78402
|
for (const entry of files2.sort(
|
|
78319
78403
|
([left], [right]) => left < right ? -1 : left > right ? 1 : 0
|
|
78320
78404
|
))
|
|
@@ -78381,11 +78465,11 @@ function useSwiftPackagePrebuilts(input, moduleRoot, toolchainBin) {
|
|
|
78381
78465
|
}
|
|
78382
78466
|
return resolved;
|
|
78383
78467
|
}
|
|
78384
|
-
var
|
|
78468
|
+
var import_node_crypto50, import_node_fs82, import_node_path82, PACKAGE_RECIPE;
|
|
78385
78469
|
var init_swift_package_prebuilt = __esm({
|
|
78386
78470
|
"src/swift-package-prebuilt.ts"() {
|
|
78387
78471
|
"use strict";
|
|
78388
|
-
|
|
78472
|
+
import_node_crypto50 = require("node:crypto");
|
|
78389
78473
|
import_node_fs82 = __toESM(require("node:fs"), 1);
|
|
78390
78474
|
import_node_path82 = __toESM(require("node:path"), 1);
|
|
78391
78475
|
init_native_prebuilt();
|
|
@@ -78545,7 +78629,7 @@ function swiftObjCSelectorOptions(moduleRoot) {
|
|
|
78545
78629
|
`;
|
|
78546
78630
|
if (!(0, import_node_fs83.existsSync)(map2) || (0, import_node_fs83.readFileSync)(map2, "utf8") !== content) {
|
|
78547
78631
|
(0, import_node_fs83.mkdirSync)(import_node_path83.default.dirname(map2), { recursive: true });
|
|
78548
|
-
const partial = `${map2}.${(0,
|
|
78632
|
+
const partial = `${map2}.${(0, import_node_crypto51.randomUUID)()}`;
|
|
78549
78633
|
(0, import_node_fs83.writeFileSync)(partial, content);
|
|
78550
78634
|
(0, import_node_fs83.renameSync)(partial, map2);
|
|
78551
78635
|
}
|
|
@@ -78573,7 +78657,7 @@ async function ensureMacroPlugins(moduleRoot, toolchainBin, release, signal, lea
|
|
|
78573
78657
|
return { libraries, executables };
|
|
78574
78658
|
}
|
|
78575
78659
|
function swiftProjectBuildKey(moduleRoot, release) {
|
|
78576
|
-
return (0,
|
|
78660
|
+
return (0, import_node_crypto51.createHash)("sha256").update(`swift-framework/v2\0${release}\0${swiftModuleSdk(moduleRoot).wasmSdkId}`).update(swiftModuleDigest(moduleRoot)).digest("hex").slice(0, 32);
|
|
78577
78661
|
}
|
|
78578
78662
|
function sameStringList(left, right) {
|
|
78579
78663
|
if (left === right) return true;
|
|
@@ -78821,7 +78905,7 @@ function distributionClangModuleOptions(root, modules) {
|
|
|
78821
78905
|
function providedModulesPath(root, modules, excluded) {
|
|
78822
78906
|
if (!excluded || excluded.size === 0) return modules;
|
|
78823
78907
|
const entries2 = (0, import_node_fs83.readdirSync)(modules).filter((entry) => !excluded.has(entry.replace(/\..*$/, ""))).sort();
|
|
78824
|
-
const key2 = (0,
|
|
78908
|
+
const key2 = (0, import_node_crypto51.createHash)("sha256").update(JSON.stringify([modules, entries2])).update([...excluded].sort().join("\0")).digest("hex").slice(0, 16);
|
|
78825
78909
|
const directory2 = import_node_path83.default.join(root, `.peach-modules-${key2}`);
|
|
78826
78910
|
const complete = import_node_path83.default.join(directory2, ".complete");
|
|
78827
78911
|
if (!(0, import_node_fs83.existsSync)(complete)) {
|
|
@@ -78903,10 +78987,10 @@ function swiftTargetDependencies(files2, targets, frameworks = OPTIONAL_FRAMEWOR
|
|
|
78903
78987
|
function sha256Digest(value) {
|
|
78904
78988
|
if (typeof Bun !== "undefined")
|
|
78905
78989
|
return new Bun.CryptoHasher("sha256").update(value).digest();
|
|
78906
|
-
return (0,
|
|
78990
|
+
return (0, import_node_crypto51.createHash)("sha256").update(value).digest();
|
|
78907
78991
|
}
|
|
78908
78992
|
function swiftCompileInputHash(input, release) {
|
|
78909
|
-
const hash = (0,
|
|
78993
|
+
const hash = (0, import_node_crypto51.createHash)("sha256");
|
|
78910
78994
|
hash.update(`swift-compile
|
|
78911
78995
|
${release}
|
|
78912
78996
|
`);
|
|
@@ -79113,7 +79197,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
79113
79197
|
].join("\n") + "\n";
|
|
79114
79198
|
distributionLinkPath = distributionLink.path.replace(
|
|
79115
79199
|
/\.rsp$/,
|
|
79116
|
-
`-${(0,
|
|
79200
|
+
`-${(0, import_node_crypto51.createHash)("sha256").update(list2).digest("hex").slice(0, 12)}.rsp`
|
|
79117
79201
|
);
|
|
79118
79202
|
distributionLink.files.set(distributionLinkPath, list2);
|
|
79119
79203
|
}
|
|
@@ -79134,7 +79218,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
79134
79218
|
const endRun = () => {
|
|
79135
79219
|
if (run18.length >= MODULE_MAP_RESPONSE_FILE_RUN) {
|
|
79136
79220
|
const lines = run18.map((flag) => JSON.stringify(flag)).join("\n") + "\n";
|
|
79137
|
-
const digest4 = (0,
|
|
79221
|
+
const digest4 = (0, import_node_crypto51.createHash)("sha256").update(lines).digest("hex");
|
|
79138
79222
|
const file2 = import_node_path83.default.join(args.root, ".peach-clang-arguments", `${digest4}.rsp`);
|
|
79139
79223
|
args.files.set(file2, lines);
|
|
79140
79224
|
flags.push(`@${file2}`);
|
|
@@ -79158,7 +79242,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
79158
79242
|
}
|
|
79159
79243
|
endRun();
|
|
79160
79244
|
const content = JSON.stringify(flags);
|
|
79161
|
-
const digest3 = (0,
|
|
79245
|
+
const digest3 = (0, import_node_crypto51.createHash)("sha256").update(content).digest("hex");
|
|
79162
79246
|
const file = import_node_path83.default.join(args.root, ".peach-manifest-arguments", `${digest3}.json`);
|
|
79163
79247
|
args.files.set(file, content);
|
|
79164
79248
|
return `peachCompilerArguments(${JSON.stringify(file)})`;
|
|
@@ -79170,7 +79254,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
79170
79254
|
const macros = compactSwiftClangDefines(swiftClangSearchArguments(flags));
|
|
79171
79255
|
const compact = args.coalescibleOverlays ? compactSwiftClangOverlays(macros, args.coalescibleOverlays) : macros;
|
|
79172
79256
|
const content = compact.map((flag) => JSON.stringify(flag)).join("\n") + "\n";
|
|
79173
|
-
const digest3 = (0,
|
|
79257
|
+
const digest3 = (0, import_node_crypto51.createHash)("sha256").update(content).digest("hex");
|
|
79174
79258
|
const file = import_node_path83.default.join(args.root, ".peach-swift-arguments", `${digest3}.rsp`);
|
|
79175
79259
|
args.files.set(file, content);
|
|
79176
79260
|
return JSON.stringify([`@${file}`]);
|
|
@@ -80759,7 +80843,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
80759
80843
|
)
|
|
80760
80844
|
];
|
|
80761
80845
|
const moduleFlag = perFile.some((flag) => flag.startsWith("-fmodule-name=")) ? [] : [`-fmodule-name=${swiftTargetModuleName(target.name)}`];
|
|
80762
|
-
const identity2 = (0,
|
|
80846
|
+
const identity2 = (0, import_node_crypto51.createHash)("sha256").update(
|
|
80763
80847
|
JSON.stringify([
|
|
80764
80848
|
cxx,
|
|
80765
80849
|
quoteDirs,
|
|
@@ -81122,7 +81206,7 @@ module ${moduleName2}.Swift {
|
|
|
81122
81206
|
])
|
|
81123
81207
|
(0, import_node_fs83.rmSync)(cache, { recursive: true, force: true });
|
|
81124
81208
|
files2.set(frameworkSearchRecord, frameworkSearch);
|
|
81125
|
-
const modulePlan = (0,
|
|
81209
|
+
const modulePlan = (0, import_node_crypto51.createHash)("sha256").update(
|
|
81126
81210
|
swiftModuleInputFiles(moduleRoot).join("\n")
|
|
81127
81211
|
);
|
|
81128
81212
|
if (!distribution) {
|
|
@@ -81131,7 +81215,7 @@ module ${moduleName2}.Swift {
|
|
|
81131
81215
|
modulePlan.update(
|
|
81132
81216
|
Object.keys(input.files).filter((file) => file.endsWith(".swift")).sort().join("\n")
|
|
81133
81217
|
);
|
|
81134
|
-
const resourcePlan = (0,
|
|
81218
|
+
const resourcePlan = (0, import_node_crypto51.createHash)("sha256").update(
|
|
81135
81219
|
JSON.stringify(
|
|
81136
81220
|
resourceTargets.filter((target) => target.resources).map((target) => [
|
|
81137
81221
|
target.name,
|
|
@@ -81439,7 +81523,7 @@ ${entry}`);
|
|
|
81439
81523
|
);
|
|
81440
81524
|
for (const [target, data] of Object.entries(input.libraries ?? {})) {
|
|
81441
81525
|
const bytes = Buffer.from(data, "base64");
|
|
81442
|
-
const digest3 = (0,
|
|
81526
|
+
const digest3 = (0, import_node_crypto51.createHash)("sha256").update(bytes).digest("hex");
|
|
81443
81527
|
if (input.binaryModules?.[target] && packageTargets.has(target)) {
|
|
81444
81528
|
const objects = import_node_path83.default.join(
|
|
81445
81529
|
layout2.root,
|
|
@@ -82091,7 +82175,7 @@ function readCompiledArtifact(directory2, hash) {
|
|
|
82091
82175
|
return null;
|
|
82092
82176
|
const bytes = (0, import_node_fs83.readFileSync)(import_node_path83.default.join(directory2, "app.wasm"));
|
|
82093
82177
|
const gzip2 = (0, import_node_fs83.readFileSync)(import_node_path83.default.join(directory2, "icu.gz"));
|
|
82094
|
-
if ((0,
|
|
82178
|
+
if ((0, import_node_crypto51.createHash)("sha256").update(bytes).digest("hex") !== receipt.wasm || (0, import_node_crypto51.createHash)("sha256").update(gzip2).digest("hex") !== receipt.icu || bytes.length <= 8 || bytes.readUInt32LE(0) !== 1836278016 || bytes.readUInt32LE(4) !== 1)
|
|
82095
82179
|
return null;
|
|
82096
82180
|
let sdk2;
|
|
82097
82181
|
if ("sdk" in receipt) {
|
|
@@ -82099,7 +82183,7 @@ function readCompiledArtifact(directory2, hash) {
|
|
|
82099
82183
|
if (!isRecord(image) || typeof image.key !== "string" || typeof image.sha256 !== "string" || typeof image.binding !== "string")
|
|
82100
82184
|
return null;
|
|
82101
82185
|
const binding = (0, import_node_fs83.readFileSync)(import_node_path83.default.join(directory2, "sdk-binding.bin"));
|
|
82102
|
-
if ((0,
|
|
82186
|
+
if ((0, import_node_crypto51.createHash)("sha256").update(binding).digest("hex") !== image.binding)
|
|
82103
82187
|
return null;
|
|
82104
82188
|
sdk2 = {
|
|
82105
82189
|
key: image.key,
|
|
@@ -82127,7 +82211,7 @@ function saveCompiledArtifact(root, artifact) {
|
|
|
82127
82211
|
import_node_path83.default.join(pending2, "artifact.json"),
|
|
82128
82212
|
JSON.stringify({
|
|
82129
82213
|
hash: artifact.hash,
|
|
82130
|
-
wasm: (0,
|
|
82214
|
+
wasm: (0, import_node_crypto51.createHash)("sha256").update(artifact.bytes).digest("hex"),
|
|
82131
82215
|
icu: artifact.icu.sha256,
|
|
82132
82216
|
sdk: artifact.sdk && {
|
|
82133
82217
|
key: artifact.sdk.key,
|
|
@@ -82476,7 +82560,7 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
82476
82560
|
const unoptimized = args.input.unoptimized === true;
|
|
82477
82561
|
const sdkOptions = swiftCompileSdkOptions(args.moduleRoot, args.toolchainBin);
|
|
82478
82562
|
const selectorOptions = swiftObjCSelectorOptions(args.moduleRoot);
|
|
82479
|
-
const receiptKey = (0,
|
|
82563
|
+
const receiptKey = (0, import_node_crypto51.createHash)("sha256").update(
|
|
82480
82564
|
JSON.stringify([
|
|
82481
82565
|
"framework-products/v2",
|
|
82482
82566
|
args.frameworkKey,
|
|
@@ -82643,7 +82727,7 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
82643
82727
|
const archiveBase = import_node_path83.default.join(scratch2, "products-lib");
|
|
82644
82728
|
(0, import_node_fs83.mkdirSync)(archiveBase, { recursive: true });
|
|
82645
82729
|
const archiveRoot = import_node_path83.default.join(archiveBase, receiptKey);
|
|
82646
|
-
const stagedArchiveRoot = `${archiveRoot}.tmp-${process.pid}-${(0,
|
|
82730
|
+
const stagedArchiveRoot = `${archiveRoot}.tmp-${process.pid}-${(0, import_node_crypto51.randomUUID)()}`;
|
|
82647
82731
|
const stagedArchive = import_node_path83.default.join(stagedArchiveRoot, "lib");
|
|
82648
82732
|
(0, import_node_fs83.mkdirSync)(stagedArchive, { recursive: true });
|
|
82649
82733
|
const archived = /* @__PURE__ */ new Map();
|
|
@@ -82686,7 +82770,7 @@ ${args.frameworkKey}`,
|
|
|
82686
82770
|
const receiptsDir = import_node_path83.default.join(scratch2, "products-ready");
|
|
82687
82771
|
(0, import_node_fs83.mkdirSync)(receiptsDir, { recursive: true });
|
|
82688
82772
|
const receiptFile2 = import_node_path83.default.join(receiptsDir, `${receiptKey}.json`);
|
|
82689
|
-
const partialReceipt = `${receiptFile2}.${process.pid}.${(0,
|
|
82773
|
+
const partialReceipt = `${receiptFile2}.${process.pid}.${(0, import_node_crypto51.randomUUID)()}`;
|
|
82690
82774
|
(0, import_node_fs83.writeFileSync)(
|
|
82691
82775
|
partialReceipt,
|
|
82692
82776
|
JSON.stringify({
|
|
@@ -82858,7 +82942,7 @@ function mirrorTree2(source, target, skip) {
|
|
|
82858
82942
|
if (existing?.isFile() && existing.size === stat2.size && (existing.mtimeMs === stat2.mtimeMs || (0, import_node_fs83.readFileSync)(from).equals((0, import_node_fs83.readFileSync)(to))))
|
|
82859
82943
|
continue;
|
|
82860
82944
|
if (existing) (0, import_node_fs83.rmSync)(to, { recursive: true, force: true });
|
|
82861
|
-
const partial = `${to}.${(0,
|
|
82945
|
+
const partial = `${to}.${(0, import_node_crypto51.randomUUID)()}`;
|
|
82862
82946
|
(0, import_node_fs83.copyFileSync)(from, partial);
|
|
82863
82947
|
if (stat2.mtimeMs > Date.now()) (0, import_node_fs83.utimesSync)(partial, stat2.atime, stat2.mtime);
|
|
82864
82948
|
(0, import_node_fs83.renameSync)(partial, to);
|
|
@@ -82918,7 +83002,7 @@ function stageFrameworkSource(moduleRoot, slot, frameworkKey, release) {
|
|
|
82918
83002
|
return stagedModule;
|
|
82919
83003
|
}
|
|
82920
83004
|
function swiftLinkStamp(args) {
|
|
82921
|
-
const hash = (0,
|
|
83005
|
+
const hash = (0, import_node_crypto51.createHash)("sha256");
|
|
82922
83006
|
hash.update(`swift-link/v1
|
|
82923
83007
|
${args.frameworkKey}
|
|
82924
83008
|
`);
|
|
@@ -83046,7 +83130,7 @@ async function compileSwiftProjectOnce(sources, options2) {
|
|
|
83046
83130
|
const inputHash = swiftCompileInputHash(input, options2.release);
|
|
83047
83131
|
const moduleDigest = swiftModuleDigest(moduleRoot);
|
|
83048
83132
|
const sourceHash = inputHash.copy().update(moduleDigest).digest("hex");
|
|
83049
|
-
const hash = sdkImage ? (0,
|
|
83133
|
+
const hash = sdkImage ? (0, import_node_crypto51.createHash)("sha256").update(`${sourceHash}
|
|
83050
83134
|
sdk module ${sdkImage.key}`).digest("hex") : sourceHash;
|
|
83051
83135
|
const frameworkKey = swiftProjectBuildKey(moduleRoot, options2.release);
|
|
83052
83136
|
const sharedRoot = import_node_path83.default.join(swiftCacheDir(), "swift-projects", hash);
|
|
@@ -83143,7 +83227,7 @@ ${cap}` : "";
|
|
|
83143
83227
|
}
|
|
83144
83228
|
const baseRoot = root;
|
|
83145
83229
|
const canPoolBuildRoot = !options2.intermediates && !options2.project && !options2.linkOnly && import_node_path83.default.basename(import_node_path83.default.dirname(baseRoot)) === "swift-builds";
|
|
83146
|
-
const buildShape = canPoolBuildRoot ? (0,
|
|
83230
|
+
const buildShape = canPoolBuildRoot ? (0, import_node_crypto51.createHash)("sha256").update(
|
|
83147
83231
|
JSON.stringify([
|
|
83148
83232
|
frameworkKey,
|
|
83149
83233
|
Boolean(sdkImage),
|
|
@@ -83632,17 +83716,17 @@ ${cap}` : "";
|
|
|
83632
83716
|
}
|
|
83633
83717
|
const receipt = import_node_path83.default.join(
|
|
83634
83718
|
checkpoints,
|
|
83635
|
-
(0,
|
|
83719
|
+
(0, import_node_crypto51.createHash)("sha256").update(target).digest("hex")
|
|
83636
83720
|
);
|
|
83637
83721
|
const headers = producers.map(headerPaths);
|
|
83638
83722
|
for (const header of headers)
|
|
83639
83723
|
if ((0, import_node_fs83.existsSync)(header.original)) publishHeader(header);
|
|
83640
83724
|
const fingerprint = () => {
|
|
83641
|
-
const digest3 = (0,
|
|
83725
|
+
const digest3 = (0, import_node_crypto51.createHash)("sha256").update(recipe2);
|
|
83642
83726
|
for (const { original, emitted } of headers) {
|
|
83643
83727
|
if (!(0, import_node_fs83.existsSync)(original) || !(0, import_node_fs83.existsSync)(emitted)) return;
|
|
83644
83728
|
digest3.update(
|
|
83645
|
-
(0,
|
|
83729
|
+
(0, import_node_crypto51.createHash)("sha256").update((0, import_node_fs83.readFileSync)(emitted)).digest()
|
|
83646
83730
|
);
|
|
83647
83731
|
}
|
|
83648
83732
|
return digest3.digest("hex");
|
|
@@ -83855,12 +83939,12 @@ ${cap}` : "";
|
|
|
83855
83939
|
options2.signal
|
|
83856
83940
|
);
|
|
83857
83941
|
}
|
|
83858
|
-
var import_node_child_process45,
|
|
83942
|
+
var import_node_child_process45, import_node_crypto51, import_node_fs83, import_node_os18, import_node_path83, v6, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_COMPILER_ENV_KEYS, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, lastPartition, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, CLANG_DISTRIBUTION_MODULES, ONE_PRODUCT, GAME_FAMILY, gameProducts, gameProduct, GAME_REACH, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, MODULE_MAP_RESPONSE_FILE_RUN, cFlagArray, cxxFlagArray, SWIFTPM_DEFAULT_IOS_DEPLOYMENT_TARGET, OS_IOS, ARCH_ARM64, NOT_ON_IOS, DELEGATE_CLASS, ARM64_MACRO, WASM_MACRO, ARCH_WASM32, C_WORDS, archEnvironments, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, cPredefineTable, cPredefineCache, HIDDEN_UNITS, FIRST_WINS_PAIRS, LAST_WINS_PAIRS, VALUE_FLAGS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, frameworkProductsReceiptSchema, SWIFT_LINK_STAMP, SWIFT_HOST_COMPILER_WRAPPER, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_UNOPTIMIZED_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN, SWIFT_FRAMEWORK_SLOT_RELEASE, SWIFT_BUILD_ROOT_SLOTS, SWIFT_BUILD_ROOT_SHAPE;
|
|
83859
83943
|
var init_swift_compile = __esm({
|
|
83860
83944
|
"src/swift-compile.ts"() {
|
|
83861
83945
|
"use strict";
|
|
83862
83946
|
import_node_child_process45 = require("node:child_process");
|
|
83863
|
-
|
|
83947
|
+
import_node_crypto51 = require("node:crypto");
|
|
83864
83948
|
import_node_fs83 = require("node:fs");
|
|
83865
83949
|
import_node_os18 = __toESM(require("node:os"), 1);
|
|
83866
83950
|
import_node_path83 = __toESM(require("node:path"), 1);
|
|
@@ -84088,7 +84172,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
|
|
|
84088
84172
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
84089
84173
|
MULTI_MANIFEST_VERSION = 76;
|
|
84090
84174
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
84091
|
-
compilerSourceDigest = true ? "
|
|
84175
|
+
compilerSourceDigest = true ? "169122685e250113f128b79efc78f9868f581da36ab083c174056ab99b87b629" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
84092
84176
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
84093
84177
|
MODULE_MAP_RESPONSE_FILE_RUN = 16;
|
|
84094
84178
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
@@ -84204,7 +84288,7 @@ async function podPrepareEnvironment(base2) {
|
|
|
84204
84288
|
if (process.platform !== "linux") return base2;
|
|
84205
84289
|
const { root, toolchainBin } = await resolveSwiftModule();
|
|
84206
84290
|
const { sysroot, resources } = swiftSdkPaths(root, toolchainBin);
|
|
84207
|
-
const key2 = (0,
|
|
84291
|
+
const key2 = (0, import_node_crypto52.createHash)("sha256").update(XCRUN).update(CLANG).digest("hex").slice(0, 16);
|
|
84208
84292
|
const directory2 = import_node_path84.default.join(cacheDir(), "pod-tools", key2);
|
|
84209
84293
|
if (!import_node_fs84.default.existsSync(directory2)) {
|
|
84210
84294
|
import_node_fs84.default.mkdirSync(import_node_path84.default.dirname(directory2), { recursive: true });
|
|
@@ -84245,11 +84329,11 @@ async function podPrepareEnvironment(base2) {
|
|
|
84245
84329
|
PEACH_POD_RESOURCES: resources
|
|
84246
84330
|
};
|
|
84247
84331
|
}
|
|
84248
|
-
var
|
|
84332
|
+
var import_node_crypto52, import_node_fs84, import_node_path84, XCRUN, CLANG;
|
|
84249
84333
|
var init_pod_prepare_toolchain = __esm({
|
|
84250
84334
|
"src/pod-prepare-toolchain.ts"() {
|
|
84251
84335
|
"use strict";
|
|
84252
|
-
|
|
84336
|
+
import_node_crypto52 = require("node:crypto");
|
|
84253
84337
|
import_node_fs84 = __toESM(require("node:fs"), 1);
|
|
84254
84338
|
import_node_path84 = __toESM(require("node:path"), 1);
|
|
84255
84339
|
init_home_paths();
|
|
@@ -84335,10 +84419,10 @@ async function podSourceRoot(spec, prepareEnv) {
|
|
|
84335
84419
|
`${name3}: unrecognized ${strategy} source options ${unrecognized.join(", ")}`
|
|
84336
84420
|
);
|
|
84337
84421
|
const base2 = import_node_path85.default.join(rnxHomeDir(), "pod-sources");
|
|
84338
|
-
const digest3 = (0,
|
|
84422
|
+
const digest3 = (0, import_node_crypto53.createHash)("sha256").update(canonicalJson(source)).digest("hex").slice(0, 16);
|
|
84339
84423
|
const root = import_node_path85.default.join(base2, name3, `${String(spec.version)}-${digest3}`);
|
|
84340
84424
|
if (import_node_fs85.default.existsSync(root)) return root;
|
|
84341
|
-
const stage = import_node_path85.default.join(base2, ".staging", (0,
|
|
84425
|
+
const stage = import_node_path85.default.join(base2, ".staging", (0, import_node_crypto53.randomUUID)());
|
|
84342
84426
|
import_node_fs85.default.mkdirSync(stage, { recursive: true });
|
|
84343
84427
|
try {
|
|
84344
84428
|
if (strategy === "git") await downloadGit(name3, url, options2, stage);
|
|
@@ -84513,7 +84597,7 @@ async function downloadFile(pod, url, headers, file, algorithm) {
|
|
|
84513
84597
|
}
|
|
84514
84598
|
if (!response?.ok || !response.body)
|
|
84515
84599
|
throw new Error(`${pod}: GET ${url} failed with HTTP ${response?.status ?? "error"}`);
|
|
84516
|
-
const hash = algorithm ? (0,
|
|
84600
|
+
const hash = algorithm ? (0, import_node_crypto53.createHash)(algorithm) : null;
|
|
84517
84601
|
const handle = await import_node_fs85.default.promises.open(file, "w");
|
|
84518
84602
|
try {
|
|
84519
84603
|
const reader = response.body.getReader();
|
|
@@ -84770,12 +84854,12 @@ function cleanInstalledPod(spec, root, used) {
|
|
|
84770
84854
|
(node) => used.filter((entry) => entry.specs.includes(node.name)).map((entry) => entry.platform)
|
|
84771
84855
|
);
|
|
84772
84856
|
}
|
|
84773
|
-
var import_node_child_process46,
|
|
84857
|
+
var import_node_child_process46, import_node_crypto53, import_node_fs85, import_node_os19, import_node_path85, COCOAPODS_VERSION, USER_AGENT, PLATFORMS, HEADER_EXTENSIONS, SOURCE_EXTENSIONS2, SOURCE_FILES_PATTERN, STRATEGIES, OPTIONS, ARCHIVE_TYPES, object5, RETRY_STATUSES, chomp, stringList, bracketEnd, escapeRegex;
|
|
84774
84858
|
var init_pod_sources = __esm({
|
|
84775
84859
|
"src/pod-sources.ts"() {
|
|
84776
84860
|
"use strict";
|
|
84777
84861
|
import_node_child_process46 = require("node:child_process");
|
|
84778
|
-
|
|
84862
|
+
import_node_crypto53 = require("node:crypto");
|
|
84779
84863
|
import_node_fs85 = __toESM(require("node:fs"), 1);
|
|
84780
84864
|
import_node_os19 = __toESM(require("node:os"), 1);
|
|
84781
84865
|
import_node_path85 = __toESM(require("node:path"), 1);
|
|
@@ -84859,7 +84943,7 @@ function specRepo(url, refresh) {
|
|
|
84859
84943
|
const dir = import_node_path86.default.join(
|
|
84860
84944
|
cacheDir(),
|
|
84861
84945
|
"cocoapods-repos",
|
|
84862
|
-
(0,
|
|
84946
|
+
(0, import_node_crypto54.createHash)("sha256").update(url).digest("hex").slice(0, 16)
|
|
84863
84947
|
);
|
|
84864
84948
|
if (!import_node_fs86.default.existsSync(import_node_path86.default.join(dir, ".git"))) {
|
|
84865
84949
|
const staged = `${dir}.${process.pid}`;
|
|
@@ -84889,7 +84973,7 @@ function podDir(repo, name3) {
|
|
|
84889
84973
|
const specs = import_node_fs86.default.existsSync(import_node_path86.default.join(repo, "Specs")) ? import_node_path86.default.join(repo, "Specs") : repo;
|
|
84890
84974
|
const metadata = import_node_path86.default.join(repo, "CocoaPods-version.yml");
|
|
84891
84975
|
const lengths = import_node_fs86.default.existsSync(metadata) ? browser_default.parse(import_node_fs86.default.readFileSync(metadata, "utf8"))?.prefix_lengths : void 0;
|
|
84892
|
-
const hash = (0,
|
|
84976
|
+
const hash = (0, import_node_crypto54.createHash)("md5").update(name3).digest("hex");
|
|
84893
84977
|
let at = 0;
|
|
84894
84978
|
const shards2 = (Array.isArray(lengths) ? lengths : []).map((length) => {
|
|
84895
84979
|
if (typeof length !== "number")
|
|
@@ -84922,17 +85006,17 @@ async function sourceSpecificationFile(source, name3, version2) {
|
|
|
84922
85006
|
if (!file) throw new Error(`${source} lists ${name3} ${version2} without a podspec`);
|
|
84923
85007
|
return file;
|
|
84924
85008
|
}
|
|
84925
|
-
var import_node_child_process47,
|
|
85009
|
+
var import_node_child_process47, import_node_crypto54, import_node_fs86, import_node_path86, shard, shards, TRUNK_SOURCES, refreshed, specRepoKey;
|
|
84926
85010
|
var init_cocoapods_trunk = __esm({
|
|
84927
85011
|
"src/cocoapods-trunk.ts"() {
|
|
84928
85012
|
"use strict";
|
|
84929
85013
|
import_node_child_process47 = require("node:child_process");
|
|
84930
|
-
|
|
85014
|
+
import_node_crypto54 = require("node:crypto");
|
|
84931
85015
|
import_node_fs86 = __toESM(require("node:fs"), 1);
|
|
84932
85016
|
import_node_path86 = __toESM(require("node:path"), 1);
|
|
84933
85017
|
init_browser();
|
|
84934
85018
|
init_home_paths();
|
|
84935
|
-
shard = (name3) => (0,
|
|
85019
|
+
shard = (name3) => (0, import_node_crypto54.createHash)("md5").update(name3).digest("hex").slice(0, 3).split("");
|
|
84936
85020
|
shards = /* @__PURE__ */ new Map();
|
|
84937
85021
|
TRUNK_SOURCES = /* @__PURE__ */ new Set([
|
|
84938
85022
|
"trunk",
|
|
@@ -94601,7 +94685,7 @@ end
|
|
|
94601
94685
|
function sha256Hex5(bytes) {
|
|
94602
94686
|
if (typeof Bun !== "undefined")
|
|
94603
94687
|
return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
|
|
94604
|
-
return (0,
|
|
94688
|
+
return (0, import_node_crypto55.createHash)("sha256").update(bytes).digest("hex");
|
|
94605
94689
|
}
|
|
94606
94690
|
function isBazelPackage(input) {
|
|
94607
94691
|
return /^BUILD(?:\.bazel)?$/.test(import_node_path96.default.basename(input)) && import_node_fs95.default.statSync(input).isFile();
|
|
@@ -94632,7 +94716,7 @@ function bazelBinary(root) {
|
|
|
94632
94716
|
const expected = (0, import_node_child_process48.execFileSync)("curl", ["-fsSL", `${url}.sha256`], {
|
|
94633
94717
|
encoding: "utf8"
|
|
94634
94718
|
}).split(/\s/)[0];
|
|
94635
|
-
const actual = (0,
|
|
94719
|
+
const actual = (0, import_node_crypto55.createHash)("sha256").update(import_node_fs95.default.readFileSync(partial)).digest("hex");
|
|
94636
94720
|
if (actual !== expected) {
|
|
94637
94721
|
import_node_fs95.default.rmSync(partial, { force: true });
|
|
94638
94722
|
throw new Error(`${url} digest ${actual} differs from its release ${expected}`);
|
|
@@ -94662,7 +94746,7 @@ function parseRule(raw2) {
|
|
|
94662
94746
|
};
|
|
94663
94747
|
}
|
|
94664
94748
|
function graphInputsDigest(root) {
|
|
94665
|
-
const hash = (0,
|
|
94749
|
+
const hash = (0, import_node_crypto55.createHash)("sha256");
|
|
94666
94750
|
const visit3 = (dir) => {
|
|
94667
94751
|
for (const entry of import_node_fs95.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
94668
94752
|
if (entry.name.startsWith(".") || entry.name.startsWith("bazel-")) continue;
|
|
@@ -94695,7 +94779,7 @@ function bazelGraph(root, label, configuration2) {
|
|
|
94695
94779
|
const cached5 = graphs.get(key2);
|
|
94696
94780
|
if (cached5) return cached5;
|
|
94697
94781
|
const flags = configurationFlags(configuration2);
|
|
94698
|
-
const digest3 = (0,
|
|
94782
|
+
const digest3 = (0, import_node_crypto55.createHash)("sha256").update(JSON.stringify([GRAPH_FORMAT, label, flags, QUERIED_RULES])).update(graphInputsDigest(root)).digest("hex").slice(0, 24);
|
|
94699
94783
|
const file = import_node_path96.default.join(root, ".build", "peach-bazel", `graph-${digest3}.json`);
|
|
94700
94784
|
const bazel = bazelBinary(root);
|
|
94701
94785
|
const run18 = (args) => (0, import_node_child_process48.execFileSync)(bazel, args, {
|
|
@@ -95519,12 +95603,12 @@ function shellTokens(options2) {
|
|
|
95519
95603
|
return words2;
|
|
95520
95604
|
});
|
|
95521
95605
|
}
|
|
95522
|
-
var import_node_child_process48,
|
|
95606
|
+
var import_node_child_process48, import_node_crypto55, import_node_fs95, import_node_os20, import_node_path96, LIBRARY_RULES, QUERIED_RULES, NATIVE_SOURCE, HEADER4, PRODUCTS, graphs, CLANG_CONFIGURATION_FLAGS, GRAPH_FORMAT, BazelFiles, CXX_STANDARD;
|
|
95523
95607
|
var init_bazel_project = __esm({
|
|
95524
95608
|
"src/bazel-project.ts"() {
|
|
95525
95609
|
"use strict";
|
|
95526
95610
|
import_node_child_process48 = require("node:child_process");
|
|
95527
|
-
|
|
95611
|
+
import_node_crypto55 = require("node:crypto");
|
|
95528
95612
|
import_node_fs95 = __toESM(require("node:fs"), 1);
|
|
95529
95613
|
import_node_os20 = __toESM(require("node:os"), 1);
|
|
95530
95614
|
import_node_path96 = __toESM(require("node:path"), 1);
|
|
@@ -97178,7 +97262,7 @@ async function swiftBinaryModules(binary2) {
|
|
|
97178
97262
|
if (!binary2.url) return localSwiftBinaryModules(binary2.dir);
|
|
97179
97263
|
const cached5 = import_node_path97.default.join(
|
|
97180
97264
|
cacheDir3,
|
|
97181
|
-
`${(0,
|
|
97265
|
+
`${(0, import_node_crypto56.createHash)("sha256").update(`${binary2.url}\0${binary2.checksum ?? ""}`).digest("hex").slice(0, 32)}.json`
|
|
97182
97266
|
);
|
|
97183
97267
|
if (import_node_fs96.default.existsSync(cached5)) {
|
|
97184
97268
|
const value = JSON.parse(import_node_fs96.default.readFileSync(cached5, "utf8"));
|
|
@@ -97190,11 +97274,11 @@ async function swiftBinaryModules(binary2) {
|
|
|
97190
97274
|
import_node_fs96.default.writeFileSync(cached5, JSON.stringify(modules));
|
|
97191
97275
|
return modules;
|
|
97192
97276
|
}
|
|
97193
|
-
var
|
|
97277
|
+
var import_node_crypto56, import_node_fs96, import_node_path97, cacheDir3;
|
|
97194
97278
|
var init_swift_binary_modules = __esm({
|
|
97195
97279
|
"src/swift-binary-modules.ts"() {
|
|
97196
97280
|
"use strict";
|
|
97197
|
-
|
|
97281
|
+
import_node_crypto56 = require("node:crypto");
|
|
97198
97282
|
import_node_fs96 = __toESM(require("node:fs"), 1);
|
|
97199
97283
|
import_node_path97 = __toESM(require("node:path"), 1);
|
|
97200
97284
|
init_home_paths();
|
|
@@ -97204,11 +97288,11 @@ var init_swift_binary_modules = __esm({
|
|
|
97204
97288
|
});
|
|
97205
97289
|
|
|
97206
97290
|
// src/swift-coverage/provenance.ts
|
|
97207
|
-
var
|
|
97291
|
+
var import_node_crypto57, import_node_fs97, import_node_path98, swiftCoverageProvenance;
|
|
97208
97292
|
var init_provenance = __esm({
|
|
97209
97293
|
"src/swift-coverage/provenance.ts"() {
|
|
97210
97294
|
"use strict";
|
|
97211
|
-
|
|
97295
|
+
import_node_crypto57 = require("node:crypto");
|
|
97212
97296
|
import_node_fs97 = require("node:fs");
|
|
97213
97297
|
import_node_path98 = require("node:path");
|
|
97214
97298
|
swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"d6a3228567a46c6d5280895383093889d9b868958a117881061bdd74729a225f","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"facdbeb9de6bb12da4ab4954553edfaadd0e486f1181443138be70c3d8396236","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"523fdfffc0cff95c8df7beeca437622a07d4fd666f0bb22b0ff67d14c42a7b10","swift-package.ts":"05c6cf101fbc944f6684a70db0a9c5aede846b2f0482a6b4a5a0abed737d4658","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"32bf10d6f3396dd1a20ff6d415499a5990ec2550c63306fd9ef071bdf4a58f1e","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"c72b724fc497e4cf603c355f86eb3c07c929ad299758cffbc6ff88ed241654c6","xcode-project.ts":"e30510099ee19d34de62d8ae859df53f77594a4ab105fdb5bcd7e005ec9689ca","xcode-target-members.ts":"96f6a9f5567a4fbd9806252229b35b9a451a112b20f70f8c20189ffd428815fd","xcode-json-project.ts":"df6d6db28e0c8cfdf1f480e1e32d35f12c9cf1936642d5dda923889fb18a8fd6","openstep-plist.ts":"da11f86885ef1e25979ad989f332195c113c4b7a43f108e8d36646973430b81b"}') : swiftCoverageSourceDigests((0, import_node_path98.join)(__sootsim_import_meta_dirname, ".."));
|
|
@@ -98305,16 +98389,16 @@ function assetSymbolText(plan, root) {
|
|
|
98305
98389
|
if (source.status === "unknown") throw new Error(source.reason);
|
|
98306
98390
|
return source.text;
|
|
98307
98391
|
}
|
|
98308
|
-
var
|
|
98392
|
+
var import_node_crypto58, import_node_fs99, import_node_path100, sha2562, unprovenAssetSettings, assetSymbolSettingKeys, provenOtherAssetFlags, symbolTexts;
|
|
98309
98393
|
var init_xcode_assets = __esm({
|
|
98310
98394
|
"src/swift-coverage/xcode-assets.ts"() {
|
|
98311
98395
|
"use strict";
|
|
98312
|
-
|
|
98396
|
+
import_node_crypto58 = require("node:crypto");
|
|
98313
98397
|
import_node_fs99 = require("node:fs");
|
|
98314
98398
|
import_node_path100 = require("node:path");
|
|
98315
98399
|
init_provenance();
|
|
98316
98400
|
init_xcode_asset_symbols();
|
|
98317
|
-
sha2562 = (bytes) => (0,
|
|
98401
|
+
sha2562 = (bytes) => (0, import_node_crypto58.createHash)("sha256").update(bytes).digest("hex");
|
|
98318
98402
|
unprovenAssetSettings = [
|
|
98319
98403
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_FRAMEWORKS",
|
|
98320
98404
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_WARNINGS",
|
|
@@ -98910,7 +98994,7 @@ function normalizedEnums(input) {
|
|
|
98910
98994
|
}
|
|
98911
98995
|
function localizationIdentifier(field2, key2) {
|
|
98912
98996
|
const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
98913
|
-
const digest3 = (0,
|
|
98997
|
+
const digest3 = (0, import_node_crypto59.createHash)("sha256").update(JSON.stringify([...field2, key2])).digest();
|
|
98914
98998
|
return Array.from(
|
|
98915
98999
|
digest3.subarray(0, 6),
|
|
98916
99000
|
(byte) => alphabet[byte % alphabet.length]
|
|
@@ -99235,12 +99319,12 @@ function writeIntentDefinition(input, prefix) {
|
|
|
99235
99319
|
lines.push("</plist>", "");
|
|
99236
99320
|
return lines.join("\n");
|
|
99237
99321
|
}
|
|
99238
|
-
var import_strict4,
|
|
99322
|
+
var import_strict4, import_node_crypto59, typeMetadata, initializeMetadata, widgetArraySizes, defaultReasonMessages;
|
|
99239
99323
|
var init_metadata = __esm({
|
|
99240
99324
|
"src/intent-definition/metadata.ts"() {
|
|
99241
99325
|
"use strict";
|
|
99242
99326
|
import_strict4 = __toESM(require("node:assert/strict"), 1);
|
|
99243
|
-
|
|
99327
|
+
import_node_crypto59 = require("node:crypto");
|
|
99244
99328
|
init_fields();
|
|
99245
99329
|
init_hash_input();
|
|
99246
99330
|
init_siphash();
|
|
@@ -99949,7 +100033,7 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
|
|
|
99949
100033
|
if (prefix) identifier(prefix);
|
|
99950
100034
|
if (module2) identifier(module2);
|
|
99951
100035
|
const source = import_node_fs100.default.readFileSync(definition2);
|
|
99952
|
-
const key2 = (0,
|
|
100036
|
+
const key2 = (0, import_node_crypto60.createHash)("sha256").update(
|
|
99953
100037
|
JSON.stringify([intentCompilerRevision, definition2, prefix, language, module2])
|
|
99954
100038
|
).update("\0").update(source).digest("hex");
|
|
99955
100039
|
const cache = import_node_path101.default.join(derivedDirectory, "IntentDefinitions");
|
|
@@ -99989,11 +100073,11 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
|
|
|
99989
100073
|
import_node_fs100.default.rmSync(stage, { recursive: true, force: true });
|
|
99990
100074
|
}
|
|
99991
100075
|
}
|
|
99992
|
-
var
|
|
100076
|
+
var import_node_crypto60, import_node_fs100, import_node_path101, intentCompilerRevision;
|
|
99993
100077
|
var init_xcode_intents = __esm({
|
|
99994
100078
|
"src/xcode-intents.ts"() {
|
|
99995
100079
|
"use strict";
|
|
99996
|
-
|
|
100080
|
+
import_node_crypto60 = require("node:crypto");
|
|
99997
100081
|
import_node_fs100 = __toESM(require("node:fs"), 1);
|
|
99998
100082
|
import_node_path101 = __toESM(require("node:path"), 1);
|
|
99999
100083
|
init_fields();
|
|
@@ -100695,7 +100779,7 @@ function loadProject(xcodeproj) {
|
|
|
100695
100779
|
if (!projectFile)
|
|
100696
100780
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
100697
100781
|
const source = import_node_fs101.default.readFileSync(projectFile, "utf8");
|
|
100698
|
-
const digest3 = (0,
|
|
100782
|
+
const digest3 = (0, import_node_crypto61.createHash)("sha256").update(source).digest("hex");
|
|
100699
100783
|
const cached5 = loaded3.get(projectFile);
|
|
100700
100784
|
if (cached5?.digest === digest3) return cached5.project;
|
|
100701
100785
|
const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
|
|
@@ -100747,7 +100831,7 @@ function xcodeInstallationIdentity() {
|
|
|
100747
100831
|
if (!selected) return null;
|
|
100748
100832
|
const directory2 = import_node_path103.default.extname(selected) === ".app" ? import_node_path103.default.join(selected, "Contents", "Developer") : selected;
|
|
100749
100833
|
const versionFile = `${directory2}/../version.plist`;
|
|
100750
|
-
const version2 = import_node_fs101.default.existsSync(versionFile) ? (0,
|
|
100834
|
+
const version2 = import_node_fs101.default.existsSync(versionFile) ? (0, import_node_crypto61.createHash)("sha256").update(import_node_fs101.default.readFileSync(versionFile)).digest("hex") : null;
|
|
100751
100835
|
return { directory: directory2, version: version2 };
|
|
100752
100836
|
}
|
|
100753
100837
|
function defaultConfiguration(project2) {
|
|
@@ -101215,7 +101299,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101215
101299
|
);
|
|
101216
101300
|
});
|
|
101217
101301
|
}
|
|
101218
|
-
const signature2 = (0,
|
|
101302
|
+
const signature2 = (0, import_node_crypto61.createHash)("sha256").update(
|
|
101219
101303
|
JSON.stringify([phase, [...settingKeys].map((key3) => [key3, settings(key3)])])
|
|
101220
101304
|
);
|
|
101221
101305
|
for (const file of inputFiles) {
|
|
@@ -101370,7 +101454,7 @@ ${output}`
|
|
|
101370
101454
|
const inputs2 = JSON.stringify([
|
|
101371
101455
|
1,
|
|
101372
101456
|
args,
|
|
101373
|
-
(0,
|
|
101457
|
+
(0, import_node_crypto61.createHash)("sha256").update(import_node_fs101.default.readFileSync(file)).digest("hex")
|
|
101374
101458
|
]);
|
|
101375
101459
|
const developer = settings("DEVELOPER_DIR");
|
|
101376
101460
|
const cached5 = import_node_fs101.default.existsSync(output) && import_node_fs101.default.existsSync(stamp) ? import_node_fs101.default.readFileSync(stamp, "utf8").split("\n") : [];
|
|
@@ -102873,12 +102957,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102873
102957
|
cocoapods
|
|
102874
102958
|
};
|
|
102875
102959
|
}
|
|
102876
|
-
var import_node_child_process49,
|
|
102960
|
+
var import_node_child_process49, import_node_crypto61, import_node_fs101, import_node_module9, import_node_path103, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, APP_EXTENSION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory3, loaded3, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
|
|
102877
102961
|
var init_xcode_project = __esm({
|
|
102878
102962
|
"src/xcode-project.ts"() {
|
|
102879
102963
|
"use strict";
|
|
102880
102964
|
import_node_child_process49 = require("node:child_process");
|
|
102881
|
-
|
|
102965
|
+
import_node_crypto61 = require("node:crypto");
|
|
102882
102966
|
import_node_fs101 = __toESM(require("node:fs"), 1);
|
|
102883
102967
|
import_node_module9 = require("node:module");
|
|
102884
102968
|
import_node_path103 = __toESM(require("node:path"), 1);
|
|
@@ -103070,8 +103154,8 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
103070
103154
|
);
|
|
103071
103155
|
const appRelative = import_node_path104.default.relative(root, app);
|
|
103072
103156
|
const manifest = JSON.parse(import_node_fs102.default.readFileSync(import_node_path104.default.join(root, "package.json"), "utf8"));
|
|
103073
|
-
const hash = (0,
|
|
103074
|
-
const native = (0,
|
|
103157
|
+
const hash = (0, import_node_crypto62.createHash)("sha256");
|
|
103158
|
+
const native = (0, import_node_crypto62.createHash)("sha256");
|
|
103075
103159
|
const nativeDirectories = localPackageDirectories(root, app);
|
|
103076
103160
|
const versionFree = new Set(
|
|
103077
103161
|
nativeDirectories.filter((directory2) => directory2 !== appRelative && directory2 !== "").filter(
|
|
@@ -103155,7 +103239,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
103155
103239
|
unread.slice(start, start + 32).map(async ({ file, content }) => {
|
|
103156
103240
|
const bytes = await import_node_fs102.default.promises.readFile(file);
|
|
103157
103241
|
content.size = bytes.length;
|
|
103158
|
-
content.digest = (0,
|
|
103242
|
+
content.digest = (0, import_node_crypto62.createHash)("sha256").update(bytes).digest("hex");
|
|
103159
103243
|
fileDigests.set(file, content);
|
|
103160
103244
|
})
|
|
103161
103245
|
);
|
|
@@ -103705,7 +103789,7 @@ function stageCachedQuickCryptoOpenSsl(app) {
|
|
|
103705
103789
|
const sha2565 = /openssl_sha256\s*=\s*"([0-9a-f]{64})"/.exec(podspec)?.[1];
|
|
103706
103790
|
if (!sha2565) return;
|
|
103707
103791
|
const archive = import_node_path104.default.join(cacheDir(), "pod-archives", `${sha2565}.zip`);
|
|
103708
|
-
if (!import_node_fs102.default.existsSync(archive) || (0,
|
|
103792
|
+
if (!import_node_fs102.default.existsSync(archive) || (0, import_node_crypto62.createHash)("sha256").update(import_node_fs102.default.readFileSync(archive)).digest("hex") !== sha2565)
|
|
103709
103793
|
return;
|
|
103710
103794
|
import_node_fs102.default.rmSync(opensslDir, { recursive: true, force: true });
|
|
103711
103795
|
import_node_fs102.default.mkdirSync(opensslDir, { recursive: true });
|
|
@@ -103743,12 +103827,12 @@ ${failedOutputLine(command, cwd, bytes)}`
|
|
|
103743
103827
|
});
|
|
103744
103828
|
});
|
|
103745
103829
|
}
|
|
103746
|
-
var import_node_child_process50,
|
|
103830
|
+
var import_node_child_process50, import_node_crypto62, import_node_fs102, import_node_module10, import_node_os21, import_node_path104, import_node_util13, isolatedGitEnv, NATIVE_CONFIG_FILE, NATIVE_SOURCE_FILE2, fileDigests, NATIVE_PACKAGE_ENTRY, hashing, KEPT_WORKSPACES, WORKSPACE_GRACE_MS, ABANDONED_WORKSPACE_MS, RETIRED_PREFIX2, preparing, watches, current, CLONE_ENTRIES;
|
|
103747
103831
|
var init_expo_native_workspace = __esm({
|
|
103748
103832
|
"src/expo-native-workspace.ts"() {
|
|
103749
103833
|
"use strict";
|
|
103750
103834
|
import_node_child_process50 = require("node:child_process");
|
|
103751
|
-
|
|
103835
|
+
import_node_crypto62 = require("node:crypto");
|
|
103752
103836
|
import_node_fs102 = __toESM(require("node:fs"), 1);
|
|
103753
103837
|
import_node_module10 = require("node:module");
|
|
103754
103838
|
import_node_os21 = __toESM(require("node:os"), 1);
|
|
@@ -103821,7 +103905,7 @@ function run() {
|
|
|
103821
103905
|
|
|
103822
103906
|
// src/expo-discovery-cache.ts
|
|
103823
103907
|
function peachPin() {
|
|
103824
|
-
return (0,
|
|
103908
|
+
return (0, import_node_crypto63.createHash)("sha256").update(
|
|
103825
103909
|
`${FORMAT}\0${expoNativeCompilerDigestValue()}\0${swiftNativePin().distribution.id}\0`
|
|
103826
103910
|
).update(JSON.stringify([...EXPO_EAGER_NATIVE_VIEWS])).update(JSON.stringify([...peachAnsweredNativePackages()].sort())).digest("hex");
|
|
103827
103911
|
}
|
|
@@ -103835,7 +103919,7 @@ function stable(value) {
|
|
|
103835
103919
|
}
|
|
103836
103920
|
async function expoDiscoveryKey(options2) {
|
|
103837
103921
|
const { root, hash } = await hashExpoWorkspace(options2.appRoot, options2.signal);
|
|
103838
|
-
const key2 = (0,
|
|
103922
|
+
const key2 = (0, import_node_crypto63.createHash)("sha256").update(`${peachPin()}\0${hash}\0`).update(`${stable(JSON.parse(options2.searchText))}\0`).update(`${stable(options2.configuration)}\0`).update(stable(JSON.parse(options2.resolveText))).digest("hex");
|
|
103839
103923
|
return { key: key2, root };
|
|
103840
103924
|
}
|
|
103841
103925
|
function expoDiscoveryCacheDir() {
|
|
@@ -103906,7 +103990,7 @@ function readExpoDiscovery(key2) {
|
|
|
103906
103990
|
if (typeof parsed2.archive !== "string" || !isDigest(parsed2.archive)) return void 0;
|
|
103907
103991
|
const archive = import_node_path105.default.join(expoDiscoveryCacheDir(), "blobs", `${parsed2.archive}.zst`);
|
|
103908
103992
|
const bytes = import_node_fs103.default.readFileSync(archive);
|
|
103909
|
-
if ((0,
|
|
103993
|
+
if ((0, import_node_crypto63.createHash)("sha256").update(bytes).digest("hex") !== parsed2.archive)
|
|
103910
103994
|
return void 0;
|
|
103911
103995
|
const bodies = (0, import_node_zlib7.zstdDecompressSync)(bytes);
|
|
103912
103996
|
const decoded = /* @__PURE__ */ new Map();
|
|
@@ -103980,7 +104064,7 @@ function stampedFileHash(file) {
|
|
|
103980
104064
|
const stamp = [stat2.dev, stat2.ino, stat2.size, stat2.mtimeNs, stat2.ctimeNs].join(":");
|
|
103981
104065
|
const cached5 = fileHashes.get(file);
|
|
103982
104066
|
if (cached5?.stamp === stamp) return cached5.checksum;
|
|
103983
|
-
const checksum = (0,
|
|
104067
|
+
const checksum = (0, import_node_crypto63.createHash)("sha256").update(import_node_fs103.default.readFileSync(file)).digest("hex");
|
|
103984
104068
|
fileHashes.set(file, { stamp, checksum });
|
|
103985
104069
|
fileHashesChanged = true;
|
|
103986
104070
|
return checksum;
|
|
@@ -103989,7 +104073,7 @@ function saveFileHashes() {
|
|
|
103989
104073
|
if (!fileHashesChanged) return;
|
|
103990
104074
|
fileHashesChanged = false;
|
|
103991
104075
|
const target = fileHashesPath();
|
|
103992
|
-
const temporary = `${target}.${process.pid}.${(0,
|
|
104076
|
+
const temporary = `${target}.${process.pid}.${(0, import_node_crypto63.randomUUID)()}.tmp`;
|
|
103993
104077
|
try {
|
|
103994
104078
|
import_node_fs103.default.mkdirSync(import_node_path105.default.dirname(target), { recursive: true });
|
|
103995
104079
|
import_node_fs103.default.writeFileSync(
|
|
@@ -104044,7 +104128,7 @@ function frameworkDigest(directory2, signal) {
|
|
|
104044
104128
|
if (target !== root && !target.startsWith(`${root}${import_node_path105.default.sep}`))
|
|
104045
104129
|
throw new Error(`framework link escapes its tree: ${relative7}`);
|
|
104046
104130
|
}
|
|
104047
|
-
return (0,
|
|
104131
|
+
return (0, import_node_crypto63.createHash)("sha256").update(JSON.stringify([...entries2])).digest("hex");
|
|
104048
104132
|
}
|
|
104049
104133
|
function rewritePreparedPaths(options2) {
|
|
104050
104134
|
const { units, sourceRoot, preparedRoot, signal } = options2;
|
|
@@ -104065,7 +104149,7 @@ function rewritePreparedPaths(options2) {
|
|
|
104065
104149
|
return null;
|
|
104066
104150
|
}
|
|
104067
104151
|
if (!preparedBytes.equals(sourceBytes)) return null;
|
|
104068
|
-
dependencies[sourceFile] = (0,
|
|
104152
|
+
dependencies[sourceFile] = (0, import_node_crypto63.createHash)("sha256").update(sourceBytes).digest("hex");
|
|
104069
104153
|
verifiedFiles.set(preparedFile, sourceFile);
|
|
104070
104154
|
return sourceFile;
|
|
104071
104155
|
};
|
|
@@ -104142,7 +104226,7 @@ function rewritePreparedPaths(options2) {
|
|
|
104142
104226
|
portableDir = import_node_path105.default.join(parent, import_node_path105.default.basename(dir));
|
|
104143
104227
|
if (!import_node_fs103.default.existsSync(portableDir)) {
|
|
104144
104228
|
import_node_fs103.default.mkdirSync(parent, { recursive: true });
|
|
104145
|
-
const tmp = import_node_path105.default.join(parent, `.${process.pid}.${(0,
|
|
104229
|
+
const tmp = import_node_path105.default.join(parent, `.${process.pid}.${(0, import_node_crypto63.randomUUID)()}.tmp`);
|
|
104146
104230
|
try {
|
|
104147
104231
|
import_node_fs103.default.cpSync(dir, tmp, { recursive: true, verbatimSymlinks: true });
|
|
104148
104232
|
if (frameworkDigest(tmp, signal) !== preparedDigest)
|
|
@@ -104171,7 +104255,7 @@ function writeExpoDiscovery(options2) {
|
|
|
104171
104255
|
try {
|
|
104172
104256
|
const dir = expoDiscoveryCacheDir();
|
|
104173
104257
|
import_node_fs103.default.mkdirSync(dir, { recursive: true });
|
|
104174
|
-
const tmp = import_node_path105.default.join(dir, `.${options2.key}.${process.pid}.${(0,
|
|
104258
|
+
const tmp = import_node_path105.default.join(dir, `.${options2.key}.${process.pid}.${(0, import_node_crypto63.randomUUID)()}.tmp`);
|
|
104175
104259
|
if (options2.units === null) {
|
|
104176
104260
|
import_node_fs103.default.writeFileSync(
|
|
104177
104261
|
tmp,
|
|
@@ -104234,8 +104318,8 @@ function writeExpoDiscovery(options2) {
|
|
|
104234
104318
|
}
|
|
104235
104319
|
);
|
|
104236
104320
|
const contents2 = (0, import_node_zlib7.zstdCompressSync)(Buffer.concat(chunks, size2));
|
|
104237
|
-
const archive = (0,
|
|
104238
|
-
const temporary = import_node_path105.default.join(blobDir, "." + (0,
|
|
104321
|
+
const archive = (0, import_node_crypto63.createHash)("sha256").update(contents2).digest("hex");
|
|
104322
|
+
const temporary = import_node_path105.default.join(blobDir, "." + (0, import_node_crypto63.randomUUID)() + ".tmp");
|
|
104239
104323
|
try {
|
|
104240
104324
|
import_node_fs103.default.writeFileSync(temporary, contents2);
|
|
104241
104325
|
import_node_fs103.default.renameSync(temporary, import_node_path105.default.join(blobDir, `${archive}.zst`));
|
|
@@ -104262,11 +104346,11 @@ function writeExpoDiscovery(options2) {
|
|
|
104262
104346
|
return error instanceof Error ? error.message : String(error);
|
|
104263
104347
|
}
|
|
104264
104348
|
}
|
|
104265
|
-
var
|
|
104349
|
+
var import_node_crypto63, import_node_fs103, import_node_path105, import_node_zlib7, FORMAT, EXPIRY_MS, ORPHAN_TEMPORARY_MS, strings2, stringRecord, isDigest, digestRecord, isBodyOffset, isBodyOffsets, sourceLocationLine, fileHashes, fileHashesLoaded, fileHashesChanged, MISSING_TREE;
|
|
104266
104350
|
var init_expo_discovery_cache = __esm({
|
|
104267
104351
|
"src/expo-discovery-cache.ts"() {
|
|
104268
104352
|
"use strict";
|
|
104269
|
-
|
|
104353
|
+
import_node_crypto63 = require("node:crypto");
|
|
104270
104354
|
import_node_fs103 = __toESM(require("node:fs"), 1);
|
|
104271
104355
|
import_node_path105 = __toESM(require("node:path"), 1);
|
|
104272
104356
|
import_node_zlib7 = require("node:zlib");
|
|
@@ -105342,7 +105426,7 @@ function hashPackageTree(root, options2) {
|
|
|
105342
105426
|
}
|
|
105343
105427
|
};
|
|
105344
105428
|
walk4(root, "");
|
|
105345
|
-
const hash = (0,
|
|
105429
|
+
const hash = (0, import_node_crypto64.createHash)("sha256");
|
|
105346
105430
|
return (async () => {
|
|
105347
105431
|
for (let start = 0; start < files2.length; start += READ_AHEAD) {
|
|
105348
105432
|
const batch = files2.slice(start, start + READ_AHEAD);
|
|
@@ -105363,11 +105447,11 @@ function nativePackageTreeDigest(root) {
|
|
|
105363
105447
|
skipFile: (name3) => name3.endsWith(".d.ts") || name3.endsWith(".d.ts.map") || name3.endsWith(".js.map")
|
|
105364
105448
|
});
|
|
105365
105449
|
}
|
|
105366
|
-
var
|
|
105450
|
+
var import_node_crypto64, import_node_fs106, import_promises12, import_node_path108, READ_AHEAD;
|
|
105367
105451
|
var init_package_tree_digest = __esm({
|
|
105368
105452
|
"src/package-tree-digest.ts"() {
|
|
105369
105453
|
"use strict";
|
|
105370
|
-
|
|
105454
|
+
import_node_crypto64 = require("node:crypto");
|
|
105371
105455
|
import_node_fs106 = require("node:fs");
|
|
105372
105456
|
import_promises12 = require("node:fs/promises");
|
|
105373
105457
|
import_node_path108 = require("node:path");
|
|
@@ -105447,7 +105531,7 @@ async function expoNativeInputs(appRoot) {
|
|
|
105447
105531
|
"swift-pin": JSON.stringify(swiftNativePin()),
|
|
105448
105532
|
answered: JSON.stringify([...peachAnsweredNativePackages()].sort()),
|
|
105449
105533
|
"pods-environment": JSON.stringify(reactNativePodsEnvironment()),
|
|
105450
|
-
fingerprint: (0,
|
|
105534
|
+
fingerprint: (0, import_node_crypto65.createHash)("sha256").update(lines.sort().join("\n")).digest("hex")
|
|
105451
105535
|
},
|
|
105452
105536
|
packages
|
|
105453
105537
|
};
|
|
@@ -105565,7 +105649,7 @@ async function managedExpoNativeAppIdentity(appRoot, iosTarget) {
|
|
|
105565
105649
|
}
|
|
105566
105650
|
function servedExpoSwift(appRoot, entry, app) {
|
|
105567
105651
|
if (!entry.expoSwift) return null;
|
|
105568
|
-
const rootId = `${(0,
|
|
105652
|
+
const rootId = `${(0, import_node_crypto65.createHash)("sha256").update(import_node_fs107.default.realpathSync(appRoot)).digest("hex")}/Expo`;
|
|
105569
105653
|
if (app.infoPlist === null) throw new Error("the prebuilt app target has no Info.plist");
|
|
105570
105654
|
const installed2 = installedInfoPlist(app.infoPlist, entry.infoPlist);
|
|
105571
105655
|
const infoPlist2 = Buffer.from(installed2).toString("base64");
|
|
@@ -105593,11 +105677,11 @@ async function prebuiltExpoSwiftResult(appRoot, entry, signal) {
|
|
|
105593
105677
|
await prebuiltAppTarget(appRoot, signal, "installed")
|
|
105594
105678
|
);
|
|
105595
105679
|
}
|
|
105596
|
-
var
|
|
105680
|
+
var import_node_crypto65, import_node_fs107, import_node_module13, import_node_path109, import_node_util14, EXPO_NATIVE_ENTRY_NAME, IDENTITY_SOURCE_SKIPS, expoNativeEntryUrl, isStringRecord, isPlistArray, published, lookups, answers;
|
|
105597
105681
|
var init_expo_native_prebuilt = __esm({
|
|
105598
105682
|
"src/expo-native-prebuilt.ts"() {
|
|
105599
105683
|
"use strict";
|
|
105600
|
-
|
|
105684
|
+
import_node_crypto65 = require("node:crypto");
|
|
105601
105685
|
import_node_fs107 = __toESM(require("node:fs"), 1);
|
|
105602
105686
|
import_node_module13 = require("node:module");
|
|
105603
105687
|
import_node_path109 = __toESM(require("node:path"), 1);
|
|
@@ -105649,7 +105733,7 @@ function watchNativeInputs(root) {
|
|
|
105649
105733
|
(0, import_node_timers2.clearTimeout)(expiry);
|
|
105650
105734
|
for (const watcher of watchers) watcher.close();
|
|
105651
105735
|
}
|
|
105652
|
-
const inputs2 = { expiry, revision: (0,
|
|
105736
|
+
const inputs2 = { expiry, revision: (0, import_node_crypto66.randomUUID)() };
|
|
105653
105737
|
const watch4 = (directory2, recursive, name3) => {
|
|
105654
105738
|
const watcher = import_node_fs108.default.watch(
|
|
105655
105739
|
directory2,
|
|
@@ -105694,11 +105778,11 @@ function nativeInputRevision(root) {
|
|
|
105694
105778
|
const inputs2 = watchNativeInputs(root);
|
|
105695
105779
|
if (inputs2) return JSON.stringify([inputs2.revision, resolveActiveRuntimeRoot()]);
|
|
105696
105780
|
}
|
|
105697
|
-
var
|
|
105781
|
+
var import_node_crypto66, import_node_fs108, import_node_path110, import_node_timers2, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
|
|
105698
105782
|
var init_native_preparation = __esm({
|
|
105699
105783
|
"src/native-preparation.ts"() {
|
|
105700
105784
|
"use strict";
|
|
105701
|
-
|
|
105785
|
+
import_node_crypto66 = require("node:crypto");
|
|
105702
105786
|
import_node_fs108 = __toESM(require("node:fs"), 1);
|
|
105703
105787
|
import_node_path110 = __toESM(require("node:path"), 1);
|
|
105704
105788
|
import_node_timers2 = require("node:timers");
|
|
@@ -105878,7 +105962,7 @@ function nativeStaticLibraryEntry(recipe2, compiler, sdk2, distribution) {
|
|
|
105878
105962
|
return { name: recipe2.name, inputs: inputs2, key: nativeEntryKey(inputs2) };
|
|
105879
105963
|
}
|
|
105880
105964
|
function nativeStaticLibraryRecipe(bytes) {
|
|
105881
|
-
const digest3 = (0,
|
|
105965
|
+
const digest3 = (0, import_node_crypto67.createHash)("sha256").update(bytes).digest("hex");
|
|
105882
105966
|
return NATIVE_STATIC_LIBRARY_RECIPES.find((item) => item.nativeSha256 === digest3);
|
|
105883
105967
|
}
|
|
105884
105968
|
function nativeStaticLibrary(file, recipe2, moduleRoot) {
|
|
@@ -105921,7 +106005,7 @@ function isRustSymbol(name3, demangled) {
|
|
|
105921
106005
|
function rustStaticLibrary(file, moduleRoot) {
|
|
105922
106006
|
const toolchain = swiftModuleToolchain(moduleRoot);
|
|
105923
106007
|
const bytes = import_node_fs110.default.readFileSync(file);
|
|
105924
|
-
const key2 = (0,
|
|
106008
|
+
const key2 = (0, import_node_crypto67.createHash)("sha256").update("rust-c-abi-v4\0").update(toolchain.release).update("\0").update(bytes).digest("hex");
|
|
105925
106009
|
const directory2 = import_node_path112.default.join(cacheDir(), "native-archives", key2);
|
|
105926
106010
|
const archive = import_node_path112.default.join(directory2, "library.a");
|
|
105927
106011
|
if (import_node_fs110.default.existsSync(archive)) return archive;
|
|
@@ -105950,7 +106034,7 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
105950
106034
|
const members2 = readArMembers(bytes, true);
|
|
105951
106035
|
const seen = /* @__PURE__ */ new Set();
|
|
105952
106036
|
const unique2 = members2.filter(({ name: name3, bytes: bytes2 }) => {
|
|
105953
|
-
const identity2 = name3 + "\0" + (0,
|
|
106037
|
+
const identity2 = name3 + "\0" + (0, import_node_crypto67.createHash)("sha256").update(bytes2).digest("hex");
|
|
105954
106038
|
if (seen.has(identity2)) return false;
|
|
105955
106039
|
seen.add(identity2);
|
|
105956
106040
|
return true;
|
|
@@ -105997,14 +106081,14 @@ function rustStaticLibrary(file, moduleRoot) {
|
|
|
105997
106081
|
function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
105998
106082
|
if (files2.length === 1) return files2[0];
|
|
105999
106083
|
const toolchain = swiftModuleToolchain(moduleRoot);
|
|
106000
|
-
const hash = (0,
|
|
106084
|
+
const hash = (0, import_node_crypto67.createHash)("sha256").update(toolchain.release);
|
|
106001
106085
|
for (const file of files2)
|
|
106002
106086
|
hash.update("\0").update(import_node_path112.default.basename(file)).update("\0").update(import_node_fs110.default.readFileSync(file));
|
|
106003
106087
|
const directory2 = import_node_path112.default.join(cacheDir(), "native-archives", hash.digest("hex"));
|
|
106004
106088
|
const archive = import_node_path112.default.join(directory2, "combined.a");
|
|
106005
106089
|
if (import_node_fs110.default.existsSync(archive)) return archive;
|
|
106006
106090
|
import_node_fs110.default.mkdirSync(directory2, { recursive: true });
|
|
106007
|
-
const temporary = import_node_path112.default.join(directory2, `combined-${(0,
|
|
106091
|
+
const temporary = import_node_path112.default.join(directory2, `combined-${(0, import_node_crypto67.randomUUID)()}.a`);
|
|
106008
106092
|
try {
|
|
106009
106093
|
(0, import_node_child_process52.execFileSync)(import_node_path112.default.join(toolchain.toolchainBin, "llvm-ar"), [
|
|
106010
106094
|
"qcsDL",
|
|
@@ -106017,12 +106101,12 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
|
|
|
106017
106101
|
}
|
|
106018
106102
|
return archive;
|
|
106019
106103
|
}
|
|
106020
|
-
var import_node_child_process52,
|
|
106104
|
+
var import_node_child_process52, import_node_crypto67, import_node_fs110, import_node_path112, WEBRTC_NATIVE_FRAMEWORK, SIGNAL_WEBRTC_NATIVE_FRAMEWORK, WEBRTC_NATIVE_FRAMEWORK_RECIPES, NATIVE_STATIC_LIBRARY_RECIPES;
|
|
106021
106105
|
var init_native_static_libraries = __esm({
|
|
106022
106106
|
"src/native-static-libraries.ts"() {
|
|
106023
106107
|
"use strict";
|
|
106024
106108
|
import_node_child_process52 = require("node:child_process");
|
|
106025
|
-
|
|
106109
|
+
import_node_crypto67 = require("node:crypto");
|
|
106026
106110
|
import_node_fs110 = __toESM(require("node:fs"), 1);
|
|
106027
106111
|
import_node_path112 = __toESM(require("node:path"), 1);
|
|
106028
106112
|
init_home_paths();
|
|
@@ -106627,13 +106711,13 @@ var init_swift_wasm64_wamr = __esm({
|
|
|
106627
106711
|
|
|
106628
106712
|
// src/swift-wasm64-native-source.ts
|
|
106629
106713
|
function deriveSource(file, bytes, backport) {
|
|
106630
|
-
if (!backport || (0,
|
|
106714
|
+
if (!backport || (0, import_node_crypto68.createHash)("sha256").update(bytes).digest("hex") !== backport.originalSha256)
|
|
106631
106715
|
return null;
|
|
106632
106716
|
const source = bytes.toString("utf8");
|
|
106633
106717
|
const derived = Buffer.from(
|
|
106634
106718
|
"rewrite" in backport ? backport.rewrite(source) : source.replace(backport.before, backport.after)
|
|
106635
106719
|
);
|
|
106636
|
-
if ((0,
|
|
106720
|
+
if ((0, import_node_crypto68.createHash)("sha256").update(derived).digest("hex") !== backport.derivedSha256)
|
|
106637
106721
|
throw new Error(`Native source derivation differs: ${file}`);
|
|
106638
106722
|
return {
|
|
106639
106723
|
bytes: derived,
|
|
@@ -106652,11 +106736,11 @@ function deriveWasm64NativeSource(file, bytes) {
|
|
|
106652
106736
|
sourceDerivations.get(name3) ?? headerDerivations.get(name3)
|
|
106653
106737
|
);
|
|
106654
106738
|
}
|
|
106655
|
-
var
|
|
106739
|
+
var import_node_crypto68, import_node_path114, webrtcUnknownArchitecture, boringsslWordSize2, wamrCommit, headerDerivations, sourceDerivations;
|
|
106656
106740
|
var init_swift_wasm64_native_source = __esm({
|
|
106657
106741
|
"src/swift-wasm64-native-source.ts"() {
|
|
106658
106742
|
"use strict";
|
|
106659
|
-
|
|
106743
|
+
import_node_crypto68 = require("node:crypto");
|
|
106660
106744
|
import_node_path114 = __toESM(require("node:path"), 1);
|
|
106661
106745
|
init_swift_wasm64_wamr();
|
|
106662
106746
|
init_swiftWasm64ConfigContract();
|
|
@@ -107116,7 +107200,7 @@ var init_genrule_library_builds = __esm({
|
|
|
107116
107200
|
function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
107117
107201
|
const distribution = swiftDistributionAt(moduleRoot);
|
|
107118
107202
|
const sdk2 = swiftSdkPaths(moduleRoot, toolchainBin);
|
|
107119
|
-
const identity2 = (0,
|
|
107203
|
+
const identity2 = (0, import_node_crypto69.createHash)("sha256").update(
|
|
107120
107204
|
JSON.stringify([
|
|
107121
107205
|
distribution?.id,
|
|
107122
107206
|
distribution?.link,
|
|
@@ -107142,7 +107226,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
|
107142
107226
|
for (const alias of product.frameworkAliases) {
|
|
107143
107227
|
if (alias.wasmSdkId !== distribution.wasmSdkId || alias.wasmSdkChecksum !== distribution.wasmSdkChecksum)
|
|
107144
107228
|
throw new Error(`framework SDK identity differs for ${alias.name}`);
|
|
107145
|
-
if ((0,
|
|
107229
|
+
if ((0, import_node_crypto69.createHash)("sha256").update(import_node_fs113.default.readFileSync(import_node_path116.default.join(moduleRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
|
|
107146
107230
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
107147
107231
|
const selected = /* @__PURE__ */ new Set();
|
|
107148
107232
|
const reach = (name3) => {
|
|
@@ -107183,7 +107267,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
|
|
|
107183
107267
|
for (const alias of owner.frameworkAliases) {
|
|
107184
107268
|
if (frameworkResponses[alias.name])
|
|
107185
107269
|
throw new Error(`ambiguous declared framework ${alias.name}`);
|
|
107186
|
-
if ((0,
|
|
107270
|
+
if ((0, import_node_crypto69.createHash)("sha256").update(import_node_fs113.default.readFileSync(import_node_path116.default.join(sdkRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
|
|
107187
107271
|
throw new Error(`framework module map changed ${alias.moduleMap}`);
|
|
107188
107272
|
const file = import_node_path116.default.join(root, `${alias.name}.rsp`);
|
|
107189
107273
|
import_node_fs113.default.writeFileSync(file, aliasArtifacts.map(quote3).join("\n") + "\n");
|
|
@@ -107277,11 +107361,11 @@ exec ${shellQuote(configuration2.compiler)} "$@"
|
|
|
107277
107361
|
};
|
|
107278
107362
|
return { cc: compiler("clang"), cxx: compiler("clang++"), identity: identity2 };
|
|
107279
107363
|
}
|
|
107280
|
-
var
|
|
107364
|
+
var import_node_crypto69, import_node_fs113, import_node_path116, v7;
|
|
107281
107365
|
var init_native_framework_compiler = __esm({
|
|
107282
107366
|
"src/native-framework-compiler.ts"() {
|
|
107283
107367
|
"use strict";
|
|
107284
|
-
|
|
107368
|
+
import_node_crypto69 = require("node:crypto");
|
|
107285
107369
|
import_node_fs113 = __toESM(require("node:fs"), 1);
|
|
107286
107370
|
import_node_path116 = __toESM(require("node:path"), 1);
|
|
107287
107371
|
v7 = __toESM(require("peachsim/vendor/valibot"), 1);
|
|
@@ -107302,7 +107386,7 @@ function processAlive(pid) {
|
|
|
107302
107386
|
}
|
|
107303
107387
|
function tryAcquireNumberedLock(directory2, detail = "") {
|
|
107304
107388
|
(0, import_node_fs114.mkdirSync)(directory2, { recursive: true });
|
|
107305
|
-
const claim = (0, import_node_path117.join)(directory2, `claim-${process.pid}-${(0,
|
|
107389
|
+
const claim = (0, import_node_path117.join)(directory2, `claim-${process.pid}-${(0, import_node_crypto70.randomUUID)()}`);
|
|
107306
107390
|
for (; ; ) {
|
|
107307
107391
|
const numbers = (0, import_node_fs114.readdirSync)(directory2).filter((name3) => /^\d+$/.test(name3)).map(Number);
|
|
107308
107392
|
const top = Math.max(-1, ...numbers);
|
|
@@ -107341,11 +107425,11 @@ ${detail}` : ""}`);
|
|
|
107341
107425
|
};
|
|
107342
107426
|
}
|
|
107343
107427
|
}
|
|
107344
|
-
var
|
|
107428
|
+
var import_node_crypto70, import_node_fs114, import_node_path117, errorCode2;
|
|
107345
107429
|
var init_numbered_lock = __esm({
|
|
107346
107430
|
"src/numbered-lock.ts"() {
|
|
107347
107431
|
"use strict";
|
|
107348
|
-
|
|
107432
|
+
import_node_crypto70 = require("node:crypto");
|
|
107349
107433
|
import_node_fs114 = require("node:fs");
|
|
107350
107434
|
import_node_path117 = require("node:path");
|
|
107351
107435
|
errorCode2 = (error) => error instanceof Error && "code" in error ? error.code : void 0;
|
|
@@ -107372,7 +107456,7 @@ function llvmIdentity(toolchainBin, release) {
|
|
|
107372
107456
|
] : ["clang", "wasm-ld", "llvm-ar", "llvm-nm", "llvm-strip"].map(
|
|
107373
107457
|
(name3) => swiftFileChecksum(import_node_path118.default.join(toolchainBin, name3))
|
|
107374
107458
|
);
|
|
107375
|
-
const identity2 = (0,
|
|
107459
|
+
const identity2 = (0, import_node_crypto71.createHash)("sha256").update(JSON.stringify(components)).digest("hex");
|
|
107376
107460
|
toolIdentities.set(toolchainBin, identity2);
|
|
107377
107461
|
return identity2;
|
|
107378
107462
|
}
|
|
@@ -107380,7 +107464,7 @@ function cSdkIdentity(sysroot, resourceDir, frameworks) {
|
|
|
107380
107464
|
const key2 = JSON.stringify([sysroot, resourceDir, frameworks]);
|
|
107381
107465
|
const cached5 = sysrootIdentities.get(key2);
|
|
107382
107466
|
if (cached5) return cached5;
|
|
107383
|
-
const hash = (0,
|
|
107467
|
+
const hash = (0, import_node_crypto71.createHash)("sha256");
|
|
107384
107468
|
const add2 = (root, relative7) => {
|
|
107385
107469
|
const file = import_node_path118.default.join(root, relative7);
|
|
107386
107470
|
const stat2 = import_node_fs115.default.statSync(file, { throwIfNoEntry: false });
|
|
@@ -107415,7 +107499,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
107415
107499
|
import_node_fs115.default.readFileSync(import_node_path118.default.join(moduleRoot, SWIFT_FRAMEWORK_PRODUCT_FILE), "utf8")
|
|
107416
107500
|
)
|
|
107417
107501
|
);
|
|
107418
|
-
const hash = (0,
|
|
107502
|
+
const hash = (0, import_node_crypto71.createHash)("sha256").update(
|
|
107419
107503
|
JSON.stringify([
|
|
107420
107504
|
headers,
|
|
107421
107505
|
distribution.link,
|
|
@@ -107425,7 +107509,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
107425
107509
|
])
|
|
107426
107510
|
);
|
|
107427
107511
|
const objects = distribution.objects.map((file) => [file, distribution.files[file]]);
|
|
107428
|
-
const objectKey = (0,
|
|
107512
|
+
const objectKey = (0, import_node_crypto71.createHash)("sha256").update(JSON.stringify(objects)).digest("hex");
|
|
107429
107513
|
const cache = import_node_path118.default.join(cacheDir4, "framework-symbols-by-object", objectKey);
|
|
107430
107514
|
if (!import_node_fs115.default.existsSync(cache)) {
|
|
107431
107515
|
import_node_fs115.default.mkdirSync(import_node_path118.default.dirname(cache), { recursive: true });
|
|
@@ -107460,7 +107544,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
|
|
|
107460
107544
|
const digest3 = import_node_path118.default.join(temporary, "digest");
|
|
107461
107545
|
import_node_fs115.default.writeFileSync(
|
|
107462
107546
|
digest3,
|
|
107463
|
-
(0,
|
|
107547
|
+
(0, import_node_crypto71.createHash)("sha256").update(symbols.sort().join("\n")).digest("hex")
|
|
107464
107548
|
);
|
|
107465
107549
|
import_node_fs115.default.renameSync(digest3, cache);
|
|
107466
107550
|
} finally {
|
|
@@ -107515,7 +107599,7 @@ function buildable(declaration) {
|
|
|
107515
107599
|
return builderOf(declaration) !== null && declaration.dependencies.every(buildable);
|
|
107516
107600
|
}
|
|
107517
107601
|
function declarationInputs(declaration, builder, toolchain, dependencyKeys) {
|
|
107518
|
-
const hash = (0,
|
|
107602
|
+
const hash = (0, import_node_crypto71.createHash)("sha256");
|
|
107519
107603
|
const files2 = declaration.sources.filter(
|
|
107520
107604
|
(source) => !source.generator && !source.file.split(import_node_path118.default.sep).includes(".git")
|
|
107521
107605
|
).map((source) => import_node_path118.default.relative(declaration.packageDir, source.file));
|
|
@@ -107649,12 +107733,12 @@ function genruleArchive(declaration, library, moduleRoot) {
|
|
|
107649
107733
|
}
|
|
107650
107734
|
return combined;
|
|
107651
107735
|
}
|
|
107652
|
-
var import_node_child_process55,
|
|
107736
|
+
var import_node_child_process55, import_node_crypto71, import_node_fs115, import_node_os23, import_node_path118, v8, BUILDERS, cacheDir4, toolIdentities, sysrootIdentities, GENRULE_RECIPE, GENRULE_BUNDLE;
|
|
107653
107737
|
var init_genrule_archives = __esm({
|
|
107654
107738
|
"src/genrule-archives.ts"() {
|
|
107655
107739
|
"use strict";
|
|
107656
107740
|
import_node_child_process55 = require("node:child_process");
|
|
107657
|
-
|
|
107741
|
+
import_node_crypto71 = require("node:crypto");
|
|
107658
107742
|
import_node_fs115 = __toESM(require("node:fs"), 1);
|
|
107659
107743
|
import_node_os23 = __toESM(require("node:os"), 1);
|
|
107660
107744
|
import_node_path118 = __toESM(require("node:path"), 1);
|
|
@@ -107762,7 +107846,7 @@ function privateSentrySlice(entry, moduleRoot) {
|
|
|
107762
107846
|
function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact) {
|
|
107763
107847
|
if (standin.module !== SENTRY_SWIFT_SLICE.name) return standin;
|
|
107764
107848
|
const native = simulatorNativeLibrary(artifact());
|
|
107765
|
-
if (!native || (0,
|
|
107849
|
+
if (!native || (0, import_node_crypto72.createHash)("sha256").update(import_node_fs116.default.readFileSync(native.file)).digest("hex") !== SENTRY_SWIFT_SLICE.nativeSha256)
|
|
107766
107850
|
return standin;
|
|
107767
107851
|
if (configured)
|
|
107768
107852
|
throw new Error(
|
|
@@ -107820,12 +107904,12 @@ function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact)
|
|
|
107820
107904
|
}
|
|
107821
107905
|
};
|
|
107822
107906
|
}
|
|
107823
|
-
var import_node_child_process56,
|
|
107907
|
+
var import_node_child_process56, import_node_crypto72, import_node_fs116, import_node_os24, import_node_path119, SENTRY_SWIFT_SLICE;
|
|
107824
107908
|
var init_native_swift_slices = __esm({
|
|
107825
107909
|
"src/native-swift-slices.ts"() {
|
|
107826
107910
|
"use strict";
|
|
107827
107911
|
import_node_child_process56 = require("node:child_process");
|
|
107828
|
-
|
|
107912
|
+
import_node_crypto72 = require("node:crypto");
|
|
107829
107913
|
import_node_fs116 = __toESM(require("node:fs"), 1);
|
|
107830
107914
|
import_node_os24 = __toESM(require("node:os"), 1);
|
|
107831
107915
|
import_node_path119 = __toESM(require("node:path"), 1);
|
|
@@ -108633,7 +108717,7 @@ function treeDigest2(root) {
|
|
|
108633
108717
|
}).join("\n");
|
|
108634
108718
|
const memo2 = digests.get(`tree\0${root}`);
|
|
108635
108719
|
if (memo2?.stamp === stamp) return memo2.digest;
|
|
108636
|
-
const hash = (0,
|
|
108720
|
+
const hash = (0, import_node_crypto73.createHash)("sha256");
|
|
108637
108721
|
for (const name3 of names) {
|
|
108638
108722
|
hash.update(`${name3}\0`);
|
|
108639
108723
|
hash.update(import_node_fs120.default.readFileSync(import_node_path122.default.join(root, name3)));
|
|
@@ -108680,7 +108764,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
108680
108764
|
const found4 = locateXcframework(import_node_path122.default.join(dir, "tree"));
|
|
108681
108765
|
if (found4) return { dir: found4, digest: stored.sha };
|
|
108682
108766
|
}
|
|
108683
|
-
const sha2 = (0,
|
|
108767
|
+
const sha2 = (0, import_node_crypto73.createHash)("sha256").update(import_node_fs120.default.readFileSync(binary2.dir)).digest("hex");
|
|
108684
108768
|
if (sha2 !== stored?.sha || !locateXcframework(import_node_path122.default.join(dir, "tree"))) {
|
|
108685
108769
|
import_node_fs120.default.rmSync(dir, { recursive: true, force: true });
|
|
108686
108770
|
import_node_fs120.default.mkdirSync(import_node_path122.default.join(dir, "tree"), { recursive: true });
|
|
@@ -108692,7 +108776,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
108692
108776
|
return { dir: found3, digest: sha2 };
|
|
108693
108777
|
}
|
|
108694
108778
|
if (stored && import_node_fs120.default.existsSync(archive)) {
|
|
108695
|
-
const sha2 = (0,
|
|
108779
|
+
const sha2 = (0, import_node_crypto73.createHash)("sha256").update(import_node_fs120.default.readFileSync(archive)).digest("hex");
|
|
108696
108780
|
if (sha2 !== expected)
|
|
108697
108781
|
throw new Error(`archive checksum ${sha2} is not the declared checksum ${expected}`);
|
|
108698
108782
|
const found3 = locateXcframework(import_node_path122.default.join(dir, "tree"));
|
|
@@ -108701,7 +108785,7 @@ function swiftBinaryFramework(binary2) {
|
|
|
108701
108785
|
import_node_fs120.default.rmSync(dir, { recursive: true, force: true });
|
|
108702
108786
|
import_node_fs120.default.mkdirSync(import_node_path122.default.join(dir, "tree"), { recursive: true });
|
|
108703
108787
|
exec("curl", ["-fsSL", "--retry", "2", "-o", archive, binary2.url]);
|
|
108704
|
-
const sha = (0,
|
|
108788
|
+
const sha = (0, import_node_crypto73.createHash)("sha256").update(import_node_fs120.default.readFileSync(archive)).digest("hex");
|
|
108705
108789
|
if (sha !== expected) {
|
|
108706
108790
|
import_node_fs120.default.rmSync(dir, { recursive: true, force: true });
|
|
108707
108791
|
throw new Error(`archive checksum ${sha} is not the declared checksum ${expected}`);
|
|
@@ -108826,7 +108910,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
|
|
|
108826
108910
|
});
|
|
108827
108911
|
}
|
|
108828
108912
|
}
|
|
108829
|
-
const declaredDigest = (0,
|
|
108913
|
+
const declaredDigest = (0, import_node_crypto73.createHash)("sha256");
|
|
108830
108914
|
for (const framework of providedFrameworks)
|
|
108831
108915
|
declaredDigest.update(`provided/${import_node_path122.default.relative(artifact.dir, framework)}\0`);
|
|
108832
108916
|
for (const [framework, { declared: names, imports: imports2, sdkHeader }] of declared)
|
|
@@ -108896,7 +108980,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
|
|
|
108896
108980
|
import_node_fs120.default.copyFileSync(surface.modulemap, modulemap);
|
|
108897
108981
|
}
|
|
108898
108982
|
}
|
|
108899
|
-
const contents2 = (0,
|
|
108983
|
+
const contents2 = (0, import_node_crypto73.createHash)("sha256");
|
|
108900
108984
|
for (const framework of providedFrameworks.filter((item) => !declared.has(item))) {
|
|
108901
108985
|
const modulemap = import_node_path122.default.join(
|
|
108902
108986
|
pending2,
|
|
@@ -110311,7 +110395,7 @@ function crateSourceRoots(manifest, searchRoot) {
|
|
|
110311
110395
|
return roots;
|
|
110312
110396
|
}
|
|
110313
110397
|
function crateSourceDigest(manifest, searchRoot) {
|
|
110314
|
-
const hash = (0,
|
|
110398
|
+
const hash = (0, import_node_crypto73.createHash)("sha256");
|
|
110315
110399
|
const walk4 = (dir, root) => {
|
|
110316
110400
|
for (const entry of import_node_fs120.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name < right.name ? -1 : 1)) {
|
|
110317
110401
|
const full = import_node_path122.default.join(dir, entry.name);
|
|
@@ -110758,7 +110842,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
|
|
|
110758
110842
|
...swiftSources.flags,
|
|
110759
110843
|
...swiftSources.sources.flatMap((source) => [
|
|
110760
110844
|
source,
|
|
110761
|
-
(0,
|
|
110845
|
+
(0, import_node_crypto73.createHash)("sha256").update(import_node_fs120.default.readFileSync(import_node_path122.default.join(binary2.dir, source))).digest("hex")
|
|
110762
110846
|
])
|
|
110763
110847
|
);
|
|
110764
110848
|
continue;
|
|
@@ -110794,7 +110878,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
|
|
|
110794
110878
|
);
|
|
110795
110879
|
}
|
|
110796
110880
|
}
|
|
110797
|
-
return (0,
|
|
110881
|
+
return (0, import_node_crypto73.createHash)("sha256").update(parts2.join("\0")).digest("hex");
|
|
110798
110882
|
}
|
|
110799
110883
|
function missingArtifactGap(binary2) {
|
|
110800
110884
|
if (swiftBinaryOnDisk(binary2)) return null;
|
|
@@ -110876,7 +110960,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
110876
110960
|
return NO_IMPORTABLE_SURFACE;
|
|
110877
110961
|
}
|
|
110878
110962
|
const configured = new Map(Object.entries(behavior));
|
|
110879
|
-
const hash = (0,
|
|
110963
|
+
const hash = (0, import_node_crypto73.createHash)("sha256").update(
|
|
110880
110964
|
standinGenerationInputs([binary2], toolchain, behavior)
|
|
110881
110965
|
);
|
|
110882
110966
|
hash.update(digest3);
|
|
@@ -111116,7 +111200,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
111116
111200
|
);
|
|
111117
111201
|
if (binary2.moduleSources !== void 0)
|
|
111118
111202
|
frameworkInputs.push(
|
|
111119
|
-
`${binary2.target}\0${(0,
|
|
111203
|
+
`${binary2.target}\0${(0, import_node_crypto73.createHash)("sha256").update(
|
|
111120
111204
|
[iosSdkId(), ...swiftSources.flags, ...swiftSources.sources, ...texts].join(
|
|
111121
111205
|
"\0"
|
|
111122
111206
|
)
|
|
@@ -111157,7 +111241,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
111157
111241
|
import_node_fs120.default.mkdirSync(sourceFrameworks);
|
|
111158
111242
|
const frameworks = {
|
|
111159
111243
|
dirs: [...frameworkDirs, sourceFrameworks].sort(),
|
|
111160
|
-
digest: (0,
|
|
111244
|
+
digest: (0, import_node_crypto73.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
|
|
111161
111245
|
surfaces: frameworkSurfaces
|
|
111162
111246
|
};
|
|
111163
111247
|
const siblings = new Map(
|
|
@@ -111276,12 +111360,12 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
|
111276
111360
|
import_node_fs120.default.rmSync(modules, { recursive: true, force: true });
|
|
111277
111361
|
}
|
|
111278
111362
|
}
|
|
111279
|
-
var import_node_child_process58,
|
|
111363
|
+
var import_node_child_process58, import_node_crypto73, import_node_fs120, import_node_path122, 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;
|
|
111280
111364
|
var init_swift_standins = __esm({
|
|
111281
111365
|
"src/swift-standins.ts"() {
|
|
111282
111366
|
"use strict";
|
|
111283
111367
|
import_node_child_process58 = require("node:child_process");
|
|
111284
|
-
|
|
111368
|
+
import_node_crypto73 = require("node:crypto");
|
|
111285
111369
|
import_node_fs120 = __toESM(require("node:fs"), 1);
|
|
111286
111370
|
import_node_path122 = __toESM(require("node:path"), 1);
|
|
111287
111371
|
init_forked_script_contract();
|
|
@@ -111311,7 +111395,7 @@ var init_swift_standins = __esm({
|
|
|
111311
111395
|
init_swiftTargetContract();
|
|
111312
111396
|
TRIPLE = SWIFT_WASM_TRIPLE;
|
|
111313
111397
|
cacheDir5 = import_node_path122.default.join(cacheDir(), "swift-standins");
|
|
111314
|
-
key = (...parts2) => (0,
|
|
111398
|
+
key = (...parts2) => (0, import_node_crypto73.createHash)("sha256").update(parts2.join("\0")).digest("hex").slice(0, 32);
|
|
111315
111399
|
digests = /* @__PURE__ */ new Map();
|
|
111316
111400
|
isBinaryLibraryFile = (file) => /\.(?:a|dylib|o|tbd)$/i.test(file);
|
|
111317
111401
|
OBJC_IMPORT = /#\s*(?:import|include)\s*[<"](?:[\w+-]+\/)?([\w+.-]+\.h)[>"]/g;
|
|
@@ -111474,7 +111558,7 @@ function compiledFrameworkImports(app, products) {
|
|
|
111474
111558
|
function sha256Hex6(bytes) {
|
|
111475
111559
|
if (typeof Bun !== "undefined")
|
|
111476
111560
|
return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
|
|
111477
|
-
return (0,
|
|
111561
|
+
return (0, import_node_crypto74.createHash)("sha256").update(bytes).digest("hex");
|
|
111478
111562
|
}
|
|
111479
111563
|
function regularFileStamp(file) {
|
|
111480
111564
|
const stat2 = import_node_fs121.default.lstatSync(file, { bigint: true, throwIfNoEntry: false });
|
|
@@ -111517,7 +111601,7 @@ function cachedBinaryFileDigest(file) {
|
|
|
111517
111601
|
const digest3 = sha256Hex6(import_node_fs121.default.readFileSync(real));
|
|
111518
111602
|
binaryFileDigests.set(real, { stamp, digest: digest3 });
|
|
111519
111603
|
import_node_fs121.default.mkdirSync(dir, { recursive: true });
|
|
111520
|
-
const partial = `${record6}.${process.pid}.${(0,
|
|
111604
|
+
const partial = `${record6}.${process.pid}.${(0, import_node_crypto74.randomUUID)()}`;
|
|
111521
111605
|
import_node_fs121.default.writeFileSync(partial, JSON.stringify({ stamp, digest: digest3 }));
|
|
111522
111606
|
import_node_fs121.default.renameSync(partial, record6);
|
|
111523
111607
|
return digest3;
|
|
@@ -112787,12 +112871,12 @@ ${reported.trimEnd() || `Clang exited with status ${result.status}`}`;
|
|
|
112787
112871
|
import_node_fs121.default.closeSync(descriptor);
|
|
112788
112872
|
}
|
|
112789
112873
|
}
|
|
112790
|
-
var import_node_child_process59,
|
|
112874
|
+
var import_node_child_process59, import_node_crypto74, import_node_fs121, import_node_path123, SwiftObjCCompilationError, isDirectory4, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT, binaryFileDigests, objcInputSnapshots;
|
|
112791
112875
|
var init_swift_objc_compile = __esm({
|
|
112792
112876
|
"src/swift-objc-compile.ts"() {
|
|
112793
112877
|
"use strict";
|
|
112794
112878
|
import_node_child_process59 = require("node:child_process");
|
|
112795
|
-
|
|
112879
|
+
import_node_crypto74 = require("node:crypto");
|
|
112796
112880
|
import_node_fs121 = __toESM(require("node:fs"), 1);
|
|
112797
112881
|
import_node_path123 = __toESM(require("node:path"), 1);
|
|
112798
112882
|
init_mapLimit();
|
|
@@ -116957,11 +117041,11 @@ function coreDataModelDirectories(files2) {
|
|
|
116957
117041
|
}
|
|
116958
117042
|
return [...models].sort();
|
|
116959
117043
|
}
|
|
116960
|
-
var
|
|
117044
|
+
var import_node_crypto75, import_node_fs125, import_node_path127, attributeTypes, deleteRules, EXTERNAL_BINARY, PRESERVE_AFTER_DELETION, yes, common, uid, NULL, classChains, KeyedArchive, sha2563;
|
|
116961
117045
|
var init_core_data_model = __esm({
|
|
116962
117046
|
"src/core-data-model.ts"() {
|
|
116963
117047
|
"use strict";
|
|
116964
|
-
|
|
117048
|
+
import_node_crypto75 = require("node:crypto");
|
|
116965
117049
|
import_node_fs125 = require("node:fs");
|
|
116966
117050
|
import_node_path127 = __toESM(require("node:path"), 1);
|
|
116967
117051
|
init_core_data_entity_classes();
|
|
@@ -117080,7 +117164,7 @@ var init_core_data_model = __esm({
|
|
|
117080
117164
|
});
|
|
117081
117165
|
}
|
|
117082
117166
|
};
|
|
117083
|
-
sha2563 = (...parts2) => (0,
|
|
117167
|
+
sha2563 = (...parts2) => (0, import_node_crypto75.createHash)("sha256").update(
|
|
117084
117168
|
Buffer.concat(
|
|
117085
117169
|
parts2.map(
|
|
117086
117170
|
(part) => Array.isArray(part) ? Buffer.from(part) : Buffer.from(part)
|
|
@@ -119272,7 +119356,7 @@ async function buildRiveRuntimeDependencies(checkout, moduleRoot) {
|
|
|
119272
119356
|
];
|
|
119273
119357
|
const objc = [...swiftObjCRuntimeFlags, "-fobjc-exceptions"];
|
|
119274
119358
|
const xcode = (0, import_node_child_process61.execFileSync)("xcodebuild", ["-version"], { encoding: "utf8" });
|
|
119275
|
-
const key2 = (0,
|
|
119359
|
+
const key2 = (0, import_node_crypto76.createHash)("sha256").update(
|
|
119276
119360
|
JSON.stringify([
|
|
119277
119361
|
RECIPE,
|
|
119278
119362
|
(0, import_node_child_process61.execFileSync)("git", ["-C", runtime, "rev-parse", "HEAD"], {
|
|
@@ -119483,12 +119567,12 @@ exec ${quote3(import_node_path128.default.join(toolchainBin, "llvm-ar"))} rcs "$
|
|
|
119483
119567
|
);
|
|
119484
119568
|
return directory2;
|
|
119485
119569
|
}
|
|
119486
|
-
var import_node_child_process61,
|
|
119570
|
+
var import_node_child_process61, import_node_crypto76, import_node_fs126, import_node_os25, import_node_path128, import_promises14, RECIPE, CONFIG, RUNTIME_LIBRARIES;
|
|
119487
119571
|
var init_rive_runtime_dependencies = __esm({
|
|
119488
119572
|
"src/rive-runtime-dependencies.ts"() {
|
|
119489
119573
|
"use strict";
|
|
119490
119574
|
import_node_child_process61 = require("node:child_process");
|
|
119491
|
-
|
|
119575
|
+
import_node_crypto76 = require("node:crypto");
|
|
119492
119576
|
import_node_fs126 = __toESM(require("node:fs"), 1);
|
|
119493
119577
|
import_node_os25 = __toESM(require("node:os"), 1);
|
|
119494
119578
|
import_node_path128 = __toESM(require("node:path"), 1);
|
|
@@ -120345,7 +120429,7 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
120345
120429
|
(binary2) => binary2.publicHeaders === void 0 && binary2.placeholder === void 0 && swiftBinaryOnDisk(binary2) && binaryHeaderSearchPaths(binary2, staged, app.rootDir).headers.length === 1
|
|
120346
120430
|
))
|
|
120347
120431
|
return [...binaries];
|
|
120348
|
-
const hash = (0,
|
|
120432
|
+
const hash = (0, import_node_crypto77.createHash)("sha256");
|
|
120349
120433
|
hash.update(
|
|
120350
120434
|
JSON.stringify([
|
|
120351
120435
|
inputs2.targets,
|
|
@@ -120554,12 +120638,12 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
|
|
|
120554
120638
|
);
|
|
120555
120639
|
return result;
|
|
120556
120640
|
}
|
|
120557
|
-
var import_node_child_process63,
|
|
120641
|
+
var import_node_child_process63, import_node_crypto77, import_node_fs128, import_node_path130, cachedInputs;
|
|
120558
120642
|
var init_swift_cxx_reachable = __esm({
|
|
120559
120643
|
"src/swift-cxx-reachable.ts"() {
|
|
120560
120644
|
"use strict";
|
|
120561
120645
|
import_node_child_process63 = require("node:child_process");
|
|
120562
|
-
|
|
120646
|
+
import_node_crypto77 = require("node:crypto");
|
|
120563
120647
|
import_node_fs128 = __toESM(require("node:fs"), 1);
|
|
120564
120648
|
import_node_path130 = __toESM(require("node:path"), 1);
|
|
120565
120649
|
init_is_record();
|
|
@@ -121107,7 +121191,7 @@ function fetchSwiftSdkDataPlan({ url, dataPlan }) {
|
|
|
121107
121191
|
if (!response.ok)
|
|
121108
121192
|
throw new Error(`Swift SDK data plan ${address} answered ${response.status}`);
|
|
121109
121193
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
121110
|
-
if ((0,
|
|
121194
|
+
if ((0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex") !== dataPlan)
|
|
121111
121195
|
throw new Error(`Swift SDK data plan ${address} failed its digest check`);
|
|
121112
121196
|
return bytes;
|
|
121113
121197
|
});
|
|
@@ -121212,7 +121296,7 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
|
|
|
121212
121296
|
encode2(now),
|
|
121213
121297
|
encodeNativeSdkLater({
|
|
121214
121298
|
files: later.map((bytes) => ({
|
|
121215
|
-
sha256: (0,
|
|
121299
|
+
sha256: (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex"),
|
|
121216
121300
|
byteLength: bytes.length
|
|
121217
121301
|
})),
|
|
121218
121302
|
...needs && {
|
|
@@ -121228,11 +121312,11 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
|
|
|
121228
121312
|
later
|
|
121229
121313
|
};
|
|
121230
121314
|
}
|
|
121231
|
-
var
|
|
121315
|
+
var import_node_crypto78, ADDRESS_REACH, sdkPieces, firstAtOrAfter, pieceAt, LATER_GROUP_BYTES, MAX_LATER_GROUPS, publishedPlans;
|
|
121232
121316
|
var init_swift_sdk_later_data = __esm({
|
|
121233
121317
|
"src/swift-sdk-later-data.ts"() {
|
|
121234
121318
|
"use strict";
|
|
121235
|
-
|
|
121319
|
+
import_node_crypto78 = require("node:crypto");
|
|
121236
121320
|
init_nativeSdkBindingContract();
|
|
121237
121321
|
init_nativeWasmContract();
|
|
121238
121322
|
init_swift_sdk_image();
|
|
@@ -122897,7 +122981,7 @@ async function splitNativeWasm(input, directory2, profile, binaryen, shared, kee
|
|
|
122897
122981
|
const part = await guard((0, import_node_path133.join)(directory2, `side-${id}.wasm`), lazy, env);
|
|
122898
122982
|
const bytes = (0, import_node_fs131.readFileSync)(part.file);
|
|
122899
122983
|
assertWasmCodeOnly(bytes);
|
|
122900
|
-
return { ...part, slots: slots2, sha256: (0,
|
|
122984
|
+
return { ...part, slots: slots2, sha256: (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex") };
|
|
122901
122985
|
}
|
|
122902
122986
|
);
|
|
122903
122987
|
const dyldGroups = parts2.flatMap(
|
|
@@ -122965,12 +123049,12 @@ function describePart(file) {
|
|
|
122965
123049
|
);
|
|
122966
123050
|
return { file, functions, byteLength: bytes.byteLength };
|
|
122967
123051
|
}
|
|
122968
|
-
var import_node_child_process66,
|
|
123052
|
+
var import_node_child_process66, import_node_crypto79, import_node_fs131, import_node_os27, import_node_path133, import_node_util16, run11, MAX_MODULE_FUNCTIONS, MAX_START_FUNCTIONS, SIDE_FUNCTIONS, SIDE_CODE_BYTES, FEATURES2, featuresOf;
|
|
122969
123053
|
var init_wasm_lazy_split = __esm({
|
|
122970
123054
|
"src/wasm-lazy-split.ts"() {
|
|
122971
123055
|
"use strict";
|
|
122972
123056
|
import_node_child_process66 = require("node:child_process");
|
|
122973
|
-
|
|
123057
|
+
import_node_crypto79 = require("node:crypto");
|
|
122974
123058
|
import_node_fs131 = require("node:fs");
|
|
122975
123059
|
import_node_os27 = require("node:os");
|
|
122976
123060
|
import_node_path133 = require("node:path");
|
|
@@ -123407,11 +123491,11 @@ async function bootSwiftPreview(launch2, profile) {
|
|
|
123407
123491
|
server.close();
|
|
123408
123492
|
}
|
|
123409
123493
|
}
|
|
123410
|
-
var
|
|
123494
|
+
var import_node_crypto80, import_node_fs132, import_node_http3, import_node_https2, import_node_os28, import_node_path134, packageName, guestPath, appPath, profileWindowMs, profileQuietMs, digest2, partDigest, platform;
|
|
123411
123495
|
var init_swift_startup_split = __esm({
|
|
123412
123496
|
"src/swift-startup-split.ts"() {
|
|
123413
123497
|
"use strict";
|
|
123414
|
-
|
|
123498
|
+
import_node_crypto80 = require("node:crypto");
|
|
123415
123499
|
import_node_fs132 = require("node:fs");
|
|
123416
123500
|
import_node_http3 = require("node:http");
|
|
123417
123501
|
import_node_https2 = require("node:https");
|
|
@@ -123436,7 +123520,7 @@ var init_swift_startup_split = __esm({
|
|
|
123436
123520
|
appPath = "/__peach/swift/startup.wasm";
|
|
123437
123521
|
profileWindowMs = 3e4;
|
|
123438
123522
|
profileQuietMs = 2e3;
|
|
123439
|
-
digest2 = (bytes) => (0,
|
|
123523
|
+
digest2 = (bytes) => (0, import_node_crypto80.createHash)("sha256").update(bytes).digest("hex");
|
|
123440
123524
|
partDigest = /^[a-f0-9]{64}$/;
|
|
123441
123525
|
platform = `${process.platform}-${process.arch}`;
|
|
123442
123526
|
}
|
|
@@ -123480,7 +123564,7 @@ function* filesUnder(absolute) {
|
|
|
123480
123564
|
}
|
|
123481
123565
|
function hashFile(absolutePath) {
|
|
123482
123566
|
try {
|
|
123483
|
-
return (0,
|
|
123567
|
+
return (0, import_node_crypto81.createHash)("sha1").update((0, import_node_fs133.readFileSync)(absolutePath)).digest("hex");
|
|
123484
123568
|
} catch {
|
|
123485
123569
|
return null;
|
|
123486
123570
|
}
|
|
@@ -123614,11 +123698,11 @@ function findStaleRoutes(monorepoRoot, routes2) {
|
|
|
123614
123698
|
}
|
|
123615
123699
|
return stale;
|
|
123616
123700
|
}
|
|
123617
|
-
var
|
|
123701
|
+
var import_node_crypto81, import_node_fs133, import_node_path135, DEV_BUILD_REBUILD_COMMAND, RECORD_DIR, PEACHSIM_ENGINE_INPUTS, ENGINE_SOURCES, ROUTES, STANDALONE_ENGINE_ROUTES, EXCLUDED_DIR_NAMES;
|
|
123618
123702
|
var init_dev_build_freshness = __esm({
|
|
123619
123703
|
"cli/dev-build-freshness.ts"() {
|
|
123620
123704
|
"use strict";
|
|
123621
|
-
|
|
123705
|
+
import_node_crypto81 = require("node:crypto");
|
|
123622
123706
|
import_node_fs133 = require("node:fs");
|
|
123623
123707
|
import_node_path135 = require("node:path");
|
|
123624
123708
|
DEV_BUILD_REBUILD_COMMAND = "bun run build:peach";
|
|
@@ -123784,7 +123868,7 @@ function nativeSourceFiles(packagePath) {
|
|
|
123784
123868
|
function swiftArtifactContentDigest(bytes) {
|
|
123785
123869
|
let digest3 = swiftArtifactDigests.get(bytes);
|
|
123786
123870
|
if (!digest3) {
|
|
123787
|
-
digest3 = (0,
|
|
123871
|
+
digest3 = (0, import_node_crypto82.createHash)("sha256").update(bytes).digest("hex");
|
|
123788
123872
|
swiftArtifactDigests.set(bytes, digest3);
|
|
123789
123873
|
}
|
|
123790
123874
|
return digest3;
|
|
@@ -123935,7 +124019,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
123935
124019
|
const clang = import_node_path136.default.join(toolchainBin, "clang");
|
|
123936
124020
|
const empty = (binary2, file) => {
|
|
123937
124021
|
const source = import_node_path136.default.join(binary2.dir, file);
|
|
123938
|
-
const key2 = (0,
|
|
124022
|
+
const key2 = (0, import_node_crypto82.createHash)("sha256").update(
|
|
123939
124023
|
JSON.stringify([
|
|
123940
124024
|
clang,
|
|
123941
124025
|
sdk2.sysroot,
|
|
@@ -123980,7 +124064,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
|
|
|
123980
124064
|
return new Set(portable.flat());
|
|
123981
124065
|
}
|
|
123982
124066
|
async function swiftPackages(entry, app) {
|
|
123983
|
-
const stamp = (file) => import_node_fs134.default.existsSync(file) ? (0,
|
|
124067
|
+
const stamp = (file) => import_node_fs134.default.existsSync(file) ? (0, import_node_crypto82.createHash)("sha256").update(import_node_fs134.default.readFileSync(file)).digest("hex") : null;
|
|
123984
124068
|
const owners = [...app.frameworks, app].map((target) => ({
|
|
123985
124069
|
module: target.moduleName,
|
|
123986
124070
|
products: target.packageProducts ?? []
|
|
@@ -125144,7 +125228,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
125144
125228
|
const source = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(
|
|
125145
125229
|
bytes
|
|
125146
125230
|
);
|
|
125147
|
-
const sha2565 = (0,
|
|
125231
|
+
const sha2565 = (0, import_node_crypto82.createHash)("sha256").update(bytes).digest("hex");
|
|
125148
125232
|
const bundle = swiftResourceBundleForFile(bundles, key2);
|
|
125149
125233
|
if (!bundle && inputs2["Package.swift"])
|
|
125150
125234
|
throw new Error(`metal source ${key2} has no resource target bundle`);
|
|
@@ -125167,7 +125251,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
125167
125251
|
const bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
|
|
125168
125252
|
pdfs.set(file, {
|
|
125169
125253
|
file: disk,
|
|
125170
|
-
sha256: (0,
|
|
125254
|
+
sha256: (0, import_node_crypto82.createHash)("sha256").update(bytes).digest("hex")
|
|
125171
125255
|
});
|
|
125172
125256
|
}
|
|
125173
125257
|
const pdfRasters = rasterizePdfFiles([...pdfs.values()], limits);
|
|
@@ -125213,7 +125297,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
|
|
|
125213
125297
|
throw new Error("swift image pack exceeds the compile service caps");
|
|
125214
125298
|
}
|
|
125215
125299
|
imageBytes += bytes.length;
|
|
125216
|
-
const hash = (0,
|
|
125300
|
+
const hash = (0, import_node_crypto82.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
|
|
125217
125301
|
const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
|
|
125218
125302
|
const pixelSize = ext === ".png" ? readPngDimensions(bytes) : null;
|
|
125219
125303
|
const variant2 = {
|
|
@@ -125523,7 +125607,7 @@ function updateSwiftConfigStamp(hash, packagePath) {
|
|
|
125523
125607
|
hash.update(JSON.stringify(gates.map((name3) => swiftWasm64PlatformGates[name3])));
|
|
125524
125608
|
}
|
|
125525
125609
|
function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
125526
|
-
const hash = (0,
|
|
125610
|
+
const hash = (0, import_node_crypto82.createHash)("sha256");
|
|
125527
125611
|
hash.update(packagePath);
|
|
125528
125612
|
updateSwiftConfigStamp(hash, packagePath);
|
|
125529
125613
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -125552,7 +125636,7 @@ function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
|
|
|
125552
125636
|
return hash.digest("hex").slice(0, 16);
|
|
125553
125637
|
}
|
|
125554
125638
|
function sourceContentStamp(packagePath, moduleRootOverride) {
|
|
125555
|
-
const hash = (0,
|
|
125639
|
+
const hash = (0, import_node_crypto82.createHash)("sha256");
|
|
125556
125640
|
hash.update(compilerSourceDigest);
|
|
125557
125641
|
updateSwiftConfigStamp(hash, packagePath);
|
|
125558
125642
|
const libraries = projects().get(packagePath)?.libraries;
|
|
@@ -125584,7 +125668,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
125584
125668
|
(root) => import_node_fs134.default.existsSync(import_node_path136.default.join(root, "toolchain.json"))
|
|
125585
125669
|
);
|
|
125586
125670
|
if (!moduleRoot) return "";
|
|
125587
|
-
const hash = (0,
|
|
125671
|
+
const hash = (0, import_node_crypto82.createHash)("sha256");
|
|
125588
125672
|
hash.update(moduleRoot);
|
|
125589
125673
|
for (const relative7 of swiftModuleInputFiles(moduleRoot)) {
|
|
125590
125674
|
hash.update(relative7);
|
|
@@ -125594,7 +125678,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
|
|
|
125594
125678
|
}
|
|
125595
125679
|
function otherInputs(input, standalone) {
|
|
125596
125680
|
const { files: _files, ...rest } = input;
|
|
125597
|
-
return (0,
|
|
125681
|
+
return (0, import_node_crypto82.createHash)("sha256").update(JSON.stringify({ ...rest, standalone })).digest("hex");
|
|
125598
125682
|
}
|
|
125599
125683
|
function entryRootId(packagePath, file) {
|
|
125600
125684
|
const relative7 = import_node_path136.default.relative(packagePath, file).split(import_node_path136.default.sep).join(import_node_path136.default.posix.sep);
|
|
@@ -125616,7 +125700,7 @@ function standinLibraries(binaries, standins, rootDir, toolchain, rustWasm64) {
|
|
|
125616
125700
|
for (const standin of standins) {
|
|
125617
125701
|
if (!standin.prebuilt) continue;
|
|
125618
125702
|
const bytes = Buffer.from(standin.prebuilt.library, "base64");
|
|
125619
|
-
const digest3 = (0,
|
|
125703
|
+
const digest3 = (0, import_node_crypto82.createHash)("sha256").update(bytes).digest("hex");
|
|
125620
125704
|
const dir = import_node_path136.default.join(swiftCacheDir(), "native-archives", digest3);
|
|
125621
125705
|
import_node_fs134.default.mkdirSync(dir, { recursive: true });
|
|
125622
125706
|
const library = import_node_path136.default.join(dir, `lib${standin.module}.a`);
|
|
@@ -125965,7 +126049,7 @@ function swiftBuildRoot(packagePath, moduleRoot) {
|
|
|
125965
126049
|
return import_node_path136.default.join(
|
|
125966
126050
|
swiftCacheDir(),
|
|
125967
126051
|
"swift-builds",
|
|
125968
|
-
(0,
|
|
126052
|
+
(0, import_node_crypto82.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
|
|
125969
126053
|
);
|
|
125970
126054
|
}
|
|
125971
126055
|
function installedWorkspaceInput(packagePath, entry, moduleRoot) {
|
|
@@ -126266,7 +126350,7 @@ async function fetchSwiftDyldTable(moduleUrl, module2, signal) {
|
|
|
126266
126350
|
const response = await fetch(url, { signal });
|
|
126267
126351
|
if (!response.ok) throw new Error(`swift compile: ${url} answered ${response.status}`);
|
|
126268
126352
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
126269
|
-
if (bytes.length !== byteLength || (0,
|
|
126353
|
+
if (bytes.length !== byteLength || (0, import_node_crypto82.createHash)("sha256").update(bytes).digest("hex") !== sha2565)
|
|
126270
126354
|
throw new Error(`swift compile: ${url} does not match its module's index`);
|
|
126271
126355
|
return { dyldTable: { sha256: sha2565, bytes } };
|
|
126272
126356
|
}
|
|
@@ -126529,10 +126613,10 @@ async function splitSdkBinding(sdk2, splitKey, plan) {
|
|
|
126529
126613
|
sdk2.binding.bytes,
|
|
126530
126614
|
plan
|
|
126531
126615
|
);
|
|
126532
|
-
const digest3 = (0,
|
|
126616
|
+
const digest3 = (0, import_node_crypto82.createHash)("sha256").update(split.binding).digest("hex");
|
|
126533
126617
|
sdkBindingFiles.set(digest3, split.binding);
|
|
126534
126618
|
for (const later of split.later)
|
|
126535
|
-
sdkBindingFiles.set((0,
|
|
126619
|
+
sdkBindingFiles.set((0, import_node_crypto82.createHash)("sha256").update(later).digest("hex"), later);
|
|
126536
126620
|
sdkSplitBindings.set(key2, digest3);
|
|
126537
126621
|
}
|
|
126538
126622
|
function swiftCodePartAssets(origin, appParts, sdkDigest) {
|
|
@@ -126599,7 +126683,7 @@ function swiftSdkEntryAssets(origin, image, sdkDigest = image.sdk?.sha256) {
|
|
|
126599
126683
|
function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch2, runtimeRootOverride) {
|
|
126600
126684
|
const { key: key2 } = sdk2;
|
|
126601
126685
|
const normalizedPackage = normalizedSwiftPackagePath(packagePath);
|
|
126602
|
-
const app = (0,
|
|
126686
|
+
const app = (0, import_node_crypto82.createHash)("sha256").update(
|
|
126603
126687
|
JSON.stringify([
|
|
126604
126688
|
normalizedPackage,
|
|
126605
126689
|
launch2.environment,
|
|
@@ -126631,7 +126715,7 @@ function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch2, run
|
|
|
126631
126715
|
},
|
|
126632
126716
|
app
|
|
126633
126717
|
);
|
|
126634
|
-
const name3 = (0,
|
|
126718
|
+
const name3 = (0, import_node_crypto82.createHash)("sha256").update(split.primary).digest("hex");
|
|
126635
126719
|
sdkPieces2.set(name3, split.primary);
|
|
126636
126720
|
for (const [digest3, bytes] of split.parts) sdkPieces2.set(digest3, bytes);
|
|
126637
126721
|
sdkStartupParts.set(name3, split.parts);
|
|
@@ -126900,13 +126984,13 @@ function disposeSwiftProject(packagePath, signal) {
|
|
|
126900
126984
|
xcodeProjects().delete(packagePath);
|
|
126901
126985
|
sourceEntries().delete(packagePath);
|
|
126902
126986
|
}
|
|
126903
|
-
var import_node_async_hooks2, import_node_child_process67,
|
|
126987
|
+
var import_node_async_hooks2, import_node_child_process67, import_node_crypto82, import_node_fs134, import_node_os29, import_node_path136, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SDK_PATH, SDK_BINDING_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, startupImages, swiftArtifactDigests, 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;
|
|
126904
126988
|
var init_swift_host = __esm({
|
|
126905
126989
|
"src/swift-host.ts"() {
|
|
126906
126990
|
"use strict";
|
|
126907
126991
|
import_node_async_hooks2 = require("node:async_hooks");
|
|
126908
126992
|
import_node_child_process67 = require("node:child_process");
|
|
126909
|
-
|
|
126993
|
+
import_node_crypto82 = require("node:crypto");
|
|
126910
126994
|
import_node_fs134 = __toESM(require("node:fs"), 1);
|
|
126911
126995
|
import_node_os29 = __toESM(require("node:os"), 1);
|
|
126912
126996
|
import_node_path136 = __toESM(require("node:path"), 1);
|
|
@@ -127665,7 +127749,7 @@ function hashTree(root) {
|
|
|
127665
127749
|
for (const entry of import_node_fs137.default.readdirSync(root, { recursive: true, withFileTypes: true })) {
|
|
127666
127750
|
if (!entry.isFile()) continue;
|
|
127667
127751
|
const file = import_node_path139.default.join(entry.parentPath, entry.name);
|
|
127668
|
-
hashes[import_node_path139.default.relative(root, file).split(import_node_path139.default.sep).join("/")] = (0,
|
|
127752
|
+
hashes[import_node_path139.default.relative(root, file).split(import_node_path139.default.sep).join("/")] = (0, import_node_crypto83.createHash)("sha256").update(import_node_fs137.default.readFileSync(file)).digest("hex");
|
|
127669
127753
|
}
|
|
127670
127754
|
return Object.fromEntries(Object.entries(hashes).sort(([a], [b]) => a < b ? -1 : 1));
|
|
127671
127755
|
}
|
|
@@ -127715,12 +127799,12 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
127715
127799
|
files: hashTree(generatedRoot)
|
|
127716
127800
|
};
|
|
127717
127801
|
}
|
|
127718
|
-
var import_node_child_process68,
|
|
127802
|
+
var import_node_child_process68, import_node_crypto83, import_node_fs137, import_node_module17, import_node_path139, import_node_util17, run12, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
|
|
127719
127803
|
var init_turbo_codegen_intake = __esm({
|
|
127720
127804
|
"src/turbo-codegen-intake.ts"() {
|
|
127721
127805
|
"use strict";
|
|
127722
127806
|
import_node_child_process68 = require("node:child_process");
|
|
127723
|
-
|
|
127807
|
+
import_node_crypto83 = require("node:crypto");
|
|
127724
127808
|
import_node_fs137 = __toESM(require("node:fs"), 1);
|
|
127725
127809
|
import_node_module17 = require("node:module");
|
|
127726
127810
|
import_node_path139 = __toESM(require("node:path"), 1);
|
|
@@ -131671,11 +131755,11 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
|
|
|
131671
131755
|
}
|
|
131672
131756
|
`;
|
|
131673
131757
|
}
|
|
131674
|
-
var
|
|
131758
|
+
var import_node_crypto84, import_node_fs138, import_node_path140, 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;
|
|
131675
131759
|
var init_turbo_source = __esm({
|
|
131676
131760
|
"src/turbo-source.ts"() {
|
|
131677
131761
|
"use strict";
|
|
131678
|
-
|
|
131762
|
+
import_node_crypto84 = require("node:crypto");
|
|
131679
131763
|
import_node_fs138 = __toESM(require("node:fs"), 1);
|
|
131680
131764
|
import_node_path140 = __toESM(require("node:path"), 1);
|
|
131681
131765
|
init_cocoapods_trunk();
|
|
@@ -131803,7 +131887,7 @@ var init_turbo_source = __esm({
|
|
|
131803
131887
|
];
|
|
131804
131888
|
DECLARED_MODULE_NAME = /\bName\(\s*"(\w+)"\s*\)/g;
|
|
131805
131889
|
EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
|
|
131806
|
-
sha2564 = (data) => (0,
|
|
131890
|
+
sha2564 = (data) => (0, import_node_crypto84.createHash)("sha256").update(data).digest("hex");
|
|
131807
131891
|
podspecList = podspecAttribute;
|
|
131808
131892
|
versionParts = (version2) => version2.split(/[.-]/).map((p) => Number(p) || 0);
|
|
131809
131893
|
iosOf = (member) => object7(member.ios) ? member.ios : null;
|
|
@@ -132603,7 +132687,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped) {
|
|
|
132603
132687
|
}
|
|
132604
132688
|
async function prepareTurboCompileInput(options2) {
|
|
132605
132689
|
await prepareTurboSourceDependencies(options2.reactNativeRoot);
|
|
132606
|
-
const key2 = (0,
|
|
132690
|
+
const key2 = (0, import_node_crypto85.createHash)("sha256").update(options2.providers.map(({ root }) => import_node_fs139.default.realpathSync(root)).join("\0")).update("\0").update(import_node_fs139.default.realpathSync(options2.moduleRoot)).digest("hex");
|
|
132607
132691
|
const scratch2 = import_node_path141.default.join(import_node_os30.default.tmpdir(), "peach-turbo-swift", key2);
|
|
132608
132692
|
import_node_fs139.default.mkdirSync(scratch2, { recursive: true });
|
|
132609
132693
|
const codegenDir = import_node_fs139.default.mkdtempSync(import_node_path141.default.join(scratch2, "codegen-"));
|
|
@@ -132804,11 +132888,11 @@ async function compileTurboModule(options2) {
|
|
|
132804
132888
|
collection
|
|
132805
132889
|
};
|
|
132806
132890
|
}
|
|
132807
|
-
var
|
|
132891
|
+
var import_node_crypto85, import_node_fs139, import_node_module18, import_node_os30, import_node_path141;
|
|
132808
132892
|
var init_turbo_compile = __esm({
|
|
132809
132893
|
"src/turbo-compile.ts"() {
|
|
132810
132894
|
"use strict";
|
|
132811
|
-
|
|
132895
|
+
import_node_crypto85 = require("node:crypto");
|
|
132812
132896
|
import_node_fs139 = __toESM(require("node:fs"), 1);
|
|
132813
132897
|
import_node_module18 = require("node:module");
|
|
132814
132898
|
import_node_os30 = __toESM(require("node:os"), 1);
|
|
@@ -132836,7 +132920,18 @@ async function buildReactNativeCore(project2, reactNativeRoot, mode, moduleRoot)
|
|
|
132836
132920
|
const entry = reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode);
|
|
132837
132921
|
const directory2 = nativeEntryCache("react-native", entry.name, entry.key);
|
|
132838
132922
|
const work = import_node_path142.default.join(cacheDir(), "react-native-core-build", entry.key);
|
|
132839
|
-
|
|
132923
|
+
const {
|
|
132924
|
+
compiler: _compiler,
|
|
132925
|
+
distribution: _distribution,
|
|
132926
|
+
recipe: _recipe,
|
|
132927
|
+
...nativeInputs
|
|
132928
|
+
} = entry.inputs;
|
|
132929
|
+
const buildRoot = import_node_path142.default.join(
|
|
132930
|
+
cacheDir(),
|
|
132931
|
+
"react-native-core-products",
|
|
132932
|
+
nativeEntryKey(nativeInputs)
|
|
132933
|
+
);
|
|
132934
|
+
return withSwiftRootLock(`${buildRoot}.core-lock`, async () => {
|
|
132840
132935
|
if (import_node_fs140.default.existsSync(import_node_path142.default.join(directory2, "descriptor.json"))) return directory2;
|
|
132841
132936
|
const module2 = { root: moduleRoot, ...swiftModuleToolchain(moduleRoot) };
|
|
132842
132937
|
const floor = reactNativeCoreFloor(reactNativeRoot);
|
|
@@ -132873,17 +132968,6 @@ async function buildReactNativeCore(project2, reactNativeRoot, mode, moduleRoot)
|
|
|
132873
132968
|
}
|
|
132874
132969
|
const input = collectTurboCompileInput(producer, null, floor);
|
|
132875
132970
|
input.files[input.entry] = input.entry.endsWith(".swift") ? "@main struct PeachCoreProducer { static func main() {} }\n" : "int main() { return 0; }\n";
|
|
132876
|
-
const {
|
|
132877
|
-
compiler: _compiler,
|
|
132878
|
-
distribution: _distribution,
|
|
132879
|
-
recipe: _recipe,
|
|
132880
|
-
...nativeInputs
|
|
132881
|
-
} = entry.inputs;
|
|
132882
|
-
const buildRoot = import_node_path142.default.join(
|
|
132883
|
-
cacheDir(),
|
|
132884
|
-
"react-native-core-products",
|
|
132885
|
-
nativeEntryKey(nativeInputs)
|
|
132886
|
-
);
|
|
132887
132971
|
await compileSwiftProjectUnit(input, {
|
|
132888
132972
|
...module2,
|
|
132889
132973
|
moduleRoot: module2.root,
|
|
@@ -133025,8 +133109,8 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
133025
133109
|
);
|
|
133026
133110
|
if (!isRecord(manifest) || typeof manifest.version !== "string")
|
|
133027
133111
|
throw new Error(`${reactNativeRoot}: react-native has no version`);
|
|
133028
|
-
const headers = (0,
|
|
133029
|
-
const sources = (0,
|
|
133112
|
+
const headers = (0, import_node_crypto86.createHash)("sha256");
|
|
133113
|
+
const sources = (0, import_node_crypto86.createHash)("sha256");
|
|
133030
133114
|
const walk4 = (relative7) => {
|
|
133031
133115
|
for (const file of import_node_fs141.default.readdirSync(import_node_path143.default.join(reactNativeRoot, relative7), { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
133032
133116
|
if (file.name === "node_modules" || file.name.startsWith(".")) continue;
|
|
@@ -133054,7 +133138,7 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
133054
133138
|
"react-native": manifest.version,
|
|
133055
133139
|
headers: headers.digest("hex"),
|
|
133056
133140
|
sources: sources.digest("hex"),
|
|
133057
|
-
compiler:
|
|
133141
|
+
compiler: swiftArchiveCompilerDigestValue(),
|
|
133058
133142
|
recipe,
|
|
133059
133143
|
mode,
|
|
133060
133144
|
"ios-deployment-target": reactNativeCoreFloor(reactNativeRoot),
|
|
@@ -133133,7 +133217,7 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
133133
133217
|
const file = import_node_path143.default.join(
|
|
133134
133218
|
cacheDir(),
|
|
133135
133219
|
"native-archives",
|
|
133136
|
-
`${(0,
|
|
133220
|
+
`${(0, import_node_crypto86.createHash)("sha256").update(data).digest("hex")}.a`
|
|
133137
133221
|
);
|
|
133138
133222
|
import_node_fs141.default.mkdirSync(import_node_path143.default.dirname(file), { recursive: true });
|
|
133139
133223
|
if (!import_node_fs141.default.existsSync(file)) import_node_fs141.default.writeFileSync(file, Buffer.from(data, "base64"));
|
|
@@ -133143,11 +133227,11 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
133143
133227
|
}
|
|
133144
133228
|
}
|
|
133145
133229
|
}
|
|
133146
|
-
var
|
|
133230
|
+
var import_node_crypto86, import_node_fs141, import_node_module19, import_node_path143, import_node_util18, recipe, strings4, building;
|
|
133147
133231
|
var init_react_native_core = __esm({
|
|
133148
133232
|
"src/react-native-core.ts"() {
|
|
133149
133233
|
"use strict";
|
|
133150
|
-
|
|
133234
|
+
import_node_crypto86 = require("node:crypto");
|
|
133151
133235
|
import_node_fs141 = __toESM(require("node:fs"), 1);
|
|
133152
133236
|
import_node_module19 = require("node:module");
|
|
133153
133237
|
import_node_path143 = __toESM(require("node:path"), 1);
|
|
@@ -133158,10 +133242,11 @@ var init_react_native_core = __esm({
|
|
|
133158
133242
|
init_native_static_libraries();
|
|
133159
133243
|
init_react_native_core_digest();
|
|
133160
133244
|
init_swift_compile();
|
|
133245
|
+
init_swift_compiler_digest();
|
|
133161
133246
|
init_swift_distribution();
|
|
133162
133247
|
init_swift_package();
|
|
133163
133248
|
init_swiftContract();
|
|
133164
|
-
recipe = true ? "
|
|
133249
|
+
recipe = true ? "737e4942681b979bd94d697440cd3fc71975f9bb732444bd4e08d57dd493e833" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
|
|
133165
133250
|
strings4 = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
|
|
133166
133251
|
building = /* @__PURE__ */ new Map();
|
|
133167
133252
|
}
|
|
@@ -133172,7 +133257,7 @@ function exportedNames(moduleRoot, name3) {
|
|
|
133172
133257
|
const modules = import_node_path144.default.join(moduleRoot, "modules");
|
|
133173
133258
|
const module2 = import_node_path144.default.join(modules, `${name3}.swiftmodule`);
|
|
133174
133259
|
if (!import_node_fs142.default.existsSync(module2)) return /* @__PURE__ */ new Set();
|
|
133175
|
-
const key2 = (0,
|
|
133260
|
+
const key2 = (0, import_node_crypto87.createHash)("sha256").update(import_node_fs142.default.readFileSync(module2)).digest("hex");
|
|
133176
133261
|
const directory2 = import_node_path144.default.join(swiftCacheDir(), "swift-public-names");
|
|
133177
133262
|
const receipt = import_node_path144.default.join(directory2, `${key2}.json`);
|
|
133178
133263
|
if (import_node_fs142.default.existsSync(receipt)) {
|
|
@@ -133255,12 +133340,12 @@ function clangTypeOwnership(moduleRoot, module2) {
|
|
|
133255
133340
|
}
|
|
133256
133341
|
);
|
|
133257
133342
|
}
|
|
133258
|
-
var import_node_child_process70,
|
|
133343
|
+
var import_node_child_process70, import_node_crypto87, import_node_fs142, import_node_path144, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
|
|
133259
133344
|
var init_swift_clang_type_ownership = __esm({
|
|
133260
133345
|
"src/swift-clang-type-ownership.ts"() {
|
|
133261
133346
|
"use strict";
|
|
133262
133347
|
import_node_child_process70 = require("node:child_process");
|
|
133263
|
-
|
|
133348
|
+
import_node_crypto87 = require("node:crypto");
|
|
133264
133349
|
import_node_fs142 = __toESM(require("node:fs"), 1);
|
|
133265
133350
|
import_node_path144 = __toESM(require("node:path"), 1);
|
|
133266
133351
|
init_is_record();
|
|
@@ -134915,7 +135000,7 @@ function targetSettings2(units) {
|
|
|
134915
135000
|
}
|
|
134916
135001
|
function oneSDKStamp(oneSDK) {
|
|
134917
135002
|
if (!oneSDK) return "";
|
|
134918
|
-
const hash = (0,
|
|
135003
|
+
const hash = (0, import_node_crypto88.createHash)("sha256");
|
|
134919
135004
|
for (const files2 of [oneSDK.targets, oneSDK.entry])
|
|
134920
135005
|
for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
|
|
134921
135006
|
hash.update(`${name3}\0${source}\0`);
|
|
@@ -134966,7 +135051,7 @@ ${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport On
|
|
|
134966
135051
|
`;
|
|
134967
135052
|
}
|
|
134968
135053
|
function expoSwiftPreparedKey(base2, units, reactProviderStamp) {
|
|
134969
|
-
const hash = (0,
|
|
135054
|
+
const hash = (0, import_node_crypto88.createHash)("sha256");
|
|
134970
135055
|
hash.update(base2);
|
|
134971
135056
|
hash.update(reactProviderStamp);
|
|
134972
135057
|
for (const unit2 of units) {
|
|
@@ -135340,8 +135425,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
135340
135425
|
}
|
|
135341
135426
|
return provider;
|
|
135342
135427
|
})() : void 0;
|
|
135343
|
-
const reactProviderStamp = reactProvider ? (0,
|
|
135344
|
-
const key2 = (0,
|
|
135428
|
+
const reactProviderStamp = reactProvider ? (0, import_node_crypto88.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
|
|
135429
|
+
const key2 = (0, import_node_crypto88.createHash)("sha256").update(import_node_fs143.default.realpathSync(root)).digest("hex");
|
|
135345
135430
|
const unitContentStamp = (unit2) => sourceContentStamp(expoSwiftPackage(key2, unit2.moduleId), module2.root) + (unit2.reactNativeProvider ? `:${reactProviderStamp}` : "");
|
|
135346
135431
|
const failures = /* @__PURE__ */ new Map();
|
|
135347
135432
|
const failureRecords = /* @__PURE__ */ new Map();
|
|
@@ -135783,13 +135868,13 @@ ${diagnostics}`}`
|
|
|
135783
135868
|
}
|
|
135784
135869
|
return true;
|
|
135785
135870
|
}
|
|
135786
|
-
var import_node_async_hooks3, import_node_child_process71,
|
|
135871
|
+
var import_node_async_hooks3, import_node_child_process71, import_node_crypto88, import_node_fs143, import_node_module20, import_node_os31, import_node_path145, import_node_url7, import_node_util19, run13, scriptEnv, EXPO_SWIFT_ROUTE, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
|
|
135787
135872
|
var init_expo_swift_host = __esm({
|
|
135788
135873
|
"src/expo-swift-host.ts"() {
|
|
135789
135874
|
"use strict";
|
|
135790
135875
|
import_node_async_hooks3 = require("node:async_hooks");
|
|
135791
135876
|
import_node_child_process71 = require("node:child_process");
|
|
135792
|
-
|
|
135877
|
+
import_node_crypto88 = require("node:crypto");
|
|
135793
135878
|
import_node_fs143 = __toESM(require("node:fs"), 1);
|
|
135794
135879
|
import_node_module20 = require("node:module");
|
|
135795
135880
|
import_node_os31 = __toESM(require("node:os"), 1);
|
|
@@ -139062,7 +139147,7 @@ async function createIdentity() {
|
|
|
139062
139147
|
const keys = await crypto.subtle.generateKey(algorithm, true, ["sign", "verify"]);
|
|
139063
139148
|
const certificate = await import_x5092.X509CertificateGenerator.createSelfSigned(
|
|
139064
139149
|
{
|
|
139065
|
-
serialNumber: (0,
|
|
139150
|
+
serialNumber: (0, import_node_crypto89.randomBytes)(16).toString("hex"),
|
|
139066
139151
|
name: "CN=localhost",
|
|
139067
139152
|
notBefore: new Date(Date.now() - 6e4),
|
|
139068
139153
|
notAfter: new Date(Date.now() + 365 * 24 * 60 * 6e4),
|
|
@@ -139081,7 +139166,7 @@ async function createIdentity() {
|
|
|
139081
139166
|
${privateKey.toString("base64").match(/.{1,64}/g)?.join("\n")}
|
|
139082
139167
|
-----END PRIVATE KEY-----
|
|
139083
139168
|
`,
|
|
139084
|
-
spki: (0,
|
|
139169
|
+
spki: (0, import_node_crypto89.createHash)("sha256").update(Buffer.from(await crypto.subtle.exportKey("spki", keys.publicKey))).digest("base64")
|
|
139085
139170
|
};
|
|
139086
139171
|
}
|
|
139087
139172
|
async function startFetchProxyTransport(identityPath, hasLiveSims = () => false) {
|
|
@@ -139155,11 +139240,11 @@ async function startFetchProxyTransport(identityPath, hasLiveSims = () => false)
|
|
|
139155
139240
|
);
|
|
139156
139241
|
}
|
|
139157
139242
|
}
|
|
139158
|
-
var
|
|
139243
|
+
var import_node_crypto89, import_node_fs147, import_node_http23, import_node_path149, import_x5092;
|
|
139159
139244
|
var init_fetch_proxy_transport = __esm({
|
|
139160
139245
|
"src/host/fetch-proxy-transport.ts"() {
|
|
139161
139246
|
"use strict";
|
|
139162
|
-
|
|
139247
|
+
import_node_crypto89 = require("node:crypto");
|
|
139163
139248
|
import_node_fs147 = require("node:fs");
|
|
139164
139249
|
import_node_http23 = require("node:http2");
|
|
139165
139250
|
import_node_path149 = __toESM(require("node:path"), 1);
|
|
@@ -140391,10 +140476,10 @@ function stageHostBytes(bytes, origin, extension = "") {
|
|
|
140391
140476
|
}
|
|
140392
140477
|
async function stageHostDerivedBytes(input, producer, origin, extension, derive) {
|
|
140393
140478
|
const directory2 = prepareStagedDirectory();
|
|
140394
|
-
const inputDigest = (0,
|
|
140479
|
+
const inputDigest = (0, import_node_crypto90.createHash)("sha256").update(input).digest("hex");
|
|
140395
140480
|
const index = import_node_path153.default.join(
|
|
140396
140481
|
directory2,
|
|
140397
|
-
`derived-${(0,
|
|
140482
|
+
`derived-${(0, import_node_crypto90.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
|
|
140398
140483
|
);
|
|
140399
140484
|
const recorded = import_node_fs151.default.existsSync(index) ? import_node_fs151.default.readFileSync(index, "utf8") : "";
|
|
140400
140485
|
if (STAGED_NAME.test(recorded) && import_node_fs151.default.existsSync(import_node_path153.default.join(directory2, recorded))) {
|
|
@@ -140405,7 +140490,7 @@ async function stageHostDerivedBytes(input, producer, origin, extension, derive)
|
|
|
140405
140490
|
return new URL(STAGED_PREFIX + recorded, origin).toString();
|
|
140406
140491
|
}
|
|
140407
140492
|
const staged = writeStagedBytes(await derive(), origin, extension, directory2);
|
|
140408
|
-
const temporary = import_node_path153.default.join(directory2, (0,
|
|
140493
|
+
const temporary = import_node_path153.default.join(directory2, (0, import_node_crypto90.randomUUID)());
|
|
140409
140494
|
try {
|
|
140410
140495
|
import_node_fs151.default.writeFileSync(temporary, new URL(staged).pathname.slice(STAGED_PREFIX.length), {
|
|
140411
140496
|
flag: "wx"
|
|
@@ -140432,7 +140517,7 @@ function stageHostMetroAssets(assets2, origin) {
|
|
|
140432
140517
|
const name3 = staged.pathname.slice(STAGED_PREFIX.length);
|
|
140433
140518
|
const destination = import_node_path153.default.join(directory2, index);
|
|
140434
140519
|
stagedCapture.getStore()?.add(index);
|
|
140435
|
-
const temporary = import_node_path153.default.join(directory2, (0,
|
|
140520
|
+
const temporary = import_node_path153.default.join(directory2, (0, import_node_crypto90.randomUUID)());
|
|
140436
140521
|
try {
|
|
140437
140522
|
import_node_fs151.default.writeFileSync(temporary, name3, { flag: "wx" });
|
|
140438
140523
|
try {
|
|
@@ -140457,7 +140542,7 @@ function metroIndexName(url) {
|
|
|
140457
140542
|
url.searchParams.get("unstable_path"),
|
|
140458
140543
|
hashes[0]
|
|
140459
140544
|
]);
|
|
140460
|
-
return `metro-${(0,
|
|
140545
|
+
return `metro-${(0, import_node_crypto90.createHash)("sha256").update(key2).digest("hex")}`;
|
|
140461
140546
|
}
|
|
140462
140547
|
function metroRequestIndex(rawUrl) {
|
|
140463
140548
|
if (!rawUrl?.startsWith("/") || rawUrl.startsWith("//")) return null;
|
|
@@ -140485,7 +140570,7 @@ function prepareStagedDirectory() {
|
|
|
140485
140570
|
return directory2;
|
|
140486
140571
|
}
|
|
140487
140572
|
function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
140488
|
-
const digest3 = (0,
|
|
140573
|
+
const digest3 = (0, import_node_crypto90.createHash)("sha256").update(bytes).digest("hex");
|
|
140489
140574
|
extension = extension.toLowerCase();
|
|
140490
140575
|
const name3 = STAGED_NAME.test(digest3 + extension) ? digest3 + extension : digest3;
|
|
140491
140576
|
stagedCapture.getStore()?.add(name3);
|
|
@@ -140494,7 +140579,7 @@ function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
|
140494
140579
|
if (import_node_fs151.default.existsSync(destination)) {
|
|
140495
140580
|
import_node_fs151.default.utimesSync(destination, new Date(now), new Date(now));
|
|
140496
140581
|
} else {
|
|
140497
|
-
const temporary = import_node_path153.default.join(directory2, (0,
|
|
140582
|
+
const temporary = import_node_path153.default.join(directory2, (0, import_node_crypto90.randomUUID)());
|
|
140498
140583
|
try {
|
|
140499
140584
|
import_node_fs151.default.writeFileSync(temporary, bytes, { flag: "wx" });
|
|
140500
140585
|
import_node_fs151.default.renameSync(temporary, destination);
|
|
@@ -140566,12 +140651,12 @@ async function handleStagedHostFileRequest(req, res) {
|
|
|
140566
140651
|
throw error;
|
|
140567
140652
|
}
|
|
140568
140653
|
}
|
|
140569
|
-
var import_node_async_hooks4,
|
|
140654
|
+
var import_node_async_hooks4, import_node_crypto90, import_node_fs151, import_node_path153, stagedCapture, STAGED_PREFIX, STAGED_NAME, METRO_INDEX_NAME, STAGED_RETENTION_MS;
|
|
140570
140655
|
var init_staged_host_files = __esm({
|
|
140571
140656
|
"src/host/staged-host-files.ts"() {
|
|
140572
140657
|
"use strict";
|
|
140573
140658
|
import_node_async_hooks4 = require("node:async_hooks");
|
|
140574
|
-
|
|
140659
|
+
import_node_crypto90 = require("node:crypto");
|
|
140575
140660
|
import_node_fs151 = __toESM(require("node:fs"), 1);
|
|
140576
140661
|
import_node_path153 = __toESM(require("node:path"), 1);
|
|
140577
140662
|
init_uttype_mime();
|
|
@@ -141460,7 +141545,7 @@ async function oneNativeControlsPackage(appRoot, linkedGroups, sdk2) {
|
|
|
141460
141545
|
""
|
|
141461
141546
|
].join("\n");
|
|
141462
141547
|
}
|
|
141463
|
-
const digest3 = (0,
|
|
141548
|
+
const digest3 = (0, import_node_crypto91.createHash)("sha256").update(manifest);
|
|
141464
141549
|
for (const [name3, source] of files2)
|
|
141465
141550
|
digest3.update(name3).update("\0").update(source).update("\0");
|
|
141466
141551
|
const key2 = digest3.digest("hex").slice(0, 16);
|
|
@@ -141482,11 +141567,11 @@ async function oneNativeControlsPackage(appRoot, linkedGroups, sdk2) {
|
|
|
141482
141567
|
oneSDKModules: bindings && [...bindings.modules]
|
|
141483
141568
|
};
|
|
141484
141569
|
}
|
|
141485
|
-
var
|
|
141570
|
+
var import_node_crypto91, import_node_fs153, import_node_module21, import_node_path155, import_node_url8, ONE_SDK_DEFINES, BRIDGE_SWIFT, ONE_SDK_RUNTIME_SOURCES;
|
|
141486
141571
|
var init_one_native_controls_package = __esm({
|
|
141487
141572
|
"src/one-native-controls-package.ts"() {
|
|
141488
141573
|
"use strict";
|
|
141489
|
-
|
|
141574
|
+
import_node_crypto91 = require("node:crypto");
|
|
141490
141575
|
import_node_fs153 = __toESM(require("node:fs"), 1);
|
|
141491
141576
|
import_node_module21 = require("node:module");
|
|
141492
141577
|
import_node_path155 = __toESM(require("node:path"), 1);
|
|
@@ -142724,7 +142809,7 @@ async function readOneWidgetSources(appRoot) {
|
|
|
142724
142809
|
if (!Buffer.from(text7).equals(bytes))
|
|
142725
142810
|
throw new Error(`One widget prebuild source is not UTF-8: ${file}`);
|
|
142726
142811
|
files2.set(name3, text7);
|
|
142727
|
-
sources[import_node_path157.default.relative(root, file).split(import_node_path157.default.sep).join("/")] = (0,
|
|
142812
|
+
sources[import_node_path157.default.relative(root, file).split(import_node_path157.default.sep).join("/")] = (0, import_node_crypto92.createHash)("sha256").update(bytes).digest("hex");
|
|
142728
142813
|
}
|
|
142729
142814
|
const contract = files2.get("OneWidgetContract.swift") ?? "";
|
|
142730
142815
|
const source = files2.get("OneWidget.swift") ?? "";
|
|
@@ -142748,17 +142833,17 @@ async function configuredOneWidget(appRoot, bundleUrl, packageUrl) {
|
|
|
142748
142833
|
return {
|
|
142749
142834
|
metadata: source.widget,
|
|
142750
142835
|
projectRoot: source.root,
|
|
142751
|
-
appIdentity: (0,
|
|
142836
|
+
appIdentity: (0, import_node_crypto92.createHash)("sha256").update(JSON.stringify([source.root, source.widget.bundleId])).digest("hex"),
|
|
142752
142837
|
bundleUrl,
|
|
142753
142838
|
packageUrl,
|
|
142754
142839
|
urlSchemes: source.urlSchemes
|
|
142755
142840
|
};
|
|
142756
142841
|
}
|
|
142757
|
-
var
|
|
142842
|
+
var import_node_crypto92, import_node_fs155, import_node_path157, ONE_WIDGET_PACKAGE, nonEmpty;
|
|
142758
142843
|
var init_one_widget_metadata = __esm({
|
|
142759
142844
|
"src/one-widget-metadata.ts"() {
|
|
142760
142845
|
"use strict";
|
|
142761
|
-
|
|
142846
|
+
import_node_crypto92 = require("node:crypto");
|
|
142762
142847
|
import_node_fs155 = __toESM(require("node:fs"), 1);
|
|
142763
142848
|
import_node_path157 = __toESM(require("node:path"), 1);
|
|
142764
142849
|
init_is_record();
|
|
@@ -142792,7 +142877,7 @@ async function oneWidgetPackage(appRoot) {
|
|
|
142792
142877
|
const packagePath = import_node_path158.default.join(
|
|
142793
142878
|
import_node_os33.default.tmpdir(),
|
|
142794
142879
|
"peach-one-widgets",
|
|
142795
|
-
(0,
|
|
142880
|
+
(0, import_node_crypto93.createHash)("sha256").update(root).digest("hex"),
|
|
142796
142881
|
ONE_WIDGET_PACKAGE
|
|
142797
142882
|
);
|
|
142798
142883
|
import_node_fs156.default.mkdirSync(packagePath, { recursive: true });
|
|
@@ -142806,11 +142891,11 @@ async function oneWidgetPackage(appRoot) {
|
|
|
142806
142891
|
widget
|
|
142807
142892
|
};
|
|
142808
142893
|
}
|
|
142809
|
-
var
|
|
142894
|
+
var import_node_crypto93, import_node_fs156, import_node_os33, import_node_path158;
|
|
142810
142895
|
var init_one_widget_package = __esm({
|
|
142811
142896
|
"src/one-widget-package.ts"() {
|
|
142812
142897
|
"use strict";
|
|
142813
|
-
|
|
142898
|
+
import_node_crypto93 = require("node:crypto");
|
|
142814
142899
|
import_node_fs156 = __toESM(require("node:fs"), 1);
|
|
142815
142900
|
import_node_os33 = __toESM(require("node:os"), 1);
|
|
142816
142901
|
import_node_path158 = __toESM(require("node:path"), 1);
|
|
@@ -143026,7 +143111,7 @@ var init_android_view_classes = __esm({
|
|
|
143026
143111
|
|
|
143027
143112
|
// src/java-module-abi.ts
|
|
143028
143113
|
async function readJavaModuleSpecs(files2, sdkRoot, toolchain) {
|
|
143029
|
-
const digest3 = (0,
|
|
143114
|
+
const digest3 = (0, import_node_crypto94.createHash)("sha256");
|
|
143030
143115
|
const parent = import_node_path160.default.join(kotlinHome(), "java-specs");
|
|
143031
143116
|
import_node_fs158.default.mkdirSync(parent, { recursive: true });
|
|
143032
143117
|
const work = import_node_fs158.default.mkdtempSync(import_node_path160.default.join(parent, ".read-"));
|
|
@@ -143123,12 +143208,12 @@ async function compileJavaModuleAbi(input) {
|
|
|
143123
143208
|
);
|
|
143124
143209
|
return library;
|
|
143125
143210
|
}
|
|
143126
|
-
var import_node_child_process74,
|
|
143211
|
+
var import_node_child_process74, import_node_crypto94, import_node_fs158, import_node_path160, import_node_util20, run14, JAVA_BINDINGS_INITIALIZER;
|
|
143127
143212
|
var init_java_module_abi = __esm({
|
|
143128
143213
|
"src/java-module-abi.ts"() {
|
|
143129
143214
|
"use strict";
|
|
143130
143215
|
import_node_child_process74 = require("node:child_process");
|
|
143131
|
-
|
|
143216
|
+
import_node_crypto94 = require("node:crypto");
|
|
143132
143217
|
import_node_fs158 = __toESM(require("node:fs"), 1);
|
|
143133
143218
|
import_node_path160 = __toESM(require("node:path"), 1);
|
|
143134
143219
|
import_node_util20 = require("node:util");
|
|
@@ -143562,7 +143647,7 @@ function zipSources(bytes, where) {
|
|
|
143562
143647
|
return entries2;
|
|
143563
143648
|
}
|
|
143564
143649
|
function extract(bytes, where) {
|
|
143565
|
-
const key2 = (0,
|
|
143650
|
+
const key2 = (0, import_node_crypto95.createHash)("sha256").update(bytes).digest("hex");
|
|
143566
143651
|
const cached5 = pending.get(key2);
|
|
143567
143652
|
if (cached5) return cached5;
|
|
143568
143653
|
const request = (async () => {
|
|
@@ -143673,11 +143758,11 @@ async function kotlinSources(bytes, where) {
|
|
|
143673
143758
|
if (kotlin.length === 0) throw new Error(`${where}: sources jar has no Kotlin`);
|
|
143674
143759
|
return kotlin;
|
|
143675
143760
|
}
|
|
143676
|
-
var
|
|
143761
|
+
var import_node_crypto95, import_node_fs160, import_node_os34, import_node_path162, import_node_zlib9, pending, MAX_SOURCES_JAR_BYTES, MAX_SOURCE_ENTRY_BYTES, MAX_TOTAL_EXTRACTED_BYTES;
|
|
143677
143762
|
var init_kotlin_maven_sources = __esm({
|
|
143678
143763
|
"src/kotlin-maven-sources.ts"() {
|
|
143679
143764
|
"use strict";
|
|
143680
|
-
|
|
143765
|
+
import_node_crypto95 = require("node:crypto");
|
|
143681
143766
|
import_node_fs160 = __toESM(require("node:fs"), 1);
|
|
143682
143767
|
import_node_os34 = __toESM(require("node:os"), 1);
|
|
143683
143768
|
import_node_path162 = __toESM(require("node:path"), 1);
|
|
@@ -143767,7 +143852,7 @@ async function compileKotlinGradleLibraries(input) {
|
|
|
143767
143852
|
])
|
|
143768
143853
|
];
|
|
143769
143854
|
const name3 = library.coordinate.replace(/[^a-zA-Z0-9._-]/g, "-");
|
|
143770
|
-
const suffix = (0,
|
|
143855
|
+
const suffix = (0, import_node_crypto96.createHash)("sha256").update(library.coordinate).digest("hex").slice(0, 12);
|
|
143771
143856
|
const klib = import_node_path163.default.join(input.output, `${name3}-${suffix}.klib`);
|
|
143772
143857
|
const kotlinJvmAbi = java.length && kotlin.length && library.jars.length === 1 ? library.jars[0] : void 0;
|
|
143773
143858
|
const abiPairs = java.length ? dependencies.flatMap(
|
|
@@ -143809,11 +143894,11 @@ async function compileKotlinGradleLibraries(input) {
|
|
|
143809
143894
|
}
|
|
143810
143895
|
return [...compiled.values()].map(({ klib }) => klib);
|
|
143811
143896
|
}
|
|
143812
|
-
var
|
|
143897
|
+
var import_node_crypto96, import_node_fs161, import_node_path163;
|
|
143813
143898
|
var init_kotlin_gradle_library_plan = __esm({
|
|
143814
143899
|
"src/kotlin-gradle-library-plan.ts"() {
|
|
143815
143900
|
"use strict";
|
|
143816
|
-
|
|
143901
|
+
import_node_crypto96 = require("node:crypto");
|
|
143817
143902
|
import_node_fs161 = __toESM(require("node:fs"), 1);
|
|
143818
143903
|
import_node_path163 = __toESM(require("node:path"), 1);
|
|
143819
143904
|
init_kotlin_library_sources();
|
|
@@ -144049,13 +144134,13 @@ function verifyKotlinSdkDirectory(root, compiler) {
|
|
|
144049
144134
|
if (!stat2.isFile() || stat2.nlink !== 1)
|
|
144050
144135
|
throw new Error(`Kotlin SDK binary is not a regular file: ${name3}`);
|
|
144051
144136
|
const bytes = import_node_fs162.default.readFileSync(target);
|
|
144052
|
-
if (bytes.length !== expected.bytes || (0,
|
|
144137
|
+
if (bytes.length !== expected.bytes || (0, import_node_crypto97.createHash)("sha256").update(bytes).digest("hex") !== expected.sha256)
|
|
144053
144138
|
throw new Error(`Kotlin SDK binary differs from its manifest: ${name3}`);
|
|
144054
144139
|
}
|
|
144055
144140
|
return manifest;
|
|
144056
144141
|
}
|
|
144057
144142
|
async function installKotlinSdkArchive(archive, compiler) {
|
|
144058
|
-
const sha2565 = (0,
|
|
144143
|
+
const sha2565 = (0, import_node_crypto97.createHash)("sha256").update(archive).digest("hex");
|
|
144059
144144
|
const parent = import_node_path164.default.join(kotlinHome(), "sdk");
|
|
144060
144145
|
const root = import_node_path164.default.join(parent, sha2565);
|
|
144061
144146
|
if (import_node_fs162.default.existsSync(root))
|
|
@@ -144084,12 +144169,12 @@ async function installKotlinSdkArchive(archive, compiler) {
|
|
|
144084
144169
|
import_node_fs162.default.rmSync(work, { recursive: true, force: true });
|
|
144085
144170
|
}
|
|
144086
144171
|
}
|
|
144087
|
-
var import_node_child_process76,
|
|
144172
|
+
var import_node_child_process76, import_node_crypto97, import_node_fs162, import_node_path164, import_node_util21, run15;
|
|
144088
144173
|
var init_kotlin_sdk = __esm({
|
|
144089
144174
|
"src/kotlin-sdk.ts"() {
|
|
144090
144175
|
"use strict";
|
|
144091
144176
|
import_node_child_process76 = require("node:child_process");
|
|
144092
|
-
|
|
144177
|
+
import_node_crypto97 = require("node:crypto");
|
|
144093
144178
|
import_node_fs162 = __toESM(require("node:fs"), 1);
|
|
144094
144179
|
import_node_path164 = __toESM(require("node:path"), 1);
|
|
144095
144180
|
import_node_util21 = require("node:util");
|
|
@@ -144225,7 +144310,7 @@ function peachKotlinModuleRoot() {
|
|
|
144225
144310
|
if (!IS_STANDALONE) return import_node_path165.default.join(peachsimPackageRoot(), "kotlin");
|
|
144226
144311
|
if (installedRoot) return installedRoot;
|
|
144227
144312
|
const files2 = JSON.parse(__PEACH_BUNDLED_KOTLIN__);
|
|
144228
|
-
const digest3 = (0,
|
|
144313
|
+
const digest3 = (0, import_node_crypto98.createHash)("sha256").update(__PEACH_BUNDLED_KOTLIN__).digest("hex");
|
|
144229
144314
|
const parent = import_node_path165.default.join(rnxHomeDir(), "kotlin", "modules");
|
|
144230
144315
|
const root = import_node_path165.default.join(parent, digest3);
|
|
144231
144316
|
import_node_fs163.default.mkdirSync(parent, { recursive: true });
|
|
@@ -144254,11 +144339,11 @@ function peachKotlinModuleRoot() {
|
|
|
144254
144339
|
installedRoot = root;
|
|
144255
144340
|
return root;
|
|
144256
144341
|
}
|
|
144257
|
-
var
|
|
144342
|
+
var import_node_crypto98, import_node_fs163, import_node_path165, installedRoot;
|
|
144258
144343
|
var init_kotlin_module = __esm({
|
|
144259
144344
|
"src/kotlin-module.ts"() {
|
|
144260
144345
|
"use strict";
|
|
144261
|
-
|
|
144346
|
+
import_node_crypto98 = require("node:crypto");
|
|
144262
144347
|
import_node_fs163 = __toESM(require("node:fs"), 1);
|
|
144263
144348
|
import_node_path165 = __toESM(require("node:path"), 1);
|
|
144264
144349
|
init_standalone();
|
|
@@ -144292,7 +144377,7 @@ async function resolveAndroidGradleSources(request) {
|
|
|
144292
144377
|
const parent = import_node_path166.default.join(kotlinHome(), "gradle-sources");
|
|
144293
144378
|
import_node_fs164.default.mkdirSync(parent, { recursive: true });
|
|
144294
144379
|
const work = import_node_fs164.default.mkdtempSync(import_node_path166.default.join(parent, ".query-"));
|
|
144295
|
-
const task = `peachAndroidSources${(0,
|
|
144380
|
+
const task = `peachAndroidSources${(0, import_node_crypto99.randomBytes)(8).toString("hex")}`;
|
|
144296
144381
|
const script = import_node_path166.default.join(work, "sources.gradle");
|
|
144297
144382
|
const encoded = Buffer.from(
|
|
144298
144383
|
JSON.stringify({
|
|
@@ -144444,12 +144529,12 @@ function readDependencySources(value) {
|
|
|
144444
144529
|
};
|
|
144445
144530
|
});
|
|
144446
144531
|
}
|
|
144447
|
-
var import_node_child_process77,
|
|
144532
|
+
var import_node_child_process77, import_node_crypto99, import_node_fs164, import_node_path166, import_node_util22, run16, modelQuery;
|
|
144448
144533
|
var init_android_gradle_sources = __esm({
|
|
144449
144534
|
"src/android-gradle-sources.ts"() {
|
|
144450
144535
|
"use strict";
|
|
144451
144536
|
import_node_child_process77 = require("node:child_process");
|
|
144452
|
-
|
|
144537
|
+
import_node_crypto99 = require("node:crypto");
|
|
144453
144538
|
import_node_fs164 = __toESM(require("node:fs"), 1);
|
|
144454
144539
|
import_node_path166 = __toESM(require("node:path"), 1);
|
|
144455
144540
|
import_node_util22 = require("node:util");
|
|
@@ -144864,7 +144949,7 @@ function readExpoTypes(output) {
|
|
|
144864
144949
|
});
|
|
144865
144950
|
}
|
|
144866
144951
|
async function scanSources(tool, parse19, toolchain, moduleRoot, files2) {
|
|
144867
|
-
const digest3 = (0,
|
|
144952
|
+
const digest3 = (0, import_node_crypto100.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
|
|
144868
144953
|
const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
|
|
144869
144954
|
digest3.update(import_node_fs165.default.readFileSync(import_node_path167.default.join(moduleRoot, "sdk.tar.gz")));
|
|
144870
144955
|
digest3.update(tool);
|
|
@@ -145526,7 +145611,7 @@ async function compileKotlin(input, origin) {
|
|
|
145526
145611
|
bytes: import_node_fs165.default.readFileSync(file)
|
|
145527
145612
|
}));
|
|
145528
145613
|
const { composeArchive, ...compilerInputs } = toolchain;
|
|
145529
|
-
const digest3 = (0,
|
|
145614
|
+
const digest3 = (0, import_node_crypto100.createHash)("sha256");
|
|
145530
145615
|
digest3.update(
|
|
145531
145616
|
JSON.stringify({
|
|
145532
145617
|
format: BUILD_FORMAT,
|
|
@@ -145548,7 +145633,7 @@ async function compileKotlin(input, origin) {
|
|
|
145548
145633
|
...gradleLibraries.libraries.flatMap(({ archive, jars }) => [archive, ...jars])
|
|
145549
145634
|
]);
|
|
145550
145635
|
for (const file of files2) {
|
|
145551
|
-
digest3.update((0,
|
|
145636
|
+
digest3.update((0, import_node_crypto100.createHash)("sha256").update(import_node_fs165.default.readFileSync(file)).digest());
|
|
145552
145637
|
}
|
|
145553
145638
|
}
|
|
145554
145639
|
if (viewModels) digest3.update(viewModels.toolClass);
|
|
@@ -145840,12 +145925,12 @@ async function serveKotlinRequest(pathname, res, app) {
|
|
|
145840
145925
|
}
|
|
145841
145926
|
return true;
|
|
145842
145927
|
}
|
|
145843
|
-
var import_node_child_process78,
|
|
145928
|
+
var import_node_child_process78, import_node_crypto100, import_node_fs165, import_node_module22, import_node_path167, import_node_util23, run17, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal5, CONTENT_TYPES;
|
|
145844
145929
|
var init_kotlin_host = __esm({
|
|
145845
145930
|
"src/kotlin-host.ts"() {
|
|
145846
145931
|
"use strict";
|
|
145847
145932
|
import_node_child_process78 = require("node:child_process");
|
|
145848
|
-
|
|
145933
|
+
import_node_crypto100 = require("node:crypto");
|
|
145849
145934
|
import_node_fs165 = __toESM(require("node:fs"), 1);
|
|
145850
145935
|
import_node_module22 = require("node:module");
|
|
145851
145936
|
import_node_path167 = __toESM(require("node:path"), 1);
|
|
@@ -146201,7 +146286,7 @@ async function readManagedExpoIdentity(root, platform3, iosTarget, bridgeOrigin)
|
|
|
146201
146286
|
url.searchParams.set("root", root);
|
|
146202
146287
|
const response = await nodeHttpFetch(url.href);
|
|
146203
146288
|
if (response.ok && response.headers.get("content-type") === revisionType) {
|
|
146204
|
-
const environment = (0,
|
|
146289
|
+
const environment = (0, import_node_crypto101.createHash)("sha256").update(JSON.stringify(Object.entries(process.env).sort())).digest("hex");
|
|
146205
146290
|
const inputs2 = Buffer.from(
|
|
146206
146291
|
JSON.stringify([
|
|
146207
146292
|
await response.text(),
|
|
@@ -146257,11 +146342,11 @@ function handleManagedExpoInputs(req, res, url) {
|
|
|
146257
146342
|
res.writeHead(200, { "Content-Type": revisionType });
|
|
146258
146343
|
res.end(revision);
|
|
146259
146344
|
}
|
|
146260
|
-
var
|
|
146345
|
+
var import_node_crypto101, import_node_fs167, import_node_path169, revisionType;
|
|
146261
146346
|
var init_managed_expo_identity = __esm({
|
|
146262
146347
|
"src/managed-expo-identity.ts"() {
|
|
146263
146348
|
"use strict";
|
|
146264
|
-
|
|
146349
|
+
import_node_crypto101 = require("node:crypto");
|
|
146265
146350
|
import_node_fs167 = __toESM(require("node:fs"), 1);
|
|
146266
146351
|
import_node_path169 = __toESM(require("node:path"), 1);
|
|
146267
146352
|
init_backend_origin();
|
|
@@ -146481,7 +146566,7 @@ async function stagePreparedExpoWidgetAssets(preparedApp, origin) {
|
|
|
146481
146566
|
const ext = import_node_path172.default.extname(file);
|
|
146482
146567
|
if (ext.toLowerCase() === ".svg") return stageCatalogSvg(file, scale, origin, bytes);
|
|
146483
146568
|
if (ext.toLowerCase() === ".pdf") {
|
|
146484
|
-
const sha2565 = (0,
|
|
146569
|
+
const sha2565 = (0, import_node_crypto102.createHash)("sha256").update(bytes).digest("hex");
|
|
146485
146570
|
const png = rasterizePdfFiles([{ file: members2.get(file), sha256: sha2565 }]).get(sha2565);
|
|
146486
146571
|
return stageHostBytes(png, origin, ".png");
|
|
146487
146572
|
}
|
|
@@ -146494,11 +146579,11 @@ async function stageExpoWidgetAssets(appRoot, origin) {
|
|
|
146494
146579
|
const prepared = await prepareExpoNativeProject(appRoot);
|
|
146495
146580
|
return stagePreparedExpoWidgetAssets(prepared.app, origin);
|
|
146496
146581
|
}
|
|
146497
|
-
var
|
|
146582
|
+
var import_node_crypto102, import_node_fs169, import_node_path172;
|
|
146498
146583
|
var init_expo_widget_assets = __esm({
|
|
146499
146584
|
"src/expo-widget-assets.ts"() {
|
|
146500
146585
|
"use strict";
|
|
146501
|
-
|
|
146586
|
+
import_node_crypto102 = require("node:crypto");
|
|
146502
146587
|
import_node_fs169 = __toESM(require("node:fs"), 1);
|
|
146503
146588
|
import_node_path172 = __toESM(require("node:path"), 1);
|
|
146504
146589
|
init_app_catalog();
|
|
@@ -146553,11 +146638,11 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
|
|
|
146553
146638
|
"specifications",
|
|
146554
146639
|
`${checksum}.json`
|
|
146555
146640
|
);
|
|
146556
|
-
const sha1 = (value) => (0,
|
|
146641
|
+
const sha1 = (value) => (0, import_node_crypto103.createHash)("sha1").update(value).digest("hex");
|
|
146557
146642
|
let text7;
|
|
146558
146643
|
if (import_node_fs170.default.existsSync(file)) text7 = import_node_fs170.default.readFileSync(file, "utf8");
|
|
146559
146644
|
else {
|
|
146560
|
-
const shard2 = (0,
|
|
146645
|
+
const shard2 = (0, import_node_crypto103.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
|
|
146561
146646
|
const specPath = `Specs/${shard2}/${root}/${version2}/${root}.podspec.json`;
|
|
146562
146647
|
const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
|
|
146563
146648
|
if (!response.ok)
|
|
@@ -146686,7 +146771,7 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
146686
146771
|
"end",
|
|
146687
146772
|
""
|
|
146688
146773
|
].join("\n");
|
|
146689
|
-
const key2 = (0,
|
|
146774
|
+
const key2 = (0, import_node_crypto103.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
|
|
146690
146775
|
JSON.stringify(
|
|
146691
146776
|
Object.entries(specificationChecksums).sort(([a], [b]) => a.localeCompare(b))
|
|
146692
146777
|
)
|
|
@@ -146755,11 +146840,11 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
|
|
|
146755
146840
|
);
|
|
146756
146841
|
});
|
|
146757
146842
|
}
|
|
146758
|
-
var
|
|
146843
|
+
var import_node_crypto103, import_node_fs170, import_node_path173, APP, record5, project, podModuleName;
|
|
146759
146844
|
var init_swift_source_pods = __esm({
|
|
146760
146845
|
"src/swift-source-pods.ts"() {
|
|
146761
146846
|
"use strict";
|
|
146762
|
-
|
|
146847
|
+
import_node_crypto103 = require("node:crypto");
|
|
146763
146848
|
import_node_fs170 = __toESM(require("node:fs"), 1);
|
|
146764
146849
|
import_node_path173 = __toESM(require("node:path"), 1);
|
|
146765
146850
|
init_browser();
|
|
@@ -147436,7 +147521,7 @@ async function prepareNitroCompileInput(options2) {
|
|
|
147436
147521
|
input.libraries ??= {};
|
|
147437
147522
|
input.libraries[nitroProviderTarget({ name: name3 })] = library;
|
|
147438
147523
|
}
|
|
147439
|
-
const key2 = (0,
|
|
147524
|
+
const key2 = (0, import_node_crypto104.createHash)("sha256").update(
|
|
147440
147525
|
collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
|
|
147441
147526
|
).update("\0").update(import_node_fs171.default.realpathSync(options2.moduleRoot)).update("\0").update(options2.configuration).digest("hex");
|
|
147442
147527
|
const packagePath = import_node_path174.default.join(import_node_os35.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
|
|
@@ -147493,11 +147578,11 @@ function nitrogenGeneratedSources(podDirectory) {
|
|
|
147493
147578
|
...sources(import_node_path174.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
|
|
147494
147579
|
];
|
|
147495
147580
|
}
|
|
147496
|
-
var
|
|
147581
|
+
var import_node_crypto104, import_node_fs171, import_node_os35, import_node_path174, BUNDLED_CXX_NAMESPACES, REACT_INCLUDE_PATTERN, REACT_LINKING_PATTERN, REACT_VERSION_PATTERN, RN_HEADER_DIR_MAP, RN_COMMON_ROOTS;
|
|
147497
147582
|
var init_nitro_compile = __esm({
|
|
147498
147583
|
"src/nitro-compile.ts"() {
|
|
147499
147584
|
"use strict";
|
|
147500
|
-
|
|
147585
|
+
import_node_crypto104 = require("node:crypto");
|
|
147501
147586
|
import_node_fs171 = __toESM(require("node:fs"), 1);
|
|
147502
147587
|
import_node_os35 = __toESM(require("node:os"), 1);
|
|
147503
147588
|
import_node_path174 = __toESM(require("node:path"), 1);
|
|
@@ -147574,11 +147659,11 @@ var init_nitro_compile = __esm({
|
|
|
147574
147659
|
});
|
|
147575
147660
|
|
|
147576
147661
|
// src/nitro-compiler-digest.ts
|
|
147577
|
-
var
|
|
147662
|
+
var import_node_crypto105, import_node_fs172, import_node_path175;
|
|
147578
147663
|
var init_nitro_compiler_digest = __esm({
|
|
147579
147664
|
"src/nitro-compiler-digest.ts"() {
|
|
147580
147665
|
"use strict";
|
|
147581
|
-
|
|
147666
|
+
import_node_crypto105 = require("node:crypto");
|
|
147582
147667
|
import_node_fs172 = require("node:fs");
|
|
147583
147668
|
import_node_path175 = __toESM(require("node:path"), 1);
|
|
147584
147669
|
init_swift_compiler_digest();
|
|
@@ -147716,7 +147801,7 @@ var init_nitro_superset = __esm({
|
|
|
147716
147801
|
init_nitroContract();
|
|
147717
147802
|
init_swift_standin_digest();
|
|
147718
147803
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
147719
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
147804
|
+
NITRO_COMPILER_DIGEST = true ? "bdc0f5dd61f31a5b6f5bba3db67fc29584077dfb64bd237228a11b91b9ab2730" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
147720
147805
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
147721
147806
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
147722
147807
|
published3 = /* @__PURE__ */ new Map();
|
|
@@ -148245,7 +148330,7 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
|
|
|
148245
148330
|
const packagePath = import_node_path179.default.join(
|
|
148246
148331
|
swiftCacheDir(),
|
|
148247
148332
|
"peach-one-sdk-swift",
|
|
148248
|
-
(0,
|
|
148333
|
+
(0, import_node_crypto106.createHash)("sha256").update(import_node_fs175.default.realpathSync(appRoot)).digest("hex").slice(0, 16),
|
|
148249
148334
|
"sdk"
|
|
148250
148335
|
);
|
|
148251
148336
|
const bindingFlags = optimize ? '["-suppress-warnings"]' : '["-suppress-warnings", "-Onone", "-no-whole-module-optimization"]';
|
|
@@ -148292,11 +148377,11 @@ async function buildOneSDKBundle(appRoot) {
|
|
|
148292
148377
|
assets: await compiledModuleAssets(compiled.artifact)
|
|
148293
148378
|
};
|
|
148294
148379
|
}
|
|
148295
|
-
var
|
|
148380
|
+
var import_node_crypto106, import_node_fs175, import_node_path179, ONE_SDK_ROUTE, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES, handleOneSDKRequest;
|
|
148296
148381
|
var init_one_sdk_bundle = __esm({
|
|
148297
148382
|
"src/one-sdk-bundle.ts"() {
|
|
148298
148383
|
"use strict";
|
|
148299
|
-
|
|
148384
|
+
import_node_crypto106 = require("node:crypto");
|
|
148300
148385
|
import_node_fs175 = __toESM(require("node:fs"), 1);
|
|
148301
148386
|
import_node_path179 = __toESM(require("node:path"), 1);
|
|
148302
148387
|
init_expo_native_workspace();
|
|
@@ -148986,7 +149071,7 @@ function writeSharedDesktopAuthSession(session) {
|
|
|
148986
149071
|
validatedAt: session.validatedAt ?? same?.validatedAt,
|
|
148987
149072
|
accountId: session.accountId?.trim() || same?.accountId
|
|
148988
149073
|
};
|
|
148989
|
-
const temporary = `${filepath}.${process.pid}.${(0,
|
|
149074
|
+
const temporary = `${filepath}.${process.pid}.${(0, import_node_crypto107.randomUUID)()}.tmp`;
|
|
148990
149075
|
try {
|
|
148991
149076
|
(0, import_node_fs179.writeFileSync)(temporary, JSON.stringify(normalized, null, 2) + "\n", {
|
|
148992
149077
|
mode: 384,
|
|
@@ -149038,11 +149123,11 @@ async function refreshSharedDesktopAuthSession(originOverride) {
|
|
|
149038
149123
|
return readSharedDesktopAuthSession();
|
|
149039
149124
|
}
|
|
149040
149125
|
}
|
|
149041
|
-
var
|
|
149126
|
+
var import_node_crypto107, import_node_fs179, import_node_path184, SESSION_VERSION, SESSION_FILE_ENV, DEFAULT_ORIGIN;
|
|
149042
149127
|
var init_shared_session = __esm({
|
|
149043
149128
|
"src/auth/shared-session.ts"() {
|
|
149044
149129
|
"use strict";
|
|
149045
|
-
|
|
149130
|
+
import_node_crypto107 = require("node:crypto");
|
|
149046
149131
|
import_node_fs179 = require("node:fs");
|
|
149047
149132
|
import_node_path184 = require("node:path");
|
|
149048
149133
|
init_home_paths();
|
|
@@ -149083,7 +149168,7 @@ var init_run_rnx = __esm({
|
|
|
149083
149168
|
// cli/secure-file.ts
|
|
149084
149169
|
function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
|
|
149085
149170
|
(0, import_node_fs180.mkdirSync)((0, import_node_path185.dirname)(filepath), { recursive: true });
|
|
149086
|
-
const temporary = `${filepath}.tmp-${process.pid}-${(0,
|
|
149171
|
+
const temporary = `${filepath}.tmp-${process.pid}-${(0, import_node_crypto108.randomUUID)()}`;
|
|
149087
149172
|
let descriptor = null;
|
|
149088
149173
|
try {
|
|
149089
149174
|
descriptor = (0, import_node_fs180.openSync)(temporary, "wx", 384);
|
|
@@ -149100,11 +149185,11 @@ function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
|
|
|
149100
149185
|
throw error;
|
|
149101
149186
|
}
|
|
149102
149187
|
}
|
|
149103
|
-
var
|
|
149188
|
+
var import_node_crypto108, import_node_fs180, import_node_path185;
|
|
149104
149189
|
var init_secure_file = __esm({
|
|
149105
149190
|
"cli/secure-file.ts"() {
|
|
149106
149191
|
"use strict";
|
|
149107
|
-
|
|
149192
|
+
import_node_crypto108 = require("node:crypto");
|
|
149108
149193
|
import_node_fs180 = require("node:fs");
|
|
149109
149194
|
import_node_path185 = require("node:path");
|
|
149110
149195
|
}
|
|
@@ -151613,7 +151698,7 @@ function projectSessionFile() {
|
|
|
151613
151698
|
}
|
|
151614
151699
|
dir = parent;
|
|
151615
151700
|
}
|
|
151616
|
-
const key2 = (0,
|
|
151701
|
+
const key2 = (0, import_node_crypto109.createHash)("sha256").update(dir).digest("hex").slice(0, 32);
|
|
151617
151702
|
return (0, import_node_path187.join)(rnxHomeDir(), "remote-sessions", `${key2}.json`);
|
|
151618
151703
|
}
|
|
151619
151704
|
function readCloudSession() {
|
|
@@ -151627,11 +151712,11 @@ function readCloudSession() {
|
|
|
151627
151712
|
}
|
|
151628
151713
|
return parseCloudSession(saved.session);
|
|
151629
151714
|
}
|
|
151630
|
-
var
|
|
151715
|
+
var import_node_crypto109, import_node_fs182, import_node_path187, CLOUD_SESSION_VERSION, MAX_ENCODED_SESSION_BYTES, PEACH_CLOUD_SESSION_ENV, RNX_SHELL_UPDATE_PREFIX, RNX_SHELL_UPDATE_SET_PREFIX, RNX_SHELL_UPDATE_UNSET, PROJECT_MARKERS;
|
|
151631
151716
|
var init_cloud_session = __esm({
|
|
151632
151717
|
"cli/cloud-session.ts"() {
|
|
151633
151718
|
"use strict";
|
|
151634
|
-
|
|
151719
|
+
import_node_crypto109 = require("node:crypto");
|
|
151635
151720
|
import_node_fs182 = require("node:fs");
|
|
151636
151721
|
import_node_path187 = require("node:path");
|
|
151637
151722
|
init_backend_origin();
|
|
@@ -152513,7 +152598,7 @@ function listMetroAssetDest(assetsPath) {
|
|
|
152513
152598
|
return { directory: directory2, files: files2, truncated };
|
|
152514
152599
|
}
|
|
152515
152600
|
function metroDescriptorHash(scaleBytes) {
|
|
152516
|
-
const hasher = (0,
|
|
152601
|
+
const hasher = (0, import_node_crypto110.createHash)("md5");
|
|
152517
152602
|
for (const bytes of scaleBytes) hasher.update(bytes);
|
|
152518
152603
|
return hasher.digest("hex");
|
|
152519
152604
|
}
|
|
@@ -152542,7 +152627,7 @@ function distinctByContent(directory2, options2) {
|
|
|
152542
152627
|
} catch {
|
|
152543
152628
|
continue;
|
|
152544
152629
|
}
|
|
152545
|
-
const digest3 = (0,
|
|
152630
|
+
const digest3 = (0, import_node_crypto110.createHash)("md5").update(bytes).digest("hex");
|
|
152546
152631
|
if (!byContent.has(digest3)) byContent.set(digest3, relative7);
|
|
152547
152632
|
}
|
|
152548
152633
|
return [...byContent.values()];
|
|
@@ -152590,7 +152675,7 @@ function placeMetroDescriptor(listing, descriptor) {
|
|
|
152590
152675
|
continue;
|
|
152591
152676
|
}
|
|
152592
152677
|
const identical = fileHashes2 ? bytes.every((file, index) => {
|
|
152593
|
-
const digest3 = (0,
|
|
152678
|
+
const digest3 = (0, import_node_crypto110.createHash)("md5").update(file).digest("hex");
|
|
152594
152679
|
return descriptor.scales.some(
|
|
152595
152680
|
(scale, declared) => scale === scales[index] && fileHashes2[declared] === digest3
|
|
152596
152681
|
);
|
|
@@ -152615,7 +152700,7 @@ function unverifiedContentKey(dest, fileDigests2) {
|
|
|
152615
152700
|
const file = (0, import_node_path189.join)(dest.directory, relative7);
|
|
152616
152701
|
let digest3 = fileDigests2.get(file);
|
|
152617
152702
|
if (digest3 === void 0) {
|
|
152618
|
-
digest3 = (0,
|
|
152703
|
+
digest3 = (0, import_node_crypto110.createHash)("sha256").update((0, import_node_fs184.readFileSync)(file)).digest("hex");
|
|
152619
152704
|
fileDigests2.set(file, digest3);
|
|
152620
152705
|
}
|
|
152621
152706
|
return [scale, digest3];
|
|
@@ -152770,14 +152855,14 @@ async function producePreviewArtifact(bundlePath) {
|
|
|
152770
152855
|
prepared.code
|
|
152771
152856
|
);
|
|
152772
152857
|
const bytes = Buffer.from(annotated, "utf8");
|
|
152773
|
-
const sha2565 = (0,
|
|
152858
|
+
const sha2565 = (0, import_node_crypto110.createHash)("sha256").update(bytes).digest("hex");
|
|
152774
152859
|
return {
|
|
152775
152860
|
bytes,
|
|
152776
152861
|
sha256: sha2565,
|
|
152777
152862
|
minified: false,
|
|
152778
152863
|
receipt: {
|
|
152779
152864
|
source: {
|
|
152780
|
-
sha256: (0,
|
|
152865
|
+
sha256: (0, import_node_crypto110.createHash)("sha256").update(prepared.source).digest("hex"),
|
|
152781
152866
|
bytes: Buffer.byteLength(prepared.source, "utf8")
|
|
152782
152867
|
},
|
|
152783
152868
|
artifact: { sha256: sha2565, bytes: bytes.byteLength }
|
|
@@ -152933,7 +153018,7 @@ async function produceArtifact(prepared, maxBytes, command) {
|
|
|
152933
153018
|
}
|
|
152934
153019
|
return {
|
|
152935
153020
|
bytes,
|
|
152936
|
-
sha256: (0,
|
|
153021
|
+
sha256: (0, import_node_crypto110.createHash)("sha256").update(bytes).digest("hex"),
|
|
152937
153022
|
receipt: artifact.receipt,
|
|
152938
153023
|
assetsDirectory: prepared.dest?.directory ?? null,
|
|
152939
153024
|
warnings
|
|
@@ -153449,11 +153534,11 @@ async function closeCloudSession(session) {
|
|
|
153449
153534
|
throw responseError(response.status, text7);
|
|
153450
153535
|
}
|
|
153451
153536
|
}
|
|
153452
|
-
var
|
|
153537
|
+
var import_node_crypto110, import_node_fs184, import_node_path189, import_node_vm, DEFAULT_RNX_CLOUD_ORIGIN, MAX_RNX_CLOUD_BUNDLE_BYTES, REMOTE_COMMAND, PREVIEW_COMMAND, NanoDevelopmentOnlyError, UnsupportedRemoteHostError, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS, REMOTE_HAS_NO_LOCAL_SIMS, CloudBridge, CloudBoxBridge, SceneBridge, BoxBootFailedError, BOX_BOOT_WAIT_MS;
|
|
153453
153538
|
var init_cloud_client = __esm({
|
|
153454
153539
|
"cli/cloud-client.ts"() {
|
|
153455
153540
|
"use strict";
|
|
153456
|
-
|
|
153541
|
+
import_node_crypto110 = require("node:crypto");
|
|
153457
153542
|
import_node_fs184 = require("node:fs");
|
|
153458
153543
|
import_node_path189 = require("node:path");
|
|
153459
153544
|
import_node_vm = require("node:vm");
|
|
@@ -153526,7 +153611,7 @@ var init_cloud_client = __esm({
|
|
|
153526
153611
|
const timeoutMs = options2?.timeoutMs ?? this.explicitTimeoutMs ?? options2?.defaultTimeoutMs;
|
|
153527
153612
|
const agent = commandAgent(command);
|
|
153528
153613
|
const body = {
|
|
153529
|
-
id: (0,
|
|
153614
|
+
id: (0, import_node_crypto110.randomUUID)(),
|
|
153530
153615
|
claimId: this.session.claimId,
|
|
153531
153616
|
command: cloudCommand(agent ? { ...command, agent } : command)
|
|
153532
153617
|
};
|
|
@@ -153596,7 +153681,7 @@ var init_cloud_client = __esm({
|
|
|
153596
153681
|
plane = "cloud";
|
|
153597
153682
|
async send(command, options2) {
|
|
153598
153683
|
const timeoutMs = options2?.timeoutMs ?? this.explicitTimeoutMs ?? options2?.defaultTimeoutMs;
|
|
153599
|
-
const id = (0,
|
|
153684
|
+
const id = (0, import_node_crypto110.randomUUID)();
|
|
153600
153685
|
const agent = commandAgent(command);
|
|
153601
153686
|
const payload = cloudCommand(agent ? { ...command, agent } : command);
|
|
153602
153687
|
let response;
|
|
@@ -157716,11 +157801,11 @@ function splashImageUrls(spec) {
|
|
|
157716
157801
|
if (spec.dark?.backgroundImageUrl) urls.add(spec.dark.backgroundImageUrl);
|
|
157717
157802
|
return [...urls];
|
|
157718
157803
|
}
|
|
157719
|
-
var
|
|
157804
|
+
var import_node_crypto111, import_node_module28, require2;
|
|
157720
157805
|
var init_app_splash = __esm({
|
|
157721
157806
|
"cli/app-splash.ts"() {
|
|
157722
157807
|
"use strict";
|
|
157723
|
-
|
|
157808
|
+
import_node_crypto111 = require("node:crypto");
|
|
157724
157809
|
import_node_module28 = require("node:module");
|
|
157725
157810
|
init_backend_origin();
|
|
157726
157811
|
init_cli_runtime();
|
|
@@ -157774,7 +157859,7 @@ function extractAppBinaryBundle(binary2) {
|
|
|
157774
157859
|
);
|
|
157775
157860
|
const sidecar = import_node_path194.default.posix.dirname(manifestEntry);
|
|
157776
157861
|
const appRoot = import_node_path194.default.posix.dirname(sidecar);
|
|
157777
|
-
const digest3 = (0,
|
|
157862
|
+
const digest3 = (0, import_node_crypto112.createHash)("sha256").update(import_node_fs189.default.readFileSync(file)).digest("hex");
|
|
157778
157863
|
const out = import_node_path194.default.join(cacheDir(), "app-binaries", digest3);
|
|
157779
157864
|
const bundlePath = import_node_path194.default.join(out, "main.js");
|
|
157780
157865
|
const extracted = import_node_path194.default.join(out, "extracted");
|
|
@@ -157792,7 +157877,7 @@ function extractAppBinaryBundle(binary2) {
|
|
|
157792
157877
|
const bundle = (0, import_node_zlib12.brotliDecompressSync)(
|
|
157793
157878
|
import_node_fs189.default.readFileSync(import_node_path194.default.join(extracted, sidecar, PEACH_SIDECAR_BUNDLE))
|
|
157794
157879
|
);
|
|
157795
|
-
if ((0,
|
|
157880
|
+
if ((0, import_node_crypto112.createHash)("sha256").update(bundle).digest("hex") !== manifest.bundleSha256)
|
|
157796
157881
|
throw new Error(`${binary2}: the peach sidecar bundle does not match its manifest`);
|
|
157797
157882
|
const assets2 = manifest.platform === "ios" ? import_node_path194.default.join(extracted, appRoot, "assets") : import_node_path194.default.join(extracted, sidecar, PEACH_SIDECAR_ASSETS);
|
|
157798
157883
|
if (import_node_fs189.default.existsSync(assets2)) import_node_fs189.default.renameSync(assets2, import_node_path194.default.join(out, "assets"));
|
|
@@ -157812,12 +157897,12 @@ function extractAppBinaryBundle(binary2) {
|
|
|
157812
157897
|
);
|
|
157813
157898
|
return { bundlePath, platform: platform3 };
|
|
157814
157899
|
}
|
|
157815
|
-
var import_node_child_process81,
|
|
157900
|
+
var import_node_child_process81, import_node_crypto112, import_node_fs189, import_node_path194, import_node_zlib12;
|
|
157816
157901
|
var init_binary_sidecar = __esm({
|
|
157817
157902
|
"cli/binary-sidecar.ts"() {
|
|
157818
157903
|
"use strict";
|
|
157819
157904
|
import_node_child_process81 = require("node:child_process");
|
|
157820
|
-
|
|
157905
|
+
import_node_crypto112 = require("node:crypto");
|
|
157821
157906
|
import_node_fs189 = __toESM(require("node:fs"), 1);
|
|
157822
157907
|
import_node_path194 = __toESM(require("node:path"), 1);
|
|
157823
157908
|
import_node_zlib12 = require("node:zlib");
|
|
@@ -158653,7 +158738,7 @@ var init_core = __esm({
|
|
|
158653
158738
|
// cli/output-redaction.ts
|
|
158654
158739
|
function mask(value) {
|
|
158655
158740
|
if (MASKED.test(value)) return value;
|
|
158656
|
-
return `<redacted:${(0,
|
|
158741
|
+
return `<redacted:${(0, import_node_crypto113.createHash)("sha256").update(value).digest("hex").slice(0, 4)}>`;
|
|
158657
158742
|
}
|
|
158658
158743
|
function maskQuoted(quoted2) {
|
|
158659
158744
|
return `${quoted2[0]}${mask(quoted2.slice(1, -1))}${quoted2[0]}`;
|
|
@@ -158775,11 +158860,11 @@ function redactText(text7, configurationOnly, decodedString = false) {
|
|
|
158775
158860
|
(line, prefix, name3, value) => SECRET_NAME.test(name3) ? `${prefix}${mask(value)}` : line
|
|
158776
158861
|
).replace(EMAIL, mask).replace(OPAQUE_ID, mask);
|
|
158777
158862
|
}
|
|
158778
|
-
var
|
|
158863
|
+
var import_node_crypto113, import_node_util26, SECRET_NAME, JWT, GOOGLE_API_KEY, BEARER, EMAIL, OPAQUE_ID, STRING, NUMBER, PAIR2, STRING_TOKEN, QUERY_PAIR, HEADER_LINE, MASKED, CONFIG_CONTAINER, utf8;
|
|
158779
158864
|
var init_output_redaction = __esm({
|
|
158780
158865
|
"cli/output-redaction.ts"() {
|
|
158781
158866
|
"use strict";
|
|
158782
|
-
|
|
158867
|
+
import_node_crypto113 = require("node:crypto");
|
|
158783
158868
|
import_node_util26 = require("node:util");
|
|
158784
158869
|
init_config();
|
|
158785
158870
|
SECRET_NAME = /^(?:[\w-]*(?:api[-_]?key|token|secret|password|passwd|authorization|cookie|signature|credential)s?|auth|sig|email|uid|[\w-]*(?:user|account|local|device|installation|client|app|project|sender|measurement|tenant)[-_]?id)$/i;
|
|
@@ -159282,7 +159367,7 @@ function macDesktopLaunchHome(bridgePort) {
|
|
|
159282
159367
|
const dev = readDevBridgeLockfiles().find(
|
|
159283
159368
|
(lock) => lock.bridgePort === bridgePort && isDevBridgeLockfileFresh(lock)
|
|
159284
159369
|
);
|
|
159285
|
-
const homeKey = (0,
|
|
159370
|
+
const homeKey = (0, import_node_crypto114.createHash)("sha256").update(home).digest("hex");
|
|
159286
159371
|
const dir = (0, import_path7.join)((0, import_os4.tmpdir)(), "peach-desktop-launch", homeKey, String(bridgePort));
|
|
159287
159372
|
(0, import_fs8.mkdirSync)(dir, { recursive: true });
|
|
159288
159373
|
if ((0, import_fs8.existsSync)(home)) {
|
|
@@ -159388,13 +159473,13 @@ function buildMacLaunchUrl(url, opts, nativeApp = false) {
|
|
|
159388
159473
|
}
|
|
159389
159474
|
return deepLink.toString();
|
|
159390
159475
|
}
|
|
159391
|
-
var import_child_process6, import_fs8,
|
|
159476
|
+
var import_child_process6, import_fs8, import_node_crypto114, import_os4, import_path7, import_url2, import_meta2, _sootsimRoot;
|
|
159392
159477
|
var init_desktop_companion = __esm({
|
|
159393
159478
|
"cli/desktop-companion.ts"() {
|
|
159394
159479
|
"use strict";
|
|
159395
159480
|
import_child_process6 = require("child_process");
|
|
159396
159481
|
import_fs8 = require("fs");
|
|
159397
|
-
|
|
159482
|
+
import_node_crypto114 = require("node:crypto");
|
|
159398
159483
|
import_os4 = require("os");
|
|
159399
159484
|
import_path7 = require("path");
|
|
159400
159485
|
import_url2 = require("url");
|
|
@@ -160129,11 +160214,11 @@ function trackCliDiagnostic(diagnostic) {
|
|
|
160129
160214
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
160130
160215
|
});
|
|
160131
160216
|
}
|
|
160132
|
-
var
|
|
160217
|
+
var import_node_crypto115, import_node_fs190, import_node_os37, observedRuntimeVersion, queue, CRASH_REPORT_EVERY_MS;
|
|
160133
160218
|
var init_telemetry = __esm({
|
|
160134
160219
|
"cli/telemetry.ts"() {
|
|
160135
160220
|
"use strict";
|
|
160136
|
-
|
|
160221
|
+
import_node_crypto115 = require("node:crypto");
|
|
160137
160222
|
import_node_fs190 = require("node:fs");
|
|
160138
160223
|
import_node_os37 = require("node:os");
|
|
160139
160224
|
init_event_identity();
|
|
@@ -165888,18 +165973,18 @@ function stageAppBundleResources(appDir, origin, iosTarget, environment) {
|
|
|
165888
165973
|
const content = bytes[index];
|
|
165889
165974
|
result[base2] = {
|
|
165890
165975
|
uri: urls[index],
|
|
165891
|
-
sha256: (0,
|
|
165976
|
+
sha256: (0, import_node_crypto116.createHash)("sha256").update(content).digest("hex"),
|
|
165892
165977
|
contentType: preferredMimeType(base2) ?? "application/octet-stream",
|
|
165893
165978
|
byteLength: content.byteLength
|
|
165894
165979
|
};
|
|
165895
165980
|
});
|
|
165896
165981
|
return result;
|
|
165897
165982
|
}
|
|
165898
|
-
var
|
|
165983
|
+
var import_node_crypto116, import_node_fs193, import_node_path196;
|
|
165899
165984
|
var init_app_bundle_resources = __esm({
|
|
165900
165985
|
"cli/app-bundle-resources.ts"() {
|
|
165901
165986
|
"use strict";
|
|
165902
|
-
|
|
165987
|
+
import_node_crypto116 = require("node:crypto");
|
|
165903
165988
|
import_node_fs193 = __toESM(require("node:fs"), 1);
|
|
165904
165989
|
import_node_path196 = __toESM(require("node:path"), 1);
|
|
165905
165990
|
init_uttype_mime();
|
|
@@ -166037,7 +166122,7 @@ function materialSymbolFontAssets(fontPaths) {
|
|
|
166037
166122
|
const directory2 = import_node_path197.default.dirname(selected[0]);
|
|
166038
166123
|
const codepointsFile = import_node_path197.default.join(directory2, "MaterialSymbols.codepoints");
|
|
166039
166124
|
const mirroredFile = import_node_path197.default.join(directory2, "MaterialSymbols.mirrored");
|
|
166040
|
-
const digest3 = (0,
|
|
166125
|
+
const digest3 = (0, import_node_crypto117.createHash)("md5");
|
|
166041
166126
|
for (const asset of [...selected, codepointsFile, mirroredFile].sort(
|
|
166042
166127
|
(a, b) => import_node_path197.default.basename(a) < import_node_path197.default.basename(b) ? -1 : import_node_path197.default.basename(a) > import_node_path197.default.basename(b) ? 1 : 0
|
|
166043
166128
|
)) {
|
|
@@ -166049,11 +166134,11 @@ function materialSymbolFontAssets(fontPaths) {
|
|
|
166049
166134
|
mirroredPath: mirroredFile
|
|
166050
166135
|
};
|
|
166051
166136
|
}
|
|
166052
|
-
var
|
|
166137
|
+
var import_node_crypto117, import_node_fs194, import_node_module29, import_node_path197;
|
|
166053
166138
|
var init_material_symbol_fonts2 = __esm({
|
|
166054
166139
|
"cli/material-symbol-fonts.ts"() {
|
|
166055
166140
|
"use strict";
|
|
166056
|
-
|
|
166141
|
+
import_node_crypto117 = require("node:crypto");
|
|
166057
166142
|
import_node_fs194 = __toESM(require("node:fs"), 1);
|
|
166058
166143
|
import_node_module29 = require("node:module");
|
|
166059
166144
|
import_node_path197 = __toESM(require("node:path"), 1);
|
|
@@ -166292,11 +166377,11 @@ function discoverNativeLinkedAppFontAssets(opts) {
|
|
|
166292
166377
|
materialSymbols: materialSymbolFontAssets(materialFonts)
|
|
166293
166378
|
};
|
|
166294
166379
|
}
|
|
166295
|
-
var
|
|
166380
|
+
var import_node_crypto118, import_node_fs195, import_node_module30, import_node_path198, require3;
|
|
166296
166381
|
var init_app_fonts = __esm({
|
|
166297
166382
|
"cli/app-fonts.ts"() {
|
|
166298
166383
|
"use strict";
|
|
166299
|
-
|
|
166384
|
+
import_node_crypto118 = require("node:crypto");
|
|
166300
166385
|
import_node_fs195 = __toESM(require("node:fs"), 1);
|
|
166301
166386
|
import_node_module30 = require("node:module");
|
|
166302
166387
|
import_node_path198 = __toESM(require("node:path"), 1);
|
|
@@ -167514,11 +167599,11 @@ async function stageMetroBundleAssets(bundleFile, source, origin) {
|
|
|
167514
167599
|
return import_node_fs197.default.readFileSync(import_node_path200.default.join(search.dest.directory, relative7));
|
|
167515
167600
|
});
|
|
167516
167601
|
const verified2 = perFile && hashes ? bytes.every((content, i) => {
|
|
167517
|
-
const hash = (0,
|
|
167602
|
+
const hash = (0, import_node_crypto119.createHash)("md5").update(content).digest("hex");
|
|
167518
167603
|
return descriptor.scales.some(
|
|
167519
167604
|
(scale, j) => scale === scales[i] && hashes[j] === hash
|
|
167520
167605
|
);
|
|
167521
|
-
}) : scales.length === descriptor.scales.length && (0,
|
|
167606
|
+
}) : scales.length === descriptor.scales.length && (0, import_node_crypto119.createHash)("md5").update(Buffer.concat(bytes)).digest("hex") === descriptor.hash;
|
|
167522
167607
|
if (!verified2)
|
|
167523
167608
|
throw new Error(`Metro asset changed while staging: ${descriptor.name}`);
|
|
167524
167609
|
scales.forEach((scale, i) => {
|
|
@@ -167545,11 +167630,11 @@ async function stageMetroBundleAssets(bundleFile, source, origin) {
|
|
|
167545
167630
|
});
|
|
167546
167631
|
stageHostMetroAssets(staged, origin);
|
|
167547
167632
|
}
|
|
167548
|
-
var
|
|
167633
|
+
var import_node_crypto119, import_node_fs197, import_node_path200;
|
|
167549
167634
|
var init_metro_bundle_assets = __esm({
|
|
167550
167635
|
"cli/metro-bundle-assets.ts"() {
|
|
167551
167636
|
"use strict";
|
|
167552
|
-
|
|
167637
|
+
import_node_crypto119 = require("node:crypto");
|
|
167553
167638
|
import_node_fs197 = __toESM(require("node:fs"), 1);
|
|
167554
167639
|
import_node_path200 = __toESM(require("node:path"), 1);
|
|
167555
167640
|
init_metroAssetArtifact();
|
|
@@ -167714,7 +167799,7 @@ async function signIn(origin, requestedAccount, chooseLater, announce) {
|
|
|
167714
167799
|
` dev-login not available (${devResult.error}); falling back to browser`
|
|
167715
167800
|
);
|
|
167716
167801
|
}
|
|
167717
|
-
const state = (0,
|
|
167802
|
+
const state = (0, import_node_crypto120.randomBytes)(16).toString("hex");
|
|
167718
167803
|
const LOGIN_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
167719
167804
|
const result = await new Promise((resolve16) => {
|
|
167720
167805
|
let timer;
|
|
@@ -167823,11 +167908,11 @@ async function signIn(origin, requestedAccount, chooseLater, announce) {
|
|
|
167823
167908
|
dev: false
|
|
167824
167909
|
};
|
|
167825
167910
|
}
|
|
167826
|
-
var
|
|
167911
|
+
var import_node_crypto120, import_node_http4, import_promises20, REMOTE_DEFAULT_ORIGIN, DEV_LOGIN_WARMUP_MS;
|
|
167827
167912
|
var init_login = __esm({
|
|
167828
167913
|
"cli/commands/login.ts"() {
|
|
167829
167914
|
"use strict";
|
|
167830
|
-
|
|
167915
|
+
import_node_crypto120 = require("node:crypto");
|
|
167831
167916
|
import_node_http4 = __toESM(require("node:http"), 1);
|
|
167832
167917
|
import_promises20 = require("node:readline/promises");
|
|
167833
167918
|
init_shared_session();
|
|
@@ -168039,7 +168124,7 @@ async function requireAccount(commandLabel, options2 = {}, signedInAgain = false
|
|
|
168039
168124
|
if (auth.kind === "github") return;
|
|
168040
168125
|
const header = authHeaderValue(auth);
|
|
168041
168126
|
const origin = await billingOriginFor(auth);
|
|
168042
|
-
const credential = (0,
|
|
168127
|
+
const credential = (0, import_node_crypto121.createHash)("sha256").update(`${origin}
|
|
168043
168128
|
${header}`).digest("hex");
|
|
168044
168129
|
const check2 = readCheck();
|
|
168045
168130
|
const known = check2?.credential === credential ? check2 : null;
|
|
@@ -168087,11 +168172,11 @@ ${header}`).digest("hex");
|
|
|
168087
168172
|
`${name3} could not reach ${origin} to verify your account${status ? ` (${status})` : ""}; connect once and run it again`
|
|
168088
168173
|
);
|
|
168089
168174
|
}
|
|
168090
|
-
var
|
|
168175
|
+
var import_node_crypto121, import_node_fs198, import_node_path201, import_zod5, REFRESH_AFTER_MS, VALID_FOR_MS, VERIFY_TIMEOUT_MS, checkSchema, ACCOUNT_REQUIRED_HINT, waitlistedSchema;
|
|
168091
168176
|
var init_account_gate = __esm({
|
|
168092
168177
|
"cli/account-gate.ts"() {
|
|
168093
168178
|
"use strict";
|
|
168094
|
-
|
|
168179
|
+
import_node_crypto121 = require("node:crypto");
|
|
168095
168180
|
import_node_fs198 = require("node:fs");
|
|
168096
168181
|
import_node_path201 = __toESM(require("node:path"), 1);
|
|
168097
168182
|
import_zod5 = require("peachsim/vendor/zod");
|