/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/ExplorerBase.js (3441B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getExtensionDescription = getExtensionDescription; exports.ExplorerBase = void 0; var _path = _interopRequireDefault(require("path")); var _loaders = require("./loaders"); var _getPropertyByPath = require("./getPropertyByPath"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } class ExplorerBase { constructor(options) { if (options.cache === true) { this.loadCache = new Map(); this.searchCache = new Map(); } this.config = options; this.validateConfig(); } clearLoadCache() { if (this.loadCache) { this.loadCache.clear(); } } clearSearchCache() { if (this.searchCache) { this.searchCache.clear(); } } clearCaches() { this.clearLoadCache(); this.clearSearchCache(); } validateConfig() { const config = this.config; config.searchPlaces.forEach(place => { const loaderKey = _path.default.extname(place) || 'noExt'; const loader = config.loaders[loaderKey]; if (!loader) { throw new Error(`No loader specified for ${getExtensionDescription(place)}, so searchPlaces item "${place}" is invalid`); } if (typeof loader !== 'function') { throw new Error(`loader for ${getExtensionDescription(place)} is not a function (type provided: "${typeof loader}"), so searchPlaces item "${place}" is invalid`); } }); } shouldSearchStopWithResult(result) { if (result === null) return false; if (result.isEmpty && this.config.ignoreEmptySearchPlaces) return false; return true; } nextDirectoryToSearch(currentDir, currentResult) { if (this.shouldSearchStopWithResult(currentResult)) { return null; } const nextDir = nextDirUp(currentDir); if (nextDir === currentDir || currentDir === this.config.stopDir) { return null; } return nextDir; } loadPackageProp(filepath, content) { const parsedContent = _loaders.loaders.loadJson(filepath, content); const packagePropValue = (0, _getPropertyByPath.getPropertyByPath)(parsedContent, this.config.packageProp); return packagePropValue || null; } getLoaderEntryForFile(filepath) { if (_path.default.basename(filepath) === 'package.json') { const loader = this.loadPackageProp.bind(this); return loader; } const loaderKey = _path.default.extname(filepath) || 'noExt'; const loader = this.config.loaders[loaderKey]; if (!loader) { throw new Error(`No loader specified for ${getExtensionDescription(filepath)}`); } return loader; } loadedContentToCosmiconfigResult(filepath, loadedContent) { if (loadedContent === null) { return null; } if (loadedContent === undefined) { return { filepath, config: undefined, isEmpty: true }; } return { config: loadedContent, filepath }; } validateFilePath(filepath) { if (!filepath) { throw new Error('load must pass a non-empty string'); } } } exports.ExplorerBase = ExplorerBase; function nextDirUp(dir) { return _path.default.dirname(dir); } function getExtensionDescription(filepath) { const ext = _path.default.extname(filepath); return ext ? `extension "${ext}"` : 'files without extensions'; } //# sourceMappingURL=ExplorerBase.js.map