vite 6.3.0-beta.0 → 6.3.0-beta.2
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/LICENSE.md +0 -15
- package/dist/client/client.mjs +44 -11
- package/dist/node/chunks/{dep-2sb0gr4n.js → dep-B8BdvHtp.js} +1 -1
- package/dist/node/chunks/{dep-BXITORG_.js → dep-BVYvZuv7.js} +1 -1
- package/dist/node/chunks/{dep-Bt1yO2CH.js → dep-jcjTW_IO.js} +933 -2155
- package/dist/node/cli.js +6 -5
- package/dist/node/index.d.ts +17 -11
- package/dist/node/index.js +3 -2
- package/dist/node/module-runner.js +64 -62
- package/dist/node-cjs/publicUtils.cjs +244 -545
- package/package.json +2 -1
- package/types/metadata.d.ts +4 -1
@@ -228,9 +228,7 @@ picocolors.exports.createColors = createColors;
|
|
228
228
|
var picocolorsExports = picocolors.exports;
|
229
229
|
var colors = /*@__PURE__*/getDefaultExportFromCjs(picocolorsExports);
|
230
230
|
|
231
|
-
var
|
232
|
-
|
233
|
-
var browser = {exports: {}};
|
231
|
+
var node = {exports: {}};
|
234
232
|
|
235
233
|
/**
|
236
234
|
* Helpers.
|
@@ -703,576 +701,274 @@ function requireCommon () {
|
|
703
701
|
return common;
|
704
702
|
}
|
705
703
|
|
706
|
-
/* eslint-env browser */
|
707
|
-
|
708
|
-
var hasRequiredBrowser;
|
709
|
-
|
710
|
-
function requireBrowser () {
|
711
|
-
if (hasRequiredBrowser) return browser.exports;
|
712
|
-
hasRequiredBrowser = 1;
|
713
|
-
(function (module, exports) {
|
714
|
-
/**
|
715
|
-
* This is the web browser implementation of `debug()`.
|
716
|
-
*/
|
717
|
-
|
718
|
-
exports.formatArgs = formatArgs;
|
719
|
-
exports.save = save;
|
720
|
-
exports.load = load;
|
721
|
-
exports.useColors = useColors;
|
722
|
-
exports.storage = localstorage();
|
723
|
-
exports.destroy = (() => {
|
724
|
-
let warned = false;
|
725
|
-
|
726
|
-
return () => {
|
727
|
-
if (!warned) {
|
728
|
-
warned = true;
|
729
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
730
|
-
}
|
731
|
-
};
|
732
|
-
})();
|
733
|
-
|
734
|
-
/**
|
735
|
-
* Colors.
|
736
|
-
*/
|
737
|
-
|
738
|
-
exports.colors = [
|
739
|
-
'#0000CC',
|
740
|
-
'#0000FF',
|
741
|
-
'#0033CC',
|
742
|
-
'#0033FF',
|
743
|
-
'#0066CC',
|
744
|
-
'#0066FF',
|
745
|
-
'#0099CC',
|
746
|
-
'#0099FF',
|
747
|
-
'#00CC00',
|
748
|
-
'#00CC33',
|
749
|
-
'#00CC66',
|
750
|
-
'#00CC99',
|
751
|
-
'#00CCCC',
|
752
|
-
'#00CCFF',
|
753
|
-
'#3300CC',
|
754
|
-
'#3300FF',
|
755
|
-
'#3333CC',
|
756
|
-
'#3333FF',
|
757
|
-
'#3366CC',
|
758
|
-
'#3366FF',
|
759
|
-
'#3399CC',
|
760
|
-
'#3399FF',
|
761
|
-
'#33CC00',
|
762
|
-
'#33CC33',
|
763
|
-
'#33CC66',
|
764
|
-
'#33CC99',
|
765
|
-
'#33CCCC',
|
766
|
-
'#33CCFF',
|
767
|
-
'#6600CC',
|
768
|
-
'#6600FF',
|
769
|
-
'#6633CC',
|
770
|
-
'#6633FF',
|
771
|
-
'#66CC00',
|
772
|
-
'#66CC33',
|
773
|
-
'#9900CC',
|
774
|
-
'#9900FF',
|
775
|
-
'#9933CC',
|
776
|
-
'#9933FF',
|
777
|
-
'#99CC00',
|
778
|
-
'#99CC33',
|
779
|
-
'#CC0000',
|
780
|
-
'#CC0033',
|
781
|
-
'#CC0066',
|
782
|
-
'#CC0099',
|
783
|
-
'#CC00CC',
|
784
|
-
'#CC00FF',
|
785
|
-
'#CC3300',
|
786
|
-
'#CC3333',
|
787
|
-
'#CC3366',
|
788
|
-
'#CC3399',
|
789
|
-
'#CC33CC',
|
790
|
-
'#CC33FF',
|
791
|
-
'#CC6600',
|
792
|
-
'#CC6633',
|
793
|
-
'#CC9900',
|
794
|
-
'#CC9933',
|
795
|
-
'#CCCC00',
|
796
|
-
'#CCCC33',
|
797
|
-
'#FF0000',
|
798
|
-
'#FF0033',
|
799
|
-
'#FF0066',
|
800
|
-
'#FF0099',
|
801
|
-
'#FF00CC',
|
802
|
-
'#FF00FF',
|
803
|
-
'#FF3300',
|
804
|
-
'#FF3333',
|
805
|
-
'#FF3366',
|
806
|
-
'#FF3399',
|
807
|
-
'#FF33CC',
|
808
|
-
'#FF33FF',
|
809
|
-
'#FF6600',
|
810
|
-
'#FF6633',
|
811
|
-
'#FF9900',
|
812
|
-
'#FF9933',
|
813
|
-
'#FFCC00',
|
814
|
-
'#FFCC33'
|
815
|
-
];
|
816
|
-
|
817
|
-
/**
|
818
|
-
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
819
|
-
* and the Firebug extension (any Firefox version) are known
|
820
|
-
* to support "%c" CSS customizations.
|
821
|
-
*
|
822
|
-
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
823
|
-
*/
|
824
|
-
|
825
|
-
// eslint-disable-next-line complexity
|
826
|
-
function useColors() {
|
827
|
-
// NB: In an Electron preload script, document will be defined but not fully
|
828
|
-
// initialized. Since we know we're in Chrome, we'll just detect this case
|
829
|
-
// explicitly
|
830
|
-
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
831
|
-
return true;
|
832
|
-
}
|
833
|
-
|
834
|
-
// Internet Explorer and Edge do not support colors.
|
835
|
-
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
836
|
-
return false;
|
837
|
-
}
|
838
|
-
|
839
|
-
let m;
|
840
|
-
|
841
|
-
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
842
|
-
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
843
|
-
// eslint-disable-next-line no-return-assign
|
844
|
-
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
845
|
-
// Is firebug? http://stackoverflow.com/a/398120/376773
|
846
|
-
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
847
|
-
// Is firefox >= v31?
|
848
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
849
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
|
850
|
-
// Double check webkit in userAgent just in case we are in a worker
|
851
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
852
|
-
}
|
853
|
-
|
854
|
-
/**
|
855
|
-
* Colorize log arguments if enabled.
|
856
|
-
*
|
857
|
-
* @api public
|
858
|
-
*/
|
859
|
-
|
860
|
-
function formatArgs(args) {
|
861
|
-
args[0] = (this.useColors ? '%c' : '') +
|
862
|
-
this.namespace +
|
863
|
-
(this.useColors ? ' %c' : ' ') +
|
864
|
-
args[0] +
|
865
|
-
(this.useColors ? '%c ' : ' ') +
|
866
|
-
'+' + module.exports.humanize(this.diff);
|
867
|
-
|
868
|
-
if (!this.useColors) {
|
869
|
-
return;
|
870
|
-
}
|
871
|
-
|
872
|
-
const c = 'color: ' + this.color;
|
873
|
-
args.splice(1, 0, c, 'color: inherit');
|
874
|
-
|
875
|
-
// The final "%c" is somewhat tricky, because there could be other
|
876
|
-
// arguments passed either before or after the %c, so we need to
|
877
|
-
// figure out the correct index to insert the CSS into
|
878
|
-
let index = 0;
|
879
|
-
let lastC = 0;
|
880
|
-
args[0].replace(/%[a-zA-Z%]/g, match => {
|
881
|
-
if (match === '%%') {
|
882
|
-
return;
|
883
|
-
}
|
884
|
-
index++;
|
885
|
-
if (match === '%c') {
|
886
|
-
// We only are interested in the *last* %c
|
887
|
-
// (the user may have provided their own)
|
888
|
-
lastC = index;
|
889
|
-
}
|
890
|
-
});
|
891
|
-
|
892
|
-
args.splice(lastC, 0, c);
|
893
|
-
}
|
894
|
-
|
895
|
-
/**
|
896
|
-
* Invokes `console.debug()` when available.
|
897
|
-
* No-op when `console.debug` is not a "function".
|
898
|
-
* If `console.debug` is not available, falls back
|
899
|
-
* to `console.log`.
|
900
|
-
*
|
901
|
-
* @api public
|
902
|
-
*/
|
903
|
-
exports.log = console.debug || console.log || (() => {});
|
904
|
-
|
905
|
-
/**
|
906
|
-
* Save `namespaces`.
|
907
|
-
*
|
908
|
-
* @param {String} namespaces
|
909
|
-
* @api private
|
910
|
-
*/
|
911
|
-
function save(namespaces) {
|
912
|
-
try {
|
913
|
-
if (namespaces) {
|
914
|
-
exports.storage.setItem('debug', namespaces);
|
915
|
-
} else {
|
916
|
-
exports.storage.removeItem('debug');
|
917
|
-
}
|
918
|
-
} catch (error) {
|
919
|
-
// Swallow
|
920
|
-
// XXX (@Qix-) should we be logging these?
|
921
|
-
}
|
922
|
-
}
|
923
|
-
|
924
|
-
/**
|
925
|
-
* Load `namespaces`.
|
926
|
-
*
|
927
|
-
* @return {String} returns the previously persisted debug modes
|
928
|
-
* @api private
|
929
|
-
*/
|
930
|
-
function load() {
|
931
|
-
let r;
|
932
|
-
try {
|
933
|
-
r = exports.storage.getItem('debug');
|
934
|
-
} catch (error) {
|
935
|
-
// Swallow
|
936
|
-
// XXX (@Qix-) should we be logging these?
|
937
|
-
}
|
938
|
-
|
939
|
-
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
940
|
-
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
941
|
-
r = process.env.DEBUG;
|
942
|
-
}
|
943
|
-
|
944
|
-
return r;
|
945
|
-
}
|
946
|
-
|
947
|
-
/**
|
948
|
-
* Localstorage attempts to return the localstorage.
|
949
|
-
*
|
950
|
-
* This is necessary because safari throws
|
951
|
-
* when a user disables cookies/localstorage
|
952
|
-
* and you attempt to access it.
|
953
|
-
*
|
954
|
-
* @return {LocalStorage}
|
955
|
-
* @api private
|
956
|
-
*/
|
957
|
-
|
958
|
-
function localstorage() {
|
959
|
-
try {
|
960
|
-
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
961
|
-
// The Browser also has localStorage in the global context.
|
962
|
-
return localStorage;
|
963
|
-
} catch (error) {
|
964
|
-
// Swallow
|
965
|
-
// XXX (@Qix-) should we be logging these?
|
966
|
-
}
|
967
|
-
}
|
968
|
-
|
969
|
-
module.exports = requireCommon()(exports);
|
970
|
-
|
971
|
-
const {formatters} = module.exports;
|
972
|
-
|
973
|
-
/**
|
974
|
-
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
975
|
-
*/
|
976
|
-
|
977
|
-
formatters.j = function (v) {
|
978
|
-
try {
|
979
|
-
return JSON.stringify(v);
|
980
|
-
} catch (error) {
|
981
|
-
return '[UnexpectedJSONParseError]: ' + error.message;
|
982
|
-
}
|
983
|
-
};
|
984
|
-
} (browser, browser.exports));
|
985
|
-
return browser.exports;
|
986
|
-
}
|
987
|
-
|
988
|
-
var node = {exports: {}};
|
989
|
-
|
990
704
|
/**
|
991
705
|
* Module dependencies.
|
992
706
|
*/
|
993
707
|
|
994
|
-
|
708
|
+
(function (module, exports) {
|
709
|
+
const tty = require$$0;
|
710
|
+
const util = require$$1;
|
995
711
|
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
(function (module, exports) {
|
1000
|
-
const tty = require$$0;
|
1001
|
-
const util = require$$1;
|
712
|
+
/**
|
713
|
+
* This is the Node.js implementation of `debug()`.
|
714
|
+
*/
|
1002
715
|
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
716
|
+
exports.init = init;
|
717
|
+
exports.log = log;
|
718
|
+
exports.formatArgs = formatArgs;
|
719
|
+
exports.save = save;
|
720
|
+
exports.load = load;
|
721
|
+
exports.useColors = useColors;
|
722
|
+
exports.destroy = util.deprecate(
|
723
|
+
() => {},
|
724
|
+
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
|
725
|
+
);
|
1006
726
|
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
exports.save = save;
|
1011
|
-
exports.load = load;
|
1012
|
-
exports.useColors = useColors;
|
1013
|
-
exports.destroy = util.deprecate(
|
1014
|
-
() => {},
|
1015
|
-
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
|
1016
|
-
);
|
1017
|
-
|
1018
|
-
/**
|
1019
|
-
* Colors.
|
1020
|
-
*/
|
727
|
+
/**
|
728
|
+
* Colors.
|
729
|
+
*/
|
1021
730
|
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
731
|
+
exports.colors = [6, 2, 3, 4, 5, 1];
|
732
|
+
|
733
|
+
try {
|
734
|
+
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
735
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
736
|
+
const supportsColor = require('supports-color');
|
737
|
+
|
738
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
739
|
+
exports.colors = [
|
740
|
+
20,
|
741
|
+
21,
|
742
|
+
26,
|
743
|
+
27,
|
744
|
+
32,
|
745
|
+
33,
|
746
|
+
38,
|
747
|
+
39,
|
748
|
+
40,
|
749
|
+
41,
|
750
|
+
42,
|
751
|
+
43,
|
752
|
+
44,
|
753
|
+
45,
|
754
|
+
56,
|
755
|
+
57,
|
756
|
+
62,
|
757
|
+
63,
|
758
|
+
68,
|
759
|
+
69,
|
760
|
+
74,
|
761
|
+
75,
|
762
|
+
76,
|
763
|
+
77,
|
764
|
+
78,
|
765
|
+
79,
|
766
|
+
80,
|
767
|
+
81,
|
768
|
+
92,
|
769
|
+
93,
|
770
|
+
98,
|
771
|
+
99,
|
772
|
+
112,
|
773
|
+
113,
|
774
|
+
128,
|
775
|
+
129,
|
776
|
+
134,
|
777
|
+
135,
|
778
|
+
148,
|
779
|
+
149,
|
780
|
+
160,
|
781
|
+
161,
|
782
|
+
162,
|
783
|
+
163,
|
784
|
+
164,
|
785
|
+
165,
|
786
|
+
166,
|
787
|
+
167,
|
788
|
+
168,
|
789
|
+
169,
|
790
|
+
170,
|
791
|
+
171,
|
792
|
+
172,
|
793
|
+
173,
|
794
|
+
178,
|
795
|
+
179,
|
796
|
+
184,
|
797
|
+
185,
|
798
|
+
196,
|
799
|
+
197,
|
800
|
+
198,
|
801
|
+
199,
|
802
|
+
200,
|
803
|
+
201,
|
804
|
+
202,
|
805
|
+
203,
|
806
|
+
204,
|
807
|
+
205,
|
808
|
+
206,
|
809
|
+
207,
|
810
|
+
208,
|
811
|
+
209,
|
812
|
+
214,
|
813
|
+
215,
|
814
|
+
220,
|
815
|
+
221
|
816
|
+
];
|
817
|
+
}
|
818
|
+
} catch (error) {
|
819
|
+
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
|
820
|
+
}
|
1112
821
|
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
822
|
+
/**
|
823
|
+
* Build up the default `inspectOpts` object from the environment variables.
|
824
|
+
*
|
825
|
+
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
826
|
+
*/
|
1118
827
|
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
828
|
+
exports.inspectOpts = Object.keys(process.env).filter(key => {
|
829
|
+
return /^debug_/i.test(key);
|
830
|
+
}).reduce((obj, key) => {
|
831
|
+
// Camel-case
|
832
|
+
const prop = key
|
833
|
+
.substring(6)
|
834
|
+
.toLowerCase()
|
835
|
+
.replace(/_([a-z])/g, (_, k) => {
|
836
|
+
return k.toUpperCase();
|
837
|
+
});
|
1129
838
|
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
839
|
+
// Coerce string value into JS value
|
840
|
+
let val = process.env[key];
|
841
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
842
|
+
val = true;
|
843
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
844
|
+
val = false;
|
845
|
+
} else if (val === 'null') {
|
846
|
+
val = null;
|
847
|
+
} else {
|
848
|
+
val = Number(val);
|
849
|
+
}
|
1141
850
|
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
851
|
+
obj[prop] = val;
|
852
|
+
return obj;
|
853
|
+
}, {});
|
1145
854
|
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
855
|
+
/**
|
856
|
+
* Is stdout a TTY? Colored output is enabled when `true`.
|
857
|
+
*/
|
1149
858
|
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
859
|
+
function useColors() {
|
860
|
+
return 'colors' in exports.inspectOpts ?
|
861
|
+
Boolean(exports.inspectOpts.colors) :
|
862
|
+
tty.isatty(process.stderr.fd);
|
863
|
+
}
|
1155
864
|
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
865
|
+
/**
|
866
|
+
* Adds ANSI color escape codes if enabled.
|
867
|
+
*
|
868
|
+
* @api public
|
869
|
+
*/
|
1161
870
|
|
1162
|
-
|
1163
|
-
|
871
|
+
function formatArgs(args) {
|
872
|
+
const {namespace: name, useColors} = this;
|
1164
873
|
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
874
|
+
if (useColors) {
|
875
|
+
const c = this.color;
|
876
|
+
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
|
877
|
+
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
1169
878
|
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
}
|
879
|
+
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
|
880
|
+
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
|
881
|
+
} else {
|
882
|
+
args[0] = getDate() + name + ' ' + args[0];
|
1175
883
|
}
|
884
|
+
}
|
1176
885
|
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
}
|
1181
|
-
return new Date().toISOString() + ' ';
|
886
|
+
function getDate() {
|
887
|
+
if (exports.inspectOpts.hideDate) {
|
888
|
+
return '';
|
1182
889
|
}
|
890
|
+
return new Date().toISOString() + ' ';
|
891
|
+
}
|
1183
892
|
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
893
|
+
/**
|
894
|
+
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
|
895
|
+
*/
|
1187
896
|
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
897
|
+
function log(...args) {
|
898
|
+
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
|
899
|
+
}
|
1191
900
|
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
}
|
901
|
+
/**
|
902
|
+
* Save `namespaces`.
|
903
|
+
*
|
904
|
+
* @param {String} namespaces
|
905
|
+
* @api private
|
906
|
+
*/
|
907
|
+
function save(namespaces) {
|
908
|
+
if (namespaces) {
|
909
|
+
process.env.DEBUG = namespaces;
|
910
|
+
} else {
|
911
|
+
// If you set a process.env field to null or undefined, it gets cast to the
|
912
|
+
// string 'null' or 'undefined'. Just delete instead.
|
913
|
+
delete process.env.DEBUG;
|
1206
914
|
}
|
915
|
+
}
|
1207
916
|
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
917
|
+
/**
|
918
|
+
* Load `namespaces`.
|
919
|
+
*
|
920
|
+
* @return {String} returns the previously persisted debug modes
|
921
|
+
* @api private
|
922
|
+
*/
|
1214
923
|
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
924
|
+
function load() {
|
925
|
+
return process.env.DEBUG;
|
926
|
+
}
|
1218
927
|
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
928
|
+
/**
|
929
|
+
* Init logic for `debug` instances.
|
930
|
+
*
|
931
|
+
* Create a new `inspectOpts` object in case `useColors` is set
|
932
|
+
* differently for a particular `debug` instance.
|
933
|
+
*/
|
1225
934
|
|
1226
|
-
|
1227
|
-
|
935
|
+
function init(debug) {
|
936
|
+
debug.inspectOpts = {};
|
1228
937
|
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
}
|
938
|
+
const keys = Object.keys(exports.inspectOpts);
|
939
|
+
for (let i = 0; i < keys.length; i++) {
|
940
|
+
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
1233
941
|
}
|
942
|
+
}
|
1234
943
|
|
1235
|
-
|
1236
|
-
|
1237
|
-
const {formatters} = module.exports;
|
944
|
+
module.exports = requireCommon()(exports);
|
1238
945
|
|
1239
|
-
|
1240
|
-
* Map %o to `util.inspect()`, all on a single line.
|
1241
|
-
*/
|
946
|
+
const {formatters} = module.exports;
|
1242
947
|
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
.split('\n')
|
1247
|
-
.map(str => str.trim())
|
1248
|
-
.join(' ');
|
1249
|
-
};
|
1250
|
-
|
1251
|
-
/**
|
1252
|
-
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
1253
|
-
*/
|
948
|
+
/**
|
949
|
+
* Map %o to `util.inspect()`, all on a single line.
|
950
|
+
*/
|
1254
951
|
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
}
|
952
|
+
formatters.o = function (v) {
|
953
|
+
this.inspectOpts.colors = this.useColors;
|
954
|
+
return util.inspect(v, this.inspectOpts)
|
955
|
+
.split('\n')
|
956
|
+
.map(str => str.trim())
|
957
|
+
.join(' ');
|
958
|
+
};
|
1262
959
|
|
1263
|
-
/**
|
1264
|
-
|
1265
|
-
|
1266
|
-
*/
|
960
|
+
/**
|
961
|
+
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
962
|
+
*/
|
1267
963
|
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
}
|
964
|
+
formatters.O = function (v) {
|
965
|
+
this.inspectOpts.colors = this.useColors;
|
966
|
+
return util.inspect(v, this.inspectOpts);
|
967
|
+
};
|
968
|
+
} (node, node.exports));
|
1273
969
|
|
1274
|
-
var
|
1275
|
-
var debug$3 = /*@__PURE__*/getDefaultExportFromCjs(
|
970
|
+
var nodeExports = node.exports;
|
971
|
+
var debug$3 = /*@__PURE__*/getDefaultExportFromCjs(nodeExports);
|
1276
972
|
|
1277
973
|
// Helper since Typescript can't detect readonly arrays with Array.isArray
|
1278
974
|
function isArray(arg) {
|
@@ -4196,16 +3892,19 @@ var expand_1 = expand;
|
|
4196
3892
|
|
4197
3893
|
const debug = createDebugger("vite:env");
|
4198
3894
|
function getEnvFilesForMode(mode, envDir) {
|
4199
|
-
|
4200
|
-
|
4201
|
-
|
4202
|
-
|
4203
|
-
|
4204
|
-
|
4205
|
-
|
4206
|
-
|
4207
|
-
|
4208
|
-
|
3895
|
+
if (envDir !== false) {
|
3896
|
+
return [
|
3897
|
+
/** default file */
|
3898
|
+
`.env`,
|
3899
|
+
/** local file */
|
3900
|
+
`.env.local`,
|
3901
|
+
/** mode file */
|
3902
|
+
`.env.${mode}`,
|
3903
|
+
/** mode local file */
|
3904
|
+
`.env.${mode}.local`
|
3905
|
+
].map((file) => normalizePath(path$1.join(envDir, file)));
|
3906
|
+
}
|
3907
|
+
return [];
|
4209
3908
|
}
|
4210
3909
|
function loadEnv(mode, envDir, prefixes = "VITE_") {
|
4211
3910
|
const start = performance.now();
|