peachsim 0.1.2747 → 0.1.2748
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 +3888 -3879
- 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-264PERTU.mjs → acorn-VEWLHGUF.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-OS777HDT.mjs → chunk-4QUOVEXG.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-6A6ESU7M.mjs → chunk-62Z4HAA5.mjs} +16 -15
- package/dist-lib/esm-chunks/{chunk-VBVWVPFV.mjs → chunk-6ZVR2CVC.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-RQYO274I.mjs → chunk-A2EC74CI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-H5VBNND3.mjs → chunk-BYYBOHZI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-UX3TKSSG.mjs → chunk-C6IVVMZN.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-SSEYL4BD.mjs → chunk-GWZFPIGW.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-OGKCUDUY.mjs → chunk-HMPLB7MA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DKOHFKVO.mjs → chunk-HPANCGMI.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-BTOHCTM5.mjs → chunk-HRS3DSAZ.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-LETYBISI.mjs → chunk-I3KV46CL.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3PIRJQS3.mjs → chunk-IE2LTKEG.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YL5WAVSA.mjs → chunk-KD3TI7UV.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-DNPF3SJV.mjs → chunk-KNNMOD5T.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NGFHBDMP.mjs → chunk-NNVYKFSY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-SZAKV76H.mjs → chunk-RU7J2QST.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-V5QS3LC7.mjs → chunk-TQACQLZ6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VFVDWLZL.mjs → chunk-TW5FZFU7.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-SNIXC3LK.mjs → chunk-U5SZIAIF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-C4WNCPE7.mjs → chunk-UFQHPARI.mjs} +119 -115
- package/dist-lib/esm-chunks/{chunk-R5URHHLY.mjs → chunk-UNOAFCHH.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-AASYNA7O.mjs → chunk-VKYISXKK.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-2KP4Q4QG.mjs → chunk-WN22FGGA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZGKZH72O.mjs → chunk-XM3QYC5V.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-X53TI6UE.mjs → metro-layout-parser-B74NVOKQ.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-BCWD6FXB.mjs → swift-package-prebuilt-B4QBXBQL.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-PVYYHAOX.mjs → swift-sdk-app-module-5OCMAJPP.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-YU237KAS.mjs → swift-sdk-image-LQKEASAW.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-E6S3PF4W.mjs → swift-sdk-image-producer-ZMYZXL7Z.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +124 -115
- 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 +415 -406
- package/dist-lib/host/fetch-proxy-handler.cjs +13 -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 +1 -1
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +86 -85
- package/dist-lib/public-origins-lib.json +73 -67
- 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 +415 -406
- package/dist-lib/swift-compile.cjs +120 -111
- 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/dist-types/packages/peach-engine/src/engine/native-paint-facts.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/paint-value-input.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/scene-native-binding.d.ts +1 -1
- package/package.json +1 -1
- package/src/one-native-controls-package.ts +5 -5
- package/src/one-sdk-bundle.ts +1 -1
- package/src/swift-compiler-digest.ts +1 -0
- package/src/swift-sdk-surface.ts +1 -117
- package/src/one-sdk/shard.ts +0 -382
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2748 | (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;
|
|
@@ -6177,7 +6177,7 @@ var init_swift_objc_sdk_tree = __esm({
|
|
|
6177
6177
|
|
|
6178
6178
|
// src/swift-compiler-digest.ts
|
|
6179
6179
|
function swiftArchiveCompilerDigestValue() {
|
|
6180
|
-
return true ? "
|
|
6180
|
+
return true ? "99ae71a024c1f7e48133d193acd1d2f2b0738fcbc5e5291800fd396afb31897b" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname, "archive");
|
|
6181
6181
|
}
|
|
6182
6182
|
var import_node_crypto10, import_node_fs25, import_node_path25, SWIFT_DIGEST_SOURCES, LINKED_IMAGE_SOURCES, SWIFT_ARCHIVE_DIGEST_SOURCES;
|
|
6183
6183
|
var init_swift_compiler_digest = __esm({
|
|
@@ -6190,6 +6190,7 @@ var init_swift_compiler_digest = __esm({
|
|
|
6190
6190
|
SWIFT_DIGEST_SOURCES = [
|
|
6191
6191
|
"swift-compile.ts",
|
|
6192
6192
|
"swift-sdk-surface.ts",
|
|
6193
|
+
"../../peach-globals/build/swift-source-mask.ts",
|
|
6193
6194
|
"swift-wasm-archive.ts",
|
|
6194
6195
|
"swift-lexical.ts",
|
|
6195
6196
|
"swift-header-compiler.ts",
|
|
@@ -6322,13 +6323,13 @@ var init_swift_standin_digest = __esm({
|
|
|
6322
6323
|
];
|
|
6323
6324
|
RUNTIME_IMPORT = /(?:^|[;\n])[ \t]*(?:import|export)\s+(?!type(?:\s|\{))([\s\S]*?)\s+from\s*['"]([^'"]+)['"]|(?:^|[;\n])[ \t]*import\s+['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
6324
6325
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS, STANDIN_DIGEST_EXCLUDED_FILES);
|
|
6325
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
6326
|
+
STANDIN_SOURCE_DIGEST = true ? "a17a387bf80ef3648c26193901ee6a7cb9abc691b99809c6a8bf9ad4617836af" : standinSourceDigest();
|
|
6326
6327
|
}
|
|
6327
6328
|
});
|
|
6328
6329
|
|
|
6329
6330
|
// src/expo-native-compiler-digest.ts
|
|
6330
6331
|
function expoNativeCompilerDigestValue() {
|
|
6331
|
-
return true ? "
|
|
6332
|
+
return true ? "3c2822a0dd3afa16e099b22ab6970a7d2276823c6d9aa2d72292a87fd8077fad" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
6332
6333
|
}
|
|
6333
6334
|
var import_node_crypto12;
|
|
6334
6335
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -41690,6 +41691,122 @@ var init_swift_lexical = __esm({
|
|
|
41690
41691
|
}
|
|
41691
41692
|
});
|
|
41692
41693
|
|
|
41694
|
+
// ../peach-globals/build/swift-source-mask.ts
|
|
41695
|
+
function maskSwiftCode(source) {
|
|
41696
|
+
const chars2 = source.split("");
|
|
41697
|
+
const blank = (from, to) => {
|
|
41698
|
+
for (let i = Math.max(0, from); i < Math.min(to, chars2.length); i++)
|
|
41699
|
+
if (chars2[i] !== "\n") chars2[i] = " ";
|
|
41700
|
+
};
|
|
41701
|
+
const hashesAt = (at) => {
|
|
41702
|
+
let end = at;
|
|
41703
|
+
while (source[end] === "#") end++;
|
|
41704
|
+
return end - at;
|
|
41705
|
+
};
|
|
41706
|
+
const scanString = (quote3, hashes) => {
|
|
41707
|
+
const multiline = source.startsWith('"""', quote3);
|
|
41708
|
+
let i = quote3 + (multiline ? 3 : 1);
|
|
41709
|
+
const keep = [];
|
|
41710
|
+
const quoteEnd = (at) => {
|
|
41711
|
+
const mark = multiline ? '"""' : '"';
|
|
41712
|
+
return source.startsWith(mark, at) && source.startsWith("#".repeat(hashes), at + mark.length);
|
|
41713
|
+
};
|
|
41714
|
+
while (i < chars2.length) {
|
|
41715
|
+
if (source[i] === "\\" && source.startsWith("#".repeat(hashes), i + 1)) {
|
|
41716
|
+
const escaped = i + 1 + hashes;
|
|
41717
|
+
if (source[escaped] === "(") {
|
|
41718
|
+
const codeStart = escaped + 1;
|
|
41719
|
+
const codeEnd = scanCode(codeStart, true);
|
|
41720
|
+
keep.push([codeStart, codeEnd]);
|
|
41721
|
+
i = codeEnd + 1;
|
|
41722
|
+
} else {
|
|
41723
|
+
i = escaped + 1;
|
|
41724
|
+
}
|
|
41725
|
+
continue;
|
|
41726
|
+
}
|
|
41727
|
+
if (quoteEnd(i)) {
|
|
41728
|
+
const close2 = i + (multiline ? 3 : 1) + hashes;
|
|
41729
|
+
let cursor = quote3 - hashes;
|
|
41730
|
+
const ranges = [...keep, [close2, close2]];
|
|
41731
|
+
for (const [from, to] of ranges)
|
|
41732
|
+
if (from > cursor) {
|
|
41733
|
+
blank(cursor, from);
|
|
41734
|
+
cursor = to;
|
|
41735
|
+
} else cursor = Math.max(cursor, to);
|
|
41736
|
+
return close2;
|
|
41737
|
+
}
|
|
41738
|
+
i++;
|
|
41739
|
+
}
|
|
41740
|
+
blank(quote3 - hashes, chars2.length);
|
|
41741
|
+
return chars2.length;
|
|
41742
|
+
};
|
|
41743
|
+
const scanCode = (i, nested) => {
|
|
41744
|
+
let parens = 0;
|
|
41745
|
+
while (i < chars2.length) {
|
|
41746
|
+
const char = source[i];
|
|
41747
|
+
if (char === "/" && source[i + 1] === "/") {
|
|
41748
|
+
const end = source.indexOf("\n", i);
|
|
41749
|
+
blank(i, end === -1 ? chars2.length : end);
|
|
41750
|
+
i = end === -1 ? chars2.length : end;
|
|
41751
|
+
continue;
|
|
41752
|
+
}
|
|
41753
|
+
if (char === "/" && source[i + 1] === "*") {
|
|
41754
|
+
let j = i + 2;
|
|
41755
|
+
let depth = 1;
|
|
41756
|
+
while (j < chars2.length && depth > 0) {
|
|
41757
|
+
if (source.startsWith("/*", j)) {
|
|
41758
|
+
depth++;
|
|
41759
|
+
j += 2;
|
|
41760
|
+
} else if (source.startsWith("*/", j)) {
|
|
41761
|
+
depth--;
|
|
41762
|
+
j += 2;
|
|
41763
|
+
} else j++;
|
|
41764
|
+
}
|
|
41765
|
+
blank(i, j);
|
|
41766
|
+
i = j;
|
|
41767
|
+
continue;
|
|
41768
|
+
}
|
|
41769
|
+
if (char === "#") {
|
|
41770
|
+
const hashes = hashesAt(i);
|
|
41771
|
+
const at = i + hashes;
|
|
41772
|
+
if (source[at] === '"') {
|
|
41773
|
+
i = scanString(at, hashes);
|
|
41774
|
+
continue;
|
|
41775
|
+
}
|
|
41776
|
+
if (hashes > 0 && source[at] === "/") {
|
|
41777
|
+
const mark = "#".repeat(hashes);
|
|
41778
|
+
let j = at + 1;
|
|
41779
|
+
while (j < chars2.length && !(source[j] === "/" && source.startsWith(mark, j + 1)))
|
|
41780
|
+
j++;
|
|
41781
|
+
blank(i, Math.min(chars2.length, j + 1 + hashes));
|
|
41782
|
+
i = Math.min(chars2.length, j + 1 + hashes);
|
|
41783
|
+
continue;
|
|
41784
|
+
}
|
|
41785
|
+
i++;
|
|
41786
|
+
continue;
|
|
41787
|
+
}
|
|
41788
|
+
if (char === '"') {
|
|
41789
|
+
i = scanString(i, 0);
|
|
41790
|
+
continue;
|
|
41791
|
+
}
|
|
41792
|
+
if (char === "(") parens++;
|
|
41793
|
+
else if (char === ")") {
|
|
41794
|
+
if (nested && parens === 0) return i;
|
|
41795
|
+
parens--;
|
|
41796
|
+
}
|
|
41797
|
+
i++;
|
|
41798
|
+
}
|
|
41799
|
+
return i;
|
|
41800
|
+
};
|
|
41801
|
+
scanCode(0, false);
|
|
41802
|
+
return chars2.join("");
|
|
41803
|
+
}
|
|
41804
|
+
var init_swift_source_mask = __esm({
|
|
41805
|
+
"../peach-globals/build/swift-source-mask.ts"() {
|
|
41806
|
+
"use strict";
|
|
41807
|
+
}
|
|
41808
|
+
});
|
|
41809
|
+
|
|
41693
41810
|
// src/swift-sdk-surface.ts
|
|
41694
41811
|
function swiftBuildJobs() {
|
|
41695
41812
|
const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
|
|
@@ -42377,115 +42494,6 @@ function swiftCodeMask(source) {
|
|
|
42377
42494
|
codeMaskChars += source.length;
|
|
42378
42495
|
return masked;
|
|
42379
42496
|
}
|
|
42380
|
-
function maskSwiftCode(source) {
|
|
42381
|
-
const chars2 = source.split("");
|
|
42382
|
-
const blank = (from, to) => {
|
|
42383
|
-
for (let i = Math.max(0, from); i < Math.min(to, chars2.length); i++)
|
|
42384
|
-
if (chars2[i] !== "\n") chars2[i] = " ";
|
|
42385
|
-
};
|
|
42386
|
-
const hashesAt = (at) => {
|
|
42387
|
-
let end = at;
|
|
42388
|
-
while (source[end] === "#") end++;
|
|
42389
|
-
return end - at;
|
|
42390
|
-
};
|
|
42391
|
-
const scanString = (quote3, hashes) => {
|
|
42392
|
-
const multiline = source.startsWith('"""', quote3);
|
|
42393
|
-
let i = quote3 + (multiline ? 3 : 1);
|
|
42394
|
-
const keep = [];
|
|
42395
|
-
const quoteEnd = (at) => {
|
|
42396
|
-
const mark = multiline ? '"""' : '"';
|
|
42397
|
-
return source.startsWith(mark, at) && source.startsWith("#".repeat(hashes), at + mark.length);
|
|
42398
|
-
};
|
|
42399
|
-
while (i < chars2.length) {
|
|
42400
|
-
if (source[i] === "\\" && source.startsWith("#".repeat(hashes), i + 1)) {
|
|
42401
|
-
const escaped = i + 1 + hashes;
|
|
42402
|
-
if (source[escaped] === "(") {
|
|
42403
|
-
const codeStart = escaped + 1;
|
|
42404
|
-
const codeEnd = scanCode(codeStart, true);
|
|
42405
|
-
keep.push([codeStart, codeEnd]);
|
|
42406
|
-
i = codeEnd + 1;
|
|
42407
|
-
} else {
|
|
42408
|
-
i = escaped + 1;
|
|
42409
|
-
}
|
|
42410
|
-
continue;
|
|
42411
|
-
}
|
|
42412
|
-
if (quoteEnd(i)) {
|
|
42413
|
-
const close2 = i + (multiline ? 3 : 1) + hashes;
|
|
42414
|
-
let cursor = quote3 - hashes;
|
|
42415
|
-
const ranges = [...keep, [close2, close2]];
|
|
42416
|
-
for (const [from, to] of ranges)
|
|
42417
|
-
if (from > cursor) {
|
|
42418
|
-
blank(cursor, from);
|
|
42419
|
-
cursor = to;
|
|
42420
|
-
} else cursor = Math.max(cursor, to);
|
|
42421
|
-
return close2;
|
|
42422
|
-
}
|
|
42423
|
-
i++;
|
|
42424
|
-
}
|
|
42425
|
-
blank(quote3 - hashes, chars2.length);
|
|
42426
|
-
return chars2.length;
|
|
42427
|
-
};
|
|
42428
|
-
const scanCode = (i, nested) => {
|
|
42429
|
-
let parens = 0;
|
|
42430
|
-
while (i < chars2.length) {
|
|
42431
|
-
const char = source[i];
|
|
42432
|
-
if (char === "/" && source[i + 1] === "/") {
|
|
42433
|
-
const end = source.indexOf("\n", i);
|
|
42434
|
-
blank(i, end === -1 ? chars2.length : end);
|
|
42435
|
-
i = end === -1 ? chars2.length : end;
|
|
42436
|
-
continue;
|
|
42437
|
-
}
|
|
42438
|
-
if (char === "/" && source[i + 1] === "*") {
|
|
42439
|
-
let j = i + 2;
|
|
42440
|
-
let depth = 1;
|
|
42441
|
-
while (j < chars2.length && depth > 0) {
|
|
42442
|
-
if (source.startsWith("/*", j)) {
|
|
42443
|
-
depth++;
|
|
42444
|
-
j += 2;
|
|
42445
|
-
} else if (source.startsWith("*/", j)) {
|
|
42446
|
-
depth--;
|
|
42447
|
-
j += 2;
|
|
42448
|
-
} else j++;
|
|
42449
|
-
}
|
|
42450
|
-
blank(i, j);
|
|
42451
|
-
i = j;
|
|
42452
|
-
continue;
|
|
42453
|
-
}
|
|
42454
|
-
if (char === "#") {
|
|
42455
|
-
const hashes = hashesAt(i);
|
|
42456
|
-
const at = i + hashes;
|
|
42457
|
-
if (source[at] === '"') {
|
|
42458
|
-
i = scanString(at, hashes);
|
|
42459
|
-
continue;
|
|
42460
|
-
}
|
|
42461
|
-
if (hashes > 0 && source[at] === "/") {
|
|
42462
|
-
const mark = "#".repeat(hashes);
|
|
42463
|
-
let j = at + 1;
|
|
42464
|
-
while (j < chars2.length && !(source[j] === "/" && source.startsWith(mark, j + 1)))
|
|
42465
|
-
j++;
|
|
42466
|
-
blank(i, Math.min(chars2.length, j + 1 + hashes));
|
|
42467
|
-
i = Math.min(chars2.length, j + 1 + hashes);
|
|
42468
|
-
continue;
|
|
42469
|
-
}
|
|
42470
|
-
i++;
|
|
42471
|
-
continue;
|
|
42472
|
-
}
|
|
42473
|
-
if (char === '"') {
|
|
42474
|
-
i = scanString(i, 0);
|
|
42475
|
-
continue;
|
|
42476
|
-
}
|
|
42477
|
-
if (char === "(") parens++;
|
|
42478
|
-
else if (char === ")") {
|
|
42479
|
-
if (nested && parens === 0) return i;
|
|
42480
|
-
parens--;
|
|
42481
|
-
}
|
|
42482
|
-
i++;
|
|
42483
|
-
}
|
|
42484
|
-
return i;
|
|
42485
|
-
};
|
|
42486
|
-
scanCode(0, false);
|
|
42487
|
-
return chars2.join("");
|
|
42488
|
-
}
|
|
42489
42497
|
function foundationOwnerOf(name3) {
|
|
42490
42498
|
if (name3 === "NSKeyValueObservedChange" || name3 === "NSKeyValueObservation")
|
|
42491
42499
|
return "PeachObjC";
|
|
@@ -42683,6 +42691,7 @@ var init_swift_sdk_surface = __esm({
|
|
|
42683
42691
|
import_node_fs68 = require("node:fs");
|
|
42684
42692
|
import_node_os12 = __toESM(require("node:os"), 1);
|
|
42685
42693
|
import_node_path68 = __toESM(require("node:path"), 1);
|
|
42694
|
+
init_swift_source_mask();
|
|
42686
42695
|
init_admitted_mac_build();
|
|
42687
42696
|
init_swift_distribution_contract();
|
|
42688
42697
|
init_swift_package();
|
|
@@ -54981,7 +54990,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
|
|
|
54981
54990
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
54982
54991
|
MULTI_MANIFEST_VERSION = 76;
|
|
54983
54992
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
54984
|
-
compilerSourceDigest = true ? "
|
|
54993
|
+
compilerSourceDigest = true ? "9e800b4e5695e0ea16860a945e2ba4dd9efa69f299d64b77b74c6197d9d31df6" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
54985
54994
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
54986
54995
|
MODULE_MAP_RESPONSE_FILE_RUN = 16;
|
|
54987
54996
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
@@ -119822,9 +119831,285 @@ var init_nativeSourceContract = __esm({
|
|
|
119822
119831
|
}
|
|
119823
119832
|
});
|
|
119824
119833
|
|
|
119834
|
+
// ../peach-globals/build/one-sdk-shard.ts
|
|
119835
|
+
function unsharded(name3, source) {
|
|
119836
|
+
const lineCount = source.split("\n").length;
|
|
119837
|
+
return [
|
|
119838
|
+
{
|
|
119839
|
+
name: name3,
|
|
119840
|
+
source,
|
|
119841
|
+
originalName: name3,
|
|
119842
|
+
lineMap: Array.from({ length: lineCount }, (_, index) => index + 1)
|
|
119843
|
+
}
|
|
119844
|
+
];
|
|
119845
|
+
}
|
|
119846
|
+
function chunkKey2(lines) {
|
|
119847
|
+
for (const { text: text7 } of lines) {
|
|
119848
|
+
const trimmed = text7.trim();
|
|
119849
|
+
if (trimmed !== "" && !trimmed.startsWith("//")) return trimmed;
|
|
119850
|
+
}
|
|
119851
|
+
return lines.map((item) => item.text).join("\n");
|
|
119852
|
+
}
|
|
119853
|
+
function stableShardIndex(key2, shardCount) {
|
|
119854
|
+
return (0, import_node_crypto93.createHash)("sha256").update(key2).digest().readUInt32BE(0) % shardCount;
|
|
119855
|
+
}
|
|
119856
|
+
function shardOneSDKBindingSource(name3, source, shardCount = ONE_SDK_BINDING_SHARDS) {
|
|
119857
|
+
if (shardCount <= 1 || !name3.endsWith(".swift") || name3.endsWith(".types.swift") || source.length < ONE_SDK_BINDING_SHARD_MIN_BYTES) {
|
|
119858
|
+
return unsharded(name3, source);
|
|
119859
|
+
}
|
|
119860
|
+
const masked = maskSwiftCode(source);
|
|
119861
|
+
if (/\bfileprivate\b/.test(masked)) return unsharded(name3, source);
|
|
119862
|
+
const lines = source.split("\n");
|
|
119863
|
+
const maskedLines = masked.split("\n");
|
|
119864
|
+
if (lines.length !== maskedLines.length) return unsharded(name3, source);
|
|
119865
|
+
const headerLines = [];
|
|
119866
|
+
let index = 0;
|
|
119867
|
+
let headerIfDepth = 0;
|
|
119868
|
+
while (index < lines.length) {
|
|
119869
|
+
const text7 = lines[index];
|
|
119870
|
+
const trimmed = text7.trim();
|
|
119871
|
+
if (trimmed === "" || trimmed.startsWith("// generated ") || trimmed.startsWith("import ")) {
|
|
119872
|
+
headerLines.push({ text: text7, line: index + 1 });
|
|
119873
|
+
index++;
|
|
119874
|
+
continue;
|
|
119875
|
+
}
|
|
119876
|
+
if (trimmed.startsWith("#if ")) {
|
|
119877
|
+
headerIfDepth++;
|
|
119878
|
+
headerLines.push({ text: text7, line: index + 1 });
|
|
119879
|
+
index++;
|
|
119880
|
+
continue;
|
|
119881
|
+
}
|
|
119882
|
+
if (headerIfDepth > 0 && (trimmed.startsWith("#elseif ") || trimmed === "#else" || trimmed === "#endif")) {
|
|
119883
|
+
if (trimmed === "#endif") headerIfDepth--;
|
|
119884
|
+
headerLines.push({ text: text7, line: index + 1 });
|
|
119885
|
+
index++;
|
|
119886
|
+
continue;
|
|
119887
|
+
}
|
|
119888
|
+
break;
|
|
119889
|
+
}
|
|
119890
|
+
if (headerIfDepth !== 0) return unsharded(name3, source);
|
|
119891
|
+
while (headerLines.length > 0 && headerLines.at(-1).text.trim() === "") {
|
|
119892
|
+
headerLines.pop();
|
|
119893
|
+
}
|
|
119894
|
+
const chunks = [];
|
|
119895
|
+
let depth = 0;
|
|
119896
|
+
let pending2 = [];
|
|
119897
|
+
let hadBrace = false;
|
|
119898
|
+
let inImplementation = false;
|
|
119899
|
+
let inOpen = false;
|
|
119900
|
+
let openDeclarations = 0;
|
|
119901
|
+
let activeEnum = null;
|
|
119902
|
+
let enumDeclLine = 0;
|
|
119903
|
+
let memberLines = [];
|
|
119904
|
+
let memberHadBrace = false;
|
|
119905
|
+
for (; index < lines.length; index++) {
|
|
119906
|
+
const text7 = lines[index];
|
|
119907
|
+
const lineNo = index + 1;
|
|
119908
|
+
const maskedLine = maskedLines[index];
|
|
119909
|
+
if (depth <= 1 && /^\s*#/.test(maskedLine)) return unsharded(name3, source);
|
|
119910
|
+
let delta = 0;
|
|
119911
|
+
for (let i = 0; i < maskedLine.length; i++) {
|
|
119912
|
+
const ch = maskedLine[i];
|
|
119913
|
+
if (ch === "{") delta++;
|
|
119914
|
+
else if (ch === "}") delta--;
|
|
119915
|
+
}
|
|
119916
|
+
if (activeEnum === null) {
|
|
119917
|
+
if (depth === 0 && !hadBrace && /^\s*(?:@\w+(?:\([^)]*\))?\s+)*private\b/.test(maskedLine)) {
|
|
119918
|
+
return unsharded(name3, source);
|
|
119919
|
+
}
|
|
119920
|
+
if (depth === 0 && !hadBrace && !inImplementation && text7.startsWith("// implementation ")) {
|
|
119921
|
+
inImplementation = true;
|
|
119922
|
+
pending2.push({ text: text7, line: lineNo });
|
|
119923
|
+
continue;
|
|
119924
|
+
}
|
|
119925
|
+
if (inImplementation) {
|
|
119926
|
+
pending2.push({ text: text7, line: lineNo });
|
|
119927
|
+
depth += delta;
|
|
119928
|
+
if (depth < 0) return unsharded(name3, source);
|
|
119929
|
+
if (depth === 0 && text7 === "// end implementation") {
|
|
119930
|
+
chunks.push({ kind: "top", key: chunkKey2(pending2), lines: pending2 });
|
|
119931
|
+
pending2 = [];
|
|
119932
|
+
hadBrace = false;
|
|
119933
|
+
inImplementation = false;
|
|
119934
|
+
}
|
|
119935
|
+
continue;
|
|
119936
|
+
}
|
|
119937
|
+
if (depth === 0 && !hadBrace && !inOpen && text7.startsWith("// open ")) {
|
|
119938
|
+
inOpen = true;
|
|
119939
|
+
openDeclarations = 0;
|
|
119940
|
+
pending2.push({ text: text7, line: lineNo });
|
|
119941
|
+
continue;
|
|
119942
|
+
}
|
|
119943
|
+
if (inOpen) {
|
|
119944
|
+
pending2.push({ text: text7, line: lineNo });
|
|
119945
|
+
if (delta !== 0 || depth > 0) hadBrace = true;
|
|
119946
|
+
depth += delta;
|
|
119947
|
+
if (depth < 0) return unsharded(name3, source);
|
|
119948
|
+
if (hadBrace && depth === 0) {
|
|
119949
|
+
openDeclarations++;
|
|
119950
|
+
hadBrace = false;
|
|
119951
|
+
if (openDeclarations === 2) {
|
|
119952
|
+
chunks.push({ kind: "top", key: chunkKey2(pending2), lines: pending2 });
|
|
119953
|
+
pending2 = [];
|
|
119954
|
+
inOpen = false;
|
|
119955
|
+
openDeclarations = 0;
|
|
119956
|
+
}
|
|
119957
|
+
}
|
|
119958
|
+
continue;
|
|
119959
|
+
}
|
|
119960
|
+
const enumMatch = depth === 0 && !hadBrace && pending2.every(
|
|
119961
|
+
(item) => item.text.trim() === "" || item.text.trim().startsWith("//")
|
|
119962
|
+
) ? /^enum (OneSDK_\w+)\s*\{\s*$/.exec(maskedLine) : null;
|
|
119963
|
+
if (enumMatch && delta === 1) {
|
|
119964
|
+
const enumName = enumMatch[1];
|
|
119965
|
+
const prefix = pending2.filter((item) => item.text.trim() !== "");
|
|
119966
|
+
enumDeclLine = lineNo;
|
|
119967
|
+
chunks.push({
|
|
119968
|
+
kind: "enumDecl",
|
|
119969
|
+
enumName,
|
|
119970
|
+
lines: [...prefix, { text: `enum ${enumName} {}`, line: lineNo }]
|
|
119971
|
+
});
|
|
119972
|
+
pending2 = [];
|
|
119973
|
+
activeEnum = enumName;
|
|
119974
|
+
depth = 1;
|
|
119975
|
+
continue;
|
|
119976
|
+
}
|
|
119977
|
+
if (depth === 0 && !hadBrace && text7.trim() === "" && pending2.length === 0) {
|
|
119978
|
+
continue;
|
|
119979
|
+
}
|
|
119980
|
+
pending2.push({ text: text7, line: lineNo });
|
|
119981
|
+
if (delta !== 0 || depth > 0) hadBrace = true;
|
|
119982
|
+
depth += delta;
|
|
119983
|
+
if (depth < 0) return unsharded(name3, source);
|
|
119984
|
+
if (hadBrace && depth === 0) {
|
|
119985
|
+
chunks.push({ kind: "top", key: chunkKey2(pending2), lines: pending2 });
|
|
119986
|
+
pending2 = [];
|
|
119987
|
+
hadBrace = false;
|
|
119988
|
+
}
|
|
119989
|
+
} else {
|
|
119990
|
+
const nextDepth = depth + delta;
|
|
119991
|
+
if (nextDepth < 0) return unsharded(name3, source);
|
|
119992
|
+
if (depth === 1 && nextDepth === 0) {
|
|
119993
|
+
if (memberHadBrace || maskedLine.trim() !== "}") return unsharded(name3, source);
|
|
119994
|
+
if (memberLines.some(
|
|
119995
|
+
(item) => item.text.trim() !== "" && !item.text.trim().startsWith("//")
|
|
119996
|
+
)) {
|
|
119997
|
+
chunks.push({
|
|
119998
|
+
kind: "enumMember",
|
|
119999
|
+
enumName: activeEnum,
|
|
120000
|
+
key: chunkKey2(memberLines),
|
|
120001
|
+
lines: memberLines
|
|
120002
|
+
});
|
|
120003
|
+
}
|
|
120004
|
+
activeEnum = null;
|
|
120005
|
+
depth = 0;
|
|
120006
|
+
memberLines = [];
|
|
120007
|
+
continue;
|
|
120008
|
+
}
|
|
120009
|
+
if (depth === 1 && !memberHadBrace && /^\s*(?:@\w+(?:\([^)]*\))?\s+)*private\b/.test(maskedLine)) {
|
|
120010
|
+
return unsharded(name3, source);
|
|
120011
|
+
}
|
|
120012
|
+
if (depth === 1 && !memberHadBrace && text7.trim() === "") {
|
|
120013
|
+
depth = nextDepth;
|
|
120014
|
+
continue;
|
|
120015
|
+
}
|
|
120016
|
+
memberLines.push({ text: text7, line: lineNo });
|
|
120017
|
+
if (nextDepth > 1 || delta !== 0) memberHadBrace = true;
|
|
120018
|
+
depth = nextDepth;
|
|
120019
|
+
if (memberHadBrace && depth === 1 || !memberHadBrace && depth === 1 && /^\s*(?:@\w+(?:\([^)]*\))?\s+)*static\s+let\b/.test(maskedLine)) {
|
|
120020
|
+
chunks.push({
|
|
120021
|
+
kind: "enumMember",
|
|
120022
|
+
enumName: activeEnum,
|
|
120023
|
+
key: chunkKey2(memberLines),
|
|
120024
|
+
lines: memberLines
|
|
120025
|
+
});
|
|
120026
|
+
memberLines = [];
|
|
120027
|
+
memberHadBrace = false;
|
|
120028
|
+
}
|
|
120029
|
+
}
|
|
120030
|
+
}
|
|
120031
|
+
if (depth !== 0 || activeEnum !== null || inImplementation || inOpen || pending2.some(
|
|
120032
|
+
(item) => item.text.trim() !== "" && !item.text.trim().startsWith("//")
|
|
120033
|
+
) || chunks.length < shardCount) {
|
|
120034
|
+
return unsharded(name3, source);
|
|
120035
|
+
}
|
|
120036
|
+
const buckets = Array.from({ length: shardCount }, () => []);
|
|
120037
|
+
for (const chunk of chunks) {
|
|
120038
|
+
if (chunk.kind === "enumDecl") {
|
|
120039
|
+
buckets[0].push(chunk);
|
|
120040
|
+
} else {
|
|
120041
|
+
buckets[stableShardIndex(chunk.key, shardCount)].push(chunk);
|
|
120042
|
+
}
|
|
120043
|
+
}
|
|
120044
|
+
const nonEmpty2 = buckets.map((bucket, index2) => ({ bucket, index: index2 })).filter(({ bucket }) => bucket.length > 0);
|
|
120045
|
+
if (nonEmpty2.length < 2) return unsharded(name3, source);
|
|
120046
|
+
const stem2 = name3.slice(0, -".swift".length);
|
|
120047
|
+
return nonEmpty2.map(({ bucket, index: shardIndex }) => {
|
|
120048
|
+
const outLines = [];
|
|
120049
|
+
const lineMap = [];
|
|
120050
|
+
const pushLine = (text7, origLine) => {
|
|
120051
|
+
outLines.push(text7);
|
|
120052
|
+
lineMap.push(origLine);
|
|
120053
|
+
};
|
|
120054
|
+
for (const item of headerLines) pushLine(item.text, item.line);
|
|
120055
|
+
pushLine("", 0);
|
|
120056
|
+
let openEnum = null;
|
|
120057
|
+
let enumBody = [];
|
|
120058
|
+
let hasPart = false;
|
|
120059
|
+
const startPart = () => {
|
|
120060
|
+
if (hasPart) pushLine("", 0);
|
|
120061
|
+
hasPart = true;
|
|
120062
|
+
};
|
|
120063
|
+
const flushEnum = () => {
|
|
120064
|
+
if (!openEnum) return;
|
|
120065
|
+
startPart();
|
|
120066
|
+
pushLine(`extension ${openEnum} {`, enumDeclLine);
|
|
120067
|
+
for (let i = 0; i < enumBody.length; i++) {
|
|
120068
|
+
if (i > 0) pushLine("", 0);
|
|
120069
|
+
for (const item of enumBody[i]) pushLine(item.text, item.line);
|
|
120070
|
+
}
|
|
120071
|
+
pushLine("}", enumDeclLine);
|
|
120072
|
+
openEnum = null;
|
|
120073
|
+
enumBody = [];
|
|
120074
|
+
};
|
|
120075
|
+
for (const chunk of bucket) {
|
|
120076
|
+
if (chunk.kind === "enumMember") {
|
|
120077
|
+
if (openEnum !== chunk.enumName) {
|
|
120078
|
+
flushEnum();
|
|
120079
|
+
openEnum = chunk.enumName;
|
|
120080
|
+
}
|
|
120081
|
+
enumBody.push(chunk.lines);
|
|
120082
|
+
} else {
|
|
120083
|
+
flushEnum();
|
|
120084
|
+
startPart();
|
|
120085
|
+
for (const item of chunk.lines) pushLine(item.text, item.line);
|
|
120086
|
+
}
|
|
120087
|
+
}
|
|
120088
|
+
flushEnum();
|
|
120089
|
+
pushLine("", 0);
|
|
120090
|
+
return {
|
|
120091
|
+
name: `${stem2}_${shardIndex}.swift`,
|
|
120092
|
+
source: outLines.join("\n"),
|
|
120093
|
+
originalName: name3,
|
|
120094
|
+
lineMap
|
|
120095
|
+
};
|
|
120096
|
+
});
|
|
120097
|
+
}
|
|
120098
|
+
var import_node_crypto93, import_node_path157, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES;
|
|
120099
|
+
var init_one_sdk_shard = __esm({
|
|
120100
|
+
"../peach-globals/build/one-sdk-shard.ts"() {
|
|
120101
|
+
"use strict";
|
|
120102
|
+
import_node_crypto93 = require("node:crypto");
|
|
120103
|
+
import_node_path157 = __toESM(require("node:path"), 1);
|
|
120104
|
+
init_swift_source_mask();
|
|
120105
|
+
ONE_SDK_BINDING_SHARDS = 8;
|
|
120106
|
+
ONE_SDK_BINDING_SHARD_MIN_BYTES = 256 * 1024;
|
|
120107
|
+
}
|
|
120108
|
+
});
|
|
120109
|
+
|
|
119825
120110
|
// ../peach-globals/build/one-swift-control-source.ts
|
|
119826
120111
|
function readSchema(one) {
|
|
119827
|
-
return JSON.parse((0, import_node_fs155.readFileSync)((0,
|
|
120112
|
+
return JSON.parse((0, import_node_fs155.readFileSync)((0, import_node_path158.join)(one, "schema.json"), "utf8"));
|
|
119828
120113
|
}
|
|
119829
120114
|
function payloadRows(schema4, props, prop) {
|
|
119830
120115
|
const item = /^ReadonlyArray<(\w+)>$/.exec(props[prop]?.type ?? "")?.[1];
|
|
@@ -119979,22 +120264,22 @@ function arrayBindings(name3, body) {
|
|
|
119979
120264
|
}
|
|
119980
120265
|
function componentViews(one, selected) {
|
|
119981
120266
|
const schema4 = readSchema(one);
|
|
119982
|
-
const folders = [(0,
|
|
120267
|
+
const folders = [(0, import_node_path158.join)(one, "ios/Generated"), (0, import_node_path158.join)(one, "ios")];
|
|
119983
120268
|
const files2 = folders.map((folder) => new Set((0, import_node_fs155.readdirSync)(folder)));
|
|
119984
120269
|
return schema4.components.flatMap(({ name: name3, props, commands: commands2 = {} }) => {
|
|
119985
120270
|
if (selected && !selected.includes(name3)) return [];
|
|
119986
120271
|
const file = `${name3}ComponentView.mm`;
|
|
119987
120272
|
const folder = folders.find((_, index) => files2[index].has(file));
|
|
119988
120273
|
if (!folder) return [];
|
|
119989
|
-
const raw2 = (0, import_node_fs155.readFileSync)((0,
|
|
120274
|
+
const raw2 = (0, import_node_fs155.readFileSync)((0, import_node_path158.join)(folder, file), "utf8");
|
|
119990
120275
|
const view = /\b(_\w+) = \[OneNative\w+View new\]/.exec(raw2)?.[1];
|
|
119991
120276
|
if (!view) return [];
|
|
119992
120277
|
const source = raw2.replace(new RegExp(`\\b${view}\\b`, "g"), "_nativeView");
|
|
119993
|
-
return [{ name: name3, props, commands: commands2, source, file: (0,
|
|
120278
|
+
return [{ name: name3, props, commands: commands2, source, file: (0, import_node_path158.join)(folder, file) }];
|
|
119994
120279
|
});
|
|
119995
120280
|
}
|
|
119996
120281
|
function swiftGuestControls(one, names, linkedGroups) {
|
|
119997
|
-
const watched = [(0,
|
|
120282
|
+
const watched = [(0, import_node_path158.join)(one, "schema.json")];
|
|
119998
120283
|
const defines = /* @__PURE__ */ new Set();
|
|
119999
120284
|
const schema4 = readSchema(one);
|
|
120000
120285
|
const views = componentViews(one, names);
|
|
@@ -120009,7 +120294,7 @@ function swiftGuestControls(one, names, linkedGroups) {
|
|
|
120009
120294
|
const arrays = arrayBindings(name3, update);
|
|
120010
120295
|
const conformance = childMounting(viewClass, source);
|
|
120011
120296
|
if (conformance) conformances.push(conformance);
|
|
120012
|
-
const swift = (0,
|
|
120297
|
+
const swift = (0, import_node_path158.join)((0, import_node_path158.dirname)(file), viewClass + ".swift");
|
|
120013
120298
|
const declaration = (0, import_node_fs155.readFileSync)(swift, "utf8");
|
|
120014
120299
|
watched.push(file, swift);
|
|
120015
120300
|
const initializer = /public (?:override )?init\(\)/.test(declaration) ? "()" : "(frame: .zero)";
|
|
@@ -120104,12 +120389,12 @@ function swiftGuestControls(one, names, linkedGroups) {
|
|
|
120104
120389
|
watched
|
|
120105
120390
|
};
|
|
120106
120391
|
}
|
|
120107
|
-
var import_node_fs155,
|
|
120392
|
+
var import_node_fs155, import_node_path158, payloadTypes, payloadProp;
|
|
120108
120393
|
var init_one_swift_control_source = __esm({
|
|
120109
120394
|
"../peach-globals/build/one-swift-control-source.ts"() {
|
|
120110
120395
|
"use strict";
|
|
120111
120396
|
import_node_fs155 = require("node:fs");
|
|
120112
|
-
|
|
120397
|
+
import_node_path158 = require("node:path");
|
|
120113
120398
|
payloadTypes = {
|
|
120114
120399
|
boolean: ["Bool", false],
|
|
120115
120400
|
"boolean[]": ["[Bool]", []],
|
|
@@ -120234,7 +120519,7 @@ function swiftUIControls(one, options2) {
|
|
|
120234
120519
|
if (glue.guard && (!groupDefines || groupDefines.has(glue.guard))) {
|
|
120235
120520
|
activeDefines.add(glue.guard);
|
|
120236
120521
|
}
|
|
120237
|
-
const header2 = (0,
|
|
120522
|
+
const header2 = (0, import_node_path159.join)(one, "ios", glue.viewClass + ".h");
|
|
120238
120523
|
return { ...glue, header: (0, import_node_fs156.existsSync)(header2) ? header2 : void 0 };
|
|
120239
120524
|
});
|
|
120240
120525
|
const activeControls = controls.filter(
|
|
@@ -120254,7 +120539,7 @@ function swiftUIControls(one, options2) {
|
|
|
120254
120539
|
for (const [, include] of (0, import_node_fs156.readFileSync)(file, "utf8").matchAll(
|
|
120255
120540
|
/^#(?:include|import) "([^"]+)"/gm
|
|
120256
120541
|
)) {
|
|
120257
|
-
const dependency = (0,
|
|
120542
|
+
const dependency = (0, import_node_path159.join)((0, import_node_path159.dirname)(file), include);
|
|
120258
120543
|
if ((0, import_node_fs156.existsSync)(dependency)) headers.add(dependency);
|
|
120259
120544
|
}
|
|
120260
120545
|
}
|
|
@@ -120276,7 +120561,7 @@ function swiftUIControls(one, options2) {
|
|
|
120276
120561
|
'#include "OneNativeSyncBridge.h"',
|
|
120277
120562
|
...controls.flatMap(({ header: header2, guard }) => {
|
|
120278
120563
|
if (!header2) return [];
|
|
120279
|
-
const include = "#import " + JSON.stringify(options2?.basenameImports ? (0,
|
|
120564
|
+
const include = "#import " + JSON.stringify(options2?.basenameImports ? (0, import_node_path159.basename)(header2) : header2);
|
|
120280
120565
|
return guard ? [`#if ${guard}`, include, "#endif"] : [include];
|
|
120281
120566
|
}),
|
|
120282
120567
|
"",
|
|
@@ -120315,12 +120600,12 @@ function swiftUIControls(one, options2) {
|
|
|
120315
120600
|
defines: [...activeDefines]
|
|
120316
120601
|
};
|
|
120317
120602
|
}
|
|
120318
|
-
var import_node_fs156,
|
|
120603
|
+
var import_node_fs156, import_node_path159, handwritten, boxes;
|
|
120319
120604
|
var init_one_swift_ui_controls = __esm({
|
|
120320
120605
|
"../peach-globals/build/one-swift-ui-controls.ts"() {
|
|
120321
120606
|
"use strict";
|
|
120322
120607
|
import_node_fs156 = require("node:fs");
|
|
120323
|
-
|
|
120608
|
+
import_node_path159 = require("node:path");
|
|
120324
120609
|
init_one_swift_control_source();
|
|
120325
120610
|
handwritten = /* @__PURE__ */ new Set([
|
|
120326
120611
|
"OneNativeMenu",
|
|
@@ -122751,282 +123036,6 @@ const char* peach_one_swift_ui_commands(const char* namePtr, uint32_t nameLen) {
|
|
|
122751
123036
|
}
|
|
122752
123037
|
});
|
|
122753
123038
|
|
|
122754
|
-
// src/one-sdk/shard.ts
|
|
122755
|
-
function unsharded(name3, source) {
|
|
122756
|
-
const lineCount = source.split("\n").length;
|
|
122757
|
-
return [
|
|
122758
|
-
{
|
|
122759
|
-
name: name3,
|
|
122760
|
-
source,
|
|
122761
|
-
originalName: name3,
|
|
122762
|
-
lineMap: Array.from({ length: lineCount }, (_, index) => index + 1)
|
|
122763
|
-
}
|
|
122764
|
-
];
|
|
122765
|
-
}
|
|
122766
|
-
function chunkKey2(lines) {
|
|
122767
|
-
for (const { text: text7 } of lines) {
|
|
122768
|
-
const trimmed = text7.trim();
|
|
122769
|
-
if (trimmed !== "" && !trimmed.startsWith("//")) return trimmed;
|
|
122770
|
-
}
|
|
122771
|
-
return lines.map((item) => item.text).join("\n");
|
|
122772
|
-
}
|
|
122773
|
-
function stableShardIndex(key2, shardCount) {
|
|
122774
|
-
return (0, import_node_crypto93.createHash)("sha256").update(key2).digest().readUInt32BE(0) % shardCount;
|
|
122775
|
-
}
|
|
122776
|
-
function shardOneSDKBindingSource(name3, source, shardCount = ONE_SDK_BINDING_SHARDS) {
|
|
122777
|
-
if (shardCount <= 1 || !name3.endsWith(".swift") || name3.endsWith(".types.swift") || source.length < ONE_SDK_BINDING_SHARD_MIN_BYTES) {
|
|
122778
|
-
return unsharded(name3, source);
|
|
122779
|
-
}
|
|
122780
|
-
const masked = swiftCodeMask(source);
|
|
122781
|
-
if (/\bfileprivate\b/.test(masked)) return unsharded(name3, source);
|
|
122782
|
-
const lines = source.split("\n");
|
|
122783
|
-
const maskedLines = masked.split("\n");
|
|
122784
|
-
if (lines.length !== maskedLines.length) return unsharded(name3, source);
|
|
122785
|
-
const headerLines = [];
|
|
122786
|
-
let index = 0;
|
|
122787
|
-
let headerIfDepth = 0;
|
|
122788
|
-
while (index < lines.length) {
|
|
122789
|
-
const text7 = lines[index];
|
|
122790
|
-
const trimmed = text7.trim();
|
|
122791
|
-
if (trimmed === "" || trimmed.startsWith("// generated ") || trimmed.startsWith("import ")) {
|
|
122792
|
-
headerLines.push({ text: text7, line: index + 1 });
|
|
122793
|
-
index++;
|
|
122794
|
-
continue;
|
|
122795
|
-
}
|
|
122796
|
-
if (trimmed.startsWith("#if ")) {
|
|
122797
|
-
headerIfDepth++;
|
|
122798
|
-
headerLines.push({ text: text7, line: index + 1 });
|
|
122799
|
-
index++;
|
|
122800
|
-
continue;
|
|
122801
|
-
}
|
|
122802
|
-
if (headerIfDepth > 0 && (trimmed.startsWith("#elseif ") || trimmed === "#else" || trimmed === "#endif")) {
|
|
122803
|
-
if (trimmed === "#endif") headerIfDepth--;
|
|
122804
|
-
headerLines.push({ text: text7, line: index + 1 });
|
|
122805
|
-
index++;
|
|
122806
|
-
continue;
|
|
122807
|
-
}
|
|
122808
|
-
break;
|
|
122809
|
-
}
|
|
122810
|
-
if (headerIfDepth !== 0) return unsharded(name3, source);
|
|
122811
|
-
while (headerLines.length > 0 && headerLines.at(-1).text.trim() === "") {
|
|
122812
|
-
headerLines.pop();
|
|
122813
|
-
}
|
|
122814
|
-
const chunks = [];
|
|
122815
|
-
let depth = 0;
|
|
122816
|
-
let pending2 = [];
|
|
122817
|
-
let hadBrace = false;
|
|
122818
|
-
let inImplementation = false;
|
|
122819
|
-
let inOpen = false;
|
|
122820
|
-
let openDeclarations = 0;
|
|
122821
|
-
let activeEnum = null;
|
|
122822
|
-
let enumDeclLine = 0;
|
|
122823
|
-
let memberLines = [];
|
|
122824
|
-
let memberHadBrace = false;
|
|
122825
|
-
for (; index < lines.length; index++) {
|
|
122826
|
-
const text7 = lines[index];
|
|
122827
|
-
const lineNo = index + 1;
|
|
122828
|
-
const maskedLine = maskedLines[index];
|
|
122829
|
-
if (depth <= 1 && /^\s*#/.test(maskedLine)) return unsharded(name3, source);
|
|
122830
|
-
let delta = 0;
|
|
122831
|
-
for (let i = 0; i < maskedLine.length; i++) {
|
|
122832
|
-
const ch = maskedLine[i];
|
|
122833
|
-
if (ch === "{") delta++;
|
|
122834
|
-
else if (ch === "}") delta--;
|
|
122835
|
-
}
|
|
122836
|
-
if (activeEnum === null) {
|
|
122837
|
-
if (depth === 0 && !hadBrace && /^\s*(?:@\w+(?:\([^)]*\))?\s+)*private\b/.test(maskedLine)) {
|
|
122838
|
-
return unsharded(name3, source);
|
|
122839
|
-
}
|
|
122840
|
-
if (depth === 0 && !hadBrace && !inImplementation && text7.startsWith("// implementation ")) {
|
|
122841
|
-
inImplementation = true;
|
|
122842
|
-
pending2.push({ text: text7, line: lineNo });
|
|
122843
|
-
continue;
|
|
122844
|
-
}
|
|
122845
|
-
if (inImplementation) {
|
|
122846
|
-
pending2.push({ text: text7, line: lineNo });
|
|
122847
|
-
depth += delta;
|
|
122848
|
-
if (depth < 0) return unsharded(name3, source);
|
|
122849
|
-
if (depth === 0 && text7 === "// end implementation") {
|
|
122850
|
-
chunks.push({ kind: "top", key: chunkKey2(pending2), lines: pending2 });
|
|
122851
|
-
pending2 = [];
|
|
122852
|
-
hadBrace = false;
|
|
122853
|
-
inImplementation = false;
|
|
122854
|
-
}
|
|
122855
|
-
continue;
|
|
122856
|
-
}
|
|
122857
|
-
if (depth === 0 && !hadBrace && !inOpen && text7.startsWith("// open ")) {
|
|
122858
|
-
inOpen = true;
|
|
122859
|
-
openDeclarations = 0;
|
|
122860
|
-
pending2.push({ text: text7, line: lineNo });
|
|
122861
|
-
continue;
|
|
122862
|
-
}
|
|
122863
|
-
if (inOpen) {
|
|
122864
|
-
pending2.push({ text: text7, line: lineNo });
|
|
122865
|
-
if (delta !== 0 || depth > 0) hadBrace = true;
|
|
122866
|
-
depth += delta;
|
|
122867
|
-
if (depth < 0) return unsharded(name3, source);
|
|
122868
|
-
if (hadBrace && depth === 0) {
|
|
122869
|
-
openDeclarations++;
|
|
122870
|
-
hadBrace = false;
|
|
122871
|
-
if (openDeclarations === 2) {
|
|
122872
|
-
chunks.push({ kind: "top", key: chunkKey2(pending2), lines: pending2 });
|
|
122873
|
-
pending2 = [];
|
|
122874
|
-
inOpen = false;
|
|
122875
|
-
openDeclarations = 0;
|
|
122876
|
-
}
|
|
122877
|
-
}
|
|
122878
|
-
continue;
|
|
122879
|
-
}
|
|
122880
|
-
const enumMatch = depth === 0 && !hadBrace && pending2.every(
|
|
122881
|
-
(item) => item.text.trim() === "" || item.text.trim().startsWith("//")
|
|
122882
|
-
) ? /^enum (OneSDK_\w+)\s*\{\s*$/.exec(maskedLine) : null;
|
|
122883
|
-
if (enumMatch && delta === 1) {
|
|
122884
|
-
const enumName = enumMatch[1];
|
|
122885
|
-
const prefix = pending2.filter((item) => item.text.trim() !== "");
|
|
122886
|
-
enumDeclLine = lineNo;
|
|
122887
|
-
chunks.push({
|
|
122888
|
-
kind: "enumDecl",
|
|
122889
|
-
enumName,
|
|
122890
|
-
lines: [...prefix, { text: `enum ${enumName} {}`, line: lineNo }]
|
|
122891
|
-
});
|
|
122892
|
-
pending2 = [];
|
|
122893
|
-
activeEnum = enumName;
|
|
122894
|
-
depth = 1;
|
|
122895
|
-
continue;
|
|
122896
|
-
}
|
|
122897
|
-
if (depth === 0 && !hadBrace && text7.trim() === "" && pending2.length === 0) {
|
|
122898
|
-
continue;
|
|
122899
|
-
}
|
|
122900
|
-
pending2.push({ text: text7, line: lineNo });
|
|
122901
|
-
if (delta !== 0 || depth > 0) hadBrace = true;
|
|
122902
|
-
depth += delta;
|
|
122903
|
-
if (depth < 0) return unsharded(name3, source);
|
|
122904
|
-
if (hadBrace && depth === 0) {
|
|
122905
|
-
chunks.push({ kind: "top", key: chunkKey2(pending2), lines: pending2 });
|
|
122906
|
-
pending2 = [];
|
|
122907
|
-
hadBrace = false;
|
|
122908
|
-
}
|
|
122909
|
-
} else {
|
|
122910
|
-
const nextDepth = depth + delta;
|
|
122911
|
-
if (nextDepth < 0) return unsharded(name3, source);
|
|
122912
|
-
if (depth === 1 && nextDepth === 0) {
|
|
122913
|
-
if (memberHadBrace || maskedLine.trim() !== "}") return unsharded(name3, source);
|
|
122914
|
-
if (memberLines.some(
|
|
122915
|
-
(item) => item.text.trim() !== "" && !item.text.trim().startsWith("//")
|
|
122916
|
-
)) {
|
|
122917
|
-
chunks.push({
|
|
122918
|
-
kind: "enumMember",
|
|
122919
|
-
enumName: activeEnum,
|
|
122920
|
-
key: chunkKey2(memberLines),
|
|
122921
|
-
lines: memberLines
|
|
122922
|
-
});
|
|
122923
|
-
}
|
|
122924
|
-
activeEnum = null;
|
|
122925
|
-
depth = 0;
|
|
122926
|
-
memberLines = [];
|
|
122927
|
-
continue;
|
|
122928
|
-
}
|
|
122929
|
-
if (depth === 1 && !memberHadBrace && /^\s*(?:@\w+(?:\([^)]*\))?\s+)*private\b/.test(maskedLine)) {
|
|
122930
|
-
return unsharded(name3, source);
|
|
122931
|
-
}
|
|
122932
|
-
if (depth === 1 && !memberHadBrace && text7.trim() === "") {
|
|
122933
|
-
depth = nextDepth;
|
|
122934
|
-
continue;
|
|
122935
|
-
}
|
|
122936
|
-
memberLines.push({ text: text7, line: lineNo });
|
|
122937
|
-
if (nextDepth > 1 || delta !== 0) memberHadBrace = true;
|
|
122938
|
-
depth = nextDepth;
|
|
122939
|
-
if (memberHadBrace && depth === 1 || !memberHadBrace && depth === 1 && /^\s*(?:@\w+(?:\([^)]*\))?\s+)*static\s+let\b/.test(maskedLine)) {
|
|
122940
|
-
chunks.push({
|
|
122941
|
-
kind: "enumMember",
|
|
122942
|
-
enumName: activeEnum,
|
|
122943
|
-
key: chunkKey2(memberLines),
|
|
122944
|
-
lines: memberLines
|
|
122945
|
-
});
|
|
122946
|
-
memberLines = [];
|
|
122947
|
-
memberHadBrace = false;
|
|
122948
|
-
}
|
|
122949
|
-
}
|
|
122950
|
-
}
|
|
122951
|
-
if (depth !== 0 || activeEnum !== null || inImplementation || inOpen || pending2.some(
|
|
122952
|
-
(item) => item.text.trim() !== "" && !item.text.trim().startsWith("//")
|
|
122953
|
-
) || chunks.length < shardCount) {
|
|
122954
|
-
return unsharded(name3, source);
|
|
122955
|
-
}
|
|
122956
|
-
const buckets = Array.from({ length: shardCount }, () => []);
|
|
122957
|
-
for (const chunk of chunks) {
|
|
122958
|
-
if (chunk.kind === "enumDecl") {
|
|
122959
|
-
buckets[0].push(chunk);
|
|
122960
|
-
} else {
|
|
122961
|
-
buckets[stableShardIndex(chunk.key, shardCount)].push(chunk);
|
|
122962
|
-
}
|
|
122963
|
-
}
|
|
122964
|
-
const nonEmpty2 = buckets.map((bucket, index2) => ({ bucket, index: index2 })).filter(({ bucket }) => bucket.length > 0);
|
|
122965
|
-
if (nonEmpty2.length < 2) return unsharded(name3, source);
|
|
122966
|
-
const stem2 = name3.slice(0, -".swift".length);
|
|
122967
|
-
return nonEmpty2.map(({ bucket, index: shardIndex }) => {
|
|
122968
|
-
const outLines = [];
|
|
122969
|
-
const lineMap = [];
|
|
122970
|
-
const pushLine = (text7, origLine) => {
|
|
122971
|
-
outLines.push(text7);
|
|
122972
|
-
lineMap.push(origLine);
|
|
122973
|
-
};
|
|
122974
|
-
for (const item of headerLines) pushLine(item.text, item.line);
|
|
122975
|
-
pushLine("", 0);
|
|
122976
|
-
let openEnum = null;
|
|
122977
|
-
let enumBody = [];
|
|
122978
|
-
let hasPart = false;
|
|
122979
|
-
const startPart = () => {
|
|
122980
|
-
if (hasPart) pushLine("", 0);
|
|
122981
|
-
hasPart = true;
|
|
122982
|
-
};
|
|
122983
|
-
const flushEnum = () => {
|
|
122984
|
-
if (!openEnum) return;
|
|
122985
|
-
startPart();
|
|
122986
|
-
pushLine(`extension ${openEnum} {`, enumDeclLine);
|
|
122987
|
-
for (let i = 0; i < enumBody.length; i++) {
|
|
122988
|
-
if (i > 0) pushLine("", 0);
|
|
122989
|
-
for (const item of enumBody[i]) pushLine(item.text, item.line);
|
|
122990
|
-
}
|
|
122991
|
-
pushLine("}", enumDeclLine);
|
|
122992
|
-
openEnum = null;
|
|
122993
|
-
enumBody = [];
|
|
122994
|
-
};
|
|
122995
|
-
for (const chunk of bucket) {
|
|
122996
|
-
if (chunk.kind === "enumMember") {
|
|
122997
|
-
if (openEnum !== chunk.enumName) {
|
|
122998
|
-
flushEnum();
|
|
122999
|
-
openEnum = chunk.enumName;
|
|
123000
|
-
}
|
|
123001
|
-
enumBody.push(chunk.lines);
|
|
123002
|
-
} else {
|
|
123003
|
-
flushEnum();
|
|
123004
|
-
startPart();
|
|
123005
|
-
for (const item of chunk.lines) pushLine(item.text, item.line);
|
|
123006
|
-
}
|
|
123007
|
-
}
|
|
123008
|
-
flushEnum();
|
|
123009
|
-
pushLine("", 0);
|
|
123010
|
-
return {
|
|
123011
|
-
name: `${stem2}_${shardIndex}.swift`,
|
|
123012
|
-
source: outLines.join("\n"),
|
|
123013
|
-
originalName: name3,
|
|
123014
|
-
lineMap
|
|
123015
|
-
};
|
|
123016
|
-
});
|
|
123017
|
-
}
|
|
123018
|
-
var import_node_crypto93, import_node_path159, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES;
|
|
123019
|
-
var init_shard = __esm({
|
|
123020
|
-
"src/one-sdk/shard.ts"() {
|
|
123021
|
-
"use strict";
|
|
123022
|
-
import_node_crypto93 = require("node:crypto");
|
|
123023
|
-
import_node_path159 = __toESM(require("node:path"), 1);
|
|
123024
|
-
init_swift_compile();
|
|
123025
|
-
ONE_SDK_BINDING_SHARDS = 8;
|
|
123026
|
-
ONE_SDK_BINDING_SHARD_MIN_BYTES = 256 * 1024;
|
|
123027
|
-
}
|
|
123028
|
-
});
|
|
123029
|
-
|
|
123030
123039
|
// src/one-sdk/source.ts
|
|
123031
123040
|
var oneSDKModule, oneSDKHost, oneSDKApp, oneSDKTransport;
|
|
123032
123041
|
var init_source2 = __esm({
|
|
@@ -124195,10 +124204,10 @@ var init_one_native_controls_package = __esm({
|
|
|
124195
124204
|
import_node_path160 = __toESM(require("node:path"), 1);
|
|
124196
124205
|
import_node_url8 = require("node:url");
|
|
124197
124206
|
init_nativeSourceContract();
|
|
124207
|
+
init_one_sdk_shard();
|
|
124198
124208
|
init_one_swift_control_source();
|
|
124199
124209
|
init_one_swift_ui_controls();
|
|
124200
124210
|
init_one_direct_host_source();
|
|
124201
|
-
init_shard();
|
|
124202
124211
|
init_source2();
|
|
124203
124212
|
init_oneNativeControlsContract2();
|
|
124204
124213
|
init_swift_compile();
|
|
@@ -130197,7 +130206,7 @@ var init_nitro_superset = __esm({
|
|
|
130197
130206
|
init_nitroContract();
|
|
130198
130207
|
init_swift_standin_digest();
|
|
130199
130208
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
130200
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
130209
|
+
NITRO_COMPILER_DIGEST = true ? "2bd4530ba3bae000e41dcb8e8c3d99b7cef19a11f4e14afedde939ee1f14828f" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
130201
130210
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
130202
130211
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
130203
130212
|
published3 = /* @__PURE__ */ new Map();
|
|
@@ -130617,10 +130626,10 @@ var init_one_sdk_bundle = __esm({
|
|
|
130617
130626
|
import_node_crypto109 = require("node:crypto");
|
|
130618
130627
|
import_node_fs179 = __toESM(require("node:fs"), 1);
|
|
130619
130628
|
import_node_path184 = __toESM(require("node:path"), 1);
|
|
130629
|
+
init_one_sdk_shard();
|
|
130620
130630
|
init_expo_native_workspace();
|
|
130621
130631
|
init_nitro_bundle();
|
|
130622
130632
|
init_one_sdk_preparation();
|
|
130623
|
-
init_shard();
|
|
130624
130633
|
init_source2();
|
|
130625
130634
|
init_oneSdkContract();
|
|
130626
130635
|
init_swift_compile();
|