@weapp-tailwindcss/init 0.0.1-alpha.0 → 0.0.1-alpha.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/index.js +308 -305
- package/dist/index.mjs +179 -165
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
+
}) : x)(function(x) {
|
|
10
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
|
+
});
|
|
8
13
|
var __esm = (fn, res) => function __init() {
|
|
9
14
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
15
|
};
|
|
11
|
-
var __commonJS = (cb, mod) => function
|
|
16
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
12
17
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
18
|
};
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
19
|
var __copyProps = (to, from, except, desc) => {
|
|
19
20
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
21
|
for (let key of __getOwnPropNames(from))
|
|
@@ -31,21 +32,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
32
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
32
33
|
mod
|
|
33
34
|
));
|
|
34
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.3.5_jiti@2.4.2_postcss@8.4.49_tsx@4.19.2_typescript@5.7.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.3.5_jiti@2.4.2_postcss@8.4.49_tsx@4.19.2_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"../../node_modules/.pnpm/tsup@8.3.5_jiti@2.4.2_postcss@8.4.49_tsx@4.19.2_typescript@5.7.
|
|
38
|
+
"../../node_modules/.pnpm/tsup@8.3.5_jiti@2.4.2_postcss@8.4.49_tsx@4.19.2_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
39
|
"use strict";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
// ../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
|
|
44
44
|
var require_universalify = __commonJS({
|
|
45
|
-
"../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(
|
|
45
|
+
"../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports) {
|
|
46
46
|
"use strict";
|
|
47
47
|
init_cjs_shims();
|
|
48
|
-
|
|
48
|
+
exports.fromCallback = function(fn) {
|
|
49
49
|
return Object.defineProperty(function(...args) {
|
|
50
50
|
if (typeof args[args.length - 1] === "function") fn.apply(this, args);
|
|
51
51
|
else {
|
|
@@ -56,7 +56,7 @@ var require_universalify = __commonJS({
|
|
|
56
56
|
}
|
|
57
57
|
}, "name", { value: fn.name });
|
|
58
58
|
};
|
|
59
|
-
|
|
59
|
+
exports.fromPromise = function(fn) {
|
|
60
60
|
return Object.defineProperty(function(...args) {
|
|
61
61
|
const cb = args[args.length - 1];
|
|
62
62
|
if (typeof cb !== "function") return fn.apply(this, args);
|
|
@@ -71,10 +71,10 @@ var require_universalify = __commonJS({
|
|
|
71
71
|
|
|
72
72
|
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
|
|
73
73
|
var require_polyfills = __commonJS({
|
|
74
|
-
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(
|
|
74
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module) {
|
|
75
75
|
"use strict";
|
|
76
76
|
init_cjs_shims();
|
|
77
|
-
var constants =
|
|
77
|
+
var constants = __require("constants");
|
|
78
78
|
var origCwd = process.cwd;
|
|
79
79
|
var cwd2 = null;
|
|
80
80
|
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
@@ -96,7 +96,7 @@ var require_polyfills = __commonJS({
|
|
|
96
96
|
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
|
|
97
97
|
}
|
|
98
98
|
var chdir;
|
|
99
|
-
|
|
99
|
+
module.exports = patch;
|
|
100
100
|
function patch(fs2) {
|
|
101
101
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
102
102
|
patchLchmod(fs2);
|
|
@@ -123,14 +123,14 @@ var require_polyfills = __commonJS({
|
|
|
123
123
|
fs2.fstatSync = statFixSync(fs2.fstatSync);
|
|
124
124
|
fs2.lstatSync = statFixSync(fs2.lstatSync);
|
|
125
125
|
if (fs2.chmod && !fs2.lchmod) {
|
|
126
|
-
fs2.lchmod = function(
|
|
126
|
+
fs2.lchmod = function(path, mode, cb) {
|
|
127
127
|
if (cb) process.nextTick(cb);
|
|
128
128
|
};
|
|
129
129
|
fs2.lchmodSync = function() {
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
132
|
if (fs2.chown && !fs2.lchown) {
|
|
133
|
-
fs2.lchown = function(
|
|
133
|
+
fs2.lchown = function(path, uid, gid, cb) {
|
|
134
134
|
if (cb) process.nextTick(cb);
|
|
135
135
|
};
|
|
136
136
|
fs2.lchownSync = function() {
|
|
@@ -197,9 +197,9 @@ var require_polyfills = __commonJS({
|
|
|
197
197
|
};
|
|
198
198
|
}(fs2.readSync);
|
|
199
199
|
function patchLchmod(fs3) {
|
|
200
|
-
fs3.lchmod = function(
|
|
200
|
+
fs3.lchmod = function(path, mode, callback) {
|
|
201
201
|
fs3.open(
|
|
202
|
-
|
|
202
|
+
path,
|
|
203
203
|
constants.O_WRONLY | constants.O_SYMLINK,
|
|
204
204
|
mode,
|
|
205
205
|
function(err, fd) {
|
|
@@ -215,8 +215,8 @@ var require_polyfills = __commonJS({
|
|
|
215
215
|
}
|
|
216
216
|
);
|
|
217
217
|
};
|
|
218
|
-
fs3.lchmodSync = function(
|
|
219
|
-
var fd = fs3.openSync(
|
|
218
|
+
fs3.lchmodSync = function(path, mode) {
|
|
219
|
+
var fd = fs3.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
220
220
|
var threw = true;
|
|
221
221
|
var ret;
|
|
222
222
|
try {
|
|
@@ -237,8 +237,8 @@ var require_polyfills = __commonJS({
|
|
|
237
237
|
}
|
|
238
238
|
function patchLutimes(fs3) {
|
|
239
239
|
if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) {
|
|
240
|
-
fs3.lutimes = function(
|
|
241
|
-
fs3.open(
|
|
240
|
+
fs3.lutimes = function(path, at, mt, cb) {
|
|
241
|
+
fs3.open(path, constants.O_SYMLINK, function(er, fd) {
|
|
242
242
|
if (er) {
|
|
243
243
|
if (cb) cb(er);
|
|
244
244
|
return;
|
|
@@ -250,8 +250,8 @@ var require_polyfills = __commonJS({
|
|
|
250
250
|
});
|
|
251
251
|
});
|
|
252
252
|
};
|
|
253
|
-
fs3.lutimesSync = function(
|
|
254
|
-
var fd = fs3.openSync(
|
|
253
|
+
fs3.lutimesSync = function(path, at, mt) {
|
|
254
|
+
var fd = fs3.openSync(path, constants.O_SYMLINK);
|
|
255
255
|
var ret;
|
|
256
256
|
var threw = true;
|
|
257
257
|
try {
|
|
@@ -361,21 +361,21 @@ var require_polyfills = __commonJS({
|
|
|
361
361
|
|
|
362
362
|
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js
|
|
363
363
|
var require_legacy_streams = __commonJS({
|
|
364
|
-
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(
|
|
364
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module) {
|
|
365
365
|
"use strict";
|
|
366
366
|
init_cjs_shims();
|
|
367
|
-
var Stream =
|
|
368
|
-
|
|
367
|
+
var Stream = __require("stream").Stream;
|
|
368
|
+
module.exports = legacy;
|
|
369
369
|
function legacy(fs2) {
|
|
370
370
|
return {
|
|
371
371
|
ReadStream,
|
|
372
372
|
WriteStream
|
|
373
373
|
};
|
|
374
|
-
function ReadStream(
|
|
375
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
374
|
+
function ReadStream(path, options) {
|
|
375
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path, options);
|
|
376
376
|
Stream.call(this);
|
|
377
377
|
var self = this;
|
|
378
|
-
this.path =
|
|
378
|
+
this.path = path;
|
|
379
379
|
this.fd = null;
|
|
380
380
|
this.readable = true;
|
|
381
381
|
this.paused = false;
|
|
@@ -420,10 +420,10 @@ var require_legacy_streams = __commonJS({
|
|
|
420
420
|
self._read();
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
|
-
function WriteStream(
|
|
424
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
423
|
+
function WriteStream(path, options) {
|
|
424
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path, options);
|
|
425
425
|
Stream.call(this);
|
|
426
|
-
this.path =
|
|
426
|
+
this.path = path;
|
|
427
427
|
this.fd = null;
|
|
428
428
|
this.writable = true;
|
|
429
429
|
this.flags = "w";
|
|
@@ -459,10 +459,10 @@ var require_legacy_streams = __commonJS({
|
|
|
459
459
|
|
|
460
460
|
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js
|
|
461
461
|
var require_clone = __commonJS({
|
|
462
|
-
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(
|
|
462
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports, module) {
|
|
463
463
|
"use strict";
|
|
464
464
|
init_cjs_shims();
|
|
465
|
-
|
|
465
|
+
module.exports = clone;
|
|
466
466
|
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
|
|
467
467
|
return obj.__proto__;
|
|
468
468
|
};
|
|
@@ -483,14 +483,14 @@ var require_clone = __commonJS({
|
|
|
483
483
|
|
|
484
484
|
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
|
|
485
485
|
var require_graceful_fs = __commonJS({
|
|
486
|
-
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(
|
|
486
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module) {
|
|
487
487
|
"use strict";
|
|
488
488
|
init_cjs_shims();
|
|
489
|
-
var fs2 =
|
|
489
|
+
var fs2 = __require("fs");
|
|
490
490
|
var polyfills = require_polyfills();
|
|
491
491
|
var legacy = require_legacy_streams();
|
|
492
492
|
var clone = require_clone();
|
|
493
|
-
var util =
|
|
493
|
+
var util = __require("util");
|
|
494
494
|
var gracefulQueue;
|
|
495
495
|
var previousSymbol;
|
|
496
496
|
if (typeof Symbol === "function" && typeof Symbol.for === "function") {
|
|
@@ -549,7 +549,7 @@ var require_graceful_fs = __commonJS({
|
|
|
549
549
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
550
550
|
process.on("exit", function() {
|
|
551
551
|
debug(fs2[gracefulQueue]);
|
|
552
|
-
|
|
552
|
+
__require("assert").equal(fs2[gracefulQueue].length, 0);
|
|
553
553
|
});
|
|
554
554
|
}
|
|
555
555
|
}
|
|
@@ -557,9 +557,9 @@ var require_graceful_fs = __commonJS({
|
|
|
557
557
|
if (!global[gracefulQueue]) {
|
|
558
558
|
publishQueue(global, fs2[gracefulQueue]);
|
|
559
559
|
}
|
|
560
|
-
|
|
560
|
+
module.exports = patch(clone(fs2));
|
|
561
561
|
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) {
|
|
562
|
-
|
|
562
|
+
module.exports = patch(fs2);
|
|
563
563
|
fs2.__patched = true;
|
|
564
564
|
}
|
|
565
565
|
function patch(fs3) {
|
|
@@ -569,14 +569,14 @@ var require_graceful_fs = __commonJS({
|
|
|
569
569
|
fs3.createWriteStream = createWriteStream;
|
|
570
570
|
var fs$readFile = fs3.readFile;
|
|
571
571
|
fs3.readFile = readFile;
|
|
572
|
-
function readFile(
|
|
572
|
+
function readFile(path, options, cb) {
|
|
573
573
|
if (typeof options === "function")
|
|
574
574
|
cb = options, options = null;
|
|
575
|
-
return go$readFile(
|
|
576
|
-
function go$readFile(
|
|
577
|
-
return fs$readFile(
|
|
575
|
+
return go$readFile(path, options, cb);
|
|
576
|
+
function go$readFile(path2, options2, cb2, startTime) {
|
|
577
|
+
return fs$readFile(path2, options2, function(err) {
|
|
578
578
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
579
|
-
enqueue([go$readFile, [
|
|
579
|
+
enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
580
580
|
else {
|
|
581
581
|
if (typeof cb2 === "function")
|
|
582
582
|
cb2.apply(this, arguments);
|
|
@@ -586,14 +586,14 @@ var require_graceful_fs = __commonJS({
|
|
|
586
586
|
}
|
|
587
587
|
var fs$writeFile = fs3.writeFile;
|
|
588
588
|
fs3.writeFile = writeFile;
|
|
589
|
-
function writeFile(
|
|
589
|
+
function writeFile(path, data, options, cb) {
|
|
590
590
|
if (typeof options === "function")
|
|
591
591
|
cb = options, options = null;
|
|
592
|
-
return go$writeFile(
|
|
593
|
-
function go$writeFile(
|
|
594
|
-
return fs$writeFile(
|
|
592
|
+
return go$writeFile(path, data, options, cb);
|
|
593
|
+
function go$writeFile(path2, data2, options2, cb2, startTime) {
|
|
594
|
+
return fs$writeFile(path2, data2, options2, function(err) {
|
|
595
595
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
596
|
-
enqueue([go$writeFile, [
|
|
596
|
+
enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
597
597
|
else {
|
|
598
598
|
if (typeof cb2 === "function")
|
|
599
599
|
cb2.apply(this, arguments);
|
|
@@ -604,14 +604,14 @@ var require_graceful_fs = __commonJS({
|
|
|
604
604
|
var fs$appendFile = fs3.appendFile;
|
|
605
605
|
if (fs$appendFile)
|
|
606
606
|
fs3.appendFile = appendFile;
|
|
607
|
-
function appendFile(
|
|
607
|
+
function appendFile(path, data, options, cb) {
|
|
608
608
|
if (typeof options === "function")
|
|
609
609
|
cb = options, options = null;
|
|
610
|
-
return go$appendFile(
|
|
611
|
-
function go$appendFile(
|
|
612
|
-
return fs$appendFile(
|
|
610
|
+
return go$appendFile(path, data, options, cb);
|
|
611
|
+
function go$appendFile(path2, data2, options2, cb2, startTime) {
|
|
612
|
+
return fs$appendFile(path2, data2, options2, function(err) {
|
|
613
613
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
614
|
-
enqueue([go$appendFile, [
|
|
614
|
+
enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
615
615
|
else {
|
|
616
616
|
if (typeof cb2 === "function")
|
|
617
617
|
cb2.apply(this, arguments);
|
|
@@ -642,31 +642,31 @@ var require_graceful_fs = __commonJS({
|
|
|
642
642
|
var fs$readdir = fs3.readdir;
|
|
643
643
|
fs3.readdir = readdir;
|
|
644
644
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
645
|
-
function readdir(
|
|
645
|
+
function readdir(path, options, cb) {
|
|
646
646
|
if (typeof options === "function")
|
|
647
647
|
cb = options, options = null;
|
|
648
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(
|
|
649
|
-
return fs$readdir(
|
|
650
|
-
|
|
648
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path2, options2, cb2, startTime) {
|
|
649
|
+
return fs$readdir(path2, fs$readdirCallback(
|
|
650
|
+
path2,
|
|
651
651
|
options2,
|
|
652
652
|
cb2,
|
|
653
653
|
startTime
|
|
654
654
|
));
|
|
655
|
-
} : function go$readdir2(
|
|
656
|
-
return fs$readdir(
|
|
657
|
-
|
|
655
|
+
} : function go$readdir2(path2, options2, cb2, startTime) {
|
|
656
|
+
return fs$readdir(path2, options2, fs$readdirCallback(
|
|
657
|
+
path2,
|
|
658
658
|
options2,
|
|
659
659
|
cb2,
|
|
660
660
|
startTime
|
|
661
661
|
));
|
|
662
662
|
};
|
|
663
|
-
return go$readdir(
|
|
664
|
-
function fs$readdirCallback(
|
|
663
|
+
return go$readdir(path, options, cb);
|
|
664
|
+
function fs$readdirCallback(path2, options2, cb2, startTime) {
|
|
665
665
|
return function(err, files) {
|
|
666
666
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
667
667
|
enqueue([
|
|
668
668
|
go$readdir,
|
|
669
|
-
[
|
|
669
|
+
[path2, options2, cb2],
|
|
670
670
|
err,
|
|
671
671
|
startTime || Date.now(),
|
|
672
672
|
Date.now()
|
|
@@ -737,7 +737,7 @@ var require_graceful_fs = __commonJS({
|
|
|
737
737
|
enumerable: true,
|
|
738
738
|
configurable: true
|
|
739
739
|
});
|
|
740
|
-
function ReadStream(
|
|
740
|
+
function ReadStream(path, options) {
|
|
741
741
|
if (this instanceof ReadStream)
|
|
742
742
|
return fs$ReadStream.apply(this, arguments), this;
|
|
743
743
|
else
|
|
@@ -757,7 +757,7 @@ var require_graceful_fs = __commonJS({
|
|
|
757
757
|
}
|
|
758
758
|
});
|
|
759
759
|
}
|
|
760
|
-
function WriteStream(
|
|
760
|
+
function WriteStream(path, options) {
|
|
761
761
|
if (this instanceof WriteStream)
|
|
762
762
|
return fs$WriteStream.apply(this, arguments), this;
|
|
763
763
|
else
|
|
@@ -775,22 +775,22 @@ var require_graceful_fs = __commonJS({
|
|
|
775
775
|
}
|
|
776
776
|
});
|
|
777
777
|
}
|
|
778
|
-
function createReadStream(
|
|
779
|
-
return new fs3.ReadStream(
|
|
778
|
+
function createReadStream(path, options) {
|
|
779
|
+
return new fs3.ReadStream(path, options);
|
|
780
780
|
}
|
|
781
|
-
function createWriteStream(
|
|
782
|
-
return new fs3.WriteStream(
|
|
781
|
+
function createWriteStream(path, options) {
|
|
782
|
+
return new fs3.WriteStream(path, options);
|
|
783
783
|
}
|
|
784
784
|
var fs$open = fs3.open;
|
|
785
785
|
fs3.open = open;
|
|
786
|
-
function open(
|
|
786
|
+
function open(path, flags, mode, cb) {
|
|
787
787
|
if (typeof mode === "function")
|
|
788
788
|
cb = mode, mode = null;
|
|
789
|
-
return go$open(
|
|
790
|
-
function go$open(
|
|
791
|
-
return fs$open(
|
|
789
|
+
return go$open(path, flags, mode, cb);
|
|
790
|
+
function go$open(path2, flags2, mode2, cb2, startTime) {
|
|
791
|
+
return fs$open(path2, flags2, mode2, function(err, fd) {
|
|
792
792
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
793
|
-
enqueue([go$open, [
|
|
793
|
+
enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
794
794
|
else {
|
|
795
795
|
if (typeof cb2 === "function")
|
|
796
796
|
cb2.apply(this, arguments);
|
|
@@ -855,7 +855,7 @@ var require_graceful_fs = __commonJS({
|
|
|
855
855
|
|
|
856
856
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js
|
|
857
857
|
var require_fs = __commonJS({
|
|
858
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js"(
|
|
858
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
|
|
859
859
|
"use strict";
|
|
860
860
|
init_cjs_shims();
|
|
861
861
|
var u = require_universalify().fromCallback;
|
|
@@ -898,11 +898,11 @@ var require_fs = __commonJS({
|
|
|
898
898
|
].filter((key) => {
|
|
899
899
|
return typeof fs2[key] === "function";
|
|
900
900
|
});
|
|
901
|
-
Object.assign(
|
|
901
|
+
Object.assign(exports, fs2);
|
|
902
902
|
api.forEach((method) => {
|
|
903
|
-
|
|
903
|
+
exports[method] = u(fs2[method]);
|
|
904
904
|
});
|
|
905
|
-
|
|
905
|
+
exports.exists = function(filename, callback) {
|
|
906
906
|
if (typeof callback === "function") {
|
|
907
907
|
return fs2.exists(filename, callback);
|
|
908
908
|
}
|
|
@@ -910,7 +910,7 @@ var require_fs = __commonJS({
|
|
|
910
910
|
return fs2.exists(filename, resolve2);
|
|
911
911
|
});
|
|
912
912
|
};
|
|
913
|
-
|
|
913
|
+
exports.read = function(fd, buffer, offset, length, position, callback) {
|
|
914
914
|
if (typeof callback === "function") {
|
|
915
915
|
return fs2.read(fd, buffer, offset, length, position, callback);
|
|
916
916
|
}
|
|
@@ -921,7 +921,7 @@ var require_fs = __commonJS({
|
|
|
921
921
|
});
|
|
922
922
|
});
|
|
923
923
|
};
|
|
924
|
-
|
|
924
|
+
exports.write = function(fd, buffer, ...args) {
|
|
925
925
|
if (typeof args[args.length - 1] === "function") {
|
|
926
926
|
return fs2.write(fd, buffer, ...args);
|
|
927
927
|
}
|
|
@@ -932,7 +932,7 @@ var require_fs = __commonJS({
|
|
|
932
932
|
});
|
|
933
933
|
});
|
|
934
934
|
};
|
|
935
|
-
|
|
935
|
+
exports.readv = function(fd, buffers, ...args) {
|
|
936
936
|
if (typeof args[args.length - 1] === "function") {
|
|
937
937
|
return fs2.readv(fd, buffers, ...args);
|
|
938
938
|
}
|
|
@@ -943,7 +943,7 @@ var require_fs = __commonJS({
|
|
|
943
943
|
});
|
|
944
944
|
});
|
|
945
945
|
};
|
|
946
|
-
|
|
946
|
+
exports.writev = function(fd, buffers, ...args) {
|
|
947
947
|
if (typeof args[args.length - 1] === "function") {
|
|
948
948
|
return fs2.writev(fd, buffers, ...args);
|
|
949
949
|
}
|
|
@@ -955,7 +955,7 @@ var require_fs = __commonJS({
|
|
|
955
955
|
});
|
|
956
956
|
};
|
|
957
957
|
if (typeof fs2.realpath.native === "function") {
|
|
958
|
-
|
|
958
|
+
exports.realpath.native = u(fs2.realpath.native);
|
|
959
959
|
} else {
|
|
960
960
|
process.emitWarning(
|
|
961
961
|
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
@@ -968,13 +968,13 @@ var require_fs = __commonJS({
|
|
|
968
968
|
|
|
969
969
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js
|
|
970
970
|
var require_utils = __commonJS({
|
|
971
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js"(
|
|
971
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
|
|
972
972
|
"use strict";
|
|
973
973
|
init_cjs_shims();
|
|
974
|
-
var
|
|
975
|
-
|
|
974
|
+
var path = __require("path");
|
|
975
|
+
module.exports.checkPath = function checkPath(pth) {
|
|
976
976
|
if (process.platform === "win32") {
|
|
977
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(
|
|
977
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ""));
|
|
978
978
|
if (pathHasInvalidWinCharacters) {
|
|
979
979
|
const error = new Error(`Path contains invalid characters: ${pth}`);
|
|
980
980
|
error.code = "EINVAL";
|
|
@@ -987,7 +987,7 @@ var require_utils = __commonJS({
|
|
|
987
987
|
|
|
988
988
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js
|
|
989
989
|
var require_make_dir = __commonJS({
|
|
990
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(
|
|
990
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module) {
|
|
991
991
|
"use strict";
|
|
992
992
|
init_cjs_shims();
|
|
993
993
|
var fs2 = require_fs();
|
|
@@ -997,14 +997,14 @@ var require_make_dir = __commonJS({
|
|
|
997
997
|
if (typeof options === "number") return options;
|
|
998
998
|
return { ...defaults, ...options }.mode;
|
|
999
999
|
};
|
|
1000
|
-
|
|
1000
|
+
module.exports.makeDir = async (dir, options) => {
|
|
1001
1001
|
checkPath(dir);
|
|
1002
1002
|
return fs2.mkdir(dir, {
|
|
1003
1003
|
mode: getMode(options),
|
|
1004
1004
|
recursive: true
|
|
1005
1005
|
});
|
|
1006
1006
|
};
|
|
1007
|
-
|
|
1007
|
+
module.exports.makeDirSync = (dir, options) => {
|
|
1008
1008
|
checkPath(dir);
|
|
1009
1009
|
return fs2.mkdirSync(dir, {
|
|
1010
1010
|
mode: getMode(options),
|
|
@@ -1016,13 +1016,13 @@ var require_make_dir = __commonJS({
|
|
|
1016
1016
|
|
|
1017
1017
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js
|
|
1018
1018
|
var require_mkdirs = __commonJS({
|
|
1019
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js"(
|
|
1019
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module) {
|
|
1020
1020
|
"use strict";
|
|
1021
1021
|
init_cjs_shims();
|
|
1022
1022
|
var u = require_universalify().fromPromise;
|
|
1023
1023
|
var { makeDir: _makeDir, makeDirSync } = require_make_dir();
|
|
1024
1024
|
var makeDir = u(_makeDir);
|
|
1025
|
-
|
|
1025
|
+
module.exports = {
|
|
1026
1026
|
mkdirs: makeDir,
|
|
1027
1027
|
mkdirsSync: makeDirSync,
|
|
1028
1028
|
// alias
|
|
@@ -1036,15 +1036,15 @@ var require_mkdirs = __commonJS({
|
|
|
1036
1036
|
|
|
1037
1037
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js
|
|
1038
1038
|
var require_path_exists = __commonJS({
|
|
1039
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js"(
|
|
1039
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module) {
|
|
1040
1040
|
"use strict";
|
|
1041
1041
|
init_cjs_shims();
|
|
1042
1042
|
var u = require_universalify().fromPromise;
|
|
1043
1043
|
var fs2 = require_fs();
|
|
1044
|
-
function pathExists(
|
|
1045
|
-
return fs2.access(
|
|
1044
|
+
function pathExists(path) {
|
|
1045
|
+
return fs2.access(path).then(() => true).catch(() => false);
|
|
1046
1046
|
}
|
|
1047
|
-
|
|
1047
|
+
module.exports = {
|
|
1048
1048
|
pathExists: u(pathExists),
|
|
1049
1049
|
pathExistsSync: fs2.existsSync
|
|
1050
1050
|
};
|
|
@@ -1053,13 +1053,13 @@ var require_path_exists = __commonJS({
|
|
|
1053
1053
|
|
|
1054
1054
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js
|
|
1055
1055
|
var require_utimes = __commonJS({
|
|
1056
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js"(
|
|
1056
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module) {
|
|
1057
1057
|
"use strict";
|
|
1058
1058
|
init_cjs_shims();
|
|
1059
1059
|
var fs2 = require_fs();
|
|
1060
1060
|
var u = require_universalify().fromPromise;
|
|
1061
|
-
async function utimesMillis(
|
|
1062
|
-
const fd = await fs2.open(
|
|
1061
|
+
async function utimesMillis(path, atime, mtime) {
|
|
1062
|
+
const fd = await fs2.open(path, "r+");
|
|
1063
1063
|
let closeErr = null;
|
|
1064
1064
|
try {
|
|
1065
1065
|
await fs2.futimes(fd, atime, mtime);
|
|
@@ -1074,12 +1074,12 @@ var require_utimes = __commonJS({
|
|
|
1074
1074
|
throw closeErr;
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
|
-
function utimesMillisSync(
|
|
1078
|
-
const fd = fs2.openSync(
|
|
1077
|
+
function utimesMillisSync(path, atime, mtime) {
|
|
1078
|
+
const fd = fs2.openSync(path, "r+");
|
|
1079
1079
|
fs2.futimesSync(fd, atime, mtime);
|
|
1080
1080
|
return fs2.closeSync(fd);
|
|
1081
1081
|
}
|
|
1082
|
-
|
|
1082
|
+
module.exports = {
|
|
1083
1083
|
utimesMillis: u(utimesMillis),
|
|
1084
1084
|
utimesMillisSync
|
|
1085
1085
|
};
|
|
@@ -1088,11 +1088,11 @@ var require_utimes = __commonJS({
|
|
|
1088
1088
|
|
|
1089
1089
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js
|
|
1090
1090
|
var require_stat = __commonJS({
|
|
1091
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js"(
|
|
1091
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js"(exports, module) {
|
|
1092
1092
|
"use strict";
|
|
1093
1093
|
init_cjs_shims();
|
|
1094
1094
|
var fs2 = require_fs();
|
|
1095
|
-
var
|
|
1095
|
+
var path = __require("path");
|
|
1096
1096
|
var u = require_universalify().fromPromise;
|
|
1097
1097
|
function getStats(src, dest, opts) {
|
|
1098
1098
|
const statFunc = opts.dereference ? (file) => fs2.stat(file, { bigint: true }) : (file) => fs2.lstat(file, { bigint: true });
|
|
@@ -1120,8 +1120,8 @@ var require_stat = __commonJS({
|
|
|
1120
1120
|
const { srcStat, destStat } = await getStats(src, dest, opts);
|
|
1121
1121
|
if (destStat) {
|
|
1122
1122
|
if (areIdentical(srcStat, destStat)) {
|
|
1123
|
-
const srcBaseName =
|
|
1124
|
-
const destBaseName =
|
|
1123
|
+
const srcBaseName = path.basename(src);
|
|
1124
|
+
const destBaseName = path.basename(dest);
|
|
1125
1125
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
1126
1126
|
return { srcStat, destStat, isChangingCase: true };
|
|
1127
1127
|
}
|
|
@@ -1143,8 +1143,8 @@ var require_stat = __commonJS({
|
|
|
1143
1143
|
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
1144
1144
|
if (destStat) {
|
|
1145
1145
|
if (areIdentical(srcStat, destStat)) {
|
|
1146
|
-
const srcBaseName =
|
|
1147
|
-
const destBaseName =
|
|
1146
|
+
const srcBaseName = path.basename(src);
|
|
1147
|
+
const destBaseName = path.basename(dest);
|
|
1148
1148
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
1149
1149
|
return { srcStat, destStat, isChangingCase: true };
|
|
1150
1150
|
}
|
|
@@ -1163,9 +1163,9 @@ var require_stat = __commonJS({
|
|
|
1163
1163
|
return { srcStat, destStat };
|
|
1164
1164
|
}
|
|
1165
1165
|
async function checkParentPaths(src, srcStat, dest, funcName) {
|
|
1166
|
-
const srcParent =
|
|
1167
|
-
const destParent =
|
|
1168
|
-
if (destParent === srcParent || destParent ===
|
|
1166
|
+
const srcParent = path.resolve(path.dirname(src));
|
|
1167
|
+
const destParent = path.resolve(path.dirname(dest));
|
|
1168
|
+
if (destParent === srcParent || destParent === path.parse(destParent).root) return;
|
|
1169
1169
|
let destStat;
|
|
1170
1170
|
try {
|
|
1171
1171
|
destStat = await fs2.stat(destParent, { bigint: true });
|
|
@@ -1179,9 +1179,9 @@ var require_stat = __commonJS({
|
|
|
1179
1179
|
return checkParentPaths(src, srcStat, destParent, funcName);
|
|
1180
1180
|
}
|
|
1181
1181
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
1182
|
-
const srcParent =
|
|
1183
|
-
const destParent =
|
|
1184
|
-
if (destParent === srcParent || destParent ===
|
|
1182
|
+
const srcParent = path.resolve(path.dirname(src));
|
|
1183
|
+
const destParent = path.resolve(path.dirname(dest));
|
|
1184
|
+
if (destParent === srcParent || destParent === path.parse(destParent).root) return;
|
|
1185
1185
|
let destStat;
|
|
1186
1186
|
try {
|
|
1187
1187
|
destStat = fs2.statSync(destParent, { bigint: true });
|
|
@@ -1198,14 +1198,14 @@ var require_stat = __commonJS({
|
|
|
1198
1198
|
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
1199
1199
|
}
|
|
1200
1200
|
function isSrcSubdir(src, dest) {
|
|
1201
|
-
const srcArr =
|
|
1202
|
-
const destArr =
|
|
1201
|
+
const srcArr = path.resolve(src).split(path.sep).filter((i) => i);
|
|
1202
|
+
const destArr = path.resolve(dest).split(path.sep).filter((i) => i);
|
|
1203
1203
|
return srcArr.every((cur, i) => destArr[i] === cur);
|
|
1204
1204
|
}
|
|
1205
1205
|
function errMsg(src, dest, funcName) {
|
|
1206
1206
|
return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
|
|
1207
1207
|
}
|
|
1208
|
-
|
|
1208
|
+
module.exports = {
|
|
1209
1209
|
// checkPaths
|
|
1210
1210
|
checkPaths: u(checkPaths),
|
|
1211
1211
|
checkPathsSync,
|
|
@@ -1221,11 +1221,11 @@ var require_stat = __commonJS({
|
|
|
1221
1221
|
|
|
1222
1222
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js
|
|
1223
1223
|
var require_copy = __commonJS({
|
|
1224
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js"(
|
|
1224
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
|
|
1225
1225
|
"use strict";
|
|
1226
1226
|
init_cjs_shims();
|
|
1227
1227
|
var fs2 = require_fs();
|
|
1228
|
-
var
|
|
1228
|
+
var path = __require("path");
|
|
1229
1229
|
var { mkdirs } = require_mkdirs();
|
|
1230
1230
|
var { pathExists } = require_path_exists();
|
|
1231
1231
|
var { utimesMillis } = require_utimes();
|
|
@@ -1247,7 +1247,7 @@ var require_copy = __commonJS({
|
|
|
1247
1247
|
await stat.checkParentPaths(src, srcStat, dest, "copy");
|
|
1248
1248
|
const include = await runFilter(src, dest, opts);
|
|
1249
1249
|
if (!include) return;
|
|
1250
|
-
const destParent =
|
|
1250
|
+
const destParent = path.dirname(dest);
|
|
1251
1251
|
const dirExists = await pathExists(destParent);
|
|
1252
1252
|
if (!dirExists) {
|
|
1253
1253
|
await mkdirs(destParent);
|
|
@@ -1301,8 +1301,8 @@ var require_copy = __commonJS({
|
|
|
1301
1301
|
}
|
|
1302
1302
|
const items = await fs2.readdir(src);
|
|
1303
1303
|
await Promise.all(items.map(async (item) => {
|
|
1304
|
-
const srcItem =
|
|
1305
|
-
const destItem =
|
|
1304
|
+
const srcItem = path.join(src, item);
|
|
1305
|
+
const destItem = path.join(dest, item);
|
|
1306
1306
|
const include = await runFilter(srcItem, destItem, opts);
|
|
1307
1307
|
if (!include) return;
|
|
1308
1308
|
const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
|
|
@@ -1315,7 +1315,7 @@ var require_copy = __commonJS({
|
|
|
1315
1315
|
async function onLink(destStat, src, dest, opts) {
|
|
1316
1316
|
let resolvedSrc = await fs2.readlink(src);
|
|
1317
1317
|
if (opts.dereference) {
|
|
1318
|
-
resolvedSrc =
|
|
1318
|
+
resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
|
|
1319
1319
|
}
|
|
1320
1320
|
if (!destStat) {
|
|
1321
1321
|
return fs2.symlink(resolvedSrc, dest);
|
|
@@ -1328,7 +1328,7 @@ var require_copy = __commonJS({
|
|
|
1328
1328
|
throw e;
|
|
1329
1329
|
}
|
|
1330
1330
|
if (opts.dereference) {
|
|
1331
|
-
resolvedDest =
|
|
1331
|
+
resolvedDest = path.resolve(process.cwd(), resolvedDest);
|
|
1332
1332
|
}
|
|
1333
1333
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
1334
1334
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
@@ -1339,17 +1339,17 @@ var require_copy = __commonJS({
|
|
|
1339
1339
|
await fs2.unlink(dest);
|
|
1340
1340
|
return fs2.symlink(resolvedSrc, dest);
|
|
1341
1341
|
}
|
|
1342
|
-
|
|
1342
|
+
module.exports = copy;
|
|
1343
1343
|
}
|
|
1344
1344
|
});
|
|
1345
1345
|
|
|
1346
1346
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js
|
|
1347
1347
|
var require_copy_sync = __commonJS({
|
|
1348
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js"(
|
|
1348
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
|
|
1349
1349
|
"use strict";
|
|
1350
1350
|
init_cjs_shims();
|
|
1351
1351
|
var fs2 = require_graceful_fs();
|
|
1352
|
-
var
|
|
1352
|
+
var path = __require("path");
|
|
1353
1353
|
var mkdirsSync = require_mkdirs().mkdirsSync;
|
|
1354
1354
|
var utimesMillisSync = require_utimes().utimesMillisSync;
|
|
1355
1355
|
var stat = require_stat();
|
|
@@ -1370,7 +1370,7 @@ var require_copy_sync = __commonJS({
|
|
|
1370
1370
|
const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
1371
1371
|
stat.checkParentPathsSync(src, srcStat, dest, "copy");
|
|
1372
1372
|
if (opts.filter && !opts.filter(src, dest)) return;
|
|
1373
|
-
const destParent =
|
|
1373
|
+
const destParent = path.dirname(dest);
|
|
1374
1374
|
if (!fs2.existsSync(destParent)) mkdirsSync(destParent);
|
|
1375
1375
|
return getStats(destStat, src, dest, opts);
|
|
1376
1376
|
}
|
|
@@ -1431,8 +1431,8 @@ var require_copy_sync = __commonJS({
|
|
|
1431
1431
|
fs2.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
1432
1432
|
}
|
|
1433
1433
|
function copyDirItem(item, src, dest, opts) {
|
|
1434
|
-
const srcItem =
|
|
1435
|
-
const destItem =
|
|
1434
|
+
const srcItem = path.join(src, item);
|
|
1435
|
+
const destItem = path.join(dest, item);
|
|
1436
1436
|
if (opts.filter && !opts.filter(srcItem, destItem)) return;
|
|
1437
1437
|
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
|
|
1438
1438
|
return getStats(destStat, srcItem, destItem, opts);
|
|
@@ -1440,7 +1440,7 @@ var require_copy_sync = __commonJS({
|
|
|
1440
1440
|
function onLink(destStat, src, dest, opts) {
|
|
1441
1441
|
let resolvedSrc = fs2.readlinkSync(src);
|
|
1442
1442
|
if (opts.dereference) {
|
|
1443
|
-
resolvedSrc =
|
|
1443
|
+
resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
|
|
1444
1444
|
}
|
|
1445
1445
|
if (!destStat) {
|
|
1446
1446
|
return fs2.symlinkSync(resolvedSrc, dest);
|
|
@@ -1453,7 +1453,7 @@ var require_copy_sync = __commonJS({
|
|
|
1453
1453
|
throw err;
|
|
1454
1454
|
}
|
|
1455
1455
|
if (opts.dereference) {
|
|
1456
|
-
resolvedDest =
|
|
1456
|
+
resolvedDest = path.resolve(process.cwd(), resolvedDest);
|
|
1457
1457
|
}
|
|
1458
1458
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
1459
1459
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
@@ -1468,17 +1468,17 @@ var require_copy_sync = __commonJS({
|
|
|
1468
1468
|
fs2.unlinkSync(dest);
|
|
1469
1469
|
return fs2.symlinkSync(resolvedSrc, dest);
|
|
1470
1470
|
}
|
|
1471
|
-
|
|
1471
|
+
module.exports = copySync;
|
|
1472
1472
|
}
|
|
1473
1473
|
});
|
|
1474
1474
|
|
|
1475
1475
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js
|
|
1476
1476
|
var require_copy2 = __commonJS({
|
|
1477
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js"(
|
|
1477
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js"(exports, module) {
|
|
1478
1478
|
"use strict";
|
|
1479
1479
|
init_cjs_shims();
|
|
1480
1480
|
var u = require_universalify().fromPromise;
|
|
1481
|
-
|
|
1481
|
+
module.exports = {
|
|
1482
1482
|
copy: u(require_copy()),
|
|
1483
1483
|
copySync: require_copy_sync()
|
|
1484
1484
|
};
|
|
@@ -1487,18 +1487,18 @@ var require_copy2 = __commonJS({
|
|
|
1487
1487
|
|
|
1488
1488
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js
|
|
1489
1489
|
var require_remove = __commonJS({
|
|
1490
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js"(
|
|
1490
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js"(exports, module) {
|
|
1491
1491
|
"use strict";
|
|
1492
1492
|
init_cjs_shims();
|
|
1493
1493
|
var fs2 = require_graceful_fs();
|
|
1494
1494
|
var u = require_universalify().fromCallback;
|
|
1495
|
-
function remove(
|
|
1496
|
-
fs2.rm(
|
|
1495
|
+
function remove(path, callback) {
|
|
1496
|
+
fs2.rm(path, { recursive: true, force: true }, callback);
|
|
1497
1497
|
}
|
|
1498
|
-
function removeSync(
|
|
1499
|
-
fs2.rmSync(
|
|
1498
|
+
function removeSync(path) {
|
|
1499
|
+
fs2.rmSync(path, { recursive: true, force: true });
|
|
1500
1500
|
}
|
|
1501
|
-
|
|
1501
|
+
module.exports = {
|
|
1502
1502
|
remove: u(remove),
|
|
1503
1503
|
removeSync
|
|
1504
1504
|
};
|
|
@@ -1507,36 +1507,36 @@ var require_remove = __commonJS({
|
|
|
1507
1507
|
|
|
1508
1508
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js
|
|
1509
1509
|
var require_empty = __commonJS({
|
|
1510
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js"(
|
|
1510
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js"(exports, module) {
|
|
1511
1511
|
"use strict";
|
|
1512
1512
|
init_cjs_shims();
|
|
1513
1513
|
var u = require_universalify().fromPromise;
|
|
1514
1514
|
var fs2 = require_fs();
|
|
1515
|
-
var
|
|
1515
|
+
var path = __require("path");
|
|
1516
1516
|
var mkdir = require_mkdirs();
|
|
1517
1517
|
var remove = require_remove();
|
|
1518
1518
|
var emptyDir = u(async function emptyDir2(dir) {
|
|
1519
1519
|
let items;
|
|
1520
1520
|
try {
|
|
1521
1521
|
items = await fs2.readdir(dir);
|
|
1522
|
-
} catch {
|
|
1522
|
+
} catch (e2) {
|
|
1523
1523
|
return mkdir.mkdirs(dir);
|
|
1524
1524
|
}
|
|
1525
|
-
return Promise.all(items.map((item) => remove.remove(
|
|
1525
|
+
return Promise.all(items.map((item) => remove.remove(path.join(dir, item))));
|
|
1526
1526
|
});
|
|
1527
1527
|
function emptyDirSync(dir) {
|
|
1528
1528
|
let items;
|
|
1529
1529
|
try {
|
|
1530
1530
|
items = fs2.readdirSync(dir);
|
|
1531
|
-
} catch {
|
|
1531
|
+
} catch (e3) {
|
|
1532
1532
|
return mkdir.mkdirsSync(dir);
|
|
1533
1533
|
}
|
|
1534
1534
|
items.forEach((item) => {
|
|
1535
|
-
item =
|
|
1535
|
+
item = path.join(dir, item);
|
|
1536
1536
|
remove.removeSync(item);
|
|
1537
1537
|
});
|
|
1538
1538
|
}
|
|
1539
|
-
|
|
1539
|
+
module.exports = {
|
|
1540
1540
|
emptyDirSync,
|
|
1541
1541
|
emptydirSync: emptyDirSync,
|
|
1542
1542
|
emptyDir,
|
|
@@ -1547,21 +1547,21 @@ var require_empty = __commonJS({
|
|
|
1547
1547
|
|
|
1548
1548
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js
|
|
1549
1549
|
var require_file = __commonJS({
|
|
1550
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js"(
|
|
1550
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
|
|
1551
1551
|
"use strict";
|
|
1552
1552
|
init_cjs_shims();
|
|
1553
1553
|
var u = require_universalify().fromPromise;
|
|
1554
|
-
var
|
|
1554
|
+
var path = __require("path");
|
|
1555
1555
|
var fs2 = require_fs();
|
|
1556
1556
|
var mkdir = require_mkdirs();
|
|
1557
1557
|
async function createFile(file) {
|
|
1558
1558
|
let stats;
|
|
1559
1559
|
try {
|
|
1560
1560
|
stats = await fs2.stat(file);
|
|
1561
|
-
} catch {
|
|
1561
|
+
} catch (e4) {
|
|
1562
1562
|
}
|
|
1563
1563
|
if (stats && stats.isFile()) return;
|
|
1564
|
-
const dir =
|
|
1564
|
+
const dir = path.dirname(file);
|
|
1565
1565
|
let dirStats = null;
|
|
1566
1566
|
try {
|
|
1567
1567
|
dirStats = await fs2.stat(dir);
|
|
@@ -1584,10 +1584,10 @@ var require_file = __commonJS({
|
|
|
1584
1584
|
let stats;
|
|
1585
1585
|
try {
|
|
1586
1586
|
stats = fs2.statSync(file);
|
|
1587
|
-
} catch {
|
|
1587
|
+
} catch (e5) {
|
|
1588
1588
|
}
|
|
1589
1589
|
if (stats && stats.isFile()) return;
|
|
1590
|
-
const dir =
|
|
1590
|
+
const dir = path.dirname(file);
|
|
1591
1591
|
try {
|
|
1592
1592
|
if (!fs2.statSync(dir).isDirectory()) {
|
|
1593
1593
|
fs2.readdirSync(dir);
|
|
@@ -1598,7 +1598,7 @@ var require_file = __commonJS({
|
|
|
1598
1598
|
}
|
|
1599
1599
|
fs2.writeFileSync(file, "");
|
|
1600
1600
|
}
|
|
1601
|
-
|
|
1601
|
+
module.exports = {
|
|
1602
1602
|
createFile: u(createFile),
|
|
1603
1603
|
createFileSync
|
|
1604
1604
|
};
|
|
@@ -1607,11 +1607,11 @@ var require_file = __commonJS({
|
|
|
1607
1607
|
|
|
1608
1608
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js
|
|
1609
1609
|
var require_link = __commonJS({
|
|
1610
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js"(
|
|
1610
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
|
|
1611
1611
|
"use strict";
|
|
1612
1612
|
init_cjs_shims();
|
|
1613
1613
|
var u = require_universalify().fromPromise;
|
|
1614
|
-
var
|
|
1614
|
+
var path = __require("path");
|
|
1615
1615
|
var fs2 = require_fs();
|
|
1616
1616
|
var mkdir = require_mkdirs();
|
|
1617
1617
|
var { pathExists } = require_path_exists();
|
|
@@ -1620,7 +1620,7 @@ var require_link = __commonJS({
|
|
|
1620
1620
|
let dstStat;
|
|
1621
1621
|
try {
|
|
1622
1622
|
dstStat = await fs2.lstat(dstpath);
|
|
1623
|
-
} catch {
|
|
1623
|
+
} catch (e6) {
|
|
1624
1624
|
}
|
|
1625
1625
|
let srcStat;
|
|
1626
1626
|
try {
|
|
@@ -1630,7 +1630,7 @@ var require_link = __commonJS({
|
|
|
1630
1630
|
throw err;
|
|
1631
1631
|
}
|
|
1632
1632
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
1633
|
-
const dir =
|
|
1633
|
+
const dir = path.dirname(dstpath);
|
|
1634
1634
|
const dirExists = await pathExists(dir);
|
|
1635
1635
|
if (!dirExists) {
|
|
1636
1636
|
await mkdir.mkdirs(dir);
|
|
@@ -1641,7 +1641,7 @@ var require_link = __commonJS({
|
|
|
1641
1641
|
let dstStat;
|
|
1642
1642
|
try {
|
|
1643
1643
|
dstStat = fs2.lstatSync(dstpath);
|
|
1644
|
-
} catch {
|
|
1644
|
+
} catch (e7) {
|
|
1645
1645
|
}
|
|
1646
1646
|
try {
|
|
1647
1647
|
const srcStat = fs2.lstatSync(srcpath);
|
|
@@ -1650,13 +1650,13 @@ var require_link = __commonJS({
|
|
|
1650
1650
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
1651
1651
|
throw err;
|
|
1652
1652
|
}
|
|
1653
|
-
const dir =
|
|
1653
|
+
const dir = path.dirname(dstpath);
|
|
1654
1654
|
const dirExists = fs2.existsSync(dir);
|
|
1655
1655
|
if (dirExists) return fs2.linkSync(srcpath, dstpath);
|
|
1656
1656
|
mkdir.mkdirsSync(dir);
|
|
1657
1657
|
return fs2.linkSync(srcpath, dstpath);
|
|
1658
1658
|
}
|
|
1659
|
-
|
|
1659
|
+
module.exports = {
|
|
1660
1660
|
createLink: u(createLink),
|
|
1661
1661
|
createLinkSync
|
|
1662
1662
|
};
|
|
@@ -1665,15 +1665,15 @@ var require_link = __commonJS({
|
|
|
1665
1665
|
|
|
1666
1666
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js
|
|
1667
1667
|
var require_symlink_paths = __commonJS({
|
|
1668
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(
|
|
1668
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
|
|
1669
1669
|
"use strict";
|
|
1670
1670
|
init_cjs_shims();
|
|
1671
|
-
var
|
|
1671
|
+
var path = __require("path");
|
|
1672
1672
|
var fs2 = require_fs();
|
|
1673
1673
|
var { pathExists } = require_path_exists();
|
|
1674
1674
|
var u = require_universalify().fromPromise;
|
|
1675
1675
|
async function symlinkPaths(srcpath, dstpath) {
|
|
1676
|
-
if (
|
|
1676
|
+
if (path.isAbsolute(srcpath)) {
|
|
1677
1677
|
try {
|
|
1678
1678
|
await fs2.lstat(srcpath);
|
|
1679
1679
|
} catch (err) {
|
|
@@ -1685,8 +1685,8 @@ var require_symlink_paths = __commonJS({
|
|
|
1685
1685
|
toDst: srcpath
|
|
1686
1686
|
};
|
|
1687
1687
|
}
|
|
1688
|
-
const dstdir =
|
|
1689
|
-
const relativeToDst =
|
|
1688
|
+
const dstdir = path.dirname(dstpath);
|
|
1689
|
+
const relativeToDst = path.join(dstdir, srcpath);
|
|
1690
1690
|
const exists = await pathExists(relativeToDst);
|
|
1691
1691
|
if (exists) {
|
|
1692
1692
|
return {
|
|
@@ -1702,11 +1702,11 @@ var require_symlink_paths = __commonJS({
|
|
|
1702
1702
|
}
|
|
1703
1703
|
return {
|
|
1704
1704
|
toCwd: srcpath,
|
|
1705
|
-
toDst:
|
|
1705
|
+
toDst: path.relative(dstdir, srcpath)
|
|
1706
1706
|
};
|
|
1707
1707
|
}
|
|
1708
1708
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
1709
|
-
if (
|
|
1709
|
+
if (path.isAbsolute(srcpath)) {
|
|
1710
1710
|
const exists2 = fs2.existsSync(srcpath);
|
|
1711
1711
|
if (!exists2) throw new Error("absolute srcpath does not exist");
|
|
1712
1712
|
return {
|
|
@@ -1714,8 +1714,8 @@ var require_symlink_paths = __commonJS({
|
|
|
1714
1714
|
toDst: srcpath
|
|
1715
1715
|
};
|
|
1716
1716
|
}
|
|
1717
|
-
const dstdir =
|
|
1718
|
-
const relativeToDst =
|
|
1717
|
+
const dstdir = path.dirname(dstpath);
|
|
1718
|
+
const relativeToDst = path.join(dstdir, srcpath);
|
|
1719
1719
|
const exists = fs2.existsSync(relativeToDst);
|
|
1720
1720
|
if (exists) {
|
|
1721
1721
|
return {
|
|
@@ -1727,10 +1727,10 @@ var require_symlink_paths = __commonJS({
|
|
|
1727
1727
|
if (!srcExists) throw new Error("relative srcpath does not exist");
|
|
1728
1728
|
return {
|
|
1729
1729
|
toCwd: srcpath,
|
|
1730
|
-
toDst:
|
|
1730
|
+
toDst: path.relative(dstdir, srcpath)
|
|
1731
1731
|
};
|
|
1732
1732
|
}
|
|
1733
|
-
|
|
1733
|
+
module.exports = {
|
|
1734
1734
|
symlinkPaths: u(symlinkPaths),
|
|
1735
1735
|
symlinkPathsSync
|
|
1736
1736
|
};
|
|
@@ -1739,7 +1739,7 @@ var require_symlink_paths = __commonJS({
|
|
|
1739
1739
|
|
|
1740
1740
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js
|
|
1741
1741
|
var require_symlink_type = __commonJS({
|
|
1742
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(
|
|
1742
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module) {
|
|
1743
1743
|
"use strict";
|
|
1744
1744
|
init_cjs_shims();
|
|
1745
1745
|
var fs2 = require_fs();
|
|
@@ -1749,7 +1749,7 @@ var require_symlink_type = __commonJS({
|
|
|
1749
1749
|
let stats;
|
|
1750
1750
|
try {
|
|
1751
1751
|
stats = await fs2.lstat(srcpath);
|
|
1752
|
-
} catch {
|
|
1752
|
+
} catch (e8) {
|
|
1753
1753
|
return "file";
|
|
1754
1754
|
}
|
|
1755
1755
|
return stats && stats.isDirectory() ? "dir" : "file";
|
|
@@ -1759,12 +1759,12 @@ var require_symlink_type = __commonJS({
|
|
|
1759
1759
|
let stats;
|
|
1760
1760
|
try {
|
|
1761
1761
|
stats = fs2.lstatSync(srcpath);
|
|
1762
|
-
} catch {
|
|
1762
|
+
} catch (e9) {
|
|
1763
1763
|
return "file";
|
|
1764
1764
|
}
|
|
1765
1765
|
return stats && stats.isDirectory() ? "dir" : "file";
|
|
1766
1766
|
}
|
|
1767
|
-
|
|
1767
|
+
module.exports = {
|
|
1768
1768
|
symlinkType: u(symlinkType),
|
|
1769
1769
|
symlinkTypeSync
|
|
1770
1770
|
};
|
|
@@ -1773,11 +1773,11 @@ var require_symlink_type = __commonJS({
|
|
|
1773
1773
|
|
|
1774
1774
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js
|
|
1775
1775
|
var require_symlink = __commonJS({
|
|
1776
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js"(
|
|
1776
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
|
|
1777
1777
|
"use strict";
|
|
1778
1778
|
init_cjs_shims();
|
|
1779
1779
|
var u = require_universalify().fromPromise;
|
|
1780
|
-
var
|
|
1780
|
+
var path = __require("path");
|
|
1781
1781
|
var fs2 = require_fs();
|
|
1782
1782
|
var { mkdirs, mkdirsSync } = require_mkdirs();
|
|
1783
1783
|
var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
|
|
@@ -1788,7 +1788,7 @@ var require_symlink = __commonJS({
|
|
|
1788
1788
|
let stats;
|
|
1789
1789
|
try {
|
|
1790
1790
|
stats = await fs2.lstat(dstpath);
|
|
1791
|
-
} catch {
|
|
1791
|
+
} catch (e10) {
|
|
1792
1792
|
}
|
|
1793
1793
|
if (stats && stats.isSymbolicLink()) {
|
|
1794
1794
|
const [srcStat, dstStat] = await Promise.all([
|
|
@@ -1800,7 +1800,7 @@ var require_symlink = __commonJS({
|
|
|
1800
1800
|
const relative2 = await symlinkPaths(srcpath, dstpath);
|
|
1801
1801
|
srcpath = relative2.toDst;
|
|
1802
1802
|
const toType = await symlinkType(relative2.toCwd, type);
|
|
1803
|
-
const dir =
|
|
1803
|
+
const dir = path.dirname(dstpath);
|
|
1804
1804
|
if (!await pathExists(dir)) {
|
|
1805
1805
|
await mkdirs(dir);
|
|
1806
1806
|
}
|
|
@@ -1810,7 +1810,7 @@ var require_symlink = __commonJS({
|
|
|
1810
1810
|
let stats;
|
|
1811
1811
|
try {
|
|
1812
1812
|
stats = fs2.lstatSync(dstpath);
|
|
1813
|
-
} catch {
|
|
1813
|
+
} catch (e11) {
|
|
1814
1814
|
}
|
|
1815
1815
|
if (stats && stats.isSymbolicLink()) {
|
|
1816
1816
|
const srcStat = fs2.statSync(srcpath);
|
|
@@ -1820,13 +1820,13 @@ var require_symlink = __commonJS({
|
|
|
1820
1820
|
const relative2 = symlinkPathsSync(srcpath, dstpath);
|
|
1821
1821
|
srcpath = relative2.toDst;
|
|
1822
1822
|
type = symlinkTypeSync(relative2.toCwd, type);
|
|
1823
|
-
const dir =
|
|
1823
|
+
const dir = path.dirname(dstpath);
|
|
1824
1824
|
const exists = fs2.existsSync(dir);
|
|
1825
1825
|
if (exists) return fs2.symlinkSync(srcpath, dstpath, type);
|
|
1826
1826
|
mkdirsSync(dir);
|
|
1827
1827
|
return fs2.symlinkSync(srcpath, dstpath, type);
|
|
1828
1828
|
}
|
|
1829
|
-
|
|
1829
|
+
module.exports = {
|
|
1830
1830
|
createSymlink: u(createSymlink),
|
|
1831
1831
|
createSymlinkSync
|
|
1832
1832
|
};
|
|
@@ -1835,13 +1835,13 @@ var require_symlink = __commonJS({
|
|
|
1835
1835
|
|
|
1836
1836
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js
|
|
1837
1837
|
var require_ensure = __commonJS({
|
|
1838
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js"(
|
|
1838
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js"(exports, module) {
|
|
1839
1839
|
"use strict";
|
|
1840
1840
|
init_cjs_shims();
|
|
1841
1841
|
var { createFile, createFileSync } = require_file();
|
|
1842
1842
|
var { createLink, createLinkSync } = require_link();
|
|
1843
1843
|
var { createSymlink, createSymlinkSync } = require_symlink();
|
|
1844
|
-
|
|
1844
|
+
module.exports = {
|
|
1845
1845
|
// file
|
|
1846
1846
|
createFile,
|
|
1847
1847
|
createFileSync,
|
|
@@ -1863,7 +1863,7 @@ var require_ensure = __commonJS({
|
|
|
1863
1863
|
|
|
1864
1864
|
// ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js
|
|
1865
1865
|
var require_utils2 = __commonJS({
|
|
1866
|
-
"../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(
|
|
1866
|
+
"../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module) {
|
|
1867
1867
|
"use strict";
|
|
1868
1868
|
init_cjs_shims();
|
|
1869
1869
|
function stringify(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
|
|
@@ -1875,20 +1875,20 @@ var require_utils2 = __commonJS({
|
|
|
1875
1875
|
if (Buffer.isBuffer(content)) content = content.toString("utf8");
|
|
1876
1876
|
return content.replace(/^\uFEFF/, "");
|
|
1877
1877
|
}
|
|
1878
|
-
|
|
1878
|
+
module.exports = { stringify, stripBom };
|
|
1879
1879
|
}
|
|
1880
1880
|
});
|
|
1881
1881
|
|
|
1882
1882
|
// ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js
|
|
1883
1883
|
var require_jsonfile = __commonJS({
|
|
1884
|
-
"../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js"(
|
|
1884
|
+
"../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js"(exports, module) {
|
|
1885
1885
|
"use strict";
|
|
1886
1886
|
init_cjs_shims();
|
|
1887
1887
|
var _fs;
|
|
1888
1888
|
try {
|
|
1889
1889
|
_fs = require_graceful_fs();
|
|
1890
1890
|
} catch (_) {
|
|
1891
|
-
_fs =
|
|
1891
|
+
_fs = __require("fs");
|
|
1892
1892
|
}
|
|
1893
1893
|
var universalify = require_universalify();
|
|
1894
1894
|
var { stringify, stripBom } = require_utils2();
|
|
@@ -1950,17 +1950,17 @@ var require_jsonfile = __commonJS({
|
|
|
1950
1950
|
writeFile,
|
|
1951
1951
|
writeFileSync
|
|
1952
1952
|
};
|
|
1953
|
-
|
|
1953
|
+
module.exports = jsonfile;
|
|
1954
1954
|
}
|
|
1955
1955
|
});
|
|
1956
1956
|
|
|
1957
1957
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js
|
|
1958
1958
|
var require_jsonfile2 = __commonJS({
|
|
1959
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js"(
|
|
1959
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module) {
|
|
1960
1960
|
"use strict";
|
|
1961
1961
|
init_cjs_shims();
|
|
1962
1962
|
var jsonFile = require_jsonfile();
|
|
1963
|
-
|
|
1963
|
+
module.exports = {
|
|
1964
1964
|
// jsonfile exports
|
|
1965
1965
|
readJson: jsonFile.readFile,
|
|
1966
1966
|
readJsonSync: jsonFile.readFileSync,
|
|
@@ -1972,29 +1972,29 @@ var require_jsonfile2 = __commonJS({
|
|
|
1972
1972
|
|
|
1973
1973
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js
|
|
1974
1974
|
var require_output_file = __commonJS({
|
|
1975
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js"(
|
|
1975
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module) {
|
|
1976
1976
|
"use strict";
|
|
1977
1977
|
init_cjs_shims();
|
|
1978
1978
|
var u = require_universalify().fromPromise;
|
|
1979
1979
|
var fs2 = require_fs();
|
|
1980
|
-
var
|
|
1980
|
+
var path = __require("path");
|
|
1981
1981
|
var mkdir = require_mkdirs();
|
|
1982
1982
|
var pathExists = require_path_exists().pathExists;
|
|
1983
1983
|
async function outputFile(file, data, encoding = "utf-8") {
|
|
1984
|
-
const dir =
|
|
1984
|
+
const dir = path.dirname(file);
|
|
1985
1985
|
if (!await pathExists(dir)) {
|
|
1986
1986
|
await mkdir.mkdirs(dir);
|
|
1987
1987
|
}
|
|
1988
1988
|
return fs2.writeFile(file, data, encoding);
|
|
1989
1989
|
}
|
|
1990
1990
|
function outputFileSync(file, ...args) {
|
|
1991
|
-
const dir =
|
|
1991
|
+
const dir = path.dirname(file);
|
|
1992
1992
|
if (!fs2.existsSync(dir)) {
|
|
1993
1993
|
mkdir.mkdirsSync(dir);
|
|
1994
1994
|
}
|
|
1995
1995
|
fs2.writeFileSync(file, ...args);
|
|
1996
1996
|
}
|
|
1997
|
-
|
|
1997
|
+
module.exports = {
|
|
1998
1998
|
outputFile: u(outputFile),
|
|
1999
1999
|
outputFileSync
|
|
2000
2000
|
};
|
|
@@ -2003,7 +2003,7 @@ var require_output_file = __commonJS({
|
|
|
2003
2003
|
|
|
2004
2004
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js
|
|
2005
2005
|
var require_output_json = __commonJS({
|
|
2006
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js"(
|
|
2006
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js"(exports, module) {
|
|
2007
2007
|
"use strict";
|
|
2008
2008
|
init_cjs_shims();
|
|
2009
2009
|
var { stringify } = require_utils2();
|
|
@@ -2012,13 +2012,13 @@ var require_output_json = __commonJS({
|
|
|
2012
2012
|
const str = stringify(data, options);
|
|
2013
2013
|
await outputFile(file, str, options);
|
|
2014
2014
|
}
|
|
2015
|
-
|
|
2015
|
+
module.exports = outputJson;
|
|
2016
2016
|
}
|
|
2017
2017
|
});
|
|
2018
2018
|
|
|
2019
2019
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js
|
|
2020
2020
|
var require_output_json_sync = __commonJS({
|
|
2021
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js"(
|
|
2021
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module) {
|
|
2022
2022
|
"use strict";
|
|
2023
2023
|
init_cjs_shims();
|
|
2024
2024
|
var { stringify } = require_utils2();
|
|
@@ -2027,13 +2027,13 @@ var require_output_json_sync = __commonJS({
|
|
|
2027
2027
|
const str = stringify(data, options);
|
|
2028
2028
|
outputFileSync(file, str, options);
|
|
2029
2029
|
}
|
|
2030
|
-
|
|
2030
|
+
module.exports = outputJsonSync;
|
|
2031
2031
|
}
|
|
2032
2032
|
});
|
|
2033
2033
|
|
|
2034
2034
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js
|
|
2035
2035
|
var require_json = __commonJS({
|
|
2036
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js"(
|
|
2036
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js"(exports, module) {
|
|
2037
2037
|
"use strict";
|
|
2038
2038
|
init_cjs_shims();
|
|
2039
2039
|
var u = require_universalify().fromPromise;
|
|
@@ -2046,17 +2046,17 @@ var require_json = __commonJS({
|
|
|
2046
2046
|
jsonFile.writeJSONSync = jsonFile.writeJsonSync;
|
|
2047
2047
|
jsonFile.readJSON = jsonFile.readJson;
|
|
2048
2048
|
jsonFile.readJSONSync = jsonFile.readJsonSync;
|
|
2049
|
-
|
|
2049
|
+
module.exports = jsonFile;
|
|
2050
2050
|
}
|
|
2051
2051
|
});
|
|
2052
2052
|
|
|
2053
2053
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js
|
|
2054
2054
|
var require_move = __commonJS({
|
|
2055
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js"(
|
|
2055
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js"(exports, module) {
|
|
2056
2056
|
"use strict";
|
|
2057
2057
|
init_cjs_shims();
|
|
2058
2058
|
var fs2 = require_fs();
|
|
2059
|
-
var
|
|
2059
|
+
var path = __require("path");
|
|
2060
2060
|
var { copy } = require_copy2();
|
|
2061
2061
|
var { remove } = require_remove();
|
|
2062
2062
|
var { mkdirp } = require_mkdirs();
|
|
@@ -2066,8 +2066,8 @@ var require_move = __commonJS({
|
|
|
2066
2066
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
2067
2067
|
const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
|
|
2068
2068
|
await stat.checkParentPaths(src, srcStat, dest, "move");
|
|
2069
|
-
const destParent =
|
|
2070
|
-
const parsedParentPath =
|
|
2069
|
+
const destParent = path.dirname(dest);
|
|
2070
|
+
const parsedParentPath = path.parse(destParent);
|
|
2071
2071
|
if (parsedParentPath.root !== destParent) {
|
|
2072
2072
|
await mkdirp(destParent);
|
|
2073
2073
|
}
|
|
@@ -2099,17 +2099,17 @@ var require_move = __commonJS({
|
|
|
2099
2099
|
await copy(src, dest, opts);
|
|
2100
2100
|
return remove(src);
|
|
2101
2101
|
}
|
|
2102
|
-
|
|
2102
|
+
module.exports = move;
|
|
2103
2103
|
}
|
|
2104
2104
|
});
|
|
2105
2105
|
|
|
2106
2106
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js
|
|
2107
2107
|
var require_move_sync = __commonJS({
|
|
2108
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js"(
|
|
2108
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
|
|
2109
2109
|
"use strict";
|
|
2110
2110
|
init_cjs_shims();
|
|
2111
2111
|
var fs2 = require_graceful_fs();
|
|
2112
|
-
var
|
|
2112
|
+
var path = __require("path");
|
|
2113
2113
|
var copySync = require_copy2().copySync;
|
|
2114
2114
|
var removeSync = require_remove().removeSync;
|
|
2115
2115
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
@@ -2119,12 +2119,12 @@ var require_move_sync = __commonJS({
|
|
|
2119
2119
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
2120
2120
|
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
|
2121
2121
|
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
2122
|
-
if (!isParentRoot(dest)) mkdirpSync(
|
|
2122
|
+
if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest));
|
|
2123
2123
|
return doRename(src, dest, overwrite, isChangingCase);
|
|
2124
2124
|
}
|
|
2125
2125
|
function isParentRoot(dest) {
|
|
2126
|
-
const parent =
|
|
2127
|
-
const parsedPath =
|
|
2126
|
+
const parent = path.dirname(dest);
|
|
2127
|
+
const parsedPath = path.parse(parent);
|
|
2128
2128
|
return parsedPath.root === parent;
|
|
2129
2129
|
}
|
|
2130
2130
|
function doRename(src, dest, overwrite, isChangingCase) {
|
|
@@ -2153,17 +2153,17 @@ var require_move_sync = __commonJS({
|
|
|
2153
2153
|
copySync(src, dest, opts);
|
|
2154
2154
|
return removeSync(src);
|
|
2155
2155
|
}
|
|
2156
|
-
|
|
2156
|
+
module.exports = moveSync;
|
|
2157
2157
|
}
|
|
2158
2158
|
});
|
|
2159
2159
|
|
|
2160
2160
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js
|
|
2161
2161
|
var require_move2 = __commonJS({
|
|
2162
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js"(
|
|
2162
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js"(exports, module) {
|
|
2163
2163
|
"use strict";
|
|
2164
2164
|
init_cjs_shims();
|
|
2165
2165
|
var u = require_universalify().fromPromise;
|
|
2166
|
-
|
|
2166
|
+
module.exports = {
|
|
2167
2167
|
move: u(require_move()),
|
|
2168
2168
|
moveSync: require_move_sync()
|
|
2169
2169
|
};
|
|
@@ -2172,10 +2172,10 @@ var require_move2 = __commonJS({
|
|
|
2172
2172
|
|
|
2173
2173
|
// ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js
|
|
2174
2174
|
var require_lib = __commonJS({
|
|
2175
|
-
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js"(
|
|
2175
|
+
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js"(exports, module) {
|
|
2176
2176
|
"use strict";
|
|
2177
2177
|
init_cjs_shims();
|
|
2178
|
-
|
|
2178
|
+
module.exports = {
|
|
2179
2179
|
// Export promiseified graceful-fs:
|
|
2180
2180
|
...require_fs(),
|
|
2181
2181
|
// Export extra methods:
|
|
@@ -2193,26 +2193,16 @@ var require_lib = __commonJS({
|
|
|
2193
2193
|
});
|
|
2194
2194
|
|
|
2195
2195
|
// src/index.ts
|
|
2196
|
-
var src_exports = {};
|
|
2197
|
-
__export(src_exports, {
|
|
2198
|
-
createContext: () => createContext,
|
|
2199
|
-
getInitDefaults: () => getInitDefaults,
|
|
2200
|
-
init: () => init,
|
|
2201
|
-
touchPostcssConfig: () => touchPostcssConfig,
|
|
2202
|
-
touchTailwindConfig: () => touchTailwindConfig,
|
|
2203
|
-
updatePackageJson: () => updatePackageJson
|
|
2204
|
-
});
|
|
2205
|
-
module.exports = __toCommonJS(src_exports);
|
|
2206
2196
|
init_cjs_shims();
|
|
2207
|
-
var import_node_process = __toESM(require("process"));
|
|
2208
|
-
var import_logger = require("@weapp-tailwindcss/logger");
|
|
2209
|
-
var import_shared2 = require("@weapp-tailwindcss/shared");
|
|
2210
2197
|
var import_fs_extra = __toESM(require_lib());
|
|
2198
|
+
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
2199
|
+
var _logger = require('@weapp-tailwindcss/logger');
|
|
2200
|
+
var _shared = require('@weapp-tailwindcss/shared');
|
|
2211
2201
|
|
|
2212
|
-
// ../../node_modules/.pnpm/pathe@2.0.
|
|
2202
|
+
// ../../node_modules/.pnpm/pathe@2.0.1/node_modules/pathe/dist/index.mjs
|
|
2213
2203
|
init_cjs_shims();
|
|
2214
2204
|
|
|
2215
|
-
// ../../node_modules/.pnpm/pathe@2.0.
|
|
2205
|
+
// ../../node_modules/.pnpm/pathe@2.0.1/node_modules/pathe/dist/shared/pathe.BLwDEnA5.mjs
|
|
2216
2206
|
init_cjs_shims();
|
|
2217
2207
|
var _lazyMatch = () => {
|
|
2218
2208
|
var __lib__ = (() => {
|
|
@@ -2317,7 +2307,7 @@ var _lazyMatch = () => {
|
|
|
2317
2307
|
const u = a.index, s = (o = a.cache)[t] || (o[t] = /* @__PURE__ */ new Map()), c = s.get(u);
|
|
2318
2308
|
if (c === false) return false;
|
|
2319
2309
|
if (W(c)) return a.index = c, true;
|
|
2320
|
-
if (c) return a.index = c.index, c.output
|
|
2310
|
+
if (c) return a.index = c.index, _optionalChain([c, 'access', _2 => _2.output, 'optionalAccess', _3 => _3.length]) && a.output.push(...c.output), true;
|
|
2321
2311
|
{
|
|
2322
2312
|
const Z = a.output.length;
|
|
2323
2313
|
if (n(a)) {
|
|
@@ -2358,7 +2348,7 @@ var _lazyMatch = () => {
|
|
|
2358
2348
|
return n;
|
|
2359
2349
|
}, or = (r, e, n) => S(r, e).map((t) => String(t).padStart(n, "0")), O = (r, e) => S(z(r), z(e)).map(ir), p = (r) => r, R = (r) => ur((e) => rr(e, r, { memoization: false }).join("")), ur = (r) => {
|
|
2360
2350
|
const e = {};
|
|
2361
|
-
return (n) => e[n]
|
|
2351
|
+
return (n) => _nullishCoalesce(e[n], () => ( (e[n] = r(n))));
|
|
2362
2352
|
}, sr = i(/^\*\*\/\*$/, ".*"), cr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/, (r, e, n) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}`), lr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/, (r, e, n, t) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}(?:${t.replaceAll(",", "|").replaceAll(".", "\\.")})`), y = i(/\\./, p), pr = i(/[$.*+?^(){}[\]\|]/, (r) => `\\${r}`), vr = i(/./, p), hr = i(/^(?:!!)*!(.*)$/, (r, e) => `(?!^${L(e)}$).*?`), dr = i(/^(!!)+/, ""), fr = l([hr, dr]), xr = i(/\/(\*\*\/)+/, "(?:/.+/|/)"), gr = i(/^(\*\*\/)+/, "(?:^|.*/)"), mr = i(/\/(\*\*)$/, "(?:/.*|$)"), _r = i(/\*\*/, ".*"), j = l([xr, gr, mr, _r]), Sr = i(/\*\/(?!\*\*\/)/, "[^/]*/"), yr = i(/\*/, "[^/]*"), N = l([Sr, yr]), k = i("?", "[^/]"), $r = i("[", p), wr = i("]", p), Ar = i(/[!^]/, "^/"), br = i(/[a-z]-[a-z]|[0-9]-[0-9]/i, p), Cr = i(/[$.*+?^(){}[\|]/, (r) => `\\${r}`), Mr = i(/[^\]]/, p), Er = l([y, Cr, br, Mr]), B = x([$r, ar(Ar), f(Er), wr]), Pr = i("{", "(?:"), zr = i("}", ")"), Or = i(/(\d+)\.\.(\d+)/, (r, e, n) => or(+e, +n, Math.min(e.length, n.length)).join("|")), Rr = i(/([a-z]+)\.\.([a-z]+)/, (r, e, n) => O(e, n).join("|")), jr = i(/([A-Z]+)\.\.([A-Z]+)/, (r, e, n) => O(e.toLowerCase(), n.toLowerCase()).join("|").toUpperCase()), Nr = l([Or, Rr, jr]), I = x([Pr, Nr, zr]), kr = i("{", "(?:"), Br = i("}", ")"), Ir = i(",", "|"), Fr = i(/[$.*+?^(){[\]\|]/, (r) => `\\${r}`), Lr = i(/[^}]/, p), Zr = E(() => F), Dr = l([j, N, k, B, I, Zr, y, Fr, Ir, Lr]), F = x([kr, f(Dr), Br]), Ur = f(l([sr, cr, lr, fr, j, N, k, B, I, F, y, pr, vr])), Vr = Ur, Gr = R(Vr), L = Gr, Tr = i(/\\./, p), qr = i(/./, p), Hr = i(/\*\*\*+/, "*"), Jr = i(/([^/{[(!])\*\*/, (r, e) => `${e}*`), Qr = i(/(^|.)\*\*(?=[^*/)\]}])/, (r, e) => `${e}*`), Wr = f(l([Tr, Hr, Jr, Qr, qr])), Kr = Wr, Xr = R(Kr), Yr = Xr, $ = (r, e) => {
|
|
2363
2353
|
const n = Array.isArray(r) ? r : [r];
|
|
2364
2354
|
if (!n.length) return false;
|
|
@@ -2372,12 +2362,12 @@ var _lazyMatch = () => {
|
|
|
2372
2362
|
return __lib__.default || __lib__;
|
|
2373
2363
|
};
|
|
2374
2364
|
var _match;
|
|
2375
|
-
var zeptomatch = (
|
|
2365
|
+
var zeptomatch = (path, pattern) => {
|
|
2376
2366
|
if (!_match) {
|
|
2377
2367
|
_match = _lazyMatch();
|
|
2378
2368
|
_lazyMatch = null;
|
|
2379
2369
|
}
|
|
2380
|
-
return _match(
|
|
2370
|
+
return _match(path, pattern);
|
|
2381
2371
|
};
|
|
2382
2372
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
2383
2373
|
function normalizeWindowsPath(input = "") {
|
|
@@ -2393,56 +2383,55 @@ var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
|
2393
2383
|
var _EXTNAME_RE = /.(\.[^./]+)$/;
|
|
2394
2384
|
var _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
|
|
2395
2385
|
var sep = "/";
|
|
2396
|
-
var
|
|
2397
|
-
|
|
2398
|
-
if (path2.length === 0) {
|
|
2386
|
+
var normalize = function(path) {
|
|
2387
|
+
if (path.length === 0) {
|
|
2399
2388
|
return ".";
|
|
2400
2389
|
}
|
|
2401
|
-
|
|
2402
|
-
const isUNCPath =
|
|
2403
|
-
const isPathAbsolute = isAbsolute(
|
|
2404
|
-
const trailingSeparator =
|
|
2405
|
-
|
|
2406
|
-
if (
|
|
2390
|
+
path = normalizeWindowsPath(path);
|
|
2391
|
+
const isUNCPath = path.match(_UNC_REGEX);
|
|
2392
|
+
const isPathAbsolute = isAbsolute(path);
|
|
2393
|
+
const trailingSeparator = path[path.length - 1] === "/";
|
|
2394
|
+
path = normalizeString(path, !isPathAbsolute);
|
|
2395
|
+
if (path.length === 0) {
|
|
2407
2396
|
if (isPathAbsolute) {
|
|
2408
2397
|
return "/";
|
|
2409
2398
|
}
|
|
2410
2399
|
return trailingSeparator ? "./" : ".";
|
|
2411
2400
|
}
|
|
2412
2401
|
if (trailingSeparator) {
|
|
2413
|
-
|
|
2402
|
+
path += "/";
|
|
2414
2403
|
}
|
|
2415
|
-
if (_DRIVE_LETTER_RE.test(
|
|
2416
|
-
|
|
2404
|
+
if (_DRIVE_LETTER_RE.test(path)) {
|
|
2405
|
+
path += "/";
|
|
2417
2406
|
}
|
|
2418
2407
|
if (isUNCPath) {
|
|
2419
2408
|
if (!isPathAbsolute) {
|
|
2420
|
-
return `//./${
|
|
2409
|
+
return `//./${path}`;
|
|
2421
2410
|
}
|
|
2422
|
-
return `//${
|
|
2411
|
+
return `//${path}`;
|
|
2423
2412
|
}
|
|
2424
|
-
return isPathAbsolute && !isAbsolute(
|
|
2413
|
+
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
2425
2414
|
};
|
|
2426
2415
|
var join = function(...segments) {
|
|
2427
|
-
let
|
|
2416
|
+
let path = "";
|
|
2428
2417
|
for (const seg of segments) {
|
|
2429
2418
|
if (!seg) {
|
|
2430
2419
|
continue;
|
|
2431
2420
|
}
|
|
2432
|
-
if (
|
|
2433
|
-
const pathTrailing =
|
|
2421
|
+
if (path.length > 0) {
|
|
2422
|
+
const pathTrailing = path[path.length - 1] === "/";
|
|
2434
2423
|
const segLeading = seg[0] === "/";
|
|
2435
2424
|
const both = pathTrailing && segLeading;
|
|
2436
2425
|
if (both) {
|
|
2437
|
-
|
|
2426
|
+
path += seg.slice(1);
|
|
2438
2427
|
} else {
|
|
2439
|
-
|
|
2428
|
+
path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
2440
2429
|
}
|
|
2441
2430
|
} else {
|
|
2442
|
-
|
|
2431
|
+
path += seg;
|
|
2443
2432
|
}
|
|
2444
2433
|
}
|
|
2445
|
-
return normalize(
|
|
2434
|
+
return normalize(path);
|
|
2446
2435
|
};
|
|
2447
2436
|
function cwd() {
|
|
2448
2437
|
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
@@ -2455,12 +2444,12 @@ var resolve = function(...arguments_) {
|
|
|
2455
2444
|
let resolvedPath = "";
|
|
2456
2445
|
let resolvedAbsolute = false;
|
|
2457
2446
|
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
2458
|
-
const
|
|
2459
|
-
if (!
|
|
2447
|
+
const path = index >= 0 ? arguments_[index] : cwd();
|
|
2448
|
+
if (!path || path.length === 0) {
|
|
2460
2449
|
continue;
|
|
2461
2450
|
}
|
|
2462
|
-
resolvedPath = `${
|
|
2463
|
-
resolvedAbsolute = isAbsolute(
|
|
2451
|
+
resolvedPath = `${path}/${resolvedPath}`;
|
|
2452
|
+
resolvedAbsolute = isAbsolute(path);
|
|
2464
2453
|
}
|
|
2465
2454
|
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
2466
2455
|
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
|
|
@@ -2468,15 +2457,15 @@ var resolve = function(...arguments_) {
|
|
|
2468
2457
|
}
|
|
2469
2458
|
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
2470
2459
|
};
|
|
2471
|
-
function normalizeString(
|
|
2460
|
+
function normalizeString(path, allowAboveRoot) {
|
|
2472
2461
|
let res = "";
|
|
2473
2462
|
let lastSegmentLength = 0;
|
|
2474
2463
|
let lastSlash = -1;
|
|
2475
2464
|
let dots = 0;
|
|
2476
2465
|
let char = null;
|
|
2477
|
-
for (let index = 0; index <=
|
|
2478
|
-
if (index <
|
|
2479
|
-
char =
|
|
2466
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
2467
|
+
if (index < path.length) {
|
|
2468
|
+
char = path[index];
|
|
2480
2469
|
} else if (char === "/") {
|
|
2481
2470
|
break;
|
|
2482
2471
|
} else {
|
|
@@ -2512,9 +2501,9 @@ function normalizeString(path2, allowAboveRoot) {
|
|
|
2512
2501
|
}
|
|
2513
2502
|
} else {
|
|
2514
2503
|
if (res.length > 0) {
|
|
2515
|
-
res += `/${
|
|
2504
|
+
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
2516
2505
|
} else {
|
|
2517
|
-
res =
|
|
2506
|
+
res = path.slice(lastSlash + 1, index);
|
|
2518
2507
|
}
|
|
2519
2508
|
lastSegmentLength = index - lastSlash - 1;
|
|
2520
2509
|
}
|
|
@@ -2562,7 +2551,7 @@ var dirname = function(p) {
|
|
|
2562
2551
|
return segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
2563
2552
|
};
|
|
2564
2553
|
var format = function(p) {
|
|
2565
|
-
const segments = [p.root, p.dir, p.base
|
|
2554
|
+
const segments = [p.root, p.dir, _nullishCoalesce(p.base, () => ( p.name + p.ext))].filter(Boolean);
|
|
2566
2555
|
return normalizeWindowsPath(
|
|
2567
2556
|
p.root ? resolve(...segments) : segments.join("/")
|
|
2568
2557
|
);
|
|
@@ -2580,7 +2569,7 @@ var basename = function(p, extension) {
|
|
|
2580
2569
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
2581
2570
|
};
|
|
2582
2571
|
var parse = function(p) {
|
|
2583
|
-
const root = _PATH_ROOT_RE.exec(p)
|
|
2572
|
+
const root = _optionalChain([_PATH_ROOT_RE, 'access', _4 => _4.exec, 'call', _5 => _5(p), 'optionalAccess', _6 => _6[0], 'optionalAccess', _7 => _7.replace, 'call', _8 => _8(/\\/g, "/")]) || "";
|
|
2584
2573
|
const base = basename(p);
|
|
2585
2574
|
const extension = extname(base);
|
|
2586
2575
|
return {
|
|
@@ -2591,13 +2580,12 @@ var parse = function(p) {
|
|
|
2591
2580
|
name: base.slice(0, base.length - extension.length)
|
|
2592
2581
|
};
|
|
2593
2582
|
};
|
|
2594
|
-
var matchesGlob = (
|
|
2595
|
-
return zeptomatch(pattern, normalize(
|
|
2583
|
+
var matchesGlob = (path, pattern) => {
|
|
2584
|
+
return zeptomatch(pattern, normalize(path));
|
|
2596
2585
|
};
|
|
2597
|
-
var
|
|
2586
|
+
var _path = {
|
|
2598
2587
|
__proto__: null,
|
|
2599
2588
|
basename,
|
|
2600
|
-
delimiter,
|
|
2601
2589
|
dirname,
|
|
2602
2590
|
extname,
|
|
2603
2591
|
format,
|
|
@@ -2613,15 +2601,31 @@ var path = {
|
|
|
2613
2601
|
toNamespacedPath
|
|
2614
2602
|
};
|
|
2615
2603
|
|
|
2604
|
+
// ../../node_modules/.pnpm/pathe@2.0.1/node_modules/pathe/dist/index.mjs
|
|
2605
|
+
var delimiter = /* @__PURE__ */ (() => _optionalChain([globalThis, 'access', _9 => _9.process, 'optionalAccess', _10 => _10.platform]) === "win32" ? ";" : ":")();
|
|
2606
|
+
var _platforms = { posix: void 0, win32: void 0 };
|
|
2607
|
+
var mix = (del = delimiter) => {
|
|
2608
|
+
return new Proxy(_path, {
|
|
2609
|
+
get(_, prop) {
|
|
2610
|
+
if (prop === "delimiter") return del;
|
|
2611
|
+
if (prop === "posix") return posix;
|
|
2612
|
+
if (prop === "win32") return win32;
|
|
2613
|
+
return _platforms[prop] || _path[prop];
|
|
2614
|
+
}
|
|
2615
|
+
});
|
|
2616
|
+
};
|
|
2617
|
+
var posix = /* @__PURE__ */ mix(":");
|
|
2618
|
+
var win32 = /* @__PURE__ */ mix(";");
|
|
2619
|
+
|
|
2616
2620
|
// src/npm.ts
|
|
2617
2621
|
init_cjs_shims();
|
|
2618
|
-
|
|
2622
|
+
|
|
2619
2623
|
function fetchPackage(packageName, options) {
|
|
2620
|
-
const opts = (0,
|
|
2624
|
+
const opts = _shared.defu.call(void 0, options, {
|
|
2621
2625
|
// 默认使用国内镜像地址
|
|
2622
2626
|
registry: "https://registry.npmmirror.com"
|
|
2623
2627
|
});
|
|
2624
|
-
return
|
|
2628
|
+
return Promise.resolve().then(() => _interopRequireWildcard(require("npm-registry-fetch"))).then(({ json }) => {
|
|
2625
2629
|
return json(`/${packageName}`, opts);
|
|
2626
2630
|
});
|
|
2627
2631
|
}
|
|
@@ -2650,7 +2654,7 @@ async function getDevDepsVersions(options) {
|
|
|
2650
2654
|
// src/index.ts
|
|
2651
2655
|
async function createContext(options) {
|
|
2652
2656
|
const { cwd: cwd2, pkgJsonBasename, postcssConfigBasename, tailwindConfigBasename, fetchOptions } = options;
|
|
2653
|
-
const pkgJsonPath =
|
|
2657
|
+
const pkgJsonPath = posix.resolve(cwd2, pkgJsonBasename);
|
|
2654
2658
|
if (await import_fs_extra.default.exists(pkgJsonPath)) {
|
|
2655
2659
|
const pkgJson = await import_fs_extra.default.readJson(pkgJsonPath);
|
|
2656
2660
|
const versions = await getDevDepsVersions(fetchOptions);
|
|
@@ -2666,13 +2670,13 @@ async function createContext(options) {
|
|
|
2666
2670
|
}
|
|
2667
2671
|
};
|
|
2668
2672
|
} else {
|
|
2669
|
-
|
|
2673
|
+
_logger.logger.warn("\u5F53\u524D\u76EE\u5F55\u4E0B\u4E0D\u5B58\u5728 `package.json` \u6587\u4EF6\uFF0C\u521D\u59CB\u5316\u811A\u672C\u5C06\u88AB\u8DF3\u8FC7\uFF0C\u8BF7\u6267\u884C `npm init` \u6216\u624B\u52A8\u521B\u5EFA `package.json` \u540E\u91CD\u8BD5 ");
|
|
2670
2674
|
}
|
|
2671
2675
|
}
|
|
2672
2676
|
async function updatePackageJson(ctx) {
|
|
2673
|
-
(0,
|
|
2677
|
+
_shared.setValue.call(void 0, ctx.pkgJson, "scripts.postinstall", "weapp-tw patch");
|
|
2674
2678
|
for (const [key, value] of Object.entries(ctx.versions)) {
|
|
2675
|
-
(0,
|
|
2679
|
+
_shared.setValue.call(void 0, ctx.pkgJson, `devDependencies.${key}`, value);
|
|
2676
2680
|
}
|
|
2677
2681
|
await import_fs_extra.default.writeJSON(ctx.pkgJsonPath, ctx.pkgJson, { spaces: 2 });
|
|
2678
2682
|
}
|
|
@@ -2685,7 +2689,7 @@ async function touchPostcssConfig(ctx) {
|
|
|
2685
2689
|
},
|
|
2686
2690
|
}
|
|
2687
2691
|
`;
|
|
2688
|
-
await import_fs_extra.default.writeFile(
|
|
2692
|
+
await import_fs_extra.default.writeFile(posix.resolve(ctx.cwd, ctx.postcssConfigBasename), data);
|
|
2689
2693
|
}
|
|
2690
2694
|
async function touchTailwindConfig(ctx) {
|
|
2691
2695
|
const data = `/** @type {import('tailwindcss').Config} */
|
|
@@ -2702,35 +2706,34 @@ ${ctx.type === "module" ? "export default " : "module.exports = "}{
|
|
|
2702
2706
|
},
|
|
2703
2707
|
}
|
|
2704
2708
|
`;
|
|
2705
|
-
await import_fs_extra.default.writeFile(
|
|
2709
|
+
await import_fs_extra.default.writeFile(posix.resolve(ctx.cwd, ctx.tailwindConfigBasename), data);
|
|
2706
2710
|
}
|
|
2707
2711
|
function getInitDefaults() {
|
|
2708
2712
|
return {
|
|
2709
|
-
cwd:
|
|
2713
|
+
cwd: _process2.default.cwd(),
|
|
2710
2714
|
postcssConfigBasename: "postcss.config.js",
|
|
2711
2715
|
tailwindConfigBasename: "tailwind.config.js",
|
|
2712
2716
|
pkgJsonBasename: "package.json"
|
|
2713
2717
|
};
|
|
2714
2718
|
}
|
|
2715
2719
|
async function init(options) {
|
|
2716
|
-
const opts = (0,
|
|
2720
|
+
const opts = _shared.defu.call(void 0, options, getInitDefaults());
|
|
2717
2721
|
const ctx = await createContext(opts);
|
|
2718
2722
|
if (ctx) {
|
|
2719
2723
|
await updatePackageJson(ctx);
|
|
2720
|
-
|
|
2724
|
+
_logger.logger.success("`package.json` \u6587\u4EF6\u4FEE\u6539\u5B8C\u6210\uFF01");
|
|
2721
2725
|
await touchPostcssConfig(ctx);
|
|
2722
|
-
|
|
2726
|
+
_logger.logger.success("`postcss.config.js` \u6587\u4EF6\u521B\u5EFA\u5B8C\u6210\uFF01");
|
|
2723
2727
|
await touchTailwindConfig(ctx);
|
|
2724
|
-
|
|
2725
|
-
|
|
2728
|
+
_logger.logger.success("`tailwind.config.js` \u6587\u4EF6\u521B\u5EFA\u5B8C\u6210\uFF01");
|
|
2729
|
+
_logger.logger.success("`weapp-tailwindcss` \u521D\u59CB\u5316\u5B8C\u6210\uFF01\u8BF7\u6839\u636E\u4F60\u81EA\u5B9A\u4E49\u7684\u9700\u6C42\uFF0C\u66F4\u6539\u5BF9\u5E94\u7684\u914D\u7F6E\u6587\u4EF6(\u6BD4\u5982 `tailwind.config.js` \u4E2D\u7684 `content` \u914D\u7F6E)");
|
|
2726
2730
|
}
|
|
2727
2731
|
}
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
});
|
|
2732
|
+
|
|
2733
|
+
|
|
2734
|
+
|
|
2735
|
+
|
|
2736
|
+
|
|
2737
|
+
|
|
2738
|
+
|
|
2739
|
+
exports.createContext = createContext; exports.getInitDefaults = getInitDefaults; exports.init = init; exports.touchPostcssConfig = touchPostcssConfig; exports.touchTailwindConfig = touchTailwindConfig; exports.updatePackageJson = updatePackageJson;
|