byterover-cli 2.3.1 → 2.3.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/node_modules/@campfirein/brv-transport-client/package.json +1 -1
- package/node_modules/{socket.io-parser/node_modules/debug → debug}/package.json +7 -3
- package/node_modules/{socket.io-parser/node_modules/debug → debug}/src/browser.js +2 -1
- package/node_modules/{socket.io-client/node_modules/debug → debug}/src/common.js +57 -39
- package/node_modules/socket.io-client/build/cjs/index.d.ts +2 -2
- package/node_modules/socket.io-client/build/cjs/socket.js +2 -3
- package/node_modules/socket.io-client/build/esm/index.d.ts +2 -2
- package/node_modules/socket.io-client/build/esm/package.json +1 -1
- package/node_modules/socket.io-client/build/esm/socket.js +1 -3
- package/node_modules/socket.io-client/build/esm-debug/index.d.ts +2 -2
- package/node_modules/socket.io-client/build/esm-debug/package.json +1 -1
- package/node_modules/socket.io-client/build/esm-debug/socket.js +2 -3
- package/node_modules/socket.io-client/dist/socket.io.esm.min.js +3 -3
- package/node_modules/socket.io-client/dist/socket.io.esm.min.js.map +1 -1
- package/node_modules/socket.io-client/dist/socket.io.js +89 -42
- package/node_modules/socket.io-client/dist/socket.io.js.map +1 -1
- package/node_modules/socket.io-client/dist/socket.io.min.js +3 -3
- package/node_modules/socket.io-client/dist/socket.io.min.js.map +1 -1
- package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js +3 -3
- package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js.map +1 -1
- package/node_modules/socket.io-client/package.json +3 -3
- package/node_modules/socket.io-parser/LICENSE +1 -1
- package/node_modules/socket.io-parser/build/cjs/binary.js +2 -3
- package/node_modules/socket.io-parser/build/cjs/index.d.ts +15 -4
- package/node_modules/socket.io-parser/build/cjs/index.js +62 -16
- package/node_modules/socket.io-parser/build/cjs/is-binary.d.ts +1 -1
- package/node_modules/socket.io-parser/build/cjs/is-binary.js +2 -3
- package/node_modules/socket.io-parser/build/esm/index.d.ts +15 -4
- package/node_modules/socket.io-parser/build/esm/index.js +60 -15
- package/node_modules/socket.io-parser/build/esm/is-binary.d.ts +1 -1
- package/node_modules/socket.io-parser/build/esm-debug/index.d.ts +15 -4
- package/node_modules/socket.io-parser/build/esm-debug/index.js +60 -15
- package/node_modules/socket.io-parser/build/esm-debug/is-binary.d.ts +1 -1
- package/node_modules/socket.io-parser/package.json +8 -22
- package/oclif.manifest.json +1 -1
- package/package.json +1 -3
- package/node_modules/socket.io-client/node_modules/debug/package.json +0 -60
- package/node_modules/socket.io-client/node_modules/debug/src/browser.js +0 -271
- package/node_modules/socket.io-parser/node_modules/debug/LICENSE +0 -20
- package/node_modules/socket.io-parser/node_modules/debug/README.md +0 -481
- package/node_modules/socket.io-parser/node_modules/debug/src/common.js +0 -274
- package/node_modules/socket.io-parser/node_modules/debug/src/index.js +0 -10
- package/node_modules/socket.io-parser/node_modules/debug/src/node.js +0 -263
- /package/node_modules/{socket.io-client/node_modules/debug → debug}/LICENSE +0 -0
- /package/node_modules/{socket.io-client/node_modules/debug → debug}/README.md +0 -0
- /package/node_modules/{socket.io-client/node_modules/debug → debug}/src/index.js +0 -0
- /package/node_modules/{socket.io-client/node_modules/debug → debug}/src/node.js +0 -0
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This is the common logic for both the Node.js and web browser
|
|
4
|
-
* implementations of `debug()`.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
function setup(env) {
|
|
8
|
-
createDebug.debug = createDebug;
|
|
9
|
-
createDebug.default = createDebug;
|
|
10
|
-
createDebug.coerce = coerce;
|
|
11
|
-
createDebug.disable = disable;
|
|
12
|
-
createDebug.enable = enable;
|
|
13
|
-
createDebug.enabled = enabled;
|
|
14
|
-
createDebug.humanize = require('ms');
|
|
15
|
-
createDebug.destroy = destroy;
|
|
16
|
-
|
|
17
|
-
Object.keys(env).forEach(key => {
|
|
18
|
-
createDebug[key] = env[key];
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* The currently active debug mode names, and names to skip.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
createDebug.names = [];
|
|
26
|
-
createDebug.skips = [];
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
30
|
-
*
|
|
31
|
-
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
32
|
-
*/
|
|
33
|
-
createDebug.formatters = {};
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Selects a color for a debug namespace
|
|
37
|
-
* @param {String} namespace The namespace string for the debug instance to be colored
|
|
38
|
-
* @return {Number|String} An ANSI color code for the given namespace
|
|
39
|
-
* @api private
|
|
40
|
-
*/
|
|
41
|
-
function selectColor(namespace) {
|
|
42
|
-
let hash = 0;
|
|
43
|
-
|
|
44
|
-
for (let i = 0; i < namespace.length; i++) {
|
|
45
|
-
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
|
46
|
-
hash |= 0; // Convert to 32bit integer
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
50
|
-
}
|
|
51
|
-
createDebug.selectColor = selectColor;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Create a debugger with the given `namespace`.
|
|
55
|
-
*
|
|
56
|
-
* @param {String} namespace
|
|
57
|
-
* @return {Function}
|
|
58
|
-
* @api public
|
|
59
|
-
*/
|
|
60
|
-
function createDebug(namespace) {
|
|
61
|
-
let prevTime;
|
|
62
|
-
let enableOverride = null;
|
|
63
|
-
let namespacesCache;
|
|
64
|
-
let enabledCache;
|
|
65
|
-
|
|
66
|
-
function debug(...args) {
|
|
67
|
-
// Disabled?
|
|
68
|
-
if (!debug.enabled) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const self = debug;
|
|
73
|
-
|
|
74
|
-
// Set `diff` timestamp
|
|
75
|
-
const curr = Number(new Date());
|
|
76
|
-
const ms = curr - (prevTime || curr);
|
|
77
|
-
self.diff = ms;
|
|
78
|
-
self.prev = prevTime;
|
|
79
|
-
self.curr = curr;
|
|
80
|
-
prevTime = curr;
|
|
81
|
-
|
|
82
|
-
args[0] = createDebug.coerce(args[0]);
|
|
83
|
-
|
|
84
|
-
if (typeof args[0] !== 'string') {
|
|
85
|
-
// Anything else let's inspect with %O
|
|
86
|
-
args.unshift('%O');
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Apply any `formatters` transformations
|
|
90
|
-
let index = 0;
|
|
91
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
92
|
-
// If we encounter an escaped % then don't increase the array index
|
|
93
|
-
if (match === '%%') {
|
|
94
|
-
return '%';
|
|
95
|
-
}
|
|
96
|
-
index++;
|
|
97
|
-
const formatter = createDebug.formatters[format];
|
|
98
|
-
if (typeof formatter === 'function') {
|
|
99
|
-
const val = args[index];
|
|
100
|
-
match = formatter.call(self, val);
|
|
101
|
-
|
|
102
|
-
// Now we need to remove `args[index]` since it's inlined in the `format`
|
|
103
|
-
args.splice(index, 1);
|
|
104
|
-
index--;
|
|
105
|
-
}
|
|
106
|
-
return match;
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
// Apply env-specific formatting (colors, etc.)
|
|
110
|
-
createDebug.formatArgs.call(self, args);
|
|
111
|
-
|
|
112
|
-
const logFn = self.log || createDebug.log;
|
|
113
|
-
logFn.apply(self, args);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
debug.namespace = namespace;
|
|
117
|
-
debug.useColors = createDebug.useColors();
|
|
118
|
-
debug.color = createDebug.selectColor(namespace);
|
|
119
|
-
debug.extend = extend;
|
|
120
|
-
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
121
|
-
|
|
122
|
-
Object.defineProperty(debug, 'enabled', {
|
|
123
|
-
enumerable: true,
|
|
124
|
-
configurable: false,
|
|
125
|
-
get: () => {
|
|
126
|
-
if (enableOverride !== null) {
|
|
127
|
-
return enableOverride;
|
|
128
|
-
}
|
|
129
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
130
|
-
namespacesCache = createDebug.namespaces;
|
|
131
|
-
enabledCache = createDebug.enabled(namespace);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return enabledCache;
|
|
135
|
-
},
|
|
136
|
-
set: v => {
|
|
137
|
-
enableOverride = v;
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
// Env-specific initialization logic for debug instances
|
|
142
|
-
if (typeof createDebug.init === 'function') {
|
|
143
|
-
createDebug.init(debug);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return debug;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function extend(namespace, delimiter) {
|
|
150
|
-
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
151
|
-
newDebug.log = this.log;
|
|
152
|
-
return newDebug;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Enables a debug mode by namespaces. This can include modes
|
|
157
|
-
* separated by a colon and wildcards.
|
|
158
|
-
*
|
|
159
|
-
* @param {String} namespaces
|
|
160
|
-
* @api public
|
|
161
|
-
*/
|
|
162
|
-
function enable(namespaces) {
|
|
163
|
-
createDebug.save(namespaces);
|
|
164
|
-
createDebug.namespaces = namespaces;
|
|
165
|
-
|
|
166
|
-
createDebug.names = [];
|
|
167
|
-
createDebug.skips = [];
|
|
168
|
-
|
|
169
|
-
let i;
|
|
170
|
-
const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
|
171
|
-
const len = split.length;
|
|
172
|
-
|
|
173
|
-
for (i = 0; i < len; i++) {
|
|
174
|
-
if (!split[i]) {
|
|
175
|
-
// ignore empty strings
|
|
176
|
-
continue;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
namespaces = split[i].replace(/\*/g, '.*?');
|
|
180
|
-
|
|
181
|
-
if (namespaces[0] === '-') {
|
|
182
|
-
createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
|
|
183
|
-
} else {
|
|
184
|
-
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Disable debug output.
|
|
191
|
-
*
|
|
192
|
-
* @return {String} namespaces
|
|
193
|
-
* @api public
|
|
194
|
-
*/
|
|
195
|
-
function disable() {
|
|
196
|
-
const namespaces = [
|
|
197
|
-
...createDebug.names.map(toNamespace),
|
|
198
|
-
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
|
|
199
|
-
].join(',');
|
|
200
|
-
createDebug.enable('');
|
|
201
|
-
return namespaces;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Returns true if the given mode name is enabled, false otherwise.
|
|
206
|
-
*
|
|
207
|
-
* @param {String} name
|
|
208
|
-
* @return {Boolean}
|
|
209
|
-
* @api public
|
|
210
|
-
*/
|
|
211
|
-
function enabled(name) {
|
|
212
|
-
if (name[name.length - 1] === '*') {
|
|
213
|
-
return true;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
let i;
|
|
217
|
-
let len;
|
|
218
|
-
|
|
219
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
220
|
-
if (createDebug.skips[i].test(name)) {
|
|
221
|
-
return false;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
226
|
-
if (createDebug.names[i].test(name)) {
|
|
227
|
-
return true;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
return false;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Convert regexp to namespace
|
|
236
|
-
*
|
|
237
|
-
* @param {RegExp} regxep
|
|
238
|
-
* @return {String} namespace
|
|
239
|
-
* @api private
|
|
240
|
-
*/
|
|
241
|
-
function toNamespace(regexp) {
|
|
242
|
-
return regexp.toString()
|
|
243
|
-
.substring(2, regexp.toString().length - 2)
|
|
244
|
-
.replace(/\.\*\?$/, '*');
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Coerce `val`.
|
|
249
|
-
*
|
|
250
|
-
* @param {Mixed} val
|
|
251
|
-
* @return {Mixed}
|
|
252
|
-
* @api private
|
|
253
|
-
*/
|
|
254
|
-
function coerce(val) {
|
|
255
|
-
if (val instanceof Error) {
|
|
256
|
-
return val.stack || val.message;
|
|
257
|
-
}
|
|
258
|
-
return val;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* XXX DO NOT USE. This is a temporary stub function.
|
|
263
|
-
* XXX It WILL be removed in the next major release.
|
|
264
|
-
*/
|
|
265
|
-
function destroy() {
|
|
266
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
createDebug.enable(createDebug.load());
|
|
270
|
-
|
|
271
|
-
return createDebug;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
module.exports = setup;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Detect Electron renderer / nwjs process, which is node, but we should
|
|
3
|
-
* treat as a browser.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
|
7
|
-
module.exports = require('./browser.js');
|
|
8
|
-
} else {
|
|
9
|
-
module.exports = require('./node.js');
|
|
10
|
-
}
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Module dependencies.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
const tty = require('tty');
|
|
6
|
-
const util = require('util');
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* This is the Node.js implementation of `debug()`.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
exports.init = init;
|
|
13
|
-
exports.log = log;
|
|
14
|
-
exports.formatArgs = formatArgs;
|
|
15
|
-
exports.save = save;
|
|
16
|
-
exports.load = load;
|
|
17
|
-
exports.useColors = useColors;
|
|
18
|
-
exports.destroy = util.deprecate(
|
|
19
|
-
() => {},
|
|
20
|
-
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Colors.
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
28
|
-
|
|
29
|
-
try {
|
|
30
|
-
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
|
31
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
32
|
-
const supportsColor = require('supports-color');
|
|
33
|
-
|
|
34
|
-
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
35
|
-
exports.colors = [
|
|
36
|
-
20,
|
|
37
|
-
21,
|
|
38
|
-
26,
|
|
39
|
-
27,
|
|
40
|
-
32,
|
|
41
|
-
33,
|
|
42
|
-
38,
|
|
43
|
-
39,
|
|
44
|
-
40,
|
|
45
|
-
41,
|
|
46
|
-
42,
|
|
47
|
-
43,
|
|
48
|
-
44,
|
|
49
|
-
45,
|
|
50
|
-
56,
|
|
51
|
-
57,
|
|
52
|
-
62,
|
|
53
|
-
63,
|
|
54
|
-
68,
|
|
55
|
-
69,
|
|
56
|
-
74,
|
|
57
|
-
75,
|
|
58
|
-
76,
|
|
59
|
-
77,
|
|
60
|
-
78,
|
|
61
|
-
79,
|
|
62
|
-
80,
|
|
63
|
-
81,
|
|
64
|
-
92,
|
|
65
|
-
93,
|
|
66
|
-
98,
|
|
67
|
-
99,
|
|
68
|
-
112,
|
|
69
|
-
113,
|
|
70
|
-
128,
|
|
71
|
-
129,
|
|
72
|
-
134,
|
|
73
|
-
135,
|
|
74
|
-
148,
|
|
75
|
-
149,
|
|
76
|
-
160,
|
|
77
|
-
161,
|
|
78
|
-
162,
|
|
79
|
-
163,
|
|
80
|
-
164,
|
|
81
|
-
165,
|
|
82
|
-
166,
|
|
83
|
-
167,
|
|
84
|
-
168,
|
|
85
|
-
169,
|
|
86
|
-
170,
|
|
87
|
-
171,
|
|
88
|
-
172,
|
|
89
|
-
173,
|
|
90
|
-
178,
|
|
91
|
-
179,
|
|
92
|
-
184,
|
|
93
|
-
185,
|
|
94
|
-
196,
|
|
95
|
-
197,
|
|
96
|
-
198,
|
|
97
|
-
199,
|
|
98
|
-
200,
|
|
99
|
-
201,
|
|
100
|
-
202,
|
|
101
|
-
203,
|
|
102
|
-
204,
|
|
103
|
-
205,
|
|
104
|
-
206,
|
|
105
|
-
207,
|
|
106
|
-
208,
|
|
107
|
-
209,
|
|
108
|
-
214,
|
|
109
|
-
215,
|
|
110
|
-
220,
|
|
111
|
-
221
|
|
112
|
-
];
|
|
113
|
-
}
|
|
114
|
-
} catch (error) {
|
|
115
|
-
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Build up the default `inspectOpts` object from the environment variables.
|
|
120
|
-
*
|
|
121
|
-
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
122
|
-
*/
|
|
123
|
-
|
|
124
|
-
exports.inspectOpts = Object.keys(process.env).filter(key => {
|
|
125
|
-
return /^debug_/i.test(key);
|
|
126
|
-
}).reduce((obj, key) => {
|
|
127
|
-
// Camel-case
|
|
128
|
-
const prop = key
|
|
129
|
-
.substring(6)
|
|
130
|
-
.toLowerCase()
|
|
131
|
-
.replace(/_([a-z])/g, (_, k) => {
|
|
132
|
-
return k.toUpperCase();
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
// Coerce string value into JS value
|
|
136
|
-
let val = process.env[key];
|
|
137
|
-
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
138
|
-
val = true;
|
|
139
|
-
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
140
|
-
val = false;
|
|
141
|
-
} else if (val === 'null') {
|
|
142
|
-
val = null;
|
|
143
|
-
} else {
|
|
144
|
-
val = Number(val);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
obj[prop] = val;
|
|
148
|
-
return obj;
|
|
149
|
-
}, {});
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Is stdout a TTY? Colored output is enabled when `true`.
|
|
153
|
-
*/
|
|
154
|
-
|
|
155
|
-
function useColors() {
|
|
156
|
-
return 'colors' in exports.inspectOpts ?
|
|
157
|
-
Boolean(exports.inspectOpts.colors) :
|
|
158
|
-
tty.isatty(process.stderr.fd);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Adds ANSI color escape codes if enabled.
|
|
163
|
-
*
|
|
164
|
-
* @api public
|
|
165
|
-
*/
|
|
166
|
-
|
|
167
|
-
function formatArgs(args) {
|
|
168
|
-
const {namespace: name, useColors} = this;
|
|
169
|
-
|
|
170
|
-
if (useColors) {
|
|
171
|
-
const c = this.color;
|
|
172
|
-
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
|
|
173
|
-
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
|
174
|
-
|
|
175
|
-
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
|
|
176
|
-
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
|
|
177
|
-
} else {
|
|
178
|
-
args[0] = getDate() + name + ' ' + args[0];
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function getDate() {
|
|
183
|
-
if (exports.inspectOpts.hideDate) {
|
|
184
|
-
return '';
|
|
185
|
-
}
|
|
186
|
-
return new Date().toISOString() + ' ';
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
|
|
191
|
-
*/
|
|
192
|
-
|
|
193
|
-
function log(...args) {
|
|
194
|
-
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Save `namespaces`.
|
|
199
|
-
*
|
|
200
|
-
* @param {String} namespaces
|
|
201
|
-
* @api private
|
|
202
|
-
*/
|
|
203
|
-
function save(namespaces) {
|
|
204
|
-
if (namespaces) {
|
|
205
|
-
process.env.DEBUG = namespaces;
|
|
206
|
-
} else {
|
|
207
|
-
// If you set a process.env field to null or undefined, it gets cast to the
|
|
208
|
-
// string 'null' or 'undefined'. Just delete instead.
|
|
209
|
-
delete process.env.DEBUG;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Load `namespaces`.
|
|
215
|
-
*
|
|
216
|
-
* @return {String} returns the previously persisted debug modes
|
|
217
|
-
* @api private
|
|
218
|
-
*/
|
|
219
|
-
|
|
220
|
-
function load() {
|
|
221
|
-
return process.env.DEBUG;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Init logic for `debug` instances.
|
|
226
|
-
*
|
|
227
|
-
* Create a new `inspectOpts` object in case `useColors` is set
|
|
228
|
-
* differently for a particular `debug` instance.
|
|
229
|
-
*/
|
|
230
|
-
|
|
231
|
-
function init(debug) {
|
|
232
|
-
debug.inspectOpts = {};
|
|
233
|
-
|
|
234
|
-
const keys = Object.keys(exports.inspectOpts);
|
|
235
|
-
for (let i = 0; i < keys.length; i++) {
|
|
236
|
-
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
module.exports = require('./common')(exports);
|
|
241
|
-
|
|
242
|
-
const {formatters} = module.exports;
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Map %o to `util.inspect()`, all on a single line.
|
|
246
|
-
*/
|
|
247
|
-
|
|
248
|
-
formatters.o = function (v) {
|
|
249
|
-
this.inspectOpts.colors = this.useColors;
|
|
250
|
-
return util.inspect(v, this.inspectOpts)
|
|
251
|
-
.split('\n')
|
|
252
|
-
.map(str => str.trim())
|
|
253
|
-
.join(' ');
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
|
258
|
-
*/
|
|
259
|
-
|
|
260
|
-
formatters.O = function (v) {
|
|
261
|
-
this.inspectOpts.colors = this.useColors;
|
|
262
|
-
return util.inspect(v, this.inspectOpts);
|
|
263
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|