node-consul-service 1.0.75 → 1.0.76

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/index.esm.js CHANGED
@@ -7,8 +7,6 @@ import require$$0$1 from 'url';
7
7
  import require$$6, { promises } from 'fs';
8
8
  import crypto from 'crypto';
9
9
  import require$$4$1 from 'assert';
10
- import require$$1$1 from 'tty';
11
- import require$$0$2 from 'os';
12
10
  import zlib from 'zlib';
13
11
  import { EventEmitter } from 'events';
14
12
 
@@ -15535,1196 +15533,6 @@ var proxyFromEnv = /*@__PURE__*/getDefaultExportFromCjs(proxyFromEnvExports);
15535
15533
 
15536
15534
  var followRedirects$1 = {exports: {}};
15537
15535
 
15538
- var src = {exports: {}};
15539
-
15540
- var browser = {exports: {}};
15541
-
15542
- /**
15543
- * Helpers.
15544
- */
15545
-
15546
- var ms;
15547
- var hasRequiredMs;
15548
-
15549
- function requireMs () {
15550
- if (hasRequiredMs) return ms;
15551
- hasRequiredMs = 1;
15552
- var s = 1000;
15553
- var m = s * 60;
15554
- var h = m * 60;
15555
- var d = h * 24;
15556
- var w = d * 7;
15557
- var y = d * 365.25;
15558
-
15559
- /**
15560
- * Parse or format the given `val`.
15561
- *
15562
- * Options:
15563
- *
15564
- * - `long` verbose formatting [false]
15565
- *
15566
- * @param {String|Number} val
15567
- * @param {Object} [options]
15568
- * @throws {Error} throw an error if val is not a non-empty string or a number
15569
- * @return {String|Number}
15570
- * @api public
15571
- */
15572
-
15573
- ms = function (val, options) {
15574
- options = options || {};
15575
- var type = typeof val;
15576
- if (type === 'string' && val.length > 0) {
15577
- return parse(val);
15578
- } else if (type === 'number' && isFinite(val)) {
15579
- return options.long ? fmtLong(val) : fmtShort(val);
15580
- }
15581
- throw new Error(
15582
- 'val is not a non-empty string or a valid number. val=' +
15583
- JSON.stringify(val)
15584
- );
15585
- };
15586
-
15587
- /**
15588
- * Parse the given `str` and return milliseconds.
15589
- *
15590
- * @param {String} str
15591
- * @return {Number}
15592
- * @api private
15593
- */
15594
-
15595
- function parse(str) {
15596
- str = String(str);
15597
- if (str.length > 100) {
15598
- return;
15599
- }
15600
- 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(
15601
- str
15602
- );
15603
- if (!match) {
15604
- return;
15605
- }
15606
- var n = parseFloat(match[1]);
15607
- var type = (match[2] || 'ms').toLowerCase();
15608
- switch (type) {
15609
- case 'years':
15610
- case 'year':
15611
- case 'yrs':
15612
- case 'yr':
15613
- case 'y':
15614
- return n * y;
15615
- case 'weeks':
15616
- case 'week':
15617
- case 'w':
15618
- return n * w;
15619
- case 'days':
15620
- case 'day':
15621
- case 'd':
15622
- return n * d;
15623
- case 'hours':
15624
- case 'hour':
15625
- case 'hrs':
15626
- case 'hr':
15627
- case 'h':
15628
- return n * h;
15629
- case 'minutes':
15630
- case 'minute':
15631
- case 'mins':
15632
- case 'min':
15633
- case 'm':
15634
- return n * m;
15635
- case 'seconds':
15636
- case 'second':
15637
- case 'secs':
15638
- case 'sec':
15639
- case 's':
15640
- return n * s;
15641
- case 'milliseconds':
15642
- case 'millisecond':
15643
- case 'msecs':
15644
- case 'msec':
15645
- case 'ms':
15646
- return n;
15647
- default:
15648
- return undefined;
15649
- }
15650
- }
15651
-
15652
- /**
15653
- * Short format for `ms`.
15654
- *
15655
- * @param {Number} ms
15656
- * @return {String}
15657
- * @api private
15658
- */
15659
-
15660
- function fmtShort(ms) {
15661
- var msAbs = Math.abs(ms);
15662
- if (msAbs >= d) {
15663
- return Math.round(ms / d) + 'd';
15664
- }
15665
- if (msAbs >= h) {
15666
- return Math.round(ms / h) + 'h';
15667
- }
15668
- if (msAbs >= m) {
15669
- return Math.round(ms / m) + 'm';
15670
- }
15671
- if (msAbs >= s) {
15672
- return Math.round(ms / s) + 's';
15673
- }
15674
- return ms + 'ms';
15675
- }
15676
-
15677
- /**
15678
- * Long format for `ms`.
15679
- *
15680
- * @param {Number} ms
15681
- * @return {String}
15682
- * @api private
15683
- */
15684
-
15685
- function fmtLong(ms) {
15686
- var msAbs = Math.abs(ms);
15687
- if (msAbs >= d) {
15688
- return plural(ms, msAbs, d, 'day');
15689
- }
15690
- if (msAbs >= h) {
15691
- return plural(ms, msAbs, h, 'hour');
15692
- }
15693
- if (msAbs >= m) {
15694
- return plural(ms, msAbs, m, 'minute');
15695
- }
15696
- if (msAbs >= s) {
15697
- return plural(ms, msAbs, s, 'second');
15698
- }
15699
- return ms + ' ms';
15700
- }
15701
-
15702
- /**
15703
- * Pluralization helper.
15704
- */
15705
-
15706
- function plural(ms, msAbs, n, name) {
15707
- var isPlural = msAbs >= n * 1.5;
15708
- return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
15709
- }
15710
- return ms;
15711
- }
15712
-
15713
- var common;
15714
- var hasRequiredCommon;
15715
-
15716
- function requireCommon () {
15717
- if (hasRequiredCommon) return common;
15718
- hasRequiredCommon = 1;
15719
- /**
15720
- * This is the common logic for both the Node.js and web browser
15721
- * implementations of `debug()`.
15722
- */
15723
-
15724
- function setup(env) {
15725
- createDebug.debug = createDebug;
15726
- createDebug.default = createDebug;
15727
- createDebug.coerce = coerce;
15728
- createDebug.disable = disable;
15729
- createDebug.enable = enable;
15730
- createDebug.enabled = enabled;
15731
- createDebug.humanize = requireMs();
15732
- createDebug.destroy = destroy;
15733
-
15734
- Object.keys(env).forEach(key => {
15735
- createDebug[key] = env[key];
15736
- });
15737
-
15738
- /**
15739
- * The currently active debug mode names, and names to skip.
15740
- */
15741
-
15742
- createDebug.names = [];
15743
- createDebug.skips = [];
15744
-
15745
- /**
15746
- * Map of special "%n" handling functions, for the debug "format" argument.
15747
- *
15748
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
15749
- */
15750
- createDebug.formatters = {};
15751
-
15752
- /**
15753
- * Selects a color for a debug namespace
15754
- * @param {String} namespace The namespace string for the debug instance to be colored
15755
- * @return {Number|String} An ANSI color code for the given namespace
15756
- * @api private
15757
- */
15758
- function selectColor(namespace) {
15759
- let hash = 0;
15760
-
15761
- for (let i = 0; i < namespace.length; i++) {
15762
- hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
15763
- hash |= 0; // Convert to 32bit integer
15764
- }
15765
-
15766
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
15767
- }
15768
- createDebug.selectColor = selectColor;
15769
-
15770
- /**
15771
- * Create a debugger with the given `namespace`.
15772
- *
15773
- * @param {String} namespace
15774
- * @return {Function}
15775
- * @api public
15776
- */
15777
- function createDebug(namespace) {
15778
- let prevTime;
15779
- let enableOverride = null;
15780
- let namespacesCache;
15781
- let enabledCache;
15782
-
15783
- function debug(...args) {
15784
- // Disabled?
15785
- if (!debug.enabled) {
15786
- return;
15787
- }
15788
-
15789
- const self = debug;
15790
-
15791
- // Set `diff` timestamp
15792
- const curr = Number(new Date());
15793
- const ms = curr - (prevTime || curr);
15794
- self.diff = ms;
15795
- self.prev = prevTime;
15796
- self.curr = curr;
15797
- prevTime = curr;
15798
-
15799
- args[0] = createDebug.coerce(args[0]);
15800
-
15801
- if (typeof args[0] !== 'string') {
15802
- // Anything else let's inspect with %O
15803
- args.unshift('%O');
15804
- }
15805
-
15806
- // Apply any `formatters` transformations
15807
- let index = 0;
15808
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
15809
- // If we encounter an escaped % then don't increase the array index
15810
- if (match === '%%') {
15811
- return '%';
15812
- }
15813
- index++;
15814
- const formatter = createDebug.formatters[format];
15815
- if (typeof formatter === 'function') {
15816
- const val = args[index];
15817
- match = formatter.call(self, val);
15818
-
15819
- // Now we need to remove `args[index]` since it's inlined in the `format`
15820
- args.splice(index, 1);
15821
- index--;
15822
- }
15823
- return match;
15824
- });
15825
-
15826
- // Apply env-specific formatting (colors, etc.)
15827
- createDebug.formatArgs.call(self, args);
15828
-
15829
- const logFn = self.log || createDebug.log;
15830
- logFn.apply(self, args);
15831
- }
15832
-
15833
- debug.namespace = namespace;
15834
- debug.useColors = createDebug.useColors();
15835
- debug.color = createDebug.selectColor(namespace);
15836
- debug.extend = extend;
15837
- debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
15838
-
15839
- Object.defineProperty(debug, 'enabled', {
15840
- enumerable: true,
15841
- configurable: false,
15842
- get: () => {
15843
- if (enableOverride !== null) {
15844
- return enableOverride;
15845
- }
15846
- if (namespacesCache !== createDebug.namespaces) {
15847
- namespacesCache = createDebug.namespaces;
15848
- enabledCache = createDebug.enabled(namespace);
15849
- }
15850
-
15851
- return enabledCache;
15852
- },
15853
- set: v => {
15854
- enableOverride = v;
15855
- }
15856
- });
15857
-
15858
- // Env-specific initialization logic for debug instances
15859
- if (typeof createDebug.init === 'function') {
15860
- createDebug.init(debug);
15861
- }
15862
-
15863
- return debug;
15864
- }
15865
-
15866
- function extend(namespace, delimiter) {
15867
- const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
15868
- newDebug.log = this.log;
15869
- return newDebug;
15870
- }
15871
-
15872
- /**
15873
- * Enables a debug mode by namespaces. This can include modes
15874
- * separated by a colon and wildcards.
15875
- *
15876
- * @param {String} namespaces
15877
- * @api public
15878
- */
15879
- function enable(namespaces) {
15880
- createDebug.save(namespaces);
15881
- createDebug.namespaces = namespaces;
15882
-
15883
- createDebug.names = [];
15884
- createDebug.skips = [];
15885
-
15886
- let i;
15887
- const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
15888
- const len = split.length;
15889
-
15890
- for (i = 0; i < len; i++) {
15891
- if (!split[i]) {
15892
- // ignore empty strings
15893
- continue;
15894
- }
15895
-
15896
- namespaces = split[i].replace(/\*/g, '.*?');
15897
-
15898
- if (namespaces[0] === '-') {
15899
- createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
15900
- } else {
15901
- createDebug.names.push(new RegExp('^' + namespaces + '$'));
15902
- }
15903
- }
15904
- }
15905
-
15906
- /**
15907
- * Disable debug output.
15908
- *
15909
- * @return {String} namespaces
15910
- * @api public
15911
- */
15912
- function disable() {
15913
- const namespaces = [
15914
- ...createDebug.names.map(toNamespace),
15915
- ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
15916
- ].join(',');
15917
- createDebug.enable('');
15918
- return namespaces;
15919
- }
15920
-
15921
- /**
15922
- * Returns true if the given mode name is enabled, false otherwise.
15923
- *
15924
- * @param {String} name
15925
- * @return {Boolean}
15926
- * @api public
15927
- */
15928
- function enabled(name) {
15929
- if (name[name.length - 1] === '*') {
15930
- return true;
15931
- }
15932
-
15933
- let i;
15934
- let len;
15935
-
15936
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
15937
- if (createDebug.skips[i].test(name)) {
15938
- return false;
15939
- }
15940
- }
15941
-
15942
- for (i = 0, len = createDebug.names.length; i < len; i++) {
15943
- if (createDebug.names[i].test(name)) {
15944
- return true;
15945
- }
15946
- }
15947
-
15948
- return false;
15949
- }
15950
-
15951
- /**
15952
- * Convert regexp to namespace
15953
- *
15954
- * @param {RegExp} regxep
15955
- * @return {String} namespace
15956
- * @api private
15957
- */
15958
- function toNamespace(regexp) {
15959
- return regexp.toString()
15960
- .substring(2, regexp.toString().length - 2)
15961
- .replace(/\.\*\?$/, '*');
15962
- }
15963
-
15964
- /**
15965
- * Coerce `val`.
15966
- *
15967
- * @param {Mixed} val
15968
- * @return {Mixed}
15969
- * @api private
15970
- */
15971
- function coerce(val) {
15972
- if (val instanceof Error) {
15973
- return val.stack || val.message;
15974
- }
15975
- return val;
15976
- }
15977
-
15978
- /**
15979
- * XXX DO NOT USE. This is a temporary stub function.
15980
- * XXX It WILL be removed in the next major release.
15981
- */
15982
- function destroy() {
15983
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
15984
- }
15985
-
15986
- createDebug.enable(createDebug.load());
15987
-
15988
- return createDebug;
15989
- }
15990
-
15991
- common = setup;
15992
- return common;
15993
- }
15994
-
15995
- /* eslint-env browser */
15996
-
15997
- var hasRequiredBrowser;
15998
-
15999
- function requireBrowser () {
16000
- if (hasRequiredBrowser) return browser.exports;
16001
- hasRequiredBrowser = 1;
16002
- (function (module, exports) {
16003
- /**
16004
- * This is the web browser implementation of `debug()`.
16005
- */
16006
-
16007
- exports.formatArgs = formatArgs;
16008
- exports.save = save;
16009
- exports.load = load;
16010
- exports.useColors = useColors;
16011
- exports.storage = localstorage();
16012
- exports.destroy = (() => {
16013
- let warned = false;
16014
-
16015
- return () => {
16016
- if (!warned) {
16017
- warned = true;
16018
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
16019
- }
16020
- };
16021
- })();
16022
-
16023
- /**
16024
- * Colors.
16025
- */
16026
-
16027
- exports.colors = [
16028
- '#0000CC',
16029
- '#0000FF',
16030
- '#0033CC',
16031
- '#0033FF',
16032
- '#0066CC',
16033
- '#0066FF',
16034
- '#0099CC',
16035
- '#0099FF',
16036
- '#00CC00',
16037
- '#00CC33',
16038
- '#00CC66',
16039
- '#00CC99',
16040
- '#00CCCC',
16041
- '#00CCFF',
16042
- '#3300CC',
16043
- '#3300FF',
16044
- '#3333CC',
16045
- '#3333FF',
16046
- '#3366CC',
16047
- '#3366FF',
16048
- '#3399CC',
16049
- '#3399FF',
16050
- '#33CC00',
16051
- '#33CC33',
16052
- '#33CC66',
16053
- '#33CC99',
16054
- '#33CCCC',
16055
- '#33CCFF',
16056
- '#6600CC',
16057
- '#6600FF',
16058
- '#6633CC',
16059
- '#6633FF',
16060
- '#66CC00',
16061
- '#66CC33',
16062
- '#9900CC',
16063
- '#9900FF',
16064
- '#9933CC',
16065
- '#9933FF',
16066
- '#99CC00',
16067
- '#99CC33',
16068
- '#CC0000',
16069
- '#CC0033',
16070
- '#CC0066',
16071
- '#CC0099',
16072
- '#CC00CC',
16073
- '#CC00FF',
16074
- '#CC3300',
16075
- '#CC3333',
16076
- '#CC3366',
16077
- '#CC3399',
16078
- '#CC33CC',
16079
- '#CC33FF',
16080
- '#CC6600',
16081
- '#CC6633',
16082
- '#CC9900',
16083
- '#CC9933',
16084
- '#CCCC00',
16085
- '#CCCC33',
16086
- '#FF0000',
16087
- '#FF0033',
16088
- '#FF0066',
16089
- '#FF0099',
16090
- '#FF00CC',
16091
- '#FF00FF',
16092
- '#FF3300',
16093
- '#FF3333',
16094
- '#FF3366',
16095
- '#FF3399',
16096
- '#FF33CC',
16097
- '#FF33FF',
16098
- '#FF6600',
16099
- '#FF6633',
16100
- '#FF9900',
16101
- '#FF9933',
16102
- '#FFCC00',
16103
- '#FFCC33'
16104
- ];
16105
-
16106
- /**
16107
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
16108
- * and the Firebug extension (any Firefox version) are known
16109
- * to support "%c" CSS customizations.
16110
- *
16111
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
16112
- */
16113
-
16114
- // eslint-disable-next-line complexity
16115
- function useColors() {
16116
- // NB: In an Electron preload script, document will be defined but not fully
16117
- // initialized. Since we know we're in Chrome, we'll just detect this case
16118
- // explicitly
16119
- if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
16120
- return true;
16121
- }
16122
-
16123
- // Internet Explorer and Edge do not support colors.
16124
- if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
16125
- return false;
16126
- }
16127
-
16128
- let m;
16129
-
16130
- // Is webkit? http://stackoverflow.com/a/16459606/376773
16131
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
16132
- return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
16133
- // Is firebug? http://stackoverflow.com/a/398120/376773
16134
- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
16135
- // Is firefox >= v31?
16136
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
16137
- (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
16138
- // Double check webkit in userAgent just in case we are in a worker
16139
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
16140
- }
16141
-
16142
- /**
16143
- * Colorize log arguments if enabled.
16144
- *
16145
- * @api public
16146
- */
16147
-
16148
- function formatArgs(args) {
16149
- args[0] = (this.useColors ? '%c' : '') +
16150
- this.namespace +
16151
- (this.useColors ? ' %c' : ' ') +
16152
- args[0] +
16153
- (this.useColors ? '%c ' : ' ') +
16154
- '+' + module.exports.humanize(this.diff);
16155
-
16156
- if (!this.useColors) {
16157
- return;
16158
- }
16159
-
16160
- const c = 'color: ' + this.color;
16161
- args.splice(1, 0, c, 'color: inherit');
16162
-
16163
- // The final "%c" is somewhat tricky, because there could be other
16164
- // arguments passed either before or after the %c, so we need to
16165
- // figure out the correct index to insert the CSS into
16166
- let index = 0;
16167
- let lastC = 0;
16168
- args[0].replace(/%[a-zA-Z%]/g, match => {
16169
- if (match === '%%') {
16170
- return;
16171
- }
16172
- index++;
16173
- if (match === '%c') {
16174
- // We only are interested in the *last* %c
16175
- // (the user may have provided their own)
16176
- lastC = index;
16177
- }
16178
- });
16179
-
16180
- args.splice(lastC, 0, c);
16181
- }
16182
-
16183
- /**
16184
- * Invokes `console.debug()` when available.
16185
- * No-op when `console.debug` is not a "function".
16186
- * If `console.debug` is not available, falls back
16187
- * to `console.log`.
16188
- *
16189
- * @api public
16190
- */
16191
- exports.log = console.debug || console.log || (() => {});
16192
-
16193
- /**
16194
- * Save `namespaces`.
16195
- *
16196
- * @param {String} namespaces
16197
- * @api private
16198
- */
16199
- function save(namespaces) {
16200
- try {
16201
- if (namespaces) {
16202
- exports.storage.setItem('debug', namespaces);
16203
- } else {
16204
- exports.storage.removeItem('debug');
16205
- }
16206
- } catch (error) {
16207
- // Swallow
16208
- // XXX (@Qix-) should we be logging these?
16209
- }
16210
- }
16211
-
16212
- /**
16213
- * Load `namespaces`.
16214
- *
16215
- * @return {String} returns the previously persisted debug modes
16216
- * @api private
16217
- */
16218
- function load() {
16219
- let r;
16220
- try {
16221
- r = exports.storage.getItem('debug');
16222
- } catch (error) {
16223
- // Swallow
16224
- // XXX (@Qix-) should we be logging these?
16225
- }
16226
-
16227
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
16228
- if (!r && typeof process !== 'undefined' && 'env' in process) {
16229
- r = process.env.DEBUG;
16230
- }
16231
-
16232
- return r;
16233
- }
16234
-
16235
- /**
16236
- * Localstorage attempts to return the localstorage.
16237
- *
16238
- * This is necessary because safari throws
16239
- * when a user disables cookies/localstorage
16240
- * and you attempt to access it.
16241
- *
16242
- * @return {LocalStorage}
16243
- * @api private
16244
- */
16245
-
16246
- function localstorage() {
16247
- try {
16248
- // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
16249
- // The Browser also has localStorage in the global context.
16250
- return localStorage;
16251
- } catch (error) {
16252
- // Swallow
16253
- // XXX (@Qix-) should we be logging these?
16254
- }
16255
- }
16256
-
16257
- module.exports = requireCommon()(exports);
16258
-
16259
- const {formatters} = module.exports;
16260
-
16261
- /**
16262
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
16263
- */
16264
-
16265
- formatters.j = function (v) {
16266
- try {
16267
- return JSON.stringify(v);
16268
- } catch (error) {
16269
- return '[UnexpectedJSONParseError]: ' + error.message;
16270
- }
16271
- };
16272
- } (browser, browser.exports));
16273
- return browser.exports;
16274
- }
16275
-
16276
- var node = {exports: {}};
16277
-
16278
- var hasFlag;
16279
- var hasRequiredHasFlag;
16280
-
16281
- function requireHasFlag () {
16282
- if (hasRequiredHasFlag) return hasFlag;
16283
- hasRequiredHasFlag = 1;
16284
-
16285
- hasFlag = (flag, argv = process.argv) => {
16286
- const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
16287
- const position = argv.indexOf(prefix + flag);
16288
- const terminatorPosition = argv.indexOf('--');
16289
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
16290
- };
16291
- return hasFlag;
16292
- }
16293
-
16294
- var supportsColor_1;
16295
- var hasRequiredSupportsColor;
16296
-
16297
- function requireSupportsColor () {
16298
- if (hasRequiredSupportsColor) return supportsColor_1;
16299
- hasRequiredSupportsColor = 1;
16300
- const os = require$$0$2;
16301
- const tty = require$$1$1;
16302
- const hasFlag = requireHasFlag();
16303
-
16304
- const {env} = process;
16305
-
16306
- let forceColor;
16307
- if (hasFlag('no-color') ||
16308
- hasFlag('no-colors') ||
16309
- hasFlag('color=false') ||
16310
- hasFlag('color=never')) {
16311
- forceColor = 0;
16312
- } else if (hasFlag('color') ||
16313
- hasFlag('colors') ||
16314
- hasFlag('color=true') ||
16315
- hasFlag('color=always')) {
16316
- forceColor = 1;
16317
- }
16318
-
16319
- if ('FORCE_COLOR' in env) {
16320
- if (env.FORCE_COLOR === 'true') {
16321
- forceColor = 1;
16322
- } else if (env.FORCE_COLOR === 'false') {
16323
- forceColor = 0;
16324
- } else {
16325
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
16326
- }
16327
- }
16328
-
16329
- function translateLevel(level) {
16330
- if (level === 0) {
16331
- return false;
16332
- }
16333
-
16334
- return {
16335
- level,
16336
- hasBasic: true,
16337
- has256: level >= 2,
16338
- has16m: level >= 3
16339
- };
16340
- }
16341
-
16342
- function supportsColor(haveStream, streamIsTTY) {
16343
- if (forceColor === 0) {
16344
- return 0;
16345
- }
16346
-
16347
- if (hasFlag('color=16m') ||
16348
- hasFlag('color=full') ||
16349
- hasFlag('color=truecolor')) {
16350
- return 3;
16351
- }
16352
-
16353
- if (hasFlag('color=256')) {
16354
- return 2;
16355
- }
16356
-
16357
- if (haveStream && !streamIsTTY && forceColor === undefined) {
16358
- return 0;
16359
- }
16360
-
16361
- const min = forceColor || 0;
16362
-
16363
- if (env.TERM === 'dumb') {
16364
- return min;
16365
- }
16366
-
16367
- if (process.platform === 'win32') {
16368
- // Windows 10 build 10586 is the first Windows release that supports 256 colors.
16369
- // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
16370
- const osRelease = os.release().split('.');
16371
- if (
16372
- Number(osRelease[0]) >= 10 &&
16373
- Number(osRelease[2]) >= 10586
16374
- ) {
16375
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
16376
- }
16377
-
16378
- return 1;
16379
- }
16380
-
16381
- if ('CI' in env) {
16382
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
16383
- return 1;
16384
- }
16385
-
16386
- return min;
16387
- }
16388
-
16389
- if ('TEAMCITY_VERSION' in env) {
16390
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
16391
- }
16392
-
16393
- if (env.COLORTERM === 'truecolor') {
16394
- return 3;
16395
- }
16396
-
16397
- if ('TERM_PROGRAM' in env) {
16398
- const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
16399
-
16400
- switch (env.TERM_PROGRAM) {
16401
- case 'iTerm.app':
16402
- return version >= 3 ? 3 : 2;
16403
- case 'Apple_Terminal':
16404
- return 2;
16405
- // No default
16406
- }
16407
- }
16408
-
16409
- if (/-256(color)?$/i.test(env.TERM)) {
16410
- return 2;
16411
- }
16412
-
16413
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
16414
- return 1;
16415
- }
16416
-
16417
- if ('COLORTERM' in env) {
16418
- return 1;
16419
- }
16420
-
16421
- return min;
16422
- }
16423
-
16424
- function getSupportLevel(stream) {
16425
- const level = supportsColor(stream, stream && stream.isTTY);
16426
- return translateLevel(level);
16427
- }
16428
-
16429
- supportsColor_1 = {
16430
- supportsColor: getSupportLevel,
16431
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
16432
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
16433
- };
16434
- return supportsColor_1;
16435
- }
16436
-
16437
- /**
16438
- * Module dependencies.
16439
- */
16440
-
16441
- var hasRequiredNode;
16442
-
16443
- function requireNode () {
16444
- if (hasRequiredNode) return node.exports;
16445
- hasRequiredNode = 1;
16446
- (function (module, exports) {
16447
- const tty = require$$1$1;
16448
- const util = require$$1;
16449
-
16450
- /**
16451
- * This is the Node.js implementation of `debug()`.
16452
- */
16453
-
16454
- exports.init = init;
16455
- exports.log = log;
16456
- exports.formatArgs = formatArgs;
16457
- exports.save = save;
16458
- exports.load = load;
16459
- exports.useColors = useColors;
16460
- exports.destroy = util.deprecate(
16461
- () => {},
16462
- 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
16463
- );
16464
-
16465
- /**
16466
- * Colors.
16467
- */
16468
-
16469
- exports.colors = [6, 2, 3, 4, 5, 1];
16470
-
16471
- try {
16472
- // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
16473
- // eslint-disable-next-line import/no-extraneous-dependencies
16474
- const supportsColor = requireSupportsColor();
16475
-
16476
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
16477
- exports.colors = [
16478
- 20,
16479
- 21,
16480
- 26,
16481
- 27,
16482
- 32,
16483
- 33,
16484
- 38,
16485
- 39,
16486
- 40,
16487
- 41,
16488
- 42,
16489
- 43,
16490
- 44,
16491
- 45,
16492
- 56,
16493
- 57,
16494
- 62,
16495
- 63,
16496
- 68,
16497
- 69,
16498
- 74,
16499
- 75,
16500
- 76,
16501
- 77,
16502
- 78,
16503
- 79,
16504
- 80,
16505
- 81,
16506
- 92,
16507
- 93,
16508
- 98,
16509
- 99,
16510
- 112,
16511
- 113,
16512
- 128,
16513
- 129,
16514
- 134,
16515
- 135,
16516
- 148,
16517
- 149,
16518
- 160,
16519
- 161,
16520
- 162,
16521
- 163,
16522
- 164,
16523
- 165,
16524
- 166,
16525
- 167,
16526
- 168,
16527
- 169,
16528
- 170,
16529
- 171,
16530
- 172,
16531
- 173,
16532
- 178,
16533
- 179,
16534
- 184,
16535
- 185,
16536
- 196,
16537
- 197,
16538
- 198,
16539
- 199,
16540
- 200,
16541
- 201,
16542
- 202,
16543
- 203,
16544
- 204,
16545
- 205,
16546
- 206,
16547
- 207,
16548
- 208,
16549
- 209,
16550
- 214,
16551
- 215,
16552
- 220,
16553
- 221
16554
- ];
16555
- }
16556
- } catch (error) {
16557
- // Swallow - we only care if `supports-color` is available; it doesn't have to be.
16558
- }
16559
-
16560
- /**
16561
- * Build up the default `inspectOpts` object from the environment variables.
16562
- *
16563
- * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
16564
- */
16565
-
16566
- exports.inspectOpts = Object.keys(process.env).filter(key => {
16567
- return /^debug_/i.test(key);
16568
- }).reduce((obj, key) => {
16569
- // Camel-case
16570
- const prop = key
16571
- .substring(6)
16572
- .toLowerCase()
16573
- .replace(/_([a-z])/g, (_, k) => {
16574
- return k.toUpperCase();
16575
- });
16576
-
16577
- // Coerce string value into JS value
16578
- let val = process.env[key];
16579
- if (/^(yes|on|true|enabled)$/i.test(val)) {
16580
- val = true;
16581
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
16582
- val = false;
16583
- } else if (val === 'null') {
16584
- val = null;
16585
- } else {
16586
- val = Number(val);
16587
- }
16588
-
16589
- obj[prop] = val;
16590
- return obj;
16591
- }, {});
16592
-
16593
- /**
16594
- * Is stdout a TTY? Colored output is enabled when `true`.
16595
- */
16596
-
16597
- function useColors() {
16598
- return 'colors' in exports.inspectOpts ?
16599
- Boolean(exports.inspectOpts.colors) :
16600
- tty.isatty(process.stderr.fd);
16601
- }
16602
-
16603
- /**
16604
- * Adds ANSI color escape codes if enabled.
16605
- *
16606
- * @api public
16607
- */
16608
-
16609
- function formatArgs(args) {
16610
- const {namespace: name, useColors} = this;
16611
-
16612
- if (useColors) {
16613
- const c = this.color;
16614
- const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
16615
- const prefix = ` ${colorCode};1m${name} \u001B[0m`;
16616
-
16617
- args[0] = prefix + args[0].split('\n').join('\n' + prefix);
16618
- args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
16619
- } else {
16620
- args[0] = getDate() + name + ' ' + args[0];
16621
- }
16622
- }
16623
-
16624
- function getDate() {
16625
- if (exports.inspectOpts.hideDate) {
16626
- return '';
16627
- }
16628
- return new Date().toISOString() + ' ';
16629
- }
16630
-
16631
- /**
16632
- * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
16633
- */
16634
-
16635
- function log(...args) {
16636
- return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
16637
- }
16638
-
16639
- /**
16640
- * Save `namespaces`.
16641
- *
16642
- * @param {String} namespaces
16643
- * @api private
16644
- */
16645
- function save(namespaces) {
16646
- if (namespaces) {
16647
- process.env.DEBUG = namespaces;
16648
- } else {
16649
- // If you set a process.env field to null or undefined, it gets cast to the
16650
- // string 'null' or 'undefined'. Just delete instead.
16651
- delete process.env.DEBUG;
16652
- }
16653
- }
16654
-
16655
- /**
16656
- * Load `namespaces`.
16657
- *
16658
- * @return {String} returns the previously persisted debug modes
16659
- * @api private
16660
- */
16661
-
16662
- function load() {
16663
- return process.env.DEBUG;
16664
- }
16665
-
16666
- /**
16667
- * Init logic for `debug` instances.
16668
- *
16669
- * Create a new `inspectOpts` object in case `useColors` is set
16670
- * differently for a particular `debug` instance.
16671
- */
16672
-
16673
- function init(debug) {
16674
- debug.inspectOpts = {};
16675
-
16676
- const keys = Object.keys(exports.inspectOpts);
16677
- for (let i = 0; i < keys.length; i++) {
16678
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
16679
- }
16680
- }
16681
-
16682
- module.exports = requireCommon()(exports);
16683
-
16684
- const {formatters} = module.exports;
16685
-
16686
- /**
16687
- * Map %o to `util.inspect()`, all on a single line.
16688
- */
16689
-
16690
- formatters.o = function (v) {
16691
- this.inspectOpts.colors = this.useColors;
16692
- return util.inspect(v, this.inspectOpts)
16693
- .split('\n')
16694
- .map(str => str.trim())
16695
- .join(' ');
16696
- };
16697
-
16698
- /**
16699
- * Map %O to `util.inspect()`, allowing multiple lines if needed.
16700
- */
16701
-
16702
- formatters.O = function (v) {
16703
- this.inspectOpts.colors = this.useColors;
16704
- return util.inspect(v, this.inspectOpts);
16705
- };
16706
- } (node, node.exports));
16707
- return node.exports;
16708
- }
16709
-
16710
- /**
16711
- * Detect Electron renderer / nwjs process, which is node, but we should
16712
- * treat as a browser.
16713
- */
16714
-
16715
- var hasRequiredSrc;
16716
-
16717
- function requireSrc () {
16718
- if (hasRequiredSrc) return src.exports;
16719
- hasRequiredSrc = 1;
16720
- if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
16721
- src.exports = requireBrowser();
16722
- } else {
16723
- src.exports = requireNode();
16724
- }
16725
- return src.exports;
16726
- }
16727
-
16728
15536
  var debug_1;
16729
15537
  var hasRequiredDebug;
16730
15538
 
@@ -16737,7 +15545,7 @@ function requireDebug () {
16737
15545
  if (!debug) {
16738
15546
  try {
16739
15547
  /* eslint global-require: off */
16740
- debug = requireSrc()("follow-redirects");
15548
+ debug = require("debug")("follow-redirects");
16741
15549
  }
16742
15550
  catch (error) { /* */ }
16743
15551
  if (typeof debug !== "function") {
@@ -20169,10 +18977,10 @@ function toBoolean(value) {
20169
18977
  return value.toLowerCase() === 'true';
20170
18978
  return false;
20171
18979
  }
20172
- function initClient({ host = '127.0.0.1', port = 8500, secure = false }) {
18980
+ function initClient({ host = '127.0.0.1', port = 3371, secure = false }) {
20173
18981
  atlasClient = new AtlasClient({
20174
18982
  host: host !== null && host !== void 0 ? host : '127.0.0.1',
20175
- port: 371,
18983
+ port,
20176
18984
  version: '1',
20177
18985
  });
20178
18986
  }