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