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;
|
|
@@ -234,7 +234,8 @@ function readProcessTable(timeoutMs = 1e4, pid) {
|
|
|
234
234
|
try {
|
|
235
235
|
stat = (0, import_node_fs2.readFileSync)(`/proc/${name3}/stat`, "utf8");
|
|
236
236
|
} catch (error) {
|
|
237
|
-
if (error instanceof Error && "code" in error && error.code === "ENOENT")
|
|
237
|
+
if (error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ESRCH"))
|
|
238
|
+
continue;
|
|
238
239
|
throw error;
|
|
239
240
|
}
|
|
240
241
|
const fields = stat.slice(stat.lastIndexOf(")") + 2).trim().split(/\s+/);
|
|
@@ -470,7 +471,7 @@ function processesHaveExited(pids, pgid) {
|
|
|
470
471
|
if (!mayExist) return true;
|
|
471
472
|
const knownPids = new Set(pids);
|
|
472
473
|
try {
|
|
473
|
-
return !readProcessTable(
|
|
474
|
+
return !readProcessTable(EXIT_SCAN_TIMEOUT_MS).some(
|
|
474
475
|
(row) => (row.pgid === pgid || knownPids.has(row.pid)) && !row.zombie
|
|
475
476
|
);
|
|
476
477
|
} catch {
|
|
@@ -614,7 +615,7 @@ async function terminateProcessGroup(child, signal = "SIGTERM", gracefulTimeoutM
|
|
|
614
615
|
}
|
|
615
616
|
if (inspectionError) throw inspectionError;
|
|
616
617
|
}
|
|
617
|
-
var import_node_child_process2, import_node_fs3, import_node_os3, import_node_path2, import_node_stream2, import_promises, GRACEFUL_TIMEOUT_MS, FORCED_EXIT_TIMEOUT_MS, INSPECTION_TIMEOUT_MS, FREEZE_GUARD_NAME;
|
|
618
|
+
var import_node_child_process2, import_node_fs3, import_node_os3, import_node_path2, import_node_stream2, import_promises, GRACEFUL_TIMEOUT_MS, FORCED_EXIT_TIMEOUT_MS, EXIT_SCAN_TIMEOUT_MS, INSPECTION_TIMEOUT_MS, FREEZE_GUARD_NAME;
|
|
618
619
|
var init_process_group = __esm({
|
|
619
620
|
"src/process-group.ts"() {
|
|
620
621
|
"use strict";
|
|
@@ -627,6 +628,7 @@ var init_process_group = __esm({
|
|
|
627
628
|
init_process_table();
|
|
628
629
|
GRACEFUL_TIMEOUT_MS = 3e3;
|
|
629
630
|
FORCED_EXIT_TIMEOUT_MS = 1e3;
|
|
631
|
+
EXIT_SCAN_TIMEOUT_MS = 1e4;
|
|
630
632
|
INSPECTION_TIMEOUT_MS = 1e4;
|
|
631
633
|
FREEZE_GUARD_NAME = "process-freeze-guard";
|
|
632
634
|
}
|
|
@@ -2330,7 +2332,7 @@ var require_parse = __commonJS({
|
|
|
2330
2332
|
var token;
|
|
2331
2333
|
var key2;
|
|
2332
2334
|
var root;
|
|
2333
|
-
module2.exports = function
|
|
2335
|
+
module2.exports = function parse13(text7, reviver) {
|
|
2334
2336
|
source = String(text7);
|
|
2335
2337
|
parseState = "start";
|
|
2336
2338
|
stack = [];
|
|
@@ -3386,10 +3388,10 @@ var require_stringify = __commonJS({
|
|
|
3386
3388
|
// ../../node_modules/json5/lib/index.js
|
|
3387
3389
|
var require_lib = __commonJS({
|
|
3388
3390
|
"../../node_modules/json5/lib/index.js"(exports3, module2) {
|
|
3389
|
-
var
|
|
3391
|
+
var parse13 = require_parse();
|
|
3390
3392
|
var stringify4 = require_stringify();
|
|
3391
3393
|
var JSON53 = {
|
|
3392
|
-
parse:
|
|
3394
|
+
parse: parse13,
|
|
3393
3395
|
stringify: stringify4
|
|
3394
3396
|
};
|
|
3395
3397
|
module2.exports = JSON53;
|
|
@@ -30320,6 +30322,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
30320
30322
|
}
|
|
30321
30323
|
continue;
|
|
30322
30324
|
}
|
|
30325
|
+
const textualIncludes = entries.map(([file]) => file).filter((file) => /\.(?:inc|inl|ipp|def)$/.test(file));
|
|
30323
30326
|
native.set(target.name, {
|
|
30324
30327
|
path: target.path,
|
|
30325
30328
|
includeDirectory: import_node_path40.default.join(layout2.root, includes),
|
|
@@ -30327,7 +30330,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
30327
30330
|
lateSources: late.map(([file]) => file.slice(prefix.length)),
|
|
30328
30331
|
exclude: [
|
|
30329
30332
|
...late.map(([file]) => file.slice(prefix.length)),
|
|
30330
|
-
...
|
|
30333
|
+
...textualIncludes.map((file) => file.slice(prefix.length))
|
|
30331
30334
|
],
|
|
30332
30335
|
...late.length > 0 ? {
|
|
30333
30336
|
late: {
|
|
@@ -30338,13 +30341,36 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
30338
30341
|
}
|
|
30339
30342
|
} : {}
|
|
30340
30343
|
});
|
|
30341
|
-
if (late.length
|
|
30342
|
-
|
|
30343
|
-
|
|
30344
|
-
|
|
30345
|
-
`
|
|
30344
|
+
if (late.length === 0) {
|
|
30345
|
+
const headers = import_node_path40.default.posix.join(target.path, target.publicHeadersPath ?? "include");
|
|
30346
|
+
const fragments = textualIncludes.filter(
|
|
30347
|
+
(file) => headers === "." || file.startsWith(`${headers}/`)
|
|
30346
30348
|
);
|
|
30347
|
-
|
|
30349
|
+
const name3 = swiftTargetModuleName(target.name);
|
|
30350
|
+
const map2 = import_node_path40.default.posix.join(headers, "module.modulemap");
|
|
30351
|
+
if (fragments.length > 0 && !Object.hasOwn(input.files, map2) && !files2.has(import_node_path40.default.join(layout2.root, map2)) && !Object.hasOwn(input.files, import_node_path40.default.posix.join(headers, `${name3}.h`)) && !Object.hasOwn(input.files, import_node_path40.default.posix.join(headers, name3, `${name3}.h`)))
|
|
30352
|
+
stageTargetFile(
|
|
30353
|
+
target.name,
|
|
30354
|
+
import_node_path40.default.join(layout2.root, map2),
|
|
30355
|
+
[
|
|
30356
|
+
`module ${name3} {`,
|
|
30357
|
+
' umbrella "."',
|
|
30358
|
+
...fragments.map(
|
|
30359
|
+
(file) => ` textual header ${JSON.stringify(import_node_path40.default.posix.relative(headers, file))}`
|
|
30360
|
+
),
|
|
30361
|
+
" export *",
|
|
30362
|
+
"}",
|
|
30363
|
+
""
|
|
30364
|
+
].join("\n")
|
|
30365
|
+
);
|
|
30366
|
+
continue;
|
|
30367
|
+
}
|
|
30368
|
+
files2.set(
|
|
30369
|
+
import_node_path40.default.join(layout2.root, target.path, "PeachSwiftImplementation/module.modulemap"),
|
|
30370
|
+
`module ${swiftTargetModuleName(`${target.name}SwiftImplementation`)} { export * }
|
|
30371
|
+
`
|
|
30372
|
+
);
|
|
30373
|
+
if (entries.some(
|
|
30348
30374
|
([file, contents2]) => file.endsWith("/module.modulemap") && moduleMapName(contents2) === swiftTargetModuleName(target.name)
|
|
30349
30375
|
))
|
|
30350
30376
|
continue;
|
|
@@ -32766,7 +32792,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
32766
32792
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
32767
32793
|
MULTI_MANIFEST_VERSION = 72;
|
|
32768
32794
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
32769
|
-
compilerSourceDigest = true ? "
|
|
32795
|
+
compilerSourceDigest = true ? "82277b01523ae4b1fce8888e636cd6a98f714c692be322d3916352e5629be0f5" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
32770
32796
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
32771
32797
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
32772
32798
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -36025,7 +36051,9 @@ var init_cocoapods_trunk = __esm({
|
|
|
36025
36051
|
function prism() {
|
|
36026
36052
|
if (exports2) return exports2;
|
|
36027
36053
|
const bytes = typeof __PEACH_PRISM_WASM__ === "string" ? Buffer.from(__PEACH_PRISM_WASM__, "base64") : import_node_fs48.default.readFileSync(
|
|
36028
|
-
(0, import_node_module3.createRequire)(__sootsim_import_meta_url).resolve(
|
|
36054
|
+
(0, import_node_module3.createRequire)(__sootsim_import_meta_url).resolve(
|
|
36055
|
+
true ? "peachsim/vendor/prism.wasm" : "@ruby/prism/src/prism.wasm"
|
|
36056
|
+
)
|
|
36029
36057
|
);
|
|
36030
36058
|
let memory = null;
|
|
36031
36059
|
const EBADF = 8;
|
|
@@ -36072,7 +36100,7 @@ var init_podspec_prism = __esm({
|
|
|
36072
36100
|
import_node_crypto27 = require("node:crypto");
|
|
36073
36101
|
import_node_fs48 = __toESM(require("node:fs"), 1);
|
|
36074
36102
|
import_node_module3 = require("node:module");
|
|
36075
|
-
import_parsePrism = require("
|
|
36103
|
+
import_parsePrism = require("peachsim/vendor/@ruby/prism/src/parsePrism.js");
|
|
36076
36104
|
RubySyntaxError = class extends Error {
|
|
36077
36105
|
};
|
|
36078
36106
|
exports2 = null;
|
|
@@ -38762,7 +38790,7 @@ var init_podspec_ruby = __esm({
|
|
|
38762
38790
|
import_node_crypto28 = require("node:crypto");
|
|
38763
38791
|
import_node_fs49 = __toESM(require("node:fs"), 1);
|
|
38764
38792
|
import_node_path47 = __toESM(require("node:path"), 1);
|
|
38765
|
-
N = __toESM(require("
|
|
38793
|
+
N = __toESM(require("peachsim/vendor/@ruby/prism/src/nodes.js"), 1);
|
|
38766
38794
|
init_podspec_prism();
|
|
38767
38795
|
UnsupportedRuby = class extends Error {
|
|
38768
38796
|
};
|
|
@@ -59598,40 +59626,6 @@ var init_nativeViewSourceContract = __esm({
|
|
|
59598
59626
|
});
|
|
59599
59627
|
|
|
59600
59628
|
// src/config.ts
|
|
59601
|
-
var config_exports = {};
|
|
59602
|
-
__export(config_exports, {
|
|
59603
|
-
PEACH_CONFIGURED_FILES_HOOK: () => PEACH_CONFIGURED_FILES_HOOK,
|
|
59604
|
-
PEACH_CONFIG_QUERY_PARAM: () => PEACH_CONFIG_QUERY_PARAM,
|
|
59605
|
-
applyPeachConfigToUrl: () => applyPeachConfigToUrl,
|
|
59606
|
-
collectConfiguredFileModules: () => collectConfiguredFileModules,
|
|
59607
|
-
createPeachBundleConfigFooter: () => createPeachBundleConfigFooter,
|
|
59608
|
-
defineConfig: () => defineConfig,
|
|
59609
|
-
detachPeachBundleConfigFooter: () => detachPeachBundleConfigFooter,
|
|
59610
|
-
hasPeachConfig: () => hasPeachConfig,
|
|
59611
|
-
isPackageStubs: () => isPackageStubs,
|
|
59612
|
-
isPeachConfig: () => isPeachConfig,
|
|
59613
|
-
matchConfigModule: () => matchConfigModule,
|
|
59614
|
-
mergePeachConfig: () => mergePeachConfig,
|
|
59615
|
-
readNativeRenderer: () => readNativeRenderer,
|
|
59616
|
-
readPeachBundleConfig: () => readPeachBundleConfig,
|
|
59617
|
-
readPeachBundleConfigFooter: () => readPeachBundleConfigFooter,
|
|
59618
|
-
readPeachConfigFromSearchParams: () => readPeachConfigFromSearchParams
|
|
59619
|
-
});
|
|
59620
|
-
function readNativeRenderer(value) {
|
|
59621
|
-
if (value === void 0) return void 0;
|
|
59622
|
-
if (value === "paper" || value === "fabric") return value;
|
|
59623
|
-
throw new Error("nativeRenderer must be paper or fabric");
|
|
59624
|
-
}
|
|
59625
|
-
function matchConfigModule(name3, modules) {
|
|
59626
|
-
const entries = Object.entries(modules).sort((a, b) => b[0].length - a[0].length);
|
|
59627
|
-
const modulePath = name3.startsWith("/") ? name3 : `/${name3}`;
|
|
59628
|
-
for (const [pattern, resolution] of entries) {
|
|
59629
|
-
if (modulePath.includes(`/${pattern}/`) || modulePath.endsWith(`/${pattern}`) || modulePath.endsWith(`/${pattern}.js`) || modulePath.endsWith(`/${pattern}.ts`) || modulePath.endsWith(`/${pattern}.tsx`)) {
|
|
59630
|
-
return { pattern, resolution };
|
|
59631
|
-
}
|
|
59632
|
-
}
|
|
59633
|
-
return void 0;
|
|
59634
|
-
}
|
|
59635
59629
|
function isHybridObjectAnswer(answer2) {
|
|
59636
59630
|
return answer2 === "unsupported" || isRecord(answer2) && typeof answer2.file === "string" && answer2.file.length > 0;
|
|
59637
59631
|
}
|
|
@@ -59724,67 +59718,7 @@ function detachPeachBundleConfigFooter(source) {
|
|
|
59724
59718
|
configuredBundle
|
|
59725
59719
|
};
|
|
59726
59720
|
}
|
|
59727
|
-
|
|
59728
|
-
return config;
|
|
59729
|
-
}
|
|
59730
|
-
function hasOwnKeys(value) {
|
|
59731
|
-
return !!value && Object.keys(value).length > 0;
|
|
59732
|
-
}
|
|
59733
|
-
function hasPeachConfig(config) {
|
|
59734
|
-
if (!config) return false;
|
|
59735
|
-
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);
|
|
59736
|
-
}
|
|
59737
|
-
function mergePeachConfig(base2, override) {
|
|
59738
|
-
if (!hasPeachConfig(base2) && !hasPeachConfig(override)) return void 0;
|
|
59739
|
-
if (!hasPeachConfig(base2)) return override ? { ...override } : void 0;
|
|
59740
|
-
if (!hasPeachConfig(override)) return base2 ? { ...base2 } : void 0;
|
|
59741
|
-
return {
|
|
59742
|
-
runtimeVersion: override.runtimeVersion ?? base2.runtimeVersion,
|
|
59743
|
-
nativeRenderer: override.nativeRenderer ?? base2.nativeRenderer,
|
|
59744
|
-
mapKit: override.mapKit ?? base2.mapKit,
|
|
59745
|
-
modules: { ...base2.modules || {}, ...override.modules || {} },
|
|
59746
|
-
turboModules: { ...base2.turboModules || {}, ...override.turboModules || {} },
|
|
59747
|
-
nativeModules: {
|
|
59748
|
-
...base2.nativeModules || {},
|
|
59749
|
-
...override.nativeModules || {}
|
|
59750
|
-
},
|
|
59751
|
-
nativeViews: { ...base2.nativeViews || {}, ...override.nativeViews || {} },
|
|
59752
|
-
nativeHybridObjects: {
|
|
59753
|
-
...base2.nativeHybridObjects || {},
|
|
59754
|
-
...override.nativeHybridObjects || {}
|
|
59755
|
-
},
|
|
59756
|
-
env: { ...base2.env || {}, ...override.env || {} },
|
|
59757
|
-
network: {
|
|
59758
|
-
remap: { ...base2.network?.remap || {}, ...override.network?.remap || {} }
|
|
59759
|
-
},
|
|
59760
|
-
initialProps: { ...base2.initialProps || {}, ...override.initialProps || {} },
|
|
59761
|
-
initialState: { ...base2.initialState || {}, ...override.initialState || {} }
|
|
59762
|
-
};
|
|
59763
|
-
}
|
|
59764
|
-
function readPeachConfigFromSearchParams(searchParams) {
|
|
59765
|
-
const raw2 = searchParams.get(PEACH_CONFIG_QUERY_PARAM);
|
|
59766
|
-
if (!raw2) return void 0;
|
|
59767
|
-
let parsed2;
|
|
59768
|
-
try {
|
|
59769
|
-
parsed2 = JSON.parse(raw2);
|
|
59770
|
-
} catch (error) {
|
|
59771
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
59772
|
-
console.warn(`[peach] invalid ${PEACH_CONFIG_QUERY_PARAM}: ${message}`);
|
|
59773
|
-
return void 0;
|
|
59774
|
-
}
|
|
59775
|
-
if (isRecord(parsed2)) readNativeRenderer(parsed2.nativeRenderer);
|
|
59776
|
-
return isPeachConfig(parsed2) && hasPeachConfig(parsed2) ? parsed2 : void 0;
|
|
59777
|
-
}
|
|
59778
|
-
function applyPeachConfigToUrl(url, config) {
|
|
59779
|
-
const parsed2 = new URL(url);
|
|
59780
|
-
if (hasPeachConfig(config)) {
|
|
59781
|
-
parsed2.searchParams.set(PEACH_CONFIG_QUERY_PARAM, JSON.stringify(config));
|
|
59782
|
-
} else {
|
|
59783
|
-
parsed2.searchParams.delete(PEACH_CONFIG_QUERY_PARAM);
|
|
59784
|
-
}
|
|
59785
|
-
return parsed2.toString();
|
|
59786
|
-
}
|
|
59787
|
-
var PEACH_CONFIG_QUERY_PARAM, BUNDLE_CONFIG_PREFIX, PEACH_CONFIGURED_FILES_HOOK;
|
|
59721
|
+
var BUNDLE_CONFIG_PREFIX, PEACH_CONFIGURED_FILES_HOOK;
|
|
59788
59722
|
var init_config = __esm({
|
|
59789
59723
|
"src/config.ts"() {
|
|
59790
59724
|
"use strict";
|
|
@@ -59792,12 +59726,28 @@ var init_config = __esm({
|
|
|
59792
59726
|
init_bundle_global_footer();
|
|
59793
59727
|
init_is_record();
|
|
59794
59728
|
init_nativeViewSourceContract();
|
|
59795
|
-
PEACH_CONFIG_QUERY_PARAM = "peachConfig";
|
|
59796
59729
|
BUNDLE_CONFIG_PREFIX = "globalThis.__peachBundleConfig=";
|
|
59797
59730
|
PEACH_CONFIGURED_FILES_HOOK = "__peachInstallConfiguredFiles";
|
|
59798
59731
|
}
|
|
59799
59732
|
});
|
|
59800
59733
|
|
|
59734
|
+
// src/estree-walk.ts
|
|
59735
|
+
function isNode2(value) {
|
|
59736
|
+
return isRecord(value) && typeof value.type === "string";
|
|
59737
|
+
}
|
|
59738
|
+
function visitNodes(node, enter) {
|
|
59739
|
+
enter(node);
|
|
59740
|
+
for (const value of Object.values(node))
|
|
59741
|
+
for (const child of Array.isArray(value) ? value : [value])
|
|
59742
|
+
if (isNode2(child)) visitNodes(child, enter);
|
|
59743
|
+
}
|
|
59744
|
+
var init_estree_walk = __esm({
|
|
59745
|
+
"src/estree-walk.ts"() {
|
|
59746
|
+
"use strict";
|
|
59747
|
+
init_is_record();
|
|
59748
|
+
}
|
|
59749
|
+
});
|
|
59750
|
+
|
|
59801
59751
|
// src/kotlin-toolchain.ts
|
|
59802
59752
|
async function runKotlinTool(toolchain, sdkRoot, tool, args, maxBuffer = 16 * 1024 * 1024) {
|
|
59803
59753
|
const lib = import_node_path72.default.resolve(import_node_path72.default.dirname(toolchain.kotlinc), "../lib");
|
|
@@ -62045,48 +61995,6 @@ var init_public_brand = __esm({
|
|
|
62045
61995
|
}
|
|
62046
61996
|
});
|
|
62047
61997
|
|
|
62048
|
-
// src/visit-parsed-program.ts
|
|
62049
|
-
function visitParsedProgram(program, visitor) {
|
|
62050
|
-
const enterByType = /* @__PURE__ */ new Map();
|
|
62051
|
-
const exitByType = /* @__PURE__ */ new Map();
|
|
62052
|
-
for (const key2 of Object.keys(visitor)) {
|
|
62053
|
-
const handler = Reflect.get(visitor, key2);
|
|
62054
|
-
if (typeof handler !== "function") continue;
|
|
62055
|
-
const invoke = (node) => {
|
|
62056
|
-
handler(node);
|
|
62057
|
-
};
|
|
62058
|
-
if (key2.endsWith(":exit")) exitByType.set(key2.slice(0, -5), invoke);
|
|
62059
|
-
else enterByType.set(key2, invoke);
|
|
62060
|
-
}
|
|
62061
|
-
if (enterByType.size === 0 && exitByType.size === 0) return;
|
|
62062
|
-
const hasExit = exitByType.size > 0;
|
|
62063
|
-
function visit3(value) {
|
|
62064
|
-
if (Array.isArray(value)) {
|
|
62065
|
-
for (let i = 0; i < value.length; i++) visit3(value[i]);
|
|
62066
|
-
return;
|
|
62067
|
-
}
|
|
62068
|
-
if (!isRecord(value) || typeof value.type !== "string") return;
|
|
62069
|
-
const keys = import_oxc_parser.visitorKeys[value.type];
|
|
62070
|
-
if (!keys) return;
|
|
62071
|
-
const enter = enterByType.get(value.type);
|
|
62072
|
-
if (enter) enter(value);
|
|
62073
|
-
for (let i = 0; i < keys.length; i++) visit3(value[keys[i]]);
|
|
62074
|
-
if (hasExit) {
|
|
62075
|
-
const exit = exitByType.get(value.type);
|
|
62076
|
-
if (exit) exit(value);
|
|
62077
|
-
}
|
|
62078
|
-
}
|
|
62079
|
-
visit3(program);
|
|
62080
|
-
}
|
|
62081
|
-
var import_oxc_parser;
|
|
62082
|
-
var init_visit_parsed_program = __esm({
|
|
62083
|
-
"src/visit-parsed-program.ts"() {
|
|
62084
|
-
"use strict";
|
|
62085
|
-
import_oxc_parser = require("oxc-parser");
|
|
62086
|
-
init_is_record();
|
|
62087
|
-
}
|
|
62088
|
-
});
|
|
62089
|
-
|
|
62090
61998
|
// cli/app-stubs.ts
|
|
62091
61999
|
function stubPackageTarget(name3) {
|
|
62092
62000
|
const match = /^(?:@[^/]+\/)?peach-stub-(.+)$/.exec(name3);
|
|
@@ -62286,8 +62194,17 @@ function sourceNativeRequests(file, text7, includeLegacy = false) {
|
|
|
62286
62194
|
} catch {
|
|
62287
62195
|
return [];
|
|
62288
62196
|
}
|
|
62289
|
-
|
|
62290
|
-
|
|
62197
|
+
let program;
|
|
62198
|
+
try {
|
|
62199
|
+
program = (0, import_acorn.parse)(code, {
|
|
62200
|
+
ecmaVersion: "latest",
|
|
62201
|
+
sourceType: "module",
|
|
62202
|
+
allowHashBang: true,
|
|
62203
|
+
allowReturnOutsideFunction: true
|
|
62204
|
+
});
|
|
62205
|
+
} catch {
|
|
62206
|
+
return [];
|
|
62207
|
+
}
|
|
62291
62208
|
const found = [];
|
|
62292
62209
|
const androidRanges = [];
|
|
62293
62210
|
const guard = (test, branch) => {
|
|
@@ -62302,50 +62219,63 @@ function sourceNativeRequests(file, text7, includeLegacy = false) {
|
|
|
62302
62219
|
line: code.slice(0, at).split("\n").length
|
|
62303
62220
|
});
|
|
62304
62221
|
};
|
|
62305
|
-
|
|
62306
|
-
|
|
62307
|
-
|
|
62308
|
-
|
|
62309
|
-
|
|
62310
|
-
guard(node.test, node.consequent);
|
|
62311
|
-
},
|
|
62312
|
-
LogicalExpression(node) {
|
|
62313
|
-
if (node.operator === "&&") guard(node.left, node.right);
|
|
62314
|
-
},
|
|
62315
|
-
VariableDeclarator(node) {
|
|
62316
|
-
if (!includeLegacy || !node.init || nativeLookupName(node.init) !== "NativeModules" || node.id.type !== "ObjectPattern")
|
|
62317
|
-
return;
|
|
62318
|
-
for (const property of node.id.properties) {
|
|
62319
|
-
if (property.type !== "Property") continue;
|
|
62320
|
-
const key2 = property.key;
|
|
62321
|
-
if (!property.computed && key2.type === "Identifier")
|
|
62322
|
-
add("module", key2.name, property.start, false);
|
|
62323
|
-
else if (key2.type === "Literal" && typeof key2.value === "string")
|
|
62324
|
-
add("module", key2.value, property.start, false);
|
|
62222
|
+
visitNodes(program, (node) => {
|
|
62223
|
+
switch (node.type) {
|
|
62224
|
+
case "IfStatement": {
|
|
62225
|
+
guard(node.test, node.consequent);
|
|
62226
|
+
break;
|
|
62325
62227
|
}
|
|
62326
|
-
|
|
62327
|
-
|
|
62328
|
-
|
|
62329
|
-
|
|
62330
|
-
|
|
62331
|
-
|
|
62332
|
-
|
|
62333
|
-
|
|
62334
|
-
|
|
62335
|
-
if (
|
|
62336
|
-
|
|
62337
|
-
|
|
62338
|
-
|
|
62339
|
-
|
|
62340
|
-
|
|
62341
|
-
|
|
62342
|
-
|
|
62228
|
+
case "ConditionalExpression": {
|
|
62229
|
+
guard(node.test, node.consequent);
|
|
62230
|
+
break;
|
|
62231
|
+
}
|
|
62232
|
+
case "LogicalExpression": {
|
|
62233
|
+
if (node.operator === "&&") guard(node.left, node.right);
|
|
62234
|
+
break;
|
|
62235
|
+
}
|
|
62236
|
+
case "VariableDeclarator": {
|
|
62237
|
+
if (!includeLegacy || !node.init || nativeLookupName(node.init) !== "NativeModules" || node.id.type !== "ObjectPattern")
|
|
62238
|
+
return;
|
|
62239
|
+
for (const property of node.id.properties) {
|
|
62240
|
+
if (property.type !== "Property") continue;
|
|
62241
|
+
const key2 = property.key;
|
|
62242
|
+
if (!property.computed && key2.type === "Identifier")
|
|
62243
|
+
add("module", key2.name, property.start, false);
|
|
62244
|
+
else if (key2.type === "Literal" && typeof key2.value === "string")
|
|
62245
|
+
add("module", key2.value, property.start, false);
|
|
62343
62246
|
}
|
|
62247
|
+
break;
|
|
62248
|
+
}
|
|
62249
|
+
case "CallExpression": {
|
|
62250
|
+
const first = node.arguments[0];
|
|
62251
|
+
if (first?.type !== "Literal" || typeof first.value !== "string") return;
|
|
62252
|
+
const callee = node.callee;
|
|
62253
|
+
const lookup2 = nativeLookupName(callee);
|
|
62254
|
+
if (callee.type === "MemberExpression" && !callee.computed && nativeLookupName(callee.object) === "TurboModuleRegistry" && (lookup2 === "get" || lookup2 === "getEnforcing")) {
|
|
62255
|
+
add("module", first.value, node.start, false);
|
|
62256
|
+
} else if (lookup2) {
|
|
62257
|
+
if (["requireNativeModule", "requireOptionalNativeModule"].includes(lookup2))
|
|
62258
|
+
add(
|
|
62259
|
+
"module",
|
|
62260
|
+
first.value,
|
|
62261
|
+
node.start,
|
|
62262
|
+
lookup2 === "requireOptionalNativeModule"
|
|
62263
|
+
);
|
|
62264
|
+
else if (["requireNativeComponent", "codegenNativeComponent"].includes(lookup2))
|
|
62265
|
+
add("view", first.value, node.start, false);
|
|
62266
|
+
else if (["requireNativeView", "requireNativeViewManager"].includes(lookup2)) {
|
|
62267
|
+
const second = node.arguments[1];
|
|
62268
|
+
const name3 = second?.type === "Literal" && typeof second.value === "string" ? `${first.value}_${second.value}` : first.value;
|
|
62269
|
+
add("view", name3, node.start, false);
|
|
62270
|
+
}
|
|
62271
|
+
}
|
|
62272
|
+
break;
|
|
62273
|
+
}
|
|
62274
|
+
case "MemberExpression": {
|
|
62275
|
+
if (includeLegacy && !node.computed && nativeLookupName(node.object) === "NativeModules" && node.property.type === "Identifier")
|
|
62276
|
+
add("module", node.property.name, node.start, false);
|
|
62277
|
+
break;
|
|
62344
62278
|
}
|
|
62345
|
-
},
|
|
62346
|
-
MemberExpression(node) {
|
|
62347
|
-
if (includeLegacy && !node.computed && nativeLookupName(node.object) === "NativeModules" && node.property.type === "Identifier")
|
|
62348
|
-
add("module", node.property.name, node.start, false);
|
|
62349
62279
|
}
|
|
62350
62280
|
});
|
|
62351
62281
|
return found;
|
|
@@ -62414,11 +62344,11 @@ function configModule(configPath, packages) {
|
|
|
62414
62344
|
if (configPath && (configPath.endsWith(".cjs") || configPath.endsWith(".js") && /\bmodule\.exports\b/.test(readSmallFile(configPath) ?? "")))
|
|
62415
62345
|
return ["module.exports = {", ...body, "}"].join("\n");
|
|
62416
62346
|
return [
|
|
62417
|
-
`import {
|
|
62347
|
+
`import type { PeachConfig } from '${rnxPublicBrand.packageName}/config'`,
|
|
62418
62348
|
"",
|
|
62419
|
-
"export default
|
|
62349
|
+
"export default {",
|
|
62420
62350
|
...body,
|
|
62421
|
-
"}
|
|
62351
|
+
"} satisfies PeachConfig"
|
|
62422
62352
|
].join("\n");
|
|
62423
62353
|
}
|
|
62424
62354
|
function wireSlotMigration(appDir, configPath, wire, kept = []) {
|
|
@@ -62645,20 +62575,20 @@ function workspacePackageDirs(appDir, pkg) {
|
|
|
62645
62575
|
}
|
|
62646
62576
|
return [...dirs];
|
|
62647
62577
|
}
|
|
62648
|
-
var import_node_fs77, import_node_path77,
|
|
62578
|
+
var import_node_fs77, import_node_path77, import_acorn, import_sucrase2, SOURCE_FILE, NATIVE_LOOKUP, NATIVE_SOURCE_DIRS, PACKAGE_SKIP_DIRS, NATIVE_SOURCE_FILE2;
|
|
62649
62579
|
var init_app_stubs = __esm({
|
|
62650
62580
|
"cli/app-stubs.ts"() {
|
|
62651
62581
|
"use strict";
|
|
62652
62582
|
import_node_fs77 = require("node:fs");
|
|
62653
62583
|
import_node_path77 = require("node:path");
|
|
62654
62584
|
init_version_range();
|
|
62655
|
-
|
|
62585
|
+
import_acorn = require("peachsim/vendor/acorn");
|
|
62656
62586
|
import_sucrase2 = require("peachsim/vendor/sucrase");
|
|
62657
62587
|
init_config();
|
|
62588
|
+
init_estree_walk();
|
|
62658
62589
|
init_is_record();
|
|
62659
62590
|
init_nitro_source();
|
|
62660
62591
|
init_public_brand();
|
|
62661
|
-
init_visit_parsed_program();
|
|
62662
62592
|
init_detect();
|
|
62663
62593
|
SOURCE_FILE = /\.[cm]?[jt]sx?$/;
|
|
62664
62594
|
NATIVE_LOOKUP = /requireNative|requireOptionalNative|TurboModuleRegistry|codegenNativeComponent|NativeModules/;
|
|
@@ -64307,16 +64237,9 @@ async function loadRNXAppStubs(project2) {
|
|
|
64307
64237
|
async function loadConfigFile(project2) {
|
|
64308
64238
|
if (!project2.configPath) return void 0;
|
|
64309
64239
|
try {
|
|
64310
|
-
const
|
|
64311
|
-
|
|
64312
|
-
|
|
64313
|
-
moduleCache: false,
|
|
64314
|
-
tryNative: false,
|
|
64315
|
-
virtualModules: {
|
|
64316
|
-
[`${rnxPublicBrand.packageName}/config`]: config_exports
|
|
64317
|
-
}
|
|
64318
|
-
});
|
|
64319
|
-
const loaded4 = project2.configPath.endsWith(".json") ? JSON.parse((0, import_node_fs78.readFileSync)(project2.configPath, "utf8")) : await jiti.import(project2.configPath, { default: true });
|
|
64240
|
+
const configPath = import_node_path79.default.resolve(project2.configPath);
|
|
64241
|
+
delete (0, import_node_module9.createRequire)(__sootsim_import_meta_url).cache[configPath];
|
|
64242
|
+
const loaded4 = configPath.endsWith(".json") ? JSON.parse((0, import_node_fs78.readFileSync)(configPath, "utf8")) : Reflect.get(await import(configPath), "default");
|
|
64320
64243
|
if (!isPeachConfig(loaded4)) {
|
|
64321
64244
|
throw new Error("the default export must be a peach config object");
|
|
64322
64245
|
}
|
|
@@ -64368,18 +64291,16 @@ async function resolveRNXAppConfig(startDir = process.cwd()) {
|
|
|
64368
64291
|
const project2 = resolveAppProject(startDir);
|
|
64369
64292
|
return { project: project2, ...await loadRNXAppStubs(project2) };
|
|
64370
64293
|
}
|
|
64371
|
-
var import_node_fs78,
|
|
64294
|
+
var import_node_fs78, import_node_module9, import_node_path79, WIRE_SLOTS;
|
|
64372
64295
|
var init_app_config = __esm({
|
|
64373
64296
|
"src/app-config.ts"() {
|
|
64374
64297
|
"use strict";
|
|
64375
64298
|
import_node_fs78 = require("node:fs");
|
|
64299
|
+
import_node_module9 = require("node:module");
|
|
64376
64300
|
import_node_path79 = __toESM(require("node:path"), 1);
|
|
64377
|
-
import_jiti = require("jiti");
|
|
64378
64301
|
init_app_project();
|
|
64379
64302
|
init_app_stubs();
|
|
64380
64303
|
init_config();
|
|
64381
|
-
init_config();
|
|
64382
|
-
init_public_brand();
|
|
64383
64304
|
init_settingsContract();
|
|
64384
64305
|
init_storekit_test_store();
|
|
64385
64306
|
WIRE_SLOTS = ["nativeModules", "turboModules", "nativeViews"];
|
|
@@ -64906,7 +64827,7 @@ function installedNativeLibraries(providers, projectRoot, moduleRoot, iosTarget,
|
|
|
64906
64827
|
const podsRoot = import_node_path82.default.dirname(app.cocoapods.manifestLock);
|
|
64907
64828
|
const localPods = app.cocoapods.localPodspecs;
|
|
64908
64829
|
const reactNativeRoot = import_node_path82.default.dirname(
|
|
64909
|
-
(0,
|
|
64830
|
+
(0, import_node_module10.createRequire)(import_node_path82.default.join(projectRoot, "package.json")).resolve(
|
|
64910
64831
|
"react-native/package.json"
|
|
64911
64832
|
)
|
|
64912
64833
|
);
|
|
@@ -65095,12 +65016,12 @@ function installedPodBinaries(directory2) {
|
|
|
65095
65016
|
}
|
|
65096
65017
|
return binaries.sort();
|
|
65097
65018
|
}
|
|
65098
|
-
var import_node_fs81,
|
|
65019
|
+
var import_node_fs81, import_node_module10, import_node_path82, BINARY_BUNDLE, SOURCE;
|
|
65099
65020
|
var init_installed_native_libraries = __esm({
|
|
65100
65021
|
"src/installed-native-libraries.ts"() {
|
|
65101
65022
|
"use strict";
|
|
65102
65023
|
import_node_fs81 = __toESM(require("node:fs"), 1);
|
|
65103
|
-
|
|
65024
|
+
import_node_module10 = require("node:module");
|
|
65104
65025
|
import_node_path82 = __toESM(require("node:path"), 1);
|
|
65105
65026
|
init_is_record();
|
|
65106
65027
|
init_native_static_libraries();
|
|
@@ -66398,11 +66319,14 @@ function enumerateBundleImages(paths, readText2, bundleForFile = () => ".") {
|
|
|
66398
66319
|
}
|
|
66399
66320
|
for (const path123 of paths) {
|
|
66400
66321
|
if (!isFlatResourceImage(path123)) continue;
|
|
66401
|
-
const
|
|
66322
|
+
const filename = baseOf(path123);
|
|
66323
|
+
const name3 = filename.slice(0, -extOf(filename).length);
|
|
66402
66324
|
const { bundlePath, names } = namesFor(path123);
|
|
66403
66325
|
if (name3 === "" || names.has(name3)) continue;
|
|
66404
66326
|
names.add(name3);
|
|
66405
|
-
|
|
66327
|
+
const scaledFilename = filename.replace(/@[23]x(?=\.[^./]+$)/, "");
|
|
66328
|
+
const fileNames = (scaledFilename === filename ? [filename] : [filename, scaledFilename]).filter((lookup2) => !names.has(lookup2));
|
|
66329
|
+
table.push({ name: name3, file: path123, scale: flatScale(path123), bundlePath, fileNames });
|
|
66406
66330
|
}
|
|
66407
66331
|
return table;
|
|
66408
66332
|
}
|
|
@@ -66532,13 +66456,13 @@ function templateElements(svg) {
|
|
|
66532
66456
|
continue;
|
|
66533
66457
|
}
|
|
66534
66458
|
let [x, y] = offsets.at(-1) ?? [0, 0];
|
|
66535
|
-
const
|
|
66536
|
-
if (kind === "g" &&
|
|
66459
|
+
const transform6 = /transform="([^"]*)"/.exec(attributes)?.[1];
|
|
66460
|
+
if (kind === "g" && transform6 !== void 0) {
|
|
66537
66461
|
const translate = /^\s*translate\(\s*([-0-9.]+)[\s,]*([-0-9.]*)\s*\)\s*$/.exec(
|
|
66538
|
-
|
|
66462
|
+
transform6
|
|
66539
66463
|
);
|
|
66540
66464
|
const matrix = /^\s*matrix\(\s*1[\s,]+0[\s,]+0[\s,]+1[\s,]+([-0-9.]+)[\s,]+([-0-9.]+)\s*\)\s*$/.exec(
|
|
66541
|
-
|
|
66465
|
+
transform6
|
|
66542
66466
|
);
|
|
66543
66467
|
const move = translate ?? matrix;
|
|
66544
66468
|
if (!move) return null;
|
|
@@ -70694,10 +70618,10 @@ var require_packer_sync = __commonJS({
|
|
|
70694
70618
|
var require_png_sync = __commonJS({
|
|
70695
70619
|
"../../node_modules/pngjs/lib/png-sync.js"(exports3) {
|
|
70696
70620
|
"use strict";
|
|
70697
|
-
var
|
|
70621
|
+
var parse13 = require_parser_sync();
|
|
70698
70622
|
var pack = require_packer_sync();
|
|
70699
70623
|
exports3.read = function(buffer, options) {
|
|
70700
|
-
return
|
|
70624
|
+
return parse13(buffer, options || {});
|
|
70701
70625
|
};
|
|
70702
70626
|
exports3.write = function(png, options) {
|
|
70703
70627
|
return pack(png, options);
|
|
@@ -71952,7 +71876,7 @@ var init_swift_standin_digest = __esm({
|
|
|
71952
71876
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
71953
71877
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
71954
71878
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
71955
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
71879
|
+
STANDIN_SOURCE_DIGEST = true ? "63118ef9a51a40246d1d92d46ba9262a11addaf6d84914f7e1b78d6ff3b9bf19" : standinSourceDigest();
|
|
71956
71880
|
}
|
|
71957
71881
|
});
|
|
71958
71882
|
|
|
@@ -77193,11 +77117,11 @@ do { try data.write(to: output) } catch { exit(7) }
|
|
|
77193
77117
|
});
|
|
77194
77118
|
|
|
77195
77119
|
// src/swift-standin-config.ts
|
|
77196
|
-
var
|
|
77120
|
+
var import_acorn2, import_sucrase3;
|
|
77197
77121
|
var init_swift_standin_config = __esm({
|
|
77198
77122
|
"src/swift-standin-config.ts"() {
|
|
77199
77123
|
"use strict";
|
|
77200
|
-
|
|
77124
|
+
import_acorn2 = require("peachsim/vendor/acorn");
|
|
77201
77125
|
import_sucrase3 = require("peachsim/vendor/sucrase");
|
|
77202
77126
|
init_is_record();
|
|
77203
77127
|
}
|
|
@@ -78510,7 +78434,7 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
|
|
|
78510
78434
|
registered.set(`${sha2565}.metal`, { bytes, contentType: "text/plain; charset=utf-8" });
|
|
78511
78435
|
}
|
|
78512
78436
|
let imageBytes = 0;
|
|
78513
|
-
for (const { name: name3, file, scale, bundlePath, renderingMode } of found) {
|
|
78437
|
+
for (const { name: name3, file, scale, bundlePath, renderingMode, fileNames } of found) {
|
|
78514
78438
|
const disk = byRelative.get(file);
|
|
78515
78439
|
if (!disk) continue;
|
|
78516
78440
|
if (Object.keys(images).length >= limits.images) {
|
|
@@ -78549,12 +78473,15 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
|
|
|
78549
78473
|
imageBytes += bytes.length;
|
|
78550
78474
|
const hash = (0, import_node_crypto54.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
|
|
78551
78475
|
const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
|
|
78552
|
-
const
|
|
78553
|
-
variants.push({
|
|
78476
|
+
const variant2 = {
|
|
78554
78477
|
uri: `${baseUrl}${RESOURCE_PATH}${hash}${ext}`,
|
|
78555
78478
|
scale: variantScale,
|
|
78556
78479
|
...renderingMode ? { renderingMode } : {}
|
|
78557
|
-
}
|
|
78480
|
+
};
|
|
78481
|
+
for (const lookup2 of [name3, ...fileNames ?? []]) {
|
|
78482
|
+
const variants = bundle[lookup2] ??= [];
|
|
78483
|
+
variants.push(variant2);
|
|
78484
|
+
}
|
|
78558
78485
|
table[bundlePath] = bundle;
|
|
78559
78486
|
const key2 = layout2 ? xcodeInputKey(layout2, disk, file) : file;
|
|
78560
78487
|
images[key2] = {
|
|
@@ -78569,6 +78496,9 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
|
|
|
78569
78496
|
contentType: RESOURCE_CONTENT_TYPES[ext] ?? "application/octet-stream"
|
|
78570
78497
|
});
|
|
78571
78498
|
}
|
|
78499
|
+
for (const bundle of Object.values(table))
|
|
78500
|
+
for (const variants of Object.values(bundle))
|
|
78501
|
+
variants.sort((a, b) => a.scale - b.scale);
|
|
78572
78502
|
for (const file of relative4) {
|
|
78573
78503
|
if (file.endsWith(".colorset/Contents.json") || file.includes(".symbolset/"))
|
|
78574
78504
|
watched.push(file);
|
|
@@ -79897,7 +79827,7 @@ function autolinkerAppleFlags(autolinkerManifest, appRoot) {
|
|
|
79897
79827
|
return ["--platform", "ios"];
|
|
79898
79828
|
}
|
|
79899
79829
|
async function autolinkerResults(appRoot) {
|
|
79900
|
-
const appRequire = (0,
|
|
79830
|
+
const appRequire = (0, import_node_module11.createRequire)(import_node_path100.default.join(appRoot, "package.json"));
|
|
79901
79831
|
let expoRoot;
|
|
79902
79832
|
try {
|
|
79903
79833
|
expoRoot = import_node_path100.default.dirname(appRequire.resolve("expo/package.json"));
|
|
@@ -79962,12 +79892,12 @@ async function expoAutolinkedPods(appRoot) {
|
|
|
79962
79892
|
}))
|
|
79963
79893
|
);
|
|
79964
79894
|
}
|
|
79965
|
-
var import_node_fs100,
|
|
79895
|
+
var import_node_fs100, import_node_module11, import_node_path100;
|
|
79966
79896
|
var init_expo_autolinking = __esm({
|
|
79967
79897
|
"src/expo-autolinking.ts"() {
|
|
79968
79898
|
"use strict";
|
|
79969
79899
|
import_node_fs100 = __toESM(require("node:fs"), 1);
|
|
79970
|
-
|
|
79900
|
+
import_node_module11 = require("node:module");
|
|
79971
79901
|
import_node_path100 = __toESM(require("node:path"), 1);
|
|
79972
79902
|
init_autolinker_process();
|
|
79973
79903
|
init_is_record();
|
|
@@ -80055,7 +79985,7 @@ function realTarget(target) {
|
|
|
80055
79985
|
return import_node_path101.default.join(realTarget(import_node_path101.default.dirname(resolved)), import_node_path101.default.basename(resolved));
|
|
80056
79986
|
}
|
|
80057
79987
|
async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
80058
|
-
const manifestPath = (0,
|
|
79988
|
+
const manifestPath = (0, import_node_module12.createRequire)(import_node_path101.default.join(appRoot, "package.json")).resolve(
|
|
80059
79989
|
"react-native/package.json"
|
|
80060
79990
|
);
|
|
80061
79991
|
const manifest = JSON.parse(import_node_fs101.default.readFileSync(manifestPath, "utf8"));
|
|
@@ -80095,14 +80025,14 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
80095
80025
|
files: hashTree(generatedRoot)
|
|
80096
80026
|
};
|
|
80097
80027
|
}
|
|
80098
|
-
var import_node_child_process49, import_node_crypto55, import_node_fs101,
|
|
80028
|
+
var import_node_child_process49, import_node_crypto55, import_node_fs101, import_node_module12, import_node_path101, import_node_util10, run5, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
|
|
80099
80029
|
var init_turbo_codegen_intake = __esm({
|
|
80100
80030
|
"src/turbo-codegen-intake.ts"() {
|
|
80101
80031
|
"use strict";
|
|
80102
80032
|
import_node_child_process49 = require("node:child_process");
|
|
80103
80033
|
import_node_crypto55 = require("node:crypto");
|
|
80104
80034
|
import_node_fs101 = __toESM(require("node:fs"), 1);
|
|
80105
|
-
|
|
80035
|
+
import_node_module12 = require("node:module");
|
|
80106
80036
|
import_node_path101 = __toESM(require("node:path"), 1);
|
|
80107
80037
|
import_node_util10 = require("node:util");
|
|
80108
80038
|
init_forked_script_contract();
|
|
@@ -84879,7 +84809,7 @@ async function prepareTurboCompileInput(options) {
|
|
|
84879
84809
|
const reactNative = [options.appRoot, options.projectRoot].map(
|
|
84880
84810
|
(root2) => import_node_path103.default.dirname(
|
|
84881
84811
|
import_node_fs103.default.realpathSync(
|
|
84882
|
-
(0,
|
|
84812
|
+
(0, import_node_module13.createRequire)(import_node_path103.default.join(root2, "package.json")).resolve(
|
|
84883
84813
|
"react-native/package.json"
|
|
84884
84814
|
)
|
|
84885
84815
|
)
|
|
@@ -85034,13 +84964,13 @@ async function compileTurboModule(options) {
|
|
|
85034
84964
|
collection
|
|
85035
84965
|
};
|
|
85036
84966
|
}
|
|
85037
|
-
var import_node_crypto57, import_node_fs103,
|
|
84967
|
+
var import_node_crypto57, import_node_fs103, import_node_module13, import_node_os22, import_node_path103;
|
|
85038
84968
|
var init_turbo_compile = __esm({
|
|
85039
84969
|
"src/turbo-compile.ts"() {
|
|
85040
84970
|
"use strict";
|
|
85041
84971
|
import_node_crypto57 = require("node:crypto");
|
|
85042
84972
|
import_node_fs103 = __toESM(require("node:fs"), 1);
|
|
85043
|
-
|
|
84973
|
+
import_node_module13 = require("node:module");
|
|
85044
84974
|
import_node_os22 = __toESM(require("node:os"), 1);
|
|
85045
84975
|
import_node_path103 = __toESM(require("node:path"), 1);
|
|
85046
84976
|
init_native_app_identity_project();
|
|
@@ -85267,7 +85197,7 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
85267
85197
|
};
|
|
85268
85198
|
walk3("");
|
|
85269
85199
|
const codegenRoot = import_node_path105.default.dirname(
|
|
85270
|
-
(0,
|
|
85200
|
+
(0, import_node_module14.createRequire)(import_node_path105.default.join(reactNativeRoot, "package.json")).resolve(
|
|
85271
85201
|
"@react-native/codegen/package.json"
|
|
85272
85202
|
)
|
|
85273
85203
|
);
|
|
@@ -85368,13 +85298,13 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
85368
85298
|
}
|
|
85369
85299
|
}
|
|
85370
85300
|
}
|
|
85371
|
-
var import_node_crypto58, import_node_fs105,
|
|
85301
|
+
var import_node_crypto58, import_node_fs105, import_node_module14, import_node_path105, import_node_util11, recipe, strings3, building;
|
|
85372
85302
|
var init_react_native_core = __esm({
|
|
85373
85303
|
"src/react-native-core.ts"() {
|
|
85374
85304
|
"use strict";
|
|
85375
85305
|
import_node_crypto58 = require("node:crypto");
|
|
85376
85306
|
import_node_fs105 = __toESM(require("node:fs"), 1);
|
|
85377
|
-
|
|
85307
|
+
import_node_module14 = require("node:module");
|
|
85378
85308
|
import_node_path105 = __toESM(require("node:path"), 1);
|
|
85379
85309
|
import_node_util11 = require("node:util");
|
|
85380
85310
|
init_home_paths();
|
|
@@ -86498,7 +86428,7 @@ var init_package_tree_digest = __esm({
|
|
|
86498
86428
|
|
|
86499
86429
|
// src/nitro-superset-inputs.ts
|
|
86500
86430
|
async function nitroSupersetInputs(options) {
|
|
86501
|
-
const resolve4 = (0,
|
|
86431
|
+
const resolve4 = (0, import_node_module15.createRequire)((0, import_node_path110.join)(options.appRoot, "package.json")).resolve;
|
|
86502
86432
|
const pin2 = swiftNativePin();
|
|
86503
86433
|
const inputs = {
|
|
86504
86434
|
configuration: options.configuration,
|
|
@@ -86515,12 +86445,12 @@ async function nitroSupersetInputs(options) {
|
|
|
86515
86445
|
inputs[`provider:${name3}`] = `${packageVersion(root)}\0${await packageTreeDigest(root)}`;
|
|
86516
86446
|
return inputs;
|
|
86517
86447
|
}
|
|
86518
|
-
var import_node_fs110,
|
|
86448
|
+
var import_node_fs110, import_node_module15, import_node_path110, packageVersion;
|
|
86519
86449
|
var init_nitro_superset_inputs = __esm({
|
|
86520
86450
|
"src/nitro-superset-inputs.ts"() {
|
|
86521
86451
|
"use strict";
|
|
86522
86452
|
import_node_fs110 = require("node:fs");
|
|
86523
|
-
|
|
86453
|
+
import_node_module15 = require("node:module");
|
|
86524
86454
|
import_node_path110 = require("node:path");
|
|
86525
86455
|
init_package_tree_digest();
|
|
86526
86456
|
init_swift_native_pin();
|
|
@@ -86627,7 +86557,7 @@ var init_nitro_superset = __esm({
|
|
|
86627
86557
|
init_nitroContract();
|
|
86628
86558
|
init_swift_standin_digest();
|
|
86629
86559
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
86630
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
86560
|
+
NITRO_COMPILER_DIGEST = true ? "40b5a3e48324aaea7cd2483960647c93319a36d65bd8e3de3289996016f66be0" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
86631
86561
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
86632
86562
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
86633
86563
|
published = /* @__PURE__ */ new Map();
|
|
@@ -87333,7 +87263,7 @@ var init_expo_eager_seam_contract = __esm({
|
|
|
87333
87263
|
|
|
87334
87264
|
// src/expo-native-compiler-digest.ts
|
|
87335
87265
|
function expoNativeCompilerDigestValue() {
|
|
87336
|
-
return true ? "
|
|
87266
|
+
return true ? "d2721a5a426ac104272e382f27c37ac5deab8be0ed9aff4e274daba20781f6df" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
87337
87267
|
}
|
|
87338
87268
|
var import_node_crypto64;
|
|
87339
87269
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -87865,13 +87795,13 @@ async function readExpoConfigAsync(projectRoot) {
|
|
|
87865
87795
|
import_node_fs114.default.rmSync(directory2, { recursive: true, force: true });
|
|
87866
87796
|
}
|
|
87867
87797
|
}
|
|
87868
|
-
var import_node_child_process51, import_node_fs114,
|
|
87798
|
+
var import_node_child_process51, import_node_fs114, import_node_module16, import_node_os24, import_node_path114, EXPO_CONFIG_SCRIPT, EXPO_CONFIG_TIMEOUT_MS, resultDirectory;
|
|
87869
87799
|
var init_native_firebase_config = __esm({
|
|
87870
87800
|
"src/native-firebase-config.ts"() {
|
|
87871
87801
|
"use strict";
|
|
87872
87802
|
import_node_child_process51 = require("node:child_process");
|
|
87873
87803
|
import_node_fs114 = __toESM(require("node:fs"), 1);
|
|
87874
|
-
|
|
87804
|
+
import_node_module16 = require("node:module");
|
|
87875
87805
|
import_node_os24 = __toESM(require("node:os"), 1);
|
|
87876
87806
|
import_node_path114 = __toESM(require("node:path"), 1);
|
|
87877
87807
|
init_is_record();
|
|
@@ -87924,7 +87854,7 @@ function packageRootOf(appRoot, file) {
|
|
|
87924
87854
|
async function expoNativeInputs(appRoot) {
|
|
87925
87855
|
appRoot = import_node_fs115.default.realpathSync(appRoot);
|
|
87926
87856
|
if (findXcodeProject(import_node_path115.default.join(appRoot, "ios"))) return null;
|
|
87927
|
-
const appRequire = (0,
|
|
87857
|
+
const appRequire = (0, import_node_module17.createRequire)(import_node_path115.default.join(appRoot, "package.json"));
|
|
87928
87858
|
let fingerprintEntry;
|
|
87929
87859
|
try {
|
|
87930
87860
|
fingerprintEntry = appRequire.resolve("@expo/fingerprint", {
|
|
@@ -88096,13 +88026,13 @@ async function prebuiltExpoSwiftResult(appRoot, entry, signal) {
|
|
|
88096
88026
|
if (entry.expoSwift.modules.length === 0 && !entry.identity) return entry.expoSwift;
|
|
88097
88027
|
return servedExpoSwift(appRoot, entry, await prebuiltAppTarget(appRoot, signal));
|
|
88098
88028
|
}
|
|
88099
|
-
var import_node_crypto66, import_node_fs115,
|
|
88029
|
+
var import_node_crypto66, import_node_fs115, import_node_module17, import_node_path115, import_node_util12, import_plist9, EXPO_NATIVE_ENTRY_NAME, IDENTITY_SOURCE_SKIPS, expoNativeEntryUrl, isStringRecord, isPlistArray, published2, lookups, answers;
|
|
88100
88030
|
var init_expo_native_prebuilt = __esm({
|
|
88101
88031
|
"src/expo-native-prebuilt.ts"() {
|
|
88102
88032
|
"use strict";
|
|
88103
88033
|
import_node_crypto66 = require("node:crypto");
|
|
88104
88034
|
import_node_fs115 = __toESM(require("node:fs"), 1);
|
|
88105
|
-
|
|
88035
|
+
import_node_module17 = require("node:module");
|
|
88106
88036
|
import_node_path115 = __toESM(require("node:path"), 1);
|
|
88107
88037
|
import_node_util12 = require("node:util");
|
|
88108
88038
|
import_plist9 = __toESM(require("peachsim/vendor/plist"), 1);
|
|
@@ -88598,7 +88528,7 @@ function collectInstalledSwiftBridgeUnits(appRoot, units, installedNamespaces, s
|
|
|
88598
88528
|
const dependencies = manifest && typeof manifest === "object" ? Reflect.get(manifest, "dependencies") : null;
|
|
88599
88529
|
if (!dependencies || typeof dependencies !== "object" || Array.isArray(dependencies))
|
|
88600
88530
|
return;
|
|
88601
|
-
const appRequire = (0,
|
|
88531
|
+
const appRequire = (0, import_node_module18.createRequire)(manifestPath);
|
|
88602
88532
|
const namespacesSeen = new Set(units.map((unit2) => unit2.namespace));
|
|
88603
88533
|
for (const packageName of Object.keys(dependencies).sort()) {
|
|
88604
88534
|
signal?.throwIfAborted();
|
|
@@ -88692,12 +88622,12 @@ public func ${register}() -> RCTModuleHost.Registration {
|
|
|
88692
88622
|
}
|
|
88693
88623
|
}
|
|
88694
88624
|
}
|
|
88695
|
-
var import_node_fs116,
|
|
88625
|
+
var import_node_fs116, import_node_module18, import_node_path116, DIRECTIVE2, swiftString, BRIDGE_MODULE_FILE_PREFIX;
|
|
88696
88626
|
var init_react_native_bridge_modules = __esm({
|
|
88697
88627
|
"src/react-native-bridge-modules.ts"() {
|
|
88698
88628
|
"use strict";
|
|
88699
88629
|
import_node_fs116 = __toESM(require("node:fs"), 1);
|
|
88700
|
-
|
|
88630
|
+
import_node_module18 = require("node:module");
|
|
88701
88631
|
import_node_path116 = __toESM(require("node:path"), 1);
|
|
88702
88632
|
init_answeredNativePackages();
|
|
88703
88633
|
init_swift_compile();
|
|
@@ -89264,7 +89194,7 @@ function enrichInstalledUnits(units, installed, namespaceGroups, provided, modul
|
|
|
89264
89194
|
const byPath = [...installedTargets].sort((a, b) => b.path.length - a.path.length);
|
|
89265
89195
|
const reactNativeRoot = import_node_fs118.default.realpathSync(
|
|
89266
89196
|
import_node_path118.default.dirname(
|
|
89267
|
-
(0,
|
|
89197
|
+
(0, import_node_module19.createRequire)(import_node_path118.default.join(appRoot, "package.json")).resolve(
|
|
89268
89198
|
"react-native/package.json"
|
|
89269
89199
|
)
|
|
89270
89200
|
)
|
|
@@ -89702,7 +89632,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
89702
89632
|
signal?.throwIfAborted();
|
|
89703
89633
|
appRoot = import_node_fs118.default.realpathSync(appRoot);
|
|
89704
89634
|
const appConfig = await loadRNXAppConfig(resolveAppProject(appRoot));
|
|
89705
|
-
const appRequire = (0,
|
|
89635
|
+
const appRequire = (0, import_node_module19.createRequire)(import_node_path118.default.join(appRoot, "package.json"));
|
|
89706
89636
|
let expoRoot;
|
|
89707
89637
|
try {
|
|
89708
89638
|
expoRoot = import_node_path118.default.dirname(appRequire.resolve("expo/package.json"));
|
|
@@ -90830,7 +90760,7 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
90830
90760
|
const reactProvider = units.some((unit2) => unit2.reactNativeProvider) ? await (async () => {
|
|
90831
90761
|
const projectRoot = options.installedWorkspace ? import_node_path118.default.dirname(import_node_path118.default.dirname(options.installedWorkspace)) : (await prepareExpoNativeWorkspace(root, signal, options.iosTarget)).app;
|
|
90832
90762
|
const reactNativeRoot = import_node_path118.default.dirname(
|
|
90833
|
-
(0,
|
|
90763
|
+
(0, import_node_module19.createRequire)(import_node_path118.default.join(projectRoot, "package.json")).resolve(
|
|
90834
90764
|
"react-native/package.json"
|
|
90835
90765
|
)
|
|
90836
90766
|
);
|
|
@@ -91199,7 +91129,7 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
91199
91129
|
throw failure2;
|
|
91200
91130
|
}
|
|
91201
91131
|
}
|
|
91202
|
-
var import_node_async_hooks3, import_node_child_process53, import_node_crypto68, import_node_fs118,
|
|
91132
|
+
var import_node_async_hooks3, import_node_child_process53, import_node_crypto68, import_node_fs118, import_node_module19, import_node_os25, import_node_path118, import_node_url4, import_node_util13, run6, scriptEnv, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
|
|
91203
91133
|
var init_expo_swift_host = __esm({
|
|
91204
91134
|
"src/expo-swift-host.ts"() {
|
|
91205
91135
|
"use strict";
|
|
@@ -91207,7 +91137,7 @@ var init_expo_swift_host = __esm({
|
|
|
91207
91137
|
import_node_child_process53 = require("node:child_process");
|
|
91208
91138
|
import_node_crypto68 = require("node:crypto");
|
|
91209
91139
|
import_node_fs118 = __toESM(require("node:fs"), 1);
|
|
91210
|
-
|
|
91140
|
+
import_node_module19 = require("node:module");
|
|
91211
91141
|
import_node_os25 = __toESM(require("node:os"), 1);
|
|
91212
91142
|
import_node_path118 = __toESM(require("node:path"), 1);
|
|
91213
91143
|
import_node_url4 = require("node:url");
|
|
@@ -91349,7 +91279,7 @@ async function compileTurboApp(appRoot, origin, moduleRoot, iosTarget, prepareRe
|
|
|
91349
91279
|
const { artifact, collection } = await compileTurboModule({
|
|
91350
91280
|
appRoot,
|
|
91351
91281
|
reactNativeRoot: import_node_path119.default.dirname(
|
|
91352
|
-
(0,
|
|
91282
|
+
(0, import_node_module20.createRequire)(import_node_path119.default.join(projectRoot, "package.json")).resolve(
|
|
91353
91283
|
"react-native/package.json"
|
|
91354
91284
|
)
|
|
91355
91285
|
),
|
|
@@ -91387,11 +91317,11 @@ async function buildTurboBundle(appRoot, moduleRoot, prepareReactNativeCore) {
|
|
|
91387
91317
|
assets: compiled.artifact ? await compiledModuleAssets(compiled.artifact) : []
|
|
91388
91318
|
};
|
|
91389
91319
|
}
|
|
91390
|
-
var
|
|
91320
|
+
var import_node_module20, import_node_path119, TURBO_ROUTE, handleTurboRequest;
|
|
91391
91321
|
var init_turbo_bundle = __esm({
|
|
91392
91322
|
"src/turbo-bundle.ts"() {
|
|
91393
91323
|
"use strict";
|
|
91394
|
-
|
|
91324
|
+
import_node_module20 = require("node:module");
|
|
91395
91325
|
import_node_path119 = __toESM(require("node:path"), 1);
|
|
91396
91326
|
init_app_project();
|
|
91397
91327
|
init_app_config();
|
|
@@ -91437,7 +91367,7 @@ async function resolveExpoAndroidAutolinking(appRoot) {
|
|
|
91437
91367
|
async function resolveAndroidModules(appRoot) {
|
|
91438
91368
|
let autolinker;
|
|
91439
91369
|
try {
|
|
91440
|
-
autolinker = (0,
|
|
91370
|
+
autolinker = (0, import_node_module21.createRequire)(import_node_path120.default.join(appRoot, "package.json")).resolve(
|
|
91441
91371
|
"expo-modules-autolinking/package.json"
|
|
91442
91372
|
);
|
|
91443
91373
|
} catch (error) {
|
|
@@ -91491,12 +91421,12 @@ async function resolveReactNativeAndroidAutolinking(appRoot) {
|
|
|
91491
91421
|
}
|
|
91492
91422
|
return linked;
|
|
91493
91423
|
}
|
|
91494
|
-
var import_node_fs119,
|
|
91424
|
+
var import_node_fs119, import_node_module21, import_node_path120, resolving;
|
|
91495
91425
|
var init_android_autolinking = __esm({
|
|
91496
91426
|
"src/android-autolinking.ts"() {
|
|
91497
91427
|
"use strict";
|
|
91498
91428
|
import_node_fs119 = __toESM(require("node:fs"), 1);
|
|
91499
|
-
|
|
91429
|
+
import_node_module21 = require("node:module");
|
|
91500
91430
|
import_node_path120 = __toESM(require("node:path"), 1);
|
|
91501
91431
|
init_androidAutolinkingContract();
|
|
91502
91432
|
init_autolinker_process();
|
|
@@ -92321,7 +92251,7 @@ function bindingNames(pattern) {
|
|
|
92321
92251
|
throw new Error(`unsupported Kotlin export binding ${pattern.type}`);
|
|
92322
92252
|
}
|
|
92323
92253
|
function kotlinInstanceSource(source, factory, instanceImports = /* @__PURE__ */ new Map()) {
|
|
92324
|
-
const program = (0,
|
|
92254
|
+
const program = (0, import_acorn3.parse)(source, { ecmaVersion: "latest", sourceType: "module" });
|
|
92325
92255
|
const imports2 = [];
|
|
92326
92256
|
const body = [];
|
|
92327
92257
|
let dependencies = 0;
|
|
@@ -92411,11 +92341,11 @@ return { peachDisposeInstance, ${exports3.map((item) => `${JSON.stringify(item.e
|
|
|
92411
92341
|
exports: exports3
|
|
92412
92342
|
};
|
|
92413
92343
|
}
|
|
92414
|
-
var
|
|
92344
|
+
var import_acorn3;
|
|
92415
92345
|
var init_kotlin_instance_source = __esm({
|
|
92416
92346
|
"src/kotlin-instance-source.ts"() {
|
|
92417
92347
|
"use strict";
|
|
92418
|
-
|
|
92348
|
+
import_acorn3 = require("peachsim/vendor/acorn");
|
|
92419
92349
|
}
|
|
92420
92350
|
});
|
|
92421
92351
|
|
|
@@ -92531,7 +92461,7 @@ function loadKotlinSdk(moduleRoot, toolchain) {
|
|
|
92531
92461
|
}
|
|
92532
92462
|
function appKotlinLanguage(root) {
|
|
92533
92463
|
const reactNative = import_node_path127.default.dirname(
|
|
92534
|
-
(0,
|
|
92464
|
+
(0, import_node_module22.createRequire)(import_node_path127.default.join(root, "package.json")).resolve("react-native/package.json")
|
|
92535
92465
|
);
|
|
92536
92466
|
const versions = import_node_fs126.default.readFileSync(
|
|
92537
92467
|
import_node_path127.default.join(reactNative, "gradle", "libs.versions.toml"),
|
|
@@ -92705,7 +92635,7 @@ function readExpoTypes(output) {
|
|
|
92705
92635
|
};
|
|
92706
92636
|
});
|
|
92707
92637
|
}
|
|
92708
|
-
async function scanSources(tool,
|
|
92638
|
+
async function scanSources(tool, parse13, toolchain, moduleRoot, files2) {
|
|
92709
92639
|
const digest3 = (0, import_node_crypto73.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
|
|
92710
92640
|
const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
|
|
92711
92641
|
digest3.update(import_node_fs126.default.readFileSync(import_node_path127.default.join(moduleRoot, "sdk.tar.gz")));
|
|
@@ -92720,7 +92650,7 @@ async function scanSources(tool, parse11, toolchain, moduleRoot, files2) {
|
|
|
92720
92650
|
});
|
|
92721
92651
|
toolScans.set(key2, scan3);
|
|
92722
92652
|
}
|
|
92723
|
-
return
|
|
92653
|
+
return parse13(await scan3);
|
|
92724
92654
|
}
|
|
92725
92655
|
async function scanExpoTypes(toolchain, moduleRoot, sources) {
|
|
92726
92656
|
const candidates = sources.filter(
|
|
@@ -93510,7 +93440,7 @@ async function compileKotlin(input, origin) {
|
|
|
93510
93440
|
import_node_path127.default.join(work, "js")
|
|
93511
93441
|
]);
|
|
93512
93442
|
const skikoPath = import_node_path127.default.join(work, "js", "skiko.mjs");
|
|
93513
|
-
const upstream = (0,
|
|
93443
|
+
const upstream = (0, import_acorn4.parse)(import_node_fs126.default.readFileSync(skikoPath, "utf8"), {
|
|
93514
93444
|
ecmaVersion: "latest",
|
|
93515
93445
|
sourceType: "module"
|
|
93516
93446
|
});
|
|
@@ -93706,17 +93636,17 @@ async function serveKotlinRequest(pathname, res, app) {
|
|
|
93706
93636
|
}
|
|
93707
93637
|
return true;
|
|
93708
93638
|
}
|
|
93709
|
-
var import_node_child_process57, import_node_crypto73, import_node_fs126,
|
|
93639
|
+
var import_node_child_process57, import_node_crypto73, import_node_fs126, import_node_module22, import_node_path127, import_node_util17, import_acorn4, run10, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal2, CONTENT_TYPES;
|
|
93710
93640
|
var init_kotlin_host = __esm({
|
|
93711
93641
|
"src/kotlin-host.ts"() {
|
|
93712
93642
|
"use strict";
|
|
93713
93643
|
import_node_child_process57 = require("node:child_process");
|
|
93714
93644
|
import_node_crypto73 = require("node:crypto");
|
|
93715
93645
|
import_node_fs126 = __toESM(require("node:fs"), 1);
|
|
93716
|
-
|
|
93646
|
+
import_node_module22 = require("node:module");
|
|
93717
93647
|
import_node_path127 = __toESM(require("node:path"), 1);
|
|
93718
93648
|
import_node_util17 = require("node:util");
|
|
93719
|
-
|
|
93649
|
+
import_acorn4 = require("peachsim/vendor/acorn");
|
|
93720
93650
|
init_android_bridge_packages();
|
|
93721
93651
|
init_android_view_classes();
|
|
93722
93652
|
init_is_record();
|
|
@@ -94466,7 +94396,7 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
94466
94396
|
runtimePackages,
|
|
94467
94397
|
localModuleUrl: (specifier) => visit3(resolveReplacementModuleFile(real, specifier))
|
|
94468
94398
|
});
|
|
94469
|
-
const commonJs = (0,
|
|
94399
|
+
const commonJs = (0, import_sucrase5.transform)(splitExportDeclarators(compiled.code), {
|
|
94470
94400
|
transforms: ["imports"]
|
|
94471
94401
|
}).code;
|
|
94472
94402
|
for (const specifier of compiled.bareSpecifiers) neededPackages.add(specifier);
|
|
@@ -94510,14 +94440,14 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
94510
94440
|
const identityStart = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
|
|
94511
94441
|
return prefix + (identityStart < 0 ? source + footer : source.slice(0, identityStart) + footer + source.slice(identityStart));
|
|
94512
94442
|
}
|
|
94513
|
-
var import_node_fs132, import_node_path134,
|
|
94443
|
+
var import_node_fs132, import_node_path134, import_sucrase5, import_terser, PREFIX_START, PREFIX_END;
|
|
94514
94444
|
var init_configured_bundle_producer = __esm({
|
|
94515
94445
|
"src/configured-bundle-producer.ts"() {
|
|
94516
94446
|
"use strict";
|
|
94517
94447
|
import_node_fs132 = __toESM(require("node:fs"), 1);
|
|
94518
94448
|
import_node_path134 = __toESM(require("node:path"), 1);
|
|
94519
94449
|
init_bundle_global_footer();
|
|
94520
|
-
|
|
94450
|
+
import_sucrase5 = require("peachsim/vendor/sucrase");
|
|
94521
94451
|
import_terser = require("peachsim/vendor/terser");
|
|
94522
94452
|
init_dependencies();
|
|
94523
94453
|
init_replacementModule();
|
|
@@ -97430,12 +97360,6 @@ var COMPAT_STUBS = {
|
|
|
97430
97360
|
runtimeTier: "none",
|
|
97431
97361
|
buildResolvers: ["vite", "dep-prebundle"]
|
|
97432
97362
|
},
|
|
97433
|
-
reactNativeLaunchArguments: {
|
|
97434
|
-
specifier: "react-native-launch-arguments",
|
|
97435
|
-
stubFile: "react-native-launch-arguments.ts",
|
|
97436
|
-
runtimeTier: "core",
|
|
97437
|
-
buildResolvers: ["vite"]
|
|
97438
|
-
},
|
|
97439
97363
|
expoWinterFetch: {
|
|
97440
97364
|
specifier: "expo/build/winter/fetch/index",
|
|
97441
97365
|
stubFile: "expo-winter-fetch.ts",
|
|
@@ -98384,9 +98308,10 @@ init_is_record();
|
|
|
98384
98308
|
// src/one-native-app-config.ts
|
|
98385
98309
|
var import_node_fs129 = __toESM(require("node:fs"), 1);
|
|
98386
98310
|
var import_node_path130 = __toESM(require("node:path"), 1);
|
|
98387
|
-
var
|
|
98311
|
+
var import_acorn5 = require("peachsim/vendor/acorn");
|
|
98312
|
+
var import_sucrase4 = require("peachsim/vendor/sucrase");
|
|
98313
|
+
init_estree_walk();
|
|
98388
98314
|
init_is_record();
|
|
98389
|
-
init_visit_parsed_program();
|
|
98390
98315
|
var CONFIG_FILES = [
|
|
98391
98316
|
"vite.config.ts",
|
|
98392
98317
|
"vite.config.mts",
|
|
@@ -98413,10 +98338,6 @@ function staticValue(node) {
|
|
|
98413
98338
|
return typeof value === "number" ? -value : NOT_STATIC;
|
|
98414
98339
|
}
|
|
98415
98340
|
return NOT_STATIC;
|
|
98416
|
-
case "TSAsExpression":
|
|
98417
|
-
case "TSSatisfiesExpression":
|
|
98418
|
-
case "ParenthesizedExpression":
|
|
98419
|
-
return staticValue(node.expression);
|
|
98420
98341
|
case "ArrayExpression": {
|
|
98421
98342
|
const items2 = [];
|
|
98422
98343
|
for (const element of node.elements) {
|
|
@@ -98448,16 +98369,18 @@ function staticObject(node) {
|
|
|
98448
98369
|
function readOneNativeApp(root) {
|
|
98449
98370
|
const file = oneConfigPath(root);
|
|
98450
98371
|
if (!file) return null;
|
|
98451
|
-
const {
|
|
98372
|
+
const { code } = (0, import_sucrase4.transform)(import_node_fs129.default.readFileSync(file, "utf8"), {
|
|
98373
|
+
transforms: /\.[cm]?ts$/.test(file) ? ["typescript"] : [],
|
|
98374
|
+
disableESTransforms: true
|
|
98375
|
+
});
|
|
98452
98376
|
let app = null;
|
|
98453
|
-
|
|
98454
|
-
|
|
98455
|
-
|
|
98456
|
-
|
|
98457
|
-
|
|
98458
|
-
|
|
98459
|
-
|
|
98460
|
-
}
|
|
98377
|
+
visitNodes((0, import_acorn5.parse)(code, { ecmaVersion: "latest", sourceType: "module" }), (call) => {
|
|
98378
|
+
if (app || call.type !== "CallExpression") return;
|
|
98379
|
+
if (call.callee.type !== "Identifier" || call.callee.name !== "one") return;
|
|
98380
|
+
const [options] = call.arguments;
|
|
98381
|
+
if (options?.type !== "ObjectExpression") return;
|
|
98382
|
+
const { native } = staticObject(options);
|
|
98383
|
+
if (isRecord(native) && isRecord(native.app)) app = native.app;
|
|
98461
98384
|
});
|
|
98462
98385
|
return app;
|
|
98463
98386
|
}
|
|
@@ -98507,18 +98430,19 @@ function readAssetCatalog(files2, readContents2, imageUri, accentName) {
|
|
|
98507
98430
|
const colors = enumerateBundleColors(files2, readContents2);
|
|
98508
98431
|
const symbols = enumerateBundleSymbols(files2, readContents2, () => ".");
|
|
98509
98432
|
const images = {};
|
|
98510
|
-
for (const { name: name3, file, scale, renderingMode } of enumerateBundleImages(
|
|
98433
|
+
for (const { name: name3, file, scale, renderingMode, fileNames } of enumerateBundleImages(
|
|
98511
98434
|
files2,
|
|
98512
98435
|
readContents2
|
|
98513
98436
|
)) {
|
|
98514
98437
|
const uri = imageUri(file);
|
|
98515
|
-
if (uri
|
|
98516
|
-
|
|
98517
|
-
|
|
98518
|
-
|
|
98519
|
-
|
|
98520
|
-
|
|
98438
|
+
if (uri === null) continue;
|
|
98439
|
+
const variant2 = { uri, scale, ...renderingMode ? { renderingMode } : {} };
|
|
98440
|
+
for (const lookup2 of [name3, ...fileNames ?? []]) {
|
|
98441
|
+
const variants = images[lookup2] ??= [];
|
|
98442
|
+
variants.push(variant2);
|
|
98443
|
+
}
|
|
98521
98444
|
}
|
|
98445
|
+
for (const variants of Object.values(images)) variants.sort((a, b) => a.scale - b.scale);
|
|
98522
98446
|
if (accentName === null && Object.keys(colors).length === 0 && Object.keys(images).length === 0 && Object.keys(symbols).length === 0)
|
|
98523
98447
|
return null;
|
|
98524
98448
|
return { colors, images, symbols, accentName };
|
|
@@ -99019,8 +98943,8 @@ async function snapshotOneProductionBundle(projectRoot, entryFile, env = {}, { r
|
|
|
99019
98943
|
async function snapshotOneDevBundle(projectRoot, env = {}, { runtimeExecutable = process.execPath, platforms: platforms2 = ["ios", "android"] } = {}) {
|
|
99020
98944
|
const { spawn: spawn12 } = await import("node:child_process");
|
|
99021
98945
|
const { createServer: createServer2 } = await import("node:net");
|
|
99022
|
-
const { createRequire:
|
|
99023
|
-
const onePackage =
|
|
98946
|
+
const { createRequire: createRequire23 } = await import("node:module");
|
|
98947
|
+
const onePackage = createRequire23((0, import_node_path135.join)(projectRoot, "package.json")).resolve(
|
|
99024
98948
|
"one/package.json"
|
|
99025
98949
|
);
|
|
99026
98950
|
const oneBin = (0, import_node_path135.join)(
|