vite 3.2.5 → 3.2.7
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/node/chunks/{dep-5605cfa4.js → dep-2faf2534.js} +81 -81
- package/dist/node/chunks/{dep-4d50f047.js → dep-fd803d77.js} +1 -1
- package/dist/node/cli.js +5 -5
- package/dist/node/constants.js +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node-cjs/publicUtils.cjs +1 -1
- package/package.json +3 -1
|
@@ -36599,6 +36599,83 @@ function sirv (dir, opts={}) {
|
|
|
36599
36599
|
};
|
|
36600
36600
|
}
|
|
36601
36601
|
|
|
36602
|
+
/*!
|
|
36603
|
+
* escape-html
|
|
36604
|
+
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
36605
|
+
* Copyright(c) 2015 Andreas Lubbe
|
|
36606
|
+
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
36607
|
+
* MIT Licensed
|
|
36608
|
+
*/
|
|
36609
|
+
|
|
36610
|
+
/**
|
|
36611
|
+
* Module variables.
|
|
36612
|
+
* @private
|
|
36613
|
+
*/
|
|
36614
|
+
|
|
36615
|
+
var matchHtmlRegExp = /["'&<>]/;
|
|
36616
|
+
|
|
36617
|
+
/**
|
|
36618
|
+
* Module exports.
|
|
36619
|
+
* @public
|
|
36620
|
+
*/
|
|
36621
|
+
|
|
36622
|
+
var escapeHtml_1 = escapeHtml$1;
|
|
36623
|
+
|
|
36624
|
+
/**
|
|
36625
|
+
* Escape special characters in the given string of html.
|
|
36626
|
+
*
|
|
36627
|
+
* @param {string} string The string to escape for inserting into HTML
|
|
36628
|
+
* @return {string}
|
|
36629
|
+
* @public
|
|
36630
|
+
*/
|
|
36631
|
+
|
|
36632
|
+
function escapeHtml$1(string) {
|
|
36633
|
+
var str = '' + string;
|
|
36634
|
+
var match = matchHtmlRegExp.exec(str);
|
|
36635
|
+
|
|
36636
|
+
if (!match) {
|
|
36637
|
+
return str;
|
|
36638
|
+
}
|
|
36639
|
+
|
|
36640
|
+
var escape;
|
|
36641
|
+
var html = '';
|
|
36642
|
+
var index = 0;
|
|
36643
|
+
var lastIndex = 0;
|
|
36644
|
+
|
|
36645
|
+
for (index = match.index; index < str.length; index++) {
|
|
36646
|
+
switch (str.charCodeAt(index)) {
|
|
36647
|
+
case 34: // "
|
|
36648
|
+
escape = '"';
|
|
36649
|
+
break;
|
|
36650
|
+
case 38: // &
|
|
36651
|
+
escape = '&';
|
|
36652
|
+
break;
|
|
36653
|
+
case 39: // '
|
|
36654
|
+
escape = ''';
|
|
36655
|
+
break;
|
|
36656
|
+
case 60: // <
|
|
36657
|
+
escape = '<';
|
|
36658
|
+
break;
|
|
36659
|
+
case 62: // >
|
|
36660
|
+
escape = '>';
|
|
36661
|
+
break;
|
|
36662
|
+
default:
|
|
36663
|
+
continue;
|
|
36664
|
+
}
|
|
36665
|
+
|
|
36666
|
+
if (lastIndex !== index) {
|
|
36667
|
+
html += str.substring(lastIndex, index);
|
|
36668
|
+
}
|
|
36669
|
+
|
|
36670
|
+
lastIndex = index + 1;
|
|
36671
|
+
html += escape;
|
|
36672
|
+
}
|
|
36673
|
+
|
|
36674
|
+
return lastIndex !== index
|
|
36675
|
+
? html + str.substring(lastIndex, index)
|
|
36676
|
+
: html;
|
|
36677
|
+
}
|
|
36678
|
+
|
|
36602
36679
|
const sirvOptions = (headers) => {
|
|
36603
36680
|
return {
|
|
36604
36681
|
dev: true,
|
|
@@ -36646,7 +36723,7 @@ function serveStaticMiddleware(dir, server) {
|
|
|
36646
36723
|
isInternalRequest(req.url)) {
|
|
36647
36724
|
return next();
|
|
36648
36725
|
}
|
|
36649
|
-
const url = new URL(req.url, 'http://example.com');
|
|
36726
|
+
const url = new URL(req.url.replace(/^\/+/, '/'), 'http://example.com');
|
|
36650
36727
|
const pathname = decodeURIComponent(url.pathname);
|
|
36651
36728
|
// apply aliases to static requests as well
|
|
36652
36729
|
let redirectedPathname;
|
|
@@ -36684,7 +36761,7 @@ function serveRawFsMiddleware(server) {
|
|
|
36684
36761
|
const serveFromRoot = sirv('/', sirvOptions(server.config.server.headers));
|
|
36685
36762
|
// Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...`
|
|
36686
36763
|
return function viteServeRawFsMiddleware(req, res, next) {
|
|
36687
|
-
const url = new URL(req.url, 'http://example.com');
|
|
36764
|
+
const url = new URL(req.url.replace(/^\/+/, '/'), 'http://example.com');
|
|
36688
36765
|
// In some cases (e.g. linked monorepos) files outside of root will
|
|
36689
36766
|
// reference assets that are also out of served root. In such cases
|
|
36690
36767
|
// the paths are rewritten to `/@fs/` prefixed paths and must be served by
|
|
@@ -36748,7 +36825,7 @@ function renderRestrictedErrorHTML(msg) {
|
|
|
36748
36825
|
return html `
|
|
36749
36826
|
<body>
|
|
36750
36827
|
<h1>403 Restricted</h1>
|
|
36751
|
-
<p>${msg.replace(/\n/g, '<br/>')}</p>
|
|
36828
|
+
<p>${escapeHtml_1(msg).replace(/\n/g, '<br/>')}</p>
|
|
36752
36829
|
<style>
|
|
36753
36830
|
body {
|
|
36754
36831
|
padding: 1em 2em;
|
|
@@ -44092,7 +44169,7 @@ async function compileCSS(id, code, config, urlReplacer) {
|
|
|
44092
44169
|
}));
|
|
44093
44170
|
}
|
|
44094
44171
|
if (isModule) {
|
|
44095
|
-
postcssPlugins.unshift((await import('./dep-
|
|
44172
|
+
postcssPlugins.unshift((await import('./dep-fd803d77.js').then(function (n) { return n.i; })).default({
|
|
44096
44173
|
...modulesOptions,
|
|
44097
44174
|
// TODO: convert null to undefined (`null` should be removed from `CSSModulesOptions.localsConvention`)
|
|
44098
44175
|
localsConvention: modulesOptions?.localsConvention ?? undefined,
|
|
@@ -46971,83 +47048,6 @@ function encodeUrl$1 (url) {
|
|
|
46971
47048
|
.replace(ENCODE_CHARS_REGEXP, encodeURI)
|
|
46972
47049
|
}
|
|
46973
47050
|
|
|
46974
|
-
/*!
|
|
46975
|
-
* escape-html
|
|
46976
|
-
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
46977
|
-
* Copyright(c) 2015 Andreas Lubbe
|
|
46978
|
-
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
46979
|
-
* MIT Licensed
|
|
46980
|
-
*/
|
|
46981
|
-
|
|
46982
|
-
/**
|
|
46983
|
-
* Module variables.
|
|
46984
|
-
* @private
|
|
46985
|
-
*/
|
|
46986
|
-
|
|
46987
|
-
var matchHtmlRegExp = /["'&<>]/;
|
|
46988
|
-
|
|
46989
|
-
/**
|
|
46990
|
-
* Module exports.
|
|
46991
|
-
* @public
|
|
46992
|
-
*/
|
|
46993
|
-
|
|
46994
|
-
var escapeHtml_1 = escapeHtml$1;
|
|
46995
|
-
|
|
46996
|
-
/**
|
|
46997
|
-
* Escape special characters in the given string of html.
|
|
46998
|
-
*
|
|
46999
|
-
* @param {string} string The string to escape for inserting into HTML
|
|
47000
|
-
* @return {string}
|
|
47001
|
-
* @public
|
|
47002
|
-
*/
|
|
47003
|
-
|
|
47004
|
-
function escapeHtml$1(string) {
|
|
47005
|
-
var str = '' + string;
|
|
47006
|
-
var match = matchHtmlRegExp.exec(str);
|
|
47007
|
-
|
|
47008
|
-
if (!match) {
|
|
47009
|
-
return str;
|
|
47010
|
-
}
|
|
47011
|
-
|
|
47012
|
-
var escape;
|
|
47013
|
-
var html = '';
|
|
47014
|
-
var index = 0;
|
|
47015
|
-
var lastIndex = 0;
|
|
47016
|
-
|
|
47017
|
-
for (index = match.index; index < str.length; index++) {
|
|
47018
|
-
switch (str.charCodeAt(index)) {
|
|
47019
|
-
case 34: // "
|
|
47020
|
-
escape = '"';
|
|
47021
|
-
break;
|
|
47022
|
-
case 38: // &
|
|
47023
|
-
escape = '&';
|
|
47024
|
-
break;
|
|
47025
|
-
case 39: // '
|
|
47026
|
-
escape = ''';
|
|
47027
|
-
break;
|
|
47028
|
-
case 60: // <
|
|
47029
|
-
escape = '<';
|
|
47030
|
-
break;
|
|
47031
|
-
case 62: // >
|
|
47032
|
-
escape = '>';
|
|
47033
|
-
break;
|
|
47034
|
-
default:
|
|
47035
|
-
continue;
|
|
47036
|
-
}
|
|
47037
|
-
|
|
47038
|
-
if (lastIndex !== index) {
|
|
47039
|
-
html += str.substring(lastIndex, index);
|
|
47040
|
-
}
|
|
47041
|
-
|
|
47042
|
-
lastIndex = index + 1;
|
|
47043
|
-
html += escape;
|
|
47044
|
-
}
|
|
47045
|
-
|
|
47046
|
-
return lastIndex !== index
|
|
47047
|
-
? html + str.substring(lastIndex, index)
|
|
47048
|
-
: html;
|
|
47049
|
-
}
|
|
47050
|
-
|
|
47051
47051
|
var onFinished$2 = {exports: {}};
|
|
47052
47052
|
|
|
47053
47053
|
/*!
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import require$$0__default from 'fs';
|
|
2
2
|
import require$$0 from 'postcss';
|
|
3
|
-
import { A as commonjsGlobal } from './dep-
|
|
3
|
+
import { A as commonjsGlobal } from './dep-2faf2534.js';
|
|
4
4
|
import require$$0$1 from 'path';
|
|
5
5
|
import require$$5 from 'crypto';
|
|
6
6
|
import require$$0$2 from 'util';
|
package/dist/node/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { performance } from 'node:perf_hooks';
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
|
-
import { z as picocolors, v as createLogger, g as resolveConfig } from './chunks/dep-
|
|
3
|
+
import { z as picocolors, v as createLogger, g as resolveConfig } from './chunks/dep-2faf2534.js';
|
|
4
4
|
import { VERSION } from './constants.js';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:path';
|
|
@@ -702,7 +702,7 @@ cli
|
|
|
702
702
|
filterDuplicateOptions(options);
|
|
703
703
|
// output structure is preserved even after bundling so require()
|
|
704
704
|
// is ok here
|
|
705
|
-
const { createServer } = await import('./chunks/dep-
|
|
705
|
+
const { createServer } = await import('./chunks/dep-2faf2534.js').then(function (n) { return n.D; });
|
|
706
706
|
try {
|
|
707
707
|
const server = await createServer({
|
|
708
708
|
root,
|
|
@@ -750,7 +750,7 @@ cli
|
|
|
750
750
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
751
751
|
.action(async (root, options) => {
|
|
752
752
|
filterDuplicateOptions(options);
|
|
753
|
-
const { build } = await import('./chunks/dep-
|
|
753
|
+
const { build } = await import('./chunks/dep-2faf2534.js').then(function (n) { return n.C; });
|
|
754
754
|
const buildOptions = cleanOptions(options);
|
|
755
755
|
try {
|
|
756
756
|
await build({
|
|
@@ -775,7 +775,7 @@ cli
|
|
|
775
775
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
776
776
|
.action(async (root, options) => {
|
|
777
777
|
filterDuplicateOptions(options);
|
|
778
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
778
|
+
const { optimizeDeps } = await import('./chunks/dep-2faf2534.js').then(function (n) { return n.B; });
|
|
779
779
|
try {
|
|
780
780
|
const config = await resolveConfig({
|
|
781
781
|
root,
|
|
@@ -800,7 +800,7 @@ cli
|
|
|
800
800
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
801
801
|
.action(async (root, options) => {
|
|
802
802
|
filterDuplicateOptions(options);
|
|
803
|
-
const { preview } = await import('./chunks/dep-
|
|
803
|
+
const { preview } = await import('./chunks/dep-2faf2534.js').then(function (n) { return n.E; });
|
|
804
804
|
try {
|
|
805
805
|
const server = await preview({
|
|
806
806
|
root,
|
package/dist/node/constants.js
CHANGED
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as build, q as createFilter, v as createLogger, c as createServer, e as defineConfig, f as formatPostcssSourceMap, i as getDepOptimizationConfig, j as isDepsOptimizerEnabled, l as loadConfigFromFile, x as loadEnv, k as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, h as resolveBaseUrl, g as resolveConfig, y as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
|
1
|
+
export { b as build, q as createFilter, v as createLogger, c as createServer, e as defineConfig, f as formatPostcssSourceMap, i as getDepOptimizationConfig, j as isDepsOptimizerEnabled, l as loadConfigFromFile, x as loadEnv, k as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, h as resolveBaseUrl, g as resolveConfig, y as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-2faf2534.js';
|
|
2
2
|
export { VERSION as version } from './constants.js';
|
|
3
3
|
export { version as esbuildVersion } from 'esbuild';
|
|
4
4
|
export { VERSION as rollupVersion } from 'rollup';
|
|
@@ -31,7 +31,7 @@ var require$$1__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
|
|
|
31
31
|
var readline__default = /*#__PURE__*/_interopDefaultLegacy(readline);
|
|
32
32
|
var require$$2__default = /*#__PURE__*/_interopDefaultLegacy(require$$2);
|
|
33
33
|
|
|
34
|
-
var version = "3.2.
|
|
34
|
+
var version = "3.2.7";
|
|
35
35
|
|
|
36
36
|
const VERSION = version;
|
|
37
37
|
const VITE_PACKAGE_DIR = path$3.resolve(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"@rollup/plugin-node-resolve": "14.1.0",
|
|
79
79
|
"@rollup/plugin-typescript": "^8.5.0",
|
|
80
80
|
"@rollup/pluginutils": "^4.2.1",
|
|
81
|
+
"@types/escape-html": "^1.0.0",
|
|
81
82
|
"acorn": "^8.8.1",
|
|
82
83
|
"acorn-walk": "^8.2.0",
|
|
83
84
|
"cac": "^6.7.14",
|
|
@@ -92,6 +93,7 @@
|
|
|
92
93
|
"dotenv": "^14.3.2",
|
|
93
94
|
"dotenv-expand": "^5.1.0",
|
|
94
95
|
"es-module-lexer": "^1.1.0",
|
|
96
|
+
"escape-html": "^1.0.3",
|
|
95
97
|
"estree-walker": "^3.0.1",
|
|
96
98
|
"etag": "^1.8.1",
|
|
97
99
|
"fast-glob": "^3.2.12",
|