@telia-ace/alliance-utilities 1.0.3-next.0 → 1.0.3
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 +13 -0
- package/dist/index.js +793 -921
- package/dist/index.js.map +1 -1
- package/dist/translations.d.ts +21 -24
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { pipeline as
|
|
7
|
-
var
|
|
8
|
-
const
|
|
1
|
+
var Yt = Object.defineProperty;
|
|
2
|
+
var Vt = (e, t, n) => t in e ? Yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var se = (e, t, n) => (Vt(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
import it from "fs";
|
|
5
|
+
import M from "path";
|
|
6
|
+
import { pipeline as zt } from "stream/promises";
|
|
7
|
+
var ot = /* @__PURE__ */ ((e) => (e[e.Yes = 0] = "Yes", e[e.No = 1] = "No", e[e.Done = 2] = "Done", e[e.NoWorkspaceName = 3] = "NoWorkspaceName", e[e.NoAppName = 4] = "NoAppName", e[e.AlreadyExists = 5] = "AlreadyExists", e[e.CwdIsNotWorkspace = 6] = "CwdIsNotWorkspace", e[e.NoAppOrWorkspaceInCurrentDirectory = 7] = "NoAppOrWorkspaceInCurrentDirectory", e[e.UnrecognizedCommand = 8] = "UnrecognizedCommand", e[e.WorkspaceCreated = 9] = "WorkspaceCreated", e[e.AppCreated = 10] = "AppCreated", e[e.ServedStopped = 11] = "ServedStopped", e[e.WorkspaceNameInquiry = 12] = "WorkspaceNameInquiry", e[e.AppNameInquiry = 13] = "AppNameInquiry", e[e.GatewayInquiry = 14] = "GatewayInquiry", e[e.CliVersionOption = 15] = "CliVersionOption", e[e.CreateWorkspaceDescription = 16] = "CreateWorkspaceDescription", e[e.CreateAppDescription = 17] = "CreateAppDescription", e[e.ServeDescription = 18] = "ServeDescription", e[e.BuildDescription = 19] = "BuildDescription", e[e.MissingTranslationKey = 20] = "MissingTranslationKey", e[e.ActionErrorOccured = 21] = "ActionErrorOccured", e[e.OperationStateSetError = 22] = "OperationStateSetError", e[e.OperationCancelled = 23] = "OperationCancelled", e[e.StopServerInstructions = 24] = "StopServerInstructions", e[e.LanguageInquiry = 25] = "LanguageInquiry", e[e.TemplateInquiry = 26] = "TemplateInquiry", e[e.DevServerPortDescription = 27] = "DevServerPortDescription", e[e.ApiGatewayPortDescription = 28] = "ApiGatewayPortDescription", e[e.ApiServerModeDescription = 29] = "ApiServerModeDescription", e[e.DevServerOpenDescription = 30] = "DevServerOpenDescription", e[e.BuildWatchDescription = 31] = "BuildWatchDescription", e[e.CouldNotStartGatewayInDocker = 32] = "CouldNotStartGatewayInDocker", e[e.PullingLatestImage = 33] = "PullingLatestImage", e[e.PullLatestImageError = 34] = "PullLatestImageError", e[e.AppEntryBuildOptionDescription = 35] = "AppEntryBuildOptionDescription", e[e.ManifestEntryBuildOptionDescription = 36] = "ManifestEntryBuildOptionDescription", e[e.BuildModeOptionDescription = 37] = "BuildModeOptionDescription", e[e.FetchPackageVersionError = 38] = "FetchPackageVersionError", e[e.UnknownArgumentDescription = 39] = "UnknownArgumentDescription", e[e.DockerNotStartedOrInstalled = 40] = "DockerNotStartedOrInstalled", e[e.PressAnyKeyToContinue = 41] = "PressAnyKeyToContinue", e[e.EnableDevAuthentication = 42] = "EnableDevAuthentication", e[e.NoAppNameFound = 43] = "NoAppNameFound", e[e.AppConfigurationPath = 44] = "AppConfigurationPath", e[e.ServerGatewayMode = 45] = "ServerGatewayMode", e[e.ServerProxyMode = 46] = "ServerProxyMode", e[e.ServerMode = 47] = "ServerMode", e))(ot || {});
|
|
8
|
+
const Qt = {
|
|
9
9
|
[0]: "Yes",
|
|
10
10
|
[1]: "No",
|
|
11
11
|
[2]: "Done",
|
|
@@ -34,149 +34,152 @@ const fn = {
|
|
|
34
34
|
`,
|
|
35
35
|
[25]: "Select preferred language",
|
|
36
36
|
[26]: "Select preferred framework template",
|
|
37
|
-
[27]: "
|
|
38
|
-
[28]: "The port that the
|
|
39
|
-
[29]: "
|
|
40
|
-
[30]: "
|
|
41
|
-
[31]: "Whether the
|
|
42
|
-
[32]: "
|
|
43
|
-
[33]: "
|
|
44
|
-
[34]: "
|
|
45
|
-
[35]: "
|
|
46
|
-
[36]: "The entry file for the app (./src/
|
|
47
|
-
[37]: "
|
|
48
|
-
[38]: "
|
|
49
|
-
[39]: "
|
|
50
|
-
[40]: "
|
|
51
|
-
[41]: "
|
|
52
|
-
[42]: "
|
|
53
|
-
[43]: "
|
|
54
|
-
[44]: "
|
|
55
|
-
[
|
|
56
|
-
[46]: "
|
|
57
|
-
[
|
|
58
|
-
|
|
59
|
-
[49]: "Server with proxy",
|
|
60
|
-
[48]: "Server with gateway"
|
|
61
|
-
}, $e = class {
|
|
37
|
+
[27]: "The port that the dev server should use.",
|
|
38
|
+
[28]: "The port that the api gateway should use.",
|
|
39
|
+
[29]: "Which components to start. [server|server-proxy|server-gateway].",
|
|
40
|
+
[30]: "Whether the dev server should automatically open in your browser or not.",
|
|
41
|
+
[31]: "Whether the build should start watching and rebuild when files change or not.",
|
|
42
|
+
[32]: "Could not start Docker container with Alliance gateway.",
|
|
43
|
+
[33]: "Pulling latest image...",
|
|
44
|
+
[34]: "Error when pulling latest image...",
|
|
45
|
+
[35]: "The entry file for the app (./src/app).",
|
|
46
|
+
[36]: "The entry file for the app manifest (./src/manifest).",
|
|
47
|
+
[37]: "Which mode to use when building the app. [production|development]",
|
|
48
|
+
[38]: "Failed to fetch package info from the NPM registry for package '${0}'!",
|
|
49
|
+
[39]: "Unknown value '{0}' for argument '{1}'",
|
|
50
|
+
[40]: "Docker not started or not installed.",
|
|
51
|
+
[41]: "Press any key to continue...",
|
|
52
|
+
[42]: "Whether user authentication should be enabled or not.",
|
|
53
|
+
[43]: "Could not find app name in manifest.",
|
|
54
|
+
[44]: "The path to the app configuration file.",
|
|
55
|
+
[47]: "Server",
|
|
56
|
+
[46]: "Server with proxy",
|
|
57
|
+
[45]: "Server with gateway"
|
|
58
|
+
}, Se = class {
|
|
62
59
|
};
|
|
63
|
-
let
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
if (!
|
|
60
|
+
let te = Se;
|
|
61
|
+
se(te, "getTranslations", () => Qt), se(te, "getTranslation", (t, ...n) => {
|
|
62
|
+
const r = Se.getTranslations()[t];
|
|
63
|
+
if (!r)
|
|
67
64
|
throw new Error(`Could not find text with given key '${t}'.`);
|
|
68
65
|
return n.reduce(
|
|
69
66
|
(c, a, f) => c.toString().replace(`{${f}}`, a.toString()),
|
|
70
|
-
|
|
67
|
+
r
|
|
71
68
|
).toString();
|
|
72
|
-
}),
|
|
73
|
-
var
|
|
74
|
-
function
|
|
69
|
+
}), se(te, "get", (t = ot.MissingTranslationKey, ...n) => Se.getTranslation(t, ...n));
|
|
70
|
+
var Oe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
71
|
+
function Ht(e) {
|
|
75
72
|
var t = e.default;
|
|
76
73
|
if (typeof t == "function") {
|
|
77
|
-
var n = function() {
|
|
74
|
+
var n = function i() {
|
|
75
|
+
if (this instanceof i) {
|
|
76
|
+
var r = [null];
|
|
77
|
+
r.push.apply(r, arguments);
|
|
78
|
+
var o = Function.bind.apply(t, r);
|
|
79
|
+
return new o();
|
|
80
|
+
}
|
|
78
81
|
return t.apply(this, arguments);
|
|
79
82
|
};
|
|
80
83
|
n.prototype = t.prototype;
|
|
81
84
|
} else
|
|
82
85
|
n = {};
|
|
83
|
-
return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(
|
|
84
|
-
var
|
|
85
|
-
Object.defineProperty(n,
|
|
86
|
+
return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(i) {
|
|
87
|
+
var r = Object.getOwnPropertyDescriptor(e, i);
|
|
88
|
+
Object.defineProperty(n, i, r.get ? r : {
|
|
86
89
|
enumerable: !0,
|
|
87
90
|
get: function() {
|
|
88
|
-
return e[
|
|
91
|
+
return e[i];
|
|
89
92
|
}
|
|
90
93
|
});
|
|
91
94
|
}), n;
|
|
92
95
|
}
|
|
93
|
-
var
|
|
94
|
-
|
|
96
|
+
var z = {}, W = {};
|
|
97
|
+
W.fromCallback = function(e) {
|
|
95
98
|
return Object.defineProperty(function(...t) {
|
|
96
99
|
if (typeof t[t.length - 1] == "function")
|
|
97
100
|
e.apply(this, t);
|
|
98
101
|
else
|
|
99
|
-
return new Promise((n,
|
|
102
|
+
return new Promise((n, i) => {
|
|
100
103
|
e.call(
|
|
101
104
|
this,
|
|
102
105
|
...t,
|
|
103
|
-
(
|
|
106
|
+
(r, o) => r != null ? i(r) : n(o)
|
|
104
107
|
);
|
|
105
108
|
});
|
|
106
109
|
}, "name", { value: e.name });
|
|
107
110
|
};
|
|
108
|
-
|
|
111
|
+
W.fromPromise = function(e) {
|
|
109
112
|
return Object.defineProperty(function(...t) {
|
|
110
113
|
const n = t[t.length - 1];
|
|
111
114
|
if (typeof n != "function")
|
|
112
115
|
return e.apply(this, t);
|
|
113
|
-
e.apply(this, t.slice(0, -1)).then((
|
|
116
|
+
e.apply(this, t.slice(0, -1)).then((i) => n(null, i), n);
|
|
114
117
|
}, "name", { value: e.name });
|
|
115
118
|
};
|
|
116
|
-
const
|
|
119
|
+
const Xt = {}, Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
117
120
|
__proto__: null,
|
|
118
|
-
default:
|
|
119
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
120
|
-
var
|
|
121
|
+
default: Xt
|
|
122
|
+
}, Symbol.toStringTag, { value: "Module" })), ae = /* @__PURE__ */ Ht(Zt);
|
|
123
|
+
var q = ae, Tt = process.cwd, de = null, Kt = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
121
124
|
process.cwd = function() {
|
|
122
|
-
return
|
|
125
|
+
return de || (de = Tt.call(process)), de;
|
|
123
126
|
};
|
|
124
127
|
try {
|
|
125
128
|
process.cwd();
|
|
126
129
|
} catch {
|
|
127
130
|
}
|
|
128
131
|
if (typeof process.chdir == "function") {
|
|
129
|
-
var
|
|
132
|
+
var qe = process.chdir;
|
|
130
133
|
process.chdir = function(e) {
|
|
131
|
-
|
|
132
|
-
}, Object.setPrototypeOf && Object.setPrototypeOf(process.chdir,
|
|
134
|
+
de = null, qe.call(process, e);
|
|
135
|
+
}, Object.setPrototypeOf && Object.setPrototypeOf(process.chdir, qe);
|
|
133
136
|
}
|
|
134
|
-
var
|
|
135
|
-
function
|
|
136
|
-
|
|
137
|
+
var en = tn;
|
|
138
|
+
function tn(e) {
|
|
139
|
+
q.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) && t(e), e.lutimes || n(e), e.chown = o(e.chown), e.fchown = o(e.fchown), e.lchown = o(e.lchown), e.chmod = i(e.chmod), e.fchmod = i(e.fchmod), e.lchmod = i(e.lchmod), e.chownSync = c(e.chownSync), e.fchownSync = c(e.fchownSync), e.lchownSync = c(e.lchownSync), e.chmodSync = r(e.chmodSync), e.fchmodSync = r(e.fchmodSync), e.lchmodSync = r(e.lchmodSync), e.stat = a(e.stat), e.fstat = a(e.fstat), e.lstat = a(e.lstat), e.statSync = f(e.statSync), e.fstatSync = f(e.fstatSync), e.lstatSync = f(e.lstatSync), e.chmod && !e.lchmod && (e.lchmod = function(u, s, m) {
|
|
137
140
|
m && process.nextTick(m);
|
|
138
141
|
}, e.lchmodSync = function() {
|
|
139
142
|
}), e.chown && !e.lchown && (e.lchown = function(u, s, m, l) {
|
|
140
143
|
l && process.nextTick(l);
|
|
141
144
|
}, e.lchownSync = function() {
|
|
142
|
-
}),
|
|
145
|
+
}), Kt === "win32" && (e.rename = typeof e.rename != "function" ? e.rename : function(u) {
|
|
143
146
|
function s(m, l, y) {
|
|
144
|
-
var g = Date.now(),
|
|
145
|
-
u(m, l, function $(
|
|
146
|
-
if (
|
|
147
|
+
var g = Date.now(), v = 0;
|
|
148
|
+
u(m, l, function $(B) {
|
|
149
|
+
if (B && (B.code === "EACCES" || B.code === "EPERM") && Date.now() - g < 6e4) {
|
|
147
150
|
setTimeout(function() {
|
|
148
|
-
e.stat(l, function(
|
|
149
|
-
|
|
151
|
+
e.stat(l, function(A, ee) {
|
|
152
|
+
A && A.code === "ENOENT" ? u(m, l, $) : y(B);
|
|
150
153
|
});
|
|
151
|
-
},
|
|
154
|
+
}, v), v < 100 && (v += 10);
|
|
152
155
|
return;
|
|
153
156
|
}
|
|
154
|
-
y && y(
|
|
157
|
+
y && y(B);
|
|
155
158
|
});
|
|
156
159
|
}
|
|
157
160
|
return Object.setPrototypeOf && Object.setPrototypeOf(s, u), s;
|
|
158
161
|
}(e.rename)), e.read = typeof e.read != "function" ? e.read : function(u) {
|
|
159
|
-
function s(m, l, y, g,
|
|
160
|
-
var
|
|
162
|
+
function s(m, l, y, g, v, $) {
|
|
163
|
+
var B;
|
|
161
164
|
if ($ && typeof $ == "function") {
|
|
162
|
-
var
|
|
163
|
-
|
|
164
|
-
if (
|
|
165
|
-
return
|
|
165
|
+
var A = 0;
|
|
166
|
+
B = function(ee, Je, be) {
|
|
167
|
+
if (ee && ee.code === "EAGAIN" && A < 10)
|
|
168
|
+
return A++, u.call(e, m, l, y, g, v, B);
|
|
166
169
|
$.apply(this, arguments);
|
|
167
170
|
};
|
|
168
171
|
}
|
|
169
|
-
return u.call(e, m, l, y, g,
|
|
172
|
+
return u.call(e, m, l, y, g, v, B);
|
|
170
173
|
}
|
|
171
174
|
return Object.setPrototypeOf && Object.setPrototypeOf(s, u), s;
|
|
172
175
|
}(e.read), e.readSync = typeof e.readSync != "function" ? e.readSync : function(u) {
|
|
173
176
|
return function(s, m, l, y, g) {
|
|
174
|
-
for (var
|
|
177
|
+
for (var v = 0; ; )
|
|
175
178
|
try {
|
|
176
179
|
return u.call(e, s, m, l, y, g);
|
|
177
180
|
} catch ($) {
|
|
178
|
-
if ($.code === "EAGAIN" &&
|
|
179
|
-
|
|
181
|
+
if ($.code === "EAGAIN" && v < 10) {
|
|
182
|
+
v++;
|
|
180
183
|
continue;
|
|
181
184
|
}
|
|
182
185
|
throw $;
|
|
@@ -187,22 +190,22 @@ function pn(e) {
|
|
|
187
190
|
u.lchmod = function(s, m, l) {
|
|
188
191
|
u.open(
|
|
189
192
|
s,
|
|
190
|
-
|
|
193
|
+
q.O_WRONLY | q.O_SYMLINK,
|
|
191
194
|
m,
|
|
192
195
|
function(y, g) {
|
|
193
196
|
if (y) {
|
|
194
197
|
l && l(y);
|
|
195
198
|
return;
|
|
196
199
|
}
|
|
197
|
-
u.fchmod(g, m, function(
|
|
200
|
+
u.fchmod(g, m, function(v) {
|
|
198
201
|
u.close(g, function($) {
|
|
199
|
-
l && l(
|
|
202
|
+
l && l(v || $);
|
|
200
203
|
});
|
|
201
204
|
});
|
|
202
205
|
}
|
|
203
206
|
);
|
|
204
207
|
}, u.lchmodSync = function(s, m) {
|
|
205
|
-
var l = u.openSync(s,
|
|
208
|
+
var l = u.openSync(s, q.O_WRONLY | q.O_SYMLINK, m), y = !0, g;
|
|
206
209
|
try {
|
|
207
210
|
g = u.fchmodSync(l, m), y = !1;
|
|
208
211
|
} finally {
|
|
@@ -218,24 +221,24 @@ function pn(e) {
|
|
|
218
221
|
};
|
|
219
222
|
}
|
|
220
223
|
function n(u) {
|
|
221
|
-
|
|
222
|
-
u.open(s,
|
|
224
|
+
q.hasOwnProperty("O_SYMLINK") && u.futimes ? (u.lutimes = function(s, m, l, y) {
|
|
225
|
+
u.open(s, q.O_SYMLINK, function(g, v) {
|
|
223
226
|
if (g) {
|
|
224
227
|
y && y(g);
|
|
225
228
|
return;
|
|
226
229
|
}
|
|
227
|
-
u.futimes(
|
|
228
|
-
u.close(
|
|
229
|
-
y && y($ ||
|
|
230
|
+
u.futimes(v, m, l, function($) {
|
|
231
|
+
u.close(v, function(B) {
|
|
232
|
+
y && y($ || B);
|
|
230
233
|
});
|
|
231
234
|
});
|
|
232
235
|
});
|
|
233
236
|
}, u.lutimesSync = function(s, m, l) {
|
|
234
|
-
var y = u.openSync(s,
|
|
237
|
+
var y = u.openSync(s, q.O_SYMLINK), g, v = !0;
|
|
235
238
|
try {
|
|
236
|
-
g = u.futimesSync(y, m, l),
|
|
239
|
+
g = u.futimesSync(y, m, l), v = !1;
|
|
237
240
|
} finally {
|
|
238
|
-
if (
|
|
241
|
+
if (v)
|
|
239
242
|
try {
|
|
240
243
|
u.closeSync(y);
|
|
241
244
|
} catch {
|
|
@@ -249,19 +252,19 @@ function pn(e) {
|
|
|
249
252
|
}, u.lutimesSync = function() {
|
|
250
253
|
});
|
|
251
254
|
}
|
|
252
|
-
function
|
|
255
|
+
function i(u) {
|
|
253
256
|
return u && function(s, m, l) {
|
|
254
257
|
return u.call(e, s, m, function(y) {
|
|
255
|
-
|
|
258
|
+
p(y) && (y = null), l && l.apply(this, arguments);
|
|
256
259
|
});
|
|
257
260
|
};
|
|
258
261
|
}
|
|
259
|
-
function
|
|
262
|
+
function r(u) {
|
|
260
263
|
return u && function(s, m) {
|
|
261
264
|
try {
|
|
262
265
|
return u.call(e, s, m);
|
|
263
266
|
} catch (l) {
|
|
264
|
-
if (!
|
|
267
|
+
if (!p(l))
|
|
265
268
|
throw l;
|
|
266
269
|
}
|
|
267
270
|
};
|
|
@@ -269,7 +272,7 @@ function pn(e) {
|
|
|
269
272
|
function o(u) {
|
|
270
273
|
return u && function(s, m, l, y) {
|
|
271
274
|
return u.call(e, s, m, l, function(g) {
|
|
272
|
-
|
|
275
|
+
p(g) && (g = null), y && y.apply(this, arguments);
|
|
273
276
|
});
|
|
274
277
|
};
|
|
275
278
|
}
|
|
@@ -278,7 +281,7 @@ function pn(e) {
|
|
|
278
281
|
try {
|
|
279
282
|
return u.call(e, s, m, l);
|
|
280
283
|
} catch (y) {
|
|
281
|
-
if (!
|
|
284
|
+
if (!p(y))
|
|
282
285
|
throw y;
|
|
283
286
|
}
|
|
284
287
|
};
|
|
@@ -286,8 +289,8 @@ function pn(e) {
|
|
|
286
289
|
function a(u) {
|
|
287
290
|
return u && function(s, m, l) {
|
|
288
291
|
typeof m == "function" && (l = m, m = null);
|
|
289
|
-
function y(g,
|
|
290
|
-
|
|
292
|
+
function y(g, v) {
|
|
293
|
+
v && (v.uid < 0 && (v.uid += 4294967296), v.gid < 0 && (v.gid += 4294967296)), l && l.apply(this, arguments);
|
|
291
294
|
}
|
|
292
295
|
return m ? u.call(e, s, m, y) : u.call(e, s, y);
|
|
293
296
|
};
|
|
@@ -298,28 +301,28 @@ function pn(e) {
|
|
|
298
301
|
return l && (l.uid < 0 && (l.uid += 4294967296), l.gid < 0 && (l.gid += 4294967296)), l;
|
|
299
302
|
};
|
|
300
303
|
}
|
|
301
|
-
function
|
|
304
|
+
function p(u) {
|
|
302
305
|
if (!u || u.code === "ENOSYS")
|
|
303
306
|
return !0;
|
|
304
307
|
var s = !process.getuid || process.getuid() !== 0;
|
|
305
308
|
return !!(s && (u.code === "EINVAL" || u.code === "EPERM"));
|
|
306
309
|
}
|
|
307
310
|
}
|
|
308
|
-
var
|
|
309
|
-
function
|
|
311
|
+
var Ue = ae.Stream, nn = rn;
|
|
312
|
+
function rn(e) {
|
|
310
313
|
return {
|
|
311
314
|
ReadStream: t,
|
|
312
315
|
WriteStream: n
|
|
313
316
|
};
|
|
314
|
-
function t(
|
|
317
|
+
function t(i, r) {
|
|
315
318
|
if (!(this instanceof t))
|
|
316
|
-
return new t(
|
|
317
|
-
|
|
319
|
+
return new t(i, r);
|
|
320
|
+
Ue.call(this);
|
|
318
321
|
var o = this;
|
|
319
|
-
this.path =
|
|
320
|
-
for (var c = Object.keys(
|
|
321
|
-
var
|
|
322
|
-
this[
|
|
322
|
+
this.path = i, this.fd = null, this.readable = !0, this.paused = !1, this.flags = "r", this.mode = 438, this.bufferSize = 64 * 1024, r = r || {};
|
|
323
|
+
for (var c = Object.keys(r), a = 0, f = c.length; a < f; a++) {
|
|
324
|
+
var p = c[a];
|
|
325
|
+
this[p] = r[p];
|
|
323
326
|
}
|
|
324
327
|
if (this.encoding && this.setEncoding(this.encoding), this.start !== void 0) {
|
|
325
328
|
if (typeof this.start != "number")
|
|
@@ -346,13 +349,13 @@ function wn(e) {
|
|
|
346
349
|
o.fd = s, o.emit("open", s), o._read();
|
|
347
350
|
});
|
|
348
351
|
}
|
|
349
|
-
function n(
|
|
352
|
+
function n(i, r) {
|
|
350
353
|
if (!(this instanceof n))
|
|
351
|
-
return new n(
|
|
352
|
-
|
|
353
|
-
for (var o = Object.keys(
|
|
354
|
+
return new n(i, r);
|
|
355
|
+
Ue.call(this), this.path = i, this.fd = null, this.writable = !0, this.flags = "w", this.encoding = "binary", this.mode = 438, this.bytesWritten = 0, r = r || {};
|
|
356
|
+
for (var o = Object.keys(r), c = 0, a = o.length; c < a; c++) {
|
|
354
357
|
var f = o[c];
|
|
355
|
-
this[f] =
|
|
358
|
+
this[f] = r[f];
|
|
356
359
|
}
|
|
357
360
|
if (this.start !== void 0) {
|
|
358
361
|
if (typeof this.start != "number")
|
|
@@ -364,145 +367,145 @@ function wn(e) {
|
|
|
364
367
|
this.busy = !1, this._queue = [], this.fd === null && (this._open = e.open, this._queue.push([this._open, this.path, this.flags, this.mode, void 0]), this.flush());
|
|
365
368
|
}
|
|
366
369
|
}
|
|
367
|
-
var
|
|
370
|
+
var on = un, cn = Object.getPrototypeOf || function(e) {
|
|
368
371
|
return e.__proto__;
|
|
369
372
|
};
|
|
370
|
-
function
|
|
373
|
+
function un(e) {
|
|
371
374
|
if (e === null || typeof e != "object")
|
|
372
375
|
return e;
|
|
373
376
|
if (e instanceof Object)
|
|
374
|
-
var t = { __proto__:
|
|
377
|
+
var t = { __proto__: cn(e) };
|
|
375
378
|
else
|
|
376
379
|
var t = /* @__PURE__ */ Object.create(null);
|
|
377
380
|
return Object.getOwnPropertyNames(e).forEach(function(n) {
|
|
378
381
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(e, n));
|
|
379
382
|
}), t;
|
|
380
383
|
}
|
|
381
|
-
var
|
|
382
|
-
typeof Symbol == "function" && typeof Symbol.for == "function" ? (
|
|
383
|
-
function
|
|
384
|
+
var F = it, an = en, fn = nn, sn = on, le = ae, I, he;
|
|
385
|
+
typeof Symbol == "function" && typeof Symbol.for == "function" ? (I = Symbol.for("graceful-fs.queue"), he = Symbol.for("graceful-fs.previous")) : (I = "___graceful-fs.queue", he = "___graceful-fs.previous");
|
|
386
|
+
function ln() {
|
|
384
387
|
}
|
|
385
|
-
function
|
|
386
|
-
Object.defineProperty(e,
|
|
388
|
+
function ct(e, t) {
|
|
389
|
+
Object.defineProperty(e, I, {
|
|
387
390
|
get: function() {
|
|
388
391
|
return t;
|
|
389
392
|
}
|
|
390
393
|
});
|
|
391
394
|
}
|
|
392
|
-
var
|
|
393
|
-
|
|
394
|
-
var e =
|
|
395
|
+
var V = ln;
|
|
396
|
+
le.debuglog ? V = le.debuglog("gfs4") : /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && (V = function() {
|
|
397
|
+
var e = le.format.apply(le, arguments);
|
|
395
398
|
e = "GFS4: " + e.split(/\n/).join(`
|
|
396
399
|
GFS4: `), console.error(e);
|
|
397
400
|
});
|
|
398
|
-
if (!
|
|
399
|
-
var
|
|
400
|
-
|
|
401
|
-
function t(n,
|
|
402
|
-
return e.call(
|
|
403
|
-
|
|
401
|
+
if (!F[I]) {
|
|
402
|
+
var mn = Oe[I] || [];
|
|
403
|
+
ct(F, mn), F.close = function(e) {
|
|
404
|
+
function t(n, i) {
|
|
405
|
+
return e.call(F, n, function(r) {
|
|
406
|
+
r || Ge(), typeof i == "function" && i.apply(this, arguments);
|
|
404
407
|
});
|
|
405
408
|
}
|
|
406
|
-
return Object.defineProperty(t,
|
|
409
|
+
return Object.defineProperty(t, he, {
|
|
407
410
|
value: e
|
|
408
411
|
}), t;
|
|
409
|
-
}(
|
|
412
|
+
}(F.close), F.closeSync = function(e) {
|
|
410
413
|
function t(n) {
|
|
411
|
-
e.apply(
|
|
414
|
+
e.apply(F, arguments), Ge();
|
|
412
415
|
}
|
|
413
|
-
return Object.defineProperty(t,
|
|
416
|
+
return Object.defineProperty(t, he, {
|
|
414
417
|
value: e
|
|
415
418
|
}), t;
|
|
416
|
-
}(
|
|
417
|
-
|
|
419
|
+
}(F.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
|
|
420
|
+
V(F[I]), ae.equal(F[I].length, 0);
|
|
418
421
|
});
|
|
419
422
|
}
|
|
420
|
-
|
|
421
|
-
var R =
|
|
422
|
-
process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
423
|
-
function
|
|
424
|
-
|
|
423
|
+
Oe[I] || ct(Oe, F[I]);
|
|
424
|
+
var R = Ae(sn(F));
|
|
425
|
+
process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !F.__patched && (R = Ae(F), F.__patched = !0);
|
|
426
|
+
function Ae(e) {
|
|
427
|
+
an(e), e.gracefulify = Ae, e.createReadStream = Je, e.createWriteStream = be;
|
|
425
428
|
var t = e.readFile;
|
|
426
429
|
e.readFile = n;
|
|
427
|
-
function n(d, S,
|
|
428
|
-
return typeof S == "function" && (
|
|
429
|
-
function C(
|
|
430
|
-
return t(
|
|
431
|
-
|
|
430
|
+
function n(d, S, h) {
|
|
431
|
+
return typeof S == "function" && (h = S, S = null), C(d, S, h);
|
|
432
|
+
function C(N, P, E, D) {
|
|
433
|
+
return t(N, P, function(w) {
|
|
434
|
+
w && (w.code === "EMFILE" || w.code === "ENFILE") ? H([C, [N, P, E], w, D || Date.now(), Date.now()]) : typeof E == "function" && E.apply(this, arguments);
|
|
432
435
|
});
|
|
433
436
|
}
|
|
434
437
|
}
|
|
435
|
-
var
|
|
436
|
-
e.writeFile =
|
|
437
|
-
function
|
|
438
|
-
return typeof
|
|
439
|
-
function
|
|
440
|
-
return
|
|
441
|
-
k && (k.code === "EMFILE" || k.code === "ENFILE") ? H([
|
|
438
|
+
var i = e.writeFile;
|
|
439
|
+
e.writeFile = r;
|
|
440
|
+
function r(d, S, h, C) {
|
|
441
|
+
return typeof h == "function" && (C = h, h = null), N(d, S, h, C);
|
|
442
|
+
function N(P, E, D, w, _) {
|
|
443
|
+
return i(P, E, D, function(k) {
|
|
444
|
+
k && (k.code === "EMFILE" || k.code === "ENFILE") ? H([N, [P, E, D, w], k, _ || Date.now(), Date.now()]) : typeof w == "function" && w.apply(this, arguments);
|
|
442
445
|
});
|
|
443
446
|
}
|
|
444
447
|
}
|
|
445
448
|
var o = e.appendFile;
|
|
446
449
|
o && (e.appendFile = c);
|
|
447
|
-
function c(d, S,
|
|
448
|
-
return typeof
|
|
449
|
-
function
|
|
450
|
-
return o(
|
|
451
|
-
k && (k.code === "EMFILE" || k.code === "ENFILE") ? H([
|
|
450
|
+
function c(d, S, h, C) {
|
|
451
|
+
return typeof h == "function" && (C = h, h = null), N(d, S, h, C);
|
|
452
|
+
function N(P, E, D, w, _) {
|
|
453
|
+
return o(P, E, D, function(k) {
|
|
454
|
+
k && (k.code === "EMFILE" || k.code === "ENFILE") ? H([N, [P, E, D, w], k, _ || Date.now(), Date.now()]) : typeof w == "function" && w.apply(this, arguments);
|
|
452
455
|
});
|
|
453
456
|
}
|
|
454
457
|
}
|
|
455
458
|
var a = e.copyFile;
|
|
456
459
|
a && (e.copyFile = f);
|
|
457
|
-
function f(d, S,
|
|
458
|
-
return typeof
|
|
459
|
-
function
|
|
460
|
-
return a(
|
|
461
|
-
k && (k.code === "EMFILE" || k.code === "ENFILE") ? H([
|
|
460
|
+
function f(d, S, h, C) {
|
|
461
|
+
return typeof h == "function" && (C = h, h = 0), N(d, S, h, C);
|
|
462
|
+
function N(P, E, D, w, _) {
|
|
463
|
+
return a(P, E, D, function(k) {
|
|
464
|
+
k && (k.code === "EMFILE" || k.code === "ENFILE") ? H([N, [P, E, D, w], k, _ || Date.now(), Date.now()]) : typeof w == "function" && w.apply(this, arguments);
|
|
462
465
|
});
|
|
463
466
|
}
|
|
464
467
|
}
|
|
465
|
-
var
|
|
468
|
+
var p = e.readdir;
|
|
466
469
|
e.readdir = s;
|
|
467
470
|
var u = /^v[0-5]\./;
|
|
468
|
-
function s(d, S,
|
|
469
|
-
typeof S == "function" && (
|
|
470
|
-
var C = u.test(process.version) ? function(
|
|
471
|
-
return
|
|
472
|
-
D,
|
|
473
|
-
F,
|
|
471
|
+
function s(d, S, h) {
|
|
472
|
+
typeof S == "function" && (h = S, S = null);
|
|
473
|
+
var C = u.test(process.version) ? function(E, D, w, _) {
|
|
474
|
+
return p(E, N(
|
|
474
475
|
E,
|
|
476
|
+
D,
|
|
477
|
+
w,
|
|
475
478
|
_
|
|
476
479
|
));
|
|
477
|
-
} : function(
|
|
478
|
-
return
|
|
479
|
-
D,
|
|
480
|
-
F,
|
|
480
|
+
} : function(E, D, w, _) {
|
|
481
|
+
return p(E, D, N(
|
|
481
482
|
E,
|
|
483
|
+
D,
|
|
484
|
+
w,
|
|
482
485
|
_
|
|
483
486
|
));
|
|
484
487
|
};
|
|
485
|
-
return C(d, S,
|
|
486
|
-
function
|
|
488
|
+
return C(d, S, h);
|
|
489
|
+
function N(P, E, D, w) {
|
|
487
490
|
return function(_, k) {
|
|
488
491
|
_ && (_.code === "EMFILE" || _.code === "ENFILE") ? H([
|
|
489
492
|
C,
|
|
490
|
-
[
|
|
493
|
+
[P, E, D],
|
|
491
494
|
_,
|
|
492
|
-
|
|
495
|
+
w || Date.now(),
|
|
493
496
|
Date.now()
|
|
494
|
-
]) : (k && k.sort && k.sort(), typeof
|
|
497
|
+
]) : (k && k.sort && k.sort(), typeof D == "function" && D.call(this, _, k));
|
|
495
498
|
};
|
|
496
499
|
}
|
|
497
500
|
}
|
|
498
501
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
499
|
-
var m =
|
|
500
|
-
$ = m.ReadStream,
|
|
502
|
+
var m = fn(e);
|
|
503
|
+
$ = m.ReadStream, A = m.WriteStream;
|
|
501
504
|
}
|
|
502
505
|
var l = e.ReadStream;
|
|
503
|
-
l && ($.prototype = Object.create(l.prototype), $.prototype.open =
|
|
506
|
+
l && ($.prototype = Object.create(l.prototype), $.prototype.open = B);
|
|
504
507
|
var y = e.WriteStream;
|
|
505
|
-
y && (
|
|
508
|
+
y && (A.prototype = Object.create(y.prototype), A.prototype.open = ee), Object.defineProperty(e, "ReadStream", {
|
|
506
509
|
get: function() {
|
|
507
510
|
return $;
|
|
508
511
|
},
|
|
@@ -513,10 +516,10 @@ function je(e) {
|
|
|
513
516
|
configurable: !0
|
|
514
517
|
}), Object.defineProperty(e, "WriteStream", {
|
|
515
518
|
get: function() {
|
|
516
|
-
return
|
|
519
|
+
return A;
|
|
517
520
|
},
|
|
518
521
|
set: function(d) {
|
|
519
|
-
|
|
522
|
+
A = d;
|
|
520
523
|
},
|
|
521
524
|
enumerable: !0,
|
|
522
525
|
configurable: !0
|
|
@@ -532,13 +535,13 @@ function je(e) {
|
|
|
532
535
|
enumerable: !0,
|
|
533
536
|
configurable: !0
|
|
534
537
|
});
|
|
535
|
-
var
|
|
538
|
+
var v = A;
|
|
536
539
|
Object.defineProperty(e, "FileWriteStream", {
|
|
537
540
|
get: function() {
|
|
538
|
-
return
|
|
541
|
+
return v;
|
|
539
542
|
},
|
|
540
543
|
set: function(d) {
|
|
541
|
-
|
|
544
|
+
v = d;
|
|
542
545
|
},
|
|
543
546
|
enumerable: !0,
|
|
544
547
|
configurable: !0
|
|
@@ -546,66 +549,66 @@ function je(e) {
|
|
|
546
549
|
function $(d, S) {
|
|
547
550
|
return this instanceof $ ? (l.apply(this, arguments), this) : $.apply(Object.create($.prototype), arguments);
|
|
548
551
|
}
|
|
549
|
-
function
|
|
552
|
+
function B() {
|
|
550
553
|
var d = this;
|
|
551
|
-
|
|
552
|
-
S ? (d.autoClose && d.destroy(), d.emit("error", S)) : (d.fd =
|
|
554
|
+
$e(d.path, d.flags, d.mode, function(S, h) {
|
|
555
|
+
S ? (d.autoClose && d.destroy(), d.emit("error", S)) : (d.fd = h, d.emit("open", h), d.read());
|
|
553
556
|
});
|
|
554
557
|
}
|
|
555
|
-
function
|
|
556
|
-
return this instanceof
|
|
558
|
+
function A(d, S) {
|
|
559
|
+
return this instanceof A ? (y.apply(this, arguments), this) : A.apply(Object.create(A.prototype), arguments);
|
|
557
560
|
}
|
|
558
|
-
function
|
|
561
|
+
function ee() {
|
|
559
562
|
var d = this;
|
|
560
|
-
|
|
561
|
-
S ? (d.destroy(), d.emit("error", S)) : (d.fd =
|
|
563
|
+
$e(d.path, d.flags, d.mode, function(S, h) {
|
|
564
|
+
S ? (d.destroy(), d.emit("error", S)) : (d.fd = h, d.emit("open", h));
|
|
562
565
|
});
|
|
563
566
|
}
|
|
564
|
-
function
|
|
567
|
+
function Je(d, S) {
|
|
565
568
|
return new e.ReadStream(d, S);
|
|
566
569
|
}
|
|
567
570
|
function be(d, S) {
|
|
568
571
|
return new e.WriteStream(d, S);
|
|
569
572
|
}
|
|
570
|
-
var
|
|
571
|
-
e.open =
|
|
572
|
-
function
|
|
573
|
-
return typeof
|
|
574
|
-
function
|
|
575
|
-
return
|
|
576
|
-
k && (k.code === "EMFILE" || k.code === "ENFILE") ? H([
|
|
573
|
+
var Gt = e.open;
|
|
574
|
+
e.open = $e;
|
|
575
|
+
function $e(d, S, h, C) {
|
|
576
|
+
return typeof h == "function" && (C = h, h = null), N(d, S, h, C);
|
|
577
|
+
function N(P, E, D, w, _) {
|
|
578
|
+
return Gt(P, E, D, function(k, Pi) {
|
|
579
|
+
k && (k.code === "EMFILE" || k.code === "ENFILE") ? H([N, [P, E, D, w], k, _ || Date.now(), Date.now()]) : typeof w == "function" && w.apply(this, arguments);
|
|
577
580
|
});
|
|
578
581
|
}
|
|
579
582
|
}
|
|
580
583
|
return e;
|
|
581
584
|
}
|
|
582
585
|
function H(e) {
|
|
583
|
-
|
|
584
|
-
}
|
|
585
|
-
var
|
|
586
|
-
function
|
|
587
|
-
for (var e = Date.now(), t = 0; t <
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
}
|
|
591
|
-
function
|
|
592
|
-
if (clearTimeout(
|
|
593
|
-
var e =
|
|
594
|
-
if (
|
|
595
|
-
|
|
596
|
-
else if (Date.now() -
|
|
597
|
-
|
|
586
|
+
V("ENQUEUE", e[0].name, e[1]), F[I].push(e), xe();
|
|
587
|
+
}
|
|
588
|
+
var me;
|
|
589
|
+
function Ge() {
|
|
590
|
+
for (var e = Date.now(), t = 0; t < F[I].length; ++t)
|
|
591
|
+
F[I][t].length > 2 && (F[I][t][3] = e, F[I][t][4] = e);
|
|
592
|
+
xe();
|
|
593
|
+
}
|
|
594
|
+
function xe() {
|
|
595
|
+
if (clearTimeout(me), me = void 0, F[I].length !== 0) {
|
|
596
|
+
var e = F[I].shift(), t = e[0], n = e[1], i = e[2], r = e[3], o = e[4];
|
|
597
|
+
if (r === void 0)
|
|
598
|
+
V("RETRY", t.name, n), t.apply(null, n);
|
|
599
|
+
else if (Date.now() - r >= 6e4) {
|
|
600
|
+
V("TIMEOUT", t.name, n);
|
|
598
601
|
var c = n.pop();
|
|
599
|
-
typeof c == "function" && c.call(null,
|
|
602
|
+
typeof c == "function" && c.call(null, i);
|
|
600
603
|
} else {
|
|
601
|
-
var a = Date.now() - o, f = Math.max(o -
|
|
602
|
-
a >=
|
|
604
|
+
var a = Date.now() - o, f = Math.max(o - r, 1), p = Math.min(f * 1.2, 100);
|
|
605
|
+
a >= p ? (V("RETRY", t.name, n), t.apply(null, n.concat([r]))) : F[I].push(e);
|
|
603
606
|
}
|
|
604
|
-
|
|
607
|
+
me === void 0 && (me = setTimeout(xe, 0));
|
|
605
608
|
}
|
|
606
609
|
}
|
|
607
610
|
(function(e) {
|
|
608
|
-
const t =
|
|
611
|
+
const t = W.fromCallback, n = R, i = [
|
|
609
612
|
"access",
|
|
610
613
|
"appendFile",
|
|
611
614
|
"chmod",
|
|
@@ -640,305 +643,328 @@ function Me() {
|
|
|
640
643
|
"unlink",
|
|
641
644
|
"utimes",
|
|
642
645
|
"writeFile"
|
|
643
|
-
].filter((
|
|
644
|
-
Object.assign(e, n),
|
|
645
|
-
e[
|
|
646
|
-
}), e.exists = function(
|
|
647
|
-
return typeof o == "function" ? n.exists(
|
|
648
|
-
}, e.read = function(
|
|
649
|
-
return typeof
|
|
650
|
-
n.read(
|
|
646
|
+
].filter((r) => typeof n[r] == "function");
|
|
647
|
+
Object.assign(e, n), i.forEach((r) => {
|
|
648
|
+
e[r] = t(n[r]);
|
|
649
|
+
}), e.exists = function(r, o) {
|
|
650
|
+
return typeof o == "function" ? n.exists(r, o) : new Promise((c) => n.exists(r, c));
|
|
651
|
+
}, e.read = function(r, o, c, a, f, p) {
|
|
652
|
+
return typeof p == "function" ? n.read(r, o, c, a, f, p) : new Promise((u, s) => {
|
|
653
|
+
n.read(r, o, c, a, f, (m, l, y) => {
|
|
651
654
|
if (m)
|
|
652
655
|
return s(m);
|
|
653
656
|
u({ bytesRead: l, buffer: y });
|
|
654
657
|
});
|
|
655
658
|
});
|
|
656
|
-
}, e.write = function(
|
|
657
|
-
return typeof c[c.length - 1] == "function" ? n.write(
|
|
658
|
-
n.write(
|
|
659
|
-
if (
|
|
660
|
-
return f(
|
|
659
|
+
}, e.write = function(r, o, ...c) {
|
|
660
|
+
return typeof c[c.length - 1] == "function" ? n.write(r, o, ...c) : new Promise((a, f) => {
|
|
661
|
+
n.write(r, o, ...c, (p, u, s) => {
|
|
662
|
+
if (p)
|
|
663
|
+
return f(p);
|
|
661
664
|
a({ bytesWritten: u, buffer: s });
|
|
662
665
|
});
|
|
663
666
|
});
|
|
664
|
-
},
|
|
665
|
-
return typeof c[c.length - 1] == "function" ? n.
|
|
666
|
-
n.
|
|
667
|
-
if (
|
|
668
|
-
return f(
|
|
667
|
+
}, e.readv = function(r, o, ...c) {
|
|
668
|
+
return typeof c[c.length - 1] == "function" ? n.readv(r, o, ...c) : new Promise((a, f) => {
|
|
669
|
+
n.readv(r, o, ...c, (p, u, s) => {
|
|
670
|
+
if (p)
|
|
671
|
+
return f(p);
|
|
672
|
+
a({ bytesRead: u, buffers: s });
|
|
673
|
+
});
|
|
674
|
+
});
|
|
675
|
+
}, e.writev = function(r, o, ...c) {
|
|
676
|
+
return typeof c[c.length - 1] == "function" ? n.writev(r, o, ...c) : new Promise((a, f) => {
|
|
677
|
+
n.writev(r, o, ...c, (p, u, s) => {
|
|
678
|
+
if (p)
|
|
679
|
+
return f(p);
|
|
669
680
|
a({ bytesWritten: u, buffers: s });
|
|
670
681
|
});
|
|
671
682
|
});
|
|
672
|
-
}
|
|
683
|
+
}, typeof n.realpath.native == "function" ? e.realpath.native = t(n.realpath.native) : process.emitWarning(
|
|
673
684
|
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
674
685
|
"Warning",
|
|
675
686
|
"fs-extra-WARN0003"
|
|
676
687
|
);
|
|
677
|
-
})(
|
|
678
|
-
var
|
|
679
|
-
const
|
|
680
|
-
|
|
681
|
-
if (process.platform === "win32" && /[<>:"|?*]/.test(t.replace(
|
|
682
|
-
const
|
|
683
|
-
throw
|
|
688
|
+
})(z);
|
|
689
|
+
var Le = {}, ut = {};
|
|
690
|
+
const yn = M;
|
|
691
|
+
ut.checkPath = function(t) {
|
|
692
|
+
if (process.platform === "win32" && /[<>:"|?*]/.test(t.replace(yn.parse(t).root, ""))) {
|
|
693
|
+
const i = new Error(`Path contains invalid characters: ${t}`);
|
|
694
|
+
throw i.code = "EINVAL", i;
|
|
684
695
|
}
|
|
685
696
|
};
|
|
686
|
-
const
|
|
697
|
+
const at = z, { checkPath: ft } = ut, st = (e) => {
|
|
687
698
|
const t = { mode: 511 };
|
|
688
699
|
return typeof e == "number" ? e : { ...t, ...e }.mode;
|
|
689
700
|
};
|
|
690
|
-
|
|
691
|
-
mode:
|
|
701
|
+
Le.makeDir = async (e, t) => (ft(e), at.mkdir(e, {
|
|
702
|
+
mode: st(t),
|
|
692
703
|
recursive: !0
|
|
693
704
|
}));
|
|
694
|
-
|
|
695
|
-
mode:
|
|
705
|
+
Le.makeDirSync = (e, t) => (ft(e), at.mkdirSync(e, {
|
|
706
|
+
mode: st(t),
|
|
696
707
|
recursive: !0
|
|
697
708
|
}));
|
|
698
|
-
const
|
|
699
|
-
var
|
|
700
|
-
mkdirs:
|
|
701
|
-
mkdirsSync:
|
|
702
|
-
mkdirp:
|
|
703
|
-
mkdirpSync:
|
|
704
|
-
ensureDir:
|
|
705
|
-
ensureDirSync:
|
|
709
|
+
const pn = W.fromPromise, { makeDir: dn, makeDirSync: Ee } = Le, Fe = pn(dn);
|
|
710
|
+
var b = {
|
|
711
|
+
mkdirs: Fe,
|
|
712
|
+
mkdirsSync: Ee,
|
|
713
|
+
mkdirp: Fe,
|
|
714
|
+
mkdirpSync: Ee,
|
|
715
|
+
ensureDir: Fe,
|
|
716
|
+
ensureDirSync: Ee
|
|
706
717
|
};
|
|
707
|
-
const
|
|
708
|
-
function
|
|
709
|
-
return
|
|
718
|
+
const hn = W.fromPromise, lt = z;
|
|
719
|
+
function Sn(e) {
|
|
720
|
+
return lt.access(e).then(() => !0).catch(() => !1);
|
|
710
721
|
}
|
|
711
|
-
var
|
|
712
|
-
pathExists:
|
|
713
|
-
pathExistsSync:
|
|
722
|
+
var Q = {
|
|
723
|
+
pathExists: hn(Sn),
|
|
724
|
+
pathExistsSync: lt.existsSync
|
|
714
725
|
};
|
|
715
|
-
const
|
|
716
|
-
function
|
|
717
|
-
|
|
718
|
-
if (
|
|
719
|
-
return r
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
726
|
+
const X = R;
|
|
727
|
+
function vn(e, t, n, i) {
|
|
728
|
+
X.open(e, "r+", (r, o) => {
|
|
729
|
+
if (r)
|
|
730
|
+
return i(r);
|
|
731
|
+
X.futimes(o, t, n, (c) => {
|
|
732
|
+
X.close(o, (a) => {
|
|
733
|
+
i && i(c || a);
|
|
723
734
|
});
|
|
724
735
|
});
|
|
725
736
|
});
|
|
726
737
|
}
|
|
727
|
-
function
|
|
728
|
-
const
|
|
729
|
-
return
|
|
738
|
+
function wn(e, t, n) {
|
|
739
|
+
const i = X.openSync(e, "r+");
|
|
740
|
+
return X.futimesSync(i, t, n), X.closeSync(i);
|
|
730
741
|
}
|
|
731
|
-
var
|
|
732
|
-
utimesMillis:
|
|
733
|
-
utimesMillisSync:
|
|
742
|
+
var mt = {
|
|
743
|
+
utimesMillis: vn,
|
|
744
|
+
utimesMillisSync: wn
|
|
734
745
|
};
|
|
735
|
-
const
|
|
736
|
-
function
|
|
737
|
-
const
|
|
746
|
+
const Z = z, O = M, gn = ae;
|
|
747
|
+
function kn(e, t, n) {
|
|
748
|
+
const i = n.dereference ? (r) => Z.stat(r, { bigint: !0 }) : (r) => Z.lstat(r, { bigint: !0 });
|
|
738
749
|
return Promise.all([
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
if (
|
|
750
|
+
i(e),
|
|
751
|
+
i(t).catch((r) => {
|
|
752
|
+
if (r.code === "ENOENT")
|
|
742
753
|
return null;
|
|
743
|
-
throw
|
|
754
|
+
throw r;
|
|
744
755
|
})
|
|
745
|
-
]).then(([
|
|
756
|
+
]).then(([r, o]) => ({ srcStat: r, destStat: o }));
|
|
746
757
|
}
|
|
747
|
-
function
|
|
748
|
-
let
|
|
749
|
-
const
|
|
758
|
+
function $n(e, t, n) {
|
|
759
|
+
let i;
|
|
760
|
+
const r = n.dereference ? (c) => Z.statSync(c, { bigint: !0 }) : (c) => Z.lstatSync(c, { bigint: !0 }), o = r(e);
|
|
750
761
|
try {
|
|
751
|
-
|
|
762
|
+
i = r(t);
|
|
752
763
|
} catch (c) {
|
|
753
764
|
if (c.code === "ENOENT")
|
|
754
765
|
return { srcStat: o, destStat: null };
|
|
755
766
|
throw c;
|
|
756
767
|
}
|
|
757
|
-
return { srcStat: o, destStat:
|
|
768
|
+
return { srcStat: o, destStat: i };
|
|
758
769
|
}
|
|
759
|
-
function
|
|
760
|
-
|
|
770
|
+
function En(e, t, n, i, r) {
|
|
771
|
+
gn.callbackify(kn)(e, t, i, (o, c) => {
|
|
761
772
|
if (o)
|
|
762
|
-
return
|
|
773
|
+
return r(o);
|
|
763
774
|
const { srcStat: a, destStat: f } = c;
|
|
764
775
|
if (f) {
|
|
765
|
-
if (
|
|
766
|
-
const
|
|
767
|
-
return n === "move" &&
|
|
776
|
+
if (fe(a, f)) {
|
|
777
|
+
const p = O.basename(e), u = O.basename(t);
|
|
778
|
+
return n === "move" && p !== u && p.toLowerCase() === u.toLowerCase() ? r(null, { srcStat: a, destStat: f, isChangingCase: !0 }) : r(new Error("Source and destination must not be the same."));
|
|
768
779
|
}
|
|
769
780
|
if (a.isDirectory() && !f.isDirectory())
|
|
770
|
-
return
|
|
781
|
+
return r(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`));
|
|
771
782
|
if (!a.isDirectory() && f.isDirectory())
|
|
772
|
-
return
|
|
783
|
+
return r(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`));
|
|
773
784
|
}
|
|
774
|
-
return a.isDirectory() &&
|
|
785
|
+
return a.isDirectory() && We(e, t) ? r(new Error(ve(e, t, n))) : r(null, { srcStat: a, destStat: f });
|
|
775
786
|
});
|
|
776
787
|
}
|
|
777
|
-
function
|
|
778
|
-
const { srcStat:
|
|
788
|
+
function Fn(e, t, n, i) {
|
|
789
|
+
const { srcStat: r, destStat: o } = $n(e, t, i);
|
|
779
790
|
if (o) {
|
|
780
|
-
if (
|
|
781
|
-
const c =
|
|
791
|
+
if (fe(r, o)) {
|
|
792
|
+
const c = O.basename(e), a = O.basename(t);
|
|
782
793
|
if (n === "move" && c !== a && c.toLowerCase() === a.toLowerCase())
|
|
783
|
-
return { srcStat:
|
|
794
|
+
return { srcStat: r, destStat: o, isChangingCase: !0 };
|
|
784
795
|
throw new Error("Source and destination must not be the same.");
|
|
785
796
|
}
|
|
786
|
-
if (
|
|
797
|
+
if (r.isDirectory() && !o.isDirectory())
|
|
787
798
|
throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);
|
|
788
|
-
if (!
|
|
799
|
+
if (!r.isDirectory() && o.isDirectory())
|
|
789
800
|
throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`);
|
|
790
801
|
}
|
|
791
|
-
if (
|
|
792
|
-
throw new Error(
|
|
793
|
-
return { srcStat:
|
|
794
|
-
}
|
|
795
|
-
function
|
|
796
|
-
const o =
|
|
797
|
-
if (c === o || c ===
|
|
798
|
-
return
|
|
799
|
-
|
|
800
|
-
}
|
|
801
|
-
function
|
|
802
|
-
const
|
|
803
|
-
if (o ===
|
|
802
|
+
if (r.isDirectory() && We(e, t))
|
|
803
|
+
throw new Error(ve(e, t, n));
|
|
804
|
+
return { srcStat: r, destStat: o };
|
|
805
|
+
}
|
|
806
|
+
function yt(e, t, n, i, r) {
|
|
807
|
+
const o = O.resolve(O.dirname(e)), c = O.resolve(O.dirname(n));
|
|
808
|
+
if (c === o || c === O.parse(c).root)
|
|
809
|
+
return r();
|
|
810
|
+
Z.stat(c, { bigint: !0 }, (a, f) => a ? a.code === "ENOENT" ? r() : r(a) : fe(t, f) ? r(new Error(ve(e, n, i))) : yt(e, t, c, i, r));
|
|
811
|
+
}
|
|
812
|
+
function pt(e, t, n, i) {
|
|
813
|
+
const r = O.resolve(O.dirname(e)), o = O.resolve(O.dirname(n));
|
|
814
|
+
if (o === r || o === O.parse(o).root)
|
|
804
815
|
return;
|
|
805
816
|
let c;
|
|
806
817
|
try {
|
|
807
|
-
c =
|
|
818
|
+
c = Z.statSync(o, { bigint: !0 });
|
|
808
819
|
} catch (a) {
|
|
809
820
|
if (a.code === "ENOENT")
|
|
810
821
|
return;
|
|
811
822
|
throw a;
|
|
812
823
|
}
|
|
813
|
-
if (
|
|
814
|
-
throw new Error(
|
|
815
|
-
return
|
|
824
|
+
if (fe(t, c))
|
|
825
|
+
throw new Error(ve(e, n, i));
|
|
826
|
+
return pt(e, t, o, i);
|
|
816
827
|
}
|
|
817
|
-
function
|
|
828
|
+
function fe(e, t) {
|
|
818
829
|
return t.ino && t.dev && t.ino === e.ino && t.dev === e.dev;
|
|
819
830
|
}
|
|
820
|
-
function
|
|
821
|
-
const n =
|
|
822
|
-
return n.reduce((
|
|
831
|
+
function We(e, t) {
|
|
832
|
+
const n = O.resolve(e).split(O.sep).filter((r) => r), i = O.resolve(t).split(O.sep).filter((r) => r);
|
|
833
|
+
return n.reduce((r, o, c) => r && i[c] === o, !0);
|
|
823
834
|
}
|
|
824
|
-
function
|
|
835
|
+
function ve(e, t, n) {
|
|
825
836
|
return `Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`;
|
|
826
837
|
}
|
|
827
|
-
var
|
|
828
|
-
checkPaths:
|
|
829
|
-
checkPathsSync:
|
|
830
|
-
checkParentPaths:
|
|
831
|
-
checkParentPathsSync:
|
|
832
|
-
isSrcSubdir:
|
|
833
|
-
areIdentical:
|
|
838
|
+
var K = {
|
|
839
|
+
checkPaths: En,
|
|
840
|
+
checkPathsSync: Fn,
|
|
841
|
+
checkParentPaths: yt,
|
|
842
|
+
checkParentPathsSync: pt,
|
|
843
|
+
isSrcSubdir: We,
|
|
844
|
+
areIdentical: fe
|
|
834
845
|
};
|
|
835
|
-
const
|
|
836
|
-
function
|
|
837
|
-
typeof n == "function" && !
|
|
846
|
+
const j = R, ie = M, Dn = b.mkdirs, Pn = Q.pathExists, On = mt.utimesMillis, oe = K;
|
|
847
|
+
function Cn(e, t, n, i) {
|
|
848
|
+
typeof n == "function" && !i ? (i = n, n = {}) : typeof n == "function" && (n = { filter: n }), i = i || function() {
|
|
838
849
|
}, n = n || {}, n.clobber = "clobber" in n ? !!n.clobber : !0, n.overwrite = "overwrite" in n ? !!n.overwrite : n.clobber, n.preserveTimestamps && process.arch === "ia32" && process.emitWarning(
|
|
839
850
|
`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
840
851
|
|
|
841
852
|
see https://github.com/jprichardson/node-fs-extra/issues/269`,
|
|
842
853
|
"Warning",
|
|
843
854
|
"fs-extra-WARN0001"
|
|
844
|
-
),
|
|
845
|
-
if (
|
|
846
|
-
return r
|
|
855
|
+
), oe.checkPaths(e, t, "copy", n, (r, o) => {
|
|
856
|
+
if (r)
|
|
857
|
+
return i(r);
|
|
847
858
|
const { srcStat: c, destStat: a } = o;
|
|
848
|
-
|
|
859
|
+
oe.checkParentPaths(e, c, t, "copy", (f) => {
|
|
860
|
+
if (f)
|
|
861
|
+
return i(f);
|
|
862
|
+
dt(e, t, n, (p, u) => {
|
|
863
|
+
if (p)
|
|
864
|
+
return i(p);
|
|
865
|
+
if (!u)
|
|
866
|
+
return i();
|
|
867
|
+
Nn(a, e, t, n, i);
|
|
868
|
+
});
|
|
869
|
+
});
|
|
849
870
|
});
|
|
850
871
|
}
|
|
851
|
-
function
|
|
852
|
-
const o =
|
|
853
|
-
|
|
872
|
+
function Nn(e, t, n, i, r) {
|
|
873
|
+
const o = ie.dirname(n);
|
|
874
|
+
Pn(o, (c, a) => {
|
|
854
875
|
if (c)
|
|
855
|
-
return
|
|
876
|
+
return r(c);
|
|
856
877
|
if (a)
|
|
857
|
-
return
|
|
858
|
-
|
|
878
|
+
return Ce(e, t, n, i, r);
|
|
879
|
+
Dn(o, (f) => f ? r(f) : Ce(e, t, n, i, r));
|
|
859
880
|
});
|
|
860
881
|
}
|
|
861
|
-
function
|
|
862
|
-
|
|
882
|
+
function dt(e, t, n, i) {
|
|
883
|
+
if (!n.filter)
|
|
884
|
+
return i(null, !0);
|
|
885
|
+
Promise.resolve(n.filter(e, t)).then((r) => i(null, r), (r) => i(r));
|
|
863
886
|
}
|
|
864
|
-
function
|
|
865
|
-
|
|
887
|
+
function Ce(e, t, n, i, r) {
|
|
888
|
+
(i.dereference ? j.stat : j.lstat)(t, (c, a) => c ? r(c) : a.isDirectory() ? jn(a, e, t, n, i, r) : a.isFile() || a.isCharacterDevice() || a.isBlockDevice() ? _n(a, e, t, n, i, r) : a.isSymbolicLink() ? Bn(e, t, n, i, r) : a.isSocket() ? r(new Error(`Cannot copy a socket file: ${t}`)) : a.isFIFO() ? r(new Error(`Cannot copy a FIFO pipe: ${t}`)) : r(new Error(`Unknown file: ${t}`)));
|
|
866
889
|
}
|
|
867
|
-
function
|
|
868
|
-
|
|
890
|
+
function _n(e, t, n, i, r, o) {
|
|
891
|
+
return t ? In(e, n, i, r, o) : ht(e, n, i, r, o);
|
|
869
892
|
}
|
|
870
|
-
function
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
function Vn(e, t, n, r, i) {
|
|
874
|
-
if (r.overwrite)
|
|
875
|
-
B.unlink(n, (o) => o ? i(o) : Ft(e, t, n, r, i));
|
|
893
|
+
function In(e, t, n, i, r) {
|
|
894
|
+
if (i.overwrite)
|
|
895
|
+
j.unlink(n, (o) => o ? r(o) : ht(e, t, n, i, r));
|
|
876
896
|
else
|
|
877
|
-
return
|
|
897
|
+
return i.errorOnExist ? r(new Error(`'${n}' already exists`)) : r();
|
|
878
898
|
}
|
|
879
|
-
function
|
|
880
|
-
|
|
899
|
+
function ht(e, t, n, i, r) {
|
|
900
|
+
j.copyFile(t, n, (o) => o ? r(o) : i.preserveTimestamps ? An(e.mode, t, n, r) : we(n, e.mode, r));
|
|
881
901
|
}
|
|
882
|
-
function
|
|
883
|
-
return
|
|
902
|
+
function An(e, t, n, i) {
|
|
903
|
+
return xn(e) ? Ln(n, e, (r) => r ? i(r) : Ye(e, t, n, i)) : Ye(e, t, n, i);
|
|
884
904
|
}
|
|
885
|
-
function
|
|
905
|
+
function xn(e) {
|
|
886
906
|
return (e & 128) === 0;
|
|
887
907
|
}
|
|
888
|
-
function
|
|
889
|
-
return
|
|
908
|
+
function Ln(e, t, n) {
|
|
909
|
+
return we(e, t | 128, n);
|
|
890
910
|
}
|
|
891
|
-
function
|
|
892
|
-
|
|
911
|
+
function Ye(e, t, n, i) {
|
|
912
|
+
Wn(t, n, (r) => r ? i(r) : we(n, e, i));
|
|
893
913
|
}
|
|
894
|
-
function
|
|
895
|
-
return
|
|
914
|
+
function we(e, t, n) {
|
|
915
|
+
return j.chmod(e, t, n);
|
|
896
916
|
}
|
|
897
|
-
function
|
|
898
|
-
|
|
917
|
+
function Wn(e, t, n) {
|
|
918
|
+
j.stat(e, (i, r) => i ? n(i) : On(t, r.atime, r.mtime, n));
|
|
899
919
|
}
|
|
900
|
-
function
|
|
901
|
-
return t ?
|
|
920
|
+
function jn(e, t, n, i, r, o) {
|
|
921
|
+
return t ? St(n, i, r, o) : Mn(e.mode, n, i, r, o);
|
|
902
922
|
}
|
|
903
|
-
function
|
|
904
|
-
|
|
923
|
+
function Mn(e, t, n, i, r) {
|
|
924
|
+
j.mkdir(n, (o) => {
|
|
905
925
|
if (o)
|
|
906
|
-
return
|
|
907
|
-
|
|
926
|
+
return r(o);
|
|
927
|
+
St(t, n, i, (c) => c ? r(c) : we(n, e, r));
|
|
908
928
|
});
|
|
909
929
|
}
|
|
910
|
-
function
|
|
911
|
-
|
|
930
|
+
function St(e, t, n, i) {
|
|
931
|
+
j.readdir(e, (r, o) => r ? i(r) : Ne(o, e, t, n, i));
|
|
912
932
|
}
|
|
913
|
-
function
|
|
933
|
+
function Ne(e, t, n, i, r) {
|
|
914
934
|
const o = e.pop();
|
|
915
|
-
return o ?
|
|
935
|
+
return o ? Rn(e, o, t, n, i, r) : r();
|
|
916
936
|
}
|
|
917
|
-
function
|
|
918
|
-
const c =
|
|
919
|
-
|
|
937
|
+
function Rn(e, t, n, i, r, o) {
|
|
938
|
+
const c = ie.join(n, t), a = ie.join(i, t);
|
|
939
|
+
dt(c, a, r, (f, p) => {
|
|
920
940
|
if (f)
|
|
921
941
|
return o(f);
|
|
922
|
-
|
|
923
|
-
|
|
942
|
+
if (!p)
|
|
943
|
+
return Ne(e, n, i, r, o);
|
|
944
|
+
oe.checkPaths(c, a, "copy", r, (u, s) => {
|
|
945
|
+
if (u)
|
|
946
|
+
return o(u);
|
|
947
|
+
const { destStat: m } = s;
|
|
948
|
+
Ce(m, c, a, r, (l) => l ? o(l) : Ne(e, n, i, r, o));
|
|
949
|
+
});
|
|
924
950
|
});
|
|
925
951
|
}
|
|
926
|
-
function
|
|
927
|
-
|
|
952
|
+
function Bn(e, t, n, i, r) {
|
|
953
|
+
j.readlink(t, (o, c) => {
|
|
928
954
|
if (o)
|
|
929
|
-
return
|
|
930
|
-
if (
|
|
931
|
-
|
|
955
|
+
return r(o);
|
|
956
|
+
if (i.dereference && (c = ie.resolve(process.cwd(), c)), e)
|
|
957
|
+
j.readlink(n, (a, f) => a ? a.code === "EINVAL" || a.code === "UNKNOWN" ? j.symlink(c, n, r) : r(a) : (i.dereference && (f = ie.resolve(process.cwd(), f)), oe.isSrcSubdir(c, f) ? r(new Error(`Cannot copy '${c}' to a subdirectory of itself, '${f}'.`)) : oe.isSrcSubdir(f, c) ? r(new Error(`Cannot overwrite '${f}' with '${c}'.`)) : Jn(c, n, r)));
|
|
932
958
|
else
|
|
933
|
-
return
|
|
959
|
+
return j.symlink(c, n, r);
|
|
934
960
|
});
|
|
935
961
|
}
|
|
936
|
-
function
|
|
937
|
-
|
|
962
|
+
function Jn(e, t, n) {
|
|
963
|
+
j.unlink(t, (i) => i ? n(i) : j.symlink(e, t, n));
|
|
938
964
|
}
|
|
939
|
-
var
|
|
940
|
-
const x = R,
|
|
941
|
-
function
|
|
965
|
+
var bn = Cn;
|
|
966
|
+
const x = R, ce = M, qn = b.mkdirsSync, Un = mt.utimesMillisSync, ue = K;
|
|
967
|
+
function Gn(e, t, n) {
|
|
942
968
|
typeof n == "function" && (n = { filter: n }), n = n || {}, n.clobber = "clobber" in n ? !!n.clobber : !0, n.overwrite = "overwrite" in n ? !!n.overwrite : n.clobber, n.preserveTimestamps && process.arch === "ia32" && process.emitWarning(
|
|
943
969
|
`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
944
970
|
|
|
@@ -946,755 +972,601 @@ function ir(e, t, n) {
|
|
|
946
972
|
"Warning",
|
|
947
973
|
"fs-extra-WARN0002"
|
|
948
974
|
);
|
|
949
|
-
const { srcStat:
|
|
950
|
-
|
|
951
|
-
}
|
|
952
|
-
function or(e, t, n, r) {
|
|
953
|
-
if (r.filter && !r.filter(t, n))
|
|
975
|
+
const { srcStat: i, destStat: r } = ue.checkPathsSync(e, t, "copy", n);
|
|
976
|
+
if (ue.checkParentPathsSync(e, i, t, "copy"), n.filter && !n.filter(e, t))
|
|
954
977
|
return;
|
|
955
|
-
const
|
|
956
|
-
return x.existsSync(
|
|
978
|
+
const o = ce.dirname(t);
|
|
979
|
+
return x.existsSync(o) || qn(o), vt(r, e, t, n);
|
|
957
980
|
}
|
|
958
|
-
function
|
|
959
|
-
|
|
960
|
-
return Ct(e, t, n, r);
|
|
961
|
-
}
|
|
962
|
-
function Ct(e, t, n, r) {
|
|
963
|
-
const o = (r.dereference ? x.statSync : x.lstatSync)(t);
|
|
981
|
+
function vt(e, t, n, i) {
|
|
982
|
+
const o = (i.dereference ? x.statSync : x.lstatSync)(t);
|
|
964
983
|
if (o.isDirectory())
|
|
965
|
-
return
|
|
984
|
+
return Zn(o, e, t, n, i);
|
|
966
985
|
if (o.isFile() || o.isCharacterDevice() || o.isBlockDevice())
|
|
967
|
-
return
|
|
986
|
+
return Yn(o, e, t, n, i);
|
|
968
987
|
if (o.isSymbolicLink())
|
|
969
|
-
return
|
|
988
|
+
return er(e, t, n, i);
|
|
970
989
|
throw o.isSocket() ? new Error(`Cannot copy a socket file: ${t}`) : o.isFIFO() ? new Error(`Cannot copy a FIFO pipe: ${t}`) : new Error(`Unknown file: ${t}`);
|
|
971
990
|
}
|
|
972
|
-
function
|
|
973
|
-
return t ?
|
|
991
|
+
function Yn(e, t, n, i, r) {
|
|
992
|
+
return t ? Vn(e, n, i, r) : wt(e, n, i, r);
|
|
974
993
|
}
|
|
975
|
-
function
|
|
976
|
-
if (
|
|
977
|
-
return x.unlinkSync(n),
|
|
978
|
-
if (
|
|
994
|
+
function Vn(e, t, n, i) {
|
|
995
|
+
if (i.overwrite)
|
|
996
|
+
return x.unlinkSync(n), wt(e, t, n, i);
|
|
997
|
+
if (i.errorOnExist)
|
|
979
998
|
throw new Error(`'${n}' already exists`);
|
|
980
999
|
}
|
|
981
|
-
function
|
|
982
|
-
return x.copyFileSync(t, n),
|
|
1000
|
+
function wt(e, t, n, i) {
|
|
1001
|
+
return x.copyFileSync(t, n), i.preserveTimestamps && zn(e.mode, t, n), je(n, e.mode);
|
|
983
1002
|
}
|
|
984
|
-
function
|
|
985
|
-
return
|
|
1003
|
+
function zn(e, t, n) {
|
|
1004
|
+
return Qn(e) && Hn(n, e), Xn(t, n);
|
|
986
1005
|
}
|
|
987
|
-
function
|
|
1006
|
+
function Qn(e) {
|
|
988
1007
|
return (e & 128) === 0;
|
|
989
1008
|
}
|
|
990
|
-
function
|
|
991
|
-
return
|
|
1009
|
+
function Hn(e, t) {
|
|
1010
|
+
return je(e, t | 128);
|
|
992
1011
|
}
|
|
993
|
-
function
|
|
1012
|
+
function je(e, t) {
|
|
994
1013
|
return x.chmodSync(e, t);
|
|
995
1014
|
}
|
|
996
|
-
function
|
|
1015
|
+
function Xn(e, t) {
|
|
997
1016
|
const n = x.statSync(e);
|
|
998
|
-
return
|
|
1017
|
+
return Un(t, n.atime, n.mtime);
|
|
999
1018
|
}
|
|
1000
|
-
function
|
|
1001
|
-
return t ?
|
|
1019
|
+
function Zn(e, t, n, i, r) {
|
|
1020
|
+
return t ? gt(n, i, r) : Tn(e.mode, n, i, r);
|
|
1002
1021
|
}
|
|
1003
|
-
function
|
|
1004
|
-
return x.mkdirSync(n),
|
|
1022
|
+
function Tn(e, t, n, i) {
|
|
1023
|
+
return x.mkdirSync(n), gt(t, n, i), je(n, e);
|
|
1005
1024
|
}
|
|
1006
|
-
function
|
|
1007
|
-
x.readdirSync(e).forEach((
|
|
1025
|
+
function gt(e, t, n) {
|
|
1026
|
+
x.readdirSync(e).forEach((i) => Kn(i, e, t, n));
|
|
1008
1027
|
}
|
|
1009
|
-
function
|
|
1010
|
-
const
|
|
1011
|
-
|
|
1028
|
+
function Kn(e, t, n, i) {
|
|
1029
|
+
const r = ce.join(t, e), o = ce.join(n, e);
|
|
1030
|
+
if (i.filter && !i.filter(r, o))
|
|
1031
|
+
return;
|
|
1032
|
+
const { destStat: c } = ue.checkPathsSync(r, o, "copy", i);
|
|
1033
|
+
return vt(c, r, o, i);
|
|
1012
1034
|
}
|
|
1013
|
-
function
|
|
1014
|
-
let
|
|
1015
|
-
if (
|
|
1035
|
+
function er(e, t, n, i) {
|
|
1036
|
+
let r = x.readlinkSync(t);
|
|
1037
|
+
if (i.dereference && (r = ce.resolve(process.cwd(), r)), e) {
|
|
1016
1038
|
let o;
|
|
1017
1039
|
try {
|
|
1018
1040
|
o = x.readlinkSync(n);
|
|
1019
1041
|
} catch (c) {
|
|
1020
1042
|
if (c.code === "EINVAL" || c.code === "UNKNOWN")
|
|
1021
|
-
return x.symlinkSync(
|
|
1043
|
+
return x.symlinkSync(r, n);
|
|
1022
1044
|
throw c;
|
|
1023
1045
|
}
|
|
1024
|
-
if (
|
|
1025
|
-
throw new Error(`Cannot copy '${
|
|
1026
|
-
if (
|
|
1027
|
-
throw new Error(`Cannot overwrite '${o}' with '${
|
|
1028
|
-
return
|
|
1046
|
+
if (i.dereference && (o = ce.resolve(process.cwd(), o)), ue.isSrcSubdir(r, o))
|
|
1047
|
+
throw new Error(`Cannot copy '${r}' to a subdirectory of itself, '${o}'.`);
|
|
1048
|
+
if (ue.isSrcSubdir(o, r))
|
|
1049
|
+
throw new Error(`Cannot overwrite '${o}' with '${r}'.`);
|
|
1050
|
+
return tr(r, n);
|
|
1029
1051
|
} else
|
|
1030
|
-
return x.symlinkSync(
|
|
1052
|
+
return x.symlinkSync(r, n);
|
|
1031
1053
|
}
|
|
1032
|
-
function
|
|
1054
|
+
function tr(e, t) {
|
|
1033
1055
|
return x.unlinkSync(t), x.symlinkSync(e, t);
|
|
1034
1056
|
}
|
|
1035
|
-
var
|
|
1036
|
-
const
|
|
1037
|
-
var
|
|
1038
|
-
copy:
|
|
1039
|
-
copySync:
|
|
1057
|
+
var nr = Gn;
|
|
1058
|
+
const rr = W.fromCallback;
|
|
1059
|
+
var Me = {
|
|
1060
|
+
copy: rr(bn),
|
|
1061
|
+
copySync: nr
|
|
1040
1062
|
};
|
|
1041
|
-
const
|
|
1042
|
-
function
|
|
1043
|
-
|
|
1044
|
-
"unlink",
|
|
1045
|
-
"chmod",
|
|
1046
|
-
"stat",
|
|
1047
|
-
"lstat",
|
|
1048
|
-
"rmdir",
|
|
1049
|
-
"readdir"
|
|
1050
|
-
].forEach((n) => {
|
|
1051
|
-
e[n] = e[n] || Te[n], n = n + "Sync", e[n] = e[n] || Te[n];
|
|
1052
|
-
}), e.maxBusyTries = e.maxBusyTries || 3;
|
|
1053
|
-
}
|
|
1054
|
-
function Ue(e, t, n) {
|
|
1055
|
-
let r = 0;
|
|
1056
|
-
typeof t == "function" && (n = t, t = {}), v(e, "rimraf: missing path"), v.strictEqual(typeof e, "string", "rimraf: path should be a string"), v.strictEqual(typeof n, "function", "rimraf: callback function required"), v(t, "rimraf: invalid options argument provided"), v.strictEqual(typeof t, "object", "rimraf: options should be object"), xt(t), Ke(e, t, function i(o) {
|
|
1057
|
-
if (o) {
|
|
1058
|
-
if ((o.code === "EBUSY" || o.code === "ENOTEMPTY" || o.code === "EPERM") && r < t.maxBusyTries) {
|
|
1059
|
-
r++;
|
|
1060
|
-
const c = r * 100;
|
|
1061
|
-
return setTimeout(() => Ke(e, t, i), c);
|
|
1062
|
-
}
|
|
1063
|
-
o.code === "ENOENT" && (o = null);
|
|
1064
|
-
}
|
|
1065
|
-
n(o);
|
|
1066
|
-
});
|
|
1063
|
+
const kt = R, ir = W.fromCallback;
|
|
1064
|
+
function or(e, t) {
|
|
1065
|
+
kt.rm(e, { recursive: !0, force: !0 }, t);
|
|
1067
1066
|
}
|
|
1068
|
-
function
|
|
1069
|
-
|
|
1070
|
-
if (r && r.code === "ENOENT")
|
|
1071
|
-
return n(null);
|
|
1072
|
-
if (r && r.code === "EPERM" && se)
|
|
1073
|
-
return et(e, t, r, n);
|
|
1074
|
-
if (i && i.isDirectory())
|
|
1075
|
-
return we(e, t, r, n);
|
|
1076
|
-
t.unlink(e, (o) => {
|
|
1077
|
-
if (o) {
|
|
1078
|
-
if (o.code === "ENOENT")
|
|
1079
|
-
return n(null);
|
|
1080
|
-
if (o.code === "EPERM")
|
|
1081
|
-
return se ? et(e, t, o, n) : we(e, t, o, n);
|
|
1082
|
-
if (o.code === "EISDIR")
|
|
1083
|
-
return we(e, t, o, n);
|
|
1084
|
-
}
|
|
1085
|
-
return n(o);
|
|
1086
|
-
});
|
|
1087
|
-
});
|
|
1088
|
-
}
|
|
1089
|
-
function et(e, t, n, r) {
|
|
1090
|
-
v(e), v(t), v(typeof r == "function"), t.chmod(e, 438, (i) => {
|
|
1091
|
-
i ? r(i.code === "ENOENT" ? null : n) : t.stat(e, (o, c) => {
|
|
1092
|
-
o ? r(o.code === "ENOENT" ? null : n) : c.isDirectory() ? we(e, t, n, r) : t.unlink(e, r);
|
|
1093
|
-
});
|
|
1094
|
-
});
|
|
1095
|
-
}
|
|
1096
|
-
function tt(e, t, n) {
|
|
1097
|
-
let r;
|
|
1098
|
-
v(e), v(t);
|
|
1099
|
-
try {
|
|
1100
|
-
t.chmodSync(e, 438);
|
|
1101
|
-
} catch (i) {
|
|
1102
|
-
if (i.code === "ENOENT")
|
|
1103
|
-
return;
|
|
1104
|
-
throw n;
|
|
1105
|
-
}
|
|
1106
|
-
try {
|
|
1107
|
-
r = t.statSync(e);
|
|
1108
|
-
} catch (i) {
|
|
1109
|
-
if (i.code === "ENOENT")
|
|
1110
|
-
return;
|
|
1111
|
-
throw n;
|
|
1112
|
-
}
|
|
1113
|
-
r.isDirectory() ? ve(e, t, n) : t.unlinkSync(e);
|
|
1114
|
-
}
|
|
1115
|
-
function we(e, t, n, r) {
|
|
1116
|
-
v(e), v(t), v(typeof r == "function"), t.rmdir(e, (i) => {
|
|
1117
|
-
i && (i.code === "ENOTEMPTY" || i.code === "EEXIST" || i.code === "EPERM") ? Er(e, t, r) : i && i.code === "ENOTDIR" ? r(n) : r(i);
|
|
1118
|
-
});
|
|
1067
|
+
function cr(e) {
|
|
1068
|
+
kt.rmSync(e, { recursive: !0, force: !0 });
|
|
1119
1069
|
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
return n(r);
|
|
1124
|
-
let o = i.length, c;
|
|
1125
|
-
if (o === 0)
|
|
1126
|
-
return t.rmdir(e, n);
|
|
1127
|
-
i.forEach((a) => {
|
|
1128
|
-
Ue(At.join(e, a), t, (f) => {
|
|
1129
|
-
if (!c) {
|
|
1130
|
-
if (f)
|
|
1131
|
-
return n(c = f);
|
|
1132
|
-
--o === 0 && t.rmdir(e, n);
|
|
1133
|
-
}
|
|
1134
|
-
});
|
|
1135
|
-
});
|
|
1136
|
-
});
|
|
1137
|
-
}
|
|
1138
|
-
function Lt(e, t) {
|
|
1139
|
-
let n;
|
|
1140
|
-
t = t || {}, xt(t), v(e, "rimraf: missing path"), v.strictEqual(typeof e, "string", "rimraf: path should be a string"), v(t, "rimraf: missing options"), v.strictEqual(typeof t, "object", "rimraf: options should be object");
|
|
1141
|
-
try {
|
|
1142
|
-
n = t.lstatSync(e);
|
|
1143
|
-
} catch (r) {
|
|
1144
|
-
if (r.code === "ENOENT")
|
|
1145
|
-
return;
|
|
1146
|
-
r.code === "EPERM" && se && tt(e, t, r);
|
|
1147
|
-
}
|
|
1148
|
-
try {
|
|
1149
|
-
n && n.isDirectory() ? ve(e, t, null) : t.unlinkSync(e);
|
|
1150
|
-
} catch (r) {
|
|
1151
|
-
if (r.code === "ENOENT")
|
|
1152
|
-
return;
|
|
1153
|
-
if (r.code === "EPERM")
|
|
1154
|
-
return se ? tt(e, t, r) : ve(e, t, r);
|
|
1155
|
-
if (r.code !== "EISDIR")
|
|
1156
|
-
throw r;
|
|
1157
|
-
ve(e, t, r);
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
function ve(e, t, n) {
|
|
1161
|
-
v(e), v(t);
|
|
1162
|
-
try {
|
|
1163
|
-
t.rmdirSync(e);
|
|
1164
|
-
} catch (r) {
|
|
1165
|
-
if (r.code === "ENOTDIR")
|
|
1166
|
-
throw n;
|
|
1167
|
-
if (r.code === "ENOTEMPTY" || r.code === "EEXIST" || r.code === "EPERM")
|
|
1168
|
-
gr(e, t);
|
|
1169
|
-
else if (r.code !== "ENOENT")
|
|
1170
|
-
throw r;
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
function gr(e, t) {
|
|
1174
|
-
if (v(e), v(t), t.readdirSync(e).forEach((n) => Lt(At.join(e, n), t)), se) {
|
|
1175
|
-
const n = Date.now();
|
|
1176
|
-
do
|
|
1177
|
-
try {
|
|
1178
|
-
return t.rmdirSync(e, t);
|
|
1179
|
-
} catch {
|
|
1180
|
-
}
|
|
1181
|
-
while (Date.now() - n < 500);
|
|
1182
|
-
} else
|
|
1183
|
-
return t.rmdirSync(e, t);
|
|
1184
|
-
}
|
|
1185
|
-
var kr = Ue;
|
|
1186
|
-
Ue.sync = Lt;
|
|
1187
|
-
const ke = R, $r = M.fromCallback, Wt = kr;
|
|
1188
|
-
function Dr(e, t) {
|
|
1189
|
-
if (ke.rm)
|
|
1190
|
-
return ke.rm(e, { recursive: !0, force: !0 }, t);
|
|
1191
|
-
Wt(e, t);
|
|
1192
|
-
}
|
|
1193
|
-
function Pr(e) {
|
|
1194
|
-
if (ke.rmSync)
|
|
1195
|
-
return ke.rmSync(e, { recursive: !0, force: !0 });
|
|
1196
|
-
Wt.sync(e);
|
|
1197
|
-
}
|
|
1198
|
-
var Fe = {
|
|
1199
|
-
remove: $r(Dr),
|
|
1200
|
-
removeSync: Pr
|
|
1070
|
+
var ge = {
|
|
1071
|
+
remove: ir(or),
|
|
1072
|
+
removeSync: cr
|
|
1201
1073
|
};
|
|
1202
|
-
const
|
|
1074
|
+
const ur = W.fromPromise, $t = z, Et = M, Ft = b, Dt = ge, Ve = ur(async function(t) {
|
|
1203
1075
|
let n;
|
|
1204
1076
|
try {
|
|
1205
|
-
n = await
|
|
1077
|
+
n = await $t.readdir(t);
|
|
1206
1078
|
} catch {
|
|
1207
|
-
return
|
|
1079
|
+
return Ft.mkdirs(t);
|
|
1208
1080
|
}
|
|
1209
|
-
return Promise.all(n.map((
|
|
1081
|
+
return Promise.all(n.map((i) => Dt.remove(Et.join(t, i))));
|
|
1210
1082
|
});
|
|
1211
|
-
function
|
|
1083
|
+
function ze(e) {
|
|
1212
1084
|
let t;
|
|
1213
1085
|
try {
|
|
1214
|
-
t =
|
|
1086
|
+
t = $t.readdirSync(e);
|
|
1215
1087
|
} catch {
|
|
1216
|
-
return
|
|
1088
|
+
return Ft.mkdirsSync(e);
|
|
1217
1089
|
}
|
|
1218
1090
|
t.forEach((n) => {
|
|
1219
|
-
n =
|
|
1091
|
+
n = Et.join(e, n), Dt.removeSync(n);
|
|
1220
1092
|
});
|
|
1221
1093
|
}
|
|
1222
|
-
var
|
|
1223
|
-
emptyDirSync:
|
|
1224
|
-
emptydirSync:
|
|
1225
|
-
emptyDir:
|
|
1226
|
-
emptydir:
|
|
1094
|
+
var ar = {
|
|
1095
|
+
emptyDirSync: ze,
|
|
1096
|
+
emptydirSync: ze,
|
|
1097
|
+
emptyDir: Ve,
|
|
1098
|
+
emptydir: Ve
|
|
1227
1099
|
};
|
|
1228
|
-
const
|
|
1229
|
-
function
|
|
1100
|
+
const fr = W.fromCallback, Pt = M, G = R, Ot = b;
|
|
1101
|
+
function sr(e, t) {
|
|
1230
1102
|
function n() {
|
|
1231
|
-
|
|
1232
|
-
if (
|
|
1233
|
-
return t(
|
|
1103
|
+
G.writeFile(e, "", (i) => {
|
|
1104
|
+
if (i)
|
|
1105
|
+
return t(i);
|
|
1234
1106
|
t();
|
|
1235
1107
|
});
|
|
1236
1108
|
}
|
|
1237
|
-
|
|
1238
|
-
if (!
|
|
1109
|
+
G.stat(e, (i, r) => {
|
|
1110
|
+
if (!i && r.isFile())
|
|
1239
1111
|
return t();
|
|
1240
|
-
const o =
|
|
1241
|
-
|
|
1112
|
+
const o = Pt.dirname(e);
|
|
1113
|
+
G.stat(o, (c, a) => {
|
|
1242
1114
|
if (c)
|
|
1243
|
-
return c.code === "ENOENT" ?
|
|
1115
|
+
return c.code === "ENOENT" ? Ot.mkdirs(o, (f) => {
|
|
1244
1116
|
if (f)
|
|
1245
1117
|
return t(f);
|
|
1246
1118
|
n();
|
|
1247
1119
|
}) : t(c);
|
|
1248
|
-
a.isDirectory() ? n() :
|
|
1120
|
+
a.isDirectory() ? n() : G.readdir(o, (f) => {
|
|
1249
1121
|
if (f)
|
|
1250
1122
|
return t(f);
|
|
1251
1123
|
});
|
|
1252
1124
|
});
|
|
1253
1125
|
});
|
|
1254
1126
|
}
|
|
1255
|
-
function
|
|
1127
|
+
function lr(e) {
|
|
1256
1128
|
let t;
|
|
1257
1129
|
try {
|
|
1258
|
-
t =
|
|
1130
|
+
t = G.statSync(e);
|
|
1259
1131
|
} catch {
|
|
1260
1132
|
}
|
|
1261
1133
|
if (t && t.isFile())
|
|
1262
1134
|
return;
|
|
1263
|
-
const n =
|
|
1135
|
+
const n = Pt.dirname(e);
|
|
1264
1136
|
try {
|
|
1265
|
-
|
|
1266
|
-
} catch (
|
|
1267
|
-
if (
|
|
1268
|
-
|
|
1137
|
+
G.statSync(n).isDirectory() || G.readdirSync(n);
|
|
1138
|
+
} catch (i) {
|
|
1139
|
+
if (i && i.code === "ENOENT")
|
|
1140
|
+
Ot.mkdirsSync(n);
|
|
1269
1141
|
else
|
|
1270
|
-
throw
|
|
1142
|
+
throw i;
|
|
1271
1143
|
}
|
|
1272
|
-
|
|
1144
|
+
G.writeFileSync(e, "");
|
|
1273
1145
|
}
|
|
1274
|
-
var
|
|
1275
|
-
createFile:
|
|
1276
|
-
createFileSync:
|
|
1146
|
+
var mr = {
|
|
1147
|
+
createFile: fr(sr),
|
|
1148
|
+
createFileSync: lr
|
|
1277
1149
|
};
|
|
1278
|
-
const
|
|
1279
|
-
function
|
|
1280
|
-
function r
|
|
1281
|
-
|
|
1150
|
+
const yr = W.fromCallback, Ct = M, U = R, Nt = b, pr = Q.pathExists, { areIdentical: _t } = K;
|
|
1151
|
+
function dr(e, t, n) {
|
|
1152
|
+
function i(r, o) {
|
|
1153
|
+
U.link(r, o, (c) => {
|
|
1282
1154
|
if (c)
|
|
1283
1155
|
return n(c);
|
|
1284
1156
|
n(null);
|
|
1285
1157
|
});
|
|
1286
1158
|
}
|
|
1287
|
-
|
|
1288
|
-
|
|
1159
|
+
U.lstat(t, (r, o) => {
|
|
1160
|
+
U.lstat(e, (c, a) => {
|
|
1289
1161
|
if (c)
|
|
1290
1162
|
return c.message = c.message.replace("lstat", "ensureLink"), n(c);
|
|
1291
|
-
if (o &&
|
|
1163
|
+
if (o && _t(a, o))
|
|
1292
1164
|
return n(null);
|
|
1293
|
-
const f =
|
|
1294
|
-
|
|
1295
|
-
if (
|
|
1296
|
-
return n(
|
|
1165
|
+
const f = Ct.dirname(t);
|
|
1166
|
+
pr(f, (p, u) => {
|
|
1167
|
+
if (p)
|
|
1168
|
+
return n(p);
|
|
1297
1169
|
if (u)
|
|
1298
|
-
return
|
|
1299
|
-
|
|
1170
|
+
return i(e, t);
|
|
1171
|
+
Nt.mkdirs(f, (s) => {
|
|
1300
1172
|
if (s)
|
|
1301
1173
|
return n(s);
|
|
1302
|
-
|
|
1174
|
+
i(e, t);
|
|
1303
1175
|
});
|
|
1304
1176
|
});
|
|
1305
1177
|
});
|
|
1306
1178
|
});
|
|
1307
1179
|
}
|
|
1308
|
-
function
|
|
1180
|
+
function hr(e, t) {
|
|
1309
1181
|
let n;
|
|
1310
1182
|
try {
|
|
1311
|
-
n =
|
|
1183
|
+
n = U.lstatSync(t);
|
|
1312
1184
|
} catch {
|
|
1313
1185
|
}
|
|
1314
1186
|
try {
|
|
1315
|
-
const o =
|
|
1316
|
-
if (n &&
|
|
1187
|
+
const o = U.lstatSync(e);
|
|
1188
|
+
if (n && _t(o, n))
|
|
1317
1189
|
return;
|
|
1318
1190
|
} catch (o) {
|
|
1319
1191
|
throw o.message = o.message.replace("lstat", "ensureLink"), o;
|
|
1320
1192
|
}
|
|
1321
|
-
const
|
|
1322
|
-
return
|
|
1193
|
+
const i = Ct.dirname(t);
|
|
1194
|
+
return U.existsSync(i) || Nt.mkdirsSync(i), U.linkSync(e, t);
|
|
1323
1195
|
}
|
|
1324
|
-
var
|
|
1325
|
-
createLink:
|
|
1326
|
-
createLinkSync:
|
|
1196
|
+
var Sr = {
|
|
1197
|
+
createLink: yr(dr),
|
|
1198
|
+
createLinkSync: hr
|
|
1327
1199
|
};
|
|
1328
|
-
const
|
|
1329
|
-
function
|
|
1330
|
-
if (
|
|
1331
|
-
return
|
|
1200
|
+
const Y = M, ne = R, vr = Q.pathExists;
|
|
1201
|
+
function wr(e, t, n) {
|
|
1202
|
+
if (Y.isAbsolute(e))
|
|
1203
|
+
return ne.lstat(e, (i) => i ? (i.message = i.message.replace("lstat", "ensureSymlink"), n(i)) : n(null, {
|
|
1332
1204
|
toCwd: e,
|
|
1333
1205
|
toDst: e
|
|
1334
1206
|
}));
|
|
1335
1207
|
{
|
|
1336
|
-
const
|
|
1337
|
-
return
|
|
1338
|
-
toCwd:
|
|
1208
|
+
const i = Y.dirname(t), r = Y.join(i, e);
|
|
1209
|
+
return vr(r, (o, c) => o ? n(o) : c ? n(null, {
|
|
1210
|
+
toCwd: r,
|
|
1339
1211
|
toDst: e
|
|
1340
|
-
}) :
|
|
1212
|
+
}) : ne.lstat(e, (a) => a ? (a.message = a.message.replace("lstat", "ensureSymlink"), n(a)) : n(null, {
|
|
1341
1213
|
toCwd: e,
|
|
1342
|
-
toDst:
|
|
1214
|
+
toDst: Y.relative(i, e)
|
|
1343
1215
|
})));
|
|
1344
1216
|
}
|
|
1345
1217
|
}
|
|
1346
|
-
function
|
|
1218
|
+
function gr(e, t) {
|
|
1347
1219
|
let n;
|
|
1348
|
-
if (
|
|
1349
|
-
if (n =
|
|
1220
|
+
if (Y.isAbsolute(e)) {
|
|
1221
|
+
if (n = ne.existsSync(e), !n)
|
|
1350
1222
|
throw new Error("absolute srcpath does not exist");
|
|
1351
1223
|
return {
|
|
1352
1224
|
toCwd: e,
|
|
1353
1225
|
toDst: e
|
|
1354
1226
|
};
|
|
1355
1227
|
} else {
|
|
1356
|
-
const
|
|
1357
|
-
if (n =
|
|
1228
|
+
const i = Y.dirname(t), r = Y.join(i, e);
|
|
1229
|
+
if (n = ne.existsSync(r), n)
|
|
1358
1230
|
return {
|
|
1359
|
-
toCwd:
|
|
1231
|
+
toCwd: r,
|
|
1360
1232
|
toDst: e
|
|
1361
1233
|
};
|
|
1362
|
-
if (n =
|
|
1234
|
+
if (n = ne.existsSync(e), !n)
|
|
1363
1235
|
throw new Error("relative srcpath does not exist");
|
|
1364
1236
|
return {
|
|
1365
1237
|
toCwd: e,
|
|
1366
|
-
toDst:
|
|
1238
|
+
toDst: Y.relative(i, e)
|
|
1367
1239
|
};
|
|
1368
1240
|
}
|
|
1369
1241
|
}
|
|
1370
|
-
var
|
|
1371
|
-
symlinkPaths:
|
|
1372
|
-
symlinkPathsSync:
|
|
1242
|
+
var kr = {
|
|
1243
|
+
symlinkPaths: wr,
|
|
1244
|
+
symlinkPathsSync: gr
|
|
1373
1245
|
};
|
|
1374
|
-
const
|
|
1375
|
-
function
|
|
1246
|
+
const It = R;
|
|
1247
|
+
function $r(e, t, n) {
|
|
1376
1248
|
if (n = typeof t == "function" ? t : n, t = typeof t == "function" ? !1 : t, t)
|
|
1377
1249
|
return n(null, t);
|
|
1378
|
-
|
|
1379
|
-
if (
|
|
1250
|
+
It.lstat(e, (i, r) => {
|
|
1251
|
+
if (i)
|
|
1380
1252
|
return n(null, "file");
|
|
1381
|
-
t =
|
|
1253
|
+
t = r && r.isDirectory() ? "dir" : "file", n(null, t);
|
|
1382
1254
|
});
|
|
1383
1255
|
}
|
|
1384
|
-
function
|
|
1256
|
+
function Er(e, t) {
|
|
1385
1257
|
let n;
|
|
1386
1258
|
if (t)
|
|
1387
1259
|
return t;
|
|
1388
1260
|
try {
|
|
1389
|
-
n =
|
|
1261
|
+
n = It.lstatSync(e);
|
|
1390
1262
|
} catch {
|
|
1391
1263
|
return "file";
|
|
1392
1264
|
}
|
|
1393
1265
|
return n && n.isDirectory() ? "dir" : "file";
|
|
1394
1266
|
}
|
|
1395
|
-
var
|
|
1396
|
-
symlinkType:
|
|
1397
|
-
symlinkTypeSync:
|
|
1267
|
+
var Fr = {
|
|
1268
|
+
symlinkType: $r,
|
|
1269
|
+
symlinkTypeSync: Er
|
|
1398
1270
|
};
|
|
1399
|
-
const
|
|
1400
|
-
function
|
|
1401
|
-
|
|
1402
|
-
!
|
|
1271
|
+
const Dr = W.fromCallback, At = M, J = z, xt = b, Pr = xt.mkdirs, Or = xt.mkdirsSync, Lt = kr, Cr = Lt.symlinkPaths, Nr = Lt.symlinkPathsSync, Wt = Fr, _r = Wt.symlinkType, Ir = Wt.symlinkTypeSync, Ar = Q.pathExists, { areIdentical: jt } = K;
|
|
1272
|
+
function xr(e, t, n, i) {
|
|
1273
|
+
i = typeof n == "function" ? n : i, n = typeof n == "function" ? !1 : n, J.lstat(t, (r, o) => {
|
|
1274
|
+
!r && o.isSymbolicLink() ? Promise.all([
|
|
1403
1275
|
J.stat(e),
|
|
1404
1276
|
J.stat(t)
|
|
1405
1277
|
]).then(([c, a]) => {
|
|
1406
|
-
if (
|
|
1407
|
-
return
|
|
1408
|
-
|
|
1409
|
-
}) :
|
|
1278
|
+
if (jt(c, a))
|
|
1279
|
+
return i(null);
|
|
1280
|
+
Qe(e, t, n, i);
|
|
1281
|
+
}) : Qe(e, t, n, i);
|
|
1410
1282
|
});
|
|
1411
1283
|
}
|
|
1412
|
-
function
|
|
1413
|
-
|
|
1414
|
-
if (
|
|
1415
|
-
return r
|
|
1416
|
-
e = o.toDst,
|
|
1284
|
+
function Qe(e, t, n, i) {
|
|
1285
|
+
Cr(e, t, (r, o) => {
|
|
1286
|
+
if (r)
|
|
1287
|
+
return i(r);
|
|
1288
|
+
e = o.toDst, _r(o.toCwd, n, (c, a) => {
|
|
1417
1289
|
if (c)
|
|
1418
|
-
return
|
|
1419
|
-
const f =
|
|
1420
|
-
|
|
1421
|
-
if (
|
|
1422
|
-
return
|
|
1290
|
+
return i(c);
|
|
1291
|
+
const f = At.dirname(t);
|
|
1292
|
+
Ar(f, (p, u) => {
|
|
1293
|
+
if (p)
|
|
1294
|
+
return i(p);
|
|
1423
1295
|
if (u)
|
|
1424
|
-
return J.symlink(e, t, a,
|
|
1425
|
-
|
|
1296
|
+
return J.symlink(e, t, a, i);
|
|
1297
|
+
Pr(f, (s) => {
|
|
1426
1298
|
if (s)
|
|
1427
|
-
return
|
|
1428
|
-
J.symlink(e, t, a,
|
|
1299
|
+
return i(s);
|
|
1300
|
+
J.symlink(e, t, a, i);
|
|
1429
1301
|
});
|
|
1430
1302
|
});
|
|
1431
1303
|
});
|
|
1432
1304
|
});
|
|
1433
1305
|
}
|
|
1434
|
-
function
|
|
1435
|
-
let
|
|
1306
|
+
function Lr(e, t, n) {
|
|
1307
|
+
let i;
|
|
1436
1308
|
try {
|
|
1437
|
-
|
|
1309
|
+
i = J.lstatSync(t);
|
|
1438
1310
|
} catch {
|
|
1439
1311
|
}
|
|
1440
|
-
if (
|
|
1312
|
+
if (i && i.isSymbolicLink()) {
|
|
1441
1313
|
const a = J.statSync(e), f = J.statSync(t);
|
|
1442
|
-
if (
|
|
1314
|
+
if (jt(a, f))
|
|
1443
1315
|
return;
|
|
1444
1316
|
}
|
|
1445
|
-
const
|
|
1446
|
-
e =
|
|
1447
|
-
const o =
|
|
1448
|
-
return J.existsSync(o) ||
|
|
1449
|
-
}
|
|
1450
|
-
var
|
|
1451
|
-
createSymlink:
|
|
1452
|
-
createSymlinkSync:
|
|
1317
|
+
const r = Nr(e, t);
|
|
1318
|
+
e = r.toDst, n = Ir(r.toCwd, n);
|
|
1319
|
+
const o = At.dirname(t);
|
|
1320
|
+
return J.existsSync(o) || Or(o), J.symlinkSync(e, t, n);
|
|
1321
|
+
}
|
|
1322
|
+
var Wr = {
|
|
1323
|
+
createSymlink: Dr(xr),
|
|
1324
|
+
createSymlinkSync: Lr
|
|
1453
1325
|
};
|
|
1454
|
-
const { createFile:
|
|
1455
|
-
var
|
|
1456
|
-
createFile:
|
|
1457
|
-
createFileSync:
|
|
1458
|
-
ensureFile:
|
|
1459
|
-
ensureFileSync:
|
|
1460
|
-
createLink:
|
|
1461
|
-
createLinkSync:
|
|
1462
|
-
ensureLink:
|
|
1463
|
-
ensureLinkSync:
|
|
1464
|
-
createSymlink:
|
|
1465
|
-
createSymlinkSync:
|
|
1466
|
-
ensureSymlink:
|
|
1467
|
-
ensureSymlinkSync:
|
|
1326
|
+
const { createFile: He, createFileSync: Xe } = mr, { createLink: Ze, createLinkSync: Te } = Sr, { createSymlink: Ke, createSymlinkSync: et } = Wr;
|
|
1327
|
+
var jr = {
|
|
1328
|
+
createFile: He,
|
|
1329
|
+
createFileSync: Xe,
|
|
1330
|
+
ensureFile: He,
|
|
1331
|
+
ensureFileSync: Xe,
|
|
1332
|
+
createLink: Ze,
|
|
1333
|
+
createLinkSync: Te,
|
|
1334
|
+
ensureLink: Ze,
|
|
1335
|
+
ensureLinkSync: Te,
|
|
1336
|
+
createSymlink: Ke,
|
|
1337
|
+
createSymlinkSync: et,
|
|
1338
|
+
ensureSymlink: Ke,
|
|
1339
|
+
ensureSymlinkSync: et
|
|
1468
1340
|
};
|
|
1469
|
-
function
|
|
1470
|
-
`, finalEOL: n = !0, replacer:
|
|
1341
|
+
function Mr(e, { EOL: t = `
|
|
1342
|
+
`, finalEOL: n = !0, replacer: i = null, spaces: r } = {}) {
|
|
1471
1343
|
const o = n ? t : "";
|
|
1472
|
-
return JSON.stringify(e,
|
|
1344
|
+
return JSON.stringify(e, i, r).replace(/\n/g, t) + o;
|
|
1473
1345
|
}
|
|
1474
|
-
function
|
|
1346
|
+
function Rr(e) {
|
|
1475
1347
|
return Buffer.isBuffer(e) && (e = e.toString("utf8")), e.replace(/^\uFEFF/, "");
|
|
1476
1348
|
}
|
|
1477
|
-
var
|
|
1478
|
-
let
|
|
1349
|
+
var Re = { stringify: Mr, stripBom: Rr };
|
|
1350
|
+
let T;
|
|
1479
1351
|
try {
|
|
1480
|
-
|
|
1352
|
+
T = R;
|
|
1481
1353
|
} catch {
|
|
1482
|
-
|
|
1354
|
+
T = it;
|
|
1483
1355
|
}
|
|
1484
|
-
const
|
|
1485
|
-
async function
|
|
1356
|
+
const ke = W, { stringify: Mt, stripBom: Rt } = Re;
|
|
1357
|
+
async function Br(e, t = {}) {
|
|
1486
1358
|
typeof t == "string" && (t = { encoding: t });
|
|
1487
|
-
const n = t.fs ||
|
|
1488
|
-
let
|
|
1489
|
-
|
|
1359
|
+
const n = t.fs || T, i = "throws" in t ? t.throws : !0;
|
|
1360
|
+
let r = await ke.fromCallback(n.readFile)(e, t);
|
|
1361
|
+
r = Rt(r);
|
|
1490
1362
|
let o;
|
|
1491
1363
|
try {
|
|
1492
|
-
o = JSON.parse(
|
|
1364
|
+
o = JSON.parse(r, t ? t.reviver : null);
|
|
1493
1365
|
} catch (c) {
|
|
1494
|
-
if (
|
|
1366
|
+
if (i)
|
|
1495
1367
|
throw c.message = `${e}: ${c.message}`, c;
|
|
1496
1368
|
return null;
|
|
1497
1369
|
}
|
|
1498
1370
|
return o;
|
|
1499
1371
|
}
|
|
1500
|
-
const
|
|
1501
|
-
function
|
|
1372
|
+
const Jr = ke.fromPromise(Br);
|
|
1373
|
+
function br(e, t = {}) {
|
|
1502
1374
|
typeof t == "string" && (t = { encoding: t });
|
|
1503
|
-
const n = t.fs ||
|
|
1375
|
+
const n = t.fs || T, i = "throws" in t ? t.throws : !0;
|
|
1504
1376
|
try {
|
|
1505
|
-
let
|
|
1506
|
-
return
|
|
1507
|
-
} catch (
|
|
1508
|
-
if (
|
|
1509
|
-
throw
|
|
1377
|
+
let r = n.readFileSync(e, t);
|
|
1378
|
+
return r = Rt(r), JSON.parse(r, t.reviver);
|
|
1379
|
+
} catch (r) {
|
|
1380
|
+
if (i)
|
|
1381
|
+
throw r.message = `${e}: ${r.message}`, r;
|
|
1510
1382
|
return null;
|
|
1511
1383
|
}
|
|
1512
1384
|
}
|
|
1513
|
-
async function
|
|
1514
|
-
const
|
|
1515
|
-
await
|
|
1385
|
+
async function qr(e, t, n = {}) {
|
|
1386
|
+
const i = n.fs || T, r = Mt(t, n);
|
|
1387
|
+
await ke.fromCallback(i.writeFile)(e, r, n);
|
|
1516
1388
|
}
|
|
1517
|
-
const
|
|
1518
|
-
function
|
|
1519
|
-
const
|
|
1520
|
-
return
|
|
1389
|
+
const Ur = ke.fromPromise(qr);
|
|
1390
|
+
function Gr(e, t, n = {}) {
|
|
1391
|
+
const i = n.fs || T, r = Mt(t, n);
|
|
1392
|
+
return i.writeFileSync(e, r, n);
|
|
1521
1393
|
}
|
|
1522
|
-
const
|
|
1523
|
-
readFile:
|
|
1524
|
-
readFileSync:
|
|
1525
|
-
writeFile:
|
|
1526
|
-
writeFileSync:
|
|
1394
|
+
const Yr = {
|
|
1395
|
+
readFile: Jr,
|
|
1396
|
+
readFileSync: br,
|
|
1397
|
+
writeFile: Ur,
|
|
1398
|
+
writeFileSync: Gr
|
|
1527
1399
|
};
|
|
1528
|
-
var
|
|
1529
|
-
const
|
|
1530
|
-
var
|
|
1531
|
-
readJson:
|
|
1532
|
-
readJsonSync:
|
|
1533
|
-
writeJson:
|
|
1534
|
-
writeJsonSync:
|
|
1400
|
+
var Vr = Yr;
|
|
1401
|
+
const ye = Vr;
|
|
1402
|
+
var zr = {
|
|
1403
|
+
readJson: ye.readFile,
|
|
1404
|
+
readJsonSync: ye.readFileSync,
|
|
1405
|
+
writeJson: ye.writeFile,
|
|
1406
|
+
writeJsonSync: ye.writeFileSync
|
|
1535
1407
|
};
|
|
1536
|
-
const
|
|
1537
|
-
function
|
|
1538
|
-
typeof n == "function" && (
|
|
1539
|
-
const
|
|
1540
|
-
|
|
1408
|
+
const Qr = W.fromCallback, re = R, Bt = M, Jt = b, Hr = Q.pathExists;
|
|
1409
|
+
function Xr(e, t, n, i) {
|
|
1410
|
+
typeof n == "function" && (i = n, n = "utf8");
|
|
1411
|
+
const r = Bt.dirname(e);
|
|
1412
|
+
Hr(r, (o, c) => {
|
|
1541
1413
|
if (o)
|
|
1542
|
-
return
|
|
1414
|
+
return i(o);
|
|
1543
1415
|
if (c)
|
|
1544
|
-
return
|
|
1545
|
-
|
|
1416
|
+
return re.writeFile(e, t, n, i);
|
|
1417
|
+
Jt.mkdirs(r, (a) => {
|
|
1546
1418
|
if (a)
|
|
1547
|
-
return
|
|
1548
|
-
|
|
1419
|
+
return i(a);
|
|
1420
|
+
re.writeFile(e, t, n, i);
|
|
1549
1421
|
});
|
|
1550
1422
|
});
|
|
1551
1423
|
}
|
|
1552
|
-
function
|
|
1553
|
-
const n =
|
|
1554
|
-
if (
|
|
1555
|
-
return
|
|
1556
|
-
|
|
1424
|
+
function Zr(e, ...t) {
|
|
1425
|
+
const n = Bt.dirname(e);
|
|
1426
|
+
if (re.existsSync(n))
|
|
1427
|
+
return re.writeFileSync(e, ...t);
|
|
1428
|
+
Jt.mkdirsSync(n), re.writeFileSync(e, ...t);
|
|
1557
1429
|
}
|
|
1558
|
-
var
|
|
1559
|
-
outputFile:
|
|
1560
|
-
outputFileSync:
|
|
1430
|
+
var Be = {
|
|
1431
|
+
outputFile: Qr(Xr),
|
|
1432
|
+
outputFileSync: Zr
|
|
1561
1433
|
};
|
|
1562
|
-
const { stringify:
|
|
1563
|
-
async function
|
|
1564
|
-
const
|
|
1565
|
-
await
|
|
1566
|
-
}
|
|
1567
|
-
var
|
|
1568
|
-
const { stringify:
|
|
1569
|
-
function
|
|
1570
|
-
const
|
|
1571
|
-
|
|
1572
|
-
}
|
|
1573
|
-
var
|
|
1574
|
-
const
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
var
|
|
1584
|
-
const
|
|
1585
|
-
function
|
|
1586
|
-
typeof n == "function" && (
|
|
1587
|
-
const
|
|
1588
|
-
|
|
1434
|
+
const { stringify: Tr } = Re, { outputFile: Kr } = Be;
|
|
1435
|
+
async function ei(e, t, n = {}) {
|
|
1436
|
+
const i = Tr(t, n);
|
|
1437
|
+
await Kr(e, i, n);
|
|
1438
|
+
}
|
|
1439
|
+
var ti = ei;
|
|
1440
|
+
const { stringify: ni } = Re, { outputFileSync: ri } = Be;
|
|
1441
|
+
function ii(e, t, n) {
|
|
1442
|
+
const i = ni(t, n);
|
|
1443
|
+
ri(e, i, n);
|
|
1444
|
+
}
|
|
1445
|
+
var oi = ii;
|
|
1446
|
+
const ci = W.fromPromise, L = zr;
|
|
1447
|
+
L.outputJson = ci(ti);
|
|
1448
|
+
L.outputJsonSync = oi;
|
|
1449
|
+
L.outputJSON = L.outputJson;
|
|
1450
|
+
L.outputJSONSync = L.outputJsonSync;
|
|
1451
|
+
L.writeJSON = L.writeJson;
|
|
1452
|
+
L.writeJSONSync = L.writeJsonSync;
|
|
1453
|
+
L.readJSON = L.readJson;
|
|
1454
|
+
L.readJSONSync = L.readJsonSync;
|
|
1455
|
+
var ui = L;
|
|
1456
|
+
const ai = R, _e = M, fi = Me.copy, bt = ge.remove, si = b.mkdirp, li = Q.pathExists, tt = K;
|
|
1457
|
+
function mi(e, t, n, i) {
|
|
1458
|
+
typeof n == "function" && (i = n, n = {}), n = n || {};
|
|
1459
|
+
const r = n.overwrite || n.clobber || !1;
|
|
1460
|
+
tt.checkPaths(e, t, "move", n, (o, c) => {
|
|
1589
1461
|
if (o)
|
|
1590
|
-
return
|
|
1462
|
+
return i(o);
|
|
1591
1463
|
const { srcStat: a, isChangingCase: f = !1 } = c;
|
|
1592
|
-
|
|
1593
|
-
if (
|
|
1594
|
-
return
|
|
1595
|
-
if (
|
|
1596
|
-
return
|
|
1597
|
-
|
|
1464
|
+
tt.checkParentPaths(e, a, t, "move", (p) => {
|
|
1465
|
+
if (p)
|
|
1466
|
+
return i(p);
|
|
1467
|
+
if (yi(t))
|
|
1468
|
+
return nt(e, t, r, f, i);
|
|
1469
|
+
si(_e.dirname(t), (u) => u ? i(u) : nt(e, t, r, f, i));
|
|
1598
1470
|
});
|
|
1599
1471
|
});
|
|
1600
1472
|
}
|
|
1601
|
-
function
|
|
1602
|
-
const t =
|
|
1603
|
-
return
|
|
1473
|
+
function yi(e) {
|
|
1474
|
+
const t = _e.dirname(e);
|
|
1475
|
+
return _e.parse(t).root === t;
|
|
1604
1476
|
}
|
|
1605
|
-
function
|
|
1606
|
-
if (
|
|
1607
|
-
return
|
|
1477
|
+
function nt(e, t, n, i, r) {
|
|
1478
|
+
if (i)
|
|
1479
|
+
return De(e, t, n, r);
|
|
1608
1480
|
if (n)
|
|
1609
|
-
return
|
|
1610
|
-
|
|
1481
|
+
return bt(t, (o) => o ? r(o) : De(e, t, n, r));
|
|
1482
|
+
li(t, (o, c) => o ? r(o) : c ? r(new Error("dest already exists.")) : De(e, t, n, r));
|
|
1611
1483
|
}
|
|
1612
|
-
function
|
|
1613
|
-
|
|
1484
|
+
function De(e, t, n, i) {
|
|
1485
|
+
ai.rename(e, t, (r) => r ? r.code !== "EXDEV" ? i(r) : pi(e, t, n, i) : i());
|
|
1614
1486
|
}
|
|
1615
|
-
function
|
|
1616
|
-
|
|
1487
|
+
function pi(e, t, n, i) {
|
|
1488
|
+
fi(e, t, {
|
|
1617
1489
|
overwrite: n,
|
|
1618
1490
|
errorOnExist: !0
|
|
1619
|
-
}, (o) => o ?
|
|
1491
|
+
}, (o) => o ? i(o) : bt(e, i));
|
|
1620
1492
|
}
|
|
1621
|
-
var
|
|
1622
|
-
const
|
|
1623
|
-
function
|
|
1493
|
+
var di = mi;
|
|
1494
|
+
const qt = R, Ie = M, hi = Me.copySync, Ut = ge.removeSync, Si = b.mkdirpSync, rt = K;
|
|
1495
|
+
function vi(e, t, n) {
|
|
1624
1496
|
n = n || {};
|
|
1625
|
-
const
|
|
1626
|
-
return
|
|
1497
|
+
const i = n.overwrite || n.clobber || !1, { srcStat: r, isChangingCase: o = !1 } = rt.checkPathsSync(e, t, "move", n);
|
|
1498
|
+
return rt.checkParentPathsSync(e, r, t, "move"), wi(t) || Si(Ie.dirname(t)), gi(e, t, i, o);
|
|
1627
1499
|
}
|
|
1628
|
-
function
|
|
1629
|
-
const t =
|
|
1630
|
-
return
|
|
1500
|
+
function wi(e) {
|
|
1501
|
+
const t = Ie.dirname(e);
|
|
1502
|
+
return Ie.parse(t).root === t;
|
|
1631
1503
|
}
|
|
1632
|
-
function
|
|
1633
|
-
if (
|
|
1634
|
-
return
|
|
1504
|
+
function gi(e, t, n, i) {
|
|
1505
|
+
if (i)
|
|
1506
|
+
return Pe(e, t, n);
|
|
1635
1507
|
if (n)
|
|
1636
|
-
return
|
|
1637
|
-
if (
|
|
1508
|
+
return Ut(t), Pe(e, t, n);
|
|
1509
|
+
if (qt.existsSync(t))
|
|
1638
1510
|
throw new Error("dest already exists.");
|
|
1639
|
-
return
|
|
1511
|
+
return Pe(e, t, n);
|
|
1640
1512
|
}
|
|
1641
|
-
function
|
|
1513
|
+
function Pe(e, t, n) {
|
|
1642
1514
|
try {
|
|
1643
|
-
|
|
1644
|
-
} catch (
|
|
1645
|
-
if (
|
|
1646
|
-
throw
|
|
1647
|
-
return
|
|
1515
|
+
qt.renameSync(e, t);
|
|
1516
|
+
} catch (i) {
|
|
1517
|
+
if (i.code !== "EXDEV")
|
|
1518
|
+
throw i;
|
|
1519
|
+
return ki(e, t, n);
|
|
1648
1520
|
}
|
|
1649
1521
|
}
|
|
1650
|
-
function
|
|
1651
|
-
return
|
|
1522
|
+
function ki(e, t, n) {
|
|
1523
|
+
return hi(e, t, {
|
|
1652
1524
|
overwrite: n,
|
|
1653
1525
|
errorOnExist: !0
|
|
1654
|
-
}),
|
|
1655
|
-
}
|
|
1656
|
-
var
|
|
1657
|
-
const
|
|
1658
|
-
var
|
|
1659
|
-
move:
|
|
1660
|
-
moveSync:
|
|
1661
|
-
},
|
|
1662
|
-
...
|
|
1663
|
-
...
|
|
1664
|
-
...
|
|
1665
|
-
...
|
|
1526
|
+
}), Ut(e);
|
|
1527
|
+
}
|
|
1528
|
+
var $i = vi;
|
|
1529
|
+
const Ei = W.fromCallback;
|
|
1530
|
+
var Fi = {
|
|
1531
|
+
move: Ei(di),
|
|
1532
|
+
moveSync: $i
|
|
1533
|
+
}, Di = {
|
|
1534
|
+
...z,
|
|
1535
|
+
...Me,
|
|
1536
|
+
...ar,
|
|
1537
|
+
...jr,
|
|
1538
|
+
...ui,
|
|
1539
|
+
...b,
|
|
1666
1540
|
...Fi,
|
|
1667
|
-
...
|
|
1668
|
-
...
|
|
1669
|
-
...
|
|
1670
|
-
...X,
|
|
1671
|
-
...Fe
|
|
1541
|
+
...Be,
|
|
1542
|
+
...Q,
|
|
1543
|
+
...ge
|
|
1672
1544
|
};
|
|
1673
|
-
const pe =
|
|
1674
|
-
function
|
|
1545
|
+
const pe = Di;
|
|
1546
|
+
function Ii(e, t) {
|
|
1675
1547
|
return {
|
|
1676
1548
|
name: "vite-plugin-css-import",
|
|
1677
1549
|
apply: "build",
|
|
1678
1550
|
enforce: "post",
|
|
1679
|
-
writeBundle: async (n,
|
|
1680
|
-
const
|
|
1681
|
-
if (!
|
|
1551
|
+
writeBundle: async (n, i) => {
|
|
1552
|
+
const r = Object.keys(i).filter((u) => u.endsWith(".css"));
|
|
1553
|
+
if (!r.length)
|
|
1682
1554
|
return;
|
|
1683
|
-
const o =
|
|
1684
|
-
`, ""), c =
|
|
1555
|
+
const o = r.reduce((u, s) => `${u}import "./${s}";
|
|
1556
|
+
`, ""), c = M.resolve(
|
|
1685
1557
|
process.cwd(),
|
|
1686
1558
|
e,
|
|
1687
1559
|
`${t}-temp.js`
|
|
1688
|
-
), a =
|
|
1560
|
+
), a = M.resolve(process.cwd(), e, `${t}.js`), f = pe.createWriteStream(c);
|
|
1689
1561
|
f.write(o, "utf8");
|
|
1690
|
-
const
|
|
1691
|
-
await
|
|
1562
|
+
const p = pe.createReadStream(a);
|
|
1563
|
+
await zt(p, f), await pe.remove(a), await pe.rename(c, a), f.end();
|
|
1692
1564
|
}
|
|
1693
1565
|
};
|
|
1694
1566
|
}
|
|
1695
1567
|
export {
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1568
|
+
te as Texts,
|
|
1569
|
+
ot as TranslationsKey,
|
|
1570
|
+
Ii as viteCssImportPlugin
|
|
1699
1571
|
};
|
|
1700
1572
|
//# sourceMappingURL=index.js.map
|