find-cli 1.7.4 → 1.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.swcrc +5 -0
- package/find.js +3 -3
- package/lib/abbreviations.js +26 -0
- package/lib/action/addRootDirectoryPath.js +38 -0
- package/lib/action/find.js +73 -0
- package/lib/action/help.js +15 -0
- package/lib/action/initialise.js +23 -0
- package/lib/action/listRootDirectoryPaths.js +27 -0
- package/lib/action/removeRootDirectoryPath.js +39 -0
- package/lib/action/version.js +19 -0
- package/lib/commands.js +42 -0
- package/lib/configuration/version_1_1.js +25 -0
- package/lib/configuration/version_1_2.js +42 -0
- package/lib/configuration/version_1_3.js +24 -0
- package/lib/configuration/version_1_4.js +29 -0
- package/lib/configuration/version_1_7.js +44 -0
- package/lib/configuration.js +216 -0
- package/lib/constants.js +58 -0
- package/lib/converter/alternates.js +135 -0
- package/lib/converter/characterClass.js +148 -0
- package/lib/converter/default.js +131 -0
- package/lib/converter/directory.js +131 -0
- package/lib/converter/escapedCharacter.js +131 -0
- package/lib/converter/period.js +131 -0
- package/lib/converter/questionMark.js +131 -0
- package/lib/converter/repeatedDirectories.js +131 -0
- package/lib/converter/repeatedWildcard.js +131 -0
- package/lib/converter/singleDirectory.js +131 -0
- package/lib/converter/singleWildcard.js +131 -0
- package/lib/converter.js +71 -0
- package/lib/converters.js +42 -0
- package/lib/defaults.js +50 -0
- package/lib/descriptions.js +30 -0
- package/lib/find.js +53 -0
- package/lib/isIgnored/asynchronous.js +61 -0
- package/lib/isIgnored/synchronous.js +83 -0
- package/lib/line.js +196 -0
- package/lib/main.js +89 -0
- package/lib/messages.js +74 -0
- package/lib/occurrence.js +69 -0
- package/lib/operation/addRootDirectoryPath.js +19 -0
- package/lib/operation/find.js +69 -0
- package/lib/operation/listRootDirectoryPaths.js +38 -0
- package/lib/operation/previousRule.js +34 -0
- package/lib/operation/prompt/addRootDirectoryPath.js +41 -0
- package/lib/operation/prompt/ignoreOrPermitPath.js +37 -0
- package/lib/operation/prompt/pathRule.js +41 -0
- package/lib/operation/prompt/previousRule.js +44 -0
- package/lib/operation/prompt/removeRootDirectoryPath.js +50 -0
- package/lib/operation/prompt/rule.js +60 -0
- package/lib/operation/removeRootDirectoryPath.js +28 -0
- package/lib/operation/removeRootDirectoryPathByIndex.js +35 -0
- package/lib/operation/rule.js +34 -0
- package/lib/operation/updatePatRules.js +40 -0
- package/lib/operation/validateRootDirectoryPath.js +30 -0
- package/lib/options.js +54 -0
- package/lib/prepare.js +37 -0
- package/lib/rule/glob.js +223 -0
- package/lib/rule/regex.js +171 -0
- package/lib/rule/string.js +154 -0
- package/lib/types.js +26 -0
- package/lib/utilities/find.js +140 -0
- package/lib/utilities/literal.js +33 -0
- package/lib/utilities/log.js +45 -0
- package/lib/utilities/operation.js +32 -0
- package/lib/utilities/path.js +53 -0
- package/lib/utilities/prompt.js +97 -0
- package/lib/utilities/rule.js +17 -0
- package/lib/utilities/string.js +69 -0
- package/lib/utilities/validate.js +58 -0
- package/lib/versions.js +38 -0
- package/package.json +21 -6
- package/{bin → src}/abbreviations.js +3 -1
- package/src/action/addRootDirectoryPath.js +29 -0
- package/{bin → src}/action/find.js +8 -10
- package/{bin → src}/action/help.js +1 -3
- package/{bin → src}/action/initialise.js +3 -5
- package/src/action/listRootDirectoryPaths.js +16 -0
- package/src/action/removeRootDirectoryPath.js +31 -0
- package/src/action/version.js +13 -0
- package/src/commands.js +9 -0
- package/{bin → src}/configuration/version_1_1.js +2 -6
- package/{bin → src}/configuration/version_1_2.js +3 -7
- package/src/configuration/version_1_3.js +18 -0
- package/{bin → src}/configuration/version_1_4.js +2 -6
- package/{bin → src}/configuration/version_1_7.js +4 -9
- package/{bin → src}/configuration.js +15 -15
- package/src/constants.js +13 -0
- package/{bin → src}/converter/alternates.js +3 -3
- package/{bin → src}/converter/characterClass.js +3 -3
- package/{bin → src}/converter/default.js +2 -2
- package/{bin → src}/converter/directory.js +2 -2
- package/{bin → src}/converter/escapedCharacter.js +2 -2
- package/{bin → src}/converter/period.js +2 -2
- package/{bin → src}/converter/questionMark.js +2 -2
- package/{bin → src}/converter/repeatedDirectories.js +2 -2
- package/{bin → src}/converter/repeatedWildcard.js +2 -2
- package/{bin → src}/converter/singleDirectory.js +2 -2
- package/{bin → src}/converter/singleWildcard.js +2 -2
- package/{bin → src}/converter.js +3 -5
- package/src/converters.js +29 -0
- package/src/defaults.js +11 -0
- package/src/descriptions.js +6 -0
- package/{bin → src}/find.js +3 -5
- package/{bin → src}/isIgnored/asynchronous.js +7 -12
- package/{bin → src}/isIgnored/synchronous.js +5 -10
- package/{bin → src}/line.js +4 -6
- package/{bin → src}/main.js +19 -21
- package/src/messages.js +17 -0
- package/{bin → src}/occurrence.js +2 -4
- package/{bin → src}/operation/addRootDirectoryPath.js +2 -4
- package/{bin → src}/operation/find.js +8 -10
- package/{bin → src}/operation/listRootDirectoryPaths.js +4 -10
- package/{bin → src}/operation/previousRule.js +3 -5
- package/{bin → src}/operation/prompt/addRootDirectoryPath.js +5 -7
- package/{bin → src}/operation/prompt/ignoreOrPermitPath.js +6 -8
- package/{bin → src}/operation/prompt/pathRule.js +6 -8
- package/{bin → src}/operation/prompt/previousRule.js +4 -6
- package/{bin → src}/operation/prompt/removeRootDirectoryPath.js +6 -8
- package/{bin → src}/operation/prompt/rule.js +7 -9
- package/{bin → src}/operation/removeRootDirectoryPath.js +3 -5
- package/{bin → src}/operation/removeRootDirectoryPathByIndex.js +3 -9
- package/{bin → src}/operation/rule.js +2 -4
- package/{bin → src}/operation/updatePatRules.js +3 -5
- package/{bin → src}/operation/validateRootDirectoryPath.js +3 -5
- package/src/options.js +12 -0
- package/{bin → src}/prepare.js +11 -13
- package/{bin → src}/rule/glob.js +7 -9
- package/{bin → src}/rule/regex.js +12 -14
- package/{bin → src}/rule/string.js +5 -7
- package/src/types.js +5 -0
- package/{bin → src}/utilities/find.js +7 -11
- package/src/utilities/literal.js +13 -0
- package/src/utilities/log.js +18 -0
- package/{bin → src}/utilities/operation.js +2 -6
- package/{bin → src}/utilities/path.js +5 -11
- package/{bin → src}/utilities/prompt.js +5 -10
- package/{bin → src}/utilities/rule.js +1 -5
- package/src/utilities/string.js +21 -0
- package/{bin → src}/utilities/validate.js +5 -12
- package/src/versions.js +8 -0
- package/bin/action/addRootDirectoryPath.js +0 -31
- package/bin/action/listRootDirectoryPaths.js +0 -18
- package/bin/action/removeRootDirectoryPath.js +0 -33
- package/bin/action/version.js +0 -15
- package/bin/commands.js +0 -19
- package/bin/configuration/version_1_3.js +0 -22
- package/bin/constants.js +0 -27
- package/bin/converters.js +0 -29
- package/bin/defaults.js +0 -23
- package/bin/descriptions.js +0 -13
- package/bin/messages.js +0 -35
- package/bin/options.js +0 -25
- package/bin/types.js +0 -11
- package/bin/utilities/literal.js +0 -19
- package/bin/utilities/log.js +0 -26
- package/bin/utilities/string.js +0 -33
- package/bin/versions.js +0 -17
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _converter = /*#__PURE__*/ _interop_require_default(require("../converter"));
|
|
12
|
+
function _assert_this_initialized(self) {
|
|
13
|
+
if (self === void 0) {
|
|
14
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15
|
+
}
|
|
16
|
+
return self;
|
|
17
|
+
}
|
|
18
|
+
function _call_super(_this, derived, args) {
|
|
19
|
+
derived = _get_prototype_of(derived);
|
|
20
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
21
|
+
}
|
|
22
|
+
function _class_call_check(instance, Constructor) {
|
|
23
|
+
if (!(instance instanceof Constructor)) {
|
|
24
|
+
throw new TypeError("Cannot call a class as a function");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function _defineProperties(target, props) {
|
|
28
|
+
for(var i = 0; i < props.length; i++){
|
|
29
|
+
var descriptor = props[i];
|
|
30
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
31
|
+
descriptor.configurable = true;
|
|
32
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
33
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
37
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
38
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
39
|
+
return Constructor;
|
|
40
|
+
}
|
|
41
|
+
function _define_property(obj, key, value) {
|
|
42
|
+
if (key in obj) {
|
|
43
|
+
Object.defineProperty(obj, key, {
|
|
44
|
+
value: value,
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true,
|
|
47
|
+
writable: true
|
|
48
|
+
});
|
|
49
|
+
} else {
|
|
50
|
+
obj[key] = value;
|
|
51
|
+
}
|
|
52
|
+
return obj;
|
|
53
|
+
}
|
|
54
|
+
function _get_prototype_of(o) {
|
|
55
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
56
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
57
|
+
};
|
|
58
|
+
return _get_prototype_of(o);
|
|
59
|
+
}
|
|
60
|
+
function _inherits(subClass, superClass) {
|
|
61
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
62
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
63
|
+
}
|
|
64
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
65
|
+
constructor: {
|
|
66
|
+
value: subClass,
|
|
67
|
+
writable: true,
|
|
68
|
+
configurable: true
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
72
|
+
}
|
|
73
|
+
function _interop_require_default(obj) {
|
|
74
|
+
return obj && obj.__esModule ? obj : {
|
|
75
|
+
default: obj
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function _possible_constructor_return(self, call) {
|
|
79
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
80
|
+
return call;
|
|
81
|
+
}
|
|
82
|
+
return _assert_this_initialized(self);
|
|
83
|
+
}
|
|
84
|
+
function _set_prototype_of(o, p) {
|
|
85
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
86
|
+
o.__proto__ = p;
|
|
87
|
+
return o;
|
|
88
|
+
};
|
|
89
|
+
return _set_prototype_of(o, p);
|
|
90
|
+
}
|
|
91
|
+
function _type_of(obj) {
|
|
92
|
+
"@swc/helpers - typeof";
|
|
93
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
94
|
+
}
|
|
95
|
+
function _is_native_reflect_construct() {
|
|
96
|
+
try {
|
|
97
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
98
|
+
} catch (_) {}
|
|
99
|
+
return (_is_native_reflect_construct = function() {
|
|
100
|
+
return !!result;
|
|
101
|
+
})();
|
|
102
|
+
}
|
|
103
|
+
var RepeatedDirectoriesConverter = /*#__PURE__*/ function(Converter) {
|
|
104
|
+
_inherits(RepeatedDirectoriesConverter, Converter);
|
|
105
|
+
function RepeatedDirectoriesConverter() {
|
|
106
|
+
_class_call_check(this, RepeatedDirectoriesConverter);
|
|
107
|
+
return _call_super(this, RepeatedDirectoriesConverter, arguments);
|
|
108
|
+
}
|
|
109
|
+
_create_class(RepeatedDirectoriesConverter, [
|
|
110
|
+
{
|
|
111
|
+
key: "callback",
|
|
112
|
+
value: function callback(characters) {
|
|
113
|
+
var result = "(?:[^/]*\\/)*";
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
], [
|
|
118
|
+
{
|
|
119
|
+
key: "fromNothing",
|
|
120
|
+
value: function fromNothing() {
|
|
121
|
+
return _converter.default.fromNothing(RepeatedDirectoriesConverter);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
]);
|
|
125
|
+
return RepeatedDirectoriesConverter;
|
|
126
|
+
}(_converter.default);
|
|
127
|
+
_define_property(RepeatedDirectoriesConverter, "regex", /^\*\*\//);
|
|
128
|
+
var repeatedDirectoriesConverter = RepeatedDirectoriesConverter.fromNothing();
|
|
129
|
+
var _default = repeatedDirectoriesConverter;
|
|
130
|
+
|
|
131
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0ZXIvcmVwZWF0ZWREaXJlY3Rvcmllcy5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IENvbnZlcnRlciBmcm9tIFwiLi4vY29udmVydGVyXCI7XG5cbmNsYXNzIFJlcGVhdGVkRGlyZWN0b3JpZXNDb252ZXJ0ZXIgZXh0ZW5kcyBDb252ZXJ0ZXIge1xuICBjYWxsYmFjayhjaGFyYWN0ZXJzKSB7XG4gICAgY29uc3QgcmVzdWx0ID0gYCg/OlteL10qXFxcXC8pKmA7XG5cbiAgICByZXR1cm4gcmVzdWx0O1xuICB9XG5cbiAgc3RhdGljIHJlZ2V4ID0gL15cXCpcXCpcXC8vO1xuXG4gIHN0YXRpYyBmcm9tTm90aGluZygpIHsgcmV0dXJuIENvbnZlcnRlci5mcm9tTm90aGluZyhSZXBlYXRlZERpcmVjdG9yaWVzQ29udmVydGVyKTsgfVxufVxuXG5jb25zdCByZXBlYXRlZERpcmVjdG9yaWVzQ29udmVydGVyID0gUmVwZWF0ZWREaXJlY3Rvcmllc0NvbnZlcnRlci5mcm9tTm90aGluZygpO1xu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;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _converter = /*#__PURE__*/ _interop_require_default(require("../converter"));
|
|
12
|
+
function _assert_this_initialized(self) {
|
|
13
|
+
if (self === void 0) {
|
|
14
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15
|
+
}
|
|
16
|
+
return self;
|
|
17
|
+
}
|
|
18
|
+
function _call_super(_this, derived, args) {
|
|
19
|
+
derived = _get_prototype_of(derived);
|
|
20
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
21
|
+
}
|
|
22
|
+
function _class_call_check(instance, Constructor) {
|
|
23
|
+
if (!(instance instanceof Constructor)) {
|
|
24
|
+
throw new TypeError("Cannot call a class as a function");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function _defineProperties(target, props) {
|
|
28
|
+
for(var i = 0; i < props.length; i++){
|
|
29
|
+
var descriptor = props[i];
|
|
30
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
31
|
+
descriptor.configurable = true;
|
|
32
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
33
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
37
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
38
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
39
|
+
return Constructor;
|
|
40
|
+
}
|
|
41
|
+
function _define_property(obj, key, value) {
|
|
42
|
+
if (key in obj) {
|
|
43
|
+
Object.defineProperty(obj, key, {
|
|
44
|
+
value: value,
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true,
|
|
47
|
+
writable: true
|
|
48
|
+
});
|
|
49
|
+
} else {
|
|
50
|
+
obj[key] = value;
|
|
51
|
+
}
|
|
52
|
+
return obj;
|
|
53
|
+
}
|
|
54
|
+
function _get_prototype_of(o) {
|
|
55
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
56
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
57
|
+
};
|
|
58
|
+
return _get_prototype_of(o);
|
|
59
|
+
}
|
|
60
|
+
function _inherits(subClass, superClass) {
|
|
61
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
62
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
63
|
+
}
|
|
64
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
65
|
+
constructor: {
|
|
66
|
+
value: subClass,
|
|
67
|
+
writable: true,
|
|
68
|
+
configurable: true
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
72
|
+
}
|
|
73
|
+
function _interop_require_default(obj) {
|
|
74
|
+
return obj && obj.__esModule ? obj : {
|
|
75
|
+
default: obj
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function _possible_constructor_return(self, call) {
|
|
79
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
80
|
+
return call;
|
|
81
|
+
}
|
|
82
|
+
return _assert_this_initialized(self);
|
|
83
|
+
}
|
|
84
|
+
function _set_prototype_of(o, p) {
|
|
85
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
86
|
+
o.__proto__ = p;
|
|
87
|
+
return o;
|
|
88
|
+
};
|
|
89
|
+
return _set_prototype_of(o, p);
|
|
90
|
+
}
|
|
91
|
+
function _type_of(obj) {
|
|
92
|
+
"@swc/helpers - typeof";
|
|
93
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
94
|
+
}
|
|
95
|
+
function _is_native_reflect_construct() {
|
|
96
|
+
try {
|
|
97
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
98
|
+
} catch (_) {}
|
|
99
|
+
return (_is_native_reflect_construct = function() {
|
|
100
|
+
return !!result;
|
|
101
|
+
})();
|
|
102
|
+
}
|
|
103
|
+
var RepeatedWildcardConverter = /*#__PURE__*/ function(Converter) {
|
|
104
|
+
_inherits(RepeatedWildcardConverter, Converter);
|
|
105
|
+
function RepeatedWildcardConverter() {
|
|
106
|
+
_class_call_check(this, RepeatedWildcardConverter);
|
|
107
|
+
return _call_super(this, RepeatedWildcardConverter, arguments);
|
|
108
|
+
}
|
|
109
|
+
_create_class(RepeatedWildcardConverter, [
|
|
110
|
+
{
|
|
111
|
+
key: "callback",
|
|
112
|
+
value: function callback(characters) {
|
|
113
|
+
var result = ".*";
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
], [
|
|
118
|
+
{
|
|
119
|
+
key: "fromNothing",
|
|
120
|
+
value: function fromNothing() {
|
|
121
|
+
return _converter.default.fromNothing(RepeatedWildcardConverter);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
]);
|
|
125
|
+
return RepeatedWildcardConverter;
|
|
126
|
+
}(_converter.default);
|
|
127
|
+
_define_property(RepeatedWildcardConverter, "regex", /^\*\*/);
|
|
128
|
+
var singleDirectoryConverter = RepeatedWildcardConverter.fromNothing();
|
|
129
|
+
var _default = singleDirectoryConverter;
|
|
130
|
+
|
|
131
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0ZXIvcmVwZWF0ZWRXaWxkY2FyZC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IENvbnZlcnRlciBmcm9tIFwiLi4vY29udmVydGVyXCI7XG5cbmNsYXNzIFJlcGVhdGVkV2lsZGNhcmRDb252ZXJ0ZXIgZXh0ZW5kcyBDb252ZXJ0ZXIge1xuICBjYWxsYmFjayhjaGFyYWN0ZXJzKSB7XG4g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M0RTs7O1dBVDVFQTtFQUFrQ0ssa0JBQVM7QUFPL0MsaUJBUElMLDJCQU9HTSxTQUFRO0FBS2pCLElBQU1DLDJCQUEyQlAsMEJBQTBCSSxXQUFXO0lBRXRFLFdBQWVHIn0=
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _converter = /*#__PURE__*/ _interop_require_default(require("../converter"));
|
|
12
|
+
function _assert_this_initialized(self) {
|
|
13
|
+
if (self === void 0) {
|
|
14
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15
|
+
}
|
|
16
|
+
return self;
|
|
17
|
+
}
|
|
18
|
+
function _call_super(_this, derived, args) {
|
|
19
|
+
derived = _get_prototype_of(derived);
|
|
20
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
21
|
+
}
|
|
22
|
+
function _class_call_check(instance, Constructor) {
|
|
23
|
+
if (!(instance instanceof Constructor)) {
|
|
24
|
+
throw new TypeError("Cannot call a class as a function");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function _defineProperties(target, props) {
|
|
28
|
+
for(var i = 0; i < props.length; i++){
|
|
29
|
+
var descriptor = props[i];
|
|
30
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
31
|
+
descriptor.configurable = true;
|
|
32
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
33
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
37
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
38
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
39
|
+
return Constructor;
|
|
40
|
+
}
|
|
41
|
+
function _define_property(obj, key, value) {
|
|
42
|
+
if (key in obj) {
|
|
43
|
+
Object.defineProperty(obj, key, {
|
|
44
|
+
value: value,
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true,
|
|
47
|
+
writable: true
|
|
48
|
+
});
|
|
49
|
+
} else {
|
|
50
|
+
obj[key] = value;
|
|
51
|
+
}
|
|
52
|
+
return obj;
|
|
53
|
+
}
|
|
54
|
+
function _get_prototype_of(o) {
|
|
55
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
56
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
57
|
+
};
|
|
58
|
+
return _get_prototype_of(o);
|
|
59
|
+
}
|
|
60
|
+
function _inherits(subClass, superClass) {
|
|
61
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
62
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
63
|
+
}
|
|
64
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
65
|
+
constructor: {
|
|
66
|
+
value: subClass,
|
|
67
|
+
writable: true,
|
|
68
|
+
configurable: true
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
72
|
+
}
|
|
73
|
+
function _interop_require_default(obj) {
|
|
74
|
+
return obj && obj.__esModule ? obj : {
|
|
75
|
+
default: obj
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function _possible_constructor_return(self, call) {
|
|
79
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
80
|
+
return call;
|
|
81
|
+
}
|
|
82
|
+
return _assert_this_initialized(self);
|
|
83
|
+
}
|
|
84
|
+
function _set_prototype_of(o, p) {
|
|
85
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
86
|
+
o.__proto__ = p;
|
|
87
|
+
return o;
|
|
88
|
+
};
|
|
89
|
+
return _set_prototype_of(o, p);
|
|
90
|
+
}
|
|
91
|
+
function _type_of(obj) {
|
|
92
|
+
"@swc/helpers - typeof";
|
|
93
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
94
|
+
}
|
|
95
|
+
function _is_native_reflect_construct() {
|
|
96
|
+
try {
|
|
97
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
98
|
+
} catch (_) {}
|
|
99
|
+
return (_is_native_reflect_construct = function() {
|
|
100
|
+
return !!result;
|
|
101
|
+
})();
|
|
102
|
+
}
|
|
103
|
+
var SingleDirectoryConverter = /*#__PURE__*/ function(Converter) {
|
|
104
|
+
_inherits(SingleDirectoryConverter, Converter);
|
|
105
|
+
function SingleDirectoryConverter() {
|
|
106
|
+
_class_call_check(this, SingleDirectoryConverter);
|
|
107
|
+
return _call_super(this, SingleDirectoryConverter, arguments);
|
|
108
|
+
}
|
|
109
|
+
_create_class(SingleDirectoryConverter, [
|
|
110
|
+
{
|
|
111
|
+
key: "callback",
|
|
112
|
+
value: function callback(characters) {
|
|
113
|
+
var result = "[^/]*\\/";
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
], [
|
|
118
|
+
{
|
|
119
|
+
key: "fromNothing",
|
|
120
|
+
value: function fromNothing() {
|
|
121
|
+
return _converter.default.fromNothing(SingleDirectoryConverter);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
]);
|
|
125
|
+
return SingleDirectoryConverter;
|
|
126
|
+
}(_converter.default);
|
|
127
|
+
_define_property(SingleDirectoryConverter, "regex", /^\*\//);
|
|
128
|
+
var singleDirectoryConverter = SingleDirectoryConverter.fromNothing();
|
|
129
|
+
var _default = singleDirectoryConverter;
|
|
130
|
+
|
|
131
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2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ozs7Ozs7Ozs7Ozs7QUFFdEIsSUFBQSxBQUFNQSx5Q0FBTjtjQUFNQTthQUFBQTtnQ0FBQUE7UUFBTixPQUFBLGtCQUFNQTs7a0JBQUFBOztZQUNKQyxLQUFBQTttQkFBQUEsU0FBQUEsU0FBU0MsVUFBVTtnQkFDakIsSUFBTUMsU0FBUztnQkFFZixPQUFPQTtZQUNUOzs7O1lBSU9DLEtBQUFBO21CQUFQLFNBQU9BO2dCQUFnQixPQUFPQyxrQkFBUyxDQUFDRCxXQUFXLENBVC9DSjtZQVMyRTs7O1dBVDNFQTtFQUFpQ0ssa0JBQVM7QUFPOUMsaUJBUElMLDBCQU9HTSxTQUFRO0FBS2pCLElBQU1DLDJCQUEyQlAseUJBQXlCSSxXQUFXO0lBRXJFLFdBQWVHIn0=
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _converter = /*#__PURE__*/ _interop_require_default(require("../converter"));
|
|
12
|
+
function _assert_this_initialized(self) {
|
|
13
|
+
if (self === void 0) {
|
|
14
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15
|
+
}
|
|
16
|
+
return self;
|
|
17
|
+
}
|
|
18
|
+
function _call_super(_this, derived, args) {
|
|
19
|
+
derived = _get_prototype_of(derived);
|
|
20
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
21
|
+
}
|
|
22
|
+
function _class_call_check(instance, Constructor) {
|
|
23
|
+
if (!(instance instanceof Constructor)) {
|
|
24
|
+
throw new TypeError("Cannot call a class as a function");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function _defineProperties(target, props) {
|
|
28
|
+
for(var i = 0; i < props.length; i++){
|
|
29
|
+
var descriptor = props[i];
|
|
30
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
31
|
+
descriptor.configurable = true;
|
|
32
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
33
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
37
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
38
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
39
|
+
return Constructor;
|
|
40
|
+
}
|
|
41
|
+
function _define_property(obj, key, value) {
|
|
42
|
+
if (key in obj) {
|
|
43
|
+
Object.defineProperty(obj, key, {
|
|
44
|
+
value: value,
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true,
|
|
47
|
+
writable: true
|
|
48
|
+
});
|
|
49
|
+
} else {
|
|
50
|
+
obj[key] = value;
|
|
51
|
+
}
|
|
52
|
+
return obj;
|
|
53
|
+
}
|
|
54
|
+
function _get_prototype_of(o) {
|
|
55
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
56
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
57
|
+
};
|
|
58
|
+
return _get_prototype_of(o);
|
|
59
|
+
}
|
|
60
|
+
function _inherits(subClass, superClass) {
|
|
61
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
62
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
63
|
+
}
|
|
64
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
65
|
+
constructor: {
|
|
66
|
+
value: subClass,
|
|
67
|
+
writable: true,
|
|
68
|
+
configurable: true
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
72
|
+
}
|
|
73
|
+
function _interop_require_default(obj) {
|
|
74
|
+
return obj && obj.__esModule ? obj : {
|
|
75
|
+
default: obj
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function _possible_constructor_return(self, call) {
|
|
79
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
80
|
+
return call;
|
|
81
|
+
}
|
|
82
|
+
return _assert_this_initialized(self);
|
|
83
|
+
}
|
|
84
|
+
function _set_prototype_of(o, p) {
|
|
85
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
86
|
+
o.__proto__ = p;
|
|
87
|
+
return o;
|
|
88
|
+
};
|
|
89
|
+
return _set_prototype_of(o, p);
|
|
90
|
+
}
|
|
91
|
+
function _type_of(obj) {
|
|
92
|
+
"@swc/helpers - typeof";
|
|
93
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
94
|
+
}
|
|
95
|
+
function _is_native_reflect_construct() {
|
|
96
|
+
try {
|
|
97
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
98
|
+
} catch (_) {}
|
|
99
|
+
return (_is_native_reflect_construct = function() {
|
|
100
|
+
return !!result;
|
|
101
|
+
})();
|
|
102
|
+
}
|
|
103
|
+
var SingleWildcardConverter = /*#__PURE__*/ function(Converter) {
|
|
104
|
+
_inherits(SingleWildcardConverter, Converter);
|
|
105
|
+
function SingleWildcardConverter() {
|
|
106
|
+
_class_call_check(this, SingleWildcardConverter);
|
|
107
|
+
return _call_super(this, SingleWildcardConverter, arguments);
|
|
108
|
+
}
|
|
109
|
+
_create_class(SingleWildcardConverter, [
|
|
110
|
+
{
|
|
111
|
+
key: "callback",
|
|
112
|
+
value: function callback(characters) {
|
|
113
|
+
var result = ".+?";
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
], [
|
|
118
|
+
{
|
|
119
|
+
key: "fromNothing",
|
|
120
|
+
value: function fromNothing() {
|
|
121
|
+
return _converter.default.fromNothing(SingleWildcardConverter);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
]);
|
|
125
|
+
return SingleWildcardConverter;
|
|
126
|
+
}(_converter.default);
|
|
127
|
+
_define_property(SingleWildcardConverter, "regex", /^\*/);
|
|
128
|
+
var singleWildcardConverter = SingleWildcardConverter.fromNothing();
|
|
129
|
+
var _default = singleWildcardConverter;
|
|
130
|
+
|
|
131
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0ZXIvc2luZ2xlV2lsZGNhcmQuanMiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmltcG9ydCBDb252ZXJ0ZXIgZnJvbSBcIi4uL2NvbnZlcnRlclwiO1xuXG5jbGFzcyBTaW5nbGVXaWxkY2FyZENvbnZlcnRlciBleHRlbmRzIENvbnZlcnRlciB7XG4gIGNhbGxiYWNrKGNoYXJhY3RlcnMpIHtcbiAgICBjb25zdCByZXN1bHQgPSBgLis/YDtcblxuICAgIHJldHVybiByZXN1bHQ7XG4gIH1cblxuICBzdGF0aWMgcmVnZXggPSAvXlxcKi87XG5cbiAgc3RhdGljIGZyb21Ob3RoaW5nKCkgeyByZXR1cm4gQ29udmVydGVyLmZyb21Ob3RoaW5nKFNpbmdsZVdpbGRjYXJkQ29udmVydGVyKTsgfVxufVxuXG5jb25zdCBzaW5nbGVXaWxkY2FyZENvbnZlcnRlciA9IFNpbmdsZVdpbGRjYXJkQ29udmVydGVyLmZyb21Ob3RoaW5nKCk7XG5cbmV4cG9ydCBkZWZhdWx0IHNpbmdsZVdpbGRjYXJkQ29udmVydGVyO1xuIl0sIm5hbWVzIjpbIlNpbmdsZVdpbGRjYXJkQ29udmVydGVyIiwiY2FsbGJhY2siLCJjaGFyYWN0ZXJzIiwicmVzdWx0IiwiZnJvbU5vdGhpbmciLCJDb252ZXJ0ZXIiLCJyZWdleCIsInNpbmdsZVdpbGRjYXJkQ29udmVydGVyIl0sIm1hcHBpbmdzIjoiQUFBQTs7OzsrQkFrQkE7OztlQUFBOzs7Z0VBaEJzQjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFdEIsSUFBQSxBQUFNQSx3Q0FBTjtjQUFNQTthQUFBQTtnQ0FBQUE7UUFBTixPQUFBLGtCQUFNQTs7a0JBQUFBOztZQUNKQyxLQUFBQTttQkFBQUEsU0FBQUEsU0FBU0MsVUFBVTtnQkFDakIsSUFBTUMsU0FBUztnQkFFZixPQUFPQTtZQUNUOzs7O1lBSU9DLEtBQUFBO21CQUFQLFNBQU9BO2dCQUFnQixPQUFPQyxrQkFBUyxDQUFDRCxXQUFXLENBVC9DSjtZQVMwRTs7O1dBVDFFQTtFQUFnQ0ssa0JBQVM7QUFPN0MsaUJBUElMLHlCQU9HTSxTQUFRO0FBS2pCLElBQU1DLDBCQUEwQlAsd0JBQXdCSSxXQUFXO0lBRW5FLFdBQWVHIn0=
|
package/lib/converter.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return Converter;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _necessary = require("necessary");
|
|
12
|
+
var _constants = require("./constants");
|
|
13
|
+
function _class_call_check(instance, Constructor) {
|
|
14
|
+
if (!(instance instanceof Constructor)) {
|
|
15
|
+
throw new TypeError("Cannot call a class as a function");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function _defineProperties(target, props) {
|
|
19
|
+
for(var i = 0; i < props.length; i++){
|
|
20
|
+
var descriptor = props[i];
|
|
21
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
22
|
+
descriptor.configurable = true;
|
|
23
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
24
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
28
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
29
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
30
|
+
return Constructor;
|
|
31
|
+
}
|
|
32
|
+
var first = _necessary.arrayUtilities.first;
|
|
33
|
+
var Converter = /*#__PURE__*/ function() {
|
|
34
|
+
function Converter(regex) {
|
|
35
|
+
_class_call_check(this, Converter);
|
|
36
|
+
this.regex = regex;
|
|
37
|
+
}
|
|
38
|
+
_create_class(Converter, [
|
|
39
|
+
{
|
|
40
|
+
key: "getRegex",
|
|
41
|
+
value: function getRegex() {
|
|
42
|
+
return this.regex;
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: "match",
|
|
47
|
+
value: function match(characters) {
|
|
48
|
+
var result = null;
|
|
49
|
+
var string = characters.join(_constants.EMPTY_STRING), matches = this.regex.exec(string);
|
|
50
|
+
if (matches !== null) {
|
|
51
|
+
var firstMatch = first(matches), match = firstMatch; ///
|
|
52
|
+
result = this.callback(match);
|
|
53
|
+
var length = match.length, start = 0, deleteCount = length;
|
|
54
|
+
characters.splice(start, deleteCount);
|
|
55
|
+
}
|
|
56
|
+
return result;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
], [
|
|
60
|
+
{
|
|
61
|
+
key: "fromNothing",
|
|
62
|
+
value: function fromNothing(Class) {
|
|
63
|
+
var regex = Class.regex, converter = new Class(regex);
|
|
64
|
+
return converter;
|
|
65
|
+
}
|
|
66
|
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BQVdHLElBQUksQ0FBQ0MsdUJBQVksR0FDckNDLFVBQVUsSUFBSSxDQUFDUixLQUFLLENBQUNTLElBQUksQ0FBQ0o7Z0JBRWhDLElBQUlHLFlBQVksTUFBTTtvQkFDcEIsSUFBTUUsYUFBYVosTUFBTVUsVUFDbkJOLFFBQVFRLFlBQVksR0FBRztvQkFFN0JOLFNBQVMsSUFBSSxDQUFDTyxRQUFRLENBQUNUO29CQUV2QixJQUFNVSxTQUFTVixNQUFNVSxNQUFNLEVBQ3JCQyxRQUFRLEdBQ1JDLGNBQWNGO29CQUVwQlQsV0FBV1ksTUFBTSxDQUFDRixPQUFPQztnQkFDM0I7Z0JBRUEsT0FBT1Y7WUFDVDs7OztZQUVPWSxLQUFBQTttQkFBUCxTQUFPQSxZQUFZQyxLQUFLO2dCQUN0QixJQUFNLEFBQUVqQixRQUFVaUIsTUFBVmpCLE9BQ0ZrQixZQUFZLElBQUlELE1BQU1qQjtnQkFFNUIsT0FBT2tCO1lBQ1Q7OztXQXBDbUJyQiJ9
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default1;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _period = /*#__PURE__*/ _interop_require_default(require("./converter/period"));
|
|
12
|
+
var _default = /*#__PURE__*/ _interop_require_default(require("./converter/default"));
|
|
13
|
+
var _directory = /*#__PURE__*/ _interop_require_default(require("./converter/directory"));
|
|
14
|
+
var _alternates = /*#__PURE__*/ _interop_require_default(require("./converter/alternates"));
|
|
15
|
+
var _questionMark = /*#__PURE__*/ _interop_require_default(require("./converter/questionMark"));
|
|
16
|
+
var _characterClass = /*#__PURE__*/ _interop_require_default(require("./converter/characterClass"));
|
|
17
|
+
var _singleWildcard = /*#__PURE__*/ _interop_require_default(require("./converter/singleWildcard"));
|
|
18
|
+
var _singleDirectory = /*#__PURE__*/ _interop_require_default(require("./converter/singleDirectory"));
|
|
19
|
+
var _repeatedWildcard = /*#__PURE__*/ _interop_require_default(require("./converter/repeatedWildcard"));
|
|
20
|
+
var _escapedCharacter = /*#__PURE__*/ _interop_require_default(require("./converter/escapedCharacter"));
|
|
21
|
+
var _repeatedDirectories = /*#__PURE__*/ _interop_require_default(require("./converter/repeatedDirectories"));
|
|
22
|
+
function _interop_require_default(obj) {
|
|
23
|
+
return obj && obj.__esModule ? obj : {
|
|
24
|
+
default: obj
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
var converters = [
|
|
28
|
+
_repeatedDirectories.default,
|
|
29
|
+
_singleDirectory.default,
|
|
30
|
+
_directory.default,
|
|
31
|
+
_repeatedWildcard.default,
|
|
32
|
+
_singleWildcard.default,
|
|
33
|
+
_escapedCharacter.default,
|
|
34
|
+
_questionMark.default,
|
|
35
|
+
_period.default,
|
|
36
|
+
_alternates.default,
|
|
37
|
+
_characterClass.default,
|
|
38
|
+
_default.default
|
|
39
|
+
];
|
|
40
|
+
var _default1 = converters;
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb252ZXJ0ZXJzLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgcGVyaW9kQ29udmVydGVyIGZyb20gXCIuL2NvbnZlcnRlci9wZXJpb2RcIjtcbmltcG9ydCBkZWZhdWx0Q29udmVydGVyIGZyb20gXCIuL2NvbnZlcnRlci9kZWZhdWx0XCI7XG5pbXBvcnQgZGlyZWN0b3J5Q29udmVydGVyIGZyb20gXCIuL2NvbnZlcnRlci9kaXJlY3RvcnlcIjtcbmltcG9ydCBhbHRlcm5hdGVzQ29udmVydGVyIGZyb20gXCIuL2NvbnZlcnRlci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