@putout/bundle 4.7.1 → 4.7.3
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/bundle/putout.js +757 -16
- package/bundle/putout.min.js +6 -6
- package/package.json +1 -1
package/bundle/putout.js
CHANGED
|
@@ -170,7 +170,7 @@ Item.prototype.run = function () {
|
|
|
170
170
|
};
|
|
171
171
|
var title = 'browser';
|
|
172
172
|
var platform = 'browser';
|
|
173
|
-
var browser = true;
|
|
173
|
+
var browser$1 = true;
|
|
174
174
|
var env = {};
|
|
175
175
|
var argv = [];
|
|
176
176
|
var version = ''; // empty string to avoid regexp issues
|
|
@@ -231,10 +231,10 @@ function uptime() {
|
|
|
231
231
|
return dif / 1000;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
var browser$1 = {
|
|
234
|
+
var browser$1$1 = {
|
|
235
235
|
nextTick: nextTick,
|
|
236
236
|
title: title,
|
|
237
|
-
browser: browser,
|
|
237
|
+
browser: browser$1,
|
|
238
238
|
env: env,
|
|
239
239
|
argv: argv,
|
|
240
240
|
version: version,
|
|
@@ -262,11 +262,11 @@ var _polyfillNode_process = /*#__PURE__*/Object.freeze({
|
|
|
262
262
|
addListener: addListener,
|
|
263
263
|
argv: argv,
|
|
264
264
|
binding: binding,
|
|
265
|
-
browser: browser,
|
|
265
|
+
browser: browser$1,
|
|
266
266
|
chdir: chdir,
|
|
267
267
|
config: config,
|
|
268
268
|
cwd: cwd,
|
|
269
|
-
default: browser$1,
|
|
269
|
+
default: browser$1$1,
|
|
270
270
|
emit: emit,
|
|
271
271
|
env: env,
|
|
272
272
|
hrtime: hrtime,
|
|
@@ -2318,7 +2318,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== 'sy
|
|
|
2318
2318
|
// node_modules/picocolors/picocolors.js
|
|
2319
2319
|
var require_picocolors = __commonJS({
|
|
2320
2320
|
'node_modules/picocolors/picocolors.js'(exports2, module2) {
|
|
2321
|
-
var p = browser$1 || {};
|
|
2321
|
+
var p = browser$1$1 || {};
|
|
2322
2322
|
var argv = p.argv || [];
|
|
2323
2323
|
var env = p.env || {};
|
|
2324
2324
|
var isColorSupported2 = !(!!env.NO_COLOR || argv.includes('--no-color'))
|
|
@@ -3277,7 +3277,7 @@ var require_node = () => () => ({
|
|
|
3277
3277
|
// node_modules/debug/src/index.js
|
|
3278
3278
|
var require_src = __commonJS({
|
|
3279
3279
|
'node_modules/debug/src/index.js'(exports2, module2) {
|
|
3280
|
-
if (typeof browser$1 === 'undefined' || browser$1.type === 'renderer' || browser$1.browser === true || browser$1.__nwjs) {
|
|
3280
|
+
if (typeof browser$1$1 === 'undefined' || browser$1$1.type === 'renderer' || browser$1$1.browser === true || browser$1$1.__nwjs) {
|
|
3281
3281
|
module2.exports = require_browser();
|
|
3282
3282
|
} else {
|
|
3283
3283
|
module2.exports = require_node();
|
|
@@ -36488,7 +36488,7 @@ var import_picocolors = __toESM(require_picocolors());
|
|
|
36488
36488
|
var import_js_tokens = __toESM(require_js_tokens());
|
|
36489
36489
|
|
|
36490
36490
|
function isColorSupported() {
|
|
36491
|
-
return typeof browser$1 === 'object' && (browser$1.env.FORCE_COLOR === '0' || browser$1.env.FORCE_COLOR === 'false') ? false : import_picocolors.default.isColorSupported;
|
|
36491
|
+
return typeof browser$1$1 === 'object' && (browser$1$1.env.FORCE_COLOR === '0' || browser$1$1.env.FORCE_COLOR === 'false') ? false : import_picocolors.default.isColorSupported;
|
|
36492
36492
|
}
|
|
36493
36493
|
|
|
36494
36494
|
var compose = (f, g) => (v) => f(g(v));
|
|
@@ -48864,7 +48864,7 @@ function ensureBlock2() {
|
|
|
48864
48864
|
|
|
48865
48865
|
this.node.body = blockStatement3(statements2);
|
|
48866
48866
|
const parentPath = this.get(stringPath);
|
|
48867
|
-
setup.call(body, parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key);
|
|
48867
|
+
setup$1.call(body, parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key);
|
|
48868
48868
|
return this.node;
|
|
48869
48869
|
}
|
|
48870
48870
|
|
|
@@ -50537,7 +50537,7 @@ var NodePath_Final = class NodePath {
|
|
|
50537
50537
|
paths.set(targetNode, path);
|
|
50538
50538
|
}
|
|
50539
50539
|
|
|
50540
|
-
setup.call(path, parentPath, container, listKey, key);
|
|
50540
|
+
setup$1.call(path, parentPath, container, listKey, key);
|
|
50541
50541
|
return path;
|
|
50542
50542
|
}
|
|
50543
50543
|
|
|
@@ -51243,7 +51243,7 @@ function pushContext(context) {
|
|
|
51243
51243
|
this.setContext(context);
|
|
51244
51244
|
}
|
|
51245
51245
|
|
|
51246
|
-
function setup(parentPath, container, listKey, key) {
|
|
51246
|
+
function setup$1(parentPath, container, listKey, key) {
|
|
51247
51247
|
this.listKey = listKey;
|
|
51248
51248
|
this.container = container;
|
|
51249
51249
|
this.parentPath = parentPath || this.parentPath;
|
|
@@ -63221,9 +63221,750 @@ lib$1.validateRulesRelations = validateRulesRelations$1;
|
|
|
63221
63221
|
|
|
63222
63222
|
var lib = {};
|
|
63223
63223
|
|
|
63224
|
+
var browser = {exports: {}};
|
|
63225
|
+
|
|
63226
|
+
/**
|
|
63227
|
+
* Helpers.
|
|
63228
|
+
*/
|
|
63229
|
+
|
|
63230
|
+
var ms;
|
|
63231
|
+
var hasRequiredMs;
|
|
63232
|
+
|
|
63233
|
+
function requireMs () {
|
|
63234
|
+
if (hasRequiredMs) return ms;
|
|
63235
|
+
hasRequiredMs = 1;
|
|
63236
|
+
var s = 1000;
|
|
63237
|
+
var m = s * 60;
|
|
63238
|
+
var h = m * 60;
|
|
63239
|
+
var d = h * 24;
|
|
63240
|
+
var w = d * 7;
|
|
63241
|
+
var y = d * 365.25;
|
|
63242
|
+
|
|
63243
|
+
/**
|
|
63244
|
+
* Parse or format the given `val`.
|
|
63245
|
+
*
|
|
63246
|
+
* Options:
|
|
63247
|
+
*
|
|
63248
|
+
* - `long` verbose formatting [false]
|
|
63249
|
+
*
|
|
63250
|
+
* @param {String|Number} val
|
|
63251
|
+
* @param {Object} [options]
|
|
63252
|
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
63253
|
+
* @return {String|Number}
|
|
63254
|
+
* @api public
|
|
63255
|
+
*/
|
|
63256
|
+
|
|
63257
|
+
ms = function (val, options) {
|
|
63258
|
+
options = options || {};
|
|
63259
|
+
var type = typeof val;
|
|
63260
|
+
if (type === 'string' && val.length > 0) {
|
|
63261
|
+
return parse(val);
|
|
63262
|
+
} else if (type === 'number' && isFinite(val)) {
|
|
63263
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
|
63264
|
+
}
|
|
63265
|
+
throw new Error(
|
|
63266
|
+
'val is not a non-empty string or a valid number. val=' +
|
|
63267
|
+
JSON.stringify(val)
|
|
63268
|
+
);
|
|
63269
|
+
};
|
|
63270
|
+
|
|
63271
|
+
/**
|
|
63272
|
+
* Parse the given `str` and return milliseconds.
|
|
63273
|
+
*
|
|
63274
|
+
* @param {String} str
|
|
63275
|
+
* @return {Number}
|
|
63276
|
+
* @api private
|
|
63277
|
+
*/
|
|
63278
|
+
|
|
63279
|
+
function parse(str) {
|
|
63280
|
+
str = String(str);
|
|
63281
|
+
if (str.length > 100) {
|
|
63282
|
+
return;
|
|
63283
|
+
}
|
|
63284
|
+
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(
|
|
63285
|
+
str
|
|
63286
|
+
);
|
|
63287
|
+
if (!match) {
|
|
63288
|
+
return;
|
|
63289
|
+
}
|
|
63290
|
+
var n = parseFloat(match[1]);
|
|
63291
|
+
var type = (match[2] || 'ms').toLowerCase();
|
|
63292
|
+
switch (type) {
|
|
63293
|
+
case 'years':
|
|
63294
|
+
case 'year':
|
|
63295
|
+
case 'yrs':
|
|
63296
|
+
case 'yr':
|
|
63297
|
+
case 'y':
|
|
63298
|
+
return n * y;
|
|
63299
|
+
case 'weeks':
|
|
63300
|
+
case 'week':
|
|
63301
|
+
case 'w':
|
|
63302
|
+
return n * w;
|
|
63303
|
+
case 'days':
|
|
63304
|
+
case 'day':
|
|
63305
|
+
case 'd':
|
|
63306
|
+
return n * d;
|
|
63307
|
+
case 'hours':
|
|
63308
|
+
case 'hour':
|
|
63309
|
+
case 'hrs':
|
|
63310
|
+
case 'hr':
|
|
63311
|
+
case 'h':
|
|
63312
|
+
return n * h;
|
|
63313
|
+
case 'minutes':
|
|
63314
|
+
case 'minute':
|
|
63315
|
+
case 'mins':
|
|
63316
|
+
case 'min':
|
|
63317
|
+
case 'm':
|
|
63318
|
+
return n * m;
|
|
63319
|
+
case 'seconds':
|
|
63320
|
+
case 'second':
|
|
63321
|
+
case 'secs':
|
|
63322
|
+
case 'sec':
|
|
63323
|
+
case 's':
|
|
63324
|
+
return n * s;
|
|
63325
|
+
case 'milliseconds':
|
|
63326
|
+
case 'millisecond':
|
|
63327
|
+
case 'msecs':
|
|
63328
|
+
case 'msec':
|
|
63329
|
+
case 'ms':
|
|
63330
|
+
return n;
|
|
63331
|
+
default:
|
|
63332
|
+
return undefined;
|
|
63333
|
+
}
|
|
63334
|
+
}
|
|
63335
|
+
|
|
63336
|
+
/**
|
|
63337
|
+
* Short format for `ms`.
|
|
63338
|
+
*
|
|
63339
|
+
* @param {Number} ms
|
|
63340
|
+
* @return {String}
|
|
63341
|
+
* @api private
|
|
63342
|
+
*/
|
|
63343
|
+
|
|
63344
|
+
function fmtShort(ms) {
|
|
63345
|
+
var msAbs = Math.abs(ms);
|
|
63346
|
+
if (msAbs >= d) {
|
|
63347
|
+
return Math.round(ms / d) + 'd';
|
|
63348
|
+
}
|
|
63349
|
+
if (msAbs >= h) {
|
|
63350
|
+
return Math.round(ms / h) + 'h';
|
|
63351
|
+
}
|
|
63352
|
+
if (msAbs >= m) {
|
|
63353
|
+
return Math.round(ms / m) + 'm';
|
|
63354
|
+
}
|
|
63355
|
+
if (msAbs >= s) {
|
|
63356
|
+
return Math.round(ms / s) + 's';
|
|
63357
|
+
}
|
|
63358
|
+
return ms + 'ms';
|
|
63359
|
+
}
|
|
63360
|
+
|
|
63361
|
+
/**
|
|
63362
|
+
* Long format for `ms`.
|
|
63363
|
+
*
|
|
63364
|
+
* @param {Number} ms
|
|
63365
|
+
* @return {String}
|
|
63366
|
+
* @api private
|
|
63367
|
+
*/
|
|
63368
|
+
|
|
63369
|
+
function fmtLong(ms) {
|
|
63370
|
+
var msAbs = Math.abs(ms);
|
|
63371
|
+
if (msAbs >= d) {
|
|
63372
|
+
return plural(ms, msAbs, d, 'day');
|
|
63373
|
+
}
|
|
63374
|
+
if (msAbs >= h) {
|
|
63375
|
+
return plural(ms, msAbs, h, 'hour');
|
|
63376
|
+
}
|
|
63377
|
+
if (msAbs >= m) {
|
|
63378
|
+
return plural(ms, msAbs, m, 'minute');
|
|
63379
|
+
}
|
|
63380
|
+
if (msAbs >= s) {
|
|
63381
|
+
return plural(ms, msAbs, s, 'second');
|
|
63382
|
+
}
|
|
63383
|
+
return ms + ' ms';
|
|
63384
|
+
}
|
|
63385
|
+
|
|
63386
|
+
/**
|
|
63387
|
+
* Pluralization helper.
|
|
63388
|
+
*/
|
|
63389
|
+
|
|
63390
|
+
function plural(ms, msAbs, n, name) {
|
|
63391
|
+
var isPlural = msAbs >= n * 1.5;
|
|
63392
|
+
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
63393
|
+
}
|
|
63394
|
+
return ms;
|
|
63395
|
+
}
|
|
63396
|
+
|
|
63397
|
+
/**
|
|
63398
|
+
* This is the common logic for both the Node.js and web browser
|
|
63399
|
+
* implementations of `debug()`.
|
|
63400
|
+
*/
|
|
63401
|
+
|
|
63402
|
+
function setup(env) {
|
|
63403
|
+
createDebug.debug = createDebug;
|
|
63404
|
+
createDebug.default = createDebug;
|
|
63405
|
+
createDebug.coerce = coerce;
|
|
63406
|
+
createDebug.disable = disable;
|
|
63407
|
+
createDebug.enable = enable;
|
|
63408
|
+
createDebug.enabled = enabled;
|
|
63409
|
+
createDebug.humanize = requireMs();
|
|
63410
|
+
createDebug.destroy = destroy;
|
|
63411
|
+
|
|
63412
|
+
Object.keys(env).forEach(key => {
|
|
63413
|
+
createDebug[key] = env[key];
|
|
63414
|
+
});
|
|
63415
|
+
|
|
63416
|
+
/**
|
|
63417
|
+
* The currently active debug mode names, and names to skip.
|
|
63418
|
+
*/
|
|
63419
|
+
|
|
63420
|
+
createDebug.names = [];
|
|
63421
|
+
createDebug.skips = [];
|
|
63422
|
+
|
|
63423
|
+
/**
|
|
63424
|
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
63425
|
+
*
|
|
63426
|
+
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
63427
|
+
*/
|
|
63428
|
+
createDebug.formatters = {};
|
|
63429
|
+
|
|
63430
|
+
/**
|
|
63431
|
+
* Selects a color for a debug namespace
|
|
63432
|
+
* @param {String} namespace The namespace string for the debug instance to be colored
|
|
63433
|
+
* @return {Number|String} An ANSI color code for the given namespace
|
|
63434
|
+
* @api private
|
|
63435
|
+
*/
|
|
63436
|
+
function selectColor(namespace) {
|
|
63437
|
+
let hash = 0;
|
|
63438
|
+
|
|
63439
|
+
for (let i = 0; i < namespace.length; i++) {
|
|
63440
|
+
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
|
63441
|
+
hash |= 0; // Convert to 32bit integer
|
|
63442
|
+
}
|
|
63443
|
+
|
|
63444
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
63445
|
+
}
|
|
63446
|
+
createDebug.selectColor = selectColor;
|
|
63447
|
+
|
|
63448
|
+
/**
|
|
63449
|
+
* Create a debugger with the given `namespace`.
|
|
63450
|
+
*
|
|
63451
|
+
* @param {String} namespace
|
|
63452
|
+
* @return {Function}
|
|
63453
|
+
* @api public
|
|
63454
|
+
*/
|
|
63455
|
+
function createDebug(namespace) {
|
|
63456
|
+
let prevTime;
|
|
63457
|
+
let enableOverride = null;
|
|
63458
|
+
let namespacesCache;
|
|
63459
|
+
let enabledCache;
|
|
63460
|
+
|
|
63461
|
+
function debug(...args) {
|
|
63462
|
+
// Disabled?
|
|
63463
|
+
if (!debug.enabled) {
|
|
63464
|
+
return;
|
|
63465
|
+
}
|
|
63466
|
+
|
|
63467
|
+
const self = debug;
|
|
63468
|
+
|
|
63469
|
+
// Set `diff` timestamp
|
|
63470
|
+
const curr = Number(new Date());
|
|
63471
|
+
const ms = curr - (prevTime || curr);
|
|
63472
|
+
self.diff = ms;
|
|
63473
|
+
self.prev = prevTime;
|
|
63474
|
+
self.curr = curr;
|
|
63475
|
+
prevTime = curr;
|
|
63476
|
+
|
|
63477
|
+
args[0] = createDebug.coerce(args[0]);
|
|
63478
|
+
|
|
63479
|
+
if (typeof args[0] !== 'string') {
|
|
63480
|
+
// Anything else let's inspect with %O
|
|
63481
|
+
args.unshift('%O');
|
|
63482
|
+
}
|
|
63483
|
+
|
|
63484
|
+
// Apply any `formatters` transformations
|
|
63485
|
+
let index = 0;
|
|
63486
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
63487
|
+
// If we encounter an escaped % then don't increase the array index
|
|
63488
|
+
if (match === '%%') {
|
|
63489
|
+
return '%';
|
|
63490
|
+
}
|
|
63491
|
+
index++;
|
|
63492
|
+
const formatter = createDebug.formatters[format];
|
|
63493
|
+
if (typeof formatter === 'function') {
|
|
63494
|
+
const val = args[index];
|
|
63495
|
+
match = formatter.call(self, val);
|
|
63496
|
+
|
|
63497
|
+
// Now we need to remove `args[index]` since it's inlined in the `format`
|
|
63498
|
+
args.splice(index, 1);
|
|
63499
|
+
index--;
|
|
63500
|
+
}
|
|
63501
|
+
return match;
|
|
63502
|
+
});
|
|
63503
|
+
|
|
63504
|
+
// Apply env-specific formatting (colors, etc.)
|
|
63505
|
+
createDebug.formatArgs.call(self, args);
|
|
63506
|
+
|
|
63507
|
+
const logFn = self.log || createDebug.log;
|
|
63508
|
+
logFn.apply(self, args);
|
|
63509
|
+
}
|
|
63510
|
+
|
|
63511
|
+
debug.namespace = namespace;
|
|
63512
|
+
debug.useColors = createDebug.useColors();
|
|
63513
|
+
debug.color = createDebug.selectColor(namespace);
|
|
63514
|
+
debug.extend = extend;
|
|
63515
|
+
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
63516
|
+
|
|
63517
|
+
Object.defineProperty(debug, 'enabled', {
|
|
63518
|
+
enumerable: true,
|
|
63519
|
+
configurable: false,
|
|
63520
|
+
get: () => {
|
|
63521
|
+
if (enableOverride !== null) {
|
|
63522
|
+
return enableOverride;
|
|
63523
|
+
}
|
|
63524
|
+
if (namespacesCache !== createDebug.namespaces) {
|
|
63525
|
+
namespacesCache = createDebug.namespaces;
|
|
63526
|
+
enabledCache = createDebug.enabled(namespace);
|
|
63527
|
+
}
|
|
63528
|
+
|
|
63529
|
+
return enabledCache;
|
|
63530
|
+
},
|
|
63531
|
+
set: v => {
|
|
63532
|
+
enableOverride = v;
|
|
63533
|
+
}
|
|
63534
|
+
});
|
|
63535
|
+
|
|
63536
|
+
// Env-specific initialization logic for debug instances
|
|
63537
|
+
if (typeof createDebug.init === 'function') {
|
|
63538
|
+
createDebug.init(debug);
|
|
63539
|
+
}
|
|
63540
|
+
|
|
63541
|
+
return debug;
|
|
63542
|
+
}
|
|
63543
|
+
|
|
63544
|
+
function extend(namespace, delimiter) {
|
|
63545
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
63546
|
+
newDebug.log = this.log;
|
|
63547
|
+
return newDebug;
|
|
63548
|
+
}
|
|
63549
|
+
|
|
63550
|
+
/**
|
|
63551
|
+
* Enables a debug mode by namespaces. This can include modes
|
|
63552
|
+
* separated by a colon and wildcards.
|
|
63553
|
+
*
|
|
63554
|
+
* @param {String} namespaces
|
|
63555
|
+
* @api public
|
|
63556
|
+
*/
|
|
63557
|
+
function enable(namespaces) {
|
|
63558
|
+
createDebug.save(namespaces);
|
|
63559
|
+
createDebug.namespaces = namespaces;
|
|
63560
|
+
|
|
63561
|
+
createDebug.names = [];
|
|
63562
|
+
createDebug.skips = [];
|
|
63563
|
+
|
|
63564
|
+
const split = (typeof namespaces === 'string' ? namespaces : '')
|
|
63565
|
+
.trim()
|
|
63566
|
+
.replace(/\s+/g, ',')
|
|
63567
|
+
.split(',')
|
|
63568
|
+
.filter(Boolean);
|
|
63569
|
+
|
|
63570
|
+
for (const ns of split) {
|
|
63571
|
+
if (ns[0] === '-') {
|
|
63572
|
+
createDebug.skips.push(ns.slice(1));
|
|
63573
|
+
} else {
|
|
63574
|
+
createDebug.names.push(ns);
|
|
63575
|
+
}
|
|
63576
|
+
}
|
|
63577
|
+
}
|
|
63578
|
+
|
|
63579
|
+
/**
|
|
63580
|
+
* Checks if the given string matches a namespace template, honoring
|
|
63581
|
+
* asterisks as wildcards.
|
|
63582
|
+
*
|
|
63583
|
+
* @param {String} search
|
|
63584
|
+
* @param {String} template
|
|
63585
|
+
* @return {Boolean}
|
|
63586
|
+
*/
|
|
63587
|
+
function matchesTemplate(search, template) {
|
|
63588
|
+
let searchIndex = 0;
|
|
63589
|
+
let templateIndex = 0;
|
|
63590
|
+
let starIndex = -1;
|
|
63591
|
+
let matchIndex = 0;
|
|
63592
|
+
|
|
63593
|
+
while (searchIndex < search.length) {
|
|
63594
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
|
|
63595
|
+
// Match character or proceed with wildcard
|
|
63596
|
+
if (template[templateIndex] === '*') {
|
|
63597
|
+
starIndex = templateIndex;
|
|
63598
|
+
matchIndex = searchIndex;
|
|
63599
|
+
templateIndex++; // Skip the '*'
|
|
63600
|
+
} else {
|
|
63601
|
+
searchIndex++;
|
|
63602
|
+
templateIndex++;
|
|
63603
|
+
}
|
|
63604
|
+
} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
|
|
63605
|
+
// Backtrack to the last '*' and try to match more characters
|
|
63606
|
+
templateIndex = starIndex + 1;
|
|
63607
|
+
matchIndex++;
|
|
63608
|
+
searchIndex = matchIndex;
|
|
63609
|
+
} else {
|
|
63610
|
+
return false; // No match
|
|
63611
|
+
}
|
|
63612
|
+
}
|
|
63613
|
+
|
|
63614
|
+
// Handle trailing '*' in template
|
|
63615
|
+
while (templateIndex < template.length && template[templateIndex] === '*') {
|
|
63616
|
+
templateIndex++;
|
|
63617
|
+
}
|
|
63618
|
+
|
|
63619
|
+
return templateIndex === template.length;
|
|
63620
|
+
}
|
|
63621
|
+
|
|
63622
|
+
/**
|
|
63623
|
+
* Disable debug output.
|
|
63624
|
+
*
|
|
63625
|
+
* @return {String} namespaces
|
|
63626
|
+
* @api public
|
|
63627
|
+
*/
|
|
63628
|
+
function disable() {
|
|
63629
|
+
const namespaces = [
|
|
63630
|
+
...createDebug.names,
|
|
63631
|
+
...createDebug.skips.map(namespace => '-' + namespace)
|
|
63632
|
+
].join(',');
|
|
63633
|
+
createDebug.enable('');
|
|
63634
|
+
return namespaces;
|
|
63635
|
+
}
|
|
63636
|
+
|
|
63637
|
+
/**
|
|
63638
|
+
* Returns true if the given mode name is enabled, false otherwise.
|
|
63639
|
+
*
|
|
63640
|
+
* @param {String} name
|
|
63641
|
+
* @return {Boolean}
|
|
63642
|
+
* @api public
|
|
63643
|
+
*/
|
|
63644
|
+
function enabled(name) {
|
|
63645
|
+
for (const skip of createDebug.skips) {
|
|
63646
|
+
if (matchesTemplate(name, skip)) {
|
|
63647
|
+
return false;
|
|
63648
|
+
}
|
|
63649
|
+
}
|
|
63650
|
+
|
|
63651
|
+
for (const ns of createDebug.names) {
|
|
63652
|
+
if (matchesTemplate(name, ns)) {
|
|
63653
|
+
return true;
|
|
63654
|
+
}
|
|
63655
|
+
}
|
|
63656
|
+
|
|
63657
|
+
return false;
|
|
63658
|
+
}
|
|
63659
|
+
|
|
63660
|
+
/**
|
|
63661
|
+
* Coerce `val`.
|
|
63662
|
+
*
|
|
63663
|
+
* @param {Mixed} val
|
|
63664
|
+
* @return {Mixed}
|
|
63665
|
+
* @api private
|
|
63666
|
+
*/
|
|
63667
|
+
function coerce(val) {
|
|
63668
|
+
if (val instanceof Error) {
|
|
63669
|
+
return val.stack || val.message;
|
|
63670
|
+
}
|
|
63671
|
+
return val;
|
|
63672
|
+
}
|
|
63673
|
+
|
|
63674
|
+
/**
|
|
63675
|
+
* XXX DO NOT USE. This is a temporary stub function.
|
|
63676
|
+
* XXX It WILL be removed in the next major release.
|
|
63677
|
+
*/
|
|
63678
|
+
function destroy() {
|
|
63679
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
63680
|
+
}
|
|
63681
|
+
|
|
63682
|
+
createDebug.enable(createDebug.load());
|
|
63683
|
+
|
|
63684
|
+
return createDebug;
|
|
63685
|
+
}
|
|
63686
|
+
|
|
63687
|
+
var common = setup;
|
|
63688
|
+
|
|
63689
|
+
(function (module, exports) {
|
|
63690
|
+
/**
|
|
63691
|
+
* This is the web browser implementation of `debug()`.
|
|
63692
|
+
*/
|
|
63693
|
+
|
|
63694
|
+
exports.formatArgs = formatArgs;
|
|
63695
|
+
exports.save = save;
|
|
63696
|
+
exports.load = load;
|
|
63697
|
+
exports.useColors = useColors;
|
|
63698
|
+
exports.storage = localstorage();
|
|
63699
|
+
exports.destroy = (() => {
|
|
63700
|
+
let warned = false;
|
|
63701
|
+
|
|
63702
|
+
return () => {
|
|
63703
|
+
if (!warned) {
|
|
63704
|
+
warned = true;
|
|
63705
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
63706
|
+
}
|
|
63707
|
+
};
|
|
63708
|
+
})();
|
|
63709
|
+
|
|
63710
|
+
/**
|
|
63711
|
+
* Colors.
|
|
63712
|
+
*/
|
|
63713
|
+
|
|
63714
|
+
exports.colors = [
|
|
63715
|
+
'#0000CC',
|
|
63716
|
+
'#0000FF',
|
|
63717
|
+
'#0033CC',
|
|
63718
|
+
'#0033FF',
|
|
63719
|
+
'#0066CC',
|
|
63720
|
+
'#0066FF',
|
|
63721
|
+
'#0099CC',
|
|
63722
|
+
'#0099FF',
|
|
63723
|
+
'#00CC00',
|
|
63724
|
+
'#00CC33',
|
|
63725
|
+
'#00CC66',
|
|
63726
|
+
'#00CC99',
|
|
63727
|
+
'#00CCCC',
|
|
63728
|
+
'#00CCFF',
|
|
63729
|
+
'#3300CC',
|
|
63730
|
+
'#3300FF',
|
|
63731
|
+
'#3333CC',
|
|
63732
|
+
'#3333FF',
|
|
63733
|
+
'#3366CC',
|
|
63734
|
+
'#3366FF',
|
|
63735
|
+
'#3399CC',
|
|
63736
|
+
'#3399FF',
|
|
63737
|
+
'#33CC00',
|
|
63738
|
+
'#33CC33',
|
|
63739
|
+
'#33CC66',
|
|
63740
|
+
'#33CC99',
|
|
63741
|
+
'#33CCCC',
|
|
63742
|
+
'#33CCFF',
|
|
63743
|
+
'#6600CC',
|
|
63744
|
+
'#6600FF',
|
|
63745
|
+
'#6633CC',
|
|
63746
|
+
'#6633FF',
|
|
63747
|
+
'#66CC00',
|
|
63748
|
+
'#66CC33',
|
|
63749
|
+
'#9900CC',
|
|
63750
|
+
'#9900FF',
|
|
63751
|
+
'#9933CC',
|
|
63752
|
+
'#9933FF',
|
|
63753
|
+
'#99CC00',
|
|
63754
|
+
'#99CC33',
|
|
63755
|
+
'#CC0000',
|
|
63756
|
+
'#CC0033',
|
|
63757
|
+
'#CC0066',
|
|
63758
|
+
'#CC0099',
|
|
63759
|
+
'#CC00CC',
|
|
63760
|
+
'#CC00FF',
|
|
63761
|
+
'#CC3300',
|
|
63762
|
+
'#CC3333',
|
|
63763
|
+
'#CC3366',
|
|
63764
|
+
'#CC3399',
|
|
63765
|
+
'#CC33CC',
|
|
63766
|
+
'#CC33FF',
|
|
63767
|
+
'#CC6600',
|
|
63768
|
+
'#CC6633',
|
|
63769
|
+
'#CC9900',
|
|
63770
|
+
'#CC9933',
|
|
63771
|
+
'#CCCC00',
|
|
63772
|
+
'#CCCC33',
|
|
63773
|
+
'#FF0000',
|
|
63774
|
+
'#FF0033',
|
|
63775
|
+
'#FF0066',
|
|
63776
|
+
'#FF0099',
|
|
63777
|
+
'#FF00CC',
|
|
63778
|
+
'#FF00FF',
|
|
63779
|
+
'#FF3300',
|
|
63780
|
+
'#FF3333',
|
|
63781
|
+
'#FF3366',
|
|
63782
|
+
'#FF3399',
|
|
63783
|
+
'#FF33CC',
|
|
63784
|
+
'#FF33FF',
|
|
63785
|
+
'#FF6600',
|
|
63786
|
+
'#FF6633',
|
|
63787
|
+
'#FF9900',
|
|
63788
|
+
'#FF9933',
|
|
63789
|
+
'#FFCC00',
|
|
63790
|
+
'#FFCC33'
|
|
63791
|
+
];
|
|
63792
|
+
|
|
63793
|
+
/**
|
|
63794
|
+
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
63795
|
+
* and the Firebug extension (any Firefox version) are known
|
|
63796
|
+
* to support "%c" CSS customizations.
|
|
63797
|
+
*
|
|
63798
|
+
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
63799
|
+
*/
|
|
63800
|
+
|
|
63801
|
+
// eslint-disable-next-line complexity
|
|
63802
|
+
function useColors() {
|
|
63803
|
+
// NB: In an Electron preload script, document will be defined but not fully
|
|
63804
|
+
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
63805
|
+
// explicitly
|
|
63806
|
+
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
|
63807
|
+
return true;
|
|
63808
|
+
}
|
|
63809
|
+
|
|
63810
|
+
// Internet Explorer and Edge do not support colors.
|
|
63811
|
+
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
63812
|
+
return false;
|
|
63813
|
+
}
|
|
63814
|
+
|
|
63815
|
+
let m;
|
|
63816
|
+
|
|
63817
|
+
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
63818
|
+
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
63819
|
+
// eslint-disable-next-line no-return-assign
|
|
63820
|
+
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
|
63821
|
+
// Is firebug? http://stackoverflow.com/a/398120/376773
|
|
63822
|
+
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
|
63823
|
+
// Is firefox >= v31?
|
|
63824
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
63825
|
+
(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
|
|
63826
|
+
// Double check webkit in userAgent just in case we are in a worker
|
|
63827
|
+
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
|
63828
|
+
}
|
|
63829
|
+
|
|
63830
|
+
/**
|
|
63831
|
+
* Colorize log arguments if enabled.
|
|
63832
|
+
*
|
|
63833
|
+
* @api public
|
|
63834
|
+
*/
|
|
63835
|
+
|
|
63836
|
+
function formatArgs(args) {
|
|
63837
|
+
args[0] = (this.useColors ? '%c' : '') +
|
|
63838
|
+
this.namespace +
|
|
63839
|
+
(this.useColors ? ' %c' : ' ') +
|
|
63840
|
+
args[0] +
|
|
63841
|
+
(this.useColors ? '%c ' : ' ') +
|
|
63842
|
+
'+' + module.exports.humanize(this.diff);
|
|
63843
|
+
|
|
63844
|
+
if (!this.useColors) {
|
|
63845
|
+
return;
|
|
63846
|
+
}
|
|
63847
|
+
|
|
63848
|
+
const c = 'color: ' + this.color;
|
|
63849
|
+
args.splice(1, 0, c, 'color: inherit');
|
|
63850
|
+
|
|
63851
|
+
// The final "%c" is somewhat tricky, because there could be other
|
|
63852
|
+
// arguments passed either before or after the %c, so we need to
|
|
63853
|
+
// figure out the correct index to insert the CSS into
|
|
63854
|
+
let index = 0;
|
|
63855
|
+
let lastC = 0;
|
|
63856
|
+
args[0].replace(/%[a-zA-Z%]/g, match => {
|
|
63857
|
+
if (match === '%%') {
|
|
63858
|
+
return;
|
|
63859
|
+
}
|
|
63860
|
+
index++;
|
|
63861
|
+
if (match === '%c') {
|
|
63862
|
+
// We only are interested in the *last* %c
|
|
63863
|
+
// (the user may have provided their own)
|
|
63864
|
+
lastC = index;
|
|
63865
|
+
}
|
|
63866
|
+
});
|
|
63867
|
+
|
|
63868
|
+
args.splice(lastC, 0, c);
|
|
63869
|
+
}
|
|
63870
|
+
|
|
63871
|
+
/**
|
|
63872
|
+
* Invokes `console.debug()` when available.
|
|
63873
|
+
* No-op when `console.debug` is not a "function".
|
|
63874
|
+
* If `console.debug` is not available, falls back
|
|
63875
|
+
* to `console.log`.
|
|
63876
|
+
*
|
|
63877
|
+
* @api public
|
|
63878
|
+
*/
|
|
63879
|
+
exports.log = console.debug || console.log || (() => {});
|
|
63880
|
+
|
|
63881
|
+
/**
|
|
63882
|
+
* Save `namespaces`.
|
|
63883
|
+
*
|
|
63884
|
+
* @param {String} namespaces
|
|
63885
|
+
* @api private
|
|
63886
|
+
*/
|
|
63887
|
+
function save(namespaces) {
|
|
63888
|
+
try {
|
|
63889
|
+
if (namespaces) {
|
|
63890
|
+
exports.storage.setItem('debug', namespaces);
|
|
63891
|
+
} else {
|
|
63892
|
+
exports.storage.removeItem('debug');
|
|
63893
|
+
}
|
|
63894
|
+
} catch (error) {
|
|
63895
|
+
// Swallow
|
|
63896
|
+
// XXX (@Qix-) should we be logging these?
|
|
63897
|
+
}
|
|
63898
|
+
}
|
|
63899
|
+
|
|
63900
|
+
/**
|
|
63901
|
+
* Load `namespaces`.
|
|
63902
|
+
*
|
|
63903
|
+
* @return {String} returns the previously persisted debug modes
|
|
63904
|
+
* @api private
|
|
63905
|
+
*/
|
|
63906
|
+
function load() {
|
|
63907
|
+
let r;
|
|
63908
|
+
try {
|
|
63909
|
+
r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
|
|
63910
|
+
} catch (error) {
|
|
63911
|
+
// Swallow
|
|
63912
|
+
// XXX (@Qix-) should we be logging these?
|
|
63913
|
+
}
|
|
63914
|
+
|
|
63915
|
+
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
63916
|
+
if (!r && typeof browser$1$1 !== 'undefined' && 'env' in browser$1$1) {
|
|
63917
|
+
r = browser$1$1.env.DEBUG;
|
|
63918
|
+
}
|
|
63919
|
+
|
|
63920
|
+
return r;
|
|
63921
|
+
}
|
|
63922
|
+
|
|
63923
|
+
/**
|
|
63924
|
+
* Localstorage attempts to return the localstorage.
|
|
63925
|
+
*
|
|
63926
|
+
* This is necessary because safari throws
|
|
63927
|
+
* when a user disables cookies/localstorage
|
|
63928
|
+
* and you attempt to access it.
|
|
63929
|
+
*
|
|
63930
|
+
* @return {LocalStorage}
|
|
63931
|
+
* @api private
|
|
63932
|
+
*/
|
|
63933
|
+
|
|
63934
|
+
function localstorage() {
|
|
63935
|
+
try {
|
|
63936
|
+
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
63937
|
+
// The Browser also has localStorage in the global context.
|
|
63938
|
+
return localStorage;
|
|
63939
|
+
} catch (error) {
|
|
63940
|
+
// Swallow
|
|
63941
|
+
// XXX (@Qix-) should we be logging these?
|
|
63942
|
+
}
|
|
63943
|
+
}
|
|
63944
|
+
|
|
63945
|
+
module.exports = common(exports);
|
|
63946
|
+
|
|
63947
|
+
const {formatters} = module.exports;
|
|
63948
|
+
|
|
63949
|
+
/**
|
|
63950
|
+
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
63951
|
+
*/
|
|
63952
|
+
|
|
63953
|
+
formatters.j = function (v) {
|
|
63954
|
+
try {
|
|
63955
|
+
return JSON.stringify(v);
|
|
63956
|
+
} catch (error) {
|
|
63957
|
+
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
63958
|
+
}
|
|
63959
|
+
};
|
|
63960
|
+
} (browser, browser.exports));
|
|
63961
|
+
|
|
63962
|
+
var browserExports = browser.exports;
|
|
63963
|
+
browserExports.default;
|
|
63964
|
+
|
|
63224
63965
|
var debug$6 = {};
|
|
63225
63966
|
|
|
63226
|
-
const debug$5 =
|
|
63967
|
+
const debug$5 = browserExports;
|
|
63227
63968
|
|
|
63228
63969
|
debug$6.createDebug = (namespace) => {
|
|
63229
63970
|
const log = debug$5(namespace);
|
|
@@ -64304,7 +65045,7 @@ var runComparators$1 = {};
|
|
|
64304
65045
|
|
|
64305
65046
|
var log$5 = {exports: {}};
|
|
64306
65047
|
|
|
64307
|
-
const debug$3 =
|
|
65048
|
+
const debug$3 = browserExports('putout:compare');
|
|
64308
65049
|
|
|
64309
65050
|
const {isArray: isArray$5} = Array;
|
|
64310
65051
|
const isObject$4 = (a) => a && typeof a === 'object';
|
|
@@ -65486,7 +66227,7 @@ tryThrowWithReason$1.tryThrowWithReason = (fn, ...args) => {
|
|
|
65486
66227
|
|
|
65487
66228
|
var includer = {};
|
|
65488
66229
|
|
|
65489
|
-
const log$2 =
|
|
66230
|
+
const log$2 = browserExports('putout:runner:include');
|
|
65490
66231
|
const maybeArray$2 = maybeArray_1;
|
|
65491
66232
|
const {validate} = validate$2;
|
|
65492
66233
|
|
|
@@ -66931,7 +67672,7 @@ const {
|
|
|
66931
67672
|
start,
|
|
66932
67673
|
} = filesystem;
|
|
66933
67674
|
|
|
66934
|
-
const log =
|
|
67675
|
+
const log = browserExports('putout:runner:scanner');
|
|
66935
67676
|
|
|
66936
67677
|
const fromSimple = convertSimpleFilesystemToFilesystem;
|
|
66937
67678
|
const toSimple = convertFilesystemToSimpleFilesystem;
|
|
@@ -67082,7 +67823,7 @@ function parseVisitor(visitors) {
|
|
|
67082
67823
|
|
|
67083
67824
|
const {traverse: defaultTraverse} = bundle;
|
|
67084
67825
|
const once = onceExports;
|
|
67085
|
-
const debug =
|
|
67826
|
+
const debug = browserExports('putout:runner:find');
|
|
67086
67827
|
|
|
67087
67828
|
const runFix = runFix$3;
|
|
67088
67829
|
const mergeVisitors = mergeVisitors$1;
|