mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
7.3 KiB
Plaintext
1 line
7.3 KiB
Plaintext
|
{"version":3,"sources":["../src/ExplorerBase.ts"],"names":["ExplorerBase","constructor","options","cache","loadCache","Map","searchCache","config","validateConfig","clearLoadCache","clear","clearSearchCache","clearCaches","searchPlaces","forEach","place","loaderKey","path","extname","loader","loaders","Error","getExtensionDescription","shouldSearchStopWithResult","result","isEmpty","ignoreEmptySearchPlaces","nextDirectoryToSearch","currentDir","currentResult","nextDir","nextDirUp","stopDir","loadPackageProp","filepath","content","parsedContent","loadJson","packagePropValue","packageProp","getLoaderEntryForFile","basename","bind","loadedContentToCosmiconfigResult","loadedContent","undefined","validateFilePath","dir","dirname","ext"],"mappings":";;;;;;;;AAAA;;AACA;;AACA;;;;AAUA,MAAMA,YAAN,CAAoE;AAK3DC,EAAAA,WAAP,CAAmBC,OAAnB,EAA+B;AAC7B,QAAIA,OAAO,CAACC,KAAR,KAAkB,IAAtB,EAA4B;AAC1B,WAAKC,SAAL,GAAiB,IAAIC,GAAJ,EAAjB;AACA,WAAKC,WAAL,GAAmB,IAAID,GAAJ,EAAnB;AACD;;AAED,SAAKE,MAAL,GAAcL,OAAd;AACA,SAAKM,cAAL;AACD;;AAEMC,EAAAA,cAAP,GAA8B;AAC5B,QAAI,KAAKL,SAAT,EAAoB;AAClB,WAAKA,SAAL,CAAeM,KAAf;AACD;AACF;;AAEMC,EAAAA,gBAAP,GAAgC;AAC9B,QAAI,KAAKL,WAAT,EAAsB;AACpB,WAAKA,WAAL,CAAiBI,KAAjB;AACD;AACF;;AAEME,EAAAA,WAAP,GAA2B;AACzB,SAAKH,cAAL;AACA,SAAKE,gBAAL;AACD;;AAEOH,EAAAA,cAAR,GAA+B;AAC7B,UAAMD,MAAM,GAAG,KAAKA,MAApB;AAEAA,IAAAA,MAAM,CAACM,YAAP,CAAoBC,OAApB,CAA6BC,KAAD,IAAiB;AAC3C,YAAMC,SAAS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GAArB,GAA0B,0BAApC;AACD","sourcesContent":["import path from 'path';\nimport { loaders } from './loaders';\nimport { getPropertyByPath } from './getPropertyByPath';\nimport {\n CosmiconfigResult,\n ExplorerOptions,\n ExplorerOptionsSync,\n Cache,\n LoadedFileContent,\n} from './types';\nimport { Loader } from './index';\n\nclass ExplorerBase<T extends ExplorerOptions | ExplorerOptionsSync> {\n protected readonly loadCache?: Cache;\n protected readonly searchCache?: Cache;\n protected readonly config: T;\n\n public constructor(options: T) {\n if (options.cache === tr
|