peachsim 0.1.2442 → 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 +2 -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/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +204 -300
- 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 +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-D5YJOCIH.mjs → acorn-73XUBXBT.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-IL72GVD2.mjs → chunk-7V2QJGVI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-CHX6MVMJ.mjs → chunk-BHQEYJAF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QUCZFE4Q.mjs → chunk-DSPFMVBM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VIB2KS3Z.mjs → chunk-GA73RJSG.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-Q3B6RI26.mjs → chunk-IGBAFWZ3.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-DGMP72J3.mjs → chunk-IKZDUGT6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2WXLADPB.mjs → chunk-IP5ZV36U.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HBINLWOI.mjs → chunk-KGHQ4GK2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NZRT4DMX.mjs → chunk-KY63O76W.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-AAUTS54C.mjs → chunk-LJ74MO6Y.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-COWKF3A3.mjs → chunk-LJX42YVT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-S6SCCQXW.mjs → chunk-O4KAW2JJ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QZBKRPVC.mjs → chunk-OIFM356B.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DSGMAFCS.mjs → chunk-P63DPATT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MYQU622L.mjs → chunk-SCCOZKCP.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-PTLTHUGX.mjs → chunk-TAZL253K.mjs} +10 -8
- package/dist-lib/esm-chunks/{chunk-ZTXYR22R.mjs → chunk-UBXCWZL3.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NPSA7CAZ.mjs → chunk-ZQWWO33G.mjs} +14 -2
- package/dist-lib/esm-chunks/{metro-layout-parser-BIIH3PF6.mjs → metro-layout-parser-HNQRTPVE.mjs} +3 -3
- package/dist-lib/expo-swift-bundle.cjs +161 -326
- 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 +237 -362
- package/dist-lib/host/fetch-proxy-handler.cjs +33 -35
- 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 +3 -1
- package/dist-lib/index.cjs +1 -104
- 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.json +73 -97
- 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 +261 -281
- package/dist-lib/swift-compile.cjs +6 -4
- 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 +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/bplist-parser.cjs +1 -1
- package/dist-lib/vendor/ignore.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/plist.cjs +1 -1
- package/dist-lib/vendor/smol-toml.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/dist-types/packages/peach-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 +1 -12
- 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/process-group.ts +4 -1
- package/src/process-table.ts +6 -1
- 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 -248
- package/dist-lib/vendor/jiti.cjs +0 -32732
- 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 -201
- package/src/kotlin-jvm-sources.ts +0 -35
- package/src/oxc-parser-peer.ts +0 -12
|
@@ -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;
|
|
@@ -32790,7 +32792,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
32790
32792
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
32791
32793
|
MULTI_MANIFEST_VERSION = 72;
|
|
32792
32794
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
32793
|
-
compilerSourceDigest = true ? "
|
|
32795
|
+
compilerSourceDigest = true ? "82277b01523ae4b1fce8888e636cd6a98f714c692be322d3916352e5629be0f5" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
32794
32796
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
32795
32797
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
32796
32798
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -59624,40 +59626,6 @@ var init_nativeViewSourceContract = __esm({
|
|
|
59624
59626
|
});
|
|
59625
59627
|
|
|
59626
59628
|
// src/config.ts
|
|
59627
|
-
var config_exports = {};
|
|
59628
|
-
__export(config_exports, {
|
|
59629
|
-
PEACH_CONFIGURED_FILES_HOOK: () => PEACH_CONFIGURED_FILES_HOOK,
|
|
59630
|
-
PEACH_CONFIG_QUERY_PARAM: () => PEACH_CONFIG_QUERY_PARAM,
|
|
59631
|
-
applyPeachConfigToUrl: () => applyPeachConfigToUrl,
|
|
59632
|
-
collectConfiguredFileModules: () => collectConfiguredFileModules,
|
|
59633
|
-
createPeachBundleConfigFooter: () => createPeachBundleConfigFooter,
|
|
59634
|
-
defineConfig: () => defineConfig,
|
|
59635
|
-
detachPeachBundleConfigFooter: () => detachPeachBundleConfigFooter,
|
|
59636
|
-
hasPeachConfig: () => hasPeachConfig,
|
|
59637
|
-
isPackageStubs: () => isPackageStubs,
|
|
59638
|
-
isPeachConfig: () => isPeachConfig,
|
|
59639
|
-
matchConfigModule: () => matchConfigModule,
|
|
59640
|
-
mergePeachConfig: () => mergePeachConfig,
|
|
59641
|
-
readNativeRenderer: () => readNativeRenderer,
|
|
59642
|
-
readPeachBundleConfig: () => readPeachBundleConfig,
|
|
59643
|
-
readPeachBundleConfigFooter: () => readPeachBundleConfigFooter,
|
|
59644
|
-
readPeachConfigFromSearchParams: () => readPeachConfigFromSearchParams
|
|
59645
|
-
});
|
|
59646
|
-
function readNativeRenderer(value) {
|
|
59647
|
-
if (value === void 0) return void 0;
|
|
59648
|
-
if (value === "paper" || value === "fabric") return value;
|
|
59649
|
-
throw new Error("nativeRenderer must be paper or fabric");
|
|
59650
|
-
}
|
|
59651
|
-
function matchConfigModule(name3, modules) {
|
|
59652
|
-
const entries = Object.entries(modules).sort((a, b) => b[0].length - a[0].length);
|
|
59653
|
-
const modulePath = name3.startsWith("/") ? name3 : `/${name3}`;
|
|
59654
|
-
for (const [pattern, resolution] of entries) {
|
|
59655
|
-
if (modulePath.includes(`/${pattern}/`) || modulePath.endsWith(`/${pattern}`) || modulePath.endsWith(`/${pattern}.js`) || modulePath.endsWith(`/${pattern}.ts`) || modulePath.endsWith(`/${pattern}.tsx`)) {
|
|
59656
|
-
return { pattern, resolution };
|
|
59657
|
-
}
|
|
59658
|
-
}
|
|
59659
|
-
return void 0;
|
|
59660
|
-
}
|
|
59661
59629
|
function isHybridObjectAnswer(answer2) {
|
|
59662
59630
|
return answer2 === "unsupported" || isRecord(answer2) && typeof answer2.file === "string" && answer2.file.length > 0;
|
|
59663
59631
|
}
|
|
@@ -59750,67 +59718,7 @@ function detachPeachBundleConfigFooter(source) {
|
|
|
59750
59718
|
configuredBundle
|
|
59751
59719
|
};
|
|
59752
59720
|
}
|
|
59753
|
-
|
|
59754
|
-
return config;
|
|
59755
|
-
}
|
|
59756
|
-
function hasOwnKeys(value) {
|
|
59757
|
-
return !!value && Object.keys(value).length > 0;
|
|
59758
|
-
}
|
|
59759
|
-
function hasPeachConfig(config) {
|
|
59760
|
-
if (!config) return false;
|
|
59761
|
-
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);
|
|
59762
|
-
}
|
|
59763
|
-
function mergePeachConfig(base2, override) {
|
|
59764
|
-
if (!hasPeachConfig(base2) && !hasPeachConfig(override)) return void 0;
|
|
59765
|
-
if (!hasPeachConfig(base2)) return override ? { ...override } : void 0;
|
|
59766
|
-
if (!hasPeachConfig(override)) return base2 ? { ...base2 } : void 0;
|
|
59767
|
-
return {
|
|
59768
|
-
runtimeVersion: override.runtimeVersion ?? base2.runtimeVersion,
|
|
59769
|
-
nativeRenderer: override.nativeRenderer ?? base2.nativeRenderer,
|
|
59770
|
-
mapKit: override.mapKit ?? base2.mapKit,
|
|
59771
|
-
modules: { ...base2.modules || {}, ...override.modules || {} },
|
|
59772
|
-
turboModules: { ...base2.turboModules || {}, ...override.turboModules || {} },
|
|
59773
|
-
nativeModules: {
|
|
59774
|
-
...base2.nativeModules || {},
|
|
59775
|
-
...override.nativeModules || {}
|
|
59776
|
-
},
|
|
59777
|
-
nativeViews: { ...base2.nativeViews || {}, ...override.nativeViews || {} },
|
|
59778
|
-
nativeHybridObjects: {
|
|
59779
|
-
...base2.nativeHybridObjects || {},
|
|
59780
|
-
...override.nativeHybridObjects || {}
|
|
59781
|
-
},
|
|
59782
|
-
env: { ...base2.env || {}, ...override.env || {} },
|
|
59783
|
-
network: {
|
|
59784
|
-
remap: { ...base2.network?.remap || {}, ...override.network?.remap || {} }
|
|
59785
|
-
},
|
|
59786
|
-
initialProps: { ...base2.initialProps || {}, ...override.initialProps || {} },
|
|
59787
|
-
initialState: { ...base2.initialState || {}, ...override.initialState || {} }
|
|
59788
|
-
};
|
|
59789
|
-
}
|
|
59790
|
-
function readPeachConfigFromSearchParams(searchParams) {
|
|
59791
|
-
const raw2 = searchParams.get(PEACH_CONFIG_QUERY_PARAM);
|
|
59792
|
-
if (!raw2) return void 0;
|
|
59793
|
-
let parsed2;
|
|
59794
|
-
try {
|
|
59795
|
-
parsed2 = JSON.parse(raw2);
|
|
59796
|
-
} catch (error) {
|
|
59797
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
59798
|
-
console.warn(`[peach] invalid ${PEACH_CONFIG_QUERY_PARAM}: ${message}`);
|
|
59799
|
-
return void 0;
|
|
59800
|
-
}
|
|
59801
|
-
if (isRecord(parsed2)) readNativeRenderer(parsed2.nativeRenderer);
|
|
59802
|
-
return isPeachConfig(parsed2) && hasPeachConfig(parsed2) ? parsed2 : void 0;
|
|
59803
|
-
}
|
|
59804
|
-
function applyPeachConfigToUrl(url, config) {
|
|
59805
|
-
const parsed2 = new URL(url);
|
|
59806
|
-
if (hasPeachConfig(config)) {
|
|
59807
|
-
parsed2.searchParams.set(PEACH_CONFIG_QUERY_PARAM, JSON.stringify(config));
|
|
59808
|
-
} else {
|
|
59809
|
-
parsed2.searchParams.delete(PEACH_CONFIG_QUERY_PARAM);
|
|
59810
|
-
}
|
|
59811
|
-
return parsed2.toString();
|
|
59812
|
-
}
|
|
59813
|
-
var PEACH_CONFIG_QUERY_PARAM, BUNDLE_CONFIG_PREFIX, PEACH_CONFIGURED_FILES_HOOK;
|
|
59721
|
+
var BUNDLE_CONFIG_PREFIX, PEACH_CONFIGURED_FILES_HOOK;
|
|
59814
59722
|
var init_config = __esm({
|
|
59815
59723
|
"src/config.ts"() {
|
|
59816
59724
|
"use strict";
|
|
@@ -59818,12 +59726,28 @@ var init_config = __esm({
|
|
|
59818
59726
|
init_bundle_global_footer();
|
|
59819
59727
|
init_is_record();
|
|
59820
59728
|
init_nativeViewSourceContract();
|
|
59821
|
-
PEACH_CONFIG_QUERY_PARAM = "peachConfig";
|
|
59822
59729
|
BUNDLE_CONFIG_PREFIX = "globalThis.__peachBundleConfig=";
|
|
59823
59730
|
PEACH_CONFIGURED_FILES_HOOK = "__peachInstallConfiguredFiles";
|
|
59824
59731
|
}
|
|
59825
59732
|
});
|
|
59826
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
|
+
|
|
59827
59751
|
// src/kotlin-toolchain.ts
|
|
59828
59752
|
async function runKotlinTool(toolchain, sdkRoot, tool, args, maxBuffer = 16 * 1024 * 1024) {
|
|
59829
59753
|
const lib = import_node_path72.default.resolve(import_node_path72.default.dirname(toolchain.kotlinc), "../lib");
|
|
@@ -62071,48 +61995,6 @@ var init_public_brand = __esm({
|
|
|
62071
61995
|
}
|
|
62072
61996
|
});
|
|
62073
61997
|
|
|
62074
|
-
// src/visit-parsed-program.ts
|
|
62075
|
-
function visitParsedProgram(program, visitor) {
|
|
62076
|
-
const enterByType = /* @__PURE__ */ new Map();
|
|
62077
|
-
const exitByType = /* @__PURE__ */ new Map();
|
|
62078
|
-
for (const key2 of Object.keys(visitor)) {
|
|
62079
|
-
const handler = Reflect.get(visitor, key2);
|
|
62080
|
-
if (typeof handler !== "function") continue;
|
|
62081
|
-
const invoke = (node) => {
|
|
62082
|
-
handler(node);
|
|
62083
|
-
};
|
|
62084
|
-
if (key2.endsWith(":exit")) exitByType.set(key2.slice(0, -5), invoke);
|
|
62085
|
-
else enterByType.set(key2, invoke);
|
|
62086
|
-
}
|
|
62087
|
-
if (enterByType.size === 0 && exitByType.size === 0) return;
|
|
62088
|
-
const hasExit = exitByType.size > 0;
|
|
62089
|
-
function visit3(value) {
|
|
62090
|
-
if (Array.isArray(value)) {
|
|
62091
|
-
for (let i = 0; i < value.length; i++) visit3(value[i]);
|
|
62092
|
-
return;
|
|
62093
|
-
}
|
|
62094
|
-
if (!isRecord(value) || typeof value.type !== "string") return;
|
|
62095
|
-
const keys = import_oxc_parser.visitorKeys[value.type];
|
|
62096
|
-
if (!keys) return;
|
|
62097
|
-
const enter = enterByType.get(value.type);
|
|
62098
|
-
if (enter) enter(value);
|
|
62099
|
-
for (let i = 0; i < keys.length; i++) visit3(value[keys[i]]);
|
|
62100
|
-
if (hasExit) {
|
|
62101
|
-
const exit = exitByType.get(value.type);
|
|
62102
|
-
if (exit) exit(value);
|
|
62103
|
-
}
|
|
62104
|
-
}
|
|
62105
|
-
visit3(program);
|
|
62106
|
-
}
|
|
62107
|
-
var import_oxc_parser;
|
|
62108
|
-
var init_visit_parsed_program = __esm({
|
|
62109
|
-
"src/visit-parsed-program.ts"() {
|
|
62110
|
-
"use strict";
|
|
62111
|
-
import_oxc_parser = require("oxc-parser");
|
|
62112
|
-
init_is_record();
|
|
62113
|
-
}
|
|
62114
|
-
});
|
|
62115
|
-
|
|
62116
61998
|
// cli/app-stubs.ts
|
|
62117
61999
|
function stubPackageTarget(name3) {
|
|
62118
62000
|
const match = /^(?:@[^/]+\/)?peach-stub-(.+)$/.exec(name3);
|
|
@@ -62312,8 +62194,17 @@ function sourceNativeRequests(file, text7, includeLegacy = false) {
|
|
|
62312
62194
|
} catch {
|
|
62313
62195
|
return [];
|
|
62314
62196
|
}
|
|
62315
|
-
|
|
62316
|
-
|
|
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
|
+
}
|
|
62317
62208
|
const found = [];
|
|
62318
62209
|
const androidRanges = [];
|
|
62319
62210
|
const guard = (test, branch) => {
|
|
@@ -62328,50 +62219,63 @@ function sourceNativeRequests(file, text7, includeLegacy = false) {
|
|
|
62328
62219
|
line: code.slice(0, at).split("\n").length
|
|
62329
62220
|
});
|
|
62330
62221
|
};
|
|
62331
|
-
|
|
62332
|
-
|
|
62333
|
-
|
|
62334
|
-
|
|
62335
|
-
|
|
62336
|
-
guard(node.test, node.consequent);
|
|
62337
|
-
},
|
|
62338
|
-
LogicalExpression(node) {
|
|
62339
|
-
if (node.operator === "&&") guard(node.left, node.right);
|
|
62340
|
-
},
|
|
62341
|
-
VariableDeclarator(node) {
|
|
62342
|
-
if (!includeLegacy || !node.init || nativeLookupName(node.init) !== "NativeModules" || node.id.type !== "ObjectPattern")
|
|
62343
|
-
return;
|
|
62344
|
-
for (const property of node.id.properties) {
|
|
62345
|
-
if (property.type !== "Property") continue;
|
|
62346
|
-
const key2 = property.key;
|
|
62347
|
-
if (!property.computed && key2.type === "Identifier")
|
|
62348
|
-
add("module", key2.name, property.start, false);
|
|
62349
|
-
else if (key2.type === "Literal" && typeof key2.value === "string")
|
|
62350
|
-
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;
|
|
62351
62227
|
}
|
|
62352
|
-
|
|
62353
|
-
|
|
62354
|
-
|
|
62355
|
-
|
|
62356
|
-
|
|
62357
|
-
|
|
62358
|
-
|
|
62359
|
-
|
|
62360
|
-
|
|
62361
|
-
if (
|
|
62362
|
-
|
|
62363
|
-
|
|
62364
|
-
|
|
62365
|
-
|
|
62366
|
-
|
|
62367
|
-
|
|
62368
|
-
|
|
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);
|
|
62369
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;
|
|
62370
62278
|
}
|
|
62371
|
-
},
|
|
62372
|
-
MemberExpression(node) {
|
|
62373
|
-
if (includeLegacy && !node.computed && nativeLookupName(node.object) === "NativeModules" && node.property.type === "Identifier")
|
|
62374
|
-
add("module", node.property.name, node.start, false);
|
|
62375
62279
|
}
|
|
62376
62280
|
});
|
|
62377
62281
|
return found;
|
|
@@ -62440,11 +62344,11 @@ function configModule(configPath, packages) {
|
|
|
62440
62344
|
if (configPath && (configPath.endsWith(".cjs") || configPath.endsWith(".js") && /\bmodule\.exports\b/.test(readSmallFile(configPath) ?? "")))
|
|
62441
62345
|
return ["module.exports = {", ...body, "}"].join("\n");
|
|
62442
62346
|
return [
|
|
62443
|
-
`import {
|
|
62347
|
+
`import type { PeachConfig } from '${rnxPublicBrand.packageName}/config'`,
|
|
62444
62348
|
"",
|
|
62445
|
-
"export default
|
|
62349
|
+
"export default {",
|
|
62446
62350
|
...body,
|
|
62447
|
-
"}
|
|
62351
|
+
"} satisfies PeachConfig"
|
|
62448
62352
|
].join("\n");
|
|
62449
62353
|
}
|
|
62450
62354
|
function wireSlotMigration(appDir, configPath, wire, kept = []) {
|
|
@@ -62671,20 +62575,20 @@ function workspacePackageDirs(appDir, pkg) {
|
|
|
62671
62575
|
}
|
|
62672
62576
|
return [...dirs];
|
|
62673
62577
|
}
|
|
62674
|
-
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;
|
|
62675
62579
|
var init_app_stubs = __esm({
|
|
62676
62580
|
"cli/app-stubs.ts"() {
|
|
62677
62581
|
"use strict";
|
|
62678
62582
|
import_node_fs77 = require("node:fs");
|
|
62679
62583
|
import_node_path77 = require("node:path");
|
|
62680
62584
|
init_version_range();
|
|
62681
|
-
|
|
62585
|
+
import_acorn = require("peachsim/vendor/acorn");
|
|
62682
62586
|
import_sucrase2 = require("peachsim/vendor/sucrase");
|
|
62683
62587
|
init_config();
|
|
62588
|
+
init_estree_walk();
|
|
62684
62589
|
init_is_record();
|
|
62685
62590
|
init_nitro_source();
|
|
62686
62591
|
init_public_brand();
|
|
62687
|
-
init_visit_parsed_program();
|
|
62688
62592
|
init_detect();
|
|
62689
62593
|
SOURCE_FILE = /\.[cm]?[jt]sx?$/;
|
|
62690
62594
|
NATIVE_LOOKUP = /requireNative|requireOptionalNative|TurboModuleRegistry|codegenNativeComponent|NativeModules/;
|
|
@@ -64333,16 +64237,9 @@ async function loadRNXAppStubs(project2) {
|
|
|
64333
64237
|
async function loadConfigFile(project2) {
|
|
64334
64238
|
if (!project2.configPath) return void 0;
|
|
64335
64239
|
try {
|
|
64336
|
-
const
|
|
64337
|
-
|
|
64338
|
-
|
|
64339
|
-
moduleCache: false,
|
|
64340
|
-
tryNative: false,
|
|
64341
|
-
virtualModules: {
|
|
64342
|
-
[`${rnxPublicBrand.packageName}/config`]: config_exports
|
|
64343
|
-
}
|
|
64344
|
-
});
|
|
64345
|
-
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");
|
|
64346
64243
|
if (!isPeachConfig(loaded4)) {
|
|
64347
64244
|
throw new Error("the default export must be a peach config object");
|
|
64348
64245
|
}
|
|
@@ -64394,18 +64291,16 @@ async function resolveRNXAppConfig(startDir = process.cwd()) {
|
|
|
64394
64291
|
const project2 = resolveAppProject(startDir);
|
|
64395
64292
|
return { project: project2, ...await loadRNXAppStubs(project2) };
|
|
64396
64293
|
}
|
|
64397
|
-
var import_node_fs78,
|
|
64294
|
+
var import_node_fs78, import_node_module9, import_node_path79, WIRE_SLOTS;
|
|
64398
64295
|
var init_app_config = __esm({
|
|
64399
64296
|
"src/app-config.ts"() {
|
|
64400
64297
|
"use strict";
|
|
64401
64298
|
import_node_fs78 = require("node:fs");
|
|
64299
|
+
import_node_module9 = require("node:module");
|
|
64402
64300
|
import_node_path79 = __toESM(require("node:path"), 1);
|
|
64403
|
-
import_jiti = require("peachsim/vendor/jiti");
|
|
64404
64301
|
init_app_project();
|
|
64405
64302
|
init_app_stubs();
|
|
64406
64303
|
init_config();
|
|
64407
|
-
init_config();
|
|
64408
|
-
init_public_brand();
|
|
64409
64304
|
init_settingsContract();
|
|
64410
64305
|
init_storekit_test_store();
|
|
64411
64306
|
WIRE_SLOTS = ["nativeModules", "turboModules", "nativeViews"];
|
|
@@ -64932,7 +64827,7 @@ function installedNativeLibraries(providers, projectRoot, moduleRoot, iosTarget,
|
|
|
64932
64827
|
const podsRoot = import_node_path82.default.dirname(app.cocoapods.manifestLock);
|
|
64933
64828
|
const localPods = app.cocoapods.localPodspecs;
|
|
64934
64829
|
const reactNativeRoot = import_node_path82.default.dirname(
|
|
64935
|
-
(0,
|
|
64830
|
+
(0, import_node_module10.createRequire)(import_node_path82.default.join(projectRoot, "package.json")).resolve(
|
|
64936
64831
|
"react-native/package.json"
|
|
64937
64832
|
)
|
|
64938
64833
|
);
|
|
@@ -65121,12 +65016,12 @@ function installedPodBinaries(directory2) {
|
|
|
65121
65016
|
}
|
|
65122
65017
|
return binaries.sort();
|
|
65123
65018
|
}
|
|
65124
|
-
var import_node_fs81,
|
|
65019
|
+
var import_node_fs81, import_node_module10, import_node_path82, BINARY_BUNDLE, SOURCE;
|
|
65125
65020
|
var init_installed_native_libraries = __esm({
|
|
65126
65021
|
"src/installed-native-libraries.ts"() {
|
|
65127
65022
|
"use strict";
|
|
65128
65023
|
import_node_fs81 = __toESM(require("node:fs"), 1);
|
|
65129
|
-
|
|
65024
|
+
import_node_module10 = require("node:module");
|
|
65130
65025
|
import_node_path82 = __toESM(require("node:path"), 1);
|
|
65131
65026
|
init_is_record();
|
|
65132
65027
|
init_native_static_libraries();
|
|
@@ -66424,11 +66319,14 @@ function enumerateBundleImages(paths, readText2, bundleForFile = () => ".") {
|
|
|
66424
66319
|
}
|
|
66425
66320
|
for (const path123 of paths) {
|
|
66426
66321
|
if (!isFlatResourceImage(path123)) continue;
|
|
66427
|
-
const
|
|
66322
|
+
const filename = baseOf(path123);
|
|
66323
|
+
const name3 = filename.slice(0, -extOf(filename).length);
|
|
66428
66324
|
const { bundlePath, names } = namesFor(path123);
|
|
66429
66325
|
if (name3 === "" || names.has(name3)) continue;
|
|
66430
66326
|
names.add(name3);
|
|
66431
|
-
|
|
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 });
|
|
66432
66330
|
}
|
|
66433
66331
|
return table;
|
|
66434
66332
|
}
|
|
@@ -66558,13 +66456,13 @@ function templateElements(svg) {
|
|
|
66558
66456
|
continue;
|
|
66559
66457
|
}
|
|
66560
66458
|
let [x, y] = offsets.at(-1) ?? [0, 0];
|
|
66561
|
-
const
|
|
66562
|
-
if (kind === "g" &&
|
|
66459
|
+
const transform6 = /transform="([^"]*)"/.exec(attributes)?.[1];
|
|
66460
|
+
if (kind === "g" && transform6 !== void 0) {
|
|
66563
66461
|
const translate = /^\s*translate\(\s*([-0-9.]+)[\s,]*([-0-9.]*)\s*\)\s*$/.exec(
|
|
66564
|
-
|
|
66462
|
+
transform6
|
|
66565
66463
|
);
|
|
66566
66464
|
const matrix = /^\s*matrix\(\s*1[\s,]+0[\s,]+0[\s,]+1[\s,]+([-0-9.]+)[\s,]+([-0-9.]+)\s*\)\s*$/.exec(
|
|
66567
|
-
|
|
66465
|
+
transform6
|
|
66568
66466
|
);
|
|
66569
66467
|
const move = translate ?? matrix;
|
|
66570
66468
|
if (!move) return null;
|
|
@@ -70720,10 +70618,10 @@ var require_packer_sync = __commonJS({
|
|
|
70720
70618
|
var require_png_sync = __commonJS({
|
|
70721
70619
|
"../../node_modules/pngjs/lib/png-sync.js"(exports3) {
|
|
70722
70620
|
"use strict";
|
|
70723
|
-
var
|
|
70621
|
+
var parse13 = require_parser_sync();
|
|
70724
70622
|
var pack = require_packer_sync();
|
|
70725
70623
|
exports3.read = function(buffer, options) {
|
|
70726
|
-
return
|
|
70624
|
+
return parse13(buffer, options || {});
|
|
70727
70625
|
};
|
|
70728
70626
|
exports3.write = function(png, options) {
|
|
70729
70627
|
return pack(png, options);
|
|
@@ -71978,7 +71876,7 @@ var init_swift_standin_digest = __esm({
|
|
|
71978
71876
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
71979
71877
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
71980
71878
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
71981
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
71879
|
+
STANDIN_SOURCE_DIGEST = true ? "63118ef9a51a40246d1d92d46ba9262a11addaf6d84914f7e1b78d6ff3b9bf19" : standinSourceDigest();
|
|
71982
71880
|
}
|
|
71983
71881
|
});
|
|
71984
71882
|
|
|
@@ -77219,11 +77117,11 @@ do { try data.write(to: output) } catch { exit(7) }
|
|
|
77219
77117
|
});
|
|
77220
77118
|
|
|
77221
77119
|
// src/swift-standin-config.ts
|
|
77222
|
-
var
|
|
77120
|
+
var import_acorn2, import_sucrase3;
|
|
77223
77121
|
var init_swift_standin_config = __esm({
|
|
77224
77122
|
"src/swift-standin-config.ts"() {
|
|
77225
77123
|
"use strict";
|
|
77226
|
-
|
|
77124
|
+
import_acorn2 = require("peachsim/vendor/acorn");
|
|
77227
77125
|
import_sucrase3 = require("peachsim/vendor/sucrase");
|
|
77228
77126
|
init_is_record();
|
|
77229
77127
|
}
|
|
@@ -78536,7 +78434,7 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
|
|
|
78536
78434
|
registered.set(`${sha2565}.metal`, { bytes, contentType: "text/plain; charset=utf-8" });
|
|
78537
78435
|
}
|
|
78538
78436
|
let imageBytes = 0;
|
|
78539
|
-
for (const { name: name3, file, scale, bundlePath, renderingMode } of found) {
|
|
78437
|
+
for (const { name: name3, file, scale, bundlePath, renderingMode, fileNames } of found) {
|
|
78540
78438
|
const disk = byRelative.get(file);
|
|
78541
78439
|
if (!disk) continue;
|
|
78542
78440
|
if (Object.keys(images).length >= limits.images) {
|
|
@@ -78575,12 +78473,15 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
|
|
|
78575
78473
|
imageBytes += bytes.length;
|
|
78576
78474
|
const hash = (0, import_node_crypto54.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
|
|
78577
78475
|
const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
|
|
78578
|
-
const
|
|
78579
|
-
variants.push({
|
|
78476
|
+
const variant2 = {
|
|
78580
78477
|
uri: `${baseUrl}${RESOURCE_PATH}${hash}${ext}`,
|
|
78581
78478
|
scale: variantScale,
|
|
78582
78479
|
...renderingMode ? { renderingMode } : {}
|
|
78583
|
-
}
|
|
78480
|
+
};
|
|
78481
|
+
for (const lookup2 of [name3, ...fileNames ?? []]) {
|
|
78482
|
+
const variants = bundle[lookup2] ??= [];
|
|
78483
|
+
variants.push(variant2);
|
|
78484
|
+
}
|
|
78584
78485
|
table[bundlePath] = bundle;
|
|
78585
78486
|
const key2 = layout2 ? xcodeInputKey(layout2, disk, file) : file;
|
|
78586
78487
|
images[key2] = {
|
|
@@ -78595,6 +78496,9 @@ function buildSwiftResourceTable(project2, baseUrl, inputs) {
|
|
|
78595
78496
|
contentType: RESOURCE_CONTENT_TYPES[ext] ?? "application/octet-stream"
|
|
78596
78497
|
});
|
|
78597
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);
|
|
78598
78502
|
for (const file of relative4) {
|
|
78599
78503
|
if (file.endsWith(".colorset/Contents.json") || file.includes(".symbolset/"))
|
|
78600
78504
|
watched.push(file);
|
|
@@ -79923,7 +79827,7 @@ function autolinkerAppleFlags(autolinkerManifest, appRoot) {
|
|
|
79923
79827
|
return ["--platform", "ios"];
|
|
79924
79828
|
}
|
|
79925
79829
|
async function autolinkerResults(appRoot) {
|
|
79926
|
-
const appRequire = (0,
|
|
79830
|
+
const appRequire = (0, import_node_module11.createRequire)(import_node_path100.default.join(appRoot, "package.json"));
|
|
79927
79831
|
let expoRoot;
|
|
79928
79832
|
try {
|
|
79929
79833
|
expoRoot = import_node_path100.default.dirname(appRequire.resolve("expo/package.json"));
|
|
@@ -79988,12 +79892,12 @@ async function expoAutolinkedPods(appRoot) {
|
|
|
79988
79892
|
}))
|
|
79989
79893
|
);
|
|
79990
79894
|
}
|
|
79991
|
-
var import_node_fs100,
|
|
79895
|
+
var import_node_fs100, import_node_module11, import_node_path100;
|
|
79992
79896
|
var init_expo_autolinking = __esm({
|
|
79993
79897
|
"src/expo-autolinking.ts"() {
|
|
79994
79898
|
"use strict";
|
|
79995
79899
|
import_node_fs100 = __toESM(require("node:fs"), 1);
|
|
79996
|
-
|
|
79900
|
+
import_node_module11 = require("node:module");
|
|
79997
79901
|
import_node_path100 = __toESM(require("node:path"), 1);
|
|
79998
79902
|
init_autolinker_process();
|
|
79999
79903
|
init_is_record();
|
|
@@ -80081,7 +79985,7 @@ function realTarget(target) {
|
|
|
80081
79985
|
return import_node_path101.default.join(realTarget(import_node_path101.default.dirname(resolved)), import_node_path101.default.basename(resolved));
|
|
80082
79986
|
}
|
|
80083
79987
|
async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
80084
|
-
const manifestPath = (0,
|
|
79988
|
+
const manifestPath = (0, import_node_module12.createRequire)(import_node_path101.default.join(appRoot, "package.json")).resolve(
|
|
80085
79989
|
"react-native/package.json"
|
|
80086
79990
|
);
|
|
80087
79991
|
const manifest = JSON.parse(import_node_fs101.default.readFileSync(manifestPath, "utf8"));
|
|
@@ -80121,14 +80025,14 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
80121
80025
|
files: hashTree(generatedRoot)
|
|
80122
80026
|
};
|
|
80123
80027
|
}
|
|
80124
|
-
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;
|
|
80125
80029
|
var init_turbo_codegen_intake = __esm({
|
|
80126
80030
|
"src/turbo-codegen-intake.ts"() {
|
|
80127
80031
|
"use strict";
|
|
80128
80032
|
import_node_child_process49 = require("node:child_process");
|
|
80129
80033
|
import_node_crypto55 = require("node:crypto");
|
|
80130
80034
|
import_node_fs101 = __toESM(require("node:fs"), 1);
|
|
80131
|
-
|
|
80035
|
+
import_node_module12 = require("node:module");
|
|
80132
80036
|
import_node_path101 = __toESM(require("node:path"), 1);
|
|
80133
80037
|
import_node_util10 = require("node:util");
|
|
80134
80038
|
init_forked_script_contract();
|
|
@@ -84905,7 +84809,7 @@ async function prepareTurboCompileInput(options) {
|
|
|
84905
84809
|
const reactNative = [options.appRoot, options.projectRoot].map(
|
|
84906
84810
|
(root2) => import_node_path103.default.dirname(
|
|
84907
84811
|
import_node_fs103.default.realpathSync(
|
|
84908
|
-
(0,
|
|
84812
|
+
(0, import_node_module13.createRequire)(import_node_path103.default.join(root2, "package.json")).resolve(
|
|
84909
84813
|
"react-native/package.json"
|
|
84910
84814
|
)
|
|
84911
84815
|
)
|
|
@@ -85060,13 +84964,13 @@ async function compileTurboModule(options) {
|
|
|
85060
84964
|
collection
|
|
85061
84965
|
};
|
|
85062
84966
|
}
|
|
85063
|
-
var import_node_crypto57, import_node_fs103,
|
|
84967
|
+
var import_node_crypto57, import_node_fs103, import_node_module13, import_node_os22, import_node_path103;
|
|
85064
84968
|
var init_turbo_compile = __esm({
|
|
85065
84969
|
"src/turbo-compile.ts"() {
|
|
85066
84970
|
"use strict";
|
|
85067
84971
|
import_node_crypto57 = require("node:crypto");
|
|
85068
84972
|
import_node_fs103 = __toESM(require("node:fs"), 1);
|
|
85069
|
-
|
|
84973
|
+
import_node_module13 = require("node:module");
|
|
85070
84974
|
import_node_os22 = __toESM(require("node:os"), 1);
|
|
85071
84975
|
import_node_path103 = __toESM(require("node:path"), 1);
|
|
85072
84976
|
init_native_app_identity_project();
|
|
@@ -85293,7 +85197,7 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
|
|
|
85293
85197
|
};
|
|
85294
85198
|
walk3("");
|
|
85295
85199
|
const codegenRoot = import_node_path105.default.dirname(
|
|
85296
|
-
(0,
|
|
85200
|
+
(0, import_node_module14.createRequire)(import_node_path105.default.join(reactNativeRoot, "package.json")).resolve(
|
|
85297
85201
|
"@react-native/codegen/package.json"
|
|
85298
85202
|
)
|
|
85299
85203
|
);
|
|
@@ -85394,13 +85298,13 @@ function linkReactNativeCore(collection, core, moduleRoot) {
|
|
|
85394
85298
|
}
|
|
85395
85299
|
}
|
|
85396
85300
|
}
|
|
85397
|
-
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;
|
|
85398
85302
|
var init_react_native_core = __esm({
|
|
85399
85303
|
"src/react-native-core.ts"() {
|
|
85400
85304
|
"use strict";
|
|
85401
85305
|
import_node_crypto58 = require("node:crypto");
|
|
85402
85306
|
import_node_fs105 = __toESM(require("node:fs"), 1);
|
|
85403
|
-
|
|
85307
|
+
import_node_module14 = require("node:module");
|
|
85404
85308
|
import_node_path105 = __toESM(require("node:path"), 1);
|
|
85405
85309
|
import_node_util11 = require("node:util");
|
|
85406
85310
|
init_home_paths();
|
|
@@ -86524,7 +86428,7 @@ var init_package_tree_digest = __esm({
|
|
|
86524
86428
|
|
|
86525
86429
|
// src/nitro-superset-inputs.ts
|
|
86526
86430
|
async function nitroSupersetInputs(options) {
|
|
86527
|
-
const resolve4 = (0,
|
|
86431
|
+
const resolve4 = (0, import_node_module15.createRequire)((0, import_node_path110.join)(options.appRoot, "package.json")).resolve;
|
|
86528
86432
|
const pin2 = swiftNativePin();
|
|
86529
86433
|
const inputs = {
|
|
86530
86434
|
configuration: options.configuration,
|
|
@@ -86541,12 +86445,12 @@ async function nitroSupersetInputs(options) {
|
|
|
86541
86445
|
inputs[`provider:${name3}`] = `${packageVersion(root)}\0${await packageTreeDigest(root)}`;
|
|
86542
86446
|
return inputs;
|
|
86543
86447
|
}
|
|
86544
|
-
var import_node_fs110,
|
|
86448
|
+
var import_node_fs110, import_node_module15, import_node_path110, packageVersion;
|
|
86545
86449
|
var init_nitro_superset_inputs = __esm({
|
|
86546
86450
|
"src/nitro-superset-inputs.ts"() {
|
|
86547
86451
|
"use strict";
|
|
86548
86452
|
import_node_fs110 = require("node:fs");
|
|
86549
|
-
|
|
86453
|
+
import_node_module15 = require("node:module");
|
|
86550
86454
|
import_node_path110 = require("node:path");
|
|
86551
86455
|
init_package_tree_digest();
|
|
86552
86456
|
init_swift_native_pin();
|
|
@@ -86653,7 +86557,7 @@ var init_nitro_superset = __esm({
|
|
|
86653
86557
|
init_nitroContract();
|
|
86654
86558
|
init_swift_standin_digest();
|
|
86655
86559
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
86656
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
86560
|
+
NITRO_COMPILER_DIGEST = true ? "40b5a3e48324aaea7cd2483960647c93319a36d65bd8e3de3289996016f66be0" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
86657
86561
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
86658
86562
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
86659
86563
|
published = /* @__PURE__ */ new Map();
|
|
@@ -87359,7 +87263,7 @@ var init_expo_eager_seam_contract = __esm({
|
|
|
87359
87263
|
|
|
87360
87264
|
// src/expo-native-compiler-digest.ts
|
|
87361
87265
|
function expoNativeCompilerDigestValue() {
|
|
87362
|
-
return true ? "
|
|
87266
|
+
return true ? "d2721a5a426ac104272e382f27c37ac5deab8be0ed9aff4e274daba20781f6df" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
87363
87267
|
}
|
|
87364
87268
|
var import_node_crypto64;
|
|
87365
87269
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -87891,13 +87795,13 @@ async function readExpoConfigAsync(projectRoot) {
|
|
|
87891
87795
|
import_node_fs114.default.rmSync(directory2, { recursive: true, force: true });
|
|
87892
87796
|
}
|
|
87893
87797
|
}
|
|
87894
|
-
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;
|
|
87895
87799
|
var init_native_firebase_config = __esm({
|
|
87896
87800
|
"src/native-firebase-config.ts"() {
|
|
87897
87801
|
"use strict";
|
|
87898
87802
|
import_node_child_process51 = require("node:child_process");
|
|
87899
87803
|
import_node_fs114 = __toESM(require("node:fs"), 1);
|
|
87900
|
-
|
|
87804
|
+
import_node_module16 = require("node:module");
|
|
87901
87805
|
import_node_os24 = __toESM(require("node:os"), 1);
|
|
87902
87806
|
import_node_path114 = __toESM(require("node:path"), 1);
|
|
87903
87807
|
init_is_record();
|
|
@@ -87950,7 +87854,7 @@ function packageRootOf(appRoot, file) {
|
|
|
87950
87854
|
async function expoNativeInputs(appRoot) {
|
|
87951
87855
|
appRoot = import_node_fs115.default.realpathSync(appRoot);
|
|
87952
87856
|
if (findXcodeProject(import_node_path115.default.join(appRoot, "ios"))) return null;
|
|
87953
|
-
const appRequire = (0,
|
|
87857
|
+
const appRequire = (0, import_node_module17.createRequire)(import_node_path115.default.join(appRoot, "package.json"));
|
|
87954
87858
|
let fingerprintEntry;
|
|
87955
87859
|
try {
|
|
87956
87860
|
fingerprintEntry = appRequire.resolve("@expo/fingerprint", {
|
|
@@ -88122,13 +88026,13 @@ async function prebuiltExpoSwiftResult(appRoot, entry, signal) {
|
|
|
88122
88026
|
if (entry.expoSwift.modules.length === 0 && !entry.identity) return entry.expoSwift;
|
|
88123
88027
|
return servedExpoSwift(appRoot, entry, await prebuiltAppTarget(appRoot, signal));
|
|
88124
88028
|
}
|
|
88125
|
-
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;
|
|
88126
88030
|
var init_expo_native_prebuilt = __esm({
|
|
88127
88031
|
"src/expo-native-prebuilt.ts"() {
|
|
88128
88032
|
"use strict";
|
|
88129
88033
|
import_node_crypto66 = require("node:crypto");
|
|
88130
88034
|
import_node_fs115 = __toESM(require("node:fs"), 1);
|
|
88131
|
-
|
|
88035
|
+
import_node_module17 = require("node:module");
|
|
88132
88036
|
import_node_path115 = __toESM(require("node:path"), 1);
|
|
88133
88037
|
import_node_util12 = require("node:util");
|
|
88134
88038
|
import_plist9 = __toESM(require("peachsim/vendor/plist"), 1);
|
|
@@ -88624,7 +88528,7 @@ function collectInstalledSwiftBridgeUnits(appRoot, units, installedNamespaces, s
|
|
|
88624
88528
|
const dependencies = manifest && typeof manifest === "object" ? Reflect.get(manifest, "dependencies") : null;
|
|
88625
88529
|
if (!dependencies || typeof dependencies !== "object" || Array.isArray(dependencies))
|
|
88626
88530
|
return;
|
|
88627
|
-
const appRequire = (0,
|
|
88531
|
+
const appRequire = (0, import_node_module18.createRequire)(manifestPath);
|
|
88628
88532
|
const namespacesSeen = new Set(units.map((unit2) => unit2.namespace));
|
|
88629
88533
|
for (const packageName of Object.keys(dependencies).sort()) {
|
|
88630
88534
|
signal?.throwIfAborted();
|
|
@@ -88718,12 +88622,12 @@ public func ${register}() -> RCTModuleHost.Registration {
|
|
|
88718
88622
|
}
|
|
88719
88623
|
}
|
|
88720
88624
|
}
|
|
88721
|
-
var import_node_fs116,
|
|
88625
|
+
var import_node_fs116, import_node_module18, import_node_path116, DIRECTIVE2, swiftString, BRIDGE_MODULE_FILE_PREFIX;
|
|
88722
88626
|
var init_react_native_bridge_modules = __esm({
|
|
88723
88627
|
"src/react-native-bridge-modules.ts"() {
|
|
88724
88628
|
"use strict";
|
|
88725
88629
|
import_node_fs116 = __toESM(require("node:fs"), 1);
|
|
88726
|
-
|
|
88630
|
+
import_node_module18 = require("node:module");
|
|
88727
88631
|
import_node_path116 = __toESM(require("node:path"), 1);
|
|
88728
88632
|
init_answeredNativePackages();
|
|
88729
88633
|
init_swift_compile();
|
|
@@ -89290,7 +89194,7 @@ function enrichInstalledUnits(units, installed, namespaceGroups, provided, modul
|
|
|
89290
89194
|
const byPath = [...installedTargets].sort((a, b) => b.path.length - a.path.length);
|
|
89291
89195
|
const reactNativeRoot = import_node_fs118.default.realpathSync(
|
|
89292
89196
|
import_node_path118.default.dirname(
|
|
89293
|
-
(0,
|
|
89197
|
+
(0, import_node_module19.createRequire)(import_node_path118.default.join(appRoot, "package.json")).resolve(
|
|
89294
89198
|
"react-native/package.json"
|
|
89295
89199
|
)
|
|
89296
89200
|
)
|
|
@@ -89728,7 +89632,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
89728
89632
|
signal?.throwIfAborted();
|
|
89729
89633
|
appRoot = import_node_fs118.default.realpathSync(appRoot);
|
|
89730
89634
|
const appConfig = await loadRNXAppConfig(resolveAppProject(appRoot));
|
|
89731
|
-
const appRequire = (0,
|
|
89635
|
+
const appRequire = (0, import_node_module19.createRequire)(import_node_path118.default.join(appRoot, "package.json"));
|
|
89732
89636
|
let expoRoot;
|
|
89733
89637
|
try {
|
|
89734
89638
|
expoRoot = import_node_path118.default.dirname(appRequire.resolve("expo/package.json"));
|
|
@@ -90856,7 +90760,7 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
90856
90760
|
const reactProvider = units.some((unit2) => unit2.reactNativeProvider) ? await (async () => {
|
|
90857
90761
|
const projectRoot = options.installedWorkspace ? import_node_path118.default.dirname(import_node_path118.default.dirname(options.installedWorkspace)) : (await prepareExpoNativeWorkspace(root, signal, options.iosTarget)).app;
|
|
90858
90762
|
const reactNativeRoot = import_node_path118.default.dirname(
|
|
90859
|
-
(0,
|
|
90763
|
+
(0, import_node_module19.createRequire)(import_node_path118.default.join(projectRoot, "package.json")).resolve(
|
|
90860
90764
|
"react-native/package.json"
|
|
90861
90765
|
)
|
|
90862
90766
|
);
|
|
@@ -91225,7 +91129,7 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
91225
91129
|
throw failure2;
|
|
91226
91130
|
}
|
|
91227
91131
|
}
|
|
91228
|
-
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;
|
|
91229
91133
|
var init_expo_swift_host = __esm({
|
|
91230
91134
|
"src/expo-swift-host.ts"() {
|
|
91231
91135
|
"use strict";
|
|
@@ -91233,7 +91137,7 @@ var init_expo_swift_host = __esm({
|
|
|
91233
91137
|
import_node_child_process53 = require("node:child_process");
|
|
91234
91138
|
import_node_crypto68 = require("node:crypto");
|
|
91235
91139
|
import_node_fs118 = __toESM(require("node:fs"), 1);
|
|
91236
|
-
|
|
91140
|
+
import_node_module19 = require("node:module");
|
|
91237
91141
|
import_node_os25 = __toESM(require("node:os"), 1);
|
|
91238
91142
|
import_node_path118 = __toESM(require("node:path"), 1);
|
|
91239
91143
|
import_node_url4 = require("node:url");
|
|
@@ -91375,7 +91279,7 @@ async function compileTurboApp(appRoot, origin, moduleRoot, iosTarget, prepareRe
|
|
|
91375
91279
|
const { artifact, collection } = await compileTurboModule({
|
|
91376
91280
|
appRoot,
|
|
91377
91281
|
reactNativeRoot: import_node_path119.default.dirname(
|
|
91378
|
-
(0,
|
|
91282
|
+
(0, import_node_module20.createRequire)(import_node_path119.default.join(projectRoot, "package.json")).resolve(
|
|
91379
91283
|
"react-native/package.json"
|
|
91380
91284
|
)
|
|
91381
91285
|
),
|
|
@@ -91413,11 +91317,11 @@ async function buildTurboBundle(appRoot, moduleRoot, prepareReactNativeCore) {
|
|
|
91413
91317
|
assets: compiled.artifact ? await compiledModuleAssets(compiled.artifact) : []
|
|
91414
91318
|
};
|
|
91415
91319
|
}
|
|
91416
|
-
var
|
|
91320
|
+
var import_node_module20, import_node_path119, TURBO_ROUTE, handleTurboRequest;
|
|
91417
91321
|
var init_turbo_bundle = __esm({
|
|
91418
91322
|
"src/turbo-bundle.ts"() {
|
|
91419
91323
|
"use strict";
|
|
91420
|
-
|
|
91324
|
+
import_node_module20 = require("node:module");
|
|
91421
91325
|
import_node_path119 = __toESM(require("node:path"), 1);
|
|
91422
91326
|
init_app_project();
|
|
91423
91327
|
init_app_config();
|
|
@@ -91463,7 +91367,7 @@ async function resolveExpoAndroidAutolinking(appRoot) {
|
|
|
91463
91367
|
async function resolveAndroidModules(appRoot) {
|
|
91464
91368
|
let autolinker;
|
|
91465
91369
|
try {
|
|
91466
|
-
autolinker = (0,
|
|
91370
|
+
autolinker = (0, import_node_module21.createRequire)(import_node_path120.default.join(appRoot, "package.json")).resolve(
|
|
91467
91371
|
"expo-modules-autolinking/package.json"
|
|
91468
91372
|
);
|
|
91469
91373
|
} catch (error) {
|
|
@@ -91517,12 +91421,12 @@ async function resolveReactNativeAndroidAutolinking(appRoot) {
|
|
|
91517
91421
|
}
|
|
91518
91422
|
return linked;
|
|
91519
91423
|
}
|
|
91520
|
-
var import_node_fs119,
|
|
91424
|
+
var import_node_fs119, import_node_module21, import_node_path120, resolving;
|
|
91521
91425
|
var init_android_autolinking = __esm({
|
|
91522
91426
|
"src/android-autolinking.ts"() {
|
|
91523
91427
|
"use strict";
|
|
91524
91428
|
import_node_fs119 = __toESM(require("node:fs"), 1);
|
|
91525
|
-
|
|
91429
|
+
import_node_module21 = require("node:module");
|
|
91526
91430
|
import_node_path120 = __toESM(require("node:path"), 1);
|
|
91527
91431
|
init_androidAutolinkingContract();
|
|
91528
91432
|
init_autolinker_process();
|
|
@@ -92347,7 +92251,7 @@ function bindingNames(pattern) {
|
|
|
92347
92251
|
throw new Error(`unsupported Kotlin export binding ${pattern.type}`);
|
|
92348
92252
|
}
|
|
92349
92253
|
function kotlinInstanceSource(source, factory, instanceImports = /* @__PURE__ */ new Map()) {
|
|
92350
|
-
const program = (0,
|
|
92254
|
+
const program = (0, import_acorn3.parse)(source, { ecmaVersion: "latest", sourceType: "module" });
|
|
92351
92255
|
const imports2 = [];
|
|
92352
92256
|
const body = [];
|
|
92353
92257
|
let dependencies = 0;
|
|
@@ -92437,11 +92341,11 @@ return { peachDisposeInstance, ${exports3.map((item) => `${JSON.stringify(item.e
|
|
|
92437
92341
|
exports: exports3
|
|
92438
92342
|
};
|
|
92439
92343
|
}
|
|
92440
|
-
var
|
|
92344
|
+
var import_acorn3;
|
|
92441
92345
|
var init_kotlin_instance_source = __esm({
|
|
92442
92346
|
"src/kotlin-instance-source.ts"() {
|
|
92443
92347
|
"use strict";
|
|
92444
|
-
|
|
92348
|
+
import_acorn3 = require("peachsim/vendor/acorn");
|
|
92445
92349
|
}
|
|
92446
92350
|
});
|
|
92447
92351
|
|
|
@@ -92557,7 +92461,7 @@ function loadKotlinSdk(moduleRoot, toolchain) {
|
|
|
92557
92461
|
}
|
|
92558
92462
|
function appKotlinLanguage(root) {
|
|
92559
92463
|
const reactNative = import_node_path127.default.dirname(
|
|
92560
|
-
(0,
|
|
92464
|
+
(0, import_node_module22.createRequire)(import_node_path127.default.join(root, "package.json")).resolve("react-native/package.json")
|
|
92561
92465
|
);
|
|
92562
92466
|
const versions = import_node_fs126.default.readFileSync(
|
|
92563
92467
|
import_node_path127.default.join(reactNative, "gradle", "libs.versions.toml"),
|
|
@@ -92731,7 +92635,7 @@ function readExpoTypes(output) {
|
|
|
92731
92635
|
};
|
|
92732
92636
|
});
|
|
92733
92637
|
}
|
|
92734
|
-
async function scanSources(tool,
|
|
92638
|
+
async function scanSources(tool, parse13, toolchain, moduleRoot, files2) {
|
|
92735
92639
|
const digest3 = (0, import_node_crypto73.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
|
|
92736
92640
|
const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
|
|
92737
92641
|
digest3.update(import_node_fs126.default.readFileSync(import_node_path127.default.join(moduleRoot, "sdk.tar.gz")));
|
|
@@ -92746,7 +92650,7 @@ async function scanSources(tool, parse11, toolchain, moduleRoot, files2) {
|
|
|
92746
92650
|
});
|
|
92747
92651
|
toolScans.set(key2, scan3);
|
|
92748
92652
|
}
|
|
92749
|
-
return
|
|
92653
|
+
return parse13(await scan3);
|
|
92750
92654
|
}
|
|
92751
92655
|
async function scanExpoTypes(toolchain, moduleRoot, sources) {
|
|
92752
92656
|
const candidates = sources.filter(
|
|
@@ -93536,7 +93440,7 @@ async function compileKotlin(input, origin) {
|
|
|
93536
93440
|
import_node_path127.default.join(work, "js")
|
|
93537
93441
|
]);
|
|
93538
93442
|
const skikoPath = import_node_path127.default.join(work, "js", "skiko.mjs");
|
|
93539
|
-
const upstream = (0,
|
|
93443
|
+
const upstream = (0, import_acorn4.parse)(import_node_fs126.default.readFileSync(skikoPath, "utf8"), {
|
|
93540
93444
|
ecmaVersion: "latest",
|
|
93541
93445
|
sourceType: "module"
|
|
93542
93446
|
});
|
|
@@ -93732,17 +93636,17 @@ async function serveKotlinRequest(pathname, res, app) {
|
|
|
93732
93636
|
}
|
|
93733
93637
|
return true;
|
|
93734
93638
|
}
|
|
93735
|
-
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;
|
|
93736
93640
|
var init_kotlin_host = __esm({
|
|
93737
93641
|
"src/kotlin-host.ts"() {
|
|
93738
93642
|
"use strict";
|
|
93739
93643
|
import_node_child_process57 = require("node:child_process");
|
|
93740
93644
|
import_node_crypto73 = require("node:crypto");
|
|
93741
93645
|
import_node_fs126 = __toESM(require("node:fs"), 1);
|
|
93742
|
-
|
|
93646
|
+
import_node_module22 = require("node:module");
|
|
93743
93647
|
import_node_path127 = __toESM(require("node:path"), 1);
|
|
93744
93648
|
import_node_util17 = require("node:util");
|
|
93745
|
-
|
|
93649
|
+
import_acorn4 = require("peachsim/vendor/acorn");
|
|
93746
93650
|
init_android_bridge_packages();
|
|
93747
93651
|
init_android_view_classes();
|
|
93748
93652
|
init_is_record();
|
|
@@ -94492,7 +94396,7 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
94492
94396
|
runtimePackages,
|
|
94493
94397
|
localModuleUrl: (specifier) => visit3(resolveReplacementModuleFile(real, specifier))
|
|
94494
94398
|
});
|
|
94495
|
-
const commonJs = (0,
|
|
94399
|
+
const commonJs = (0, import_sucrase5.transform)(splitExportDeclarators(compiled.code), {
|
|
94496
94400
|
transforms: ["imports"]
|
|
94497
94401
|
}).code;
|
|
94498
94402
|
for (const specifier of compiled.bareSpecifiers) neededPackages.add(specifier);
|
|
@@ -94536,14 +94440,14 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
94536
94440
|
const identityStart = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
|
|
94537
94441
|
return prefix + (identityStart < 0 ? source + footer : source.slice(0, identityStart) + footer + source.slice(identityStart));
|
|
94538
94442
|
}
|
|
94539
|
-
var import_node_fs132, import_node_path134,
|
|
94443
|
+
var import_node_fs132, import_node_path134, import_sucrase5, import_terser, PREFIX_START, PREFIX_END;
|
|
94540
94444
|
var init_configured_bundle_producer = __esm({
|
|
94541
94445
|
"src/configured-bundle-producer.ts"() {
|
|
94542
94446
|
"use strict";
|
|
94543
94447
|
import_node_fs132 = __toESM(require("node:fs"), 1);
|
|
94544
94448
|
import_node_path134 = __toESM(require("node:path"), 1);
|
|
94545
94449
|
init_bundle_global_footer();
|
|
94546
|
-
|
|
94450
|
+
import_sucrase5 = require("peachsim/vendor/sucrase");
|
|
94547
94451
|
import_terser = require("peachsim/vendor/terser");
|
|
94548
94452
|
init_dependencies();
|
|
94549
94453
|
init_replacementModule();
|
|
@@ -98404,9 +98308,10 @@ init_is_record();
|
|
|
98404
98308
|
// src/one-native-app-config.ts
|
|
98405
98309
|
var import_node_fs129 = __toESM(require("node:fs"), 1);
|
|
98406
98310
|
var import_node_path130 = __toESM(require("node:path"), 1);
|
|
98407
|
-
var
|
|
98311
|
+
var import_acorn5 = require("peachsim/vendor/acorn");
|
|
98312
|
+
var import_sucrase4 = require("peachsim/vendor/sucrase");
|
|
98313
|
+
init_estree_walk();
|
|
98408
98314
|
init_is_record();
|
|
98409
|
-
init_visit_parsed_program();
|
|
98410
98315
|
var CONFIG_FILES = [
|
|
98411
98316
|
"vite.config.ts",
|
|
98412
98317
|
"vite.config.mts",
|
|
@@ -98433,10 +98338,6 @@ function staticValue(node) {
|
|
|
98433
98338
|
return typeof value === "number" ? -value : NOT_STATIC;
|
|
98434
98339
|
}
|
|
98435
98340
|
return NOT_STATIC;
|
|
98436
|
-
case "TSAsExpression":
|
|
98437
|
-
case "TSSatisfiesExpression":
|
|
98438
|
-
case "ParenthesizedExpression":
|
|
98439
|
-
return staticValue(node.expression);
|
|
98440
98341
|
case "ArrayExpression": {
|
|
98441
98342
|
const items2 = [];
|
|
98442
98343
|
for (const element of node.elements) {
|
|
@@ -98468,16 +98369,18 @@ function staticObject(node) {
|
|
|
98468
98369
|
function readOneNativeApp(root) {
|
|
98469
98370
|
const file = oneConfigPath(root);
|
|
98470
98371
|
if (!file) return null;
|
|
98471
|
-
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
|
+
});
|
|
98472
98376
|
let app = null;
|
|
98473
|
-
|
|
98474
|
-
|
|
98475
|
-
|
|
98476
|
-
|
|
98477
|
-
|
|
98478
|
-
|
|
98479
|
-
|
|
98480
|
-
}
|
|
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;
|
|
98481
98384
|
});
|
|
98482
98385
|
return app;
|
|
98483
98386
|
}
|
|
@@ -98527,18 +98430,19 @@ function readAssetCatalog(files2, readContents2, imageUri, accentName) {
|
|
|
98527
98430
|
const colors = enumerateBundleColors(files2, readContents2);
|
|
98528
98431
|
const symbols = enumerateBundleSymbols(files2, readContents2, () => ".");
|
|
98529
98432
|
const images = {};
|
|
98530
|
-
for (const { name: name3, file, scale, renderingMode } of enumerateBundleImages(
|
|
98433
|
+
for (const { name: name3, file, scale, renderingMode, fileNames } of enumerateBundleImages(
|
|
98531
98434
|
files2,
|
|
98532
98435
|
readContents2
|
|
98533
98436
|
)) {
|
|
98534
98437
|
const uri = imageUri(file);
|
|
98535
|
-
if (uri
|
|
98536
|
-
|
|
98537
|
-
|
|
98538
|
-
|
|
98539
|
-
|
|
98540
|
-
|
|
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
|
+
}
|
|
98541
98444
|
}
|
|
98445
|
+
for (const variants of Object.values(images)) variants.sort((a, b) => a.scale - b.scale);
|
|
98542
98446
|
if (accentName === null && Object.keys(colors).length === 0 && Object.keys(images).length === 0 && Object.keys(symbols).length === 0)
|
|
98543
98447
|
return null;
|
|
98544
98448
|
return { colors, images, symbols, accentName };
|
|
@@ -99039,8 +98943,8 @@ async function snapshotOneProductionBundle(projectRoot, entryFile, env = {}, { r
|
|
|
99039
98943
|
async function snapshotOneDevBundle(projectRoot, env = {}, { runtimeExecutable = process.execPath, platforms: platforms2 = ["ios", "android"] } = {}) {
|
|
99040
98944
|
const { spawn: spawn12 } = await import("node:child_process");
|
|
99041
98945
|
const { createServer: createServer2 } = await import("node:net");
|
|
99042
|
-
const { createRequire:
|
|
99043
|
-
const onePackage =
|
|
98946
|
+
const { createRequire: createRequire23 } = await import("node:module");
|
|
98947
|
+
const onePackage = createRequire23((0, import_node_path135.join)(projectRoot, "package.json")).resolve(
|
|
99044
98948
|
"one/package.json"
|
|
99045
98949
|
);
|
|
99046
98950
|
const oneBin = (0, import_node_path135.join)(
|