/var/www/flurhymez/node_modules/cosmiconfig/dist
NameSizeModeActions
cacheWrapper.d.ts3710644editdlrm
cacheWrapper.d.ts.map4500644editdlrm
cacheWrapper.js6120644editdlrm
cacheWrapper.js.map14630644editdlrm
Explorer.d.ts5500644editdlrm
Explorer.d.ts.map4800644editdlrm
Explorer.js31590644editdlrm
Explorer.js.map67160644editdlrm
ExplorerBase.d.ts10940644editdlrm
ExplorerBase.d.ts.map10040644editdlrm
ExplorerBase.js34410644editdlrm
ExplorerBase.js.map75240644editdlrm
ExplorerSync.d.ts5840644editdlrm
ExplorerSync.d.ts.map5240644editdlrm
ExplorerSync.js31370644editdlrm
ExplorerSync.js.map65880644editdlrm
getDirectory.d.ts2120644editdlrm
getDirectory.d.ts.map2800644editdlrm
getDirectory.js9000644editdlrm
getDirectory.js.map13190644editdlrm
getPropertyByPath.d.ts1930644editdlrm
getPropertyByPath.d.ts.map3010644editdlrm
getPropertyByPath.js9380644editdlrm
getPropertyByPath.js.map17090644editdlrm
index.d.ts19240644editdlrm
index.d.ts.map12080644editdlrm
index.js28150644editdlrm
index.js.map66820644editdlrm
loaders.d.ts1320644editdlrm
loaders.d.ts.map2160644editdlrm
loaders.js11570644editdlrm
loaders.js.map27430644editdlrm
readFile.d.ts2950644editdlrm
readFile.d.ts.map3850644editdlrm
readFile.js13190644editdlrm
readFile.js.map26850644editdlrm
types.d.ts6350644editdlrm
types.d.ts.map6840644editdlrm
types.js1130644editdlrm
types.js.map890644editdlrm
Edit: /var/www/flurhymez/node_modules/cosmiconfig/dist/Explorer.js (3159B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Explorer = void 0; var _path = _interopRequireDefault(require("path")); var _ExplorerBase = require("./ExplorerBase"); var _readFile = require("./readFile"); var _cacheWrapper = require("./cacheWrapper"); var _getDirectory = require("./getDirectory"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } class Explorer extends _ExplorerBase.ExplorerBase { constructor(options) { super(options); } async search(searchFrom = process.cwd()) { const startDirectory = await (0, _getDirectory.getDirectory)(searchFrom); const result = await this.searchFromDirectory(startDirectory); return result; } async searchFromDirectory(dir) { const absoluteDir = _path.default.resolve(process.cwd(), dir); const run = async () => { const result = await this.searchDirectory(absoluteDir); const nextDir = this.nextDirectoryToSearch(absoluteDir, result); if (nextDir) { return this.searchFromDirectory(nextDir); } const transformResult = await this.config.transform(result); return transformResult; }; if (this.searchCache) { return (0, _cacheWrapper.cacheWrapper)(this.searchCache, absoluteDir, run); } return run(); } async searchDirectory(dir) { for await (const place of this.config.searchPlaces) { const placeResult = await this.loadSearchPlace(dir, place); if (this.shouldSearchStopWithResult(placeResult) === true) { return placeResult; } } // config not found return null; } async loadSearchPlace(dir, place) { const filepath = _path.default.join(dir, place); const fileContents = await (0, _readFile.readFile)(filepath); const result = await this.createCosmiconfigResult(filepath, fileContents); return result; } async loadFileContent(filepath, content) { if (content === null) { return null; } if (content.trim() === '') { return undefined; } const loader = this.getLoaderEntryForFile(filepath); const loaderResult = await loader(filepath, content); return loaderResult; } async createCosmiconfigResult(filepath, content) { const fileContent = await this.loadFileContent(filepath, content); const result = this.loadedContentToCosmiconfigResult(filepath, fileContent); return result; } async load(filepath) { this.validateFilePath(filepath); const absoluteFilePath = _path.default.resolve(process.cwd(), filepath); const runLoad = async () => { const fileContents = await (0, _readFile.readFile)(absoluteFilePath, { throwNotFound: true }); const result = await this.createCosmiconfigResult(absoluteFilePath, fileContents); const transformResult = await this.config.transform(result); return transformResult; }; if (this.loadCache) { return (0, _cacheWrapper.cacheWrapper)(this.loadCache, absoluteFilePath, runLoad); } return runLoad(); } } exports.Explorer = Explorer; //# sourceMappingURL=Explorer.js.map