vite-plugin-dts 0.9.5 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +180 -174
- package/README.zh-CN.md +179 -173
- package/dist/index.js +166 -276
- package/dist/index.mjs +166 -283
- package/package.json +11 -3
package/dist/index.js
CHANGED
|
@@ -45,17 +45,17 @@ var __toModule = (module2) => {
|
|
|
45
45
|
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
// node_modules/tsup/assets/cjs_shims.js
|
|
48
|
+
// node_modules/.pnpm/tsup@5.9.0_typescript@4.5.2/node_modules/tsup/assets/cjs_shims.js
|
|
49
49
|
var importMetaUrlShim;
|
|
50
50
|
var init_cjs_shims = __esm({
|
|
51
|
-
"node_modules/tsup/assets/cjs_shims.js"() {
|
|
51
|
+
"node_modules/.pnpm/tsup@5.9.0_typescript@4.5.2/node_modules/tsup/assets/cjs_shims.js"() {
|
|
52
52
|
importMetaUrlShim = typeof document === "undefined" ? new (require("url")).URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
55
|
|
|
56
|
-
// node_modules/color-name/index.js
|
|
56
|
+
// node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js
|
|
57
57
|
var require_color_name = __commonJS({
|
|
58
|
-
"node_modules/color-name/index.js"(exports, module2) {
|
|
58
|
+
"node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports, module2) {
|
|
59
59
|
init_cjs_shims();
|
|
60
60
|
"use strict";
|
|
61
61
|
module2.exports = {
|
|
@@ -211,9 +211,9 @@ var require_color_name = __commonJS({
|
|
|
211
211
|
}
|
|
212
212
|
});
|
|
213
213
|
|
|
214
|
-
// node_modules/color-convert/conversions.js
|
|
214
|
+
// node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js
|
|
215
215
|
var require_conversions = __commonJS({
|
|
216
|
-
"node_modules/color-convert/conversions.js"(exports, module2) {
|
|
216
|
+
"node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports, module2) {
|
|
217
217
|
init_cjs_shims();
|
|
218
218
|
var cssKeywords = require_color_name();
|
|
219
219
|
var reverseKeywords = {};
|
|
@@ -883,9 +883,9 @@ var require_conversions = __commonJS({
|
|
|
883
883
|
}
|
|
884
884
|
});
|
|
885
885
|
|
|
886
|
-
// node_modules/color-convert/route.js
|
|
886
|
+
// node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js
|
|
887
887
|
var require_route = __commonJS({
|
|
888
|
-
"node_modules/color-convert/route.js"(exports, module2) {
|
|
888
|
+
"node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports, module2) {
|
|
889
889
|
init_cjs_shims();
|
|
890
890
|
var conversions = require_conversions();
|
|
891
891
|
function buildGraph() {
|
|
@@ -952,9 +952,9 @@ var require_route = __commonJS({
|
|
|
952
952
|
}
|
|
953
953
|
});
|
|
954
954
|
|
|
955
|
-
// node_modules/color-convert/index.js
|
|
955
|
+
// node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js
|
|
956
956
|
var require_color_convert = __commonJS({
|
|
957
|
-
"node_modules/color-convert/index.js"(exports, module2) {
|
|
957
|
+
"node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports, module2) {
|
|
958
958
|
init_cjs_shims();
|
|
959
959
|
var conversions = require_conversions();
|
|
960
960
|
var route = require_route();
|
|
@@ -1014,9 +1014,9 @@ var require_color_convert = __commonJS({
|
|
|
1014
1014
|
}
|
|
1015
1015
|
});
|
|
1016
1016
|
|
|
1017
|
-
// node_modules/ansi-styles/index.js
|
|
1017
|
+
// node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js
|
|
1018
1018
|
var require_ansi_styles = __commonJS({
|
|
1019
|
-
"node_modules/ansi-styles/index.js"(exports, module2) {
|
|
1019
|
+
"node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js"(exports, module2) {
|
|
1020
1020
|
init_cjs_shims();
|
|
1021
1021
|
"use strict";
|
|
1022
1022
|
var wrapAnsi16 = (fn, offset) => (...args) => {
|
|
@@ -1154,9 +1154,9 @@ var require_ansi_styles = __commonJS({
|
|
|
1154
1154
|
}
|
|
1155
1155
|
});
|
|
1156
1156
|
|
|
1157
|
-
// node_modules/has-flag/index.js
|
|
1157
|
+
// node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
|
|
1158
1158
|
var require_has_flag = __commonJS({
|
|
1159
|
-
"node_modules/has-flag/index.js"(exports, module2) {
|
|
1159
|
+
"node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module2) {
|
|
1160
1160
|
init_cjs_shims();
|
|
1161
1161
|
"use strict";
|
|
1162
1162
|
module2.exports = (flag, argv = process.argv) => {
|
|
@@ -1168,31 +1168,31 @@ var require_has_flag = __commonJS({
|
|
|
1168
1168
|
}
|
|
1169
1169
|
});
|
|
1170
1170
|
|
|
1171
|
-
// node_modules/
|
|
1171
|
+
// node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
|
|
1172
1172
|
var require_supports_color = __commonJS({
|
|
1173
|
-
"node_modules/
|
|
1173
|
+
"node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module2) {
|
|
1174
1174
|
init_cjs_shims();
|
|
1175
1175
|
"use strict";
|
|
1176
|
-
var
|
|
1177
|
-
var
|
|
1178
|
-
var
|
|
1179
|
-
var { env
|
|
1176
|
+
var os2 = require("os");
|
|
1177
|
+
var tty = require("tty");
|
|
1178
|
+
var hasFlag = require_has_flag();
|
|
1179
|
+
var { env } = process;
|
|
1180
1180
|
var forceColor;
|
|
1181
|
-
if (
|
|
1181
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
1182
1182
|
forceColor = 0;
|
|
1183
|
-
} else if (
|
|
1183
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
1184
1184
|
forceColor = 1;
|
|
1185
1185
|
}
|
|
1186
|
-
if ("FORCE_COLOR" in
|
|
1187
|
-
if (
|
|
1186
|
+
if ("FORCE_COLOR" in env) {
|
|
1187
|
+
if (env.FORCE_COLOR === "true") {
|
|
1188
1188
|
forceColor = 1;
|
|
1189
|
-
} else if (
|
|
1189
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
1190
1190
|
forceColor = 0;
|
|
1191
1191
|
} else {
|
|
1192
|
-
forceColor =
|
|
1192
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function translateLevel(level) {
|
|
1196
1196
|
if (level === 0) {
|
|
1197
1197
|
return false;
|
|
1198
1198
|
}
|
|
@@ -1203,77 +1203,77 @@ var require_supports_color = __commonJS({
|
|
|
1203
1203
|
has16m: level >= 3
|
|
1204
1204
|
};
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
1207
1207
|
if (forceColor === 0) {
|
|
1208
1208
|
return 0;
|
|
1209
1209
|
}
|
|
1210
|
-
if (
|
|
1210
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
1211
1211
|
return 3;
|
|
1212
1212
|
}
|
|
1213
|
-
if (
|
|
1213
|
+
if (hasFlag("color=256")) {
|
|
1214
1214
|
return 2;
|
|
1215
1215
|
}
|
|
1216
1216
|
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
1217
1217
|
return 0;
|
|
1218
1218
|
}
|
|
1219
1219
|
const min = forceColor || 0;
|
|
1220
|
-
if (
|
|
1220
|
+
if (env.TERM === "dumb") {
|
|
1221
1221
|
return min;
|
|
1222
1222
|
}
|
|
1223
1223
|
if (process.platform === "win32") {
|
|
1224
|
-
const osRelease =
|
|
1224
|
+
const osRelease = os2.release().split(".");
|
|
1225
1225
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
1226
1226
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
1227
1227
|
}
|
|
1228
1228
|
return 1;
|
|
1229
1229
|
}
|
|
1230
|
-
if ("CI" in
|
|
1231
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in
|
|
1230
|
+
if ("CI" in env) {
|
|
1231
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
1232
1232
|
return 1;
|
|
1233
1233
|
}
|
|
1234
1234
|
return min;
|
|
1235
1235
|
}
|
|
1236
|
-
if ("TEAMCITY_VERSION" in
|
|
1237
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(
|
|
1236
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
1237
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
1238
1238
|
}
|
|
1239
|
-
if (
|
|
1239
|
+
if (env.COLORTERM === "truecolor") {
|
|
1240
1240
|
return 3;
|
|
1241
1241
|
}
|
|
1242
|
-
if ("TERM_PROGRAM" in
|
|
1243
|
-
const version = parseInt((
|
|
1244
|
-
switch (
|
|
1242
|
+
if ("TERM_PROGRAM" in env) {
|
|
1243
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
1244
|
+
switch (env.TERM_PROGRAM) {
|
|
1245
1245
|
case "iTerm.app":
|
|
1246
1246
|
return version >= 3 ? 3 : 2;
|
|
1247
1247
|
case "Apple_Terminal":
|
|
1248
1248
|
return 2;
|
|
1249
1249
|
}
|
|
1250
1250
|
}
|
|
1251
|
-
if (/-256(color)?$/i.test(
|
|
1251
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
1252
1252
|
return 2;
|
|
1253
1253
|
}
|
|
1254
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(
|
|
1254
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
1255
1255
|
return 1;
|
|
1256
1256
|
}
|
|
1257
|
-
if ("COLORTERM" in
|
|
1257
|
+
if ("COLORTERM" in env) {
|
|
1258
1258
|
return 1;
|
|
1259
1259
|
}
|
|
1260
1260
|
return min;
|
|
1261
1261
|
}
|
|
1262
1262
|
function getSupportLevel(stream) {
|
|
1263
|
-
const level =
|
|
1264
|
-
return
|
|
1263
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
1264
|
+
return translateLevel(level);
|
|
1265
1265
|
}
|
|
1266
1266
|
module2.exports = {
|
|
1267
1267
|
supportsColor: getSupportLevel,
|
|
1268
|
-
stdout:
|
|
1269
|
-
stderr:
|
|
1268
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
1269
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
1270
1270
|
};
|
|
1271
1271
|
}
|
|
1272
1272
|
});
|
|
1273
1273
|
|
|
1274
|
-
// node_modules/chalk/source/util.js
|
|
1274
|
+
// node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js
|
|
1275
1275
|
var require_util = __commonJS({
|
|
1276
|
-
"node_modules/chalk/source/util.js"(exports, module2) {
|
|
1276
|
+
"node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js"(exports, module2) {
|
|
1277
1277
|
init_cjs_shims();
|
|
1278
1278
|
"use strict";
|
|
1279
1279
|
var stringReplaceAll = (string, substring, replacer) => {
|
|
@@ -1311,9 +1311,9 @@ var require_util = __commonJS({
|
|
|
1311
1311
|
}
|
|
1312
1312
|
});
|
|
1313
1313
|
|
|
1314
|
-
// node_modules/chalk/source/templates.js
|
|
1314
|
+
// node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js
|
|
1315
1315
|
var require_templates = __commonJS({
|
|
1316
|
-
"node_modules/chalk/source/templates.js"(exports, module2) {
|
|
1316
|
+
"node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js"(exports, module2) {
|
|
1317
1317
|
init_cjs_shims();
|
|
1318
1318
|
"use strict";
|
|
1319
1319
|
var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
@@ -1426,9 +1426,9 @@ var require_templates = __commonJS({
|
|
|
1426
1426
|
}
|
|
1427
1427
|
});
|
|
1428
1428
|
|
|
1429
|
-
// node_modules/chalk/source/index.js
|
|
1429
|
+
// node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js
|
|
1430
1430
|
var require_source = __commonJS({
|
|
1431
|
-
"node_modules/chalk/source/index.js"(exports, module2) {
|
|
1431
|
+
"node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"(exports, module2) {
|
|
1432
1432
|
init_cjs_shims();
|
|
1433
1433
|
"use strict";
|
|
1434
1434
|
var ansiStyles = require_ansi_styles();
|
|
@@ -1601,9 +1601,9 @@ var require_source = __commonJS({
|
|
|
1601
1601
|
}
|
|
1602
1602
|
});
|
|
1603
1603
|
|
|
1604
|
-
// node_modules/ms/index.js
|
|
1604
|
+
// node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
|
|
1605
1605
|
var require_ms = __commonJS({
|
|
1606
|
-
"node_modules/ms/index.js"(exports, module2) {
|
|
1606
|
+
"node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports, module2) {
|
|
1607
1607
|
init_cjs_shims();
|
|
1608
1608
|
var s = 1e3;
|
|
1609
1609
|
var m = s * 60;
|
|
@@ -1714,11 +1714,11 @@ var require_ms = __commonJS({
|
|
|
1714
1714
|
}
|
|
1715
1715
|
});
|
|
1716
1716
|
|
|
1717
|
-
// node_modules/debug/src/common.js
|
|
1717
|
+
// node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/common.js
|
|
1718
1718
|
var require_common = __commonJS({
|
|
1719
|
-
"node_modules/debug/src/common.js"(exports, module2) {
|
|
1719
|
+
"node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/common.js"(exports, module2) {
|
|
1720
1720
|
init_cjs_shims();
|
|
1721
|
-
function setup(
|
|
1721
|
+
function setup(env) {
|
|
1722
1722
|
createDebug.debug = createDebug;
|
|
1723
1723
|
createDebug.default = createDebug;
|
|
1724
1724
|
createDebug.coerce = coerce;
|
|
@@ -1727,8 +1727,8 @@ var require_common = __commonJS({
|
|
|
1727
1727
|
createDebug.enabled = enabled;
|
|
1728
1728
|
createDebug.humanize = require_ms();
|
|
1729
1729
|
createDebug.destroy = destroy;
|
|
1730
|
-
Object.keys(
|
|
1731
|
-
createDebug[key] =
|
|
1730
|
+
Object.keys(env).forEach((key) => {
|
|
1731
|
+
createDebug[key] = env[key];
|
|
1732
1732
|
});
|
|
1733
1733
|
createDebug.names = [];
|
|
1734
1734
|
createDebug.skips = [];
|
|
@@ -1878,9 +1878,9 @@ var require_common = __commonJS({
|
|
|
1878
1878
|
}
|
|
1879
1879
|
});
|
|
1880
1880
|
|
|
1881
|
-
// node_modules/debug/src/browser.js
|
|
1881
|
+
// node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/browser.js
|
|
1882
1882
|
var require_browser = __commonJS({
|
|
1883
|
-
"node_modules/debug/src/browser.js"(exports, module2) {
|
|
1883
|
+
"node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/browser.js"(exports, module2) {
|
|
1884
1884
|
init_cjs_shims();
|
|
1885
1885
|
exports.formatArgs = formatArgs;
|
|
1886
1886
|
exports.save = save;
|
|
@@ -2044,135 +2044,11 @@ var require_browser = __commonJS({
|
|
|
2044
2044
|
}
|
|
2045
2045
|
});
|
|
2046
2046
|
|
|
2047
|
-
// node_modules/
|
|
2048
|
-
var supports_color_exports = {};
|
|
2049
|
-
__export(supports_color_exports, {
|
|
2050
|
-
createSupportsColor: () => createSupportsColor,
|
|
2051
|
-
default: () => supports_color_default
|
|
2052
|
-
});
|
|
2053
|
-
function hasFlag(flag, argv = import_node_process.default.argv) {
|
|
2054
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
2055
|
-
const position = argv.indexOf(prefix + flag);
|
|
2056
|
-
const terminatorPosition = argv.indexOf("--");
|
|
2057
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
2058
|
-
}
|
|
2059
|
-
function envForceColor() {
|
|
2060
|
-
if ("FORCE_COLOR" in env) {
|
|
2061
|
-
if (env.FORCE_COLOR === "true") {
|
|
2062
|
-
return 1;
|
|
2063
|
-
}
|
|
2064
|
-
if (env.FORCE_COLOR === "false") {
|
|
2065
|
-
return 0;
|
|
2066
|
-
}
|
|
2067
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
2068
|
-
}
|
|
2069
|
-
}
|
|
2070
|
-
function translateLevel(level) {
|
|
2071
|
-
if (level === 0) {
|
|
2072
|
-
return false;
|
|
2073
|
-
}
|
|
2074
|
-
return {
|
|
2075
|
-
level,
|
|
2076
|
-
hasBasic: true,
|
|
2077
|
-
has256: level >= 2,
|
|
2078
|
-
has16m: level >= 3
|
|
2079
|
-
};
|
|
2080
|
-
}
|
|
2081
|
-
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
2082
|
-
const noFlagForceColor = envForceColor();
|
|
2083
|
-
if (noFlagForceColor !== void 0) {
|
|
2084
|
-
flagForceColor = noFlagForceColor;
|
|
2085
|
-
}
|
|
2086
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
2087
|
-
if (forceColor === 0) {
|
|
2088
|
-
return 0;
|
|
2089
|
-
}
|
|
2090
|
-
if (sniffFlags) {
|
|
2091
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
2092
|
-
return 3;
|
|
2093
|
-
}
|
|
2094
|
-
if (hasFlag("color=256")) {
|
|
2095
|
-
return 2;
|
|
2096
|
-
}
|
|
2097
|
-
}
|
|
2098
|
-
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
2099
|
-
return 0;
|
|
2100
|
-
}
|
|
2101
|
-
const min = forceColor || 0;
|
|
2102
|
-
if (env.TERM === "dumb") {
|
|
2103
|
-
return min;
|
|
2104
|
-
}
|
|
2105
|
-
if (import_node_process.default.platform === "win32") {
|
|
2106
|
-
const osRelease = import_node_os.default.release().split(".");
|
|
2107
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
2108
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
2109
|
-
}
|
|
2110
|
-
return 1;
|
|
2111
|
-
}
|
|
2112
|
-
if ("CI" in env) {
|
|
2113
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
2114
|
-
return 1;
|
|
2115
|
-
}
|
|
2116
|
-
return min;
|
|
2117
|
-
}
|
|
2118
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
2119
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
2120
|
-
}
|
|
2121
|
-
if (env.COLORTERM === "truecolor") {
|
|
2122
|
-
return 3;
|
|
2123
|
-
}
|
|
2124
|
-
if ("TERM_PROGRAM" in env) {
|
|
2125
|
-
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
2126
|
-
switch (env.TERM_PROGRAM) {
|
|
2127
|
-
case "iTerm.app":
|
|
2128
|
-
return version >= 3 ? 3 : 2;
|
|
2129
|
-
case "Apple_Terminal":
|
|
2130
|
-
return 2;
|
|
2131
|
-
}
|
|
2132
|
-
}
|
|
2133
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
2134
|
-
return 2;
|
|
2135
|
-
}
|
|
2136
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
2137
|
-
return 1;
|
|
2138
|
-
}
|
|
2139
|
-
if ("COLORTERM" in env) {
|
|
2140
|
-
return 1;
|
|
2141
|
-
}
|
|
2142
|
-
return min;
|
|
2143
|
-
}
|
|
2144
|
-
function createSupportsColor(stream, options = {}) {
|
|
2145
|
-
const level = _supportsColor(stream, __spreadValues({
|
|
2146
|
-
streamIsTTY: stream && stream.isTTY
|
|
2147
|
-
}, options));
|
|
2148
|
-
return translateLevel(level);
|
|
2149
|
-
}
|
|
2150
|
-
var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default;
|
|
2151
|
-
var init_supports_color = __esm({
|
|
2152
|
-
"node_modules/supports-color/index.js"() {
|
|
2153
|
-
init_cjs_shims();
|
|
2154
|
-
import_node_process = __toModule(require("process"));
|
|
2155
|
-
import_node_os = __toModule(require("os"));
|
|
2156
|
-
import_node_tty = __toModule(require("tty"));
|
|
2157
|
-
({ env } = import_node_process.default);
|
|
2158
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
2159
|
-
flagForceColor = 0;
|
|
2160
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
2161
|
-
flagForceColor = 1;
|
|
2162
|
-
}
|
|
2163
|
-
supportsColor = {
|
|
2164
|
-
stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
|
|
2165
|
-
stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
|
|
2166
|
-
};
|
|
2167
|
-
supports_color_default = supportsColor;
|
|
2168
|
-
}
|
|
2169
|
-
});
|
|
2170
|
-
|
|
2171
|
-
// node_modules/debug/src/node.js
|
|
2047
|
+
// node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/node.js
|
|
2172
2048
|
var require_node = __commonJS({
|
|
2173
|
-
"node_modules/debug/src/node.js"(exports, module2) {
|
|
2049
|
+
"node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/node.js"(exports, module2) {
|
|
2174
2050
|
init_cjs_shims();
|
|
2175
|
-
var
|
|
2051
|
+
var tty = require("tty");
|
|
2176
2052
|
var util = require("util");
|
|
2177
2053
|
exports.init = init;
|
|
2178
2054
|
exports.log = log;
|
|
@@ -2184,8 +2060,8 @@ var require_node = __commonJS({
|
|
|
2184
2060
|
}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
2185
2061
|
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
2186
2062
|
try {
|
|
2187
|
-
const
|
|
2188
|
-
if (
|
|
2063
|
+
const supportsColor = require_supports_color();
|
|
2064
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
2189
2065
|
exports.colors = [
|
|
2190
2066
|
20,
|
|
2191
2067
|
21,
|
|
@@ -2287,7 +2163,7 @@ var require_node = __commonJS({
|
|
|
2287
2163
|
return obj;
|
|
2288
2164
|
}, {});
|
|
2289
2165
|
function useColors() {
|
|
2290
|
-
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) :
|
|
2166
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
2291
2167
|
}
|
|
2292
2168
|
function formatArgs(args) {
|
|
2293
2169
|
const { namespace: name, useColors: useColors2 } = this;
|
|
@@ -2340,9 +2216,9 @@ var require_node = __commonJS({
|
|
|
2340
2216
|
}
|
|
2341
2217
|
});
|
|
2342
2218
|
|
|
2343
|
-
// node_modules/debug/src/index.js
|
|
2219
|
+
// node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/index.js
|
|
2344
2220
|
var require_src = __commonJS({
|
|
2345
|
-
"node_modules/debug/src/index.js"(exports, module2) {
|
|
2221
|
+
"node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/index.js"(exports, module2) {
|
|
2346
2222
|
init_cjs_shims();
|
|
2347
2223
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
2348
2224
|
module2.exports = require_browser();
|
|
@@ -2352,9 +2228,9 @@ var require_src = __commonJS({
|
|
|
2352
2228
|
}
|
|
2353
2229
|
});
|
|
2354
2230
|
|
|
2355
|
-
// node_modules/source-map/lib/base64.js
|
|
2231
|
+
// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js
|
|
2356
2232
|
var require_base64 = __commonJS({
|
|
2357
|
-
"node_modules/source-map/lib/base64.js"(exports) {
|
|
2233
|
+
"node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js"(exports) {
|
|
2358
2234
|
init_cjs_shims();
|
|
2359
2235
|
var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
2360
2236
|
exports.encode = function(number) {
|
|
@@ -2394,9 +2270,9 @@ var require_base64 = __commonJS({
|
|
|
2394
2270
|
}
|
|
2395
2271
|
});
|
|
2396
2272
|
|
|
2397
|
-
// node_modules/source-map/lib/base64-vlq.js
|
|
2273
|
+
// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js
|
|
2398
2274
|
var require_base64_vlq = __commonJS({
|
|
2399
|
-
"node_modules/source-map/lib/base64-vlq.js"(exports) {
|
|
2275
|
+
"node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js"(exports) {
|
|
2400
2276
|
init_cjs_shims();
|
|
2401
2277
|
var base64 = require_base64();
|
|
2402
2278
|
var VLQ_BASE_SHIFT = 5;
|
|
@@ -2449,9 +2325,9 @@ var require_base64_vlq = __commonJS({
|
|
|
2449
2325
|
}
|
|
2450
2326
|
});
|
|
2451
2327
|
|
|
2452
|
-
// node_modules/source-map/lib/util.js
|
|
2328
|
+
// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js
|
|
2453
2329
|
var require_util2 = __commonJS({
|
|
2454
|
-
"node_modules/source-map/lib/util.js"(exports) {
|
|
2330
|
+
"node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js"(exports) {
|
|
2455
2331
|
init_cjs_shims();
|
|
2456
2332
|
function getArg(aArgs, aName, aDefaultValue) {
|
|
2457
2333
|
if (aName in aArgs) {
|
|
@@ -2751,9 +2627,9 @@ var require_util2 = __commonJS({
|
|
|
2751
2627
|
}
|
|
2752
2628
|
});
|
|
2753
2629
|
|
|
2754
|
-
// node_modules/source-map/lib/array-set.js
|
|
2630
|
+
// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js
|
|
2755
2631
|
var require_array_set = __commonJS({
|
|
2756
|
-
"node_modules/source-map/lib/array-set.js"(exports) {
|
|
2632
|
+
"node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js"(exports) {
|
|
2757
2633
|
init_cjs_shims();
|
|
2758
2634
|
var util = require_util2();
|
|
2759
2635
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -2822,9 +2698,9 @@ var require_array_set = __commonJS({
|
|
|
2822
2698
|
}
|
|
2823
2699
|
});
|
|
2824
2700
|
|
|
2825
|
-
// node_modules/source-map/lib/mapping-list.js
|
|
2701
|
+
// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js
|
|
2826
2702
|
var require_mapping_list = __commonJS({
|
|
2827
|
-
"node_modules/source-map/lib/mapping-list.js"(exports) {
|
|
2703
|
+
"node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js"(exports) {
|
|
2828
2704
|
init_cjs_shims();
|
|
2829
2705
|
var util = require_util2();
|
|
2830
2706
|
function generatedPositionAfter(mappingA, mappingB) {
|
|
@@ -2862,9 +2738,9 @@ var require_mapping_list = __commonJS({
|
|
|
2862
2738
|
}
|
|
2863
2739
|
});
|
|
2864
2740
|
|
|
2865
|
-
// node_modules/source-map/lib/source-map-generator.js
|
|
2741
|
+
// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js
|
|
2866
2742
|
var require_source_map_generator = __commonJS({
|
|
2867
|
-
"node_modules/source-map/lib/source-map-generator.js"(exports) {
|
|
2743
|
+
"node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js"(exports) {
|
|
2868
2744
|
init_cjs_shims();
|
|
2869
2745
|
var base64VLQ = require_base64_vlq();
|
|
2870
2746
|
var util = require_util2();
|
|
@@ -3135,9 +3011,9 @@ var require_source_map_generator = __commonJS({
|
|
|
3135
3011
|
}
|
|
3136
3012
|
});
|
|
3137
3013
|
|
|
3138
|
-
// node_modules/source-map/lib/binary-search.js
|
|
3014
|
+
// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.js
|
|
3139
3015
|
var require_binary_search = __commonJS({
|
|
3140
|
-
"node_modules/source-map/lib/binary-search.js"(exports) {
|
|
3016
|
+
"node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.js"(exports) {
|
|
3141
3017
|
init_cjs_shims();
|
|
3142
3018
|
exports.GREATEST_LOWER_BOUND = 1;
|
|
3143
3019
|
exports.LEAST_UPPER_BOUND = 2;
|
|
@@ -3185,9 +3061,9 @@ var require_binary_search = __commonJS({
|
|
|
3185
3061
|
}
|
|
3186
3062
|
});
|
|
3187
3063
|
|
|
3188
|
-
// node_modules/source-map/lib/quick-sort.js
|
|
3064
|
+
// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js
|
|
3189
3065
|
var require_quick_sort = __commonJS({
|
|
3190
|
-
"node_modules/source-map/lib/quick-sort.js"(exports) {
|
|
3066
|
+
"node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js"(exports) {
|
|
3191
3067
|
init_cjs_shims();
|
|
3192
3068
|
function swap(ary, x, y) {
|
|
3193
3069
|
var temp = ary[x];
|
|
@@ -3221,9 +3097,9 @@ var require_quick_sort = __commonJS({
|
|
|
3221
3097
|
}
|
|
3222
3098
|
});
|
|
3223
3099
|
|
|
3224
|
-
// node_modules/source-map/lib/source-map-consumer.js
|
|
3100
|
+
// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js
|
|
3225
3101
|
var require_source_map_consumer = __commonJS({
|
|
3226
|
-
"node_modules/source-map/lib/source-map-consumer.js"(exports) {
|
|
3102
|
+
"node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js"(exports) {
|
|
3227
3103
|
init_cjs_shims();
|
|
3228
3104
|
var util = require_util2();
|
|
3229
3105
|
var binarySearch = require_binary_search();
|
|
@@ -3793,9 +3669,9 @@ var require_source_map_consumer = __commonJS({
|
|
|
3793
3669
|
}
|
|
3794
3670
|
});
|
|
3795
3671
|
|
|
3796
|
-
// node_modules/source-map/lib/source-node.js
|
|
3672
|
+
// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js
|
|
3797
3673
|
var require_source_node = __commonJS({
|
|
3798
|
-
"node_modules/source-map/lib/source-node.js"(exports) {
|
|
3674
|
+
"node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js"(exports) {
|
|
3799
3675
|
init_cjs_shims();
|
|
3800
3676
|
var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
3801
3677
|
var util = require_util2();
|
|
@@ -4050,9 +3926,9 @@ var require_source_node = __commonJS({
|
|
|
4050
3926
|
}
|
|
4051
3927
|
});
|
|
4052
3928
|
|
|
4053
|
-
// node_modules/source-map/source-map.js
|
|
3929
|
+
// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.js
|
|
4054
3930
|
var require_source_map = __commonJS({
|
|
4055
|
-
"node_modules/source-map/source-map.js"(exports) {
|
|
3931
|
+
"node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.js"(exports) {
|
|
4056
3932
|
init_cjs_shims();
|
|
4057
3933
|
exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
4058
3934
|
exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
|
|
@@ -4060,12 +3936,12 @@ var require_source_map = __commonJS({
|
|
|
4060
3936
|
}
|
|
4061
3937
|
});
|
|
4062
3938
|
|
|
4063
|
-
// node_modules/buffer-from/index.js
|
|
3939
|
+
// node_modules/.pnpm/buffer-from@1.1.2/node_modules/buffer-from/index.js
|
|
4064
3940
|
var require_buffer_from = __commonJS({
|
|
4065
|
-
"node_modules/buffer-from/index.js"(exports, module2) {
|
|
3941
|
+
"node_modules/.pnpm/buffer-from@1.1.2/node_modules/buffer-from/index.js"(exports, module2) {
|
|
4066
3942
|
init_cjs_shims();
|
|
4067
3943
|
var toString = Object.prototype.toString;
|
|
4068
|
-
var isModern = typeof Buffer.alloc === "function" && typeof Buffer.allocUnsafe === "function" && typeof Buffer.from === "function";
|
|
3944
|
+
var isModern = typeof Buffer !== "undefined" && typeof Buffer.alloc === "function" && typeof Buffer.allocUnsafe === "function" && typeof Buffer.from === "function";
|
|
4069
3945
|
function isArrayBuffer(input) {
|
|
4070
3946
|
return toString.call(input).slice(8, -1) === "ArrayBuffer";
|
|
4071
3947
|
}
|
|
@@ -4110,9 +3986,9 @@ var require_buffer_from = __commonJS({
|
|
|
4110
3986
|
}
|
|
4111
3987
|
});
|
|
4112
3988
|
|
|
4113
|
-
// node_modules/source-map-support/source-map-support.js
|
|
3989
|
+
// node_modules/.pnpm/source-map-support@0.5.21/node_modules/source-map-support/source-map-support.js
|
|
4114
3990
|
var require_source_map_support = __commonJS({
|
|
4115
|
-
"node_modules/source-map-support/source-map-support.js"(exports, module2) {
|
|
3991
|
+
"node_modules/.pnpm/source-map-support@0.5.21/node_modules/source-map-support/source-map-support.js"(exports, module2) {
|
|
4116
3992
|
init_cjs_shims();
|
|
4117
3993
|
var SourceMapConsumer = require_source_map().SourceMapConsumer;
|
|
4118
3994
|
var path = require("path");
|
|
@@ -4574,9 +4450,9 @@ var require_source_map_support = __commonJS({
|
|
|
4574
4450
|
}
|
|
4575
4451
|
});
|
|
4576
4452
|
|
|
4577
|
-
// node_modules/typescript/lib/typescript.js
|
|
4453
|
+
// node_modules/.pnpm/typescript@4.5.2/node_modules/typescript/lib/typescript.js
|
|
4578
4454
|
var require_typescript = __commonJS({
|
|
4579
|
-
"node_modules/typescript/lib/typescript.js"(exports, module2) {
|
|
4455
|
+
"node_modules/.pnpm/typescript@4.5.2/node_modules/typescript/lib/typescript.js"(exports, module2) {
|
|
4580
4456
|
init_cjs_shims();
|
|
4581
4457
|
"use strict";
|
|
4582
4458
|
var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
|
|
@@ -81398,11 +81274,11 @@ var require_typescript = __commonJS({
|
|
|
81398
81274
|
}
|
|
81399
81275
|
}
|
|
81400
81276
|
for (var i = classLexicalEnvironmentStack.length - 1; i >= 0; --i) {
|
|
81401
|
-
var
|
|
81402
|
-
if (!
|
|
81277
|
+
var env = classLexicalEnvironmentStack[i];
|
|
81278
|
+
if (!env) {
|
|
81403
81279
|
continue;
|
|
81404
81280
|
}
|
|
81405
|
-
var info = (_a =
|
|
81281
|
+
var info = (_a = env.privateIdentifierEnvironment) === null || _a === void 0 ? void 0 : _a.identifiers.get(name.escapedText);
|
|
81406
81282
|
if (info) {
|
|
81407
81283
|
return info;
|
|
81408
81284
|
}
|
|
@@ -141149,9 +141025,9 @@ var require_typescript = __commonJS({
|
|
|
141149
141025
|
}
|
|
141150
141026
|
});
|
|
141151
141027
|
|
|
141152
|
-
// node_modules/vue/compiler-sfc/index.js
|
|
141028
|
+
// node_modules/.pnpm/vue@3.2.22/node_modules/vue/compiler-sfc/index.js
|
|
141153
141029
|
var require_compiler_sfc = __commonJS({
|
|
141154
|
-
"node_modules/vue/compiler-sfc/index.js"(exports, module2) {
|
|
141030
|
+
"node_modules/.pnpm/vue@3.2.22/node_modules/vue/compiler-sfc/index.js"(exports, module2) {
|
|
141155
141031
|
init_cjs_shims();
|
|
141156
141032
|
module2.exports = require("@vue/compiler-sfc");
|
|
141157
141033
|
}
|
|
@@ -141292,7 +141168,7 @@ function isAliasMatch(alias, importee) {
|
|
|
141292
141168
|
return false;
|
|
141293
141169
|
if (importee === alias.find)
|
|
141294
141170
|
return true;
|
|
141295
|
-
return importee.indexOf(alias.find) === 0 && importee.substring(alias.find.length)[0] === "/";
|
|
141171
|
+
return importee.indexOf(alias.find) === 0 && (alias.find.endsWith("/") || importee.substring(alias.find.length)[0] === "/");
|
|
141296
141172
|
}
|
|
141297
141173
|
var globalImportRE = /(?:(?:import|export)\s?(?:type)?\s?(?:(?:\{[^;\n]+\})|(?:[^;\n]+))\s?from\s?['"][^;\n]+['"])|(?:import\(['"][^;\n]+?['"]\))/g;
|
|
141298
141174
|
var staticImportRE = /(?:import|export)\s?(?:type)?\s?\{?.+\}?\s?from\s?['"](.+)['"]/;
|
|
@@ -141313,7 +141189,7 @@ function transformAliasImport(filePath, content, aliases) {
|
|
|
141313
141189
|
const matchedAlias = aliases.find((alias) => isAliasMatch(alias, matchResult[1]));
|
|
141314
141190
|
if (matchedAlias) {
|
|
141315
141191
|
const truthPath = (0, import_path2.isAbsolute)(matchedAlias.replacement) ? (0, import_vite.normalizePath)((0, import_path2.relative)((0, import_path2.dirname)(filePath), matchedAlias.replacement)) : (0, import_vite.normalizePath)(matchedAlias.replacement);
|
|
141316
|
-
return str.replace(isDynamic ? simpleDynamicImportRE : simpleStaticImportRE, `$1'${matchResult[1].replace(matchedAlias.find, truthPath.startsWith(".") ? truthPath : `./${truthPath}`)}'${isDynamic ? ")" : ""}`);
|
|
141192
|
+
return str.replace(isDynamic ? simpleDynamicImportRE : simpleStaticImportRE, `$1'${matchResult[1].replace(matchedAlias.find, (truthPath.startsWith(".") ? truthPath : `./${truthPath}`) + (typeof matchedAlias.find === "string" && matchedAlias.find.endsWith("/") ? "/" : ""))}'${isDynamic ? ")" : ""}`);
|
|
141317
141193
|
}
|
|
141318
141194
|
}
|
|
141319
141195
|
return str;
|
|
@@ -141338,21 +141214,36 @@ init_cjs_shims();
|
|
|
141338
141214
|
var exportDefaultRE = /export\s+default/;
|
|
141339
141215
|
var exportDefaultClassRE = /(?:(?:^|\n|;)\s*)export\s+default\s+class\s+([\w$]+)/;
|
|
141340
141216
|
var index = 1;
|
|
141217
|
+
var compileRoot = null;
|
|
141341
141218
|
var compiler;
|
|
141342
141219
|
function requireCompiler() {
|
|
141343
141220
|
if (!compiler) {
|
|
141344
|
-
|
|
141345
|
-
|
|
141346
|
-
|
|
141221
|
+
if (compileRoot) {
|
|
141222
|
+
try {
|
|
141223
|
+
compiler = require(require.resolve("vue/compiler-sfc", { paths: [compileRoot] }));
|
|
141224
|
+
} catch (e) {
|
|
141225
|
+
}
|
|
141226
|
+
}
|
|
141227
|
+
if (!compiler) {
|
|
141347
141228
|
try {
|
|
141348
|
-
compiler =
|
|
141349
|
-
} catch (
|
|
141350
|
-
|
|
141229
|
+
compiler = require_compiler_sfc();
|
|
141230
|
+
} catch (e) {
|
|
141231
|
+
try {
|
|
141232
|
+
compiler = require("@vue/compiler-sfc");
|
|
141233
|
+
} catch (e2) {
|
|
141234
|
+
throw new Error("@vue/compiler-sfc is not present in the dependency tree.\n");
|
|
141235
|
+
}
|
|
141351
141236
|
}
|
|
141352
141237
|
}
|
|
141353
141238
|
}
|
|
141354
141239
|
return compiler;
|
|
141355
141240
|
}
|
|
141241
|
+
function setCompileRoot(root) {
|
|
141242
|
+
if (root && root !== compileRoot) {
|
|
141243
|
+
compileRoot = root;
|
|
141244
|
+
compiler = null;
|
|
141245
|
+
}
|
|
141246
|
+
}
|
|
141356
141247
|
function compileVueCode(code) {
|
|
141357
141248
|
const { parse, compileScript, rewriteDefault } = requireCompiler();
|
|
141358
141249
|
const { descriptor } = parse(code);
|
|
@@ -141366,14 +141257,13 @@ function compileVueCode(code) {
|
|
|
141366
141257
|
});
|
|
141367
141258
|
const classMatch = compiled.content.match(exportDefaultClassRE);
|
|
141368
141259
|
if (classMatch) {
|
|
141369
|
-
content = compiled.content.replace(exportDefaultClassRE, `
|
|
141370
|
-
class $1`) + `
|
|
141260
|
+
content = compiled.content.replace(exportDefaultClassRE, "\nclass $1") + `
|
|
141371
141261
|
const _sfc_main = ${classMatch[1]}`;
|
|
141372
141262
|
if (exportDefaultRE.test(content)) {
|
|
141373
|
-
content = rewriteDefault(compiled.content,
|
|
141263
|
+
content = rewriteDefault(compiled.content, "_sfc_main");
|
|
141374
141264
|
}
|
|
141375
141265
|
} else {
|
|
141376
|
-
content = rewriteDefault(compiled.content,
|
|
141266
|
+
content = rewriteDefault(compiled.content, "_sfc_main");
|
|
141377
141267
|
}
|
|
141378
141268
|
content = transferSetupPosition(content);
|
|
141379
141269
|
content += "\nexport default _sfc_main\n";
|
|
@@ -141388,6 +141278,7 @@ const _sfc_main = ${classMatch[1]}`;
|
|
|
141388
141278
|
|
|
141389
141279
|
// src/plugin.ts
|
|
141390
141280
|
var noneExport = "export {};\n";
|
|
141281
|
+
var virtualPrefix = "\0";
|
|
141391
141282
|
var vueRE = /\.vue$/;
|
|
141392
141283
|
var tsRE = /\.tsx?$/;
|
|
141393
141284
|
var jsRE = /\.jsx?$/;
|
|
@@ -141408,6 +141299,7 @@ function dtsPlugin(options = {}) {
|
|
|
141408
141299
|
noEmitOnError = false,
|
|
141409
141300
|
skipDiagnostics = true,
|
|
141410
141301
|
logDiagnostics = false,
|
|
141302
|
+
copyDtsFiles = true,
|
|
141411
141303
|
afterDiagnostic = noop,
|
|
141412
141304
|
beforeWriteFile = noop,
|
|
141413
141305
|
afterBuild = noop
|
|
@@ -141460,6 +141352,7 @@ ${import_chalk.default.cyan("[vite:dts]")} Can not resolve declaration directory
|
|
|
141460
141352
|
`));
|
|
141461
141353
|
return;
|
|
141462
141354
|
}
|
|
141355
|
+
setCompileRoot(root);
|
|
141463
141356
|
compilerOptions.rootDir || (compilerOptions.rootDir = root);
|
|
141464
141357
|
project = new import_ts_morph.Project({
|
|
141465
141358
|
compilerOptions: mergeObjects(compilerOptions, {
|
|
@@ -141482,6 +141375,9 @@ ${import_chalk.default.cyan("[vite:dts]")} Can not resolve declaration directory
|
|
|
141482
141375
|
}
|
|
141483
141376
|
},
|
|
141484
141377
|
transform(code, id) {
|
|
141378
|
+
if (id.startsWith(virtualPrefix)) {
|
|
141379
|
+
return null;
|
|
141380
|
+
}
|
|
141485
141381
|
if (vueRE.test(id)) {
|
|
141486
141382
|
const { content, ext } = compileVueCode(code);
|
|
141487
141383
|
if (content) {
|
|
@@ -141504,7 +141400,7 @@ ${import_chalk.default.cyan("[vite:dts]")} Can not resolve declaration directory
|
|
|
141504
141400
|
}
|
|
141505
141401
|
},
|
|
141506
141402
|
async closeBundle() {
|
|
141507
|
-
var _a2, _b, _c;
|
|
141403
|
+
var _a2, _b, _c, _d, _e;
|
|
141508
141404
|
if (!outputDir || !project || isBundle)
|
|
141509
141405
|
return;
|
|
141510
141406
|
logger.info(import_chalk.default.green(`
|
|
@@ -141525,11 +141421,15 @@ ${import_chalk.default.cyan("[vite:dts]")} Start generate declaration files...`)
|
|
|
141525
141421
|
ignore: ensureArray(exclude != null ? exclude : ["node_modules/**"]).map(normalizeGlob)
|
|
141526
141422
|
});
|
|
141527
141423
|
files.forEach((file) => {
|
|
141528
|
-
includedFileSet.add(dtsRE.test(file) ? file : `${tjsRE.test(file) ? file.replace(tjsRE, "") : file}.d.ts`);
|
|
141529
141424
|
if (dtsRE.test(file)) {
|
|
141530
|
-
|
|
141531
|
-
|
|
141425
|
+
if (!copyDtsFiles) {
|
|
141426
|
+
return;
|
|
141427
|
+
}
|
|
141428
|
+
includedFileSet.add(file);
|
|
141429
|
+
sourceDtsFiles.add(project.addSourceFileAtPath(file));
|
|
141430
|
+
return;
|
|
141532
141431
|
}
|
|
141432
|
+
includedFileSet.add(`${tjsRE.test(file) ? file.replace(tjsRE, "") : file}.d.ts`);
|
|
141533
141433
|
});
|
|
141534
141434
|
if (hasJsVue) {
|
|
141535
141435
|
if (!allowJs) {
|
|
@@ -141553,18 +141453,23 @@ ${import_chalk.default.cyan("[vite:dts]")} Start generate declaration files...`)
|
|
|
141553
141453
|
bundleDebug("diagnostics");
|
|
141554
141454
|
}
|
|
141555
141455
|
const service = project.getLanguageService();
|
|
141556
|
-
const outputFiles = project.getSourceFiles().map((sourceFile) => {
|
|
141557
|
-
|
|
141558
|
-
|
|
141456
|
+
const outputFiles = project.getSourceFiles().map((sourceFile) => service.getEmitOutput(sourceFile, true).getOutputFiles().map((outputFile) => ({
|
|
141457
|
+
path: outputFile.getFilePath(),
|
|
141458
|
+
content: outputFile.getText()
|
|
141459
|
+
}))).flat().concat(Array.from(sourceDtsFiles).map((sourceFile) => ({
|
|
141460
|
+
path: sourceFile.getFilePath(),
|
|
141461
|
+
content: sourceFile.getFullText()
|
|
141462
|
+
})));
|
|
141559
141463
|
bundleDebug("emit");
|
|
141560
141464
|
await runParallel(import_os.default.cpus().length, outputFiles, async (outputFile) => {
|
|
141561
141465
|
var _a3, _b2;
|
|
141562
|
-
let filePath = outputFile.
|
|
141563
|
-
let content = outputFile.
|
|
141466
|
+
let filePath = outputFile.path;
|
|
141467
|
+
let content = outputFile.content;
|
|
141564
141468
|
const isMapFile = filePath.endsWith(".map");
|
|
141565
|
-
if (!includedFileSet.has(isMapFile ? filePath.slice(0, -4) : filePath) || clearPureImport && content === noneExport)
|
|
141469
|
+
if (!includedFileSet.has(isMapFile ? filePath.slice(0, -4) : filePath) || clearPureImport && content === noneExport) {
|
|
141566
141470
|
return;
|
|
141567
|
-
|
|
141471
|
+
}
|
|
141472
|
+
if (!isMapFile && content && content !== noneExport) {
|
|
141568
141473
|
content = clearPureImport ? removePureImport(content) : content;
|
|
141569
141474
|
content = transformAliasImport(filePath, content, aliases);
|
|
141570
141475
|
content = staticImport ? transformDynamicImport(content) : content;
|
|
@@ -141581,39 +141486,24 @@ ${import_chalk.default.cyan("[vite:dts]")} Start generate declaration files...`)
|
|
|
141581
141486
|
await import_fs_extra.default.writeFile(filePath, cleanVueFileName ? content.replace(/['"](.+)\.vue['"]/g, '"$1"') : content, "utf8");
|
|
141582
141487
|
});
|
|
141583
141488
|
bundleDebug("output");
|
|
141584
|
-
await Promise.all(Array.from(sourceDtsFiles).map(async (originPath) => {
|
|
141585
|
-
var _a3, _b2;
|
|
141586
|
-
let filePath = (0, import_path3.resolve)(outputDir, (0, import_path3.relative)(root, originPath));
|
|
141587
|
-
let content = "";
|
|
141588
|
-
let isRewrite = false;
|
|
141589
|
-
if (typeof beforeWriteFile === "function") {
|
|
141590
|
-
content = await import_fs_extra.default.readFile(originPath, "utf-8");
|
|
141591
|
-
const result = beforeWriteFile(filePath, content);
|
|
141592
|
-
if (result && isNativeObj(result)) {
|
|
141593
|
-
filePath = (_a3 = result.filePath) != null ? _a3 : filePath;
|
|
141594
|
-
isRewrite = result.content !== content;
|
|
141595
|
-
content = (_b2 = result.content) != null ? _b2 : content;
|
|
141596
|
-
}
|
|
141597
|
-
}
|
|
141598
|
-
await import_fs_extra.default.mkdir((0, import_path3.dirname)(filePath), { recursive: true });
|
|
141599
|
-
if (isRewrite) {
|
|
141600
|
-
await import_fs_extra.default.writeFile(filePath, content, "utf-8");
|
|
141601
|
-
} else {
|
|
141602
|
-
await import_fs_extra.default.copyFile(originPath, filePath);
|
|
141603
|
-
}
|
|
141604
|
-
}));
|
|
141605
|
-
bundleDebug("copy dts");
|
|
141606
141489
|
if (insertTypesEntry) {
|
|
141607
141490
|
const pkgPath = (0, import_path3.resolve)(root, "package.json");
|
|
141608
141491
|
const pkg = import_fs_extra.default.existsSync(pkgPath) ? JSON.parse(await import_fs_extra.default.readFile(pkgPath, "utf-8")) : {};
|
|
141609
|
-
|
|
141492
|
+
let typesPath = pkg.types ? (0, import_path3.resolve)(root, pkg.types) : (0, import_path3.resolve)(outputDir, "index.d.ts");
|
|
141610
141493
|
if (!import_fs_extra.default.existsSync(typesPath)) {
|
|
141611
|
-
|
|
141494
|
+
let content = entries.map((entry) => {
|
|
141612
141495
|
let filePath = (0, import_vite2.normalizePath)((0, import_path3.relative)((0, import_path3.dirname)(typesPath), (0, import_path3.resolve)(outputDir, (0, import_path3.relative)(root, entry))));
|
|
141613
141496
|
filePath = filePath.replace(tsRE, "");
|
|
141614
141497
|
filePath = /^\.\.?\//.test(filePath) ? filePath : `./${filePath}`;
|
|
141615
141498
|
return `export * from '${filePath}'`;
|
|
141616
141499
|
}).join("\n") + "\n";
|
|
141500
|
+
if (typeof beforeWriteFile === "function") {
|
|
141501
|
+
const result = beforeWriteFile(typesPath, content);
|
|
141502
|
+
if (result && isNativeObj(result)) {
|
|
141503
|
+
typesPath = (_d = result.filePath) != null ? _d : typesPath;
|
|
141504
|
+
content = (_e = result.content) != null ? _e : content;
|
|
141505
|
+
}
|
|
141506
|
+
}
|
|
141617
141507
|
await import_fs_extra.default.writeFile(typesPath, content, "utf-8");
|
|
141618
141508
|
}
|
|
141619
141509
|
bundleDebug("insert index");
|
|
@@ -141632,7 +141522,7 @@ ${import_chalk.default.cyan("[vite:dts]")} Start generate declaration files...`)
|
|
|
141632
141522
|
// src/index.ts
|
|
141633
141523
|
var src_default = dtsPlugin;
|
|
141634
141524
|
module.exports = dtsPlugin;
|
|
141635
|
-
dtsPlugin
|
|
141525
|
+
dtsPlugin.default = dtsPlugin;
|
|
141636
141526
|
// Annotate the CommonJS export names for ESM import in node:
|
|
141637
141527
|
0 && (module.exports = {});
|
|
141638
141528
|
/*! *****************************************************************************
|