vite 5.1.0-beta.6 → 5.1.0
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-4a4aOlj8.js → dep-BWGc69YA.js} +1 -1
- package/dist/node/chunks/{dep-0ozvs92U.js → dep-QywIN17l.js} +1 -1
- package/dist/node/chunks/{dep-ZX7UfftI.js → dep-nGG-_oRu.js} +184 -64
- package/dist/node/cli.js +5 -7
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.js +2 -2
- package/dist/node-cjs/publicUtils.cjs +91 -23
- package/package.json +8 -8
@@ -1,4 +1,4 @@
|
|
1
|
-
import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-
|
1
|
+
import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-nGG-_oRu.js';
|
2
2
|
import require$$0__default from 'fs';
|
3
3
|
import require$$0 from 'postcss';
|
4
4
|
import require$$0$1 from 'path';
|
@@ -6421,6 +6421,16 @@ class Chunk {
|
|
6421
6421
|
this.intro = content + this.intro;
|
6422
6422
|
}
|
6423
6423
|
|
6424
|
+
reset() {
|
6425
|
+
this.intro = '';
|
6426
|
+
this.outro = '';
|
6427
|
+
if (this.edited) {
|
6428
|
+
this.content = this.original;
|
6429
|
+
this.storeName = false;
|
6430
|
+
this.edited = false;
|
6431
|
+
}
|
6432
|
+
}
|
6433
|
+
|
6424
6434
|
split(index) {
|
6425
6435
|
const sliceIndex = index - this.start;
|
6426
6436
|
|
@@ -6511,8 +6521,8 @@ class Chunk {
|
|
6511
6521
|
}
|
6512
6522
|
|
6513
6523
|
function getBtoa() {
|
6514
|
-
if (typeof
|
6515
|
-
return (str) =>
|
6524
|
+
if (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') {
|
6525
|
+
return (str) => globalThis.btoa(unescape(encodeURIComponent(str)));
|
6516
6526
|
} else if (typeof Buffer === 'function') {
|
6517
6527
|
return (str) => Buffer.from(str, 'utf-8').toString('base64');
|
6518
6528
|
} else {
|
@@ -7189,6 +7199,28 @@ class MagicString {
|
|
7189
7199
|
return this;
|
7190
7200
|
}
|
7191
7201
|
|
7202
|
+
reset(start, end) {
|
7203
|
+
while (start < 0) start += this.original.length;
|
7204
|
+
while (end < 0) end += this.original.length;
|
7205
|
+
|
7206
|
+
if (start === end) return this;
|
7207
|
+
|
7208
|
+
if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');
|
7209
|
+
if (start > end) throw new Error('end must be greater than start');
|
7210
|
+
|
7211
|
+
this._split(start);
|
7212
|
+
this._split(end);
|
7213
|
+
|
7214
|
+
let chunk = this.byStart[start];
|
7215
|
+
|
7216
|
+
while (chunk) {
|
7217
|
+
chunk.reset();
|
7218
|
+
|
7219
|
+
chunk = end > chunk.end ? this.byStart[chunk.end] : null;
|
7220
|
+
}
|
7221
|
+
return this;
|
7222
|
+
}
|
7223
|
+
|
7192
7224
|
lastChar() {
|
7193
7225
|
if (this.outro.length) return this.outro[this.outro.length - 1];
|
7194
7226
|
let chunk = this.lastChunk;
|
@@ -13973,19 +14005,7 @@ async function parse$f(filename, options) {
|
|
13973
14005
|
/** @type {import('./cache.js').TSConfckCache} */
|
13974
14006
|
const cache = options?.cache;
|
13975
14007
|
if (cache?.hasParseResult(filename)) {
|
13976
|
-
|
13977
|
-
if (
|
13978
|
-
(result.tsconfig.extends && !result.extended) ||
|
13979
|
-
(result.tsconfig.references && !result.referenced)
|
13980
|
-
) {
|
13981
|
-
const promise = Promise.all([
|
13982
|
-
parseExtends(result, cache),
|
13983
|
-
parseReferences(result, options)
|
13984
|
-
]).then(() => result);
|
13985
|
-
cache.setParseResult(filename, promise);
|
13986
|
-
await promise;
|
13987
|
-
}
|
13988
|
-
return result;
|
14008
|
+
return getParsedDeep(filename, cache, options);
|
13989
14009
|
}
|
13990
14010
|
const {
|
13991
14011
|
resolve,
|
@@ -14003,7 +14023,7 @@ async function parse$f(filename, options) {
|
|
14003
14023
|
}
|
14004
14024
|
let result;
|
14005
14025
|
if (filename !== tsconfigFile && cache?.hasParseResult(tsconfigFile)) {
|
14006
|
-
result = await
|
14026
|
+
result = await getParsedDeep(tsconfigFile, cache, options);
|
14007
14027
|
} else {
|
14008
14028
|
result = await parseFile$1(tsconfigFile, cache, filename === tsconfigFile);
|
14009
14029
|
await Promise.all([parseExtends(result, cache), parseReferences(result, options)]);
|
@@ -14015,6 +14035,29 @@ async function parse$f(filename, options) {
|
|
14015
14035
|
return promise;
|
14016
14036
|
}
|
14017
14037
|
|
14038
|
+
/**
|
14039
|
+
* ensure extends and references are parsed
|
14040
|
+
*
|
14041
|
+
* @param {string} filename - cached file
|
14042
|
+
* @param {import('./cache.js').TSConfckCache} cache - cache
|
14043
|
+
* @param {import('./public.d.ts').TSConfckParseOptions} options - options
|
14044
|
+
*/
|
14045
|
+
async function getParsedDeep(filename, cache, options) {
|
14046
|
+
const result = await cache.getParseResult(filename);
|
14047
|
+
if (
|
14048
|
+
(result.tsconfig.extends && !result.extended) ||
|
14049
|
+
(result.tsconfig.references && !result.referenced)
|
14050
|
+
) {
|
14051
|
+
const promise = Promise.all([
|
14052
|
+
parseExtends(result, cache),
|
14053
|
+
parseReferences(result, options)
|
14054
|
+
]).then(() => result);
|
14055
|
+
cache.setParseResult(filename, promise);
|
14056
|
+
return promise;
|
14057
|
+
}
|
14058
|
+
return result;
|
14059
|
+
}
|
14060
|
+
|
14018
14061
|
/**
|
14019
14062
|
*
|
14020
14063
|
* @param {string} tsconfigFile - path to tsconfig file
|
@@ -29558,7 +29601,7 @@ function stripLiteralDetailed(code, options) {
|
|
29558
29601
|
var main$1 = {exports: {}};
|
29559
29602
|
|
29560
29603
|
var name = "dotenv";
|
29561
|
-
var version$2 = "16.
|
29604
|
+
var version$2 = "16.4.1";
|
29562
29605
|
var description = "Loads environment variables from .env file";
|
29563
29606
|
var main = "lib/main.js";
|
29564
29607
|
var types$2 = "lib/main.d.ts";
|
@@ -29692,7 +29735,9 @@ function _parseVault (options) {
|
|
29692
29735
|
// Parse .env.vault
|
29693
29736
|
const result = DotenvModule.configDotenv({ path: vaultPath });
|
29694
29737
|
if (!result.parsed) {
|
29695
|
-
|
29738
|
+
const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
|
29739
|
+
err.code = 'MISSING_DATA';
|
29740
|
+
throw err
|
29696
29741
|
}
|
29697
29742
|
|
29698
29743
|
// handle scenario for comma separated keys - for use with key rotation
|
@@ -29760,7 +29805,9 @@ function _instructions (result, dotenvKey) {
|
|
29760
29805
|
uri = new URL(dotenvKey);
|
29761
29806
|
} catch (error) {
|
29762
29807
|
if (error.code === 'ERR_INVALID_URL') {
|
29763
|
-
|
29808
|
+
const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development');
|
29809
|
+
err.code = 'INVALID_DOTENV_KEY';
|
29810
|
+
throw err
|
29764
29811
|
}
|
29765
29812
|
|
29766
29813
|
throw error
|
@@ -29769,34 +29816,53 @@ function _instructions (result, dotenvKey) {
|
|
29769
29816
|
// Get decrypt key
|
29770
29817
|
const key = uri.password;
|
29771
29818
|
if (!key) {
|
29772
|
-
|
29819
|
+
const err = new Error('INVALID_DOTENV_KEY: Missing key part');
|
29820
|
+
err.code = 'INVALID_DOTENV_KEY';
|
29821
|
+
throw err
|
29773
29822
|
}
|
29774
29823
|
|
29775
29824
|
// Get environment
|
29776
29825
|
const environment = uri.searchParams.get('environment');
|
29777
29826
|
if (!environment) {
|
29778
|
-
|
29827
|
+
const err = new Error('INVALID_DOTENV_KEY: Missing environment part');
|
29828
|
+
err.code = 'INVALID_DOTENV_KEY';
|
29829
|
+
throw err
|
29779
29830
|
}
|
29780
29831
|
|
29781
29832
|
// Get ciphertext payload
|
29782
29833
|
const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
|
29783
29834
|
const ciphertext = result.parsed[environmentKey]; // DOTENV_VAULT_PRODUCTION
|
29784
29835
|
if (!ciphertext) {
|
29785
|
-
|
29836
|
+
const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
|
29837
|
+
err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT';
|
29838
|
+
throw err
|
29786
29839
|
}
|
29787
29840
|
|
29788
29841
|
return { ciphertext, key }
|
29789
29842
|
}
|
29790
29843
|
|
29791
29844
|
function _vaultPath (options) {
|
29792
|
-
let
|
29845
|
+
let possibleVaultPath = null;
|
29793
29846
|
|
29794
29847
|
if (options && options.path && options.path.length > 0) {
|
29795
|
-
|
29848
|
+
if (Array.isArray(options.path)) {
|
29849
|
+
for (const filepath of options.path) {
|
29850
|
+
if (fs$9.existsSync(filepath)) {
|
29851
|
+
possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`;
|
29852
|
+
}
|
29853
|
+
}
|
29854
|
+
} else {
|
29855
|
+
possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`;
|
29856
|
+
}
|
29857
|
+
} else {
|
29858
|
+
possibleVaultPath = path$9.resolve(process.cwd(), '.env.vault');
|
29859
|
+
}
|
29860
|
+
|
29861
|
+
if (fs$9.existsSync(possibleVaultPath)) {
|
29862
|
+
return possibleVaultPath
|
29796
29863
|
}
|
29797
29864
|
|
29798
|
-
|
29799
|
-
return dotenvPath.endsWith('.vault') ? dotenvPath : `${dotenvPath}.vault`
|
29865
|
+
return null
|
29800
29866
|
}
|
29801
29867
|
|
29802
29868
|
function _resolveHome (envPath) {
|
@@ -29825,7 +29891,18 @@ function configDotenv (options) {
|
|
29825
29891
|
|
29826
29892
|
if (options) {
|
29827
29893
|
if (options.path != null) {
|
29828
|
-
|
29894
|
+
let envPath = options.path;
|
29895
|
+
|
29896
|
+
if (Array.isArray(envPath)) {
|
29897
|
+
for (const filepath of options.path) {
|
29898
|
+
if (fs$9.existsSync(filepath)) {
|
29899
|
+
envPath = filepath;
|
29900
|
+
break
|
29901
|
+
}
|
29902
|
+
}
|
29903
|
+
}
|
29904
|
+
|
29905
|
+
dotenvPath = _resolveHome(envPath);
|
29829
29906
|
}
|
29830
29907
|
if (options.encoding != null) {
|
29831
29908
|
encoding = options.encoding;
|
@@ -29859,15 +29936,15 @@ function configDotenv (options) {
|
|
29859
29936
|
|
29860
29937
|
// Populates process.env from .env file
|
29861
29938
|
function config (options) {
|
29862
|
-
const vaultPath = _vaultPath(options);
|
29863
|
-
|
29864
29939
|
// fallback to original dotenv if DOTENV_KEY is not set
|
29865
29940
|
if (_dotenvKey(options).length === 0) {
|
29866
29941
|
return DotenvModule.configDotenv(options)
|
29867
29942
|
}
|
29868
29943
|
|
29944
|
+
const vaultPath = _vaultPath(options);
|
29945
|
+
|
29869
29946
|
// dotenvKey exists but .env.vault file does not exist
|
29870
|
-
if (!
|
29947
|
+
if (!vaultPath) {
|
29871
29948
|
_warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
|
29872
29949
|
|
29873
29950
|
return DotenvModule.configDotenv(options)
|
@@ -29894,14 +29971,14 @@ function decrypt (encrypted, keyStr) {
|
|
29894
29971
|
const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data';
|
29895
29972
|
|
29896
29973
|
if (isRange || invalidKeyLength) {
|
29897
|
-
const
|
29898
|
-
|
29974
|
+
const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)');
|
29975
|
+
err.code = 'INVALID_DOTENV_KEY';
|
29976
|
+
throw err
|
29899
29977
|
} else if (decryptionFailed) {
|
29900
|
-
const
|
29901
|
-
|
29978
|
+
const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY');
|
29979
|
+
err.code = 'DECRYPTION_FAILED';
|
29980
|
+
throw err
|
29902
29981
|
} else {
|
29903
|
-
console.error('Error: ', error.code);
|
29904
|
-
console.error('Error: ', error.message);
|
29905
29982
|
throw error
|
29906
29983
|
}
|
29907
29984
|
}
|
@@ -29913,7 +29990,9 @@ function populate (processEnv, parsed, options = {}) {
|
|
29913
29990
|
const override = Boolean(options && options.override);
|
29914
29991
|
|
29915
29992
|
if (typeof parsed !== 'object') {
|
29916
|
-
|
29993
|
+
const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate');
|
29994
|
+
err.code = 'OBJECT_REQUIRED';
|
29995
|
+
throw err
|
29917
29996
|
}
|
29918
29997
|
|
29919
29998
|
// Set process.env
|
@@ -32002,8 +32081,8 @@ function createCachedImport(imp) {
|
|
32002
32081
|
return cached;
|
32003
32082
|
};
|
32004
32083
|
}
|
32005
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
32006
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
32084
|
+
const importPostcssImport = createCachedImport(() => import('./dep-QywIN17l.js').then(function (n) { return n.i; }));
|
32085
|
+
const importPostcssModules = createCachedImport(() => import('./dep-BWGc69YA.js').then(function (n) { return n.i; }));
|
32007
32086
|
const importPostcss = createCachedImport(() => import('postcss'));
|
32008
32087
|
const preprocessorWorkerControllerCache = new WeakMap();
|
32009
32088
|
let alwaysFakeWorkerWorkerControllerCache;
|
@@ -38984,6 +39063,7 @@ function tokenizer(input, options) {
|
|
38984
39063
|
|
38985
39064
|
const HASH_RE = /#/g;
|
38986
39065
|
const AMPERSAND_RE = /&/g;
|
39066
|
+
const SLASH_RE = /\//g;
|
38987
39067
|
const EQUAL_RE = /=/g;
|
38988
39068
|
const PLUS_RE = /\+/g;
|
38989
39069
|
const ENC_CARET_RE = /%5e/gi;
|
@@ -38994,7 +39074,7 @@ function encode(text) {
|
|
38994
39074
|
return encodeURI("" + text).replace(ENC_PIPE_RE, "|");
|
38995
39075
|
}
|
38996
39076
|
function encodeQueryValue(input) {
|
38997
|
-
return encode(typeof input === "string" ? input : JSON.stringify(input)).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CARET_RE, "^");
|
39077
|
+
return encode(typeof input === "string" ? input : JSON.stringify(input)).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CARET_RE, "^").replace(SLASH_RE, "%2F");
|
38998
39078
|
}
|
38999
39079
|
function encodeQueryKey(text) {
|
39000
39080
|
return encodeQueryValue(text).replace(EQUAL_RE, "%3D");
|
@@ -43831,6 +43911,7 @@ var constants$1 = {};
|
|
43831
43911
|
exports.FSEVENT_MOVED = 'moved';
|
43832
43912
|
exports.FSEVENT_CLONED = 'cloned';
|
43833
43913
|
exports.FSEVENT_UNKNOWN = 'unknown';
|
43914
|
+
exports.FSEVENT_FLAG_MUST_SCAN_SUBDIRS = 1;
|
43834
43915
|
exports.FSEVENT_TYPE_FILE = 'file';
|
43835
43916
|
exports.FSEVENT_TYPE_DIRECTORY = 'directory';
|
43836
43917
|
exports.FSEVENT_TYPE_SYMLINK = 'symlink';
|
@@ -44554,6 +44635,7 @@ const {
|
|
44554
44635
|
FSEVENT_MOVED,
|
44555
44636
|
// FSEVENT_CLONED,
|
44556
44637
|
FSEVENT_UNKNOWN,
|
44638
|
+
FSEVENT_FLAG_MUST_SCAN_SUBDIRS,
|
44557
44639
|
FSEVENT_TYPE_FILE,
|
44558
44640
|
FSEVENT_TYPE_DIRECTORY,
|
44559
44641
|
FSEVENT_TYPE_SYMLINK,
|
@@ -44665,6 +44747,7 @@ function setFSEventsListener(path, realPath, listener, rawEmitter) {
|
|
44665
44747
|
rawEmitter,
|
44666
44748
|
watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {
|
44667
44749
|
if (!cont.listeners.size) return;
|
44750
|
+
if (flags & FSEVENT_FLAG_MUST_SCAN_SUBDIRS) return;
|
44668
44751
|
const info = fsevents.getInfo(fullPath, flags);
|
44669
44752
|
cont.listeners.forEach(list => {
|
44670
44753
|
list(fullPath, flags, info);
|
@@ -45484,7 +45567,7 @@ add(paths_, _origAdd, _internal) {
|
|
45484
45567
|
|
45485
45568
|
if (this.options.useFsEvents && this._fsEventsHandler) {
|
45486
45569
|
if (!this._readyCount) this._readyCount = paths.length;
|
45487
|
-
if (this.options.persistent) this._readyCount
|
45570
|
+
if (this.options.persistent) this._readyCount += paths.length;
|
45488
45571
|
paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path));
|
45489
45572
|
} else {
|
45490
45573
|
if (!this._readyCount) this._readyCount = 0;
|
@@ -46850,9 +46933,11 @@ const cachedFsUtilsMap = new WeakMap();
|
|
46850
46933
|
function getFsUtils(config) {
|
46851
46934
|
let fsUtils = cachedFsUtilsMap.get(config);
|
46852
46935
|
if (!fsUtils) {
|
46853
|
-
if (config.command !== 'serve' ||
|
46854
|
-
|
46855
|
-
|
46936
|
+
if (config.command !== 'serve' ||
|
46937
|
+
config.server.fs.cachedChecks === false ||
|
46938
|
+
config.server.watch?.ignored) {
|
46939
|
+
// cached fsUtils is only used in the dev server for now
|
46940
|
+
// it is enabled by default only when there aren't custom watcher ignored patterns configured
|
46856
46941
|
fsUtils = commonFsUtils;
|
46857
46942
|
}
|
46858
46943
|
else if (!config.resolve.preserveSymlinks &&
|
@@ -46931,11 +47016,11 @@ function createCachedFsUtils(config) {
|
|
46931
47016
|
return;
|
46932
47017
|
}
|
46933
47018
|
if (nextDirentCache.type === 'directory_maybe_symlink') {
|
46934
|
-
dirPath ??= pathUntilPart(root, parts, i);
|
47019
|
+
dirPath ??= pathUntilPart(root, parts, i + 1);
|
46935
47020
|
const isSymlink = fs$l
|
46936
47021
|
.lstatSync(dirPath, { throwIfNoEntry: false })
|
46937
47022
|
?.isSymbolicLink();
|
46938
|
-
|
47023
|
+
nextDirentCache.type = isSymlink ? 'symlink' : 'directory';
|
46939
47024
|
}
|
46940
47025
|
direntCache = nextDirentCache;
|
46941
47026
|
}
|
@@ -53371,12 +53456,37 @@ function transformRequest(url, server, options = {}) {
|
|
53371
53456
|
async function doTransform(url, server, options, timestamp) {
|
53372
53457
|
url = removeTimestampQuery(url);
|
53373
53458
|
const { config, pluginContainer } = server;
|
53374
|
-
const prettyUrl = debugCache$1 ? prettifyUrl(url, config.root) : '';
|
53375
53459
|
const ssr = !!options.ssr;
|
53376
53460
|
if (ssr && isDepsOptimizerEnabled(config, true)) {
|
53377
53461
|
await initDevSsrDepsOptimizer(config, server);
|
53378
53462
|
}
|
53379
|
-
|
53463
|
+
let module = await server.moduleGraph.getModuleByUrl(url, ssr);
|
53464
|
+
if (module) {
|
53465
|
+
// try use cache from url
|
53466
|
+
const cached = await getCachedTransformResult(url, module, server, ssr, timestamp);
|
53467
|
+
if (cached)
|
53468
|
+
return cached;
|
53469
|
+
}
|
53470
|
+
const resolved = module
|
53471
|
+
? undefined
|
53472
|
+
: (await pluginContainer.resolveId(url, undefined, { ssr })) ?? undefined;
|
53473
|
+
// resolve
|
53474
|
+
const id = module?.id ?? resolved?.id ?? url;
|
53475
|
+
module ??= server.moduleGraph.getModuleById(id);
|
53476
|
+
if (module) {
|
53477
|
+
// if a different url maps to an existing loaded id, make sure we relate this url to the id
|
53478
|
+
await server.moduleGraph._ensureEntryFromUrl(url, ssr, undefined, resolved);
|
53479
|
+
// try use cache from id
|
53480
|
+
const cached = await getCachedTransformResult(url, module, server, ssr, timestamp);
|
53481
|
+
if (cached)
|
53482
|
+
return cached;
|
53483
|
+
}
|
53484
|
+
const result = loadAndTransform(id, url, server, options, timestamp, module, resolved);
|
53485
|
+
getDepsOptimizer(config, ssr)?.delayDepsOptimizerUntil(id, () => result);
|
53486
|
+
return result;
|
53487
|
+
}
|
53488
|
+
async function getCachedTransformResult(url, module, server, ssr, timestamp) {
|
53489
|
+
const prettyUrl = debugCache$1 ? prettifyUrl(url, server.config.root) : '';
|
53380
53490
|
// tries to handle soft invalidation of the module if available,
|
53381
53491
|
// returns a boolean true is successful, or false if no handling is needed
|
53382
53492
|
const softInvalidatedTransformResult = module &&
|
@@ -53391,14 +53501,6 @@ async function doTransform(url, server, options, timestamp) {
|
|
53391
53501
|
debugCache$1?.(`[memory] ${prettyUrl}`);
|
53392
53502
|
return cached;
|
53393
53503
|
}
|
53394
|
-
const resolved = module
|
53395
|
-
? undefined
|
53396
|
-
: (await pluginContainer.resolveId(url, undefined, { ssr })) ?? undefined;
|
53397
|
-
// resolve
|
53398
|
-
const id = module?.id ?? resolved?.id ?? url;
|
53399
|
-
const result = loadAndTransform(id, url, server, options, timestamp, module, resolved);
|
53400
|
-
getDepsOptimizer(config, ssr)?.delayDepsOptimizerUntil(id, () => result);
|
53401
|
-
return result;
|
53402
53504
|
}
|
53403
53505
|
async function loadAndTransform(id, url, server, options, timestamp, mod, resolved) {
|
53404
53506
|
const { config, pluginContainer, moduleGraph } = server;
|
@@ -64603,7 +64705,7 @@ function resolveServerOptions(root, raw, logger) {
|
|
64603
64705
|
strict: server.fs?.strict ?? true,
|
64604
64706
|
allow: allowDirs,
|
64605
64707
|
deny,
|
64606
|
-
cachedChecks: server.fs?.cachedChecks
|
64708
|
+
cachedChecks: server.fs?.cachedChecks,
|
64607
64709
|
};
|
64608
64710
|
if (server.origin?.endsWith('/')) {
|
64609
64711
|
server.origin = server.origin.slice(0, -1);
|
@@ -67436,6 +67538,24 @@ const promisifiedRealpath = promisify$4(fs$l.realpath);
|
|
67436
67538
|
function defineConfig(config) {
|
67437
67539
|
return config;
|
67438
67540
|
}
|
67541
|
+
/**
|
67542
|
+
* Check and warn if `path` includes characters that don't work well in Vite,
|
67543
|
+
* such as `#` and `?`.
|
67544
|
+
*/
|
67545
|
+
function checkBadCharactersInPath(path, logger) {
|
67546
|
+
const badChars = [];
|
67547
|
+
if (path.includes('#')) {
|
67548
|
+
badChars.push('#');
|
67549
|
+
}
|
67550
|
+
if (path.includes('?')) {
|
67551
|
+
badChars.push('?');
|
67552
|
+
}
|
67553
|
+
if (badChars.length > 0) {
|
67554
|
+
const charString = badChars.map((c) => `"${c}"`).join(' and ');
|
67555
|
+
const inflectedChars = badChars.length > 1 ? 'characters' : 'character';
|
67556
|
+
logger.warn(colors$1.yellow(`The project root contains the ${charString} ${inflectedChars} (${colors$1.cyan(path)}), which may not work when running Vite. Consider renaming the directory to remove the characters.`));
|
67557
|
+
}
|
67558
|
+
}
|
67439
67559
|
async function resolveConfig(inlineConfig, command, defaultMode = 'development', defaultNodeEnv = 'development', isPreview = false) {
|
67440
67560
|
let config = inlineConfig;
|
67441
67561
|
let configFileDependencies = [];
|
@@ -67455,7 +67575,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development',
|
|
67455
67575
|
};
|
67456
67576
|
let { configFile } = config;
|
67457
67577
|
if (configFile !== false) {
|
67458
|
-
const loadResult = await loadConfigFromFile(configEnv, configFile, config.root, config.logLevel);
|
67578
|
+
const loadResult = await loadConfigFromFile(configEnv, configFile, config.root, config.logLevel, config.customLogger);
|
67459
67579
|
if (loadResult) {
|
67460
67580
|
config = mergeConfig(loadResult.config, config);
|
67461
67581
|
configFile = loadResult.path;
|
@@ -67492,9 +67612,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development',
|
|
67492
67612
|
});
|
67493
67613
|
// resolve root
|
67494
67614
|
const resolvedRoot = normalizePath$3(config.root ? path$o.resolve(config.root) : process.cwd());
|
67495
|
-
|
67496
|
-
logger.warn(colors$1.yellow(`The project root contains the "#" character (${colors$1.cyan(resolvedRoot)}), which may not work when running Vite. Consider renaming the directory to remove the "#".`));
|
67497
|
-
}
|
67615
|
+
checkBadCharactersInPath(resolvedRoot, logger);
|
67498
67616
|
const clientAlias = [
|
67499
67617
|
{
|
67500
67618
|
find: /^\/?@vite\/env/,
|
@@ -67819,7 +67937,7 @@ function sortUserPlugins(plugins) {
|
|
67819
67937
|
}
|
67820
67938
|
return [prePlugins, normalPlugins, postPlugins];
|
67821
67939
|
}
|
67822
|
-
async function loadConfigFromFile(configEnv, configFile, configRoot = process.cwd(), logLevel) {
|
67940
|
+
async function loadConfigFromFile(configEnv, configFile, configRoot = process.cwd(), logLevel, customLogger) {
|
67823
67941
|
const start = performance.now();
|
67824
67942
|
const getTime = () => `${(performance.now() - start).toFixed(2)}ms`;
|
67825
67943
|
let resolvedPath;
|
@@ -67860,7 +67978,9 @@ async function loadConfigFromFile(configEnv, configFile, configRoot = process.cw
|
|
67860
67978
|
};
|
67861
67979
|
}
|
67862
67980
|
catch (e) {
|
67863
|
-
createLogger(logLevel).error(colors$1.red(`failed to load config from ${resolvedPath}`), {
|
67981
|
+
createLogger(logLevel, { customLogger }).error(colors$1.red(`failed to load config from ${resolvedPath}`), {
|
67982
|
+
error: e,
|
67983
|
+
});
|
67864
67984
|
throw e;
|
67865
67985
|
}
|
67866
67986
|
}
|
@@ -68053,7 +68173,7 @@ function optimizeDepsDisabledBackwardCompatibility(resolved, optimizeDeps, optim
|
|
68053
68173
|
resolved.build.commonjsOptions.include = undefined;
|
68054
68174
|
}
|
68055
68175
|
resolved.logger.warn(colors$1.yellow(`(!) Experimental ${optimizeDepsPath}optimizeDeps.disabled and deps pre-bundling during build were removed in Vite 5.1.
|
68056
|
-
To disable the deps optimizer, set ${optimizeDepsPath}optimizeDeps.noDiscovery to true and ${optimizeDepsPath}optimizeDeps.include as undefined or empty.
|
68176
|
+
To disable the deps optimizer, set ${optimizeDepsPath}optimizeDeps.noDiscovery to true and ${optimizeDepsPath}optimizeDeps.include as undefined or empty.
|
68057
68177
|
Please remove ${optimizeDepsPath}optimizeDeps.disabled from your config.
|
68058
68178
|
${commonjsPluginDisabled
|
68059
68179
|
? 'Empty config.build.commonjsOptions.include will be ignored to support CJS during build. This config should also be removed.'
|
package/dist/node/cli.js
CHANGED
@@ -2,7 +2,7 @@ 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 colors, a as createLogger, r as resolveConfig } from './chunks/dep-
|
5
|
+
import { c as colors, a as createLogger, r as resolveConfig } from './chunks/dep-nGG-_oRu.js';
|
6
6
|
import { VERSION } from './constants.js';
|
7
7
|
import 'node:fs/promises';
|
8
8
|
import 'node:url';
|
@@ -757,7 +757,7 @@ cli
|
|
757
757
|
filterDuplicateOptions(options);
|
758
758
|
// output structure is preserved even after bundling so require()
|
759
759
|
// is ok here
|
760
|
-
const { createServer } = await import('./chunks/dep-
|
760
|
+
const { createServer } = await import('./chunks/dep-nGG-_oRu.js').then(function (n) { return n.E; });
|
761
761
|
try {
|
762
762
|
const server = await createServer({
|
763
763
|
root,
|
@@ -832,12 +832,11 @@ cli
|
|
832
832
|
`or specify minifier to use (default: esbuild)`)
|
833
833
|
.option('--manifest [name]', `[boolean | string] emit build manifest json`)
|
834
834
|
.option('--ssrManifest [name]', `[boolean | string] emit ssr manifest json`)
|
835
|
-
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle (experimental)`)
|
836
835
|
.option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
|
837
836
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
838
837
|
.action(async (root, options) => {
|
839
838
|
filterDuplicateOptions(options);
|
840
|
-
const { build } = await import('./chunks/dep-
|
839
|
+
const { build } = await import('./chunks/dep-nGG-_oRu.js').then(function (n) { return n.F; });
|
841
840
|
const buildOptions = cleanOptions(options);
|
842
841
|
try {
|
843
842
|
await build({
|
@@ -847,7 +846,6 @@ cli
|
|
847
846
|
configFile: options.config,
|
848
847
|
logLevel: options.logLevel,
|
849
848
|
clearScreen: options.clearScreen,
|
850
|
-
optimizeDeps: { force: options.force },
|
851
849
|
build: buildOptions,
|
852
850
|
});
|
853
851
|
}
|
@@ -865,7 +863,7 @@ cli
|
|
865
863
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
866
864
|
.action(async (root, options) => {
|
867
865
|
filterDuplicateOptions(options);
|
868
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
866
|
+
const { optimizeDeps } = await import('./chunks/dep-nGG-_oRu.js').then(function (n) { return n.D; });
|
869
867
|
try {
|
870
868
|
const config = await resolveConfig({
|
871
869
|
root,
|
@@ -891,7 +889,7 @@ cli
|
|
891
889
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
892
890
|
.action(async (root, options) => {
|
893
891
|
filterDuplicateOptions(options);
|
894
|
-
const { preview } = await import('./chunks/dep-
|
892
|
+
const { preview } = await import('./chunks/dep-nGG-_oRu.js').then(function (n) { return n.G; });
|
895
893
|
try {
|
896
894
|
const server = await preview({
|
897
895
|
root,
|
package/dist/node/index.d.ts
CHANGED
@@ -1645,10 +1645,10 @@ interface FileSystemServeOptions {
|
|
1645
1645
|
*/
|
1646
1646
|
deny?: string[];
|
1647
1647
|
/**
|
1648
|
-
* Enable caching of fs calls.
|
1648
|
+
* Enable caching of fs calls. It is enabled by default if no custom watch ignored patterns are provided.
|
1649
1649
|
*
|
1650
1650
|
* @experimental
|
1651
|
-
* @default
|
1651
|
+
* @default undefined
|
1652
1652
|
*/
|
1653
1653
|
cachedChecks?: boolean;
|
1654
1654
|
}
|
@@ -3386,7 +3386,7 @@ interface PluginHookUtils {
|
|
3386
3386
|
type ResolveFn = (id: string, importer?: string, aliasOnly?: boolean, ssr?: boolean) => Promise<string | undefined>;
|
3387
3387
|
declare function resolveConfig(inlineConfig: InlineConfig, command: 'build' | 'serve', defaultMode?: string, defaultNodeEnv?: string, isPreview?: boolean): Promise<ResolvedConfig>;
|
3388
3388
|
declare function sortUserPlugins(plugins: (Plugin | Plugin[])[] | undefined): [Plugin[], Plugin[], Plugin[]];
|
3389
|
-
declare function loadConfigFromFile(configEnv: ConfigEnv, configFile?: string, configRoot?: string, logLevel?: LogLevel): Promise<{
|
3389
|
+
declare function loadConfigFromFile(configEnv: ConfigEnv, configFile?: string, configRoot?: string, logLevel?: LogLevel, customLogger?: Logger): Promise<{
|
3390
3390
|
path: string;
|
3391
3391
|
config: UserConfig;
|
3392
3392
|
dependencies: string[];
|
package/dist/node/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
2
|
-
import { i as isInNodeModules, b as arraify } from './chunks/dep-
|
3
|
-
export { f as build, j as buildErrorMessage, u as createFilter, a as createLogger, e as createServer, d as defineConfig, k as fetchModule, g as formatPostcssSourceMap, y as isFileServingAllowed, l as loadConfigFromFile, z as loadEnv, q as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, h as preprocessCSS, p as preview, r as resolveConfig, A as resolveEnvPrefix, v as rollupVersion, x as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
2
|
+
import { i as isInNodeModules, b as arraify } from './chunks/dep-nGG-_oRu.js';
|
3
|
+
export { f as build, j as buildErrorMessage, u as createFilter, a as createLogger, e as createServer, d as defineConfig, k as fetchModule, g as formatPostcssSourceMap, y as isFileServingAllowed, l as loadConfigFromFile, z as loadEnv, q as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, h as preprocessCSS, p as preview, r as resolveConfig, A as resolveEnvPrefix, v as rollupVersion, x as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-nGG-_oRu.js';
|
4
4
|
export { VERSION as version } from './constants.js';
|
5
5
|
export { version as esbuildVersion } from 'esbuild';
|
6
6
|
import { existsSync, readFileSync } from 'node:fs';
|
@@ -4169,6 +4169,16 @@ class Chunk {
|
|
4169
4169
|
this.intro = content + this.intro;
|
4170
4170
|
}
|
4171
4171
|
|
4172
|
+
reset() {
|
4173
|
+
this.intro = '';
|
4174
|
+
this.outro = '';
|
4175
|
+
if (this.edited) {
|
4176
|
+
this.content = this.original;
|
4177
|
+
this.storeName = false;
|
4178
|
+
this.edited = false;
|
4179
|
+
}
|
4180
|
+
}
|
4181
|
+
|
4172
4182
|
split(index) {
|
4173
4183
|
const sliceIndex = index - this.start;
|
4174
4184
|
|
@@ -4259,8 +4269,8 @@ class Chunk {
|
|
4259
4269
|
}
|
4260
4270
|
|
4261
4271
|
function getBtoa() {
|
4262
|
-
if (typeof
|
4263
|
-
return (str) =>
|
4272
|
+
if (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') {
|
4273
|
+
return (str) => globalThis.btoa(unescape(encodeURIComponent(str)));
|
4264
4274
|
} else if (typeof Buffer === 'function') {
|
4265
4275
|
return (str) => Buffer.from(str, 'utf-8').toString('base64');
|
4266
4276
|
} else {
|
@@ -4937,6 +4947,28 @@ class MagicString {
|
|
4937
4947
|
return this;
|
4938
4948
|
}
|
4939
4949
|
|
4950
|
+
reset(start, end) {
|
4951
|
+
while (start < 0) start += this.original.length;
|
4952
|
+
while (end < 0) end += this.original.length;
|
4953
|
+
|
4954
|
+
if (start === end) return this;
|
4955
|
+
|
4956
|
+
if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');
|
4957
|
+
if (start > end) throw new Error('end must be greater than start');
|
4958
|
+
|
4959
|
+
this._split(start);
|
4960
|
+
this._split(end);
|
4961
|
+
|
4962
|
+
let chunk = this.byStart[start];
|
4963
|
+
|
4964
|
+
while (chunk) {
|
4965
|
+
chunk.reset();
|
4966
|
+
|
4967
|
+
chunk = end > chunk.end ? this.byStart[chunk.end] : null;
|
4968
|
+
}
|
4969
|
+
return this;
|
4970
|
+
}
|
4971
|
+
|
4940
4972
|
lastChar() {
|
4941
4973
|
if (this.outro.length) return this.outro[this.outro.length - 1];
|
4942
4974
|
let chunk = this.lastChunk;
|
@@ -5545,7 +5577,7 @@ function isFileServingAllowed(url, server) {
|
|
5545
5577
|
var main$1 = {exports: {}};
|
5546
5578
|
|
5547
5579
|
var name = "dotenv";
|
5548
|
-
var version$1 = "16.
|
5580
|
+
var version$1 = "16.4.1";
|
5549
5581
|
var description = "Loads environment variables from .env file";
|
5550
5582
|
var main = "lib/main.js";
|
5551
5583
|
var types = "lib/main.d.ts";
|
@@ -5679,7 +5711,9 @@ function _parseVault (options) {
|
|
5679
5711
|
// Parse .env.vault
|
5680
5712
|
const result = DotenvModule.configDotenv({ path: vaultPath });
|
5681
5713
|
if (!result.parsed) {
|
5682
|
-
|
5714
|
+
const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
|
5715
|
+
err.code = 'MISSING_DATA';
|
5716
|
+
throw err
|
5683
5717
|
}
|
5684
5718
|
|
5685
5719
|
// handle scenario for comma separated keys - for use with key rotation
|
@@ -5747,7 +5781,9 @@ function _instructions (result, dotenvKey) {
|
|
5747
5781
|
uri = new URL(dotenvKey);
|
5748
5782
|
} catch (error) {
|
5749
5783
|
if (error.code === 'ERR_INVALID_URL') {
|
5750
|
-
|
5784
|
+
const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development');
|
5785
|
+
err.code = 'INVALID_DOTENV_KEY';
|
5786
|
+
throw err
|
5751
5787
|
}
|
5752
5788
|
|
5753
5789
|
throw error
|
@@ -5756,34 +5792,53 @@ function _instructions (result, dotenvKey) {
|
|
5756
5792
|
// Get decrypt key
|
5757
5793
|
const key = uri.password;
|
5758
5794
|
if (!key) {
|
5759
|
-
|
5795
|
+
const err = new Error('INVALID_DOTENV_KEY: Missing key part');
|
5796
|
+
err.code = 'INVALID_DOTENV_KEY';
|
5797
|
+
throw err
|
5760
5798
|
}
|
5761
5799
|
|
5762
5800
|
// Get environment
|
5763
5801
|
const environment = uri.searchParams.get('environment');
|
5764
5802
|
if (!environment) {
|
5765
|
-
|
5803
|
+
const err = new Error('INVALID_DOTENV_KEY: Missing environment part');
|
5804
|
+
err.code = 'INVALID_DOTENV_KEY';
|
5805
|
+
throw err
|
5766
5806
|
}
|
5767
5807
|
|
5768
5808
|
// Get ciphertext payload
|
5769
5809
|
const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
|
5770
5810
|
const ciphertext = result.parsed[environmentKey]; // DOTENV_VAULT_PRODUCTION
|
5771
5811
|
if (!ciphertext) {
|
5772
|
-
|
5812
|
+
const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
|
5813
|
+
err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT';
|
5814
|
+
throw err
|
5773
5815
|
}
|
5774
5816
|
|
5775
5817
|
return { ciphertext, key }
|
5776
5818
|
}
|
5777
5819
|
|
5778
5820
|
function _vaultPath (options) {
|
5779
|
-
let
|
5821
|
+
let possibleVaultPath = null;
|
5780
5822
|
|
5781
5823
|
if (options && options.path && options.path.length > 0) {
|
5782
|
-
|
5824
|
+
if (Array.isArray(options.path)) {
|
5825
|
+
for (const filepath of options.path) {
|
5826
|
+
if (fs.existsSync(filepath)) {
|
5827
|
+
possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`;
|
5828
|
+
}
|
5829
|
+
}
|
5830
|
+
} else {
|
5831
|
+
possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`;
|
5832
|
+
}
|
5833
|
+
} else {
|
5834
|
+
possibleVaultPath = path.resolve(process.cwd(), '.env.vault');
|
5783
5835
|
}
|
5784
5836
|
|
5785
|
-
|
5786
|
-
|
5837
|
+
if (fs.existsSync(possibleVaultPath)) {
|
5838
|
+
return possibleVaultPath
|
5839
|
+
}
|
5840
|
+
|
5841
|
+
return null
|
5787
5842
|
}
|
5788
5843
|
|
5789
5844
|
function _resolveHome (envPath) {
|
@@ -5812,7 +5867,18 @@ function configDotenv (options) {
|
|
5812
5867
|
|
5813
5868
|
if (options) {
|
5814
5869
|
if (options.path != null) {
|
5815
|
-
|
5870
|
+
let envPath = options.path;
|
5871
|
+
|
5872
|
+
if (Array.isArray(envPath)) {
|
5873
|
+
for (const filepath of options.path) {
|
5874
|
+
if (fs.existsSync(filepath)) {
|
5875
|
+
envPath = filepath;
|
5876
|
+
break
|
5877
|
+
}
|
5878
|
+
}
|
5879
|
+
}
|
5880
|
+
|
5881
|
+
dotenvPath = _resolveHome(envPath);
|
5816
5882
|
}
|
5817
5883
|
if (options.encoding != null) {
|
5818
5884
|
encoding = options.encoding;
|
@@ -5846,15 +5912,15 @@ function configDotenv (options) {
|
|
5846
5912
|
|
5847
5913
|
// Populates process.env from .env file
|
5848
5914
|
function config (options) {
|
5849
|
-
const vaultPath = _vaultPath(options);
|
5850
|
-
|
5851
5915
|
// fallback to original dotenv if DOTENV_KEY is not set
|
5852
5916
|
if (_dotenvKey(options).length === 0) {
|
5853
5917
|
return DotenvModule.configDotenv(options)
|
5854
5918
|
}
|
5855
5919
|
|
5920
|
+
const vaultPath = _vaultPath(options);
|
5921
|
+
|
5856
5922
|
// dotenvKey exists but .env.vault file does not exist
|
5857
|
-
if (!
|
5923
|
+
if (!vaultPath) {
|
5858
5924
|
_warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
|
5859
5925
|
|
5860
5926
|
return DotenvModule.configDotenv(options)
|
@@ -5881,14 +5947,14 @@ function decrypt (encrypted, keyStr) {
|
|
5881
5947
|
const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data';
|
5882
5948
|
|
5883
5949
|
if (isRange || invalidKeyLength) {
|
5884
|
-
const
|
5885
|
-
|
5950
|
+
const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)');
|
5951
|
+
err.code = 'INVALID_DOTENV_KEY';
|
5952
|
+
throw err
|
5886
5953
|
} else if (decryptionFailed) {
|
5887
|
-
const
|
5888
|
-
|
5954
|
+
const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY');
|
5955
|
+
err.code = 'DECRYPTION_FAILED';
|
5956
|
+
throw err
|
5889
5957
|
} else {
|
5890
|
-
console.error('Error: ', error.code);
|
5891
|
-
console.error('Error: ', error.message);
|
5892
5958
|
throw error
|
5893
5959
|
}
|
5894
5960
|
}
|
@@ -5900,7 +5966,9 @@ function populate (processEnv, parsed, options = {}) {
|
|
5900
5966
|
const override = Boolean(options && options.override);
|
5901
5967
|
|
5902
5968
|
if (typeof parsed !== 'object') {
|
5903
|
-
|
5969
|
+
const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate');
|
5970
|
+
err.code = 'OBJECT_REQUIRED';
|
5971
|
+
throw err
|
5904
5972
|
}
|
5905
5973
|
|
5906
5974
|
// Set process.env
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "5.1.0
|
3
|
+
"version": "5.1.0",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Evan You",
|
@@ -73,7 +73,7 @@
|
|
73
73
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
74
74
|
"dependencies": {
|
75
75
|
"esbuild": "^0.19.3",
|
76
|
-
"postcss": "^8.4.
|
76
|
+
"postcss": "^8.4.35",
|
77
77
|
"rollup": "^4.2.0"
|
78
78
|
},
|
79
79
|
"optionalDependencies": {
|
@@ -81,7 +81,7 @@
|
|
81
81
|
},
|
82
82
|
"devDependencies": {
|
83
83
|
"@ampproject/remapping": "^2.2.1",
|
84
|
-
"@babel/parser": "^7.23.
|
84
|
+
"@babel/parser": "^7.23.9",
|
85
85
|
"@jridgewell/trace-mapping": "^0.3.22",
|
86
86
|
"@rollup/plugin-alias": "^5.1.0",
|
87
87
|
"@rollup/plugin-commonjs": "^25.0.7",
|
@@ -96,14 +96,14 @@
|
|
96
96
|
"acorn-walk": "^8.3.2",
|
97
97
|
"artichokie": "^0.2.0",
|
98
98
|
"cac": "^6.7.14",
|
99
|
-
"chokidar": "^3.
|
99
|
+
"chokidar": "^3.6.0",
|
100
100
|
"connect": "^3.7.0",
|
101
101
|
"convert-source-map": "^2.0.0",
|
102
102
|
"cors": "^2.8.5",
|
103
103
|
"cross-spawn": "^7.0.3",
|
104
104
|
"debug": "^4.3.4",
|
105
105
|
"dep-types": "link:./src/types",
|
106
|
-
"dotenv": "^16.
|
106
|
+
"dotenv": "^16.4.1",
|
107
107
|
"dotenv-expand": "^10.0.0",
|
108
108
|
"es-module-lexer": "^1.4.1",
|
109
109
|
"escape-html": "^1.0.3",
|
@@ -113,7 +113,7 @@
|
|
113
113
|
"http-proxy": "^1.18.1",
|
114
114
|
"launch-editor-middleware": "^2.6.1",
|
115
115
|
"lightningcss": "^1.23.0",
|
116
|
-
"magic-string": "^0.30.
|
116
|
+
"magic-string": "^0.30.7",
|
117
117
|
"micromatch": "^4.0.5",
|
118
118
|
"mlly": "^1.5.0",
|
119
119
|
"mrmime": "^2.0.0",
|
@@ -132,10 +132,10 @@
|
|
132
132
|
"source-map-support": "^0.5.21",
|
133
133
|
"strip-ansi": "^7.1.0",
|
134
134
|
"strip-literal": "^2.0.0",
|
135
|
-
"tsconfck": "^3.0.
|
135
|
+
"tsconfck": "^3.0.2",
|
136
136
|
"tslib": "^2.6.2",
|
137
137
|
"types": "link:./types",
|
138
|
-
"ufo": "^1.
|
138
|
+
"ufo": "^1.4.0",
|
139
139
|
"ws": "^8.16.0"
|
140
140
|
},
|
141
141
|
"peerDependencies": {
|