vite 4.3.2 → 4.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/LICENSE.md +1 -1
- package/dist/client/client.mjs +5 -3
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-e3f470e2.js → dep-3ea2db5b.js} +15 -16
- package/dist/node/chunks/{dep-11cf3f0f.js → dep-5728e8e9.js} +138 -193
- package/dist/node/chunks/{dep-7efa13d7.js → dep-a178814b.js} +679 -704
- package/dist/node/cli.js +13 -13
- package/dist/node/index.d.ts +8 -0
- package/dist/node/index.js +3 -3
- package/dist/node-cjs/publicUtils.cjs +57 -82
- package/package.json +13 -13
package/dist/node/cli.js
CHANGED
|
@@ -2,10 +2,11 @@ import path from 'node:path';
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import { performance } from 'node:perf_hooks';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
|
-
import { C as
|
|
5
|
+
import { C as colors, D as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-a178814b.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:url';
|
|
9
|
+
import 'node:util';
|
|
9
10
|
import 'node:module';
|
|
10
11
|
import 'tty';
|
|
11
12
|
import 'esbuild';
|
|
@@ -25,7 +26,6 @@ import 'node:crypto';
|
|
|
25
26
|
import 'node:dns';
|
|
26
27
|
import 'crypto';
|
|
27
28
|
import 'node:buffer';
|
|
28
|
-
import 'node:util';
|
|
29
29
|
import 'module';
|
|
30
30
|
import 'node:assert';
|
|
31
31
|
import 'node:process';
|
|
@@ -667,7 +667,7 @@ const stopProfiler = (log) => {
|
|
|
667
667
|
if (!err) {
|
|
668
668
|
const outPath = path.resolve(`./vite-profile-${profileCount++}.cpuprofile`);
|
|
669
669
|
fs.writeFileSync(outPath, JSON.stringify(profile));
|
|
670
|
-
log(
|
|
670
|
+
log(colors.yellow(`CPU profile written to ${colors.white(colors.dim(outPath))}`));
|
|
671
671
|
profileSession = undefined;
|
|
672
672
|
res();
|
|
673
673
|
}
|
|
@@ -728,7 +728,7 @@ cli
|
|
|
728
728
|
filterDuplicateOptions(options);
|
|
729
729
|
// output structure is preserved even after bundling so require()
|
|
730
730
|
// is ok here
|
|
731
|
-
const { createServer } = await import('./chunks/dep-
|
|
731
|
+
const { createServer } = await import('./chunks/dep-a178814b.js').then(function (n) { return n.I; });
|
|
732
732
|
try {
|
|
733
733
|
const server = await createServer({
|
|
734
734
|
root,
|
|
@@ -747,9 +747,9 @@ cli
|
|
|
747
747
|
const info = server.config.logger.info;
|
|
748
748
|
const viteStartTime = global.__vite_start_time ?? false;
|
|
749
749
|
const startupDurationString = viteStartTime
|
|
750
|
-
?
|
|
750
|
+
? colors.dim(`ready in ${colors.reset(colors.bold(Math.ceil(performance.now() - viteStartTime)))} ms`)
|
|
751
751
|
: '';
|
|
752
|
-
info(`\n ${
|
|
752
|
+
info(`\n ${colors.green(`${colors.bold('VITE')} v${VERSION}`)} ${startupDurationString}\n`, { clear: !server.config.logger.hasWarned });
|
|
753
753
|
server.printUrls();
|
|
754
754
|
bindShortcuts(server, {
|
|
755
755
|
print: true,
|
|
@@ -781,7 +781,7 @@ cli
|
|
|
781
781
|
}
|
|
782
782
|
catch (e) {
|
|
783
783
|
const logger = createLogger(options.logLevel);
|
|
784
|
-
logger.error(
|
|
784
|
+
logger.error(colors.red(`error when starting dev server:\n${e.stack}`), {
|
|
785
785
|
error: e,
|
|
786
786
|
});
|
|
787
787
|
stopProfiler(logger.info);
|
|
@@ -806,7 +806,7 @@ cli
|
|
|
806
806
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
807
807
|
.action(async (root, options) => {
|
|
808
808
|
filterDuplicateOptions(options);
|
|
809
|
-
const { build } = await import('./chunks/dep-
|
|
809
|
+
const { build } = await import('./chunks/dep-a178814b.js').then(function (n) { return n.H; });
|
|
810
810
|
const buildOptions = cleanOptions(options);
|
|
811
811
|
try {
|
|
812
812
|
await build({
|
|
@@ -821,7 +821,7 @@ cli
|
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
823
|
catch (e) {
|
|
824
|
-
createLogger(options.logLevel).error(
|
|
824
|
+
createLogger(options.logLevel).error(colors.red(`error during build:\n${e.stack}`), { error: e });
|
|
825
825
|
process.exit(1);
|
|
826
826
|
}
|
|
827
827
|
finally {
|
|
@@ -834,7 +834,7 @@ cli
|
|
|
834
834
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
835
835
|
.action(async (root, options) => {
|
|
836
836
|
filterDuplicateOptions(options);
|
|
837
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
837
|
+
const { optimizeDeps } = await import('./chunks/dep-a178814b.js').then(function (n) { return n.G; });
|
|
838
838
|
try {
|
|
839
839
|
const config = await resolveConfig({
|
|
840
840
|
root,
|
|
@@ -846,7 +846,7 @@ cli
|
|
|
846
846
|
await optimizeDeps(config, options.force, true);
|
|
847
847
|
}
|
|
848
848
|
catch (e) {
|
|
849
|
-
createLogger(options.logLevel).error(
|
|
849
|
+
createLogger(options.logLevel).error(colors.red(`error when optimizing deps:\n${e.stack}`), { error: e });
|
|
850
850
|
process.exit(1);
|
|
851
851
|
}
|
|
852
852
|
});
|
|
@@ -860,7 +860,7 @@ cli
|
|
|
860
860
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
861
861
|
.action(async (root, options) => {
|
|
862
862
|
filterDuplicateOptions(options);
|
|
863
|
-
const { preview } = await import('./chunks/dep-
|
|
863
|
+
const { preview } = await import('./chunks/dep-a178814b.js').then(function (n) { return n.J; });
|
|
864
864
|
try {
|
|
865
865
|
const server = await preview({
|
|
866
866
|
root,
|
|
@@ -882,7 +882,7 @@ cli
|
|
|
882
882
|
server.printUrls();
|
|
883
883
|
}
|
|
884
884
|
catch (e) {
|
|
885
|
-
createLogger(options.logLevel).error(
|
|
885
|
+
createLogger(options.logLevel).error(colors.red(`error when starting preview server:\n${e.stack}`), { error: e });
|
|
886
886
|
process.exit(1);
|
|
887
887
|
}
|
|
888
888
|
finally {
|
package/dist/node/index.d.ts
CHANGED
|
@@ -599,6 +599,14 @@ export declare interface DepOptimizationConfig {
|
|
|
599
599
|
* @experimental
|
|
600
600
|
*/
|
|
601
601
|
disabled?: boolean | 'build' | 'dev';
|
|
602
|
+
/**
|
|
603
|
+
* Automatic dependency discovery. When `noDiscovery` is true, only dependencies
|
|
604
|
+
* listed in `include` will be optimized. The scanner isn't run for cold start
|
|
605
|
+
* in this case. CJS-only dependencies must be present in `include` during dev.
|
|
606
|
+
* @default false
|
|
607
|
+
* @experimental
|
|
608
|
+
*/
|
|
609
|
+
noDiscovery?: boolean;
|
|
602
610
|
}
|
|
603
611
|
|
|
604
612
|
export declare interface DepOptimizationMetadata {
|
package/dist/node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as isInNodeModules } from './chunks/dep-
|
|
2
|
-
export { b as build, e as buildErrorMessage, v as createFilter, x as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, k as getDepOptimizationConfig, m as isDepsOptimizerEnabled, z as isFileServingAllowed, l as loadConfigFromFile, A as loadEnv, u as mergeAlias, q as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, j as resolveBaseUrl, h as resolveConfig, B as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
|
1
|
+
import { i as isInNodeModules } from './chunks/dep-a178814b.js';
|
|
2
|
+
export { b as build, e as buildErrorMessage, v as createFilter, x as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, k as getDepOptimizationConfig, m as isDepsOptimizerEnabled, z as isFileServingAllowed, l as loadConfigFromFile, A as loadEnv, u as mergeAlias, q as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, j as resolveBaseUrl, h as resolveConfig, B as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-a178814b.js';
|
|
3
3
|
export { VERSION as version } from './constants.js';
|
|
4
4
|
export { version as esbuildVersion } from 'esbuild';
|
|
5
5
|
export { VERSION as rollupVersion } from 'rollup';
|
|
@@ -7,6 +7,7 @@ import 'node:fs';
|
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'node:url';
|
|
10
|
+
import 'node:util';
|
|
10
11
|
import 'node:perf_hooks';
|
|
11
12
|
import 'node:module';
|
|
12
13
|
import 'tty';
|
|
@@ -27,7 +28,6 @@ import 'node:crypto';
|
|
|
27
28
|
import 'node:dns';
|
|
28
29
|
import 'crypto';
|
|
29
30
|
import 'node:buffer';
|
|
30
|
-
import 'node:util';
|
|
31
31
|
import 'module';
|
|
32
32
|
import 'node:assert';
|
|
33
33
|
import 'node:process';
|
|
@@ -53,11 +53,7 @@ function getDefaultExportFromCjs (x) {
|
|
|
53
53
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
var
|
|
57
|
-
var picocolors = {
|
|
58
|
-
get exports(){ return picocolorsExports; },
|
|
59
|
-
set exports(v){ picocolorsExports = v; },
|
|
60
|
-
};
|
|
56
|
+
var picocolors = {exports: {}};
|
|
61
57
|
|
|
62
58
|
let tty = require$$0;
|
|
63
59
|
|
|
@@ -116,19 +112,14 @@ let createColors = (enabled = isColorSupported) => ({
|
|
|
116
112
|
});
|
|
117
113
|
|
|
118
114
|
picocolors.exports = createColors();
|
|
119
|
-
|
|
115
|
+
picocolors.exports.createColors = createColors;
|
|
120
116
|
|
|
121
|
-
var
|
|
122
|
-
var
|
|
123
|
-
get exports(){ return srcExports; },
|
|
124
|
-
set exports(v){ srcExports = v; },
|
|
125
|
-
};
|
|
117
|
+
var picocolorsExports = picocolors.exports;
|
|
118
|
+
var colors = /*@__PURE__*/getDefaultExportFromCjs(picocolorsExports);
|
|
126
119
|
|
|
127
|
-
var
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
set exports(v){ browserExports = v; },
|
|
131
|
-
};
|
|
120
|
+
var src = {exports: {}};
|
|
121
|
+
|
|
122
|
+
var browser = {exports: {}};
|
|
132
123
|
|
|
133
124
|
/**
|
|
134
125
|
* Helpers.
|
|
@@ -588,7 +579,7 @@ function requireCommon () {
|
|
|
588
579
|
var hasRequiredBrowser;
|
|
589
580
|
|
|
590
581
|
function requireBrowser () {
|
|
591
|
-
if (hasRequiredBrowser) return
|
|
582
|
+
if (hasRequiredBrowser) return browser.exports;
|
|
592
583
|
hasRequiredBrowser = 1;
|
|
593
584
|
(function (module, exports) {
|
|
594
585
|
/**
|
|
@@ -857,16 +848,12 @@ function requireBrowser () {
|
|
|
857
848
|
} catch (error) {
|
|
858
849
|
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
859
850
|
}
|
|
860
|
-
};
|
|
861
|
-
} (browser,
|
|
862
|
-
return
|
|
851
|
+
};
|
|
852
|
+
} (browser, browser.exports));
|
|
853
|
+
return browser.exports;
|
|
863
854
|
}
|
|
864
855
|
|
|
865
|
-
var
|
|
866
|
-
var node = {
|
|
867
|
-
get exports(){ return nodeExports; },
|
|
868
|
-
set exports(v){ nodeExports = v; },
|
|
869
|
-
};
|
|
856
|
+
var node = {exports: {}};
|
|
870
857
|
|
|
871
858
|
/**
|
|
872
859
|
* Module dependencies.
|
|
@@ -875,7 +862,7 @@ var node = {
|
|
|
875
862
|
var hasRequiredNode;
|
|
876
863
|
|
|
877
864
|
function requireNode () {
|
|
878
|
-
if (hasRequiredNode) return
|
|
865
|
+
if (hasRequiredNode) return node.exports;
|
|
879
866
|
hasRequiredNode = 1;
|
|
880
867
|
(function (module, exports) {
|
|
881
868
|
const tty = require$$0;
|
|
@@ -1136,9 +1123,9 @@ function requireNode () {
|
|
|
1136
1123
|
formatters.O = function (v) {
|
|
1137
1124
|
this.inspectOpts.colors = this.useColors;
|
|
1138
1125
|
return util.inspect(v, this.inspectOpts);
|
|
1139
|
-
};
|
|
1140
|
-
} (node,
|
|
1141
|
-
return
|
|
1126
|
+
};
|
|
1127
|
+
} (node, node.exports));
|
|
1128
|
+
return node.exports;
|
|
1142
1129
|
}
|
|
1143
1130
|
|
|
1144
1131
|
/**
|
|
@@ -1146,22 +1133,15 @@ function requireNode () {
|
|
|
1146
1133
|
* treat as a browser.
|
|
1147
1134
|
*/
|
|
1148
1135
|
|
|
1149
|
-
(
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
}
|
|
1155
|
-
} (src));
|
|
1136
|
+
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
|
1137
|
+
src.exports = requireBrowser();
|
|
1138
|
+
} else {
|
|
1139
|
+
src.exports = requireNode();
|
|
1140
|
+
}
|
|
1156
1141
|
|
|
1142
|
+
var srcExports = src.exports;
|
|
1157
1143
|
var debug$1 = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
|
|
1158
1144
|
|
|
1159
|
-
var picomatchExports = {};
|
|
1160
|
-
var picomatch$1 = {
|
|
1161
|
-
get exports(){ return picomatchExports; },
|
|
1162
|
-
set exports(v){ picomatchExports = v; },
|
|
1163
|
-
};
|
|
1164
|
-
|
|
1165
1145
|
var utils$3 = {};
|
|
1166
1146
|
|
|
1167
1147
|
const path$2 = require$$0$1;
|
|
@@ -1405,7 +1385,7 @@ var constants$2 = {
|
|
|
1405
1385
|
output = `(?:^(?!${output}).*$)`;
|
|
1406
1386
|
}
|
|
1407
1387
|
return output;
|
|
1408
|
-
};
|
|
1388
|
+
};
|
|
1409
1389
|
} (utils$3));
|
|
1410
1390
|
|
|
1411
1391
|
const utils$2 = utils$3;
|
|
@@ -2910,9 +2890,9 @@ const isObject$1 = val => val && typeof val === 'object' && !Array.isArray(val);
|
|
|
2910
2890
|
* @api public
|
|
2911
2891
|
*/
|
|
2912
2892
|
|
|
2913
|
-
const picomatch = (glob, options, returnState = false) => {
|
|
2893
|
+
const picomatch$1 = (glob, options, returnState = false) => {
|
|
2914
2894
|
if (Array.isArray(glob)) {
|
|
2915
|
-
const fns = glob.map(input => picomatch(input, options, returnState));
|
|
2895
|
+
const fns = glob.map(input => picomatch$1(input, options, returnState));
|
|
2916
2896
|
const arrayMatcher = str => {
|
|
2917
2897
|
for (const isMatch of fns) {
|
|
2918
2898
|
const state = isMatch(str);
|
|
@@ -2932,8 +2912,8 @@ const picomatch = (glob, options, returnState = false) => {
|
|
|
2932
2912
|
const opts = options || {};
|
|
2933
2913
|
const posix = utils.isWindows(options);
|
|
2934
2914
|
const regex = isState
|
|
2935
|
-
? picomatch.compileRe(glob, options)
|
|
2936
|
-
: picomatch.makeRe(glob, options, false, true);
|
|
2915
|
+
? picomatch$1.compileRe(glob, options)
|
|
2916
|
+
: picomatch$1.makeRe(glob, options, false, true);
|
|
2937
2917
|
|
|
2938
2918
|
const state = regex.state;
|
|
2939
2919
|
delete regex.state;
|
|
@@ -2941,11 +2921,11 @@ const picomatch = (glob, options, returnState = false) => {
|
|
|
2941
2921
|
let isIgnored = () => false;
|
|
2942
2922
|
if (opts.ignore) {
|
|
2943
2923
|
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
|
2944
|
-
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
|
|
2924
|
+
isIgnored = picomatch$1(opts.ignore, ignoreOpts, returnState);
|
|
2945
2925
|
}
|
|
2946
2926
|
|
|
2947
2927
|
const matcher = (input, returnObject = false) => {
|
|
2948
|
-
const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
|
|
2928
|
+
const { isMatch, match, output } = picomatch$1.test(input, regex, options, { glob, posix });
|
|
2949
2929
|
const result = { glob, state, regex, posix, input, output, match, isMatch };
|
|
2950
2930
|
|
|
2951
2931
|
if (typeof opts.onResult === 'function') {
|
|
@@ -2995,7 +2975,7 @@ const picomatch = (glob, options, returnState = false) => {
|
|
|
2995
2975
|
* @api public
|
|
2996
2976
|
*/
|
|
2997
2977
|
|
|
2998
|
-
picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
|
2978
|
+
picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
|
|
2999
2979
|
if (typeof input !== 'string') {
|
|
3000
2980
|
throw new TypeError('Expected input to be a string');
|
|
3001
2981
|
}
|
|
@@ -3016,7 +2996,7 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
|
|
3016
2996
|
|
|
3017
2997
|
if (match === false || opts.capture === true) {
|
|
3018
2998
|
if (opts.matchBase === true || opts.basename === true) {
|
|
3019
|
-
match = picomatch.matchBase(input, regex, options, posix);
|
|
2999
|
+
match = picomatch$1.matchBase(input, regex, options, posix);
|
|
3020
3000
|
} else {
|
|
3021
3001
|
match = regex.exec(output);
|
|
3022
3002
|
}
|
|
@@ -3039,8 +3019,8 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
|
|
3039
3019
|
* @api public
|
|
3040
3020
|
*/
|
|
3041
3021
|
|
|
3042
|
-
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
3043
|
-
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
3022
|
+
picomatch$1.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
3023
|
+
const regex = glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options);
|
|
3044
3024
|
return regex.test(path$1.basename(input));
|
|
3045
3025
|
};
|
|
3046
3026
|
|
|
@@ -3061,7 +3041,7 @@ picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) =
|
|
|
3061
3041
|
* @api public
|
|
3062
3042
|
*/
|
|
3063
3043
|
|
|
3064
|
-
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
3044
|
+
picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str);
|
|
3065
3045
|
|
|
3066
3046
|
/**
|
|
3067
3047
|
* Parse a glob pattern to create the source string for a regular
|
|
@@ -3077,8 +3057,8 @@ picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str
|
|
|
3077
3057
|
* @api public
|
|
3078
3058
|
*/
|
|
3079
3059
|
|
|
3080
|
-
picomatch.parse = (pattern, options) => {
|
|
3081
|
-
if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
|
|
3060
|
+
picomatch$1.parse = (pattern, options) => {
|
|
3061
|
+
if (Array.isArray(pattern)) return pattern.map(p => picomatch$1.parse(p, options));
|
|
3082
3062
|
return parse$1(pattern, { ...options, fastpaths: false });
|
|
3083
3063
|
};
|
|
3084
3064
|
|
|
@@ -3109,7 +3089,7 @@ picomatch.parse = (pattern, options) => {
|
|
|
3109
3089
|
* @api public
|
|
3110
3090
|
*/
|
|
3111
3091
|
|
|
3112
|
-
picomatch.scan = (input, options) => scan(input, options);
|
|
3092
|
+
picomatch$1.scan = (input, options) => scan(input, options);
|
|
3113
3093
|
|
|
3114
3094
|
/**
|
|
3115
3095
|
* Compile a regular expression from the `state` object returned by the
|
|
@@ -3123,7 +3103,7 @@ picomatch.scan = (input, options) => scan(input, options);
|
|
|
3123
3103
|
* @api public
|
|
3124
3104
|
*/
|
|
3125
3105
|
|
|
3126
|
-
picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
3106
|
+
picomatch$1.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
3127
3107
|
if (returnOutput === true) {
|
|
3128
3108
|
return state.output;
|
|
3129
3109
|
}
|
|
@@ -3137,7 +3117,7 @@ picomatch.compileRe = (state, options, returnOutput = false, returnState = false
|
|
|
3137
3117
|
source = `^(?!${source}).*$`;
|
|
3138
3118
|
}
|
|
3139
3119
|
|
|
3140
|
-
const regex = picomatch.toRegex(source, options);
|
|
3120
|
+
const regex = picomatch$1.toRegex(source, options);
|
|
3141
3121
|
if (returnState === true) {
|
|
3142
3122
|
regex.state = state;
|
|
3143
3123
|
}
|
|
@@ -3164,7 +3144,7 @@ picomatch.compileRe = (state, options, returnOutput = false, returnState = false
|
|
|
3164
3144
|
* @api public
|
|
3165
3145
|
*/
|
|
3166
3146
|
|
|
3167
|
-
picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
3147
|
+
picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
3168
3148
|
if (!input || typeof input !== 'string') {
|
|
3169
3149
|
throw new TypeError('Expected a non-empty string');
|
|
3170
3150
|
}
|
|
@@ -3179,7 +3159,7 @@ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = fal
|
|
|
3179
3159
|
parsed = parse$1(input, options);
|
|
3180
3160
|
}
|
|
3181
3161
|
|
|
3182
|
-
return picomatch.compileRe(parsed, options, returnOutput, returnState);
|
|
3162
|
+
return picomatch$1.compileRe(parsed, options, returnOutput, returnState);
|
|
3183
3163
|
};
|
|
3184
3164
|
|
|
3185
3165
|
/**
|
|
@@ -3199,7 +3179,7 @@ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = fal
|
|
|
3199
3179
|
* @api public
|
|
3200
3180
|
*/
|
|
3201
3181
|
|
|
3202
|
-
picomatch.toRegex = (source, options) => {
|
|
3182
|
+
picomatch$1.toRegex = (source, options) => {
|
|
3203
3183
|
try {
|
|
3204
3184
|
const opts = options || {};
|
|
3205
3185
|
return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
|
|
@@ -3214,20 +3194,17 @@ picomatch.toRegex = (source, options) => {
|
|
|
3214
3194
|
* @return {Object}
|
|
3215
3195
|
*/
|
|
3216
3196
|
|
|
3217
|
-
picomatch.constants = constants;
|
|
3197
|
+
picomatch$1.constants = constants;
|
|
3218
3198
|
|
|
3219
3199
|
/**
|
|
3220
3200
|
* Expose "picomatch"
|
|
3221
3201
|
*/
|
|
3222
3202
|
|
|
3223
|
-
var picomatch_1 = picomatch;
|
|
3203
|
+
var picomatch_1 = picomatch$1;
|
|
3224
3204
|
|
|
3225
|
-
|
|
3205
|
+
var picomatch = picomatch_1;
|
|
3226
3206
|
|
|
3227
|
-
|
|
3228
|
-
} (picomatch$1));
|
|
3229
|
-
|
|
3230
|
-
var pm = /*@__PURE__*/getDefaultExportFromCjs(picomatchExports);
|
|
3207
|
+
var pm = /*@__PURE__*/getDefaultExportFromCjs(picomatch);
|
|
3231
3208
|
|
|
3232
3209
|
// Helper since Typescript can't detect readonly arrays with Array.isArray
|
|
3233
3210
|
function isArray(arg) {
|
|
@@ -3739,6 +3716,8 @@ function stattag (stat) {
|
|
|
3739
3716
|
return '"' + size + '-' + mtime + '"'
|
|
3740
3717
|
}
|
|
3741
3718
|
|
|
3719
|
+
var getEtag = /*@__PURE__*/getDefaultExportFromCjs(etag_1);
|
|
3720
|
+
|
|
3742
3721
|
const debug = createDebugger('vite:sourcemap', {
|
|
3743
3722
|
onlyWhenFocused: true,
|
|
3744
3723
|
});
|
|
@@ -3768,7 +3747,7 @@ const alias = {
|
|
|
3768
3747
|
json: 'application/json',
|
|
3769
3748
|
};
|
|
3770
3749
|
function send(req, res, content, type, options) {
|
|
3771
|
-
const { etag =
|
|
3750
|
+
const { etag = getEtag(content, { weak: true }), cacheControl = 'no-cache', headers, map, } = options;
|
|
3772
3751
|
if (res.writableEnded) {
|
|
3773
3752
|
return;
|
|
3774
3753
|
}
|
|
@@ -3828,11 +3807,11 @@ function createLogger(level = 'info', options = {}) {
|
|
|
3828
3807
|
const format = () => {
|
|
3829
3808
|
if (options.timestamp) {
|
|
3830
3809
|
const tag = type === 'info'
|
|
3831
|
-
?
|
|
3810
|
+
? colors.cyan(colors.bold(prefix))
|
|
3832
3811
|
: type === 'warn'
|
|
3833
|
-
?
|
|
3834
|
-
:
|
|
3835
|
-
return `${
|
|
3812
|
+
? colors.yellow(colors.bold(prefix))
|
|
3813
|
+
: colors.red(colors.bold(prefix));
|
|
3814
|
+
return `${colors.dim(new Date().toLocaleTimeString())} ${tag} ${msg}`;
|
|
3836
3815
|
}
|
|
3837
3816
|
else {
|
|
3838
3817
|
return msg;
|
|
@@ -3845,7 +3824,7 @@ function createLogger(level = 'info', options = {}) {
|
|
|
3845
3824
|
if (type === lastType && msg === lastMsg) {
|
|
3846
3825
|
sameCount++;
|
|
3847
3826
|
clear();
|
|
3848
|
-
console[method](format(),
|
|
3827
|
+
console[method](format(), colors.yellow(`(x${sameCount + 1})`));
|
|
3849
3828
|
}
|
|
3850
3829
|
else {
|
|
3851
3830
|
sameCount = 0;
|
|
@@ -3968,11 +3947,7 @@ function isFileServingAllowed(url, server) {
|
|
|
3968
3947
|
return false;
|
|
3969
3948
|
}
|
|
3970
3949
|
|
|
3971
|
-
var
|
|
3972
|
-
var main$1 = {
|
|
3973
|
-
get exports(){ return mainExports; },
|
|
3974
|
-
set exports(v){ mainExports = v; },
|
|
3975
|
-
};
|
|
3950
|
+
var main$1 = {exports: {}};
|
|
3976
3951
|
|
|
3977
3952
|
var name = "dotenv";
|
|
3978
3953
|
var version$1 = "16.0.3";
|
|
@@ -4157,8 +4132,8 @@ const DotenvModule = {
|
|
|
4157
4132
|
parse
|
|
4158
4133
|
};
|
|
4159
4134
|
|
|
4160
|
-
|
|
4161
|
-
var parse_1 =
|
|
4135
|
+
main$1.exports.config = DotenvModule.config;
|
|
4136
|
+
var parse_1 = main$1.exports.parse = DotenvModule.parse;
|
|
4162
4137
|
main$1.exports = DotenvModule;
|
|
4163
4138
|
|
|
4164
4139
|
function _interpolate (envValue, environment, config) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -67,26 +67,26 @@
|
|
|
67
67
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"esbuild": "^0.17.5",
|
|
70
|
-
"postcss": "^8.4.
|
|
70
|
+
"postcss": "^8.4.23",
|
|
71
71
|
"rollup": "^3.21.0"
|
|
72
72
|
},
|
|
73
73
|
"optionalDependencies": {
|
|
74
74
|
"fsevents": "~2.3.2"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@ampproject/remapping": "^2.2.
|
|
78
|
-
"@babel/parser": "^7.21.
|
|
79
|
-
"@babel/types": "^7.21.
|
|
80
|
-
"@jridgewell/trace-mapping": "^0.3.
|
|
81
|
-
"@rollup/plugin-alias": "^4.0.
|
|
82
|
-
"@rollup/plugin-commonjs": "^24.0
|
|
77
|
+
"@ampproject/remapping": "^2.2.1",
|
|
78
|
+
"@babel/parser": "^7.21.4",
|
|
79
|
+
"@babel/types": "^7.21.4",
|
|
80
|
+
"@jridgewell/trace-mapping": "^0.3.18",
|
|
81
|
+
"@rollup/plugin-alias": "^4.0.4",
|
|
82
|
+
"@rollup/plugin-commonjs": "^24.1.0",
|
|
83
83
|
"@rollup/plugin-dynamic-import-vars": "^2.0.3",
|
|
84
84
|
"@rollup/plugin-json": "^6.0.0",
|
|
85
|
-
"@rollup/plugin-node-resolve": "15.0.
|
|
86
|
-
"@rollup/plugin-typescript": "^11.
|
|
85
|
+
"@rollup/plugin-node-resolve": "15.0.2",
|
|
86
|
+
"@rollup/plugin-typescript": "^11.1.0",
|
|
87
87
|
"@rollup/pluginutils": "^5.0.2",
|
|
88
88
|
"@types/pnpapi": "^0.0.2",
|
|
89
|
-
"@types/escape-html": "^1.0.
|
|
89
|
+
"@types/escape-html": "^1.0.2",
|
|
90
90
|
"acorn": "^8.8.2",
|
|
91
91
|
"acorn-walk": "^8.2.0",
|
|
92
92
|
"cac": "^6.7.14",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"dep-types": "link:./src/types",
|
|
101
101
|
"dotenv": "^16.0.3",
|
|
102
102
|
"dotenv-expand": "^9.0.0",
|
|
103
|
-
"es-module-lexer": "^1.2.
|
|
103
|
+
"es-module-lexer": "^1.2.1",
|
|
104
104
|
"escape-html": "^1.0.3",
|
|
105
105
|
"estree-walker": "^3.0.3",
|
|
106
106
|
"etag": "^1.8.1",
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"postcss-import": "^15.1.0",
|
|
122
122
|
"postcss-load-config": "^4.0.1",
|
|
123
123
|
"postcss-modules": "^6.0.0",
|
|
124
|
-
"resolve.exports": "^2.0.
|
|
124
|
+
"resolve.exports": "^2.0.2",
|
|
125
125
|
"rollup-plugin-license": "^3.0.1",
|
|
126
126
|
"sirv": "^2.0.2",
|
|
127
127
|
"source-map-js": "^1.0.2",
|