@spfunctions/cli 1.7.36 → 1.7.38

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/830.index.js CHANGED
@@ -1 +1,1199 @@
1
- exports.id=830,exports.ids=[830],exports.modules={6110:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let s=0,n=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(s++,"%c"===e&&(n=s))}),t.splice(n,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(40897)(t);const{formatters:s}=e.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},40897:(e,t,r)=>{e.exports=function(e){function t(e){let r,n,o,i=null;function c(...e){if(!c.enabled)return;const s=c,n=Number(new Date),o=n-(r||n);s.diff=o,s.prev=r,s.curr=n,r=n,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,n)=>{if("%%"===r)return"%";i++;const o=t.formatters[n];if("function"==typeof o){const t=e[i];r=o.call(s,t),e.splice(i,1),i--}return r}),t.formatArgs.call(s,e);(s.log||t.log).apply(s,e)}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=s,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(n!==t.namespaces&&(n=t.namespaces,o=t.enabled(e)),o),set:e=>{i=e}}),"function"==typeof t.init&&t.init(c),c}function s(e,r){const s=t(this.namespace+(void 0===r?":":r)+e);return s.log=this.log,s}function n(e,t){let r=0,s=0,n=-1,o=0;for(;r<e.length;)if(s<t.length&&(t[s]===e[r]||"*"===t[s]))"*"===t[s]?(n=s,o=r,s++):(r++,s++);else{if(-1===n)return!1;s=n+1,o++,r=o}for(;s<t.length&&"*"===t[s];)s++;return s===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of r)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const r of t.skips)if(n(e,r))return!1;for(const r of t.names)if(n(e,r))return!0;return!1},t.humanize=r(70744),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},2830:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(6110):e.exports=r(95108)},95108:(e,t,r)=>{const s=r(52018),n=r(39023);t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let s=0;s<r.length;s++)e.inspectOpts[r[s]]=t.inspectOpts[r[s]]},t.log=function(...e){return process.stderr.write(n.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(r){const{namespace:s,useColors:n}=this;if(n){const t=this.color,n="[3"+(t<8?t:"8;5;"+t),o=` ${n};1m${s} `;r[0]=o+r[0].split("\n").join("\n"+o),r.push(n+"m+"+e.exports.humanize(this.diff)+"")}else r[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+s+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):s.isatty(process.stderr.fd)},t.destroy=n.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=r(2428);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase());let s=process.env[t];return s=!!/^(yes|on|true|enabled)$/i.test(s)||!/^(no|off|false|disabled)$/i.test(s)&&("null"===s?null:Number(s)),e[r]=s,e},{}),e.exports=r(40897)(t);const{formatters:o}=e.exports;o.o=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},o.O=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts)}},70744:e=>{var t=1e3,r=60*t,s=60*r,n=24*s,o=7*n,i=365.25*n;function c(e,t,r,s){var n=t>=1.5*r;return Math.round(e/r)+" "+s+(n?"s":"")}e.exports=function(e,a){a=a||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!c)return;var a=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"weeks":case"week":case"w":return a*o;case"days":case"day":case"d":return a*n;case"hours":case"hour":case"hrs":case"hr":case"h":return a*s;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&isFinite(e))return a.long?function(e){var o=Math.abs(e);if(o>=n)return c(e,o,n,"day");if(o>=s)return c(e,o,s,"hour");if(o>=r)return c(e,o,r,"minute");if(o>=t)return c(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=n)return Math.round(e/n)+"d";if(o>=s)return Math.round(e/s)+"h";if(o>=r)return Math.round(e/r)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},19803:e=>{"use strict";e.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",s=t.indexOf(r+e),n=t.indexOf("--");return-1!==s&&(-1===n||s<n)}},2428:(e,t,r)=>{"use strict";const s=r(70857),n=r(52018),o=r(19803),{env:i}=process;let c;function a(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function u(e,t){if(0===c)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(e&&!t&&void 0===c)return 0;const r=c||0;if("dumb"===i.TERM)return r;if("win32"===process.platform){const e=s.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in i)||"codeship"===i.CI_NAME?1:r;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){const e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:r}o("no-color")||o("no-colors")||o("color=false")||o("color=never")?c=0:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(c=1),"FORCE_COLOR"in i&&(c="true"===i.FORCE_COLOR?1:"false"===i.FORCE_COLOR?0:0===i.FORCE_COLOR.length?1:Math.min(parseInt(i.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return a(u(e,e&&e.isTTY))},stdout:a(u(!0,n.isatty(1))),stderr:a(u(!0,n.isatty(2)))}}};
1
+ exports.id = 830;
2
+ exports.ids = [830];
3
+ exports.modules = {
4
+
5
+ /***/ 6110:
6
+ /***/ ((module, exports, __webpack_require__) => {
7
+
8
+ /* eslint-env browser */
9
+
10
+ /**
11
+ * This is the web browser implementation of `debug()`.
12
+ */
13
+
14
+ exports.formatArgs = formatArgs;
15
+ exports.save = save;
16
+ exports.load = load;
17
+ exports.useColors = useColors;
18
+ exports.storage = localstorage();
19
+ exports.destroy = (() => {
20
+ let warned = false;
21
+
22
+ return () => {
23
+ if (!warned) {
24
+ warned = true;
25
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
26
+ }
27
+ };
28
+ })();
29
+
30
+ /**
31
+ * Colors.
32
+ */
33
+
34
+ exports.colors = [
35
+ '#0000CC',
36
+ '#0000FF',
37
+ '#0033CC',
38
+ '#0033FF',
39
+ '#0066CC',
40
+ '#0066FF',
41
+ '#0099CC',
42
+ '#0099FF',
43
+ '#00CC00',
44
+ '#00CC33',
45
+ '#00CC66',
46
+ '#00CC99',
47
+ '#00CCCC',
48
+ '#00CCFF',
49
+ '#3300CC',
50
+ '#3300FF',
51
+ '#3333CC',
52
+ '#3333FF',
53
+ '#3366CC',
54
+ '#3366FF',
55
+ '#3399CC',
56
+ '#3399FF',
57
+ '#33CC00',
58
+ '#33CC33',
59
+ '#33CC66',
60
+ '#33CC99',
61
+ '#33CCCC',
62
+ '#33CCFF',
63
+ '#6600CC',
64
+ '#6600FF',
65
+ '#6633CC',
66
+ '#6633FF',
67
+ '#66CC00',
68
+ '#66CC33',
69
+ '#9900CC',
70
+ '#9900FF',
71
+ '#9933CC',
72
+ '#9933FF',
73
+ '#99CC00',
74
+ '#99CC33',
75
+ '#CC0000',
76
+ '#CC0033',
77
+ '#CC0066',
78
+ '#CC0099',
79
+ '#CC00CC',
80
+ '#CC00FF',
81
+ '#CC3300',
82
+ '#CC3333',
83
+ '#CC3366',
84
+ '#CC3399',
85
+ '#CC33CC',
86
+ '#CC33FF',
87
+ '#CC6600',
88
+ '#CC6633',
89
+ '#CC9900',
90
+ '#CC9933',
91
+ '#CCCC00',
92
+ '#CCCC33',
93
+ '#FF0000',
94
+ '#FF0033',
95
+ '#FF0066',
96
+ '#FF0099',
97
+ '#FF00CC',
98
+ '#FF00FF',
99
+ '#FF3300',
100
+ '#FF3333',
101
+ '#FF3366',
102
+ '#FF3399',
103
+ '#FF33CC',
104
+ '#FF33FF',
105
+ '#FF6600',
106
+ '#FF6633',
107
+ '#FF9900',
108
+ '#FF9933',
109
+ '#FFCC00',
110
+ '#FFCC33'
111
+ ];
112
+
113
+ /**
114
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
115
+ * and the Firebug extension (any Firefox version) are known
116
+ * to support "%c" CSS customizations.
117
+ *
118
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
119
+ */
120
+
121
+ // eslint-disable-next-line complexity
122
+ function useColors() {
123
+ // NB: In an Electron preload script, document will be defined but not fully
124
+ // initialized. Since we know we're in Chrome, we'll just detect this case
125
+ // explicitly
126
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
127
+ return true;
128
+ }
129
+
130
+ // Internet Explorer and Edge do not support colors.
131
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
132
+ return false;
133
+ }
134
+
135
+ let m;
136
+
137
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
138
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
139
+ // eslint-disable-next-line no-return-assign
140
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
141
+ // Is firebug? http://stackoverflow.com/a/398120/376773
142
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
143
+ // Is firefox >= v31?
144
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
145
+ (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
146
+ // Double check webkit in userAgent just in case we are in a worker
147
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
148
+ }
149
+
150
+ /**
151
+ * Colorize log arguments if enabled.
152
+ *
153
+ * @api public
154
+ */
155
+
156
+ function formatArgs(args) {
157
+ args[0] = (this.useColors ? '%c' : '') +
158
+ this.namespace +
159
+ (this.useColors ? ' %c' : ' ') +
160
+ args[0] +
161
+ (this.useColors ? '%c ' : ' ') +
162
+ '+' + module.exports.humanize(this.diff);
163
+
164
+ if (!this.useColors) {
165
+ return;
166
+ }
167
+
168
+ const c = 'color: ' + this.color;
169
+ args.splice(1, 0, c, 'color: inherit');
170
+
171
+ // The final "%c" is somewhat tricky, because there could be other
172
+ // arguments passed either before or after the %c, so we need to
173
+ // figure out the correct index to insert the CSS into
174
+ let index = 0;
175
+ let lastC = 0;
176
+ args[0].replace(/%[a-zA-Z%]/g, match => {
177
+ if (match === '%%') {
178
+ return;
179
+ }
180
+ index++;
181
+ if (match === '%c') {
182
+ // We only are interested in the *last* %c
183
+ // (the user may have provided their own)
184
+ lastC = index;
185
+ }
186
+ });
187
+
188
+ args.splice(lastC, 0, c);
189
+ }
190
+
191
+ /**
192
+ * Invokes `console.debug()` when available.
193
+ * No-op when `console.debug` is not a "function".
194
+ * If `console.debug` is not available, falls back
195
+ * to `console.log`.
196
+ *
197
+ * @api public
198
+ */
199
+ exports.log = console.debug || console.log || (() => {});
200
+
201
+ /**
202
+ * Save `namespaces`.
203
+ *
204
+ * @param {String} namespaces
205
+ * @api private
206
+ */
207
+ function save(namespaces) {
208
+ try {
209
+ if (namespaces) {
210
+ exports.storage.setItem('debug', namespaces);
211
+ } else {
212
+ exports.storage.removeItem('debug');
213
+ }
214
+ } catch (error) {
215
+ // Swallow
216
+ // XXX (@Qix-) should we be logging these?
217
+ }
218
+ }
219
+
220
+ /**
221
+ * Load `namespaces`.
222
+ *
223
+ * @return {String} returns the previously persisted debug modes
224
+ * @api private
225
+ */
226
+ function load() {
227
+ let r;
228
+ try {
229
+ r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
230
+ } catch (error) {
231
+ // Swallow
232
+ // XXX (@Qix-) should we be logging these?
233
+ }
234
+
235
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
236
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
237
+ r = process.env.DEBUG;
238
+ }
239
+
240
+ return r;
241
+ }
242
+
243
+ /**
244
+ * Localstorage attempts to return the localstorage.
245
+ *
246
+ * This is necessary because safari throws
247
+ * when a user disables cookies/localstorage
248
+ * and you attempt to access it.
249
+ *
250
+ * @return {LocalStorage}
251
+ * @api private
252
+ */
253
+
254
+ function localstorage() {
255
+ try {
256
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
257
+ // The Browser also has localStorage in the global context.
258
+ return localStorage;
259
+ } catch (error) {
260
+ // Swallow
261
+ // XXX (@Qix-) should we be logging these?
262
+ }
263
+ }
264
+
265
+ module.exports = __webpack_require__(40897)(exports);
266
+
267
+ const {formatters} = module.exports;
268
+
269
+ /**
270
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
271
+ */
272
+
273
+ formatters.j = function (v) {
274
+ try {
275
+ return JSON.stringify(v);
276
+ } catch (error) {
277
+ return '[UnexpectedJSONParseError]: ' + error.message;
278
+ }
279
+ };
280
+
281
+
282
+ /***/ }),
283
+
284
+ /***/ 40897:
285
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
286
+
287
+
288
+ /**
289
+ * This is the common logic for both the Node.js and web browser
290
+ * implementations of `debug()`.
291
+ */
292
+
293
+ function setup(env) {
294
+ createDebug.debug = createDebug;
295
+ createDebug.default = createDebug;
296
+ createDebug.coerce = coerce;
297
+ createDebug.disable = disable;
298
+ createDebug.enable = enable;
299
+ createDebug.enabled = enabled;
300
+ createDebug.humanize = __webpack_require__(70744);
301
+ createDebug.destroy = destroy;
302
+
303
+ Object.keys(env).forEach(key => {
304
+ createDebug[key] = env[key];
305
+ });
306
+
307
+ /**
308
+ * The currently active debug mode names, and names to skip.
309
+ */
310
+
311
+ createDebug.names = [];
312
+ createDebug.skips = [];
313
+
314
+ /**
315
+ * Map of special "%n" handling functions, for the debug "format" argument.
316
+ *
317
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
318
+ */
319
+ createDebug.formatters = {};
320
+
321
+ /**
322
+ * Selects a color for a debug namespace
323
+ * @param {String} namespace The namespace string for the debug instance to be colored
324
+ * @return {Number|String} An ANSI color code for the given namespace
325
+ * @api private
326
+ */
327
+ function selectColor(namespace) {
328
+ let hash = 0;
329
+
330
+ for (let i = 0; i < namespace.length; i++) {
331
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
332
+ hash |= 0; // Convert to 32bit integer
333
+ }
334
+
335
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
336
+ }
337
+ createDebug.selectColor = selectColor;
338
+
339
+ /**
340
+ * Create a debugger with the given `namespace`.
341
+ *
342
+ * @param {String} namespace
343
+ * @return {Function}
344
+ * @api public
345
+ */
346
+ function createDebug(namespace) {
347
+ let prevTime;
348
+ let enableOverride = null;
349
+ let namespacesCache;
350
+ let enabledCache;
351
+
352
+ function debug(...args) {
353
+ // Disabled?
354
+ if (!debug.enabled) {
355
+ return;
356
+ }
357
+
358
+ const self = debug;
359
+
360
+ // Set `diff` timestamp
361
+ const curr = Number(new Date());
362
+ const ms = curr - (prevTime || curr);
363
+ self.diff = ms;
364
+ self.prev = prevTime;
365
+ self.curr = curr;
366
+ prevTime = curr;
367
+
368
+ args[0] = createDebug.coerce(args[0]);
369
+
370
+ if (typeof args[0] !== 'string') {
371
+ // Anything else let's inspect with %O
372
+ args.unshift('%O');
373
+ }
374
+
375
+ // Apply any `formatters` transformations
376
+ let index = 0;
377
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
378
+ // If we encounter an escaped % then don't increase the array index
379
+ if (match === '%%') {
380
+ return '%';
381
+ }
382
+ index++;
383
+ const formatter = createDebug.formatters[format];
384
+ if (typeof formatter === 'function') {
385
+ const val = args[index];
386
+ match = formatter.call(self, val);
387
+
388
+ // Now we need to remove `args[index]` since it's inlined in the `format`
389
+ args.splice(index, 1);
390
+ index--;
391
+ }
392
+ return match;
393
+ });
394
+
395
+ // Apply env-specific formatting (colors, etc.)
396
+ createDebug.formatArgs.call(self, args);
397
+
398
+ const logFn = self.log || createDebug.log;
399
+ logFn.apply(self, args);
400
+ }
401
+
402
+ debug.namespace = namespace;
403
+ debug.useColors = createDebug.useColors();
404
+ debug.color = createDebug.selectColor(namespace);
405
+ debug.extend = extend;
406
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
407
+
408
+ Object.defineProperty(debug, 'enabled', {
409
+ enumerable: true,
410
+ configurable: false,
411
+ get: () => {
412
+ if (enableOverride !== null) {
413
+ return enableOverride;
414
+ }
415
+ if (namespacesCache !== createDebug.namespaces) {
416
+ namespacesCache = createDebug.namespaces;
417
+ enabledCache = createDebug.enabled(namespace);
418
+ }
419
+
420
+ return enabledCache;
421
+ },
422
+ set: v => {
423
+ enableOverride = v;
424
+ }
425
+ });
426
+
427
+ // Env-specific initialization logic for debug instances
428
+ if (typeof createDebug.init === 'function') {
429
+ createDebug.init(debug);
430
+ }
431
+
432
+ return debug;
433
+ }
434
+
435
+ function extend(namespace, delimiter) {
436
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
437
+ newDebug.log = this.log;
438
+ return newDebug;
439
+ }
440
+
441
+ /**
442
+ * Enables a debug mode by namespaces. This can include modes
443
+ * separated by a colon and wildcards.
444
+ *
445
+ * @param {String} namespaces
446
+ * @api public
447
+ */
448
+ function enable(namespaces) {
449
+ createDebug.save(namespaces);
450
+ createDebug.namespaces = namespaces;
451
+
452
+ createDebug.names = [];
453
+ createDebug.skips = [];
454
+
455
+ const split = (typeof namespaces === 'string' ? namespaces : '')
456
+ .trim()
457
+ .replace(/\s+/g, ',')
458
+ .split(',')
459
+ .filter(Boolean);
460
+
461
+ for (const ns of split) {
462
+ if (ns[0] === '-') {
463
+ createDebug.skips.push(ns.slice(1));
464
+ } else {
465
+ createDebug.names.push(ns);
466
+ }
467
+ }
468
+ }
469
+
470
+ /**
471
+ * Checks if the given string matches a namespace template, honoring
472
+ * asterisks as wildcards.
473
+ *
474
+ * @param {String} search
475
+ * @param {String} template
476
+ * @return {Boolean}
477
+ */
478
+ function matchesTemplate(search, template) {
479
+ let searchIndex = 0;
480
+ let templateIndex = 0;
481
+ let starIndex = -1;
482
+ let matchIndex = 0;
483
+
484
+ while (searchIndex < search.length) {
485
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
486
+ // Match character or proceed with wildcard
487
+ if (template[templateIndex] === '*') {
488
+ starIndex = templateIndex;
489
+ matchIndex = searchIndex;
490
+ templateIndex++; // Skip the '*'
491
+ } else {
492
+ searchIndex++;
493
+ templateIndex++;
494
+ }
495
+ } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
496
+ // Backtrack to the last '*' and try to match more characters
497
+ templateIndex = starIndex + 1;
498
+ matchIndex++;
499
+ searchIndex = matchIndex;
500
+ } else {
501
+ return false; // No match
502
+ }
503
+ }
504
+
505
+ // Handle trailing '*' in template
506
+ while (templateIndex < template.length && template[templateIndex] === '*') {
507
+ templateIndex++;
508
+ }
509
+
510
+ return templateIndex === template.length;
511
+ }
512
+
513
+ /**
514
+ * Disable debug output.
515
+ *
516
+ * @return {String} namespaces
517
+ * @api public
518
+ */
519
+ function disable() {
520
+ const namespaces = [
521
+ ...createDebug.names,
522
+ ...createDebug.skips.map(namespace => '-' + namespace)
523
+ ].join(',');
524
+ createDebug.enable('');
525
+ return namespaces;
526
+ }
527
+
528
+ /**
529
+ * Returns true if the given mode name is enabled, false otherwise.
530
+ *
531
+ * @param {String} name
532
+ * @return {Boolean}
533
+ * @api public
534
+ */
535
+ function enabled(name) {
536
+ for (const skip of createDebug.skips) {
537
+ if (matchesTemplate(name, skip)) {
538
+ return false;
539
+ }
540
+ }
541
+
542
+ for (const ns of createDebug.names) {
543
+ if (matchesTemplate(name, ns)) {
544
+ return true;
545
+ }
546
+ }
547
+
548
+ return false;
549
+ }
550
+
551
+ /**
552
+ * Coerce `val`.
553
+ *
554
+ * @param {Mixed} val
555
+ * @return {Mixed}
556
+ * @api private
557
+ */
558
+ function coerce(val) {
559
+ if (val instanceof Error) {
560
+ return val.stack || val.message;
561
+ }
562
+ return val;
563
+ }
564
+
565
+ /**
566
+ * XXX DO NOT USE. This is a temporary stub function.
567
+ * XXX It WILL be removed in the next major release.
568
+ */
569
+ function destroy() {
570
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
571
+ }
572
+
573
+ createDebug.enable(createDebug.load());
574
+
575
+ return createDebug;
576
+ }
577
+
578
+ module.exports = setup;
579
+
580
+
581
+ /***/ }),
582
+
583
+ /***/ 2830:
584
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
585
+
586
+ /**
587
+ * Detect Electron renderer / nwjs process, which is node, but we should
588
+ * treat as a browser.
589
+ */
590
+
591
+ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
592
+ module.exports = __webpack_require__(6110);
593
+ } else {
594
+ module.exports = __webpack_require__(95108);
595
+ }
596
+
597
+
598
+ /***/ }),
599
+
600
+ /***/ 95108:
601
+ /***/ ((module, exports, __webpack_require__) => {
602
+
603
+ /**
604
+ * Module dependencies.
605
+ */
606
+
607
+ const tty = __webpack_require__(52018);
608
+ const util = __webpack_require__(39023);
609
+
610
+ /**
611
+ * This is the Node.js implementation of `debug()`.
612
+ */
613
+
614
+ exports.init = init;
615
+ exports.log = log;
616
+ exports.formatArgs = formatArgs;
617
+ exports.save = save;
618
+ exports.load = load;
619
+ exports.useColors = useColors;
620
+ exports.destroy = util.deprecate(
621
+ () => {},
622
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
623
+ );
624
+
625
+ /**
626
+ * Colors.
627
+ */
628
+
629
+ exports.colors = [6, 2, 3, 4, 5, 1];
630
+
631
+ try {
632
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
633
+ // eslint-disable-next-line import/no-extraneous-dependencies
634
+ const supportsColor = __webpack_require__(2428);
635
+
636
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
637
+ exports.colors = [
638
+ 20,
639
+ 21,
640
+ 26,
641
+ 27,
642
+ 32,
643
+ 33,
644
+ 38,
645
+ 39,
646
+ 40,
647
+ 41,
648
+ 42,
649
+ 43,
650
+ 44,
651
+ 45,
652
+ 56,
653
+ 57,
654
+ 62,
655
+ 63,
656
+ 68,
657
+ 69,
658
+ 74,
659
+ 75,
660
+ 76,
661
+ 77,
662
+ 78,
663
+ 79,
664
+ 80,
665
+ 81,
666
+ 92,
667
+ 93,
668
+ 98,
669
+ 99,
670
+ 112,
671
+ 113,
672
+ 128,
673
+ 129,
674
+ 134,
675
+ 135,
676
+ 148,
677
+ 149,
678
+ 160,
679
+ 161,
680
+ 162,
681
+ 163,
682
+ 164,
683
+ 165,
684
+ 166,
685
+ 167,
686
+ 168,
687
+ 169,
688
+ 170,
689
+ 171,
690
+ 172,
691
+ 173,
692
+ 178,
693
+ 179,
694
+ 184,
695
+ 185,
696
+ 196,
697
+ 197,
698
+ 198,
699
+ 199,
700
+ 200,
701
+ 201,
702
+ 202,
703
+ 203,
704
+ 204,
705
+ 205,
706
+ 206,
707
+ 207,
708
+ 208,
709
+ 209,
710
+ 214,
711
+ 215,
712
+ 220,
713
+ 221
714
+ ];
715
+ }
716
+ } catch (error) {
717
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
718
+ }
719
+
720
+ /**
721
+ * Build up the default `inspectOpts` object from the environment variables.
722
+ *
723
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
724
+ */
725
+
726
+ exports.inspectOpts = Object.keys(process.env).filter(key => {
727
+ return /^debug_/i.test(key);
728
+ }).reduce((obj, key) => {
729
+ // Camel-case
730
+ const prop = key
731
+ .substring(6)
732
+ .toLowerCase()
733
+ .replace(/_([a-z])/g, (_, k) => {
734
+ return k.toUpperCase();
735
+ });
736
+
737
+ // Coerce string value into JS value
738
+ let val = process.env[key];
739
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
740
+ val = true;
741
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
742
+ val = false;
743
+ } else if (val === 'null') {
744
+ val = null;
745
+ } else {
746
+ val = Number(val);
747
+ }
748
+
749
+ obj[prop] = val;
750
+ return obj;
751
+ }, {});
752
+
753
+ /**
754
+ * Is stdout a TTY? Colored output is enabled when `true`.
755
+ */
756
+
757
+ function useColors() {
758
+ return 'colors' in exports.inspectOpts ?
759
+ Boolean(exports.inspectOpts.colors) :
760
+ tty.isatty(process.stderr.fd);
761
+ }
762
+
763
+ /**
764
+ * Adds ANSI color escape codes if enabled.
765
+ *
766
+ * @api public
767
+ */
768
+
769
+ function formatArgs(args) {
770
+ const {namespace: name, useColors} = this;
771
+
772
+ if (useColors) {
773
+ const c = this.color;
774
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
775
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
776
+
777
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
778
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
779
+ } else {
780
+ args[0] = getDate() + name + ' ' + args[0];
781
+ }
782
+ }
783
+
784
+ function getDate() {
785
+ if (exports.inspectOpts.hideDate) {
786
+ return '';
787
+ }
788
+ return new Date().toISOString() + ' ';
789
+ }
790
+
791
+ /**
792
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
793
+ */
794
+
795
+ function log(...args) {
796
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
797
+ }
798
+
799
+ /**
800
+ * Save `namespaces`.
801
+ *
802
+ * @param {String} namespaces
803
+ * @api private
804
+ */
805
+ function save(namespaces) {
806
+ if (namespaces) {
807
+ process.env.DEBUG = namespaces;
808
+ } else {
809
+ // If you set a process.env field to null or undefined, it gets cast to the
810
+ // string 'null' or 'undefined'. Just delete instead.
811
+ delete process.env.DEBUG;
812
+ }
813
+ }
814
+
815
+ /**
816
+ * Load `namespaces`.
817
+ *
818
+ * @return {String} returns the previously persisted debug modes
819
+ * @api private
820
+ */
821
+
822
+ function load() {
823
+ return process.env.DEBUG;
824
+ }
825
+
826
+ /**
827
+ * Init logic for `debug` instances.
828
+ *
829
+ * Create a new `inspectOpts` object in case `useColors` is set
830
+ * differently for a particular `debug` instance.
831
+ */
832
+
833
+ function init(debug) {
834
+ debug.inspectOpts = {};
835
+
836
+ const keys = Object.keys(exports.inspectOpts);
837
+ for (let i = 0; i < keys.length; i++) {
838
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
839
+ }
840
+ }
841
+
842
+ module.exports = __webpack_require__(40897)(exports);
843
+
844
+ const {formatters} = module.exports;
845
+
846
+ /**
847
+ * Map %o to `util.inspect()`, all on a single line.
848
+ */
849
+
850
+ formatters.o = function (v) {
851
+ this.inspectOpts.colors = this.useColors;
852
+ return util.inspect(v, this.inspectOpts)
853
+ .split('\n')
854
+ .map(str => str.trim())
855
+ .join(' ');
856
+ };
857
+
858
+ /**
859
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
860
+ */
861
+
862
+ formatters.O = function (v) {
863
+ this.inspectOpts.colors = this.useColors;
864
+ return util.inspect(v, this.inspectOpts);
865
+ };
866
+
867
+
868
+ /***/ }),
869
+
870
+ /***/ 70744:
871
+ /***/ ((module) => {
872
+
873
+ /**
874
+ * Helpers.
875
+ */
876
+
877
+ var s = 1000;
878
+ var m = s * 60;
879
+ var h = m * 60;
880
+ var d = h * 24;
881
+ var w = d * 7;
882
+ var y = d * 365.25;
883
+
884
+ /**
885
+ * Parse or format the given `val`.
886
+ *
887
+ * Options:
888
+ *
889
+ * - `long` verbose formatting [false]
890
+ *
891
+ * @param {String|Number} val
892
+ * @param {Object} [options]
893
+ * @throws {Error} throw an error if val is not a non-empty string or a number
894
+ * @return {String|Number}
895
+ * @api public
896
+ */
897
+
898
+ module.exports = function (val, options) {
899
+ options = options || {};
900
+ var type = typeof val;
901
+ if (type === 'string' && val.length > 0) {
902
+ return parse(val);
903
+ } else if (type === 'number' && isFinite(val)) {
904
+ return options.long ? fmtLong(val) : fmtShort(val);
905
+ }
906
+ throw new Error(
907
+ 'val is not a non-empty string or a valid number. val=' +
908
+ JSON.stringify(val)
909
+ );
910
+ };
911
+
912
+ /**
913
+ * Parse the given `str` and return milliseconds.
914
+ *
915
+ * @param {String} str
916
+ * @return {Number}
917
+ * @api private
918
+ */
919
+
920
+ function parse(str) {
921
+ str = String(str);
922
+ if (str.length > 100) {
923
+ return;
924
+ }
925
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
926
+ str
927
+ );
928
+ if (!match) {
929
+ return;
930
+ }
931
+ var n = parseFloat(match[1]);
932
+ var type = (match[2] || 'ms').toLowerCase();
933
+ switch (type) {
934
+ case 'years':
935
+ case 'year':
936
+ case 'yrs':
937
+ case 'yr':
938
+ case 'y':
939
+ return n * y;
940
+ case 'weeks':
941
+ case 'week':
942
+ case 'w':
943
+ return n * w;
944
+ case 'days':
945
+ case 'day':
946
+ case 'd':
947
+ return n * d;
948
+ case 'hours':
949
+ case 'hour':
950
+ case 'hrs':
951
+ case 'hr':
952
+ case 'h':
953
+ return n * h;
954
+ case 'minutes':
955
+ case 'minute':
956
+ case 'mins':
957
+ case 'min':
958
+ case 'm':
959
+ return n * m;
960
+ case 'seconds':
961
+ case 'second':
962
+ case 'secs':
963
+ case 'sec':
964
+ case 's':
965
+ return n * s;
966
+ case 'milliseconds':
967
+ case 'millisecond':
968
+ case 'msecs':
969
+ case 'msec':
970
+ case 'ms':
971
+ return n;
972
+ default:
973
+ return undefined;
974
+ }
975
+ }
976
+
977
+ /**
978
+ * Short format for `ms`.
979
+ *
980
+ * @param {Number} ms
981
+ * @return {String}
982
+ * @api private
983
+ */
984
+
985
+ function fmtShort(ms) {
986
+ var msAbs = Math.abs(ms);
987
+ if (msAbs >= d) {
988
+ return Math.round(ms / d) + 'd';
989
+ }
990
+ if (msAbs >= h) {
991
+ return Math.round(ms / h) + 'h';
992
+ }
993
+ if (msAbs >= m) {
994
+ return Math.round(ms / m) + 'm';
995
+ }
996
+ if (msAbs >= s) {
997
+ return Math.round(ms / s) + 's';
998
+ }
999
+ return ms + 'ms';
1000
+ }
1001
+
1002
+ /**
1003
+ * Long format for `ms`.
1004
+ *
1005
+ * @param {Number} ms
1006
+ * @return {String}
1007
+ * @api private
1008
+ */
1009
+
1010
+ function fmtLong(ms) {
1011
+ var msAbs = Math.abs(ms);
1012
+ if (msAbs >= d) {
1013
+ return plural(ms, msAbs, d, 'day');
1014
+ }
1015
+ if (msAbs >= h) {
1016
+ return plural(ms, msAbs, h, 'hour');
1017
+ }
1018
+ if (msAbs >= m) {
1019
+ return plural(ms, msAbs, m, 'minute');
1020
+ }
1021
+ if (msAbs >= s) {
1022
+ return plural(ms, msAbs, s, 'second');
1023
+ }
1024
+ return ms + ' ms';
1025
+ }
1026
+
1027
+ /**
1028
+ * Pluralization helper.
1029
+ */
1030
+
1031
+ function plural(ms, msAbs, n, name) {
1032
+ var isPlural = msAbs >= n * 1.5;
1033
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
1034
+ }
1035
+
1036
+
1037
+ /***/ }),
1038
+
1039
+ /***/ 19803:
1040
+ /***/ ((module) => {
1041
+
1042
+ "use strict";
1043
+
1044
+
1045
+ module.exports = (flag, argv = process.argv) => {
1046
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
1047
+ const position = argv.indexOf(prefix + flag);
1048
+ const terminatorPosition = argv.indexOf('--');
1049
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
1050
+ };
1051
+
1052
+
1053
+ /***/ }),
1054
+
1055
+ /***/ 2428:
1056
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1057
+
1058
+ "use strict";
1059
+
1060
+ const os = __webpack_require__(70857);
1061
+ const tty = __webpack_require__(52018);
1062
+ const hasFlag = __webpack_require__(19803);
1063
+
1064
+ const {env} = process;
1065
+
1066
+ let forceColor;
1067
+ if (hasFlag('no-color') ||
1068
+ hasFlag('no-colors') ||
1069
+ hasFlag('color=false') ||
1070
+ hasFlag('color=never')) {
1071
+ forceColor = 0;
1072
+ } else if (hasFlag('color') ||
1073
+ hasFlag('colors') ||
1074
+ hasFlag('color=true') ||
1075
+ hasFlag('color=always')) {
1076
+ forceColor = 1;
1077
+ }
1078
+
1079
+ if ('FORCE_COLOR' in env) {
1080
+ if (env.FORCE_COLOR === 'true') {
1081
+ forceColor = 1;
1082
+ } else if (env.FORCE_COLOR === 'false') {
1083
+ forceColor = 0;
1084
+ } else {
1085
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
1086
+ }
1087
+ }
1088
+
1089
+ function translateLevel(level) {
1090
+ if (level === 0) {
1091
+ return false;
1092
+ }
1093
+
1094
+ return {
1095
+ level,
1096
+ hasBasic: true,
1097
+ has256: level >= 2,
1098
+ has16m: level >= 3
1099
+ };
1100
+ }
1101
+
1102
+ function supportsColor(haveStream, streamIsTTY) {
1103
+ if (forceColor === 0) {
1104
+ return 0;
1105
+ }
1106
+
1107
+ if (hasFlag('color=16m') ||
1108
+ hasFlag('color=full') ||
1109
+ hasFlag('color=truecolor')) {
1110
+ return 3;
1111
+ }
1112
+
1113
+ if (hasFlag('color=256')) {
1114
+ return 2;
1115
+ }
1116
+
1117
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
1118
+ return 0;
1119
+ }
1120
+
1121
+ const min = forceColor || 0;
1122
+
1123
+ if (env.TERM === 'dumb') {
1124
+ return min;
1125
+ }
1126
+
1127
+ if (process.platform === 'win32') {
1128
+ // Windows 10 build 10586 is the first Windows release that supports 256 colors.
1129
+ // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
1130
+ const osRelease = os.release().split('.');
1131
+ if (
1132
+ Number(osRelease[0]) >= 10 &&
1133
+ Number(osRelease[2]) >= 10586
1134
+ ) {
1135
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
1136
+ }
1137
+
1138
+ return 1;
1139
+ }
1140
+
1141
+ if ('CI' in env) {
1142
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
1143
+ return 1;
1144
+ }
1145
+
1146
+ return min;
1147
+ }
1148
+
1149
+ if ('TEAMCITY_VERSION' in env) {
1150
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1151
+ }
1152
+
1153
+ if (env.COLORTERM === 'truecolor') {
1154
+ return 3;
1155
+ }
1156
+
1157
+ if ('TERM_PROGRAM' in env) {
1158
+ const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
1159
+
1160
+ switch (env.TERM_PROGRAM) {
1161
+ case 'iTerm.app':
1162
+ return version >= 3 ? 3 : 2;
1163
+ case 'Apple_Terminal':
1164
+ return 2;
1165
+ // No default
1166
+ }
1167
+ }
1168
+
1169
+ if (/-256(color)?$/i.test(env.TERM)) {
1170
+ return 2;
1171
+ }
1172
+
1173
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
1174
+ return 1;
1175
+ }
1176
+
1177
+ if ('COLORTERM' in env) {
1178
+ return 1;
1179
+ }
1180
+
1181
+ return min;
1182
+ }
1183
+
1184
+ function getSupportLevel(stream) {
1185
+ const level = supportsColor(stream, stream && stream.isTTY);
1186
+ return translateLevel(level);
1187
+ }
1188
+
1189
+ module.exports = {
1190
+ supportsColor: getSupportLevel,
1191
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
1192
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
1193
+ };
1194
+
1195
+
1196
+ /***/ })
1197
+
1198
+ };
1199
+ ;