aboutsummaryrefslogtreecommitdiff
path: root/node_modules/fast-glob/out/providers/provider.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/fast-glob/out/providers/provider.js')
-rw-r--r--node_modules/fast-glob/out/providers/provider.js48
1 files changed, 48 insertions, 0 deletions
diff --git a/node_modules/fast-glob/out/providers/provider.js b/node_modules/fast-glob/out/providers/provider.js
new file mode 100644
index 0000000..da88ee0
--- /dev/null
+++ b/node_modules/fast-glob/out/providers/provider.js
@@ -0,0 +1,48 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const path = require("path");
+const deep_1 = require("./filters/deep");
+const entry_1 = require("./filters/entry");
+const error_1 = require("./filters/error");
+const entry_2 = require("./transformers/entry");
+class Provider {
+ constructor(_settings) {
+ this._settings = _settings;
+ this.errorFilter = new error_1.default(this._settings);
+ this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
+ this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
+ this.entryTransformer = new entry_2.default(this._settings);
+ }
+ _getRootDirectory(task) {
+ return path.resolve(this._settings.cwd, task.base);
+ }
+ _getReaderOptions(task) {
+ const basePath = task.base === '.' ? '' : task.base;
+ return {
+ basePath,
+ pathSegmentSeparator: '/',
+ concurrency: this._settings.concurrency,
+ deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
+ entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
+ errorFilter: this.errorFilter.getFilter(),
+ followSymbolicLinks: this._settings.followSymbolicLinks,
+ fs: this._settings.fs,
+ stats: this._settings.stats,
+ throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
+ transform: this.entryTransformer.getTransformer()
+ };
+ }
+ _getMicromatchOptions() {
+ return {
+ dot: this._settings.dot,
+ matchBase: this._settings.baseNameMatch,
+ nobrace: !this._settings.braceExpansion,
+ nocase: !this._settings.caseSensitiveMatch,
+ noext: !this._settings.extglob,
+ noglobstar: !this._settings.globstar,
+ posix: true,
+ strictSlashes: false
+ };
+ }
+}
+exports.default = Provider;