peachsim 0.1.2521 → 0.1.2522
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +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 +17 -6
- 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-4JVXGEDW.mjs → acorn-OGZREIM4.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-YGYTY5RM.mjs → chunk-2Q53CRLG.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YNLZCNHF.mjs → chunk-2XQHYCZJ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-FHMICG4V.mjs → chunk-A4ZCFPTK.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-33NEBPBL.mjs → chunk-AVBUUFTZ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-KBUZQIKU.mjs → chunk-CG7RQV56.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3HKF2MNZ.mjs → chunk-DLF3CTZM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HBYQWZJW.mjs → chunk-FUDMLXHZ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-WCBTD7CJ.mjs → chunk-GMZLOA4S.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-BYCC3XF7.mjs → chunk-ICKVBXFK.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MDWKX5GI.mjs → chunk-KENKG25P.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-D37M2XQX.mjs → chunk-KXW4QWDW.mjs} +13 -13
- package/dist-lib/esm-chunks/{chunk-HY6PNY4A.mjs → chunk-LTFAADDL.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-KFVMTY3M.mjs → chunk-MJEXU4Y7.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-EH47OK5J.mjs → chunk-NBBOZWZ2.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-R2D667KZ.mjs → chunk-NILZGSTD.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-4GCQVV36.mjs → chunk-NLSTKVXZ.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-TIH3DEXP.mjs → chunk-TLGRHIFC.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-X3FFTU6E.mjs → chunk-VHMUVOWZ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HSKIQSPO.mjs → chunk-Y3M6LKXO.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-NSGZF3QW.mjs → chunk-YKNY6EQ4.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-D4MWPIVL.mjs → chunk-Z2ZREI4K.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-VJOMJGRY.mjs → metro-layout-parser-C3NFBOIV.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-WDK4LE54.mjs → swift-package-prebuilt-7XHCRW53.mjs} +10 -10
- package/dist-lib/esm-chunks/{swift-sdk-app-module-W22UVP5E.mjs → swift-sdk-app-module-ZIM56PXX.mjs} +13 -13
- package/dist-lib/esm-chunks/{swift-sdk-image-5P6YHUKB.mjs → swift-sdk-image-YOA3HATE.mjs} +13 -13
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-S5ZJTUTW.mjs → swift-sdk-image-producer-V6VSCQUU.mjs} +4 -4
- package/dist-lib/expo-swift-bundle.cjs +16 -5
- 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 +115 -82
- package/dist-lib/host/fetch-proxy-handler.cjs +5 -4
- 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 +2 -2
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +79 -79
- package/dist-lib/public-origins-lib.json +69 -69
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +7 -7
- package/dist-lib/skills.cjs +135 -102
- package/dist-lib/swift-compile.cjs +2 -2
- package/dist-lib/swift-compile.mjs +10 -10
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +5 -5
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/bplist-parser.cjs +1 -1
- package/dist-lib/vendor/ignore.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/plist.cjs +1 -1
- package/dist-lib/vendor/smol-toml.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +0 -3
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/src/one-native-source.ts +19 -1
- package/src/swift-host.ts +31 -15
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2522 | (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;
|
|
@@ -35508,13 +35508,13 @@ var init_swift_standin_digest = __esm({
|
|
|
35508
35508
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
35509
35509
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
35510
35510
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
35511
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
35511
|
+
STANDIN_SOURCE_DIGEST = true ? "f0b0ca3857062e6a7952520613c3225f9c50ba8242e781ff83bd00e9a2308146" : standinSourceDigest();
|
|
35512
35512
|
}
|
|
35513
35513
|
});
|
|
35514
35514
|
|
|
35515
35515
|
// src/expo-native-compiler-digest.ts
|
|
35516
35516
|
function expoNativeCompilerDigestValue() {
|
|
35517
|
-
return true ? "
|
|
35517
|
+
return true ? "a068645caf73cdf37ff07ca738b60e7a14ba8b9ead9468a71c3ea1484247fd24" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
35518
35518
|
}
|
|
35519
35519
|
var import_node_crypto12;
|
|
35520
35520
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -47218,7 +47218,7 @@ function enumValues(graphs2, surface, framework, toolchainBin, search, work, ori
|
|
|
47218
47218
|
throw new Error(
|
|
47219
47219
|
`clang could not read its enum values: ${run18.stderr.trim().slice(0, 400)}`
|
|
47220
47220
|
);
|
|
47221
|
-
const
|
|
47221
|
+
const constants5 = /* @__PURE__ */ new Map();
|
|
47222
47222
|
const walk4 = (node) => {
|
|
47223
47223
|
if (Array.isArray(node)) {
|
|
47224
47224
|
for (const child of node) walk4(child);
|
|
@@ -47237,7 +47237,7 @@ function enumValues(graphs2, surface, framework, toolchainBin, search, work, ori
|
|
|
47237
47237
|
for (const child of inner) {
|
|
47238
47238
|
if (Reflect.get(child, "kind") !== "EnumConstantDecl") continue;
|
|
47239
47239
|
const current2 = wrap(constantValue(child) ?? next);
|
|
47240
|
-
|
|
47240
|
+
constants5.set(String(Reflect.get(child, "name")), current2);
|
|
47241
47241
|
next = current2 + 1n;
|
|
47242
47242
|
}
|
|
47243
47243
|
return;
|
|
@@ -47246,7 +47246,7 @@ function enumValues(graphs2, surface, framework, toolchainBin, search, work, ori
|
|
|
47246
47246
|
};
|
|
47247
47247
|
walk4(JSON.parse(run18.stdout));
|
|
47248
47248
|
for (const [id, name3] of wanted) {
|
|
47249
|
-
const value =
|
|
47249
|
+
const value = constants5.get(name3);
|
|
47250
47250
|
if (value !== void 0) values.set(id, value.toString());
|
|
47251
47251
|
}
|
|
47252
47252
|
return values;
|
|
@@ -62521,7 +62521,7 @@ var init_swift_guest_archive = __esm({
|
|
|
62521
62521
|
});
|
|
62522
62522
|
|
|
62523
62523
|
// ../peach-kit/src/nativeWasmContract.ts
|
|
62524
|
-
var NATIVE_IMAGE_SECTION, NATIVE_TABLE_ABI, NATIVE_TABLE_IMPORT_MODULE, NATIVE_TABLE_ADAPT_IMPORT, NATIVE_DYLD_FUNCTION_IMPORT, NATIVE_DYLD_PLACE_EXPORT, NATIVE_DYLD_SECTION, NATIVE_LAZY_IMPORT_MODULE, NATIVE_SDK_IMPORT_MODULE, NATIVE_SDK_THUNK_SECTION, NATIVE_LAZY_SLOT_IMPORT, NATIVE_LAZY_SECTION, NATIVE_LAZY_DIGEST_BYTES, NATIVE_LAZY_PART_BYTES, NATIVE_LAZY_MAX_PARTS, NATIVE_PROFILE_SECTION, NATIVE_PROFILE_IMPORT, NATIVE_PROFILE_MEMORY, NATIVE_PROFILE_DUMP, NATIVE_PROFILE_ENDPOINT, NATIVE_TABLE_RESERVE_SLOTS;
|
|
62524
|
+
var NATIVE_IMAGE_SECTION, NATIVE_TABLE_ABI, NATIVE_TABLE_IMPORT_MODULE, NATIVE_TABLE_ADAPT_IMPORT, NATIVE_DYLD_FUNCTION_IMPORT, NATIVE_DYLD_PLACE_EXPORT, NATIVE_DYLD_SECTION, NATIVE_LAZY_IMPORT_MODULE, NATIVE_SDK_IMPORT_MODULE, NATIVE_SDK_THUNK_SECTION, NATIVE_LAZY_SLOT_IMPORT, NATIVE_LAZY_SECTION, NATIVE_LAZY_DIGEST_BYTES, NATIVE_LAZY_PART_BYTES, NATIVE_LAZY_MAX_PARTS, NATIVE_PROFILE_SECTION, NATIVE_PROFILE_IMPORT, NATIVE_PROFILE_MEMORY, NATIVE_PROFILE_DUMP, NATIVE_PROFILE_ENDPOINT, SWIFT_ARTIFACT_SHA256_HEADER, NATIVE_TABLE_RESERVE_SLOTS;
|
|
62525
62525
|
var init_nativeWasmContract = __esm({
|
|
62526
62526
|
"../peach-kit/src/nativeWasmContract.ts"() {
|
|
62527
62527
|
"use strict";
|
|
@@ -62545,6 +62545,7 @@ var init_nativeWasmContract = __esm({
|
|
|
62545
62545
|
NATIVE_PROFILE_MEMORY = "profile-data";
|
|
62546
62546
|
NATIVE_PROFILE_DUMP = "__write_profile";
|
|
62547
62547
|
NATIVE_PROFILE_ENDPOINT = "/__peach/swift-startup-profile";
|
|
62548
|
+
SWIFT_ARTIFACT_SHA256_HEADER = "x-peach-swift-sha256";
|
|
62548
62549
|
NATIVE_TABLE_RESERVE_SLOTS = 4096;
|
|
62549
62550
|
}
|
|
62550
62551
|
});
|
|
@@ -80523,7 +80524,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
|
|
|
80523
80524
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
80524
80525
|
MULTI_MANIFEST_VERSION = 76;
|
|
80525
80526
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
80526
|
-
compilerSourceDigest = true ? "
|
|
80527
|
+
compilerSourceDigest = true ? "952ab7240f001281c94c716af8613ec129cfe2f6373e7d4d07f9729dfcb1c640" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
80527
80528
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
80528
80529
|
MODULE_MAP_RESPONSE_FILE_RUN = 16;
|
|
80529
80530
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
@@ -102236,16 +102237,16 @@ function findHelper(type, name3, label, sources) {
|
|
|
102236
102237
|
const open = implementation.index + declaration.index + declaration[0].length - 1;
|
|
102237
102238
|
const block2 = braceBlock(blank, open);
|
|
102238
102239
|
if (!block2) continue;
|
|
102239
|
-
const
|
|
102240
|
+
const constants5 = /* @__PURE__ */ new Map();
|
|
102240
102241
|
for (const constant3 of stripComments(raw2).matchAll(
|
|
102241
102242
|
/\bNSString\s*\*\s*const\s+(\w+)\s*=\s*@"([^"]*)"\s*;/g
|
|
102242
102243
|
))
|
|
102243
|
-
|
|
102244
|
+
constants5.set(constant3[1], constant3[2]);
|
|
102244
102245
|
found2.push({
|
|
102245
102246
|
body: raw2.slice(open + 1, block2.end - 1),
|
|
102246
102247
|
language: "objc",
|
|
102247
102248
|
parameter: declaration[1] ?? null,
|
|
102248
|
-
constants:
|
|
102249
|
+
constants: constants5
|
|
102249
102250
|
});
|
|
102250
102251
|
}
|
|
102251
102252
|
}
|
|
@@ -102276,14 +102277,14 @@ function evaluateSwiftBody(body, scope2, depth) {
|
|
|
102276
102277
|
}
|
|
102277
102278
|
return null;
|
|
102278
102279
|
}
|
|
102279
|
-
function evaluateObjcBody(body, bundle,
|
|
102280
|
+
function evaluateObjcBody(body, bundle, constants5, scope2) {
|
|
102280
102281
|
const plists = scope2.resources.filter(
|
|
102281
102282
|
(file) => import_node_path105.default.basename(file) === "GoogleService-Info.plist"
|
|
102282
102283
|
);
|
|
102283
102284
|
const variables = /* @__PURE__ */ new Map();
|
|
102284
102285
|
const literal6 = (text7) => {
|
|
102285
102286
|
const quoted2 = /^@"([^"]*)"$/.exec(text7.trim());
|
|
102286
|
-
return quoted2 ? quoted2[1] :
|
|
102287
|
+
return quoted2 ? quoted2[1] : constants5.get(text7.trim());
|
|
102287
102288
|
};
|
|
102288
102289
|
const truthy2 = (name3) => {
|
|
102289
102290
|
const value = variables.get(name3);
|
|
@@ -115741,7 +115742,7 @@ var require_crc = __commonJS({
|
|
|
115741
115742
|
var require_parser = __commonJS({
|
|
115742
115743
|
"../../node_modules/pngjs/lib/parser.js"(exports2, module2) {
|
|
115743
115744
|
"use strict";
|
|
115744
|
-
var
|
|
115745
|
+
var constants5 = require_constants();
|
|
115745
115746
|
var CrcCalculator = require_crc();
|
|
115746
115747
|
var Parser2 = module2.exports = function(options2, dependencies) {
|
|
115747
115748
|
this._options = options2;
|
|
@@ -115752,12 +115753,12 @@ var require_parser = __commonJS({
|
|
|
115752
115753
|
this._palette = [];
|
|
115753
115754
|
this._colorType = 0;
|
|
115754
115755
|
this._chunks = {};
|
|
115755
|
-
this._chunks[
|
|
115756
|
-
this._chunks[
|
|
115757
|
-
this._chunks[
|
|
115758
|
-
this._chunks[
|
|
115759
|
-
this._chunks[
|
|
115760
|
-
this._chunks[
|
|
115756
|
+
this._chunks[constants5.TYPE_IHDR] = this._handleIHDR.bind(this);
|
|
115757
|
+
this._chunks[constants5.TYPE_IEND] = this._handleIEND.bind(this);
|
|
115758
|
+
this._chunks[constants5.TYPE_IDAT] = this._handleIDAT.bind(this);
|
|
115759
|
+
this._chunks[constants5.TYPE_PLTE] = this._handlePLTE.bind(this);
|
|
115760
|
+
this._chunks[constants5.TYPE_tRNS] = this._handleTRNS.bind(this);
|
|
115761
|
+
this._chunks[constants5.TYPE_gAMA] = this._handleGAMA.bind(this);
|
|
115761
115762
|
this.read = dependencies.read;
|
|
115762
115763
|
this.error = dependencies.error;
|
|
115763
115764
|
this.metadata = dependencies.metadata;
|
|
@@ -115772,10 +115773,10 @@ var require_parser = __commonJS({
|
|
|
115772
115773
|
};
|
|
115773
115774
|
};
|
|
115774
115775
|
Parser2.prototype.start = function() {
|
|
115775
|
-
this.read(
|
|
115776
|
+
this.read(constants5.PNG_SIGNATURE.length, this._parseSignature.bind(this));
|
|
115776
115777
|
};
|
|
115777
115778
|
Parser2.prototype._parseSignature = function(data) {
|
|
115778
|
-
let signature2 =
|
|
115779
|
+
let signature2 = constants5.PNG_SIGNATURE;
|
|
115779
115780
|
for (let i = 0; i < signature2.length; i++) {
|
|
115780
115781
|
if (data[i] !== signature2[i]) {
|
|
115781
115782
|
this.error(new Error("Invalid file signature"));
|
|
@@ -115792,7 +115793,7 @@ var require_parser = __commonJS({
|
|
|
115792
115793
|
name3 += String.fromCharCode(data[i]);
|
|
115793
115794
|
}
|
|
115794
115795
|
let ancillary = Boolean(data[4] & 32);
|
|
115795
|
-
if (!this._hasIHDR && type !==
|
|
115796
|
+
if (!this._hasIHDR && type !== constants5.TYPE_IHDR) {
|
|
115796
115797
|
this.error(new Error("Expected IHDR on beggining"));
|
|
115797
115798
|
return;
|
|
115798
115799
|
}
|
|
@@ -115840,7 +115841,7 @@ var require_parser = __commonJS({
|
|
|
115840
115841
|
this.error(new Error("Unsupported bit depth " + depth));
|
|
115841
115842
|
return;
|
|
115842
115843
|
}
|
|
115843
|
-
if (!(colorType in
|
|
115844
|
+
if (!(colorType in constants5.COLORTYPE_TO_BPP_MAP)) {
|
|
115844
115845
|
this.error(new Error("Unsupported color type"));
|
|
115845
115846
|
return;
|
|
115846
115847
|
}
|
|
@@ -115857,16 +115858,16 @@ var require_parser = __commonJS({
|
|
|
115857
115858
|
return;
|
|
115858
115859
|
}
|
|
115859
115860
|
this._colorType = colorType;
|
|
115860
|
-
let bpp =
|
|
115861
|
+
let bpp = constants5.COLORTYPE_TO_BPP_MAP[this._colorType];
|
|
115861
115862
|
this._hasIHDR = true;
|
|
115862
115863
|
this.metadata({
|
|
115863
115864
|
width,
|
|
115864
115865
|
height,
|
|
115865
115866
|
depth,
|
|
115866
115867
|
interlace: Boolean(interlace),
|
|
115867
|
-
palette: Boolean(colorType &
|
|
115868
|
-
color: Boolean(colorType &
|
|
115869
|
-
alpha: Boolean(colorType &
|
|
115868
|
+
palette: Boolean(colorType & constants5.COLORTYPE_PALETTE),
|
|
115869
|
+
color: Boolean(colorType & constants5.COLORTYPE_COLOR),
|
|
115870
|
+
alpha: Boolean(colorType & constants5.COLORTYPE_ALPHA),
|
|
115870
115871
|
bpp,
|
|
115871
115872
|
colorType
|
|
115872
115873
|
});
|
|
@@ -115890,7 +115891,7 @@ var require_parser = __commonJS({
|
|
|
115890
115891
|
};
|
|
115891
115892
|
Parser2.prototype._parseTRNS = function(data) {
|
|
115892
115893
|
this._crc.write(data);
|
|
115893
|
-
if (this._colorType ===
|
|
115894
|
+
if (this._colorType === constants5.COLORTYPE_PALETTE_COLOR) {
|
|
115894
115895
|
if (this._palette.length === 0) {
|
|
115895
115896
|
this.error(new Error("Transparency chunk must be after palette"));
|
|
115896
115897
|
return;
|
|
@@ -115904,10 +115905,10 @@ var require_parser = __commonJS({
|
|
|
115904
115905
|
}
|
|
115905
115906
|
this.palette(this._palette);
|
|
115906
115907
|
}
|
|
115907
|
-
if (this._colorType ===
|
|
115908
|
+
if (this._colorType === constants5.COLORTYPE_GRAYSCALE) {
|
|
115908
115909
|
this.transColor([data.readUInt16BE(0)]);
|
|
115909
115910
|
}
|
|
115910
|
-
if (this._colorType ===
|
|
115911
|
+
if (this._colorType === constants5.COLORTYPE_COLOR) {
|
|
115911
115912
|
this.transColor([
|
|
115912
115913
|
data.readUInt16BE(0),
|
|
115913
115914
|
data.readUInt16BE(2),
|
|
@@ -115921,7 +115922,7 @@ var require_parser = __commonJS({
|
|
|
115921
115922
|
};
|
|
115922
115923
|
Parser2.prototype._parseGAMA = function(data) {
|
|
115923
115924
|
this._crc.write(data);
|
|
115924
|
-
this.gamma(data.readUInt32BE(0) /
|
|
115925
|
+
this.gamma(data.readUInt32BE(0) / constants5.GAMMA_DIVISION);
|
|
115925
115926
|
this._handleChunkEnd();
|
|
115926
115927
|
};
|
|
115927
115928
|
Parser2.prototype._handleIDAT = function(length) {
|
|
@@ -115933,7 +115934,7 @@ var require_parser = __commonJS({
|
|
|
115933
115934
|
};
|
|
115934
115935
|
Parser2.prototype._parseIDAT = function(length, data) {
|
|
115935
115936
|
this._crc.write(data);
|
|
115936
|
-
if (this._colorType ===
|
|
115937
|
+
if (this._colorType === constants5.COLORTYPE_PALETTE_COLOR && this._palette.length === 0) {
|
|
115937
115938
|
throw new Error("Expected palette not found");
|
|
115938
115939
|
}
|
|
115939
115940
|
this.inflateData(data);
|
|
@@ -116421,9 +116422,9 @@ var require_parser_async = __commonJS({
|
|
|
116421
116422
|
var require_bitpacker = __commonJS({
|
|
116422
116423
|
"../../node_modules/pngjs/lib/bitpacker.js"(exports2, module2) {
|
|
116423
116424
|
"use strict";
|
|
116424
|
-
var
|
|
116425
|
+
var constants5 = require_constants();
|
|
116425
116426
|
module2.exports = function(dataIn, width, height, options2) {
|
|
116426
|
-
let outHasAlpha = [
|
|
116427
|
+
let outHasAlpha = [constants5.COLORTYPE_COLOR_ALPHA, constants5.COLORTYPE_ALPHA].indexOf(
|
|
116427
116428
|
options2.colorType
|
|
116428
116429
|
) !== -1;
|
|
116429
116430
|
if (options2.colorType === options2.inputColorType) {
|
|
@@ -116443,11 +116444,11 @@ var require_bitpacker = __commonJS({
|
|
|
116443
116444
|
}
|
|
116444
116445
|
let data = options2.bitDepth !== 16 ? dataIn : new Uint16Array(dataIn.buffer);
|
|
116445
116446
|
let maxValue = 255;
|
|
116446
|
-
let inBpp =
|
|
116447
|
+
let inBpp = constants5.COLORTYPE_TO_BPP_MAP[options2.inputColorType];
|
|
116447
116448
|
if (inBpp === 4 && !options2.inputHasAlpha) {
|
|
116448
116449
|
inBpp = 3;
|
|
116449
116450
|
}
|
|
116450
|
-
let outBpp =
|
|
116451
|
+
let outBpp = constants5.COLORTYPE_TO_BPP_MAP[options2.colorType];
|
|
116451
116452
|
if (options2.bitDepth === 16) {
|
|
116452
116453
|
maxValue = 65535;
|
|
116453
116454
|
outBpp *= 2;
|
|
@@ -116471,24 +116472,24 @@ var require_bitpacker = __commonJS({
|
|
|
116471
116472
|
let blue;
|
|
116472
116473
|
let alpha = maxValue;
|
|
116473
116474
|
switch (options2.inputColorType) {
|
|
116474
|
-
case
|
|
116475
|
+
case constants5.COLORTYPE_COLOR_ALPHA:
|
|
116475
116476
|
alpha = data[inIndex + 3];
|
|
116476
116477
|
red = data[inIndex];
|
|
116477
116478
|
green = data[inIndex + 1];
|
|
116478
116479
|
blue = data[inIndex + 2];
|
|
116479
116480
|
break;
|
|
116480
|
-
case
|
|
116481
|
+
case constants5.COLORTYPE_COLOR:
|
|
116481
116482
|
red = data[inIndex];
|
|
116482
116483
|
green = data[inIndex + 1];
|
|
116483
116484
|
blue = data[inIndex + 2];
|
|
116484
116485
|
break;
|
|
116485
|
-
case
|
|
116486
|
+
case constants5.COLORTYPE_ALPHA:
|
|
116486
116487
|
alpha = data[inIndex + 1];
|
|
116487
116488
|
red = data[inIndex];
|
|
116488
116489
|
green = red;
|
|
116489
116490
|
blue = red;
|
|
116490
116491
|
break;
|
|
116491
|
-
case
|
|
116492
|
+
case constants5.COLORTYPE_GRAYSCALE:
|
|
116492
116493
|
red = data[inIndex];
|
|
116493
116494
|
green = red;
|
|
116494
116495
|
blue = red;
|
|
@@ -116521,8 +116522,8 @@ var require_bitpacker = __commonJS({
|
|
|
116521
116522
|
for (let x = 0; x < width; x++) {
|
|
116522
116523
|
let rgba = getRGBA(data, inIndex);
|
|
116523
116524
|
switch (options2.colorType) {
|
|
116524
|
-
case
|
|
116525
|
-
case
|
|
116525
|
+
case constants5.COLORTYPE_COLOR_ALPHA:
|
|
116526
|
+
case constants5.COLORTYPE_COLOR:
|
|
116526
116527
|
if (options2.bitDepth === 8) {
|
|
116527
116528
|
outData[outIndex] = rgba.red;
|
|
116528
116529
|
outData[outIndex + 1] = rgba.green;
|
|
@@ -116539,8 +116540,8 @@ var require_bitpacker = __commonJS({
|
|
|
116539
116540
|
}
|
|
116540
116541
|
}
|
|
116541
116542
|
break;
|
|
116542
|
-
case
|
|
116543
|
-
case
|
|
116543
|
+
case constants5.COLORTYPE_ALPHA:
|
|
116544
|
+
case constants5.COLORTYPE_GRAYSCALE: {
|
|
116544
116545
|
let grayscale = (rgba.red + rgba.green + rgba.blue) / 3;
|
|
116545
116546
|
if (options2.bitDepth === 8) {
|
|
116546
116547
|
outData[outIndex] = grayscale;
|
|
@@ -116713,7 +116714,7 @@ var require_filter_pack = __commonJS({
|
|
|
116713
116714
|
var require_packer = __commonJS({
|
|
116714
116715
|
"../../node_modules/pngjs/lib/packer.js"(exports2, module2) {
|
|
116715
116716
|
"use strict";
|
|
116716
|
-
var
|
|
116717
|
+
var constants5 = require_constants();
|
|
116717
116718
|
var CrcStream = require_crc();
|
|
116718
116719
|
var bitPacker = require_bitpacker();
|
|
116719
116720
|
var filter = require_filter_pack();
|
|
@@ -116726,23 +116727,23 @@ var require_packer = __commonJS({
|
|
|
116726
116727
|
options2.inputHasAlpha = options2.inputHasAlpha != null ? options2.inputHasAlpha : true;
|
|
116727
116728
|
options2.deflateFactory = options2.deflateFactory || zlib4.createDeflate;
|
|
116728
116729
|
options2.bitDepth = options2.bitDepth || 8;
|
|
116729
|
-
options2.colorType = typeof options2.colorType === "number" ? options2.colorType :
|
|
116730
|
-
options2.inputColorType = typeof options2.inputColorType === "number" ? options2.inputColorType :
|
|
116730
|
+
options2.colorType = typeof options2.colorType === "number" ? options2.colorType : constants5.COLORTYPE_COLOR_ALPHA;
|
|
116731
|
+
options2.inputColorType = typeof options2.inputColorType === "number" ? options2.inputColorType : constants5.COLORTYPE_COLOR_ALPHA;
|
|
116731
116732
|
if ([
|
|
116732
|
-
|
|
116733
|
-
|
|
116734
|
-
|
|
116735
|
-
|
|
116733
|
+
constants5.COLORTYPE_GRAYSCALE,
|
|
116734
|
+
constants5.COLORTYPE_COLOR,
|
|
116735
|
+
constants5.COLORTYPE_COLOR_ALPHA,
|
|
116736
|
+
constants5.COLORTYPE_ALPHA
|
|
116736
116737
|
].indexOf(options2.colorType) === -1) {
|
|
116737
116738
|
throw new Error(
|
|
116738
116739
|
"option color type:" + options2.colorType + " is not supported at present"
|
|
116739
116740
|
);
|
|
116740
116741
|
}
|
|
116741
116742
|
if ([
|
|
116742
|
-
|
|
116743
|
-
|
|
116744
|
-
|
|
116745
|
-
|
|
116743
|
+
constants5.COLORTYPE_GRAYSCALE,
|
|
116744
|
+
constants5.COLORTYPE_COLOR,
|
|
116745
|
+
constants5.COLORTYPE_COLOR_ALPHA,
|
|
116746
|
+
constants5.COLORTYPE_ALPHA
|
|
116746
116747
|
].indexOf(options2.inputColorType) === -1) {
|
|
116747
116748
|
throw new Error(
|
|
116748
116749
|
"option input color type:" + options2.inputColorType + " is not supported at present"
|
|
@@ -116766,7 +116767,7 @@ var require_packer = __commonJS({
|
|
|
116766
116767
|
};
|
|
116767
116768
|
Packer.prototype.filterData = function(data, width, height) {
|
|
116768
116769
|
let packedData = bitPacker(data, width, height, this._options);
|
|
116769
|
-
let bpp =
|
|
116770
|
+
let bpp = constants5.COLORTYPE_TO_BPP_MAP[this._options.colorType];
|
|
116770
116771
|
let filteredData = filter(packedData, width, height, this._options, bpp);
|
|
116771
116772
|
return filteredData;
|
|
116772
116773
|
};
|
|
@@ -116786,8 +116787,8 @@ var require_packer = __commonJS({
|
|
|
116786
116787
|
};
|
|
116787
116788
|
Packer.prototype.packGAMA = function(gamma) {
|
|
116788
116789
|
let buf = Buffer.alloc(4);
|
|
116789
|
-
buf.writeUInt32BE(Math.floor(gamma *
|
|
116790
|
-
return this._packChunk(
|
|
116790
|
+
buf.writeUInt32BE(Math.floor(gamma * constants5.GAMMA_DIVISION), 0);
|
|
116791
|
+
return this._packChunk(constants5.TYPE_gAMA, buf);
|
|
116791
116792
|
};
|
|
116792
116793
|
Packer.prototype.packIHDR = function(width, height) {
|
|
116793
116794
|
let buf = Buffer.alloc(13);
|
|
@@ -116798,13 +116799,13 @@ var require_packer = __commonJS({
|
|
|
116798
116799
|
buf[10] = 0;
|
|
116799
116800
|
buf[11] = 0;
|
|
116800
116801
|
buf[12] = 0;
|
|
116801
|
-
return this._packChunk(
|
|
116802
|
+
return this._packChunk(constants5.TYPE_IHDR, buf);
|
|
116802
116803
|
};
|
|
116803
116804
|
Packer.prototype.packIDAT = function(data) {
|
|
116804
|
-
return this._packChunk(
|
|
116805
|
+
return this._packChunk(constants5.TYPE_IDAT, data);
|
|
116805
116806
|
};
|
|
116806
116807
|
Packer.prototype.packIEND = function() {
|
|
116807
|
-
return this._packChunk(
|
|
116808
|
+
return this._packChunk(constants5.TYPE_IEND, null);
|
|
116808
116809
|
};
|
|
116809
116810
|
}
|
|
116810
116811
|
});
|
|
@@ -116815,7 +116816,7 @@ var require_packer_async = __commonJS({
|
|
|
116815
116816
|
"use strict";
|
|
116816
116817
|
var util = require("util");
|
|
116817
116818
|
var Stream = require("stream");
|
|
116818
|
-
var
|
|
116819
|
+
var constants5 = require_constants();
|
|
116819
116820
|
var Packer = require_packer();
|
|
116820
116821
|
var PackerAsync = module2.exports = function(opt) {
|
|
116821
116822
|
Stream.call(this);
|
|
@@ -116826,7 +116827,7 @@ var require_packer_async = __commonJS({
|
|
|
116826
116827
|
};
|
|
116827
116828
|
util.inherits(PackerAsync, Stream);
|
|
116828
116829
|
PackerAsync.prototype.pack = function(data, width, height, gamma) {
|
|
116829
|
-
this.emit("data", Buffer.from(
|
|
116830
|
+
this.emit("data", Buffer.from(constants5.PNG_SIGNATURE));
|
|
116830
116831
|
this.emit("data", this._packer.packIHDR(width, height));
|
|
116831
116832
|
if (gamma) {
|
|
116832
116833
|
this.emit("data", this._packer.packGAMA(gamma));
|
|
@@ -117154,7 +117155,7 @@ var require_packer_sync = __commonJS({
|
|
|
117154
117155
|
if (!zlib4.deflateSync) {
|
|
117155
117156
|
hasSyncZlib = false;
|
|
117156
117157
|
}
|
|
117157
|
-
var
|
|
117158
|
+
var constants5 = require_constants();
|
|
117158
117159
|
var Packer = require_packer();
|
|
117159
117160
|
module2.exports = function(metaData, opt) {
|
|
117160
117161
|
if (!hasSyncZlib) {
|
|
@@ -117165,7 +117166,7 @@ var require_packer_sync = __commonJS({
|
|
|
117165
117166
|
let options2 = opt || {};
|
|
117166
117167
|
let packer = new Packer(options2);
|
|
117167
117168
|
let chunks = [];
|
|
117168
|
-
chunks.push(Buffer.from(
|
|
117169
|
+
chunks.push(Buffer.from(constants5.PNG_SIGNATURE));
|
|
117169
117170
|
chunks.push(packer.packIHDR(metaData.width, metaData.height));
|
|
117170
117171
|
if (metaData.gamma) {
|
|
117171
117172
|
chunks.push(packer.packGAMA(metaData.gamma));
|
|
@@ -120519,6 +120520,14 @@ function nativeSourceFiles(packagePath) {
|
|
|
120519
120520
|
if (sourceEntries().has(packagePath)) return [];
|
|
120520
120521
|
return [NATIVE_DESCRIPTOR, NATIVE_GLUE].map((name3) => import_node_path132.default.join(packagePath, name3)).filter((file) => import_node_fs132.default.existsSync(file));
|
|
120521
120522
|
}
|
|
120523
|
+
function swiftArtifactContentDigest(bytes) {
|
|
120524
|
+
let digest3 = swiftArtifactDigests.get(bytes);
|
|
120525
|
+
if (!digest3) {
|
|
120526
|
+
digest3 = (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex");
|
|
120527
|
+
swiftArtifactDigests.set(bytes, digest3);
|
|
120528
|
+
}
|
|
120529
|
+
return digest3;
|
|
120530
|
+
}
|
|
120522
120531
|
function openSwiftFile(file) {
|
|
120523
120532
|
file = import_node_fs132.default.realpathSync(file);
|
|
120524
120533
|
const root = import_node_path132.default.dirname(file);
|
|
@@ -123031,6 +123040,7 @@ function scopedArtifact(project2, entry, moduleRoot, signal) {
|
|
|
123031
123040
|
);
|
|
123032
123041
|
}).then(
|
|
123033
123042
|
(artifact) => {
|
|
123043
|
+
swiftArtifactContentDigest(artifact.bytes);
|
|
123034
123044
|
project2.artifact = artifact;
|
|
123035
123045
|
project2.artifacts = [
|
|
123036
123046
|
artifact,
|
|
@@ -123211,7 +123221,7 @@ async function swiftPackageMetadata(packagePath, packageName2, moduleRoot, origi
|
|
|
123211
123221
|
});
|
|
123212
123222
|
const image = {
|
|
123213
123223
|
...artifact,
|
|
123214
|
-
hash: (
|
|
123224
|
+
hash: swiftArtifactContentDigest(result.primary),
|
|
123215
123225
|
bytes: result.primary,
|
|
123216
123226
|
parts: result.parts
|
|
123217
123227
|
};
|
|
@@ -123451,20 +123461,26 @@ async function serveSwiftPackageAsset(pathname, res) {
|
|
|
123451
123461
|
const address = pathname.slice(ARTIFACT_PATH.length).replace(/\.wasm$/, "");
|
|
123452
123462
|
for (const project2 of projects().values()) {
|
|
123453
123463
|
if (pathname !== `${ARTIFACT_PATH}${address}.wasm`) continue;
|
|
123454
|
-
const
|
|
123455
|
-
|
|
123456
|
-
|
|
123457
|
-
|
|
123458
|
-
|
|
123459
|
-
|
|
123460
|
-
|
|
123461
|
-
|
|
123462
|
-
|
|
123463
|
-
|
|
123464
|
-
|
|
123465
|
-
res.
|
|
123464
|
+
for (const artifact of project2.artifacts) {
|
|
123465
|
+
const primary = artifact.hash === address;
|
|
123466
|
+
const bytes = primary ? artifact.bytes : artifact.parts?.get(address);
|
|
123467
|
+
if (!bytes) continue;
|
|
123468
|
+
res.setHeader("access-control-allow-origin", "*");
|
|
123469
|
+
res.setHeader("access-control-expose-headers", SWIFT_ARTIFACT_SHA256_HEADER);
|
|
123470
|
+
res.setHeader(
|
|
123471
|
+
SWIFT_ARTIFACT_SHA256_HEADER,
|
|
123472
|
+
primary ? swiftArtifactContentDigest(bytes) : address
|
|
123473
|
+
);
|
|
123474
|
+
res.setHeader("content-type", "application/wasm");
|
|
123475
|
+
res.setHeader("vary", "accept-encoding");
|
|
123476
|
+
if (acceptsBr) {
|
|
123477
|
+
res.setHeader("content-encoding", "br");
|
|
123478
|
+
res.end(await brotliCompressQ4(bytes, address));
|
|
123479
|
+
} else {
|
|
123480
|
+
res.end(bytes);
|
|
123481
|
+
}
|
|
123482
|
+
return true;
|
|
123466
123483
|
}
|
|
123467
|
-
return true;
|
|
123468
123484
|
}
|
|
123469
123485
|
res.statusCode = 404;
|
|
123470
123486
|
res.end("swift artifact is stale");
|
|
@@ -123549,7 +123565,7 @@ function disposeSwiftProject(packagePath, signal) {
|
|
|
123549
123565
|
xcodeProjects().delete(packagePath);
|
|
123550
123566
|
sourceEntries().delete(packagePath);
|
|
123551
123567
|
}
|
|
123552
|
-
var import_node_async_hooks2, import_node_child_process65, import_node_crypto79, import_node_fs132, import_node_os27, import_node_path132, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SDK_PATH, SDK_BINDING_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, startupImages, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS, sdkStartups, sdkStartupParts, sdkStartupPlans, sdkPieces2, sdkSplitBindings, sdkBindingFiles, servedSdkBinding;
|
|
123568
|
+
var import_node_async_hooks2, import_node_child_process65, import_node_crypto79, import_node_fs132, import_node_os27, import_node_path132, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SDK_PATH, SDK_BINDING_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, startupImages, 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;
|
|
123553
123569
|
var init_swift_host = __esm({
|
|
123554
123570
|
"src/swift-host.ts"() {
|
|
123555
123571
|
"use strict";
|
|
@@ -123561,6 +123577,7 @@ var init_swift_host = __esm({
|
|
|
123561
123577
|
import_node_path132 = __toESM(require("node:path"), 1);
|
|
123562
123578
|
init_pngHeader();
|
|
123563
123579
|
init_nativeSdkBindingContract();
|
|
123580
|
+
init_nativeWasmContract();
|
|
123564
123581
|
init_bundleAssets();
|
|
123565
123582
|
init_stringCatalog();
|
|
123566
123583
|
init_core_data_entity_classes();
|
|
@@ -123609,6 +123626,7 @@ var init_swift_host = __esm({
|
|
|
123609
123626
|
SwiftMissingModulesError = class extends Error {
|
|
123610
123627
|
};
|
|
123611
123628
|
startupImages = /* @__PURE__ */ new WeakMap();
|
|
123629
|
+
swiftArtifactDigests = /* @__PURE__ */ new WeakMap();
|
|
123612
123630
|
sharedProjects = /* @__PURE__ */ new Map();
|
|
123613
123631
|
projectScope = new import_node_async_hooks2.AsyncLocalStorage();
|
|
123614
123632
|
projects = () => projectScope.getStore()?.projects ?? sharedProjects;
|
|
@@ -139934,8 +139952,20 @@ async function handleOneNativeSourceRequest(req, res) {
|
|
|
139934
139952
|
url.pathname.slice(SWIFT_PACKAGE_PATH.length)
|
|
139935
139953
|
);
|
|
139936
139954
|
const metadata = await packageMetadata(app, packageName2);
|
|
139955
|
+
const body = JSON.stringify(metadata);
|
|
139956
|
+
const acceptsBrotli = req.headers["accept-encoding"]?.split(",").some((value) => {
|
|
139957
|
+
const [coding, quality] = value.trim().toLowerCase().split(/\s*;\s*q\s*=\s*/);
|
|
139958
|
+
return coding === "br" && (quality === void 0 || Number(quality) > 0);
|
|
139959
|
+
});
|
|
139937
139960
|
res.setHeader("content-type", "application/json");
|
|
139938
|
-
res.
|
|
139961
|
+
res.setHeader("vary", "origin, accept-encoding");
|
|
139962
|
+
if (acceptsBrotli) {
|
|
139963
|
+
const compressed = await compressMetadata(body, {
|
|
139964
|
+
params: { [import_node_zlib10.constants.BROTLI_PARAM_QUALITY]: 4 }
|
|
139965
|
+
});
|
|
139966
|
+
res.setHeader("content-encoding", "br");
|
|
139967
|
+
res.end(compressed);
|
|
139968
|
+
} else res.end(body);
|
|
139939
139969
|
return true;
|
|
139940
139970
|
}
|
|
139941
139971
|
const kotlin = await Promise.resolve().then(() => (init_kotlin_host(), kotlin_host_exports));
|
|
@@ -139969,7 +139999,7 @@ function handleOneNativeSourceUpgrade(req, socket, head) {
|
|
|
139969
139999
|
});
|
|
139970
140000
|
return true;
|
|
139971
140001
|
}
|
|
139972
|
-
var import_node_fs159, import_node_module22, import_node_path159, import_node_url8, import_ws2, apps;
|
|
140002
|
+
var import_node_fs159, import_node_module22, import_node_path159, import_node_url8, import_node_util22, import_node_zlib10, import_ws2, apps, compressMetadata;
|
|
139973
140003
|
var init_one_native_source = __esm({
|
|
139974
140004
|
"src/one-native-source.ts"() {
|
|
139975
140005
|
"use strict";
|
|
@@ -139977,6 +140007,8 @@ var init_one_native_source = __esm({
|
|
|
139977
140007
|
import_node_module22 = require("node:module");
|
|
139978
140008
|
import_node_path159 = __toESM(require("node:path"), 1);
|
|
139979
140009
|
import_node_url8 = require("node:url");
|
|
140010
|
+
import_node_util22 = require("node:util");
|
|
140011
|
+
import_node_zlib10 = require("node:zlib");
|
|
139980
140012
|
init_kotlinDiscoveryContract();
|
|
139981
140013
|
import_ws2 = require("peachsim/vendor/ws");
|
|
139982
140014
|
init_backend_origin();
|
|
@@ -139987,6 +140019,7 @@ var init_one_native_source = __esm({
|
|
|
139987
140019
|
init_swift_submit();
|
|
139988
140020
|
init_swift_toolchain();
|
|
139989
140021
|
apps = /* @__PURE__ */ new Map();
|
|
140022
|
+
compressMetadata = (0, import_node_util22.promisify)(import_node_zlib10.brotliCompress);
|
|
139990
140023
|
}
|
|
139991
140024
|
});
|
|
139992
140025
|
|
|
@@ -141527,7 +141560,7 @@ var init_nitro_superset = __esm({
|
|
|
141527
141560
|
init_nitroContract();
|
|
141528
141561
|
init_swift_standin_digest();
|
|
141529
141562
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
141530
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
141563
|
+
NITRO_COMPILER_DIGEST = true ? "9ee7e1048e4322b01a587e2d8a5b133696932ab5f05f1e160b96da8b1df52733" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
141531
141564
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
141532
141565
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
141533
141566
|
published3 = /* @__PURE__ */ new Map();
|
|
@@ -141728,7 +141761,7 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
141728
141761
|
const runtimeBundle = await withSwiftRootLock(
|
|
141729
141762
|
import_node_path169.default.join(await import_promises19.default.realpath(packageDir), "bundle"),
|
|
141730
141763
|
async () => {
|
|
141731
|
-
await (0,
|
|
141764
|
+
await (0, import_node_util23.promisify)(import_node_child_process76.execFile)(
|
|
141732
141765
|
process.env.NODE_BINARY || "node",
|
|
141733
141766
|
[import_node_path169.default.join(packageDir, "scripts/build-bundle.mjs"), appRoot],
|
|
141734
141767
|
{ cwd: appRoot, maxBuffer: 16 * 1024 * 1024 }
|
|
@@ -141744,7 +141777,7 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
|
|
|
141744
141777
|
}
|
|
141745
141778
|
};
|
|
141746
141779
|
}
|
|
141747
|
-
var import_node_child_process76, import_promises19, import_node_module24, import_node_path169,
|
|
141780
|
+
var import_node_child_process76, import_promises19, import_node_module24, import_node_path169, import_node_util23, EXPO_WIDGETS_ROUTE, handleExpoWidgetsRequest;
|
|
141748
141781
|
var init_expo_widgets_bundle = __esm({
|
|
141749
141782
|
"src/expo-widgets-bundle.ts"() {
|
|
141750
141783
|
"use strict";
|
|
@@ -141752,7 +141785,7 @@ var init_expo_widgets_bundle = __esm({
|
|
|
141752
141785
|
import_promises19 = __toESM(require("node:fs/promises"), 1);
|
|
141753
141786
|
import_node_module24 = require("node:module");
|
|
141754
141787
|
import_node_path169 = __toESM(require("node:path"), 1);
|
|
141755
|
-
|
|
141788
|
+
import_node_util23 = require("node:util");
|
|
141756
141789
|
init_expo_widget_assets();
|
|
141757
141790
|
init_staged_host_files();
|
|
141758
141791
|
init_nitro_bundle();
|
|
@@ -151943,7 +151976,7 @@ function extractAppBinaryBundle(binary2) {
|
|
|
151943
151976
|
const manifest = readPeachSidecarManifest(
|
|
151944
151977
|
JSON.parse(import_node_fs182.default.readFileSync(import_node_path185.default.join(extracted, manifestEntry), "utf8"))
|
|
151945
151978
|
);
|
|
151946
|
-
const bundle = (0,
|
|
151979
|
+
const bundle = (0, import_node_zlib11.brotliDecompressSync)(
|
|
151947
151980
|
import_node_fs182.default.readFileSync(import_node_path185.default.join(extracted, sidecar, PEACH_SIDECAR_BUNDLE))
|
|
151948
151981
|
);
|
|
151949
151982
|
if ((0, import_node_crypto106.createHash)("sha256").update(bundle).digest("hex") !== manifest.bundleSha256)
|
|
@@ -151966,7 +151999,7 @@ function extractAppBinaryBundle(binary2) {
|
|
|
151966
151999
|
);
|
|
151967
152000
|
return { bundlePath, platform: platform3 };
|
|
151968
152001
|
}
|
|
151969
|
-
var import_node_child_process78, import_node_crypto106, import_node_fs182, import_node_path185,
|
|
152002
|
+
var import_node_child_process78, import_node_crypto106, import_node_fs182, import_node_path185, import_node_zlib11;
|
|
151970
152003
|
var init_binary_sidecar = __esm({
|
|
151971
152004
|
"cli/binary-sidecar.ts"() {
|
|
151972
152005
|
"use strict";
|
|
@@ -151974,7 +152007,7 @@ var init_binary_sidecar = __esm({
|
|
|
151974
152007
|
import_node_crypto106 = require("node:crypto");
|
|
151975
152008
|
import_node_fs182 = __toESM(require("node:fs"), 1);
|
|
151976
152009
|
import_node_path185 = __toESM(require("node:path"), 1);
|
|
151977
|
-
|
|
152010
|
+
import_node_zlib11 = require("node:zlib");
|
|
151978
152011
|
init_package_versions();
|
|
151979
152012
|
init_binarySidecarContract();
|
|
151980
152013
|
init_home_paths();
|
|
@@ -152929,12 +152962,12 @@ function redactText(text7, configurationOnly, decodedString = false) {
|
|
|
152929
152962
|
(line, prefix, name3, value) => SECRET_NAME.test(name3) ? `${prefix}${mask(value)}` : line
|
|
152930
152963
|
).replace(EMAIL, mask).replace(OPAQUE_ID, mask);
|
|
152931
152964
|
}
|
|
152932
|
-
var import_node_crypto107,
|
|
152965
|
+
var import_node_crypto107, import_node_util24, SECRET_NAME, JWT, GOOGLE_API_KEY, BEARER, EMAIL, OPAQUE_ID, STRING, NUMBER, PAIR2, STRING_TOKEN, QUERY_PAIR, HEADER_LINE, MASKED, CONFIG_CONTAINER, utf8;
|
|
152933
152966
|
var init_output_redaction = __esm({
|
|
152934
152967
|
"cli/output-redaction.ts"() {
|
|
152935
152968
|
"use strict";
|
|
152936
152969
|
import_node_crypto107 = require("node:crypto");
|
|
152937
|
-
|
|
152970
|
+
import_node_util24 = require("node:util");
|
|
152938
152971
|
init_config();
|
|
152939
152972
|
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;
|
|
152940
152973
|
JWT = /\beyJ[\w-]{6,}\.[\w-]{6,}\.[\w-]{6,}/g;
|
|
@@ -174599,7 +174632,7 @@ function zipSources(bytes, where) {
|
|
|
174599
174632
|
}
|
|
174600
174633
|
data = Buffer.from(payload);
|
|
174601
174634
|
} else if (method === 8) {
|
|
174602
|
-
data = (0,
|
|
174635
|
+
data = (0, import_node_zlib12.inflateRawSync)(payload, { maxOutputLength: remainingBudget });
|
|
174603
174636
|
}
|
|
174604
174637
|
if (!data) throw new Error(`${where}: ${name3} uses zip method ${method}`);
|
|
174605
174638
|
totalExtractedBytes += data.byteLength;
|
|
@@ -174722,7 +174755,7 @@ async function kotlinSources2(bytes, where) {
|
|
|
174722
174755
|
if (kotlin.length === 0) throw new Error(`${where}: sources jar has no Kotlin`);
|
|
174723
174756
|
return kotlin;
|
|
174724
174757
|
}
|
|
174725
|
-
var import_node_crypto116, import_node_fs197, import_node_os36, import_node_path198,
|
|
174758
|
+
var import_node_crypto116, import_node_fs197, import_node_os36, import_node_path198, import_node_zlib12, pending, MAX_SOURCES_JAR_BYTES, MAX_SOURCE_ENTRY_BYTES, MAX_TOTAL_EXTRACTED_BYTES;
|
|
174726
174759
|
var init_kotlin_maven_sources = __esm({
|
|
174727
174760
|
"src/kotlin-maven-sources.ts"() {
|
|
174728
174761
|
"use strict";
|
|
@@ -174730,7 +174763,7 @@ var init_kotlin_maven_sources = __esm({
|
|
|
174730
174763
|
import_node_fs197 = __toESM(require("node:fs"), 1);
|
|
174731
174764
|
import_node_os36 = __toESM(require("node:os"), 1);
|
|
174732
174765
|
import_node_path198 = __toESM(require("node:path"), 1);
|
|
174733
|
-
|
|
174766
|
+
import_node_zlib12 = require("node:zlib");
|
|
174734
174767
|
pending = /* @__PURE__ */ new Map();
|
|
174735
174768
|
MAX_SOURCES_JAR_BYTES = 64 * 1024 * 1024;
|
|
174736
174769
|
MAX_SOURCE_ENTRY_BYTES = 16 * 1024 * 1024;
|
|
@@ -176137,10 +176170,10 @@ async function runSwift(args, opts = {}) {
|
|
|
176137
176170
|
res.end(JSON.stringify(metadata));
|
|
176138
176171
|
return;
|
|
176139
176172
|
}
|
|
176140
|
-
compressedMetadata ??=
|
|
176173
|
+
compressedMetadata ??= compressMetadata2(JSON.stringify(metadata), {
|
|
176141
176174
|
params: {
|
|
176142
|
-
[
|
|
176143
|
-
[
|
|
176175
|
+
[import_node_zlib13.constants.BROTLI_PARAM_QUALITY]: 4,
|
|
176176
|
+
[import_node_zlib13.constants.BROTLI_PARAM_LGWIN]: 24
|
|
176144
176177
|
}
|
|
176145
176178
|
});
|
|
176146
176179
|
void compressedMetadata.then(
|
|
@@ -176273,15 +176306,15 @@ async function runSwift(args, opts = {}) {
|
|
|
176273
176306
|
}
|
|
176274
176307
|
return code;
|
|
176275
176308
|
}
|
|
176276
|
-
var import_node_fs202, import_node_http6, import_node_path203,
|
|
176309
|
+
var import_node_fs202, import_node_http6, import_node_path203, import_node_util25, import_node_zlib13, import_ws7, compressMetadata2;
|
|
176277
176310
|
var init_swift2 = __esm({
|
|
176278
176311
|
"cli/commands/swift.ts"() {
|
|
176279
176312
|
"use strict";
|
|
176280
176313
|
import_node_fs202 = __toESM(require("node:fs"), 1);
|
|
176281
176314
|
import_node_http6 = __toESM(require("node:http"), 1);
|
|
176282
176315
|
import_node_path203 = __toESM(require("node:path"), 1);
|
|
176283
|
-
|
|
176284
|
-
|
|
176316
|
+
import_node_util25 = require("node:util");
|
|
176317
|
+
import_node_zlib13 = require("node:zlib");
|
|
176285
176318
|
init_swiftDiscoveryContract();
|
|
176286
176319
|
import_ws7 = require("peachsim/vendor/ws");
|
|
176287
176320
|
init_backend_origin();
|
|
@@ -176293,7 +176326,7 @@ var init_swift2 = __esm({
|
|
|
176293
176326
|
init_settings_flags();
|
|
176294
176327
|
init_control();
|
|
176295
176328
|
init_guest_host();
|
|
176296
|
-
|
|
176329
|
+
compressMetadata2 = (0, import_node_util25.promisify)(import_node_zlib13.brotliCompress);
|
|
176297
176330
|
}
|
|
176298
176331
|
});
|
|
176299
176332
|
|