@visulima/fs 5.0.0-alpha.7 → 5.0.0-alpha.9
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/CHANGELOG.md +46 -0
- package/LICENSE.md +155 -126
- package/dist/eol.d.ts +6 -35
- package/dist/error.d.ts +43 -7
- package/dist/glob-parent.d.ts +5 -0
- package/dist/glob-parent.js +90 -0
- package/dist/glob.d.ts +5 -0
- package/dist/glob.js +2 -0
- package/dist/index.d.ts +81 -36
- package/dist/index.js +16 -11
- package/dist/ini.d.ts +10 -0
- package/dist/ini.js +4 -0
- package/dist/is-glob.d.ts +5 -0
- package/dist/is-glob.js +9 -0
- package/dist/json5.d.ts +12 -0
- package/dist/json5.js +4 -0
- package/dist/jsonc.d.ts +10 -0
- package/dist/jsonc.js +4 -0
- package/dist/match.d.ts +5 -0
- package/dist/match.js +15 -0
- package/dist/packem_shared/_commonjsHelpers-BqLXS_qQ.js +5 -0
- package/dist/packem_shared/build-rm-options-Cl3VDY4O.js +12 -0
- package/dist/packem_shared/{collect-BnUYRrRI.js → collect-CqQ3eVab.js} +1 -1
- package/dist/packem_shared/{collectSync-D5G2RGDI.js → collectSync-noE08NNv.js} +1 -1
- package/dist/packem_shared/{emptyDir-Df4Tfjtk.js → emptyDir-DnwENOaV.js} +3 -1
- package/dist/packem_shared/{emptyDirSync-BD8-1Ytl.js → emptyDirSync-6WiHBo8a.js} +3 -1
- package/dist/packem_shared/glob-DY8l7izD.js +5 -0
- package/dist/packem_shared/glob-sync.d-B83kqwUd.d.ts +4 -0
- package/dist/packem_shared/globSync-5P2KJf_g.js +5 -0
- package/dist/packem_shared/index-C8W8sfzP.js +830 -0
- package/dist/packem_shared/index-bhgnhm4u.js +167 -0
- package/dist/packem_shared/index-xe4o3cYi.js +1784 -0
- package/dist/packem_shared/{parseJson-BedVi91S.js → indexToLineColumn-BUb0GPKl-BF770uX7.js} +1 -62
- package/dist/packem_shared/ini-preserve-Dq_Q_Jgb.js +251 -0
- package/dist/packem_shared/{isFsCaseSensitive-D-ayleCy.js → isFsCaseSensitive-DunL7Iry.js} +6 -6
- package/dist/packem_shared/json-error.d-DgKaeuIf.d.ts +10 -0
- package/dist/packem_shared/jsonc-merge-C6jWcfWh.js +72 -0
- package/dist/packem_shared/parseJson-BIp89Xjo.js +63 -0
- package/dist/packem_shared/readIni-CJ2xfpjB.js +10 -0
- package/dist/packem_shared/readIniSync-9LUjaSSp.js +10 -0
- package/dist/packem_shared/{readJson-D0G0ndHL.js → readJson-C_rwm-wq.js} +1 -1
- package/dist/packem_shared/readJson5-mBoTZppy.js +15 -0
- package/dist/packem_shared/readJson5Sync-8WS2yUok.js +15 -0
- package/dist/packem_shared/{readJsonSync-B7oicPaL.js → readJsonSync-BMEmCcJ6.js} +1 -1
- package/dist/packem_shared/readJsonc-j-OS-APg.js +28 -0
- package/dist/packem_shared/readJsoncSync-Aw6EMlWO.js +16 -0
- package/dist/packem_shared/readToml-B2MHaSes.js +9 -0
- package/dist/packem_shared/readTomlSync-DNbK8NEb.js +9 -0
- package/dist/packem_shared/{remove-CNkjFFkQ.js → remove-C8_gl3jF.js} +2 -1
- package/dist/packem_shared/{removeSync-AnawYpPv.js → removeSync-BJR_wTwN.js} +2 -1
- package/dist/packem_shared/types.d-dP-lAGNn.d.ts +145 -0
- package/dist/packem_shared/{walk-D5yHruvk.js → walk-CSZgCuDx.js} +10 -3
- package/dist/packem_shared/{walkSync-09nKPVw4.js → walkSync-C4Cy28xb.js} +10 -3
- package/dist/packem_shared/writeIni-i55QrL8y.js +65 -0
- package/dist/packem_shared/writeIniSync-CLqJE5t3.js +64 -0
- package/dist/packem_shared/writeJson5-vVmHUQOd.js +53 -0
- package/dist/packem_shared/writeJson5Sync-oJ546h5k.js +53 -0
- package/dist/packem_shared/writeJsonc-BufH_oC5.js +60 -0
- package/dist/packem_shared/writeJsoncSync-DB9be1YL.js +59 -0
- package/dist/packem_shared/writeToml-DgTW_-7F.js +8 -0
- package/dist/packem_shared/writeTomlSync-DiBiE9ja.js +8 -0
- package/dist/size.d.ts +10 -254
- package/dist/toml.d.ts +9 -0
- package/dist/toml.js +4 -0
- package/dist/utils.d.ts +15 -6
- package/dist/utils.js +1 -1
- package/dist/yaml.d.ts +14 -5
- package/package.json +58 -4
- package/dist/constants.d.ts +0 -42
- package/dist/ensure/ensure-dir-sync.d.ts +0 -14
- package/dist/ensure/ensure-dir.d.ts +0 -14
- package/dist/ensure/ensure-file-sync.d.ts +0 -15
- package/dist/ensure/ensure-file.d.ts +0 -27
- package/dist/ensure/ensure-link-sync.d.ts +0 -16
- package/dist/ensure/ensure-link.d.ts +0 -16
- package/dist/ensure/ensure-symlink-sync.d.ts +0 -23
- package/dist/ensure/ensure-symlink.d.ts +0 -23
- package/dist/ensure/utils/get-file-info-type.d.ts +0 -7
- package/dist/ensure/utils/is-stats-identical.d.ts +0 -3
- package/dist/ensure/utils/resolve-symlink-target.d.ts +0 -2
- package/dist/error/already-exists-error.d.ts +0 -39
- package/dist/error/directory-error.d.ts +0 -47
- package/dist/error/json-error.d.ts +0 -52
- package/dist/error/not-empty-error.d.ts +0 -51
- package/dist/error/not-found-error.d.ts +0 -44
- package/dist/error/permission-error.d.ts +0 -45
- package/dist/error/walk-error.d.ts +0 -51
- package/dist/find/collect-sync.d.ts +0 -31
- package/dist/find/collect.d.ts +0 -35
- package/dist/find/find-up-sync.d.ts +0 -42
- package/dist/find/find-up.d.ts +0 -46
- package/dist/find/utils/glob-to-regexp.d.ts +0 -2
- package/dist/find/utils/walk-include.d.ts +0 -2
- package/dist/find/walk-sync.d.ts +0 -34
- package/dist/find/walk.d.ts +0 -37
- package/dist/is-accessible-sync.d.ts +0 -3
- package/dist/is-accessible.d.ts +0 -29
- package/dist/move/index.d.ts +0 -68
- package/dist/move/types.d.ts +0 -36
- package/dist/move/utils/internal-move-file-sync.d.ts +0 -3
- package/dist/move/utils/internal-move-file.d.ts +0 -3
- package/dist/move/utils/validate-same-directory.d.ts +0 -2
- package/dist/read/read-file-sync.d.ts +0 -37
- package/dist/read/read-file.d.ts +0 -41
- package/dist/read/read-json-sync.d.ts +0 -5
- package/dist/read/read-json.d.ts +0 -5
- package/dist/read/read-yaml-sync.d.ts +0 -4
- package/dist/read/read-yaml.d.ts +0 -4
- package/dist/remove/empty-dir-sync.d.ts +0 -23
- package/dist/remove/empty-dir.d.ts +0 -28
- package/dist/remove/remove-sync.d.ts +0 -27
- package/dist/remove/remove.d.ts +0 -32
- package/dist/sanitize.d.ts +0 -31
- package/dist/types.d.ts +0 -304
- package/dist/utils/assert-valid-file-contents.d.ts +0 -27
- package/dist/utils/assert-valid-file-or-directory-path.d.ts +0 -26
- package/dist/utils/parse-json.d.ts +0 -5
- package/dist/utils/strip-json-comments.d.ts +0 -44
- package/dist/write/utils/to-uint-8-array.d.ts +0 -2
- package/dist/write/write-file-sync.d.ts +0 -30
- package/dist/write/write-file.d.ts +0 -30
- package/dist/write/write-json-sync.d.ts +0 -29
- package/dist/write/write-json.d.ts +0 -30
- package/dist/write/write-yaml-sync.d.ts +0 -4
- package/dist/write/write-yaml.d.ts +0 -4
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
var isExtglob;
|
|
2
|
+
var hasRequiredIsExtglob;
|
|
3
|
+
|
|
4
|
+
function requireIsExtglob () {
|
|
5
|
+
if (hasRequiredIsExtglob) return isExtglob;
|
|
6
|
+
hasRequiredIsExtglob = 1;
|
|
7
|
+
/*!
|
|
8
|
+
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
11
|
+
* Licensed under the MIT License.
|
|
12
|
+
*/
|
|
13
|
+
isExtglob = function isExtglob(str) {
|
|
14
|
+
if (typeof str !== "string" || str === "") {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
var match;
|
|
18
|
+
while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) {
|
|
19
|
+
if (match[2]) return true;
|
|
20
|
+
str = str.slice(match.index + match[0].length);
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
};
|
|
24
|
+
return isExtglob;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var isGlob;
|
|
28
|
+
var hasRequiredIsGlob;
|
|
29
|
+
|
|
30
|
+
function requireIsGlob () {
|
|
31
|
+
if (hasRequiredIsGlob) return isGlob;
|
|
32
|
+
hasRequiredIsGlob = 1;
|
|
33
|
+
/*!
|
|
34
|
+
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
35
|
+
*
|
|
36
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
37
|
+
* Released under the MIT License.
|
|
38
|
+
*/
|
|
39
|
+
var isExtglob = requireIsExtglob();
|
|
40
|
+
var chars = { "{": "}", "(": ")", "[": "]" };
|
|
41
|
+
var strictCheck = function(str) {
|
|
42
|
+
if (str[0] === "!") {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
var index = 0;
|
|
46
|
+
var pipeIndex = -2;
|
|
47
|
+
var closeSquareIndex = -2;
|
|
48
|
+
var closeCurlyIndex = -2;
|
|
49
|
+
var closeParenIndex = -2;
|
|
50
|
+
var backSlashIndex = -2;
|
|
51
|
+
while (index < str.length) {
|
|
52
|
+
if (str[index] === "*") {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") {
|
|
59
|
+
if (closeSquareIndex < index) {
|
|
60
|
+
closeSquareIndex = str.indexOf("]", index);
|
|
61
|
+
}
|
|
62
|
+
if (closeSquareIndex > index) {
|
|
63
|
+
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
backSlashIndex = str.indexOf("\\", index);
|
|
67
|
+
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") {
|
|
73
|
+
closeCurlyIndex = str.indexOf("}", index);
|
|
74
|
+
if (closeCurlyIndex > index) {
|
|
75
|
+
backSlashIndex = str.indexOf("\\", index);
|
|
76
|
+
if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")") {
|
|
82
|
+
closeParenIndex = str.indexOf(")", index);
|
|
83
|
+
if (closeParenIndex > index) {
|
|
84
|
+
backSlashIndex = str.indexOf("\\", index);
|
|
85
|
+
if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") {
|
|
91
|
+
if (pipeIndex < index) {
|
|
92
|
+
pipeIndex = str.indexOf("|", index);
|
|
93
|
+
}
|
|
94
|
+
if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") {
|
|
95
|
+
closeParenIndex = str.indexOf(")", pipeIndex);
|
|
96
|
+
if (closeParenIndex > pipeIndex) {
|
|
97
|
+
backSlashIndex = str.indexOf("\\", pipeIndex);
|
|
98
|
+
if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (str[index] === "\\") {
|
|
105
|
+
var open = str[index + 1];
|
|
106
|
+
index += 2;
|
|
107
|
+
var close = chars[open];
|
|
108
|
+
if (close) {
|
|
109
|
+
var n = str.indexOf(close, index);
|
|
110
|
+
if (n !== -1) {
|
|
111
|
+
index = n + 1;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (str[index] === "!") {
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
} else {
|
|
118
|
+
index++;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return false;
|
|
122
|
+
};
|
|
123
|
+
var relaxedCheck = function(str) {
|
|
124
|
+
if (str[0] === "!") {
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
var index = 0;
|
|
128
|
+
while (index < str.length) {
|
|
129
|
+
if (/[*?{}()[\]]/.test(str[index])) {
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
if (str[index] === "\\") {
|
|
133
|
+
var open = str[index + 1];
|
|
134
|
+
index += 2;
|
|
135
|
+
var close = chars[open];
|
|
136
|
+
if (close) {
|
|
137
|
+
var n = str.indexOf(close, index);
|
|
138
|
+
if (n !== -1) {
|
|
139
|
+
index = n + 1;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (str[index] === "!") {
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
} else {
|
|
146
|
+
index++;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return false;
|
|
150
|
+
};
|
|
151
|
+
isGlob = function isGlob(str, options) {
|
|
152
|
+
if (typeof str !== "string" || str === "") {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
if (isExtglob(str)) {
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
158
|
+
var check = strictCheck;
|
|
159
|
+
if (options && options.strict === false) {
|
|
160
|
+
check = relaxedCheck;
|
|
161
|
+
}
|
|
162
|
+
return check(str);
|
|
163
|
+
};
|
|
164
|
+
return isGlob;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export { requireIsGlob as r };
|