peachsim 0.1.2441 → 0.1.2457
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/README.md +4 -49
- package/cli/app-catalog.ts +8 -7
- package/cli/app-stubs.ts +98 -70
- package/cli/cloud-box-artifact.ts +2 -5
- package/cli/cloud-client.ts +12 -1
- package/cli/commands/box.ts +41 -2
- package/cli/commands/compat.ts +5 -3
- package/cli/commands/cpu-profile.ts +11 -14
- package/cli/commands/diagnose.ts +5 -18
- package/cli/commands/inspect/describe.ts +4 -8
- package/cli/commands/maestro-generate.ts +4 -8
- package/cli/commands/mode.ts +3 -19
- package/cli/commands/perf.ts +3 -19
- package/cli/commands/permissions.ts +2 -6
- package/cli/commands/platform.ts +22 -14
- package/cli/commands/react.ts +7 -21
- package/cli/commands/record-three.ts +6 -10
- package/cli/commands/record.ts +38 -62
- package/cli/commands/screenshot-command.ts +8 -25
- package/cli/commands/storage.ts +4 -16
- package/cli/commands/three-mode.ts +6 -10
- package/cli/outbound-endpoints.ts +4 -5
- package/cli/parse-args.ts +45 -0
- package/cli/remote-metro.ts +1 -1
- package/cli/remote-simulators.ts +5 -1
- package/cli/send-to-box.ts +3 -1
- package/detox/index.ts +20 -1
- package/dist-lib/agent-daemon-client.cjs +2 -2
- 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 +240 -316
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +14 -1
- package/dist-lib/cloud-contract.mjs +5 -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 -6
- package/dist-lib/config.mjs +5 -9
- package/dist-lib/detox/index.cjs +17 -5
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-FRQNHKFC.mjs → acorn-73XUBXBT.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-IRMC5BCX.mjs → chunk-7V2QJGVI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-PMGJ7FLI.mjs → chunk-BHQEYJAF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-BAYRN7ZL.mjs → chunk-DSPFMVBM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-4HEUXQGM.mjs → chunk-GA73RJSG.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-ABMB3G7I.mjs → chunk-IGBAFWZ3.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-ZCMAKWHN.mjs → chunk-IKZDUGT6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VAQJQDWI.mjs → chunk-IP5ZV36U.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-O4EOBXAP.mjs → chunk-KGHQ4GK2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-4BZ3Z3IQ.mjs → chunk-KY63O76W.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-QYYJESMK.mjs → chunk-LJ74MO6Y.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DJMWTW2B.mjs → chunk-LJX42YVT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-XO5GX4PI.mjs → chunk-O4KAW2JJ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-6A6JEVIF.mjs → chunk-OIFM356B.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NPLEBOWJ.mjs → chunk-P63DPATT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VCAJFWZD.mjs → chunk-SCCOZKCP.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QUBR7LHU.mjs → chunk-TAZL253K.mjs} +41 -15
- package/dist-lib/esm-chunks/{chunk-ORYS5CC4.mjs → chunk-UBXCWZL3.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-4ZRMJ5YO.mjs → chunk-ZQWWO33G.mjs} +14 -2
- package/dist-lib/esm-chunks/{metro-layout-parser-AUAVE5VL.mjs → metro-layout-parser-HNQRTPVE.mjs} +3 -3
- package/dist-lib/expo-swift-bundle.cjs +197 -336
- 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 +276 -381
- package/dist-lib/host/fetch-proxy-handler.cjs +35 -43
- 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 +4 -2
- package/dist-lib/index.cjs +2 -105
- package/dist-lib/kotlin-host.cjs +6 -4
- 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 +12 -12
- 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 +64 -64
- package/dist-lib/public-origins-lib-static.json +1 -1
- package/dist-lib/public-origins-lib.json +107 -85
- 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 +310 -310
- package/dist-lib/swift-compile.cjs +37 -11
- package/dist-lib/swift-compile.mjs +8 -8
- 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-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 +14770 -0
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +2790 -0
- 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/prism.wasm +0 -0
- 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 +3710 -0
- 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-compat/src/stubs/native-seams/react-native-gesture-handler.d.ts +0 -3
- package/dist-types/packages/peach-engine/src/config.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/text-line-break.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/text-paint.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/text-runs.d.ts +6 -1
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +22 -14
- package/skills/peach-setup/references/native-config.md +3 -3
- package/src/app-config.ts +7 -15
- package/src/cloud-contract.ts +35 -0
- package/src/config.ts +2 -6
- package/src/estree-walk.ts +13 -0
- package/src/host/network-policy.ts +4 -1
- package/src/index.ts +0 -1
- package/src/one-native-app-config.ts +14 -15
- package/src/podspec-prism.ts +7 -1
- package/src/process-group.ts +4 -1
- package/src/process-table.ts +6 -1
- package/src/swift-compile.ts +38 -8
- package/src/swift-host.ts +10 -4
- package/cli/commands/box/bundle-plane.ts +0 -154
- package/dist-lib/jump-to-source-babel.cjs +0 -131
- package/dist-lib/jump-to-source-native.cjs +0 -235
- package/src/java-static-imports.ts +0 -68
- package/src/jump-to-source-babel.ts +0 -143
- package/src/jump-to-source-native.ts +0 -200
- package/src/kotlin-jvm-sources.ts +0 -35
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2457 | (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;
|
|
@@ -93,7 +93,8 @@ function readProcessTable(timeoutMs = 1e4, pid) {
|
|
|
93
93
|
try {
|
|
94
94
|
stat = (0, import_node_fs2.readFileSync)(`/proc/${name3}/stat`, "utf8");
|
|
95
95
|
} catch (error) {
|
|
96
|
-
if (error instanceof Error && "code" in error && error.code === "ENOENT")
|
|
96
|
+
if (error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ESRCH"))
|
|
97
|
+
continue;
|
|
97
98
|
throw error;
|
|
98
99
|
}
|
|
99
100
|
const fields = stat.slice(stat.lastIndexOf(")") + 2).trim().split(/\s+/);
|
|
@@ -329,7 +330,7 @@ function processesHaveExited(pids, pgid) {
|
|
|
329
330
|
if (!mayExist) return true;
|
|
330
331
|
const knownPids = new Set(pids);
|
|
331
332
|
try {
|
|
332
|
-
return !readProcessTable(
|
|
333
|
+
return !readProcessTable(EXIT_SCAN_TIMEOUT_MS).some(
|
|
333
334
|
(row) => (row.pgid === pgid || knownPids.has(row.pid)) && !row.zombie
|
|
334
335
|
);
|
|
335
336
|
} catch {
|
|
@@ -473,7 +474,7 @@ async function terminateProcessGroup(child, signal = "SIGTERM", gracefulTimeoutM
|
|
|
473
474
|
}
|
|
474
475
|
if (inspectionError) throw inspectionError;
|
|
475
476
|
}
|
|
476
|
-
var import_node_child_process2, import_node_fs3, import_node_os2, import_node_path2, import_node_stream, import_promises, GRACEFUL_TIMEOUT_MS, FORCED_EXIT_TIMEOUT_MS, INSPECTION_TIMEOUT_MS, FREEZE_GUARD_NAME;
|
|
477
|
+
var import_node_child_process2, import_node_fs3, import_node_os2, import_node_path2, import_node_stream, import_promises, GRACEFUL_TIMEOUT_MS, FORCED_EXIT_TIMEOUT_MS, EXIT_SCAN_TIMEOUT_MS, INSPECTION_TIMEOUT_MS, FREEZE_GUARD_NAME;
|
|
477
478
|
var init_process_group = __esm({
|
|
478
479
|
"src/process-group.ts"() {
|
|
479
480
|
"use strict";
|
|
@@ -486,6 +487,7 @@ var init_process_group = __esm({
|
|
|
486
487
|
init_process_table();
|
|
487
488
|
GRACEFUL_TIMEOUT_MS = 3e3;
|
|
488
489
|
FORCED_EXIT_TIMEOUT_MS = 1e3;
|
|
490
|
+
EXIT_SCAN_TIMEOUT_MS = 1e4;
|
|
489
491
|
INSPECTION_TIMEOUT_MS = 1e4;
|
|
490
492
|
FREEZE_GUARD_NAME = "process-freeze-guard";
|
|
491
493
|
}
|
|
@@ -944,21 +946,6 @@ var init_answeredNativePackages = __esm({
|
|
|
944
946
|
});
|
|
945
947
|
|
|
946
948
|
// ../peach-globals/src/bundle-global-footer.ts
|
|
947
|
-
function findBundleFooter(source, prefix) {
|
|
948
|
-
let end = source.length;
|
|
949
|
-
while (end > 0) {
|
|
950
|
-
const newline = source.lastIndexOf("\n", end - 1);
|
|
951
|
-
if (newline < 0) return -1;
|
|
952
|
-
const line = newline + 1;
|
|
953
|
-
if (source.startsWith(prefix, line)) return newline;
|
|
954
|
-
if (!isFooterBlockLine(source, line, end)) return -1;
|
|
955
|
-
end = newline;
|
|
956
|
-
}
|
|
957
|
-
return -1;
|
|
958
|
-
}
|
|
959
|
-
function isFooterBlockLine(source, line, end) {
|
|
960
|
-
return line === end || source.startsWith("globalThis.", line) || source.startsWith("//", line);
|
|
961
|
-
}
|
|
962
949
|
var init_bundle_global_footer = __esm({
|
|
963
950
|
"../peach-globals/src/bundle-global-footer.ts"() {
|
|
964
951
|
"use strict";
|
|
@@ -1919,7 +1906,9 @@ var init_pod_graph_specifications = __esm({
|
|
|
1919
1906
|
function prism() {
|
|
1920
1907
|
if (exports2) return exports2;
|
|
1921
1908
|
const bytes = typeof __PEACH_PRISM_WASM__ === "string" ? Buffer.from(__PEACH_PRISM_WASM__, "base64") : import_node_fs12.default.readFileSync(
|
|
1922
|
-
(0, import_node_module.createRequire)(__sootsim_import_meta_url).resolve(
|
|
1909
|
+
(0, import_node_module.createRequire)(__sootsim_import_meta_url).resolve(
|
|
1910
|
+
true ? "peachsim/vendor/prism.wasm" : "@ruby/prism/src/prism.wasm"
|
|
1911
|
+
)
|
|
1923
1912
|
);
|
|
1924
1913
|
let memory = null;
|
|
1925
1914
|
const EBADF = 8;
|
|
@@ -1966,7 +1955,7 @@ var init_podspec_prism = __esm({
|
|
|
1966
1955
|
import_node_crypto5 = require("node:crypto");
|
|
1967
1956
|
import_node_fs12 = __toESM(require("node:fs"), 1);
|
|
1968
1957
|
import_node_module = require("node:module");
|
|
1969
|
-
import_parsePrism = require("
|
|
1958
|
+
import_parsePrism = require("peachsim/vendor/@ruby/prism/src/parsePrism.js");
|
|
1970
1959
|
RubySyntaxError = class extends Error {
|
|
1971
1960
|
};
|
|
1972
1961
|
exports2 = null;
|
|
@@ -4656,7 +4645,7 @@ var init_podspec_ruby = __esm({
|
|
|
4656
4645
|
import_node_crypto6 = require("node:crypto");
|
|
4657
4646
|
import_node_fs13 = __toESM(require("node:fs"), 1);
|
|
4658
4647
|
import_node_path10 = __toESM(require("node:path"), 1);
|
|
4659
|
-
N = __toESM(require("
|
|
4648
|
+
N = __toESM(require("peachsim/vendor/@ruby/prism/src/nodes.js"), 1);
|
|
4660
4649
|
init_podspec_prism();
|
|
4661
4650
|
UnsupportedRuby = class extends Error {
|
|
4662
4651
|
};
|
|
@@ -14469,7 +14458,7 @@ var require_parse = __commonJS({
|
|
|
14469
14458
|
var token;
|
|
14470
14459
|
var key2;
|
|
14471
14460
|
var root;
|
|
14472
|
-
module2.exports = function
|
|
14461
|
+
module2.exports = function parse8(text7, reviver) {
|
|
14473
14462
|
source = String(text7);
|
|
14474
14463
|
parseState = "start";
|
|
14475
14464
|
stack = [];
|
|
@@ -15525,10 +15514,10 @@ var require_stringify = __commonJS({
|
|
|
15525
15514
|
// ../../node_modules/json5/lib/index.js
|
|
15526
15515
|
var require_lib = __commonJS({
|
|
15527
15516
|
"../../node_modules/json5/lib/index.js"(exports3, module2) {
|
|
15528
|
-
var
|
|
15517
|
+
var parse8 = require_parse();
|
|
15529
15518
|
var stringify4 = require_stringify();
|
|
15530
15519
|
var JSON53 = {
|
|
15531
|
-
parse:
|
|
15520
|
+
parse: parse8,
|
|
15532
15521
|
stringify: stringify4
|
|
15533
15522
|
};
|
|
15534
15523
|
module2.exports = JSON53;
|
|
@@ -15550,12 +15539,12 @@ function autolinkerAppleFlags(autolinkerManifest, appRoot) {
|
|
|
15550
15539
|
if (atLeast(1, 8, 0)) return ["--platform", "ios", "--project-root", appRoot];
|
|
15551
15540
|
return ["--platform", "ios"];
|
|
15552
15541
|
}
|
|
15553
|
-
var import_node_fs29,
|
|
15542
|
+
var import_node_fs29, import_node_module6, import_node_path28;
|
|
15554
15543
|
var init_expo_autolinking = __esm({
|
|
15555
15544
|
"src/expo-autolinking.ts"() {
|
|
15556
15545
|
"use strict";
|
|
15557
15546
|
import_node_fs29 = __toESM(require("node:fs"), 1);
|
|
15558
|
-
|
|
15547
|
+
import_node_module6 = require("node:module");
|
|
15559
15548
|
import_node_path28 = __toESM(require("node:path"), 1);
|
|
15560
15549
|
init_autolinker_process();
|
|
15561
15550
|
init_is_record();
|
|
@@ -15639,7 +15628,7 @@ var init_swift_standin_digest = __esm({
|
|
|
15639
15628
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
15640
15629
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
15641
15630
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
15642
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
15631
|
+
STANDIN_SOURCE_DIGEST = true ? "63118ef9a51a40246d1d92d46ba9262a11addaf6d84914f7e1b78d6ff3b9bf19" : standinSourceDigest();
|
|
15643
15632
|
}
|
|
15644
15633
|
});
|
|
15645
15634
|
|
|
@@ -30134,6 +30123,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
30134
30123
|
}
|
|
30135
30124
|
continue;
|
|
30136
30125
|
}
|
|
30126
|
+
const textualIncludes = entries.map(([file]) => file).filter((file) => /\.(?:inc|inl|ipp|def)$/.test(file));
|
|
30137
30127
|
native.set(target.name, {
|
|
30138
30128
|
path: target.path,
|
|
30139
30129
|
includeDirectory: import_node_path55.default.join(layout2.root, includes),
|
|
@@ -30141,7 +30131,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
30141
30131
|
lateSources: late.map(([file]) => file.slice(prefix.length)),
|
|
30142
30132
|
exclude: [
|
|
30143
30133
|
...late.map(([file]) => file.slice(prefix.length)),
|
|
30144
|
-
...
|
|
30134
|
+
...textualIncludes.map((file) => file.slice(prefix.length))
|
|
30145
30135
|
],
|
|
30146
30136
|
...late.length > 0 ? {
|
|
30147
30137
|
late: {
|
|
@@ -30152,13 +30142,36 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
30152
30142
|
}
|
|
30153
30143
|
} : {}
|
|
30154
30144
|
});
|
|
30155
|
-
if (late.length
|
|
30156
|
-
|
|
30157
|
-
|
|
30158
|
-
|
|
30159
|
-
`
|
|
30145
|
+
if (late.length === 0) {
|
|
30146
|
+
const headers = import_node_path55.default.posix.join(target.path, target.publicHeadersPath ?? "include");
|
|
30147
|
+
const fragments = textualIncludes.filter(
|
|
30148
|
+
(file) => headers === "." || file.startsWith(`${headers}/`)
|
|
30160
30149
|
);
|
|
30161
|
-
|
|
30150
|
+
const name3 = swiftTargetModuleName(target.name);
|
|
30151
|
+
const map2 = import_node_path55.default.posix.join(headers, "module.modulemap");
|
|
30152
|
+
if (fragments.length > 0 && !Object.hasOwn(input.files, map2) && !files2.has(import_node_path55.default.join(layout2.root, map2)) && !Object.hasOwn(input.files, import_node_path55.default.posix.join(headers, `${name3}.h`)) && !Object.hasOwn(input.files, import_node_path55.default.posix.join(headers, name3, `${name3}.h`)))
|
|
30153
|
+
stageTargetFile(
|
|
30154
|
+
target.name,
|
|
30155
|
+
import_node_path55.default.join(layout2.root, map2),
|
|
30156
|
+
[
|
|
30157
|
+
`module ${name3} {`,
|
|
30158
|
+
' umbrella "."',
|
|
30159
|
+
...fragments.map(
|
|
30160
|
+
(file) => ` textual header ${JSON.stringify(import_node_path55.default.posix.relative(headers, file))}`
|
|
30161
|
+
),
|
|
30162
|
+
" export *",
|
|
30163
|
+
"}",
|
|
30164
|
+
""
|
|
30165
|
+
].join("\n")
|
|
30166
|
+
);
|
|
30167
|
+
continue;
|
|
30168
|
+
}
|
|
30169
|
+
files2.set(
|
|
30170
|
+
import_node_path55.default.join(layout2.root, target.path, "PeachSwiftImplementation/module.modulemap"),
|
|
30171
|
+
`module ${swiftTargetModuleName(`${target.name}SwiftImplementation`)} { export * }
|
|
30172
|
+
`
|
|
30173
|
+
);
|
|
30174
|
+
if (entries.some(
|
|
30162
30175
|
([file, contents2]) => file.endsWith("/module.modulemap") && moduleMapName(contents2) === swiftTargetModuleName(target.name)
|
|
30163
30176
|
))
|
|
30164
30177
|
continue;
|
|
@@ -32580,7 +32593,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
32580
32593
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
32581
32594
|
MULTI_MANIFEST_VERSION = 72;
|
|
32582
32595
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
32583
|
-
compilerSourceDigest = true ? "
|
|
32596
|
+
compilerSourceDigest = true ? "82277b01523ae4b1fce8888e636cd6a98f714c692be322d3916352e5629be0f5" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
32584
32597
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
32585
32598
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
32586
32599
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -42123,12 +42136,12 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
42123
42136
|
};
|
|
42124
42137
|
return stampNativeBuildSdk(identity2, buildSdkVersion);
|
|
42125
42138
|
}
|
|
42126
|
-
var import_node_fs80,
|
|
42139
|
+
var import_node_fs80, import_node_module9, import_node_path81, SDK_BEFORE_SCENE_REQUIREMENT;
|
|
42127
42140
|
var init_native_app_identity_project = __esm({
|
|
42128
42141
|
"src/native-app-identity-project.ts"() {
|
|
42129
42142
|
"use strict";
|
|
42130
42143
|
import_node_fs80 = __toESM(require("node:fs"), 1);
|
|
42131
|
-
|
|
42144
|
+
import_node_module9 = require("node:module");
|
|
42132
42145
|
import_node_path81 = __toESM(require("node:path"), 1);
|
|
42133
42146
|
init_android_app_identity();
|
|
42134
42147
|
init_is_record();
|
|
@@ -49579,11 +49592,14 @@ function enumerateBundleImages(paths, readText, bundleForFile = () => ".") {
|
|
|
49579
49592
|
}
|
|
49580
49593
|
for (const path100 of paths) {
|
|
49581
49594
|
if (!isFlatResourceImage(path100)) continue;
|
|
49582
|
-
const
|
|
49595
|
+
const filename = baseOf(path100);
|
|
49596
|
+
const name3 = filename.slice(0, -extOf(filename).length);
|
|
49583
49597
|
const { bundlePath, names } = namesFor(path100);
|
|
49584
49598
|
if (name3 === "" || names.has(name3)) continue;
|
|
49585
49599
|
names.add(name3);
|
|
49586
|
-
|
|
49600
|
+
const scaledFilename = filename.replace(/@[23]x(?=\.[^./]+$)/, "");
|
|
49601
|
+
const fileNames = (scaledFilename === filename ? [filename] : [filename, scaledFilename]).filter((lookup2) => !names.has(lookup2));
|
|
49602
|
+
table.push({ name: name3, file: path100, scale: flatScale(path100), bundlePath, fileNames });
|
|
49587
49603
|
}
|
|
49588
49604
|
return table;
|
|
49589
49605
|
}
|
|
@@ -53875,10 +53891,10 @@ var require_packer_sync = __commonJS({
|
|
|
53875
53891
|
var require_png_sync = __commonJS({
|
|
53876
53892
|
"../../node_modules/pngjs/lib/png-sync.js"(exports3) {
|
|
53877
53893
|
"use strict";
|
|
53878
|
-
var
|
|
53894
|
+
var parse8 = require_parser_sync();
|
|
53879
53895
|
var pack = require_packer_sync();
|
|
53880
53896
|
exports3.read = function(buffer, options) {
|
|
53881
|
-
return
|
|
53897
|
+
return parse8(buffer, options || {});
|
|
53882
53898
|
};
|
|
53883
53899
|
exports3.write = function(png, options) {
|
|
53884
53900
|
return pack(png, options);
|
|
@@ -54544,11 +54560,11 @@ do { try data.write(to: output) } catch { exit(7) }
|
|
|
54544
54560
|
});
|
|
54545
54561
|
|
|
54546
54562
|
// src/swift-standin-config.ts
|
|
54547
|
-
var
|
|
54563
|
+
var import_acorn2, import_sucrase3;
|
|
54548
54564
|
var init_swift_standin_config = __esm({
|
|
54549
54565
|
"src/swift-standin-config.ts"() {
|
|
54550
54566
|
"use strict";
|
|
54551
|
-
|
|
54567
|
+
import_acorn2 = require("peachsim/vendor/acorn");
|
|
54552
54568
|
import_sucrase3 = require("peachsim/vendor/sucrase");
|
|
54553
54569
|
init_is_record();
|
|
54554
54570
|
}
|
|
@@ -55861,7 +55877,7 @@ function buildSwiftResourceTable(project, baseUrl, inputs) {
|
|
|
55861
55877
|
registered.set(`${sha2565}.metal`, { bytes, contentType: "text/plain; charset=utf-8" });
|
|
55862
55878
|
}
|
|
55863
55879
|
let imageBytes = 0;
|
|
55864
|
-
for (const { name: name3, file, scale, bundlePath, renderingMode } of found) {
|
|
55880
|
+
for (const { name: name3, file, scale, bundlePath, renderingMode, fileNames } of found) {
|
|
55865
55881
|
const disk = byRelative.get(file);
|
|
55866
55882
|
if (!disk) continue;
|
|
55867
55883
|
if (Object.keys(images).length >= limits.images) {
|
|
@@ -55900,12 +55916,15 @@ function buildSwiftResourceTable(project, baseUrl, inputs) {
|
|
|
55900
55916
|
imageBytes += bytes.length;
|
|
55901
55917
|
const hash = (0, import_node_crypto57.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
|
|
55902
55918
|
const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
|
|
55903
|
-
const
|
|
55904
|
-
variants.push({
|
|
55919
|
+
const variant2 = {
|
|
55905
55920
|
uri: `${baseUrl}${RESOURCE_PATH}${hash}${ext}`,
|
|
55906
55921
|
scale: variantScale,
|
|
55907
55922
|
...renderingMode ? { renderingMode } : {}
|
|
55908
|
-
}
|
|
55923
|
+
};
|
|
55924
|
+
for (const lookup2 of [name3, ...fileNames ?? []]) {
|
|
55925
|
+
const variants = bundle[lookup2] ??= [];
|
|
55926
|
+
variants.push(variant2);
|
|
55927
|
+
}
|
|
55909
55928
|
table[bundlePath] = bundle;
|
|
55910
55929
|
const key2 = layout2 ? xcodeInputKey(layout2, disk, file) : file;
|
|
55911
55930
|
images[key2] = {
|
|
@@ -55920,6 +55939,9 @@ function buildSwiftResourceTable(project, baseUrl, inputs) {
|
|
|
55920
55939
|
contentType: RESOURCE_CONTENT_TYPES[ext] ?? "application/octet-stream"
|
|
55921
55940
|
});
|
|
55922
55941
|
}
|
|
55942
|
+
for (const bundle of Object.values(table))
|
|
55943
|
+
for (const variants of Object.values(bundle))
|
|
55944
|
+
variants.sort((a, b) => a.scale - b.scale);
|
|
55923
55945
|
for (const file of relative3) {
|
|
55924
55946
|
if (file.endsWith(".colorset/Contents.json") || file.includes(".symbolset/"))
|
|
55925
55947
|
watched.push(file);
|
|
@@ -56979,12 +57001,12 @@ var init_swift_installed_targets = __esm({
|
|
|
56979
57001
|
});
|
|
56980
57002
|
|
|
56981
57003
|
// src/installed-native-libraries.ts
|
|
56982
|
-
var import_node_fs103,
|
|
57004
|
+
var import_node_fs103, import_node_module13, import_node_path103;
|
|
56983
57005
|
var init_installed_native_libraries = __esm({
|
|
56984
57006
|
"src/installed-native-libraries.ts"() {
|
|
56985
57007
|
"use strict";
|
|
56986
57008
|
import_node_fs103 = __toESM(require("node:fs"), 1);
|
|
56987
|
-
|
|
57009
|
+
import_node_module13 = require("node:module");
|
|
56988
57010
|
import_node_path103 = __toESM(require("node:path"), 1);
|
|
56989
57011
|
init_is_record();
|
|
56990
57012
|
init_native_static_libraries();
|
|
@@ -57075,7 +57097,7 @@ function realTarget(target) {
|
|
|
57075
57097
|
return import_node_path104.default.join(realTarget(import_node_path104.default.dirname(resolved)), import_node_path104.default.basename(resolved));
|
|
57076
57098
|
}
|
|
57077
57099
|
async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
57078
|
-
const manifestPath = (0,
|
|
57100
|
+
const manifestPath = (0, import_node_module14.createRequire)(import_node_path104.default.join(appRoot, "package.json")).resolve(
|
|
57079
57101
|
"react-native/package.json"
|
|
57080
57102
|
);
|
|
57081
57103
|
const manifest = JSON.parse(import_node_fs104.default.readFileSync(manifestPath, "utf8"));
|
|
@@ -57115,14 +57137,14 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
57115
57137
|
files: hashTree(generatedRoot)
|
|
57116
57138
|
};
|
|
57117
57139
|
}
|
|
57118
|
-
var import_node_child_process50, import_node_crypto58, import_node_fs104,
|
|
57140
|
+
var import_node_child_process50, import_node_crypto58, import_node_fs104, import_node_module14, import_node_path104, import_node_util11, run5, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
|
|
57119
57141
|
var init_turbo_codegen_intake = __esm({
|
|
57120
57142
|
"src/turbo-codegen-intake.ts"() {
|
|
57121
57143
|
"use strict";
|
|
57122
57144
|
import_node_child_process50 = require("node:child_process");
|
|
57123
57145
|
import_node_crypto58 = require("node:crypto");
|
|
57124
57146
|
import_node_fs104 = __toESM(require("node:fs"), 1);
|
|
57125
|
-
|
|
57147
|
+
import_node_module14 = require("node:module");
|
|
57126
57148
|
import_node_path104 = __toESM(require("node:path"), 1);
|
|
57127
57149
|
import_node_util11 = require("node:util");
|
|
57128
57150
|
init_forked_script_contract();
|
|
@@ -61763,13 +61785,13 @@ function collectTurboCompileInput(collection, runtime, iosDeploymentTarget, depe
|
|
|
61763
61785
|
resources: { ...dependencies?.resources, ...collection.resources }
|
|
61764
61786
|
};
|
|
61765
61787
|
}
|
|
61766
|
-
var import_node_crypto60, import_node_fs106,
|
|
61788
|
+
var import_node_crypto60, import_node_fs106, import_node_module15, import_node_os23, import_node_path106;
|
|
61767
61789
|
var init_turbo_compile = __esm({
|
|
61768
61790
|
"src/turbo-compile.ts"() {
|
|
61769
61791
|
"use strict";
|
|
61770
61792
|
import_node_crypto60 = require("node:crypto");
|
|
61771
61793
|
import_node_fs106 = __toESM(require("node:fs"), 1);
|
|
61772
|
-
|
|
61794
|
+
import_node_module15 = require("node:module");
|
|
61773
61795
|
import_node_os23 = __toESM(require("node:os"), 1);
|
|
61774
61796
|
import_node_path106 = __toESM(require("node:path"), 1);
|
|
61775
61797
|
init_native_app_identity_project();
|
|
@@ -61996,7 +62018,7 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
61996
62018
|
};
|
|
61997
62019
|
walk3("");
|
|
61998
62020
|
const codegenRoot = import_node_path108.default.dirname(
|
|
61999
|
-
(0,
|
|
62021
|
+
(0, import_node_module16.createRequire)(import_node_path108.default.join(reactNativeRoot, "package.json")).resolve(
|
|
62000
62022
|
"@react-native/codegen/package.json"
|
|
62001
62023
|
)
|
|
62002
62024
|
);
|
|
@@ -62047,13 +62069,13 @@ async function prebuiltReactNativeCore(project, reactNativeRoot, moduleRoot, mod
|
|
|
62047
62069
|
throw new Error(`React Native core ${entry.key} does not match its descriptor`);
|
|
62048
62070
|
return readReactNativeCore(JSON.parse(import_node_fs108.default.readFileSync(file, "utf8")));
|
|
62049
62071
|
}
|
|
62050
|
-
var import_node_crypto61, import_node_fs108,
|
|
62072
|
+
var import_node_crypto61, import_node_fs108, import_node_module16, import_node_path108, import_node_util12, recipe, strings4, building;
|
|
62051
62073
|
var init_react_native_core = __esm({
|
|
62052
62074
|
"src/react-native-core.ts"() {
|
|
62053
62075
|
"use strict";
|
|
62054
62076
|
import_node_crypto61 = require("node:crypto");
|
|
62055
62077
|
import_node_fs108 = __toESM(require("node:fs"), 1);
|
|
62056
|
-
|
|
62078
|
+
import_node_module16 = require("node:module");
|
|
62057
62079
|
import_node_path108 = __toESM(require("node:path"), 1);
|
|
62058
62080
|
import_node_util12 = require("node:util");
|
|
62059
62081
|
init_home_paths();
|
|
@@ -62083,7 +62105,7 @@ var import_node_async_hooks3 = require("node:async_hooks");
|
|
|
62083
62105
|
var import_node_child_process53 = require("node:child_process");
|
|
62084
62106
|
var import_node_crypto63 = require("node:crypto");
|
|
62085
62107
|
var import_node_fs110 = __toESM(require("node:fs"), 1);
|
|
62086
|
-
var
|
|
62108
|
+
var import_node_module17 = require("node:module");
|
|
62087
62109
|
var import_node_os24 = __toESM(require("node:os"), 1);
|
|
62088
62110
|
var import_node_path110 = __toESM(require("node:path"), 1);
|
|
62089
62111
|
var import_node_url4 = require("node:url");
|
|
@@ -62153,8 +62175,8 @@ init_answeredNativePackages();
|
|
|
62153
62175
|
|
|
62154
62176
|
// src/app-config.ts
|
|
62155
62177
|
var import_node_fs28 = require("node:fs");
|
|
62178
|
+
var import_node_module5 = require("node:module");
|
|
62156
62179
|
var import_node_path27 = __toESM(require("node:path"), 1);
|
|
62157
|
-
var import_jiti = require("jiti");
|
|
62158
62180
|
|
|
62159
62181
|
// cli/app-stubs.ts
|
|
62160
62182
|
var import_node_fs27 = require("node:fs");
|
|
@@ -62369,29 +62391,10 @@ function resolveCompatVersionRange(availableRegistryRanges, declaredVersion) {
|
|
|
62369
62391
|
}
|
|
62370
62392
|
|
|
62371
62393
|
// cli/app-stubs.ts
|
|
62372
|
-
var
|
|
62394
|
+
var import_acorn = require("peachsim/vendor/acorn");
|
|
62373
62395
|
var import_sucrase = require("peachsim/vendor/sucrase");
|
|
62374
62396
|
|
|
62375
62397
|
// src/config.ts
|
|
62376
|
-
var config_exports = {};
|
|
62377
|
-
__export(config_exports, {
|
|
62378
|
-
PEACH_CONFIGURED_FILES_HOOK: () => PEACH_CONFIGURED_FILES_HOOK,
|
|
62379
|
-
PEACH_CONFIG_QUERY_PARAM: () => PEACH_CONFIG_QUERY_PARAM,
|
|
62380
|
-
applyPeachConfigToUrl: () => applyPeachConfigToUrl,
|
|
62381
|
-
collectConfiguredFileModules: () => collectConfiguredFileModules,
|
|
62382
|
-
createPeachBundleConfigFooter: () => createPeachBundleConfigFooter,
|
|
62383
|
-
defineConfig: () => defineConfig,
|
|
62384
|
-
detachPeachBundleConfigFooter: () => detachPeachBundleConfigFooter,
|
|
62385
|
-
hasPeachConfig: () => hasPeachConfig,
|
|
62386
|
-
isPackageStubs: () => isPackageStubs,
|
|
62387
|
-
isPeachConfig: () => isPeachConfig,
|
|
62388
|
-
matchConfigModule: () => matchConfigModule,
|
|
62389
|
-
mergePeachConfig: () => mergePeachConfig,
|
|
62390
|
-
readNativeRenderer: () => readNativeRenderer,
|
|
62391
|
-
readPeachBundleConfig: () => readPeachBundleConfig,
|
|
62392
|
-
readPeachBundleConfigFooter: () => readPeachBundleConfigFooter,
|
|
62393
|
-
readPeachConfigFromSearchParams: () => readPeachConfigFromSearchParams
|
|
62394
|
-
});
|
|
62395
62398
|
init_version();
|
|
62396
62399
|
init_bundle_global_footer();
|
|
62397
62400
|
init_is_record();
|
|
@@ -62417,21 +62420,6 @@ function isNativeViewSource(value) {
|
|
|
62417
62420
|
}
|
|
62418
62421
|
|
|
62419
62422
|
// src/config.ts
|
|
62420
|
-
function readNativeRenderer(value) {
|
|
62421
|
-
if (value === void 0) return void 0;
|
|
62422
|
-
if (value === "paper" || value === "fabric") return value;
|
|
62423
|
-
throw new Error("nativeRenderer must be paper or fabric");
|
|
62424
|
-
}
|
|
62425
|
-
function matchConfigModule(name3, modules) {
|
|
62426
|
-
const entries = Object.entries(modules).sort((a, b) => b[0].length - a[0].length);
|
|
62427
|
-
const modulePath = name3.startsWith("/") ? name3 : `/${name3}`;
|
|
62428
|
-
for (const [pattern, resolution] of entries) {
|
|
62429
|
-
if (modulePath.includes(`/${pattern}/`) || modulePath.endsWith(`/${pattern}`) || modulePath.endsWith(`/${pattern}.js`) || modulePath.endsWith(`/${pattern}.ts`) || modulePath.endsWith(`/${pattern}.tsx`)) {
|
|
62430
|
-
return { pattern, resolution };
|
|
62431
|
-
}
|
|
62432
|
-
}
|
|
62433
|
-
return void 0;
|
|
62434
|
-
}
|
|
62435
62423
|
function isHybridObjectAnswer(answer2) {
|
|
62436
62424
|
return answer2 === "unsupported" || isRecord(answer2) && typeof answer2.file === "string" && answer2.file.length > 0;
|
|
62437
62425
|
}
|
|
@@ -62454,26 +62442,6 @@ function isPackageStubs(value) {
|
|
|
62454
62442
|
(stub) => typeof stub === "string" && stub.length > 0 || isNativeViewSource(stub)
|
|
62455
62443
|
)) && (value.hybridObjects === void 0 || isPackageHybridObjects(value.hybridObjects));
|
|
62456
62444
|
}
|
|
62457
|
-
var PEACH_CONFIG_QUERY_PARAM = "peachConfig";
|
|
62458
|
-
function collectConfiguredFileModules(config) {
|
|
62459
|
-
return [
|
|
62460
|
-
...new Set(
|
|
62461
|
-
[
|
|
62462
|
-
"modules",
|
|
62463
|
-
"turboModules",
|
|
62464
|
-
"nativeModules",
|
|
62465
|
-
"nativeViews",
|
|
62466
|
-
"nativeHybridObjects"
|
|
62467
|
-
].flatMap((key2) => {
|
|
62468
|
-
const entries = config && Reflect.get(config, key2);
|
|
62469
|
-
if (!isRecord(entries)) return [];
|
|
62470
|
-
return Object.values(entries).flatMap(
|
|
62471
|
-
(entry) => isRecord(entry) && typeof entry.file === "string" ? [entry.file] : []
|
|
62472
|
-
);
|
|
62473
|
-
})
|
|
62474
|
-
)
|
|
62475
|
-
];
|
|
62476
|
-
}
|
|
62477
62445
|
function isPeachConfig(value) {
|
|
62478
62446
|
if (!isRecord(value)) return false;
|
|
62479
62447
|
return (value.storeKit === void 0 || isRecord(value.storeKit) && typeof value.storeKit.configuration === "string" && value.storeKit.configuration.trim().length > 0) && (value.nativeRenderer === void 0 || value.nativeRenderer === "paper" || value.nativeRenderer === "fabric") && (value.mapKit === void 0 || isRecord(value.mapKit) && typeof value.mapKit.token === "string" && value.mapKit.token.length > 0 && value.mapKit.token === value.mapKit.token.trim()) && (value.runtimeVersion === void 0 || typeof value.runtimeVersion === "string" && value.runtimeVersion === value.runtimeVersion.trim() && isValidRuntimeVersion(value.runtimeVersion)) && [
|
|
@@ -62492,100 +62460,17 @@ function isPeachConfig(value) {
|
|
|
62492
62460
|
(entry) => entry === "noop" || isNativeViewSource(entry) || isRecord(entry) && typeof entry.file === "string" && entry.file.length > 0
|
|
62493
62461
|
));
|
|
62494
62462
|
}
|
|
62495
|
-
|
|
62496
|
-
|
|
62497
|
-
|
|
62498
|
-
|
|
62499
|
-
|
|
62500
|
-
throw new Error("configured bundle metadata is malformed");
|
|
62501
|
-
}
|
|
62502
|
-
return { config: value.config, runtimePackages: [...value.runtimePackages] };
|
|
62503
|
-
}
|
|
62504
|
-
function readPeachBundleConfigFooter(source) {
|
|
62505
|
-
const start = findBundleFooter(source, BUNDLE_CONFIG_PREFIX);
|
|
62506
|
-
if (start < 0) return null;
|
|
62507
|
-
const end = source.indexOf("\n", start + 1);
|
|
62508
|
-
const line = source.slice(start + 1, end < 0 ? void 0 : end);
|
|
62509
|
-
if (!line.endsWith(";")) throw new Error("configured bundle footer is truncated");
|
|
62510
|
-
const result = readPeachBundleConfig(
|
|
62511
|
-
JSON.parse(line.slice(BUNDLE_CONFIG_PREFIX.length, -1))
|
|
62512
|
-
);
|
|
62513
|
-
if (!result) throw new Error("configured bundle footer is empty");
|
|
62514
|
-
return result;
|
|
62515
|
-
}
|
|
62516
|
-
function createPeachBundleConfigFooter(config) {
|
|
62517
|
-
const json = JSON.stringify(config).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
|
|
62518
|
-
return "\n" + BUNDLE_CONFIG_PREFIX + json + ";";
|
|
62519
|
-
}
|
|
62520
|
-
function detachPeachBundleConfigFooter(source) {
|
|
62521
|
-
const configuredBundle = readPeachBundleConfigFooter(source);
|
|
62522
|
-
if (!configuredBundle) return { source, configuredBundle };
|
|
62523
|
-
const start = findBundleFooter(source, BUNDLE_CONFIG_PREFIX);
|
|
62524
|
-
const end = source.indexOf("\n", start + 1);
|
|
62525
|
-
return {
|
|
62526
|
-
source: source.slice(0, start) + source.slice(end < 0 ? source.length : end),
|
|
62527
|
-
configuredBundle
|
|
62528
|
-
};
|
|
62529
|
-
}
|
|
62530
|
-
function defineConfig(config) {
|
|
62531
|
-
return config;
|
|
62532
|
-
}
|
|
62533
|
-
function hasOwnKeys(value) {
|
|
62534
|
-
return !!value && Object.keys(value).length > 0;
|
|
62535
|
-
}
|
|
62536
|
-
function hasPeachConfig(config) {
|
|
62537
|
-
if (!config) return false;
|
|
62538
|
-
return config.nativeRenderer !== void 0 || config.mapKit !== void 0 || typeof config.runtimeVersion === "string" && config.runtimeVersion.length > 0 || hasOwnKeys(config.modules) || hasOwnKeys(config.turboModules) || hasOwnKeys(config.nativeModules) || hasOwnKeys(config.nativeViews) || hasOwnKeys(config.nativeHybridObjects) || hasOwnKeys(config.env) || hasOwnKeys(config.network?.remap) || hasOwnKeys(config.initialProps) || hasOwnKeys(config.initialState);
|
|
62539
|
-
}
|
|
62540
|
-
function mergePeachConfig(base, override) {
|
|
62541
|
-
if (!hasPeachConfig(base) && !hasPeachConfig(override)) return void 0;
|
|
62542
|
-
if (!hasPeachConfig(base)) return override ? { ...override } : void 0;
|
|
62543
|
-
if (!hasPeachConfig(override)) return base ? { ...base } : void 0;
|
|
62544
|
-
return {
|
|
62545
|
-
runtimeVersion: override.runtimeVersion ?? base.runtimeVersion,
|
|
62546
|
-
nativeRenderer: override.nativeRenderer ?? base.nativeRenderer,
|
|
62547
|
-
mapKit: override.mapKit ?? base.mapKit,
|
|
62548
|
-
modules: { ...base.modules || {}, ...override.modules || {} },
|
|
62549
|
-
turboModules: { ...base.turboModules || {}, ...override.turboModules || {} },
|
|
62550
|
-
nativeModules: {
|
|
62551
|
-
...base.nativeModules || {},
|
|
62552
|
-
...override.nativeModules || {}
|
|
62553
|
-
},
|
|
62554
|
-
nativeViews: { ...base.nativeViews || {}, ...override.nativeViews || {} },
|
|
62555
|
-
nativeHybridObjects: {
|
|
62556
|
-
...base.nativeHybridObjects || {},
|
|
62557
|
-
...override.nativeHybridObjects || {}
|
|
62558
|
-
},
|
|
62559
|
-
env: { ...base.env || {}, ...override.env || {} },
|
|
62560
|
-
network: {
|
|
62561
|
-
remap: { ...base.network?.remap || {}, ...override.network?.remap || {} }
|
|
62562
|
-
},
|
|
62563
|
-
initialProps: { ...base.initialProps || {}, ...override.initialProps || {} },
|
|
62564
|
-
initialState: { ...base.initialState || {}, ...override.initialState || {} }
|
|
62565
|
-
};
|
|
62566
|
-
}
|
|
62567
|
-
function readPeachConfigFromSearchParams(searchParams) {
|
|
62568
|
-
const raw2 = searchParams.get(PEACH_CONFIG_QUERY_PARAM);
|
|
62569
|
-
if (!raw2) return void 0;
|
|
62570
|
-
let parsed2;
|
|
62571
|
-
try {
|
|
62572
|
-
parsed2 = JSON.parse(raw2);
|
|
62573
|
-
} catch (error) {
|
|
62574
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
62575
|
-
console.warn(`[peach] invalid ${PEACH_CONFIG_QUERY_PARAM}: ${message}`);
|
|
62576
|
-
return void 0;
|
|
62577
|
-
}
|
|
62578
|
-
if (isRecord(parsed2)) readNativeRenderer(parsed2.nativeRenderer);
|
|
62579
|
-
return isPeachConfig(parsed2) && hasPeachConfig(parsed2) ? parsed2 : void 0;
|
|
62463
|
+
|
|
62464
|
+
// src/estree-walk.ts
|
|
62465
|
+
init_is_record();
|
|
62466
|
+
function isNode(value) {
|
|
62467
|
+
return isRecord(value) && typeof value.type === "string";
|
|
62580
62468
|
}
|
|
62581
|
-
function
|
|
62582
|
-
|
|
62583
|
-
|
|
62584
|
-
|
|
62585
|
-
|
|
62586
|
-
parsed2.searchParams.delete(PEACH_CONFIG_QUERY_PARAM);
|
|
62587
|
-
}
|
|
62588
|
-
return parsed2.toString();
|
|
62469
|
+
function visitNodes(node, enter) {
|
|
62470
|
+
enter(node);
|
|
62471
|
+
for (const value of Object.values(node))
|
|
62472
|
+
for (const child of Array.isArray(value) ? value : [value])
|
|
62473
|
+
if (isNode(child)) visitNodes(child, enter);
|
|
62589
62474
|
}
|
|
62590
62475
|
|
|
62591
62476
|
// cli/app-stubs.ts
|
|
@@ -62593,42 +62478,6 @@ init_is_record();
|
|
|
62593
62478
|
init_nitro_source();
|
|
62594
62479
|
init_public_brand();
|
|
62595
62480
|
|
|
62596
|
-
// src/visit-parsed-program.ts
|
|
62597
|
-
var import_oxc_parser = require("oxc-parser");
|
|
62598
|
-
init_is_record();
|
|
62599
|
-
function visitParsedProgram(program, visitor) {
|
|
62600
|
-
const enterByType = /* @__PURE__ */ new Map();
|
|
62601
|
-
const exitByType = /* @__PURE__ */ new Map();
|
|
62602
|
-
for (const key2 of Object.keys(visitor)) {
|
|
62603
|
-
const handler = Reflect.get(visitor, key2);
|
|
62604
|
-
if (typeof handler !== "function") continue;
|
|
62605
|
-
const invoke = (node) => {
|
|
62606
|
-
handler(node);
|
|
62607
|
-
};
|
|
62608
|
-
if (key2.endsWith(":exit")) exitByType.set(key2.slice(0, -5), invoke);
|
|
62609
|
-
else enterByType.set(key2, invoke);
|
|
62610
|
-
}
|
|
62611
|
-
if (enterByType.size === 0 && exitByType.size === 0) return;
|
|
62612
|
-
const hasExit = exitByType.size > 0;
|
|
62613
|
-
function visit3(value) {
|
|
62614
|
-
if (Array.isArray(value)) {
|
|
62615
|
-
for (let i = 0; i < value.length; i++) visit3(value[i]);
|
|
62616
|
-
return;
|
|
62617
|
-
}
|
|
62618
|
-
if (!isRecord(value) || typeof value.type !== "string") return;
|
|
62619
|
-
const keys = import_oxc_parser.visitorKeys[value.type];
|
|
62620
|
-
if (!keys) return;
|
|
62621
|
-
const enter = enterByType.get(value.type);
|
|
62622
|
-
if (enter) enter(value);
|
|
62623
|
-
for (let i = 0; i < keys.length; i++) visit3(value[keys[i]]);
|
|
62624
|
-
if (hasExit) {
|
|
62625
|
-
const exit = exitByType.get(value.type);
|
|
62626
|
-
if (exit) exit(value);
|
|
62627
|
-
}
|
|
62628
|
-
}
|
|
62629
|
-
visit3(program);
|
|
62630
|
-
}
|
|
62631
|
-
|
|
62632
62481
|
// cli/commands/detect.ts
|
|
62633
62482
|
var import_node_child_process13 = require("node:child_process");
|
|
62634
62483
|
var import_node_fs26 = require("node:fs");
|
|
@@ -62658,7 +62507,7 @@ function isCollection(node) {
|
|
|
62658
62507
|
}
|
|
62659
62508
|
return false;
|
|
62660
62509
|
}
|
|
62661
|
-
function
|
|
62510
|
+
function isNode2(node) {
|
|
62662
62511
|
if (node && typeof node === "object")
|
|
62663
62512
|
switch (node[NODE_TYPE]) {
|
|
62664
62513
|
case ALIAS:
|
|
@@ -62689,7 +62538,7 @@ visit.SKIP = SKIP;
|
|
|
62689
62538
|
visit.REMOVE = REMOVE;
|
|
62690
62539
|
function visit_(key2, node, visitor, path100) {
|
|
62691
62540
|
const ctrl = callVisitor(key2, node, visitor, path100);
|
|
62692
|
-
if (
|
|
62541
|
+
if (isNode2(ctrl) || isPair(ctrl)) {
|
|
62693
62542
|
replaceNode(key2, path100, ctrl);
|
|
62694
62543
|
return visit_(key2, ctrl, visitor, path100);
|
|
62695
62544
|
}
|
|
@@ -62737,7 +62586,7 @@ visitAsync.SKIP = SKIP;
|
|
|
62737
62586
|
visitAsync.REMOVE = REMOVE;
|
|
62738
62587
|
async function visitAsync_(key2, node, visitor, path100) {
|
|
62739
62588
|
const ctrl = await callVisitor(key2, node, visitor, path100);
|
|
62740
|
-
if (
|
|
62589
|
+
if (isNode2(ctrl) || isPair(ctrl)) {
|
|
62741
62590
|
replaceNode(key2, path100, ctrl);
|
|
62742
62591
|
return visitAsync_(key2, ctrl, visitor, path100);
|
|
62743
62592
|
}
|
|
@@ -62963,10 +62812,10 @@ var Directives = class _Directives {
|
|
|
62963
62812
|
const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [];
|
|
62964
62813
|
const tagEntries = Object.entries(this.tags);
|
|
62965
62814
|
let tagNames;
|
|
62966
|
-
if (doc && tagEntries.length > 0 &&
|
|
62815
|
+
if (doc && tagEntries.length > 0 && isNode2(doc.contents)) {
|
|
62967
62816
|
const tags = {};
|
|
62968
62817
|
visit(doc.contents, (_key, node) => {
|
|
62969
|
-
if (
|
|
62818
|
+
if (isNode2(node) && node.tag)
|
|
62970
62819
|
tags[node.tag] = true;
|
|
62971
62820
|
});
|
|
62972
62821
|
tagNames = Object.keys(tags);
|
|
@@ -63233,7 +63082,7 @@ function findTagObject(value, tagName, tags) {
|
|
|
63233
63082
|
function createNode(value, tagName, ctx) {
|
|
63234
63083
|
if (isDocument(value))
|
|
63235
63084
|
value = value.contents;
|
|
63236
|
-
if (
|
|
63085
|
+
if (isNode2(value))
|
|
63237
63086
|
return value;
|
|
63238
63087
|
if (isPair(value)) {
|
|
63239
63088
|
const map2 = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx);
|
|
@@ -63327,7 +63176,7 @@ var Collection = class extends NodeBase {
|
|
|
63327
63176
|
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
63328
63177
|
if (schema4)
|
|
63329
63178
|
copy.schema = schema4;
|
|
63330
|
-
copy.items = copy.items.map((it) =>
|
|
63179
|
+
copy.items = copy.items.map((it) => isNode2(it) || isPair(it) ? it.clone(schema4) : it);
|
|
63331
63180
|
if (this.range)
|
|
63332
63181
|
copy.range = this.range.slice();
|
|
63333
63182
|
return copy;
|
|
@@ -63928,7 +63777,7 @@ function stringify(item, ctx, onComment, onChompKeep) {
|
|
|
63928
63777
|
}
|
|
63929
63778
|
}
|
|
63930
63779
|
let tagObj = void 0;
|
|
63931
|
-
const node =
|
|
63780
|
+
const node = isNode2(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
|
|
63932
63781
|
tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
|
|
63933
63782
|
const props = stringifyProps(node, tagObj, ctx);
|
|
63934
63783
|
if (props.length > 0)
|
|
@@ -63943,12 +63792,12 @@ ${ctx.indent}${str3}`;
|
|
|
63943
63792
|
// ../../node_modules/yaml/browser/dist/stringify/stringifyPair.js
|
|
63944
63793
|
function stringifyPair({ key: key2, value }, ctx, onComment, onChompKeep) {
|
|
63945
63794
|
const { allNullValues, doc, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
|
63946
|
-
let keyComment =
|
|
63795
|
+
let keyComment = isNode2(key2) && key2.comment || null;
|
|
63947
63796
|
if (simpleKeys) {
|
|
63948
63797
|
if (keyComment) {
|
|
63949
63798
|
throw new Error("With simple keys, key nodes cannot have comments");
|
|
63950
63799
|
}
|
|
63951
|
-
if (isCollection(key2) || !
|
|
63800
|
+
if (isCollection(key2) || !isNode2(key2) && typeof key2 === "object") {
|
|
63952
63801
|
const msg = "With simple keys, collection cannot be used as a key value";
|
|
63953
63802
|
throw new Error(msg);
|
|
63954
63803
|
}
|
|
@@ -63994,7 +63843,7 @@ ${indent2}:`;
|
|
|
63994
63843
|
str3 += lineComment(str3, ctx.indent, commentString(keyComment));
|
|
63995
63844
|
}
|
|
63996
63845
|
let vsb, vcb, valueComment;
|
|
63997
|
-
if (
|
|
63846
|
+
if (isNode2(value)) {
|
|
63998
63847
|
vsb = !!value.spaceBefore;
|
|
63999
63848
|
vcb = value.commentBefore;
|
|
64000
63849
|
valueComment = value.comment;
|
|
@@ -64122,7 +63971,7 @@ function resolveAliasValue(ctx, value) {
|
|
|
64122
63971
|
|
|
64123
63972
|
// ../../node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
|
|
64124
63973
|
function addPairToJSMap(ctx, map2, { key: key2, value }) {
|
|
64125
|
-
if (
|
|
63974
|
+
if (isNode2(key2) && key2.addToJSMap)
|
|
64126
63975
|
key2.addToJSMap(ctx, map2, value);
|
|
64127
63976
|
else if (isMergeKey(ctx, key2))
|
|
64128
63977
|
addMergeToJSMap(ctx, map2, value);
|
|
@@ -64153,7 +64002,7 @@ function stringifyKey(key2, jsKey, ctx) {
|
|
|
64153
64002
|
return "";
|
|
64154
64003
|
if (typeof jsKey !== "object")
|
|
64155
64004
|
return String(jsKey);
|
|
64156
|
-
if (
|
|
64005
|
+
if (isNode2(key2) && ctx?.doc) {
|
|
64157
64006
|
const strCtx = createStringifyContext(ctx.doc, {});
|
|
64158
64007
|
strCtx.anchors = /* @__PURE__ */ new Set();
|
|
64159
64008
|
for (const node of ctx.anchors.keys())
|
|
@@ -64187,9 +64036,9 @@ var Pair = class _Pair {
|
|
|
64187
64036
|
}
|
|
64188
64037
|
clone(schema4) {
|
|
64189
64038
|
let { key: key2, value } = this;
|
|
64190
|
-
if (
|
|
64039
|
+
if (isNode2(key2))
|
|
64191
64040
|
key2 = key2.clone(schema4);
|
|
64192
|
-
if (
|
|
64041
|
+
if (isNode2(value))
|
|
64193
64042
|
value = value.clone(schema4);
|
|
64194
64043
|
return new _Pair(key2, value);
|
|
64195
64044
|
}
|
|
@@ -64216,14 +64065,14 @@ function stringifyBlockCollection({ comment, items: items2 }, ctx, { blockItemPr
|
|
|
64216
64065
|
for (let i = 0; i < items2.length; ++i) {
|
|
64217
64066
|
const item = items2[i];
|
|
64218
64067
|
let comment2 = null;
|
|
64219
|
-
if (
|
|
64068
|
+
if (isNode2(item)) {
|
|
64220
64069
|
if (!chompKeep && item.spaceBefore)
|
|
64221
64070
|
lines.push("");
|
|
64222
64071
|
addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
|
|
64223
64072
|
if (item.comment)
|
|
64224
64073
|
comment2 = item.comment;
|
|
64225
64074
|
} else if (isPair(item)) {
|
|
64226
|
-
const ik =
|
|
64075
|
+
const ik = isNode2(item.key) ? item.key : null;
|
|
64227
64076
|
if (ik) {
|
|
64228
64077
|
if (!chompKeep && ik.spaceBefore)
|
|
64229
64078
|
lines.push("");
|
|
@@ -64271,14 +64120,14 @@ function stringifyFlowCollection({ items: items2 }, ctx, { flowChars, itemIndent
|
|
|
64271
64120
|
for (let i = 0; i < items2.length; ++i) {
|
|
64272
64121
|
const item = items2[i];
|
|
64273
64122
|
let comment = null;
|
|
64274
|
-
if (
|
|
64123
|
+
if (isNode2(item)) {
|
|
64275
64124
|
if (item.spaceBefore)
|
|
64276
64125
|
lines.push("");
|
|
64277
64126
|
addCommentBefore(ctx, lines, item.commentBefore, false);
|
|
64278
64127
|
if (item.comment)
|
|
64279
64128
|
comment = item.comment;
|
|
64280
64129
|
} else if (isPair(item)) {
|
|
64281
|
-
const ik =
|
|
64130
|
+
const ik = isNode2(item.key) ? item.key : null;
|
|
64282
64131
|
if (ik) {
|
|
64283
64132
|
if (ik.spaceBefore)
|
|
64284
64133
|
lines.push("");
|
|
@@ -64286,7 +64135,7 @@ function stringifyFlowCollection({ items: items2 }, ctx, { flowChars, itemIndent
|
|
|
64286
64135
|
if (ik.comment)
|
|
64287
64136
|
reqNewline = true;
|
|
64288
64137
|
}
|
|
64289
|
-
const iv =
|
|
64138
|
+
const iv = isNode2(item.value) ? item.value : null;
|
|
64290
64139
|
if (iv) {
|
|
64291
64140
|
if (iv.comment)
|
|
64292
64141
|
comment = iv.comment;
|
|
@@ -65256,8 +65105,17 @@ function sourceNativeRequests(file, text7, includeLegacy = false) {
|
|
|
65256
65105
|
} catch {
|
|
65257
65106
|
return [];
|
|
65258
65107
|
}
|
|
65259
|
-
|
|
65260
|
-
|
|
65108
|
+
let program;
|
|
65109
|
+
try {
|
|
65110
|
+
program = (0, import_acorn.parse)(code, {
|
|
65111
|
+
ecmaVersion: "latest",
|
|
65112
|
+
sourceType: "module",
|
|
65113
|
+
allowHashBang: true,
|
|
65114
|
+
allowReturnOutsideFunction: true
|
|
65115
|
+
});
|
|
65116
|
+
} catch {
|
|
65117
|
+
return [];
|
|
65118
|
+
}
|
|
65261
65119
|
const found = [];
|
|
65262
65120
|
const androidRanges = [];
|
|
65263
65121
|
const guard = (test, branch) => {
|
|
@@ -65272,50 +65130,63 @@ function sourceNativeRequests(file, text7, includeLegacy = false) {
|
|
|
65272
65130
|
line: code.slice(0, at).split("\n").length
|
|
65273
65131
|
});
|
|
65274
65132
|
};
|
|
65275
|
-
|
|
65276
|
-
|
|
65277
|
-
|
|
65278
|
-
|
|
65279
|
-
|
|
65280
|
-
guard(node.test, node.consequent);
|
|
65281
|
-
},
|
|
65282
|
-
LogicalExpression(node) {
|
|
65283
|
-
if (node.operator === "&&") guard(node.left, node.right);
|
|
65284
|
-
},
|
|
65285
|
-
VariableDeclarator(node) {
|
|
65286
|
-
if (!includeLegacy || !node.init || nativeLookupName(node.init) !== "NativeModules" || node.id.type !== "ObjectPattern")
|
|
65287
|
-
return;
|
|
65288
|
-
for (const property of node.id.properties) {
|
|
65289
|
-
if (property.type !== "Property") continue;
|
|
65290
|
-
const key2 = property.key;
|
|
65291
|
-
if (!property.computed && key2.type === "Identifier")
|
|
65292
|
-
add("module", key2.name, property.start, false);
|
|
65293
|
-
else if (key2.type === "Literal" && typeof key2.value === "string")
|
|
65294
|
-
add("module", key2.value, property.start, false);
|
|
65133
|
+
visitNodes(program, (node) => {
|
|
65134
|
+
switch (node.type) {
|
|
65135
|
+
case "IfStatement": {
|
|
65136
|
+
guard(node.test, node.consequent);
|
|
65137
|
+
break;
|
|
65295
65138
|
}
|
|
65296
|
-
|
|
65297
|
-
|
|
65298
|
-
|
|
65299
|
-
|
|
65300
|
-
|
|
65301
|
-
|
|
65302
|
-
|
|
65303
|
-
|
|
65304
|
-
|
|
65305
|
-
if (
|
|
65306
|
-
|
|
65307
|
-
|
|
65308
|
-
|
|
65309
|
-
|
|
65310
|
-
|
|
65311
|
-
|
|
65312
|
-
|
|
65139
|
+
case "ConditionalExpression": {
|
|
65140
|
+
guard(node.test, node.consequent);
|
|
65141
|
+
break;
|
|
65142
|
+
}
|
|
65143
|
+
case "LogicalExpression": {
|
|
65144
|
+
if (node.operator === "&&") guard(node.left, node.right);
|
|
65145
|
+
break;
|
|
65146
|
+
}
|
|
65147
|
+
case "VariableDeclarator": {
|
|
65148
|
+
if (!includeLegacy || !node.init || nativeLookupName(node.init) !== "NativeModules" || node.id.type !== "ObjectPattern")
|
|
65149
|
+
return;
|
|
65150
|
+
for (const property of node.id.properties) {
|
|
65151
|
+
if (property.type !== "Property") continue;
|
|
65152
|
+
const key2 = property.key;
|
|
65153
|
+
if (!property.computed && key2.type === "Identifier")
|
|
65154
|
+
add("module", key2.name, property.start, false);
|
|
65155
|
+
else if (key2.type === "Literal" && typeof key2.value === "string")
|
|
65156
|
+
add("module", key2.value, property.start, false);
|
|
65313
65157
|
}
|
|
65158
|
+
break;
|
|
65159
|
+
}
|
|
65160
|
+
case "CallExpression": {
|
|
65161
|
+
const first = node.arguments[0];
|
|
65162
|
+
if (first?.type !== "Literal" || typeof first.value !== "string") return;
|
|
65163
|
+
const callee = node.callee;
|
|
65164
|
+
const lookup2 = nativeLookupName(callee);
|
|
65165
|
+
if (callee.type === "MemberExpression" && !callee.computed && nativeLookupName(callee.object) === "TurboModuleRegistry" && (lookup2 === "get" || lookup2 === "getEnforcing")) {
|
|
65166
|
+
add("module", first.value, node.start, false);
|
|
65167
|
+
} else if (lookup2) {
|
|
65168
|
+
if (["requireNativeModule", "requireOptionalNativeModule"].includes(lookup2))
|
|
65169
|
+
add(
|
|
65170
|
+
"module",
|
|
65171
|
+
first.value,
|
|
65172
|
+
node.start,
|
|
65173
|
+
lookup2 === "requireOptionalNativeModule"
|
|
65174
|
+
);
|
|
65175
|
+
else if (["requireNativeComponent", "codegenNativeComponent"].includes(lookup2))
|
|
65176
|
+
add("view", first.value, node.start, false);
|
|
65177
|
+
else if (["requireNativeView", "requireNativeViewManager"].includes(lookup2)) {
|
|
65178
|
+
const second = node.arguments[1];
|
|
65179
|
+
const name3 = second?.type === "Literal" && typeof second.value === "string" ? `${first.value}_${second.value}` : first.value;
|
|
65180
|
+
add("view", name3, node.start, false);
|
|
65181
|
+
}
|
|
65182
|
+
}
|
|
65183
|
+
break;
|
|
65184
|
+
}
|
|
65185
|
+
case "MemberExpression": {
|
|
65186
|
+
if (includeLegacy && !node.computed && nativeLookupName(node.object) === "NativeModules" && node.property.type === "Identifier")
|
|
65187
|
+
add("module", node.property.name, node.start, false);
|
|
65188
|
+
break;
|
|
65314
65189
|
}
|
|
65315
|
-
},
|
|
65316
|
-
MemberExpression(node) {
|
|
65317
|
-
if (includeLegacy && !node.computed && nativeLookupName(node.object) === "NativeModules" && node.property.type === "Identifier")
|
|
65318
|
-
add("module", node.property.name, node.start, false);
|
|
65319
65190
|
}
|
|
65320
65191
|
});
|
|
65321
65192
|
return found;
|
|
@@ -65392,11 +65263,11 @@ function configModule(configPath, packages) {
|
|
|
65392
65263
|
if (configPath && (configPath.endsWith(".cjs") || configPath.endsWith(".js") && /\bmodule\.exports\b/.test(readSmallFile(configPath) ?? "")))
|
|
65393
65264
|
return ["module.exports = {", ...body, "}"].join("\n");
|
|
65394
65265
|
return [
|
|
65395
|
-
`import {
|
|
65266
|
+
`import type { PeachConfig } from '${rnxPublicBrand.packageName}/config'`,
|
|
65396
65267
|
"",
|
|
65397
|
-
"export default
|
|
65268
|
+
"export default {",
|
|
65398
65269
|
...body,
|
|
65399
|
-
"}
|
|
65270
|
+
"} satisfies PeachConfig"
|
|
65400
65271
|
].join("\n");
|
|
65401
65272
|
}
|
|
65402
65273
|
function wireSlotMigration(appDir, configPath, wire, kept = []) {
|
|
@@ -65625,9 +65496,6 @@ function workspacePackageDirs(appDir, pkg) {
|
|
|
65625
65496
|
return [...dirs];
|
|
65626
65497
|
}
|
|
65627
65498
|
|
|
65628
|
-
// src/app-config.ts
|
|
65629
|
-
init_public_brand();
|
|
65630
|
-
|
|
65631
65499
|
// ../peach-globals/src/dynamic-type-scales.ts
|
|
65632
65500
|
var IOS_DYNAMIC_TYPE_SCALES = [
|
|
65633
65501
|
0.823,
|
|
@@ -67217,16 +67085,9 @@ async function loadRNXAppStubs(project) {
|
|
|
67217
67085
|
async function loadConfigFile(project) {
|
|
67218
67086
|
if (!project.configPath) return void 0;
|
|
67219
67087
|
try {
|
|
67220
|
-
const
|
|
67221
|
-
|
|
67222
|
-
|
|
67223
|
-
moduleCache: false,
|
|
67224
|
-
tryNative: false,
|
|
67225
|
-
virtualModules: {
|
|
67226
|
-
[`${rnxPublicBrand.packageName}/config`]: config_exports
|
|
67227
|
-
}
|
|
67228
|
-
});
|
|
67229
|
-
const loaded3 = project.configPath.endsWith(".json") ? JSON.parse((0, import_node_fs28.readFileSync)(project.configPath, "utf8")) : await jiti.import(project.configPath, { default: true });
|
|
67088
|
+
const configPath = import_node_path27.default.resolve(project.configPath);
|
|
67089
|
+
delete (0, import_node_module5.createRequire)(__sootsim_import_meta_url).cache[configPath];
|
|
67090
|
+
const loaded3 = configPath.endsWith(".json") ? JSON.parse((0, import_node_fs28.readFileSync)(configPath, "utf8")) : Reflect.get(await import(configPath), "default");
|
|
67230
67091
|
if (!isPeachConfig(loaded3)) {
|
|
67231
67092
|
throw new Error("the default export must be a peach config object");
|
|
67232
67093
|
}
|
|
@@ -67293,14 +67154,14 @@ init_react_native_core_digest();
|
|
|
67293
67154
|
init_swift_compiler_digest();
|
|
67294
67155
|
init_swift_standin_digest();
|
|
67295
67156
|
function expoNativeCompilerDigestValue() {
|
|
67296
|
-
return true ? "
|
|
67157
|
+
return true ? "d2721a5a426ac104272e382f27c37ac5deab8be0ed9aff4e274daba20781f6df" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
67297
67158
|
}
|
|
67298
67159
|
|
|
67299
67160
|
// src/expo-native-workspace.ts
|
|
67300
67161
|
var import_node_child_process38 = require("node:child_process");
|
|
67301
67162
|
var import_node_crypto44 = require("node:crypto");
|
|
67302
67163
|
var import_node_fs78 = __toESM(require("node:fs"), 1);
|
|
67303
|
-
var
|
|
67164
|
+
var import_node_module8 = require("node:module");
|
|
67304
67165
|
var import_node_os18 = __toESM(require("node:os"), 1);
|
|
67305
67166
|
var import_node_path79 = __toESM(require("node:path"), 1);
|
|
67306
67167
|
var import_node_util8 = require("node:util");
|
|
@@ -67456,7 +67317,7 @@ init_native_git();
|
|
|
67456
67317
|
var import_node_child_process18 = require("node:child_process");
|
|
67457
67318
|
var import_node_crypto19 = require("node:crypto");
|
|
67458
67319
|
var import_node_fs36 = __toESM(require("node:fs"), 1);
|
|
67459
|
-
var
|
|
67320
|
+
var import_node_module7 = require("node:module");
|
|
67460
67321
|
var import_node_os7 = __toESM(require("node:os"), 1);
|
|
67461
67322
|
var import_node_path35 = __toESM(require("node:path"), 1);
|
|
67462
67323
|
var import_node_url2 = require("node:url");
|
|
@@ -67535,7 +67396,7 @@ async function generateAppSdkInChild(generatorFile, frameworks, options) {
|
|
|
67535
67396
|
}
|
|
67536
67397
|
}
|
|
67537
67398
|
async function selectOneSDK(appRoot) {
|
|
67538
|
-
const require2 = (0,
|
|
67399
|
+
const require2 = (0, import_node_module7.createRequire)(import_node_path35.default.join(appRoot, "package.json"));
|
|
67539
67400
|
let onePackage;
|
|
67540
67401
|
try {
|
|
67541
67402
|
onePackage = require2.resolve("one/package.json");
|
|
@@ -77392,7 +77253,7 @@ function declaresNativeDependency(manifest, name3) {
|
|
|
77392
77253
|
return Object.hasOwn(manifest.dependencies ?? {}, name3) || Object.hasOwn(manifest.devDependencies ?? {}, name3);
|
|
77393
77254
|
}
|
|
77394
77255
|
async function prepareNativeProject(app, workspace, manifest, stage, execute, report, oneSdkPrepared) {
|
|
77395
|
-
const appRequire = (0,
|
|
77256
|
+
const appRequire = (0, import_node_module8.createRequire)(import_node_path79.default.join(app, "package.json"));
|
|
77396
77257
|
const sourcePodEnv = {
|
|
77397
77258
|
EXPO_USE_PRECOMPILED_MODULES: "0",
|
|
77398
77259
|
ONE_PREBUILT_IOS: "0",
|
|
@@ -77937,7 +77798,7 @@ function writeExpoDiscovery(options) {
|
|
|
77937
77798
|
// src/expo-native-prebuilt.ts
|
|
77938
77799
|
var import_node_crypto47 = require("node:crypto");
|
|
77939
77800
|
var import_node_fs83 = __toESM(require("node:fs"), 1);
|
|
77940
|
-
var
|
|
77801
|
+
var import_node_module11 = require("node:module");
|
|
77941
77802
|
var import_node_path84 = __toESM(require("node:path"), 1);
|
|
77942
77803
|
var import_node_util9 = require("node:util");
|
|
77943
77804
|
var import_plist7 = __toESM(require("peachsim/vendor/plist"), 1);
|
|
@@ -77981,7 +77842,7 @@ init_native_app_identity_project();
|
|
|
77981
77842
|
// src/native-firebase-config.ts
|
|
77982
77843
|
var import_node_child_process39 = require("node:child_process");
|
|
77983
77844
|
var import_node_fs81 = __toESM(require("node:fs"), 1);
|
|
77984
|
-
var
|
|
77845
|
+
var import_node_module10 = require("node:module");
|
|
77985
77846
|
var import_node_os19 = __toESM(require("node:os"), 1);
|
|
77986
77847
|
var import_node_path82 = __toESM(require("node:path"), 1);
|
|
77987
77848
|
init_is_record();
|
|
@@ -78142,7 +78003,7 @@ function packageRootOf(appRoot, file) {
|
|
|
78142
78003
|
async function expoNativeInputs(appRoot) {
|
|
78143
78004
|
appRoot = import_node_fs83.default.realpathSync(appRoot);
|
|
78144
78005
|
if (findXcodeProject(import_node_path84.default.join(appRoot, "ios"))) return null;
|
|
78145
|
-
const appRequire = (0,
|
|
78006
|
+
const appRequire = (0, import_node_module11.createRequire)(import_node_path84.default.join(appRoot, "package.json"));
|
|
78146
78007
|
let fingerprintEntry;
|
|
78147
78008
|
try {
|
|
78148
78009
|
fingerprintEntry = appRequire.resolve("@expo/fingerprint", {
|
|
@@ -78354,7 +78215,7 @@ init_native_static_libraries();
|
|
|
78354
78215
|
|
|
78355
78216
|
// src/react-native-bridge-modules.ts
|
|
78356
78217
|
var import_node_fs94 = __toESM(require("node:fs"), 1);
|
|
78357
|
-
var
|
|
78218
|
+
var import_node_module12 = require("node:module");
|
|
78358
78219
|
var import_node_path94 = __toESM(require("node:path"), 1);
|
|
78359
78220
|
init_answeredNativePackages();
|
|
78360
78221
|
init_swift_compile();
|
|
@@ -78831,7 +78692,7 @@ function collectInstalledSwiftBridgeUnits(appRoot, units, installedNamespaces, s
|
|
|
78831
78692
|
const dependencies = manifest && typeof manifest === "object" ? Reflect.get(manifest, "dependencies") : null;
|
|
78832
78693
|
if (!dependencies || typeof dependencies !== "object" || Array.isArray(dependencies))
|
|
78833
78694
|
return;
|
|
78834
|
-
const appRequire = (0,
|
|
78695
|
+
const appRequire = (0, import_node_module12.createRequire)(manifestPath);
|
|
78835
78696
|
const namespacesSeen = new Set(units.map((unit2) => unit2.namespace));
|
|
78836
78697
|
for (const packageName of Object.keys(dependencies).sort()) {
|
|
78837
78698
|
signal?.throwIfAborted();
|
|
@@ -79498,7 +79359,7 @@ function enrichInstalledUnits(units, installed, namespaceGroups, provided, modul
|
|
|
79498
79359
|
const byPath = [...installedTargets].sort((a, b) => b.path.length - a.path.length);
|
|
79499
79360
|
const reactNativeRoot = import_node_fs110.default.realpathSync(
|
|
79500
79361
|
import_node_path110.default.dirname(
|
|
79501
|
-
(0,
|
|
79362
|
+
(0, import_node_module17.createRequire)(import_node_path110.default.join(appRoot, "package.json")).resolve(
|
|
79502
79363
|
"react-native/package.json"
|
|
79503
79364
|
)
|
|
79504
79365
|
)
|
|
@@ -79937,7 +79798,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
79937
79798
|
signal?.throwIfAborted();
|
|
79938
79799
|
appRoot = import_node_fs110.default.realpathSync(appRoot);
|
|
79939
79800
|
const appConfig = await loadRNXAppConfig(resolveAppProject(appRoot));
|
|
79940
|
-
const appRequire = (0,
|
|
79801
|
+
const appRequire = (0, import_node_module17.createRequire)(import_node_path110.default.join(appRoot, "package.json"));
|
|
79941
79802
|
let expoRoot;
|
|
79942
79803
|
try {
|
|
79943
79804
|
expoRoot = import_node_path110.default.dirname(appRequire.resolve("expo/package.json"));
|
|
@@ -81069,7 +80930,7 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
81069
80930
|
const reactProvider = units.some((unit2) => unit2.reactNativeProvider) ? await (async () => {
|
|
81070
80931
|
const projectRoot = options.installedWorkspace ? import_node_path110.default.dirname(import_node_path110.default.dirname(options.installedWorkspace)) : (await prepareExpoNativeWorkspace(root, signal, options.iosTarget)).app;
|
|
81071
80932
|
const reactNativeRoot = import_node_path110.default.dirname(
|
|
81072
|
-
(0,
|
|
80933
|
+
(0, import_node_module17.createRequire)(import_node_path110.default.join(projectRoot, "package.json")).resolve(
|
|
81073
80934
|
"react-native/package.json"
|
|
81074
80935
|
)
|
|
81075
80936
|
);
|