You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
6.9 KiB
1 line
6.9 KiB
4 weeks ago
|
{"version":3,"sources":["../src/index.ts"],"names":["cosmiconfig","moduleName","options","normalizedOptions","normalizeOptions","explorer","Explorer","search","bind","load","clearLoadCache","clearSearchCache","clearCaches","cosmiconfigSync","explorerSync","ExplorerSync","searchSync","loadSync","defaultLoaders","Object","freeze","loaders","loadJs","loadJson","loadYaml","noExt","identity","x","defaults","packageProp","searchPlaces","ignoreEmptySearchPlaces","stopDir","os","homedir","cache","transform"],"mappings":";;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AALA;AA8CA;AACA,SAASA,WAAT,CAAqBC,UAArB,EAAyCC,OAAgB,GAAG,EAA5D,EAAgE;AAC9D,QAAMC,iBAAkC,GAAGC,gBAAgB,CACzDH,UADyD,EAEzDC,OAFyD,CAA3D;AAKA,QAAMG,QAAQ,GAAG,IAAIC,kBAAJ,CAAaH,iBAAb,CAAjB;AAEA,SAAO;AACLI,IAAAA,MAAM,EAAEF,QAAQ,CAACE,MAAT,CAAgBC,IAAhB,CAAqBH,QAArB,CADH;AAELI,IAAAA,IAAI,EAAEJ,QAAQ,CAACI,IAAT,CAAcD,IAAd,CAAmBH,QAAnB,CAFD;AAGLK,IAAAA,cAAc,EAAEL,QAAQ,CAACK,cAAT,CAAwBF,IAAxB,CAA6BH,QAA7B,CAHX;AAILM,IAAAA,gBAAgB,EAAEN,QAAQ,CAACM,gBAAT,CAA0BH,IAA1B,CAA+BH,QAA/B,CAJb;AAKLO,IAAAA,WAAW,EAAEP,QAAQ,CAACO,WAAT,CAAqBJ,IAArB,CAA0BH,QAA1B;AALR,GAAP;AAOD,C,CAED;;;AACA,SAASQ,eAAT,CAAyBZ,UAAzB,EAA6CC,OAAoB,GAAG,EAApE,EAAwE;AACtE,QAAMC,iBAAsC,GAAGC,gBAAgB,CAC7DH,UAD6D,EAE7DC,OAF6D,CAA/D;AAKA,QA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WAAUA,UAAW,QAXV,EAYX,WAAUA,UAAW,OAZV,EAaX,WAAUA,UAAW,QAbV,EAcX,GAAEA,UAAW,YAdF,EAeX,GAAEA,UAAW,aAfF,CAFwC;AAmBtD8B,IAAAA,uBAAuB,EAAE,IAnB6B;AAoBtDC,IAAAA,OAAO,EAAEC,YAAGC,OAAH,EApB6C;AAqBtDC,IAAAA,KAAK,EAAE,IArB+C;AAsBtDC,IAAAA,SAAS,EAAEV,QAtB2C;AAuBtDL,IAAAA,OAAO,EAAEH;AAvB6C,GAAxD;AA0BA,QAAMf,iBAAwD,GAAG,EAC/D,GAAGyB,QAD4D;AAE/D,OAAG1B,OAF4D;AAG/DmB,IAAAA,OAAO,EAAE,EACP,GAAGO,QAAQ,CAACP,OADL;AAEP,SAAGnB,OAAO,CAACmB;AAFJ;AAHsD,GAAjE;AASA,SAAOlB,iBAAP;AACD","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport os from 'os';\nimport { Explorer } from './Explorer';\nimport { ExplorerSync } from './ExplorerSync';\nimport { loaders } from './loaders';\nimport {\n Config,\n CosmiconfigResult,\n ExplorerOptions,\n ExplorerOptionsSync,\n Loaders,\n LoadersSync,\n} from './types';\n\ntype LoaderResult = Config | null;\nexport type Loader =\n | ((filepath: string, content: string) => Promise<LoaderResult>)\n | LoaderSync;\nexport type LoaderSync = (filepath: string, content: string) => LoaderResult;\n\nexport type Transform =\n | ((CosmiconfigResult: CosmiconfigResult) => Promise<CosmiconfigResult>)\n | TransformSync;\n\nexport type TransformSync = (\n CosmiconfigResult: CosmiconfigResult,\n) => CosmiconfigResult;\n\ninterface OptionsBase {\n packageProp?: string | Array<string>;\n searchPlaces?: Array<string>;\n ignoreEmptySearchPlaces?: boolean;\n stopDir?: string;\n cache?: boolean;\n}\n\nexport interface Options extends OptionsBase {\n loaders?: Loaders;\n transform?: Transform;\n}\n\nexport interface OptionsSync extends OptionsBase {\n loaders?: LoadersSync;\n transform?: TransformSync;\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nfunction cosmiconfig(module
|