GoScrobble/web/node_modules/cosmiconfig/dist/ExplorerSync.js.map

1 line
6.4 KiB
Plaintext
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
{"version":3,"sources":["../src/ExplorerSync.ts"],"names":["ExplorerSync","ExplorerBase","constructor","options","searchSync","searchFrom","process","cwd","startDirectory","result","searchFromDirectorySync","dir","absoluteDir","path","resolve","run","searchDirectorySync","nextDir","nextDirectoryToSearch","transformResult","config","transform","searchCache","place","searchPlaces","placeResult","loadSearchPlaceSync","shouldSearchStopWithResult","filepath","join","content","createCosmiconfigResultSync","loadFileContentSync","trim","undefined","loader","getLoaderEntryForFile","loaderResult","fileContent","loadedContentToCosmiconfigResult","loadSync","validateFilePath","absoluteFilePath","runLoadSync","throwNotFound","cosmiconfigResult","loadCache"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAOA,MAAMA,YAAN,SAA2BC,0BAA3B,CAA6D;AACpDC,EAAAA,WAAP,CAAmBC,OAAnB,EAAiD;AAC/C,UAAMA,OAAN;AACD;;AAEMC,EAAAA,UAAP,CAAkBC,UAAkB,GAAGC,OAAO,CAACC,GAAR,EAAvC,EAAyE;AACvE,UAAMC,cAAc,GAAG,oCAAiBH,UAAjB,CAAvB;AACA,UAAMI,MAAM,GAAG,KAAKC,uBAAL,CAA6BF,cAA7B,CAAf;AAEA,WAAOC,MAAP;AACD;;AAEOC,EAAAA,uBAAR,CAAgCC,GAAhC,EAAgE;AAC9D,UAAMC,WAAW,GAAGC,cAAKC,OAAL,CAAaR,OAAO,CAACC,GAAR,EAAb,EAA4BI,GAA5B,CAApB;;AAEA,UAAMI,GAAG,GAAG,MAAyB;AACnC,YAAMN,MAAM,GAAG,KAAKO,mBAAL,CAAyBJ,WAAzB,CAAf;AACA,YAAMK,OAAO,GAAG,KAAKC,qBAAL,CAA2BN,WAA3B,EAAwCH,MAAxC,CAAhB;;AAEA,UAAIQ,OAAJ,EAAa;AACX,eAAO,KAAKP,uBAAL,CAA6BO,OA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AAA,2BAAR,CACEH,QADF,EAEEE,OAFF,EAGqB;AACnB,UAAMQ,WAAW,GAAG,KAAKN,mBAAL,CAAyBJ,QAAzB,EAAmCE,OAAnC,CAApB;AACA,UAAMrB,MAAM,GAAG,KAAK8B,gCAAL,CAAsCX,QAAtC,EAAgDU,WAAhD,CAAf;AAEA,WAAO7B,MAAP;AACD;;AAEM+B,EAAAA,QAAP,CAAgBZ,QAAhB,EAAqD;AACnD,SAAKa,gBAAL,CAAsBb,QAAtB;;AACA,UAAMc,gBAAgB,GAAG7B,cAAKC,OAAL,CAAaR,OAAO,CAACC,GAAR,EAAb,EAA4BqB,QAA5B,CAAzB;;AAEA,UAAMe,WAAW,GAAG,MAAyB;AAC3C,YAAMb,OAAO,GAAG,4BAAaY,gBAAb,EAA+B;AAAEE,QAAAA,aAAa,EAAE;AAAjB,OAA/B,CAAhB;AACA,YAAMC,iBAAiB,GAAG,KAAKd,2BAAL,CACxBW,gBADwB,EAExBZ,OAFwB,CAA1B;AAKA,YAAMX,eAAe,GAAG,KAAKC,MAAL,CAAYC,SAAZ,CAAsBwB,iBAAtB,CAAxB;AAEA,aAAO1B,eAAP;AACD,KAVD;;AAYA,QAAI,KAAK2B,SAAT,EAAoB;AAClB,aAAO,oCAAiB,KAAKA,SAAtB,EAAiCJ,gBAAjC,EAAmDC,WAAnD,CAAP;AACD;;AAED,WAAOA,WAAW,EAAlB;AACD;;AAxG0D","sourcesContent":["import path from 'path';\nimport { ExplorerBase } from './ExplorerBase';\nimport { readFileSync } from './readFile';\nimport { cacheWrapperSync } from './cacheWrapper';\nimport { getDirectorySync } from './getDirectory';\nimport {\n CosmiconfigResult,\n ExplorerOptionsSync,\n LoadedFileContent,\n} from './types';\n\nclass ExplorerSync extends ExplorerBase<ExplorerOptionsSync> {\n public constructor(options: ExplorerOptionsSync) {\n super(options);\n }\n\n public searchSync(searchFrom: string = process.cwd()): CosmiconfigResult {\n const startDirectory = getDirectorySync(searchFrom);\n const result = this.searchFromDirectorySync(startDirectory);\n\n return result;\n }\n\n private searchFromDirectorySync(dir: string): CosmiconfigResult {\n const absoluteDir = path.resolve(process.cwd(), dir);\n\n const run = (): CosmiconfigResult => {\n const