@prisma/internals 6.3.0-integration-engines-6-3-0-6-integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03.2 → 6.3.0-integration-simpler-typeinfo-query.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/dist/{chunk-3DMEILBC.js → chunk-2DXAGCPS.js} +11 -11
- package/dist/{chunk-4B7QW7H5.js → chunk-2WJPHJ2I.js} +5 -5
- package/dist/{chunk-MGZOEY6N.js → chunk-3U2ANLD3.js} +6 -6
- package/dist/{chunk-4O27JVUK.js → chunk-44JHENE6.js} +41 -14
- package/dist/{chunk-KQOJB3ZW.js → chunk-4NFLAUKD.js} +70 -70
- package/dist/chunk-4RWCRJYD.js +166 -0
- package/dist/{chunk-5MCWLJSR.js → chunk-5I4BOTBV.js} +9 -3
- package/dist/{chunk-ZZLZJFQD.js → chunk-5R7AZFMV.js} +5 -5
- package/dist/{chunk-6QXYYIUQ.js → chunk-5UJZARUY.js} +17 -17
- package/dist/{chunk-D6NVMO5B.js → chunk-67KWF6KB.js} +5 -5
- package/dist/{chunk-OA3Y3SYB.js → chunk-B44XJG7K.js} +5 -5
- package/dist/{chunk-6HMDWGVB.js → chunk-CKVVVLEH.js} +8 -8
- package/dist/{chunk-MPJLR4LI.js → chunk-COFXY6NH.js} +41 -14
- package/dist/chunk-D4MCOTL5.js +122 -0
- package/dist/{chunk-AXVFAZVY.js → chunk-DFG3425X.js} +16 -16
- package/dist/chunk-FPHZVRV4.js +110 -0
- package/dist/{chunk-S57RMXZW.js → chunk-FTS2IEWX.js} +5 -5
- package/dist/chunk-G7LL2H2O.js +54 -0
- package/dist/{chunk-25RJ7YTB.js → chunk-H3T4L34H.js} +83 -88
- package/dist/{chunk-3BND5XB4.js → chunk-HMGEWJDY.js} +47 -232
- package/dist/{chunk-77IC3DNO.js → chunk-IABMG3F4.js} +5 -5
- package/dist/{chunk-CXEMRKV4.js → chunk-IAEMHQAC.js} +8 -8
- package/dist/{chunk-CZDIXJEO.js → chunk-J3JE5NVO.js} +32 -56
- package/dist/{chunk-N6K7M2HZ.js → chunk-J4MA2JIK.js} +5 -5
- package/dist/{chunk-IHZ2I7E5.js → chunk-JBUUTZQL.js} +15 -15
- package/dist/chunk-JMZHUHCC.js +177 -0
- package/dist/{chunk-T6NCATRB.js → chunk-KNNIRRTO.js} +5 -5
- package/dist/{chunk-6R6PZCVQ.js → chunk-KPVPQQGU.js} +5 -5
- package/dist/{chunk-BNAT44VK.js → chunk-KROMVQBD.js} +9 -9
- package/dist/{chunk-TR2BJI77.js → chunk-LXIE6UJ2.js} +961 -79
- package/dist/{chunk-EAUIEZK2.js → chunk-MUJIYA44.js} +5 -5
- package/dist/{chunk-CGFXOUVQ.js → chunk-OHBFHT5Q.js} +15 -15
- package/dist/{chunk-UPIULDLZ.js → chunk-OSOXVAZB.js} +11 -11
- package/dist/chunk-RQPDQSHK.js +1429 -0
- package/dist/{chunk-2XRDQCIA.js → chunk-S4LINK5Y.js} +5 -5
- package/dist/{chunk-D3VAE4HY.js → chunk-UR3LUZY3.js} +17 -17
- package/dist/{chunk-EKBX4J6O.js → chunk-V2VWODV3.js} +5 -5
- package/dist/{chunk-FT32HRUC.js → chunk-VFU3I6P6.js} +16 -16
- package/dist/{chunk-JU7L7EBJ.js → chunk-VJQK3LHU.js} +185 -74
- package/dist/{chunk-V2ZF7ETH.js → chunk-WCRKL55L.js} +7 -7
- package/dist/{chunk-C47SCASR.js → chunk-WMIBAVWZ.js} +5 -5
- package/dist/{chunk-PC7HPZQJ.js → chunk-WYTN2XGW.js} +5 -5
- package/dist/{chunk-QTXYAZFX.js → chunk-XLYQ6PQW.js} +17 -17
- package/dist/{chunk-VRT7T6MF.js → chunk-YDZVEVUG.js} +73 -73
- package/dist/{chunk-ZKAW5JSN.js → chunk-ZA3RMW2P.js} +8 -5
- package/dist/cli/checkUnsupportedDataProxy.js +40 -41
- package/dist/cli/getSchema.js +45 -46
- package/dist/cli/hashes.js +40 -41
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +39 -40
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +8 -8
- package/dist/engine-commands/getEnginesMetaInfo.js +10 -10
- package/dist/engine-commands/index.js +50 -51
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +10 -10
- package/dist/engine-commands/queryEngineCommons.js +7 -7
- package/dist/engine-commands/relativizePathInPSLError.js +2 -2
- package/dist/engine-commands/validate.js +10 -10
- package/dist/errorReporting.js +6 -6
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +39 -40
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +3 -3
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +39 -40
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.d.ts +9 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +132 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +3 -3
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +40 -41
- package/dist/get-generators/getGenerators.js +42 -43
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +3 -3
- package/dist/getPackedPackage.js +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +85 -87
- package/dist/{multipart-parser-32AROPTR.js → multipart-parser-LCETWFPE.js} +6 -9
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +39 -40
- package/dist/tracing/types.d.ts +16 -26
- package/dist/utils/cloudflareD1.js +3 -3
- package/dist/utils/getCommandWithExecutor.js +3 -3
- package/dist/utils/getEnvPaths.js +39 -40
- package/dist/utils/getGitHubIssueUrl.js +4 -4
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handleEngineLoadingErrors.js +3 -3
- package/dist/utils/handlePanic.js +39 -40
- package/dist/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
- package/dist/utils/isCurrentBinInstalledGlobally.js +2 -2
- package/dist/utils/load.js +4 -4
- package/dist/utils/loadEnvFile.js +39 -40
- package/dist/utils/tryLoadEnvs.js +5 -5
- package/dist/wasm.js +4 -4
- package/package.json +12 -12
- package/dist/chunk-BONFK27U.js +0 -47
- package/dist/chunk-PPCNLYSB.js +0 -47
- package/dist/cli/getTypescriptVersion.d.ts +0 -1
- package/dist/cli/getTypescriptVersion.js +0 -25
- package/dist/typescript-AILDXN3I.js +0 -205230
- package/dist/typescript-WN4QH2CP.js +0 -205192
@@ -0,0 +1,1429 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
var chunk_RQPDQSHK_exports = {};
|
20
|
+
__export(chunk_RQPDQSHK_exports, {
|
21
|
+
require_lib: () => require_lib
|
22
|
+
});
|
23
|
+
module.exports = __toCommonJS(chunk_RQPDQSHK_exports);
|
24
|
+
var import_chunk_H4J2FN2W = require("./chunk-H4J2FN2W.js");
|
25
|
+
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
26
|
+
var require_universalify = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
27
|
+
"../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
|
28
|
+
"use strict";
|
29
|
+
exports.fromCallback = function(fn) {
|
30
|
+
return Object.defineProperty(function(...args) {
|
31
|
+
if (typeof args[args.length - 1] === "function") fn.apply(this, args);
|
32
|
+
else {
|
33
|
+
return new Promise((resolve, reject) => {
|
34
|
+
fn.call(
|
35
|
+
this,
|
36
|
+
...args,
|
37
|
+
(err, res) => err != null ? reject(err) : resolve(res)
|
38
|
+
);
|
39
|
+
});
|
40
|
+
}
|
41
|
+
}, "name", { value: fn.name });
|
42
|
+
};
|
43
|
+
exports.fromPromise = function(fn) {
|
44
|
+
return Object.defineProperty(function(...args) {
|
45
|
+
const cb = args[args.length - 1];
|
46
|
+
if (typeof cb !== "function") return fn.apply(this, args);
|
47
|
+
else fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb);
|
48
|
+
}, "name", { value: fn.name });
|
49
|
+
};
|
50
|
+
}
|
51
|
+
});
|
52
|
+
var require_fs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
53
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js"(exports) {
|
54
|
+
"use strict";
|
55
|
+
var u = require_universalify().fromCallback;
|
56
|
+
var fs = (0, import_chunk_H4J2FN2W.require_graceful_fs)();
|
57
|
+
var api = [
|
58
|
+
"access",
|
59
|
+
"appendFile",
|
60
|
+
"chmod",
|
61
|
+
"chown",
|
62
|
+
"close",
|
63
|
+
"copyFile",
|
64
|
+
"fchmod",
|
65
|
+
"fchown",
|
66
|
+
"fdatasync",
|
67
|
+
"fstat",
|
68
|
+
"fsync",
|
69
|
+
"ftruncate",
|
70
|
+
"futimes",
|
71
|
+
"lchmod",
|
72
|
+
"lchown",
|
73
|
+
"link",
|
74
|
+
"lstat",
|
75
|
+
"mkdir",
|
76
|
+
"mkdtemp",
|
77
|
+
"open",
|
78
|
+
"opendir",
|
79
|
+
"readdir",
|
80
|
+
"readFile",
|
81
|
+
"readlink",
|
82
|
+
"realpath",
|
83
|
+
"rename",
|
84
|
+
"rm",
|
85
|
+
"rmdir",
|
86
|
+
"stat",
|
87
|
+
"symlink",
|
88
|
+
"truncate",
|
89
|
+
"unlink",
|
90
|
+
"utimes",
|
91
|
+
"writeFile"
|
92
|
+
].filter((key) => {
|
93
|
+
return typeof fs[key] === "function";
|
94
|
+
});
|
95
|
+
Object.assign(exports, fs);
|
96
|
+
api.forEach((method) => {
|
97
|
+
exports[method] = u(fs[method]);
|
98
|
+
});
|
99
|
+
exports.exists = function(filename, callback) {
|
100
|
+
if (typeof callback === "function") {
|
101
|
+
return fs.exists(filename, callback);
|
102
|
+
}
|
103
|
+
return new Promise((resolve) => {
|
104
|
+
return fs.exists(filename, resolve);
|
105
|
+
});
|
106
|
+
};
|
107
|
+
exports.read = function(fd, buffer, offset, length, position, callback) {
|
108
|
+
if (typeof callback === "function") {
|
109
|
+
return fs.read(fd, buffer, offset, length, position, callback);
|
110
|
+
}
|
111
|
+
return new Promise((resolve, reject) => {
|
112
|
+
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
113
|
+
if (err) return reject(err);
|
114
|
+
resolve({ bytesRead, buffer: buffer2 });
|
115
|
+
});
|
116
|
+
});
|
117
|
+
};
|
118
|
+
exports.write = function(fd, buffer, ...args) {
|
119
|
+
if (typeof args[args.length - 1] === "function") {
|
120
|
+
return fs.write(fd, buffer, ...args);
|
121
|
+
}
|
122
|
+
return new Promise((resolve, reject) => {
|
123
|
+
fs.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
124
|
+
if (err) return reject(err);
|
125
|
+
resolve({ bytesWritten, buffer: buffer2 });
|
126
|
+
});
|
127
|
+
});
|
128
|
+
};
|
129
|
+
exports.readv = function(fd, buffers, ...args) {
|
130
|
+
if (typeof args[args.length - 1] === "function") {
|
131
|
+
return fs.readv(fd, buffers, ...args);
|
132
|
+
}
|
133
|
+
return new Promise((resolve, reject) => {
|
134
|
+
fs.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
|
135
|
+
if (err) return reject(err);
|
136
|
+
resolve({ bytesRead, buffers: buffers2 });
|
137
|
+
});
|
138
|
+
});
|
139
|
+
};
|
140
|
+
exports.writev = function(fd, buffers, ...args) {
|
141
|
+
if (typeof args[args.length - 1] === "function") {
|
142
|
+
return fs.writev(fd, buffers, ...args);
|
143
|
+
}
|
144
|
+
return new Promise((resolve, reject) => {
|
145
|
+
fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
146
|
+
if (err) return reject(err);
|
147
|
+
resolve({ bytesWritten, buffers: buffers2 });
|
148
|
+
});
|
149
|
+
});
|
150
|
+
};
|
151
|
+
if (typeof fs.realpath.native === "function") {
|
152
|
+
exports.realpath.native = u(fs.realpath.native);
|
153
|
+
} else {
|
154
|
+
process.emitWarning(
|
155
|
+
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
156
|
+
"Warning",
|
157
|
+
"fs-extra-WARN0003"
|
158
|
+
);
|
159
|
+
}
|
160
|
+
}
|
161
|
+
});
|
162
|
+
var require_utils = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
163
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module2) {
|
164
|
+
"use strict";
|
165
|
+
var path = (0, import_chunk_WWAWV7DQ.__require)("path");
|
166
|
+
module2.exports.checkPath = function checkPath(pth) {
|
167
|
+
if (process.platform === "win32") {
|
168
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ""));
|
169
|
+
if (pathHasInvalidWinCharacters) {
|
170
|
+
const error = new Error(`Path contains invalid characters: ${pth}`);
|
171
|
+
error.code = "EINVAL";
|
172
|
+
throw error;
|
173
|
+
}
|
174
|
+
}
|
175
|
+
};
|
176
|
+
}
|
177
|
+
});
|
178
|
+
var require_make_dir = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
179
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module2) {
|
180
|
+
"use strict";
|
181
|
+
var fs = require_fs();
|
182
|
+
var { checkPath } = require_utils();
|
183
|
+
var getMode = (options) => {
|
184
|
+
const defaults = { mode: 511 };
|
185
|
+
if (typeof options === "number") return options;
|
186
|
+
return { ...defaults, ...options }.mode;
|
187
|
+
};
|
188
|
+
module2.exports.makeDir = async (dir, options) => {
|
189
|
+
checkPath(dir);
|
190
|
+
return fs.mkdir(dir, {
|
191
|
+
mode: getMode(options),
|
192
|
+
recursive: true
|
193
|
+
});
|
194
|
+
};
|
195
|
+
module2.exports.makeDirSync = (dir, options) => {
|
196
|
+
checkPath(dir);
|
197
|
+
return fs.mkdirSync(dir, {
|
198
|
+
mode: getMode(options),
|
199
|
+
recursive: true
|
200
|
+
});
|
201
|
+
};
|
202
|
+
}
|
203
|
+
});
|
204
|
+
var require_mkdirs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
205
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module2) {
|
206
|
+
"use strict";
|
207
|
+
var u = require_universalify().fromPromise;
|
208
|
+
var { makeDir: _makeDir, makeDirSync } = require_make_dir();
|
209
|
+
var makeDir = u(_makeDir);
|
210
|
+
module2.exports = {
|
211
|
+
mkdirs: makeDir,
|
212
|
+
mkdirsSync: makeDirSync,
|
213
|
+
// alias
|
214
|
+
mkdirp: makeDir,
|
215
|
+
mkdirpSync: makeDirSync,
|
216
|
+
ensureDir: makeDir,
|
217
|
+
ensureDirSync: makeDirSync
|
218
|
+
};
|
219
|
+
}
|
220
|
+
});
|
221
|
+
var require_path_exists = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
222
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) {
|
223
|
+
"use strict";
|
224
|
+
var u = require_universalify().fromPromise;
|
225
|
+
var fs = require_fs();
|
226
|
+
function pathExists(path) {
|
227
|
+
return fs.access(path).then(() => true).catch(() => false);
|
228
|
+
}
|
229
|
+
module2.exports = {
|
230
|
+
pathExists: u(pathExists),
|
231
|
+
pathExistsSync: fs.existsSync
|
232
|
+
};
|
233
|
+
}
|
234
|
+
});
|
235
|
+
var require_utimes = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
236
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) {
|
237
|
+
"use strict";
|
238
|
+
var fs = (0, import_chunk_H4J2FN2W.require_graceful_fs)();
|
239
|
+
function utimesMillis(path, atime, mtime, callback) {
|
240
|
+
fs.open(path, "r+", (err, fd) => {
|
241
|
+
if (err) return callback(err);
|
242
|
+
fs.futimes(fd, atime, mtime, (futimesErr) => {
|
243
|
+
fs.close(fd, (closeErr) => {
|
244
|
+
if (callback) callback(futimesErr || closeErr);
|
245
|
+
});
|
246
|
+
});
|
247
|
+
});
|
248
|
+
}
|
249
|
+
function utimesMillisSync(path, atime, mtime) {
|
250
|
+
const fd = fs.openSync(path, "r+");
|
251
|
+
fs.futimesSync(fd, atime, mtime);
|
252
|
+
return fs.closeSync(fd);
|
253
|
+
}
|
254
|
+
module2.exports = {
|
255
|
+
utimesMillis,
|
256
|
+
utimesMillisSync
|
257
|
+
};
|
258
|
+
}
|
259
|
+
});
|
260
|
+
var require_stat = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
261
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js"(exports, module2) {
|
262
|
+
"use strict";
|
263
|
+
var fs = require_fs();
|
264
|
+
var path = (0, import_chunk_WWAWV7DQ.__require)("path");
|
265
|
+
var util = (0, import_chunk_WWAWV7DQ.__require)("util");
|
266
|
+
function getStats(src, dest, opts) {
|
267
|
+
const statFunc = opts.dereference ? (file) => fs.stat(file, { bigint: true }) : (file) => fs.lstat(file, { bigint: true });
|
268
|
+
return Promise.all([
|
269
|
+
statFunc(src),
|
270
|
+
statFunc(dest).catch((err) => {
|
271
|
+
if (err.code === "ENOENT") return null;
|
272
|
+
throw err;
|
273
|
+
})
|
274
|
+
]).then(([srcStat, destStat]) => ({ srcStat, destStat }));
|
275
|
+
}
|
276
|
+
function getStatsSync(src, dest, opts) {
|
277
|
+
let destStat;
|
278
|
+
const statFunc = opts.dereference ? (file) => fs.statSync(file, { bigint: true }) : (file) => fs.lstatSync(file, { bigint: true });
|
279
|
+
const srcStat = statFunc(src);
|
280
|
+
try {
|
281
|
+
destStat = statFunc(dest);
|
282
|
+
} catch (err) {
|
283
|
+
if (err.code === "ENOENT") return { srcStat, destStat: null };
|
284
|
+
throw err;
|
285
|
+
}
|
286
|
+
return { srcStat, destStat };
|
287
|
+
}
|
288
|
+
function checkPaths(src, dest, funcName, opts, cb) {
|
289
|
+
util.callbackify(getStats)(src, dest, opts, (err, stats) => {
|
290
|
+
if (err) return cb(err);
|
291
|
+
const { srcStat, destStat } = stats;
|
292
|
+
if (destStat) {
|
293
|
+
if (areIdentical(srcStat, destStat)) {
|
294
|
+
const srcBaseName = path.basename(src);
|
295
|
+
const destBaseName = path.basename(dest);
|
296
|
+
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
297
|
+
return cb(null, { srcStat, destStat, isChangingCase: true });
|
298
|
+
}
|
299
|
+
return cb(new Error("Source and destination must not be the same."));
|
300
|
+
}
|
301
|
+
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
302
|
+
return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`));
|
303
|
+
}
|
304
|
+
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
305
|
+
return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`));
|
306
|
+
}
|
307
|
+
}
|
308
|
+
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
309
|
+
return cb(new Error(errMsg(src, dest, funcName)));
|
310
|
+
}
|
311
|
+
return cb(null, { srcStat, destStat });
|
312
|
+
});
|
313
|
+
}
|
314
|
+
function checkPathsSync(src, dest, funcName, opts) {
|
315
|
+
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
316
|
+
if (destStat) {
|
317
|
+
if (areIdentical(srcStat, destStat)) {
|
318
|
+
const srcBaseName = path.basename(src);
|
319
|
+
const destBaseName = path.basename(dest);
|
320
|
+
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
321
|
+
return { srcStat, destStat, isChangingCase: true };
|
322
|
+
}
|
323
|
+
throw new Error("Source and destination must not be the same.");
|
324
|
+
}
|
325
|
+
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
326
|
+
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
|
327
|
+
}
|
328
|
+
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
329
|
+
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
|
330
|
+
}
|
331
|
+
}
|
332
|
+
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
333
|
+
throw new Error(errMsg(src, dest, funcName));
|
334
|
+
}
|
335
|
+
return { srcStat, destStat };
|
336
|
+
}
|
337
|
+
function checkParentPaths(src, srcStat, dest, funcName, cb) {
|
338
|
+
const srcParent = path.resolve(path.dirname(src));
|
339
|
+
const destParent = path.resolve(path.dirname(dest));
|
340
|
+
if (destParent === srcParent || destParent === path.parse(destParent).root) return cb();
|
341
|
+
fs.stat(destParent, { bigint: true }, (err, destStat) => {
|
342
|
+
if (err) {
|
343
|
+
if (err.code === "ENOENT") return cb();
|
344
|
+
return cb(err);
|
345
|
+
}
|
346
|
+
if (areIdentical(srcStat, destStat)) {
|
347
|
+
return cb(new Error(errMsg(src, dest, funcName)));
|
348
|
+
}
|
349
|
+
return checkParentPaths(src, srcStat, destParent, funcName, cb);
|
350
|
+
});
|
351
|
+
}
|
352
|
+
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
353
|
+
const srcParent = path.resolve(path.dirname(src));
|
354
|
+
const destParent = path.resolve(path.dirname(dest));
|
355
|
+
if (destParent === srcParent || destParent === path.parse(destParent).root) return;
|
356
|
+
let destStat;
|
357
|
+
try {
|
358
|
+
destStat = fs.statSync(destParent, { bigint: true });
|
359
|
+
} catch (err) {
|
360
|
+
if (err.code === "ENOENT") return;
|
361
|
+
throw err;
|
362
|
+
}
|
363
|
+
if (areIdentical(srcStat, destStat)) {
|
364
|
+
throw new Error(errMsg(src, dest, funcName));
|
365
|
+
}
|
366
|
+
return checkParentPathsSync(src, srcStat, destParent, funcName);
|
367
|
+
}
|
368
|
+
function areIdentical(srcStat, destStat) {
|
369
|
+
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
370
|
+
}
|
371
|
+
function isSrcSubdir(src, dest) {
|
372
|
+
const srcArr = path.resolve(src).split(path.sep).filter((i) => i);
|
373
|
+
const destArr = path.resolve(dest).split(path.sep).filter((i) => i);
|
374
|
+
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true);
|
375
|
+
}
|
376
|
+
function errMsg(src, dest, funcName) {
|
377
|
+
return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
|
378
|
+
}
|
379
|
+
module2.exports = {
|
380
|
+
checkPaths,
|
381
|
+
checkPathsSync,
|
382
|
+
checkParentPaths,
|
383
|
+
checkParentPathsSync,
|
384
|
+
isSrcSubdir,
|
385
|
+
areIdentical
|
386
|
+
};
|
387
|
+
}
|
388
|
+
});
|
389
|
+
var require_copy = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
390
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) {
|
391
|
+
"use strict";
|
392
|
+
var fs = (0, import_chunk_H4J2FN2W.require_graceful_fs)();
|
393
|
+
var path = (0, import_chunk_WWAWV7DQ.__require)("path");
|
394
|
+
var mkdirs = require_mkdirs().mkdirs;
|
395
|
+
var pathExists = require_path_exists().pathExists;
|
396
|
+
var utimesMillis = require_utimes().utimesMillis;
|
397
|
+
var stat = require_stat();
|
398
|
+
function copy(src, dest, opts, cb) {
|
399
|
+
if (typeof opts === "function" && !cb) {
|
400
|
+
cb = opts;
|
401
|
+
opts = {};
|
402
|
+
} else if (typeof opts === "function") {
|
403
|
+
opts = { filter: opts };
|
404
|
+
}
|
405
|
+
cb = cb || function() {
|
406
|
+
};
|
407
|
+
opts = opts || {};
|
408
|
+
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
409
|
+
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
410
|
+
if (opts.preserveTimestamps && process.arch === "ia32") {
|
411
|
+
process.emitWarning(
|
412
|
+
"Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
|
413
|
+
"Warning",
|
414
|
+
"fs-extra-WARN0001"
|
415
|
+
);
|
416
|
+
}
|
417
|
+
stat.checkPaths(src, dest, "copy", opts, (err, stats) => {
|
418
|
+
if (err) return cb(err);
|
419
|
+
const { srcStat, destStat } = stats;
|
420
|
+
stat.checkParentPaths(src, srcStat, dest, "copy", (err2) => {
|
421
|
+
if (err2) return cb(err2);
|
422
|
+
runFilter(src, dest, opts, (err3, include) => {
|
423
|
+
if (err3) return cb(err3);
|
424
|
+
if (!include) return cb();
|
425
|
+
checkParentDir(destStat, src, dest, opts, cb);
|
426
|
+
});
|
427
|
+
});
|
428
|
+
});
|
429
|
+
}
|
430
|
+
function checkParentDir(destStat, src, dest, opts, cb) {
|
431
|
+
const destParent = path.dirname(dest);
|
432
|
+
pathExists(destParent, (err, dirExists) => {
|
433
|
+
if (err) return cb(err);
|
434
|
+
if (dirExists) return getStats(destStat, src, dest, opts, cb);
|
435
|
+
mkdirs(destParent, (err2) => {
|
436
|
+
if (err2) return cb(err2);
|
437
|
+
return getStats(destStat, src, dest, opts, cb);
|
438
|
+
});
|
439
|
+
});
|
440
|
+
}
|
441
|
+
function runFilter(src, dest, opts, cb) {
|
442
|
+
if (!opts.filter) return cb(null, true);
|
443
|
+
Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error));
|
444
|
+
}
|
445
|
+
function getStats(destStat, src, dest, opts, cb) {
|
446
|
+
const stat2 = opts.dereference ? fs.stat : fs.lstat;
|
447
|
+
stat2(src, (err, srcStat) => {
|
448
|
+
if (err) return cb(err);
|
449
|
+
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb);
|
450
|
+
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb);
|
451
|
+
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb);
|
452
|
+
else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`));
|
453
|
+
else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`));
|
454
|
+
return cb(new Error(`Unknown file: ${src}`));
|
455
|
+
});
|
456
|
+
}
|
457
|
+
function onFile(srcStat, destStat, src, dest, opts, cb) {
|
458
|
+
if (!destStat) return copyFile(srcStat, src, dest, opts, cb);
|
459
|
+
return mayCopyFile(srcStat, src, dest, opts, cb);
|
460
|
+
}
|
461
|
+
function mayCopyFile(srcStat, src, dest, opts, cb) {
|
462
|
+
if (opts.overwrite) {
|
463
|
+
fs.unlink(dest, (err) => {
|
464
|
+
if (err) return cb(err);
|
465
|
+
return copyFile(srcStat, src, dest, opts, cb);
|
466
|
+
});
|
467
|
+
} else if (opts.errorOnExist) {
|
468
|
+
return cb(new Error(`'${dest}' already exists`));
|
469
|
+
} else return cb();
|
470
|
+
}
|
471
|
+
function copyFile(srcStat, src, dest, opts, cb) {
|
472
|
+
fs.copyFile(src, dest, (err) => {
|
473
|
+
if (err) return cb(err);
|
474
|
+
if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb);
|
475
|
+
return setDestMode(dest, srcStat.mode, cb);
|
476
|
+
});
|
477
|
+
}
|
478
|
+
function handleTimestampsAndMode(srcMode, src, dest, cb) {
|
479
|
+
if (fileIsNotWritable(srcMode)) {
|
480
|
+
return makeFileWritable(dest, srcMode, (err) => {
|
481
|
+
if (err) return cb(err);
|
482
|
+
return setDestTimestampsAndMode(srcMode, src, dest, cb);
|
483
|
+
});
|
484
|
+
}
|
485
|
+
return setDestTimestampsAndMode(srcMode, src, dest, cb);
|
486
|
+
}
|
487
|
+
function fileIsNotWritable(srcMode) {
|
488
|
+
return (srcMode & 128) === 0;
|
489
|
+
}
|
490
|
+
function makeFileWritable(dest, srcMode, cb) {
|
491
|
+
return setDestMode(dest, srcMode | 128, cb);
|
492
|
+
}
|
493
|
+
function setDestTimestampsAndMode(srcMode, src, dest, cb) {
|
494
|
+
setDestTimestamps(src, dest, (err) => {
|
495
|
+
if (err) return cb(err);
|
496
|
+
return setDestMode(dest, srcMode, cb);
|
497
|
+
});
|
498
|
+
}
|
499
|
+
function setDestMode(dest, srcMode, cb) {
|
500
|
+
return fs.chmod(dest, srcMode, cb);
|
501
|
+
}
|
502
|
+
function setDestTimestamps(src, dest, cb) {
|
503
|
+
fs.stat(src, (err, updatedSrcStat) => {
|
504
|
+
if (err) return cb(err);
|
505
|
+
return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb);
|
506
|
+
});
|
507
|
+
}
|
508
|
+
function onDir(srcStat, destStat, src, dest, opts, cb) {
|
509
|
+
if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
|
510
|
+
return copyDir(src, dest, opts, cb);
|
511
|
+
}
|
512
|
+
function mkDirAndCopy(srcMode, src, dest, opts, cb) {
|
513
|
+
fs.mkdir(dest, (err) => {
|
514
|
+
if (err) return cb(err);
|
515
|
+
copyDir(src, dest, opts, (err2) => {
|
516
|
+
if (err2) return cb(err2);
|
517
|
+
return setDestMode(dest, srcMode, cb);
|
518
|
+
});
|
519
|
+
});
|
520
|
+
}
|
521
|
+
function copyDir(src, dest, opts, cb) {
|
522
|
+
fs.readdir(src, (err, items) => {
|
523
|
+
if (err) return cb(err);
|
524
|
+
return copyDirItems(items, src, dest, opts, cb);
|
525
|
+
});
|
526
|
+
}
|
527
|
+
function copyDirItems(items, src, dest, opts, cb) {
|
528
|
+
const item = items.pop();
|
529
|
+
if (!item) return cb();
|
530
|
+
return copyDirItem(items, item, src, dest, opts, cb);
|
531
|
+
}
|
532
|
+
function copyDirItem(items, item, src, dest, opts, cb) {
|
533
|
+
const srcItem = path.join(src, item);
|
534
|
+
const destItem = path.join(dest, item);
|
535
|
+
runFilter(srcItem, destItem, opts, (err, include) => {
|
536
|
+
if (err) return cb(err);
|
537
|
+
if (!include) return copyDirItems(items, src, dest, opts, cb);
|
538
|
+
stat.checkPaths(srcItem, destItem, "copy", opts, (err2, stats) => {
|
539
|
+
if (err2) return cb(err2);
|
540
|
+
const { destStat } = stats;
|
541
|
+
getStats(destStat, srcItem, destItem, opts, (err3) => {
|
542
|
+
if (err3) return cb(err3);
|
543
|
+
return copyDirItems(items, src, dest, opts, cb);
|
544
|
+
});
|
545
|
+
});
|
546
|
+
});
|
547
|
+
}
|
548
|
+
function onLink(destStat, src, dest, opts, cb) {
|
549
|
+
fs.readlink(src, (err, resolvedSrc) => {
|
550
|
+
if (err) return cb(err);
|
551
|
+
if (opts.dereference) {
|
552
|
+
resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
|
553
|
+
}
|
554
|
+
if (!destStat) {
|
555
|
+
return fs.symlink(resolvedSrc, dest, cb);
|
556
|
+
} else {
|
557
|
+
fs.readlink(dest, (err2, resolvedDest) => {
|
558
|
+
if (err2) {
|
559
|
+
if (err2.code === "EINVAL" || err2.code === "UNKNOWN") return fs.symlink(resolvedSrc, dest, cb);
|
560
|
+
return cb(err2);
|
561
|
+
}
|
562
|
+
if (opts.dereference) {
|
563
|
+
resolvedDest = path.resolve(process.cwd(), resolvedDest);
|
564
|
+
}
|
565
|
+
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
566
|
+
return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
|
567
|
+
}
|
568
|
+
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
569
|
+
return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
|
570
|
+
}
|
571
|
+
return copyLink(resolvedSrc, dest, cb);
|
572
|
+
});
|
573
|
+
}
|
574
|
+
});
|
575
|
+
}
|
576
|
+
function copyLink(resolvedSrc, dest, cb) {
|
577
|
+
fs.unlink(dest, (err) => {
|
578
|
+
if (err) return cb(err);
|
579
|
+
return fs.symlink(resolvedSrc, dest, cb);
|
580
|
+
});
|
581
|
+
}
|
582
|
+
module2.exports = copy;
|
583
|
+
}
|
584
|
+
});
|
585
|
+
var require_copy_sync = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
586
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module2) {
|
587
|
+
"use strict";
|
588
|
+
var fs = (0, import_chunk_H4J2FN2W.require_graceful_fs)();
|
589
|
+
var path = (0, import_chunk_WWAWV7DQ.__require)("path");
|
590
|
+
var mkdirsSync = require_mkdirs().mkdirsSync;
|
591
|
+
var utimesMillisSync = require_utimes().utimesMillisSync;
|
592
|
+
var stat = require_stat();
|
593
|
+
function copySync(src, dest, opts) {
|
594
|
+
if (typeof opts === "function") {
|
595
|
+
opts = { filter: opts };
|
596
|
+
}
|
597
|
+
opts = opts || {};
|
598
|
+
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
599
|
+
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
600
|
+
if (opts.preserveTimestamps && process.arch === "ia32") {
|
601
|
+
process.emitWarning(
|
602
|
+
"Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
|
603
|
+
"Warning",
|
604
|
+
"fs-extra-WARN0002"
|
605
|
+
);
|
606
|
+
}
|
607
|
+
const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
608
|
+
stat.checkParentPathsSync(src, srcStat, dest, "copy");
|
609
|
+
if (opts.filter && !opts.filter(src, dest)) return;
|
610
|
+
const destParent = path.dirname(dest);
|
611
|
+
if (!fs.existsSync(destParent)) mkdirsSync(destParent);
|
612
|
+
return getStats(destStat, src, dest, opts);
|
613
|
+
}
|
614
|
+
function getStats(destStat, src, dest, opts) {
|
615
|
+
const statSync = opts.dereference ? fs.statSync : fs.lstatSync;
|
616
|
+
const srcStat = statSync(src);
|
617
|
+
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
618
|
+
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
619
|
+
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
|
620
|
+
else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`);
|
621
|
+
else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`);
|
622
|
+
throw new Error(`Unknown file: ${src}`);
|
623
|
+
}
|
624
|
+
function onFile(srcStat, destStat, src, dest, opts) {
|
625
|
+
if (!destStat) return copyFile(srcStat, src, dest, opts);
|
626
|
+
return mayCopyFile(srcStat, src, dest, opts);
|
627
|
+
}
|
628
|
+
function mayCopyFile(srcStat, src, dest, opts) {
|
629
|
+
if (opts.overwrite) {
|
630
|
+
fs.unlinkSync(dest);
|
631
|
+
return copyFile(srcStat, src, dest, opts);
|
632
|
+
} else if (opts.errorOnExist) {
|
633
|
+
throw new Error(`'${dest}' already exists`);
|
634
|
+
}
|
635
|
+
}
|
636
|
+
function copyFile(srcStat, src, dest, opts) {
|
637
|
+
fs.copyFileSync(src, dest);
|
638
|
+
if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
|
639
|
+
return setDestMode(dest, srcStat.mode);
|
640
|
+
}
|
641
|
+
function handleTimestamps(srcMode, src, dest) {
|
642
|
+
if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode);
|
643
|
+
return setDestTimestamps(src, dest);
|
644
|
+
}
|
645
|
+
function fileIsNotWritable(srcMode) {
|
646
|
+
return (srcMode & 128) === 0;
|
647
|
+
}
|
648
|
+
function makeFileWritable(dest, srcMode) {
|
649
|
+
return setDestMode(dest, srcMode | 128);
|
650
|
+
}
|
651
|
+
function setDestMode(dest, srcMode) {
|
652
|
+
return fs.chmodSync(dest, srcMode);
|
653
|
+
}
|
654
|
+
function setDestTimestamps(src, dest) {
|
655
|
+
const updatedSrcStat = fs.statSync(src);
|
656
|
+
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
657
|
+
}
|
658
|
+
function onDir(srcStat, destStat, src, dest, opts) {
|
659
|
+
if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts);
|
660
|
+
return copyDir(src, dest, opts);
|
661
|
+
}
|
662
|
+
function mkDirAndCopy(srcMode, src, dest, opts) {
|
663
|
+
fs.mkdirSync(dest);
|
664
|
+
copyDir(src, dest, opts);
|
665
|
+
return setDestMode(dest, srcMode);
|
666
|
+
}
|
667
|
+
function copyDir(src, dest, opts) {
|
668
|
+
fs.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
669
|
+
}
|
670
|
+
function copyDirItem(item, src, dest, opts) {
|
671
|
+
const srcItem = path.join(src, item);
|
672
|
+
const destItem = path.join(dest, item);
|
673
|
+
if (opts.filter && !opts.filter(srcItem, destItem)) return;
|
674
|
+
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
|
675
|
+
return getStats(destStat, srcItem, destItem, opts);
|
676
|
+
}
|
677
|
+
function onLink(destStat, src, dest, opts) {
|
678
|
+
let resolvedSrc = fs.readlinkSync(src);
|
679
|
+
if (opts.dereference) {
|
680
|
+
resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
|
681
|
+
}
|
682
|
+
if (!destStat) {
|
683
|
+
return fs.symlinkSync(resolvedSrc, dest);
|
684
|
+
} else {
|
685
|
+
let resolvedDest;
|
686
|
+
try {
|
687
|
+
resolvedDest = fs.readlinkSync(dest);
|
688
|
+
} catch (err) {
|
689
|
+
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs.symlinkSync(resolvedSrc, dest);
|
690
|
+
throw err;
|
691
|
+
}
|
692
|
+
if (opts.dereference) {
|
693
|
+
resolvedDest = path.resolve(process.cwd(), resolvedDest);
|
694
|
+
}
|
695
|
+
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
696
|
+
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
697
|
+
}
|
698
|
+
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
699
|
+
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
700
|
+
}
|
701
|
+
return copyLink(resolvedSrc, dest);
|
702
|
+
}
|
703
|
+
}
|
704
|
+
function copyLink(resolvedSrc, dest) {
|
705
|
+
fs.unlinkSync(dest);
|
706
|
+
return fs.symlinkSync(resolvedSrc, dest);
|
707
|
+
}
|
708
|
+
module2.exports = copySync;
|
709
|
+
}
|
710
|
+
});
|
711
|
+
var require_copy2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
712
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js"(exports, module2) {
|
713
|
+
"use strict";
|
714
|
+
var u = require_universalify().fromCallback;
|
715
|
+
module2.exports = {
|
716
|
+
copy: u(require_copy()),
|
717
|
+
copySync: require_copy_sync()
|
718
|
+
};
|
719
|
+
}
|
720
|
+
});
|
721
|
+
var require_remove = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
722
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js"(exports, module2) {
|
723
|
+
"use strict";
|
724
|
+
var fs = (0, import_chunk_H4J2FN2W.require_graceful_fs)();
|
725
|
+
var u = require_universalify().fromCallback;
|
726
|
+
function remove(path, callback) {
|
727
|
+
fs.rm(path, { recursive: true, force: true }, callback);
|
728
|
+
}
|
729
|
+
function removeSync(path) {
|
730
|
+
fs.rmSync(path, { recursive: true, force: true });
|
731
|
+
}
|
732
|
+
module2.exports = {
|
733
|
+
remove: u(remove),
|
734
|
+
removeSync
|
735
|
+
};
|
736
|
+
}
|
737
|
+
});
|
738
|
+
var require_empty = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
739
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js"(exports, module2) {
|
740
|
+
"use strict";
|
741
|
+
var u = require_universalify().fromPromise;
|
742
|
+
var fs = require_fs();
|
743
|
+
var path = (0, import_chunk_WWAWV7DQ.__require)("path");
|
744
|
+
var mkdir = require_mkdirs();
|
745
|
+
var remove = require_remove();
|
746
|
+
var emptyDir = u(async function emptyDir2(dir) {
|
747
|
+
let items;
|
748
|
+
try {
|
749
|
+
items = await fs.readdir(dir);
|
750
|
+
} catch {
|
751
|
+
return mkdir.mkdirs(dir);
|
752
|
+
}
|
753
|
+
return Promise.all(items.map((item) => remove.remove(path.join(dir, item))));
|
754
|
+
});
|
755
|
+
function emptyDirSync(dir) {
|
756
|
+
let items;
|
757
|
+
try {
|
758
|
+
items = fs.readdirSync(dir);
|
759
|
+
} catch {
|
760
|
+
return mkdir.mkdirsSync(dir);
|
761
|
+
}
|
762
|
+
items.forEach((item) => {
|
763
|
+
item = path.join(dir, item);
|
764
|
+
remove.removeSync(item);
|
765
|
+
});
|
766
|
+
}
|
767
|
+
module2.exports = {
|
768
|
+
emptyDirSync,
|
769
|
+
emptydirSync: emptyDirSync,
|
770
|
+
emptyDir,
|
771
|
+
emptydir: emptyDir
|
772
|
+
};
|
773
|
+
}
|
774
|
+
});
|
775
|
+
var require_file = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
776
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) {
|
777
|
+
"use strict";
|
778
|
+
var u = require_universalify().fromCallback;
|
779
|
+
var path = (0, import_chunk_WWAWV7DQ.__require)("path");
|
780
|
+
var fs = (0, import_chunk_H4J2FN2W.require_graceful_fs)();
|
781
|
+
var mkdir = require_mkdirs();
|
782
|
+
function createFile(file, callback) {
|
783
|
+
function makeFile() {
|
784
|
+
fs.writeFile(file, "", (err) => {
|
785
|
+
if (err) return callback(err);
|
786
|
+
callback();
|
787
|
+
});
|
788
|
+
}
|
789
|
+
fs.stat(file, (err, stats) => {
|
790
|
+
if (!err && stats.isFile()) return callback();
|
791
|
+
const dir = path.dirname(file);
|
792
|
+
fs.stat(dir, (err2, stats2) => {
|
793
|
+
if (err2) {
|
794
|
+
if (err2.code === "ENOENT") {
|
795
|
+
return mkdir.mkdirs(dir, (err3) => {
|
796
|
+
if (err3) return callback(err3);
|
797
|
+
makeFile();
|
798
|
+
});
|
799
|
+
}
|
800
|
+
return callback(err2);
|
801
|
+
}
|
802
|
+
if (stats2.isDirectory()) makeFile();
|
803
|
+
else {
|
804
|
+
fs.readdir(dir, (err3) => {
|
805
|
+
if (err3) return callback(err3);
|
806
|
+
});
|
807
|
+
}
|
808
|
+
});
|
809
|
+
});
|
810
|
+
}
|
811
|
+
function createFileSync(file) {
|
812
|
+
let stats;
|
813
|
+
try {
|
814
|
+
stats = fs.statSync(file);
|
815
|
+
} catch {
|
816
|
+
}
|
817
|
+
if (stats && stats.isFile()) return;
|
818
|
+
const dir = path.dirname(file);
|
819
|
+
try {
|
820
|
+
if (!fs.statSync(dir).isDirectory()) {
|
821
|
+
fs.readdirSync(dir);
|
822
|
+
}
|
823
|
+
} catch (err) {
|
824
|
+
if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
|
825
|
+
else throw err;
|
826
|
+
}
|
827
|
+
fs.writeFileSync(file, "");
|
828
|
+
}
|
829
|
+
module2.exports = {
|
830
|
+
createFile: u(createFile),
|
831
|
+
createFileSync
|
832
|
+
};
|
833
|
+
}
|
834
|
+
});
|
835
|
+
var require_link = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
836
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) {
|
837
|
+
"use strict";
|
838
|
+
var u = require_universalify().fromCallback;
|
839
|
+
var path = (0, import_chunk_WWAWV7DQ.__require)("path");
|
840
|
+
var fs = (0, import_chunk_H4J2FN2W.require_graceful_fs)();
|
841
|
+
var mkdir = require_mkdirs();
|
842
|
+
var pathExists = require_path_exists().pathExists;
|
843
|
+
var { areIdentical } = require_stat();
|
844
|
+
function createLink(srcpath, dstpath, callback) {
|
845
|
+
function makeLink(srcpath2, dstpath2) {
|
846
|
+
fs.link(srcpath2, dstpath2, (err) => {
|
847
|
+
if (err) return callback(err);
|
848
|
+
callback(null);
|
849
|
+
});
|
850
|
+
}
|
851
|
+
fs.lstat(dstpath, (_, dstStat) => {
|
852
|
+
fs.lstat(srcpath, (err, srcStat) => {
|
853
|
+
if (err) {
|
854
|
+
err.message = err.message.replace("lstat", "ensureLink");
|
855
|
+
return callback(err);
|
856
|
+
}
|
857
|
+
if (dstStat && areIdentical(srcStat, dstStat)) return callback(null);
|
858
|
+
const dir = path.dirname(dstpath);
|
859
|
+
pathExists(dir, (err2, dirExists) => {
|
860
|
+
if (err2) return callback(err2);
|
861
|
+
if (dirExists) return makeLink(srcpath, dstpath);
|
862
|
+
mkdir.mkdirs(dir, (err3) => {
|
863
|
+
if (err3) return callback(err3);
|
864
|
+
makeLink(srcpath, dstpath);
|
865
|
+
});
|
866
|
+
});
|
867
|
+
});
|
868
|
+
});
|
869
|
+
}
|
870
|
+
function createLinkSync(srcpath, dstpath) {
|
871
|
+
let dstStat;
|
872
|
+
try {
|
873
|
+
dstStat = fs.lstatSync(dstpath);
|
874
|
+
} catch {
|
875
|
+
}
|
876
|
+
try {
|
877
|
+
const srcStat = fs.lstatSync(srcpath);
|
878
|
+
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
879
|
+
} catch (err) {
|
880
|
+
err.message = err.message.replace("lstat", "ensureLink");
|
881
|
+
throw err;
|
882
|
+
}
|
883
|
+
const dir = path.dirname(dstpath);
|
884
|
+
const dirExists = fs.existsSync(dir);
|
885
|
+
if (dirExists) return fs.linkSync(srcpath, dstpath);
|
886
|
+
mkdir.mkdirsSync(dir);
|
887
|
+
return fs.linkSync(srcpath, dstpath);
|
888
|
+
}
|
889
|
+
module2.exports = {
|
890
|
+
createLink: u(createLink),
|
891
|
+
createLinkSync
|
892
|
+
};
|
893
|
+
}
|
894
|
+
});
|
895
|
+
var require_symlink_paths = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
896
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) {
|
897
|
+
"use strict";
|
898
|
+
var path = (0, import_chunk_WWAWV7DQ.__require)("path");
|
899
|
+
var fs = (0, import_chunk_H4J2FN2W.require_graceful_fs)();
|
900
|
+
var pathExists = require_path_exists().pathExists;
|
901
|
+
function symlinkPaths(srcpath, dstpath, callback) {
|
902
|
+
if (path.isAbsolute(srcpath)) {
|
903
|
+
return fs.lstat(srcpath, (err) => {
|
904
|
+
if (err) {
|
905
|
+
err.message = err.message.replace("lstat", "ensureSymlink");
|
906
|
+
return callback(err);
|
907
|
+
}
|
908
|
+
return callback(null, {
|
909
|
+
toCwd: srcpath,
|
910
|
+
toDst: srcpath
|
911
|
+
});
|
912
|
+
});
|
913
|
+
} else {
|
914
|
+
const dstdir = path.dirname(dstpath);
|
915
|
+
const relativeToDst = path.join(dstdir, srcpath);
|
916
|
+
return pathExists(relativeToDst, (err, exists) => {
|
917
|
+
if (err) return callback(err);
|
918
|
+
if (exists) {
|
919
|
+
return callback(null, {
|
920
|
+
toCwd: relativeToDst,
|
921
|
+
toDst: srcpath
|
922
|
+
});
|
923
|
+
} else {
|
924
|
+
return fs.lstat(srcpath, (err2) => {
|
925
|
+
if (err2) {
|
926
|
+
err2.message = err2.message.replace("lstat", "ensureSymlink");
|
927
|
+
return callback(err2);
|
928
|
+
}
|
929
|
+
return callback(null, {
|
930
|
+
toCwd: srcpath,
|
931
|
+
toDst: path.relative(dstdir, srcpath)
|
932
|
+
});
|
933
|
+
});
|
934
|
+
}
|
935
|
+
});
|
936
|
+
}
|
937
|
+
}
|
938
|
+
function symlinkPathsSync(srcpath, dstpath) {
|
939
|
+
let exists;
|
940
|
+
if (path.isAbsolute(srcpath)) {
|
941
|
+
exists = fs.existsSync(srcpath);
|
942
|
+
if (!exists) throw new Error("absolute srcpath does not exist");
|
943
|
+
return {
|
944
|
+
toCwd: srcpath,
|
945
|
+
toDst: srcpath
|
946
|
+
};
|
947
|
+
} else {
|
948
|
+
const dstdir = path.dirname(dstpath);
|
949
|
+
const relativeToDst = path.join(dstdir, srcpath);
|
950
|
+
exists = fs.existsSync(relativeToDst);
|
951
|
+
if (exists) {
|
952
|
+
return {
|
953
|
+
toCwd: relativeToDst,
|
954
|
+
toDst: srcpath
|
955
|
+
};
|
956
|
+
} else {
|
957
|
+
exists = fs.existsSync(srcpath);
|
958
|
+
if (!exists) throw new Error("relative srcpath does not exist");
|
959
|
+
return {
|
960
|
+
toCwd: srcpath,
|
961
|
+
toDst: path.relative(dstdir, srcpath)
|
962
|
+
};
|
963
|
+
}
|
964
|
+
}
|
965
|
+
}
|
966
|
+
module2.exports = {
|
967
|
+
symlinkPaths,
|
968
|
+
symlinkPathsSync
|
969
|
+
};
|
970
|
+
}
|
971
|
+
});
|
972
|
+
var require_symlink_type = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
973
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) {
|
974
|
+
"use strict";
|
975
|
+
var fs = (0, import_chunk_H4J2FN2W.require_graceful_fs)();
|
976
|
+
function symlinkType(srcpath, type, callback) {
|
977
|
+
callback = typeof type === "function" ? type : callback;
|
978
|
+
type = typeof type === "function" ? false : type;
|
979
|
+
if (type) return callback(null, type);
|
980
|
+
fs.lstat(srcpath, (err, stats) => {
|
981
|
+
if (err) return callback(null, "file");
|
982
|
+
type = stats && stats.isDirectory() ? "dir" : "file";
|
983
|
+
callback(null, type);
|
984
|
+
});
|
985
|
+
}
|
986
|
+
function symlinkTypeSync(srcpath, type) {
|
987
|
+
let stats;
|
988
|
+
if (type) return type;
|
989
|
+
try {
|
990
|
+
stats = fs.lstatSync(srcpath);
|
991
|
+
} catch {
|
992
|
+
return "file";
|
993
|
+
}
|
994
|
+
return stats && stats.isDirectory() ? "dir" : "file";
|
995
|
+
}
|
996
|
+
module2.exports = {
|
997
|
+
symlinkType,
|
998
|
+
symlinkTypeSync
|
999
|
+
};
|
1000
|
+
}
|
1001
|
+
});
|
1002
|
+
var require_symlink = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
1003
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) {
|
1004
|
+
"use strict";
|
1005
|
+
var u = require_universalify().fromCallback;
|
1006
|
+
var path = (0, import_chunk_WWAWV7DQ.__require)("path");
|
1007
|
+
var fs = require_fs();
|
1008
|
+
var _mkdirs = require_mkdirs();
|
1009
|
+
var mkdirs = _mkdirs.mkdirs;
|
1010
|
+
var mkdirsSync = _mkdirs.mkdirsSync;
|
1011
|
+
var _symlinkPaths = require_symlink_paths();
|
1012
|
+
var symlinkPaths = _symlinkPaths.symlinkPaths;
|
1013
|
+
var symlinkPathsSync = _symlinkPaths.symlinkPathsSync;
|
1014
|
+
var _symlinkType = require_symlink_type();
|
1015
|
+
var symlinkType = _symlinkType.symlinkType;
|
1016
|
+
var symlinkTypeSync = _symlinkType.symlinkTypeSync;
|
1017
|
+
var pathExists = require_path_exists().pathExists;
|
1018
|
+
var { areIdentical } = require_stat();
|
1019
|
+
function createSymlink(srcpath, dstpath, type, callback) {
|
1020
|
+
callback = typeof type === "function" ? type : callback;
|
1021
|
+
type = typeof type === "function" ? false : type;
|
1022
|
+
fs.lstat(dstpath, (err, stats) => {
|
1023
|
+
if (!err && stats.isSymbolicLink()) {
|
1024
|
+
Promise.all([
|
1025
|
+
fs.stat(srcpath),
|
1026
|
+
fs.stat(dstpath)
|
1027
|
+
]).then(([srcStat, dstStat]) => {
|
1028
|
+
if (areIdentical(srcStat, dstStat)) return callback(null);
|
1029
|
+
_createSymlink(srcpath, dstpath, type, callback);
|
1030
|
+
});
|
1031
|
+
} else _createSymlink(srcpath, dstpath, type, callback);
|
1032
|
+
});
|
1033
|
+
}
|
1034
|
+
function _createSymlink(srcpath, dstpath, type, callback) {
|
1035
|
+
symlinkPaths(srcpath, dstpath, (err, relative) => {
|
1036
|
+
if (err) return callback(err);
|
1037
|
+
srcpath = relative.toDst;
|
1038
|
+
symlinkType(relative.toCwd, type, (err2, type2) => {
|
1039
|
+
if (err2) return callback(err2);
|
1040
|
+
const dir = path.dirname(dstpath);
|
1041
|
+
pathExists(dir, (err3, dirExists) => {
|
1042
|
+
if (err3) return callback(err3);
|
1043
|
+
if (dirExists) return fs.symlink(srcpath, dstpath, type2, callback);
|
1044
|
+
mkdirs(dir, (err4) => {
|
1045
|
+
if (err4) return callback(err4);
|
1046
|
+
fs.symlink(srcpath, dstpath, type2, callback);
|
1047
|
+
});
|
1048
|
+
});
|
1049
|
+
});
|
1050
|
+
});
|
1051
|
+
}
|
1052
|
+
function createSymlinkSync(srcpath, dstpath, type) {
|
1053
|
+
let stats;
|
1054
|
+
try {
|
1055
|
+
stats = fs.lstatSync(dstpath);
|
1056
|
+
} catch {
|
1057
|
+
}
|
1058
|
+
if (stats && stats.isSymbolicLink()) {
|
1059
|
+
const srcStat = fs.statSync(srcpath);
|
1060
|
+
const dstStat = fs.statSync(dstpath);
|
1061
|
+
if (areIdentical(srcStat, dstStat)) return;
|
1062
|
+
}
|
1063
|
+
const relative = symlinkPathsSync(srcpath, dstpath);
|
1064
|
+
srcpath = relative.toDst;
|
1065
|
+
type = symlinkTypeSync(relative.toCwd, type);
|
1066
|
+
const dir = path.dirname(dstpath);
|
1067
|
+
const exists = fs.existsSync(dir);
|
1068
|
+
if (exists) return fs.symlinkSync(srcpath, dstpath, type);
|
1069
|
+
mkdirsSync(dir);
|
1070
|
+
return fs.symlinkSync(srcpath, dstpath, type);
|
1071
|
+
}
|
1072
|
+
module2.exports = {
|
1073
|
+
createSymlink: u(createSymlink),
|
1074
|
+
createSymlinkSync
|
1075
|
+
};
|
1076
|
+
}
|
1077
|
+
});
|
1078
|
+
var require_ensure = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
1079
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) {
|
1080
|
+
"use strict";
|
1081
|
+
var { createFile, createFileSync } = require_file();
|
1082
|
+
var { createLink, createLinkSync } = require_link();
|
1083
|
+
var { createSymlink, createSymlinkSync } = require_symlink();
|
1084
|
+
module2.exports = {
|
1085
|
+
// file
|
1086
|
+
createFile,
|
1087
|
+
createFileSync,
|
1088
|
+
ensureFile: createFile,
|
1089
|
+
ensureFileSync: createFileSync,
|
1090
|
+
// link
|
1091
|
+
createLink,
|
1092
|
+
createLinkSync,
|
1093
|
+
ensureLink: createLink,
|
1094
|
+
ensureLinkSync: createLinkSync,
|
1095
|
+
// symlink
|
1096
|
+
createSymlink,
|
1097
|
+
createSymlinkSync,
|
1098
|
+
ensureSymlink: createSymlink,
|
1099
|
+
ensureSymlinkSync: createSymlinkSync
|
1100
|
+
};
|
1101
|
+
}
|
1102
|
+
});
|
1103
|
+
var require_utils2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
1104
|
+
"../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module2) {
|
1105
|
+
"use strict";
|
1106
|
+
function stringify(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
|
1107
|
+
const EOF = finalEOL ? EOL : "";
|
1108
|
+
const str = JSON.stringify(obj, replacer, spaces);
|
1109
|
+
return str.replace(/\n/g, EOL) + EOF;
|
1110
|
+
}
|
1111
|
+
function stripBom(content) {
|
1112
|
+
if (Buffer.isBuffer(content)) content = content.toString("utf8");
|
1113
|
+
return content.replace(/^\uFEFF/, "");
|
1114
|
+
}
|
1115
|
+
module2.exports = { stringify, stripBom };
|
1116
|
+
}
|
1117
|
+
});
|
1118
|
+
var require_jsonfile = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
1119
|
+
"../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js"(exports, module2) {
|
1120
|
+
"use strict";
|
1121
|
+
var _fs;
|
1122
|
+
try {
|
1123
|
+
_fs = (0, import_chunk_H4J2FN2W.require_graceful_fs)();
|
1124
|
+
} catch (_) {
|
1125
|
+
_fs = (0, import_chunk_WWAWV7DQ.__require)("fs");
|
1126
|
+
}
|
1127
|
+
var universalify = require_universalify();
|
1128
|
+
var { stringify, stripBom } = require_utils2();
|
1129
|
+
async function _readFile(file, options = {}) {
|
1130
|
+
if (typeof options === "string") {
|
1131
|
+
options = { encoding: options };
|
1132
|
+
}
|
1133
|
+
const fs = options.fs || _fs;
|
1134
|
+
const shouldThrow = "throws" in options ? options.throws : true;
|
1135
|
+
let data = await universalify.fromCallback(fs.readFile)(file, options);
|
1136
|
+
data = stripBom(data);
|
1137
|
+
let obj;
|
1138
|
+
try {
|
1139
|
+
obj = JSON.parse(data, options ? options.reviver : null);
|
1140
|
+
} catch (err) {
|
1141
|
+
if (shouldThrow) {
|
1142
|
+
err.message = `${file}: ${err.message}`;
|
1143
|
+
throw err;
|
1144
|
+
} else {
|
1145
|
+
return null;
|
1146
|
+
}
|
1147
|
+
}
|
1148
|
+
return obj;
|
1149
|
+
}
|
1150
|
+
var readFile = universalify.fromPromise(_readFile);
|
1151
|
+
function readFileSync(file, options = {}) {
|
1152
|
+
if (typeof options === "string") {
|
1153
|
+
options = { encoding: options };
|
1154
|
+
}
|
1155
|
+
const fs = options.fs || _fs;
|
1156
|
+
const shouldThrow = "throws" in options ? options.throws : true;
|
1157
|
+
try {
|
1158
|
+
let content = fs.readFileSync(file, options);
|
1159
|
+
content = stripBom(content);
|
1160
|
+
return JSON.parse(content, options.reviver);
|
1161
|
+
} catch (err) {
|
1162
|
+
if (shouldThrow) {
|
1163
|
+
err.message = `${file}: ${err.message}`;
|
1164
|
+
throw err;
|
1165
|
+
} else {
|
1166
|
+
return null;
|
1167
|
+
}
|
1168
|
+
}
|
1169
|
+
}
|
1170
|
+
async function _writeFile(file, obj, options = {}) {
|
1171
|
+
const fs = options.fs || _fs;
|
1172
|
+
const str = stringify(obj, options);
|
1173
|
+
await universalify.fromCallback(fs.writeFile)(file, str, options);
|
1174
|
+
}
|
1175
|
+
var writeFile = universalify.fromPromise(_writeFile);
|
1176
|
+
function writeFileSync(file, obj, options = {}) {
|
1177
|
+
const fs = options.fs || _fs;
|
1178
|
+
const str = stringify(obj, options);
|
1179
|
+
return fs.writeFileSync(file, str, options);
|
1180
|
+
}
|
1181
|
+
var jsonfile = {
|
1182
|
+
readFile,
|
1183
|
+
readFileSync,
|
1184
|
+
writeFile,
|
1185
|
+
writeFileSync
|
1186
|
+
};
|
1187
|
+
module2.exports = jsonfile;
|
1188
|
+
}
|
1189
|
+
});
|
1190
|
+
var require_jsonfile2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
1191
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module2) {
|
1192
|
+
"use strict";
|
1193
|
+
var jsonFile = require_jsonfile();
|
1194
|
+
module2.exports = {
|
1195
|
+
// jsonfile exports
|
1196
|
+
readJson: jsonFile.readFile,
|
1197
|
+
readJsonSync: jsonFile.readFileSync,
|
1198
|
+
writeJson: jsonFile.writeFile,
|
1199
|
+
writeJsonSync: jsonFile.writeFileSync
|
1200
|
+
};
|
1201
|
+
}
|
1202
|
+
});
|
1203
|
+
var require_output_file = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
1204
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js"(exports, module2) {
|
1205
|
+
"use strict";
|
1206
|
+
var u = require_universalify().fromCallback;
|
1207
|
+
var fs = (0, import_chunk_H4J2FN2W.require_graceful_fs)();
|
1208
|
+
var path = (0, import_chunk_WWAWV7DQ.__require)("path");
|
1209
|
+
var mkdir = require_mkdirs();
|
1210
|
+
var pathExists = require_path_exists().pathExists;
|
1211
|
+
function outputFile(file, data, encoding, callback) {
|
1212
|
+
if (typeof encoding === "function") {
|
1213
|
+
callback = encoding;
|
1214
|
+
encoding = "utf8";
|
1215
|
+
}
|
1216
|
+
const dir = path.dirname(file);
|
1217
|
+
pathExists(dir, (err, itDoes) => {
|
1218
|
+
if (err) return callback(err);
|
1219
|
+
if (itDoes) return fs.writeFile(file, data, encoding, callback);
|
1220
|
+
mkdir.mkdirs(dir, (err2) => {
|
1221
|
+
if (err2) return callback(err2);
|
1222
|
+
fs.writeFile(file, data, encoding, callback);
|
1223
|
+
});
|
1224
|
+
});
|
1225
|
+
}
|
1226
|
+
function outputFileSync(file, ...args) {
|
1227
|
+
const dir = path.dirname(file);
|
1228
|
+
if (fs.existsSync(dir)) {
|
1229
|
+
return fs.writeFileSync(file, ...args);
|
1230
|
+
}
|
1231
|
+
mkdir.mkdirsSync(dir);
|
1232
|
+
fs.writeFileSync(file, ...args);
|
1233
|
+
}
|
1234
|
+
module2.exports = {
|
1235
|
+
outputFile: u(outputFile),
|
1236
|
+
outputFileSync
|
1237
|
+
};
|
1238
|
+
}
|
1239
|
+
});
|
1240
|
+
var require_output_json = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
1241
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) {
|
1242
|
+
"use strict";
|
1243
|
+
var { stringify } = require_utils2();
|
1244
|
+
var { outputFile } = require_output_file();
|
1245
|
+
async function outputJson(file, data, options = {}) {
|
1246
|
+
const str = stringify(data, options);
|
1247
|
+
await outputFile(file, str, options);
|
1248
|
+
}
|
1249
|
+
module2.exports = outputJson;
|
1250
|
+
}
|
1251
|
+
});
|
1252
|
+
var require_output_json_sync = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
1253
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) {
|
1254
|
+
"use strict";
|
1255
|
+
var { stringify } = require_utils2();
|
1256
|
+
var { outputFileSync } = require_output_file();
|
1257
|
+
function outputJsonSync(file, data, options) {
|
1258
|
+
const str = stringify(data, options);
|
1259
|
+
outputFileSync(file, str, options);
|
1260
|
+
}
|
1261
|
+
module2.exports = outputJsonSync;
|
1262
|
+
}
|
1263
|
+
});
|
1264
|
+
var require_json = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
1265
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js"(exports, module2) {
|
1266
|
+
"use strict";
|
1267
|
+
var u = require_universalify().fromPromise;
|
1268
|
+
var jsonFile = require_jsonfile2();
|
1269
|
+
jsonFile.outputJson = u(require_output_json());
|
1270
|
+
jsonFile.outputJsonSync = require_output_json_sync();
|
1271
|
+
jsonFile.outputJSON = jsonFile.outputJson;
|
1272
|
+
jsonFile.outputJSONSync = jsonFile.outputJsonSync;
|
1273
|
+
jsonFile.writeJSON = jsonFile.writeJson;
|
1274
|
+
jsonFile.writeJSONSync = jsonFile.writeJsonSync;
|
1275
|
+
jsonFile.readJSON = jsonFile.readJson;
|
1276
|
+
jsonFile.readJSONSync = jsonFile.readJsonSync;
|
1277
|
+
module2.exports = jsonFile;
|
1278
|
+
}
|
1279
|
+
});
|
1280
|
+
var require_move = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
1281
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js"(exports, module2) {
|
1282
|
+
"use strict";
|
1283
|
+
var fs = (0, import_chunk_H4J2FN2W.require_graceful_fs)();
|
1284
|
+
var path = (0, import_chunk_WWAWV7DQ.__require)("path");
|
1285
|
+
var copy = require_copy2().copy;
|
1286
|
+
var remove = require_remove().remove;
|
1287
|
+
var mkdirp = require_mkdirs().mkdirp;
|
1288
|
+
var pathExists = require_path_exists().pathExists;
|
1289
|
+
var stat = require_stat();
|
1290
|
+
function move(src, dest, opts, cb) {
|
1291
|
+
if (typeof opts === "function") {
|
1292
|
+
cb = opts;
|
1293
|
+
opts = {};
|
1294
|
+
}
|
1295
|
+
opts = opts || {};
|
1296
|
+
const overwrite = opts.overwrite || opts.clobber || false;
|
1297
|
+
stat.checkPaths(src, dest, "move", opts, (err, stats) => {
|
1298
|
+
if (err) return cb(err);
|
1299
|
+
const { srcStat, isChangingCase = false } = stats;
|
1300
|
+
stat.checkParentPaths(src, srcStat, dest, "move", (err2) => {
|
1301
|
+
if (err2) return cb(err2);
|
1302
|
+
if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb);
|
1303
|
+
mkdirp(path.dirname(dest), (err3) => {
|
1304
|
+
if (err3) return cb(err3);
|
1305
|
+
return doRename(src, dest, overwrite, isChangingCase, cb);
|
1306
|
+
});
|
1307
|
+
});
|
1308
|
+
});
|
1309
|
+
}
|
1310
|
+
function isParentRoot(dest) {
|
1311
|
+
const parent = path.dirname(dest);
|
1312
|
+
const parsedPath = path.parse(parent);
|
1313
|
+
return parsedPath.root === parent;
|
1314
|
+
}
|
1315
|
+
function doRename(src, dest, overwrite, isChangingCase, cb) {
|
1316
|
+
if (isChangingCase) return rename(src, dest, overwrite, cb);
|
1317
|
+
if (overwrite) {
|
1318
|
+
return remove(dest, (err) => {
|
1319
|
+
if (err) return cb(err);
|
1320
|
+
return rename(src, dest, overwrite, cb);
|
1321
|
+
});
|
1322
|
+
}
|
1323
|
+
pathExists(dest, (err, destExists) => {
|
1324
|
+
if (err) return cb(err);
|
1325
|
+
if (destExists) return cb(new Error("dest already exists."));
|
1326
|
+
return rename(src, dest, overwrite, cb);
|
1327
|
+
});
|
1328
|
+
}
|
1329
|
+
function rename(src, dest, overwrite, cb) {
|
1330
|
+
fs.rename(src, dest, (err) => {
|
1331
|
+
if (!err) return cb();
|
1332
|
+
if (err.code !== "EXDEV") return cb(err);
|
1333
|
+
return moveAcrossDevice(src, dest, overwrite, cb);
|
1334
|
+
});
|
1335
|
+
}
|
1336
|
+
function moveAcrossDevice(src, dest, overwrite, cb) {
|
1337
|
+
const opts = {
|
1338
|
+
overwrite,
|
1339
|
+
errorOnExist: true,
|
1340
|
+
preserveTimestamps: true
|
1341
|
+
};
|
1342
|
+
copy(src, dest, opts, (err) => {
|
1343
|
+
if (err) return cb(err);
|
1344
|
+
return remove(src, cb);
|
1345
|
+
});
|
1346
|
+
}
|
1347
|
+
module2.exports = move;
|
1348
|
+
}
|
1349
|
+
});
|
1350
|
+
var require_move_sync = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
1351
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js"(exports, module2) {
|
1352
|
+
"use strict";
|
1353
|
+
var fs = (0, import_chunk_H4J2FN2W.require_graceful_fs)();
|
1354
|
+
var path = (0, import_chunk_WWAWV7DQ.__require)("path");
|
1355
|
+
var copySync = require_copy2().copySync;
|
1356
|
+
var removeSync = require_remove().removeSync;
|
1357
|
+
var mkdirpSync = require_mkdirs().mkdirpSync;
|
1358
|
+
var stat = require_stat();
|
1359
|
+
function moveSync(src, dest, opts) {
|
1360
|
+
opts = opts || {};
|
1361
|
+
const overwrite = opts.overwrite || opts.clobber || false;
|
1362
|
+
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
1363
|
+
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
1364
|
+
if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest));
|
1365
|
+
return doRename(src, dest, overwrite, isChangingCase);
|
1366
|
+
}
|
1367
|
+
function isParentRoot(dest) {
|
1368
|
+
const parent = path.dirname(dest);
|
1369
|
+
const parsedPath = path.parse(parent);
|
1370
|
+
return parsedPath.root === parent;
|
1371
|
+
}
|
1372
|
+
function doRename(src, dest, overwrite, isChangingCase) {
|
1373
|
+
if (isChangingCase) return rename(src, dest, overwrite);
|
1374
|
+
if (overwrite) {
|
1375
|
+
removeSync(dest);
|
1376
|
+
return rename(src, dest, overwrite);
|
1377
|
+
}
|
1378
|
+
if (fs.existsSync(dest)) throw new Error("dest already exists.");
|
1379
|
+
return rename(src, dest, overwrite);
|
1380
|
+
}
|
1381
|
+
function rename(src, dest, overwrite) {
|
1382
|
+
try {
|
1383
|
+
fs.renameSync(src, dest);
|
1384
|
+
} catch (err) {
|
1385
|
+
if (err.code !== "EXDEV") throw err;
|
1386
|
+
return moveAcrossDevice(src, dest, overwrite);
|
1387
|
+
}
|
1388
|
+
}
|
1389
|
+
function moveAcrossDevice(src, dest, overwrite) {
|
1390
|
+
const opts = {
|
1391
|
+
overwrite,
|
1392
|
+
errorOnExist: true,
|
1393
|
+
preserveTimestamps: true
|
1394
|
+
};
|
1395
|
+
copySync(src, dest, opts);
|
1396
|
+
return removeSync(src);
|
1397
|
+
}
|
1398
|
+
module2.exports = moveSync;
|
1399
|
+
}
|
1400
|
+
});
|
1401
|
+
var require_move2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
1402
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js"(exports, module2) {
|
1403
|
+
"use strict";
|
1404
|
+
var u = require_universalify().fromCallback;
|
1405
|
+
module2.exports = {
|
1406
|
+
move: u(require_move()),
|
1407
|
+
moveSync: require_move_sync()
|
1408
|
+
};
|
1409
|
+
}
|
1410
|
+
});
|
1411
|
+
var require_lib = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
1412
|
+
"../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js"(exports, module2) {
|
1413
|
+
"use strict";
|
1414
|
+
module2.exports = {
|
1415
|
+
// Export promiseified graceful-fs:
|
1416
|
+
...require_fs(),
|
1417
|
+
// Export extra methods:
|
1418
|
+
...require_copy2(),
|
1419
|
+
...require_empty(),
|
1420
|
+
...require_ensure(),
|
1421
|
+
...require_json(),
|
1422
|
+
...require_mkdirs(),
|
1423
|
+
...require_move2(),
|
1424
|
+
...require_output_file(),
|
1425
|
+
...require_path_exists(),
|
1426
|
+
...require_remove()
|
1427
|
+
};
|
1428
|
+
}
|
1429
|
+
});
|