sootsim 0.1.299 → 0.1.301
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-3UVOB3T3.js → agent-DWXNDXDJ.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-XVOWC72E.js → agent-wrapper-DTPQFEMR.js} +2 -2
- package/dist-cli/chunks/{app-fonts-C222PFAQ.js → app-fonts-MKW6UNBO.js} +2 -2
- package/dist-cli/chunks/{assert-2MHAZDEL.js → assert-GN4KR5TI.js} +2 -2
- package/dist-cli/chunks/{auth-7DTOEHC2.js → auth-HLOV4GZN.js} +2 -2
- package/dist-cli/chunks/{beta-WOHZHXPE.js → beta-DP7K4JVJ.js} +2 -2
- package/dist-cli/chunks/{camera-XCUE5ZNM.js → camera-SH6FT7ZA.js} +2 -2
- package/dist-cli/chunks/{chunk-FLTBPGAQ.js → chunk-3XC55LRK.js} +2 -2
- package/dist-cli/chunks/{chunk-XMOYKSSM.js → chunk-4FCN3KOD.js} +2 -2
- package/dist-cli/chunks/{chunk-2FTQEDJC.js → chunk-4MNKKMYG.js} +2 -2
- package/dist-cli/chunks/{chunk-ZEXLS32P.js → chunk-4OZG2LQA.js} +3 -3
- package/dist-cli/chunks/{chunk-WCAT3UC4.js → chunk-4PKUB2QX.js} +2 -2
- package/dist-cli/chunks/{chunk-VR4ZUUA4.js → chunk-6MFFAN7Q.js} +1 -1
- package/dist-cli/chunks/{chunk-ONQYJYUM.js → chunk-77CFHIGG.js} +1 -1
- package/dist-cli/chunks/{chunk-6RH6PEO3.js → chunk-7LULF3D2.js} +1 -1
- package/dist-cli/chunks/{chunk-E2XMG2HC.js → chunk-7RU45W2O.js} +1 -1
- package/dist-cli/chunks/{chunk-ITSHLH5U.js → chunk-BGY7U4IH.js} +2 -2
- package/dist-cli/chunks/{chunk-MKIABOQK.js → chunk-DNH4ZWVK.js} +2 -2
- package/dist-cli/chunks/{chunk-L7GNKY3A.js → chunk-EKNSKDBI.js} +1 -1
- package/dist-cli/chunks/{chunk-PHBVCGV3.js → chunk-EODC7ZE7.js} +2 -2
- package/dist-cli/chunks/{chunk-WMLVFFXE.js → chunk-FVNWUEK2.js} +3 -3
- package/dist-cli/chunks/{chunk-JXHCBXUD.js → chunk-HEPIUAFX.js} +3 -3
- package/dist-cli/chunks/{chunk-FMQ772D7.js → chunk-IRNRCBRW.js} +1 -1
- package/dist-cli/chunks/{chunk-I4NK5VBB.js → chunk-J22XZAGG.js} +2 -2
- package/dist-cli/chunks/{chunk-DGWM3X4S.js → chunk-JDQ5AJJ4.js} +2 -2
- package/dist-cli/chunks/{chunk-23JBOG4P.js → chunk-KEFBMDYK.js} +1 -1
- package/dist-cli/chunks/{chunk-YEE3MKPH.js → chunk-KYGB26L4.js} +2 -2
- package/dist-cli/chunks/{chunk-Q34734UC.js → chunk-LE6JWEXU.js} +1 -1
- package/dist-cli/chunks/{chunk-QMDKE3C6.js → chunk-M33LQWC2.js} +1 -1
- package/dist-cli/chunks/{chunk-5GRQIA5R.js → chunk-MFLCDFRS.js} +2 -2
- package/dist-cli/chunks/{chunk-ZRDU2ENE.js → chunk-MKQNHDDF.js} +2 -2
- package/dist-cli/chunks/{chunk-QPPG5YZS.js → chunk-MPDBF324.js} +2 -2
- package/dist-cli/chunks/{chunk-ALOQJP4C.js → chunk-NEKVW4FE.js} +2 -2
- package/dist-cli/chunks/{chunk-MTOADQY2.js → chunk-NR2G2PSN.js} +2 -2
- package/dist-cli/chunks/{chunk-L3FA7WE5.js → chunk-NWM62KI3.js} +2 -2
- package/dist-cli/chunks/{chunk-KJQJ5VPA.js → chunk-OVEH5OOR.js} +1 -1
- package/dist-cli/chunks/{chunk-RWXJ6OS4.js → chunk-P2HUPEXS.js} +2 -2
- package/dist-cli/chunks/{chunk-LEHK72DK.js → chunk-PPD77GEP.js} +2 -2
- package/dist-cli/chunks/{chunk-MSYFSZKB.js → chunk-Q4ZLYMUP.js} +1 -1
- package/dist-cli/chunks/{chunk-WM4RNTPN.js → chunk-QNQP3WYV.js} +3 -3
- package/dist-cli/chunks/{chunk-UNFMIX7B.js → chunk-RCH5EVVP.js} +1 -1
- package/dist-cli/chunks/{chunk-444BQYY3.js → chunk-RW75MMQZ.js} +2 -2
- package/dist-cli/chunks/chunk-SDBIR5ON.js +4 -0
- package/dist-cli/chunks/{chunk-5VX2Y3ZB.js → chunk-SOBEJUH4.js} +2 -2
- package/dist-cli/chunks/{chunk-LFWATDB3.js → chunk-STF4UH5I.js} +2 -2
- package/dist-cli/chunks/{chunk-EJC4A2ZH.js → chunk-TABUERS3.js} +1 -1
- package/dist-cli/chunks/{chunk-DUGY7KHN.js → chunk-UK7X4OX3.js} +1 -1
- package/dist-cli/chunks/{chunk-G377NNEV.js → chunk-V2SZPQJF.js} +1 -1
- package/dist-cli/chunks/chunk-VXRYV6G6.js +4 -0
- package/dist-cli/chunks/{chunk-37ACY2R3.js → chunk-WE74HC52.js} +2 -2
- package/dist-cli/chunks/{chunk-CBRE6JLP.js → chunk-WKSX2VHB.js} +1 -1
- package/dist-cli/chunks/{chunk-B6TCNXJO.js → chunk-Y4EES4A2.js} +2 -2
- package/dist-cli/chunks/{chunk-HM42NCGX.js → chunk-YIBVYNHV.js} +1 -1
- package/dist-cli/chunks/{chunk-F57XAX5N.js → chunk-YOLPZLST.js} +1 -1
- package/dist-cli/chunks/{chunk-W3H6FBWV.js → chunk-YTUW6DGN.js} +2 -2
- package/dist-cli/chunks/{chunk-4TYUHNHI.js → chunk-YXRD4B4X.js} +2 -2
- package/dist-cli/chunks/{cleanup-O6SD44HN.js → cleanup-DIDGDPIX.js} +2 -2
- package/dist-cli/chunks/{cli-version-PIYRRI52.js → cli-version-K3UX3EWQ.js} +2 -2
- package/dist-cli/chunks/{compat-AWJLEWTH.js → compat-CU5BZOTA.js} +2 -2
- package/dist-cli/chunks/{config-6PLYOSBK.js → config-ZDPMF7NT.js} +2 -2
- package/dist-cli/chunks/{control-K4QMNPXN.js → control-PKNXORO3.js} +2 -2
- package/dist-cli/chunks/daemon-OXELSM3C.js +4 -0
- package/dist-cli/chunks/{debug-YCJCLH35.js → debug-FRVAHAUX.js} +3 -3
- package/dist-cli/chunks/{desktop-NRUWYSTV.js → desktop-RM4LA63P.js} +3 -3
- package/dist-cli/chunks/{detox-XTERPTZN.js → detox-XXPJIQFG.js} +2 -2
- package/dist-cli/chunks/{device-G4KJITB6.js → device-5CWUNYYM.js} +2 -2
- package/dist-cli/chunks/{diagnose-CKZOV5PL.js → diagnose-7WHQUJOH.js} +2 -2
- package/dist-cli/chunks/disk-cleanup-EGAZA7DS.js +4 -0
- package/dist-cli/chunks/drivers-JEAO6IWD.js +4 -0
- package/dist-cli/chunks/{film-4T3QY3VT.js → film-EEAFWERR.js} +3 -3
- package/dist-cli/chunks/flow-DMSEJ526.js +4 -0
- package/dist-cli/chunks/help-BTYQFHMT.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-S2PPAYI3.js → hidden-runtime-alias-GEDAK5VD.js} +2 -2
- package/dist-cli/chunks/{home-paths-MUZXK2LA.js → home-paths-PE4236U4.js} +2 -2
- package/dist-cli/chunks/inspect-RKOCZZ2A.js +4 -0
- package/dist-cli/chunks/install-desktop-25G42KWB.js +4 -0
- package/dist-cli/chunks/{login-RH2KRRBQ.js → login-NBG6XEI2.js} +4 -4
- package/dist-cli/chunks/{logout-GIEQBBFN.js → logout-TLDRLFXP.js} +2 -2
- package/dist-cli/chunks/{maestro-JEAOFJLT.js → maestro-DHRICU2K.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-GAYZAFOV.js → maestro-generate-QZAGYXXJ.js} +3 -3
- package/dist-cli/chunks/{mode-V2OWWT7B.js → mode-XOMKPZZG.js} +2 -2
- package/dist-cli/chunks/{optional-demo-registry-CZSJJFLR.js → optional-demo-registry-L66RRINW.js} +2 -2
- package/dist-cli/chunks/{perf-SNBPEVZL.js → perf-GSKQKH3W.js} +2 -2
- package/dist-cli/chunks/{permissions-MKMHM34X.js → permissions-D4XQ4HBT.js} +2 -2
- package/dist-cli/chunks/{record-55URP7AI.js → record-QTA3IWSU.js} +3 -3
- package/dist-cli/chunks/{report-issue-I4JZBUDD.js → report-issue-BVPBXZEM.js} +2 -2
- package/dist-cli/chunks/runtime-UQY75DPC.js +4 -0
- package/dist-cli/chunks/{screenshot-command-YGBR4Y2V.js → screenshot-command-YWDQBPE6.js} +3 -3
- package/dist-cli/chunks/{screenshots-capture-S5CP6OWZ.js → screenshots-capture-NUVPCCYY.js} +2 -2
- package/dist-cli/chunks/{serve-45NQNA7C.js → serve-FR5M2RRQ.js} +2 -2
- package/dist-cli/chunks/{setup-HKTRNWH6.js → setup-O4WMVQVP.js} +2 -2
- package/dist-cli/chunks/{skills-HUDGHVRT.js → skills-RUYLHJED.js} +2 -2
- package/dist-cli/chunks/{storage-HOYYA2PS.js → storage-OCCDGKMN.js} +2 -2
- package/dist-cli/chunks/store-56RG4ZWJ.js +4 -0
- package/dist-cli/chunks/telemetry-YSUNFE7N.js +4 -0
- package/dist-cli/chunks/{timeline-2S3FS3AA.js → timeline-QWPHBXJ2.js} +2 -2
- package/dist-cli/chunks/{upgrade-KZSYVT3E.js → upgrade-WUQAUREZ.js} +2 -2
- package/dist-cli/chunks/upload-D5BXJTXK.js +4 -0
- package/dist-cli/chunks/{version-BWNEYFPL.js → version-TCSZK3WH.js} +2 -2
- package/dist-cli/chunks/{web-DXSNL2J6.js → web-7P7SQTFS.js} +2 -2
- package/dist-cli/chunks/{what-happened-VT4FO7XN.js → what-happened-KIUBAPFB.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.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 +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.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 +1 -1
- package/dist-lib/skills.cjs +304 -299
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/vite-plugin.ts +29 -9
- package/dist-cli/chunks/chunk-HVQA443X.js +0 -4
- package/dist-cli/chunks/chunk-IGKB2HLF.js +0 -4
- package/dist-cli/chunks/daemon-HG6LHW3O.js +0 -4
- package/dist-cli/chunks/disk-cleanup-LX6FRBNM.js +0 -4
- package/dist-cli/chunks/drivers-X6XG4AX4.js +0 -4
- package/dist-cli/chunks/flow-EQPPW77J.js +0 -4
- package/dist-cli/chunks/help-IRKWFF27.js +0 -4
- package/dist-cli/chunks/inspect-VGNST6ZA.js +0 -4
- package/dist-cli/chunks/install-desktop-5H7A5R3Z.js +0 -4
- package/dist-cli/chunks/runtime-XHMSVSWG.js +0 -4
- package/dist-cli/chunks/store-7QB3V42F.js +0 -4
- package/dist-cli/chunks/telemetry-HYW35ACO.js +0 -4
- package/dist-cli/chunks/upload-P3CQI4RQ.js +0 -4
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.301 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/package.json
CHANGED
package/src/vite-plugin.ts
CHANGED
|
@@ -225,26 +225,32 @@ const expoUiJetpackComposeRealAliases = [
|
|
|
225
225
|
}
|
|
226
226
|
})
|
|
227
227
|
|
|
228
|
-
// `react-native-gesture-handler/ReanimatedSwipeable`
|
|
229
|
-
// should load from the installed package. The root RNGH
|
|
230
|
-
// SootSim's native seam, so add
|
|
231
|
-
// rewrite
|
|
232
|
-
|
|
228
|
+
// `react-native-gesture-handler/ReanimatedSwipeable` and `.../DrawerLayout` are
|
|
229
|
+
// upstream pure JS and should load from the installed package. The root RNGH
|
|
230
|
+
// package still aliases to SootSim's native seam, so add exact subpath aliases
|
|
231
|
+
// before the root stub can rewrite them to
|
|
232
|
+
// `<stubs>/react-native-gesture-handler.ts/<subpath>`.
|
|
233
|
+
function rnghSubpathRealPath(subpath: string): string | null {
|
|
233
234
|
try {
|
|
234
235
|
const packageJsonPath = sootsimPluginRequire.resolve(
|
|
235
|
-
|
|
236
|
+
`react-native-gesture-handler/${subpath}/package.json`,
|
|
236
237
|
)
|
|
237
238
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
|
|
238
239
|
const moduleEntry = packageJson?.module
|
|
239
240
|
if (typeof moduleEntry !== 'string' || moduleEntry.length === 0) return null
|
|
240
241
|
const modulePath = path.resolve(path.dirname(packageJsonPath), moduleEntry)
|
|
241
242
|
if (fs.existsSync(modulePath) && fs.statSync(modulePath).isFile()) return modulePath
|
|
243
|
+
const jsPath = `${modulePath}.js`
|
|
244
|
+
if (fs.existsSync(jsPath)) return jsPath
|
|
242
245
|
const indexPath = path.join(modulePath, 'index.js')
|
|
243
246
|
return fs.existsSync(indexPath) ? indexPath : null
|
|
244
247
|
} catch {
|
|
245
248
|
return null
|
|
246
249
|
}
|
|
247
|
-
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
const rnghReanimatedSwipeableRealPath = rnghSubpathRealPath('ReanimatedSwipeable')
|
|
253
|
+
const rnghDrawerLayoutRealPath = rnghSubpathRealPath('DrawerLayout')
|
|
248
254
|
|
|
249
255
|
const rnghGestureHandlerRootViewContextRealPath = (() => {
|
|
250
256
|
try {
|
|
@@ -402,7 +408,7 @@ function rnghUpstreamInternalResolvePlugin(): Plugin {
|
|
|
402
408
|
enforce: 'pre',
|
|
403
409
|
resolveId: {
|
|
404
410
|
filter: {
|
|
405
|
-
id: /(?:^\.\.\/\.\.(?:\.(?:js|jsx|mjs|ts|tsx))?$|GestureDetector(?:\.(?:js|jsx|mjs|ts|tsx))?$|GestureHandlerRootViewContext(?:\.(?:js|jsx|mjs|ts|tsx))?$)/,
|
|
411
|
+
id: /(?:^\.\.\/\.\.(?:\.(?:js|jsx|mjs|ts|tsx))?$|GestureDetector(?:\.(?:js|jsx|mjs|ts|tsx))?$|GestureHandlerRootViewContext(?:\.(?:js|jsx|mjs|ts|tsx))?$|(?:PanGestureHandler|TapGestureHandler|State)(?:\.(?:js|jsx|mjs|ts|tsx))?$)/,
|
|
406
412
|
},
|
|
407
413
|
handler(source, importer) {
|
|
408
414
|
if (!importer || !rnghLibModuleRoot) return null
|
|
@@ -411,7 +417,12 @@ function rnghUpstreamInternalResolvePlugin(): Plugin {
|
|
|
411
417
|
const sourcePath = source.replace(/\.(js|jsx|mjs|ts|tsx)$/, '')
|
|
412
418
|
if (
|
|
413
419
|
sourcePath === '../..' ||
|
|
414
|
-
sourcePath.endsWith('/handlers/gestures/GestureDetector')
|
|
420
|
+
sourcePath.endsWith('/handlers/gestures/GestureDetector') ||
|
|
421
|
+
// upstream's DrawerLayout builds on the old-API handlers and the
|
|
422
|
+
// State enum; both come from our seam, not upstream's native modules.
|
|
423
|
+
sourcePath.endsWith('/handlers/PanGestureHandler') ||
|
|
424
|
+
sourcePath.endsWith('/handlers/TapGestureHandler') ||
|
|
425
|
+
sourcePath === '../State'
|
|
415
426
|
) {
|
|
416
427
|
return rnghRootStubPath
|
|
417
428
|
}
|
|
@@ -453,6 +464,7 @@ export function engineShellWorkerPlugins(): Plugin[] {
|
|
|
453
464
|
reanimatedNativeSeamRedirect(),
|
|
454
465
|
manifestNativeSeamRedirect(),
|
|
455
466
|
keyboardControllerBindingsRedirect(),
|
|
467
|
+
rnghUpstreamInternalResolvePlugin(),
|
|
456
468
|
workletsBabelTransform(() => true),
|
|
457
469
|
]
|
|
458
470
|
}
|
|
@@ -1035,6 +1047,14 @@ function sootsimConfigPlugin(
|
|
|
1035
1047
|
},
|
|
1036
1048
|
]
|
|
1037
1049
|
: []),
|
|
1050
|
+
...(rnghDrawerLayoutRealPath
|
|
1051
|
+
? [
|
|
1052
|
+
{
|
|
1053
|
+
find: /^react-native-gesture-handler\/DrawerLayout$/,
|
|
1054
|
+
replacement: rnghDrawerLayoutRealPath,
|
|
1055
|
+
},
|
|
1056
|
+
]
|
|
1057
|
+
: []),
|
|
1038
1058
|
...stubAliases,
|
|
1039
1059
|
],
|
|
1040
1060
|
},
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.299 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import g from"node:fs";import l from"node:path";var k=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"],b=["sootsim.config.ts","sootsim.config.js","sootsim.config.mjs","sootsim.config.cjs"],D=new Set(["node_modules","artifacts","dist","build","out","coverage","tmp","public","ios","android","macos","windows","__fixtures__","__tests__","fixtures","fixture","examples","example"]),d=256,A=4,y=50;function _(o,c){for(let t of c){let n=l.join(o,t);try{if(g.statSync(n).isFile())return n}catch{}}return null}function S(o){return _(o,k)}function m(o){return _(o,b)}function j(o){try{let c=JSON.parse(g.readFileSync(l.join(o,"package.json"),"utf8"));if(!c||typeof c!="object")return[];let t=Reflect.get(c,"workspaces");if(Array.isArray(t))return t.filter(s=>typeof s=="string");if(!t||typeof t!="object")return[];let n=Reflect.get(t,"packages");return Array.isArray(n)?n.filter(s=>typeof s=="string"):[]}catch{return[]}}function w(o){let c=Date.now(),t=new Set,n=0,s=!0;for(let a of j(o)){if(n>=d||Date.now()-c>=y){s=!1;break}if(!a||l.isAbsolute(a))continue;let f=a.split(/[\\/]+/).filter(Boolean);if(f.length===0||f.length>A||f.some(e=>e===".."||e==="**"))continue;let r=[o];for(let e of f){let i=[];for(let u of r){if(n>=d||Date.now()-c>=y){s=!1;break}if(n++,e==="*"){let h;try{h=g.readdirSync(u,{withFileTypes:!0})}catch{continue}for(let p of h)!p.isDirectory()||p.isSymbolicLink()||p.name.startsWith(".")||D.has(p.name)||i.push(l.join(u,p.name))}else if(!e.includes("*")){let h=l.join(u,e);try{let p=g.lstatSync(h);p.isDirectory()&&!p.isSymbolicLink()&&i.push(h)}catch{}}}r=i,r.length>d&&(r.length=d,s=!1)}for(let e of r)t.add(e)}return{directories:[...t],complete:s}}function x(o){let c=Date.now(),t=[{dir:o,depth:0}],n=[],s=0,a=0,f=!0;for(;a<t.length&&s<d&&Date.now()-c<y;){let r=t[a++];if(!r)break;if(s++,r.depth>0&&S(r.dir)&&(n.push(r.dir),n.length>1))return{directories:n,complete:!0};if(r.depth>=A)continue;let e;try{e=g.readdirSync(r.dir,{withFileTypes:!0})}catch{continue}for(let i of e)if(!(!i.isDirectory()||i.isSymbolicLink())&&!(i.name.startsWith(".")||D.has(i.name))){if(t.length>=d){f=!1;break}t.push({dir:l.join(r.dir,i.name),depth:r.depth+1})}}return{directories:n,complete:f&&a===t.length}}function C(o,c={}){let t=l.resolve(o),n=m(t);if(S(t)||c.trustStart&&g.existsSync(t)){let e=n;if(!e&&c.trustStart){let i=l.dirname(t);for(let u=0;u<A&&i!==l.dirname(i)&&(e=m(i),!e);u++)i=l.dirname(i)}return{appDir:t,configPath:e}}let s=w(t),a=s.directories.filter(e=>S(e));if(a.length>1||!s.complete)return null;if(a.length===1){let e=a[0];return{appDir:e,configPath:n??m(e)}}let f=x(t),r=f.directories;if(r.length>1||!f.complete)return null;if(r.length===1){let e=r[0];return{appDir:e,configPath:n??m(e)}}return n?{appDir:t,configPath:n}:null}export{C as a};
|