|
|
|
|
@@ -172,8 +172,8 @@ class ExemptDraftPullRequest {
|
|
|
|
|
// keep this for backward compatibility
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
|
pullRequestCallback) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
var _a;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
if (this._issue.isPullRequest) {
|
|
|
|
|
if (this._options.exemptDraftPr) {
|
|
|
|
|
this._issueLogger.info(`The option ${this._issueLogger.createOptionLink(option_1.Option.ExemptDraftPr)} is enabled`);
|
|
|
|
|
@@ -348,23 +348,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
}) : function(o, v) {
|
|
|
|
|
o["default"] = v;
|
|
|
|
|
});
|
|
|
|
|
var __importStar = (this && this.__importStar) || (function () {
|
|
|
|
|
var ownKeys = function(o) {
|
|
|
|
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
|
|
|
var ar = [];
|
|
|
|
|
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
|
|
|
return ar;
|
|
|
|
|
};
|
|
|
|
|
return ownKeys(o);
|
|
|
|
|
};
|
|
|
|
|
return function (mod) {
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
})();
|
|
|
|
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
|
|
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
|
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
|
|
|
@@ -440,9 +430,9 @@ class IssuesProcessor {
|
|
|
|
|
this.statistics = new statistics_1.Statistics();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
processIssues() {
|
|
|
|
|
return __awaiter(this, arguments, void 0, function* (page = 1) {
|
|
|
|
|
processIssues(page = 1) {
|
|
|
|
|
var _a, _b;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
// get the next batch of issues
|
|
|
|
|
const issues = yield this.getIssues(page);
|
|
|
|
|
if (issues.length <= 0) {
|
|
|
|
|
@@ -484,8 +474,8 @@ class IssuesProcessor {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
processIssue(issue, labelsToAddWhenUnstale, labelsToRemoveWhenUnstale, labelsToRemoveWhenStale) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
var _a;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
(_a = this.statistics) === null || _a === void 0 ? void 0 : _a.incrementProcessedItemsCount(issue);
|
|
|
|
|
const issueLogger = new issue_logger_1.IssueLogger(issue);
|
|
|
|
|
issueLogger.info(`Found this $$type last updated at: ${logger_service_1.LoggerService.cyan(issue.updated_at)}`);
|
|
|
|
|
@@ -682,8 +672,8 @@ class IssuesProcessor {
|
|
|
|
|
}
|
|
|
|
|
// Grab comments for an issue since a given date
|
|
|
|
|
listIssueComments(issue, sinceDate) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
var _a;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
// Find any comments since date on the given issue
|
|
|
|
|
try {
|
|
|
|
|
this._consumeIssueOperation(issue);
|
|
|
|
|
@@ -704,8 +694,8 @@ class IssuesProcessor {
|
|
|
|
|
}
|
|
|
|
|
// grab issues from github in batches of 100
|
|
|
|
|
getIssues(page) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
var _a;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
try {
|
|
|
|
|
this.operations.consumeOperation();
|
|
|
|
|
const issueResult = yield this.client.rest.issues.listForRepo({
|
|
|
|
|
@@ -728,8 +718,8 @@ class IssuesProcessor {
|
|
|
|
|
// returns the creation date of a given label on an issue (or nothing if no label existed)
|
|
|
|
|
///see https://developer.github.com/v3/activity/events/
|
|
|
|
|
getLabelCreationDate(issue, label) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
var _a;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const issueLogger = new issue_logger_1.IssueLogger(issue);
|
|
|
|
|
issueLogger.info(`Checking for label on this $$type`);
|
|
|
|
|
this._consumeIssueOperation(issue);
|
|
|
|
|
@@ -752,8 +742,8 @@ class IssuesProcessor {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
getPullRequest(issue) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
var _a;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const issueLogger = new issue_logger_1.IssueLogger(issue);
|
|
|
|
|
try {
|
|
|
|
|
this._consumeIssueOperation(issue);
|
|
|
|
|
@@ -771,8 +761,8 @@ class IssuesProcessor {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
getRateLimit() {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
var _a;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const logger = new logger_1.Logger();
|
|
|
|
|
try {
|
|
|
|
|
const rateLimitResult = yield this.client.rest.rateLimit.get();
|
|
|
|
|
@@ -871,8 +861,8 @@ class IssuesProcessor {
|
|
|
|
|
}
|
|
|
|
|
// Mark an issue as stale with a comment and a label
|
|
|
|
|
_markStale(issue, staleMessage, staleLabel, skipMessage) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
var _a, _b, _c;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const issueLogger = new issue_logger_1.IssueLogger(issue);
|
|
|
|
|
issueLogger.info(`Marking this $$type as stale`);
|
|
|
|
|
this.staleIssues.push(issue);
|
|
|
|
|
@@ -917,8 +907,8 @@ class IssuesProcessor {
|
|
|
|
|
}
|
|
|
|
|
// Close an issue based on staleness
|
|
|
|
|
_closeIssue(issue, closeMessage, closeLabel) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
var _a, _b, _c;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const issueLogger = new issue_logger_1.IssueLogger(issue);
|
|
|
|
|
issueLogger.info(`Closing $$type for being stale`);
|
|
|
|
|
this.closedIssues.push(issue);
|
|
|
|
|
@@ -977,8 +967,8 @@ class IssuesProcessor {
|
|
|
|
|
}
|
|
|
|
|
// Delete the branch on closed pull request
|
|
|
|
|
_deleteBranch(issue) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
var _a;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const issueLogger = new issue_logger_1.IssueLogger(issue);
|
|
|
|
|
issueLogger.info(`Delete
|
|
|
|
|
branch from closed $
|
|
|
|
|
@@ -1016,9 +1006,9 @@ class IssuesProcessor {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// Remove a label from an issue or a pull request
|
|
|
|
|
_removeLabel(issue_2, label_1) {
|
|
|
|
|
return __awaiter(this, arguments, void 0, function* (issue, label, isSubStep = false) {
|
|
|
|
|
_removeLabel(issue, label, isSubStep = false) {
|
|
|
|
|
var _a;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const issueLogger = new issue_logger_1.IssueLogger(issue);
|
|
|
|
|
issueLogger.info(`${isSubStep ? logger_service_1.LoggerService.white('├── ') : ''}Removing the label "${logger_service_1.LoggerService.cyan(label)}" from this $$type...`);
|
|
|
|
|
this.removedLabelIssues.push(issue);
|
|
|
|
|
@@ -1114,8 +1104,8 @@ class IssuesProcessor {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
_addLabelsWhenUnstale(issue, labelsToAdd) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
var _a;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
if (!labelsToAdd.length) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
@@ -1140,8 +1130,8 @@ class IssuesProcessor {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
_removeStaleLabel(issue, staleLabel) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
var _a;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const issueLogger = new issue_logger_1.IssueLogger(issue);
|
|
|
|
|
issueLogger.info(`The $$type is no longer stale. Removing the stale label...`);
|
|
|
|
|
yield this._removeLabel(issue, staleLabel);
|
|
|
|
|
@@ -1149,8 +1139,8 @@ class IssuesProcessor {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
_removeCloseLabel(issue, closeLabel) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
var _a;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const issueLogger = new issue_logger_1.IssueLogger(issue);
|
|
|
|
|
issueLogger.info(`The $$type is not closed nor locked. Trying to remove the close label...`);
|
|
|
|
|
if (!closeLabel) {
|
|
|
|
|
@@ -1314,23 +1304,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
}) : function(o, v) {
|
|
|
|
|
o["default"] = v;
|
|
|
|
|
});
|
|
|
|
|
var __importStar = (this && this.__importStar) || (function () {
|
|
|
|
|
var ownKeys = function(o) {
|
|
|
|
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
|
|
|
var ar = [];
|
|
|
|
|
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
|
|
|
return ar;
|
|
|
|
|
};
|
|
|
|
|
return ownKeys(o);
|
|
|
|
|
};
|
|
|
|
|
return function (mod) {
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
})();
|
|
|
|
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
|
|
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
|
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
|
|
|
@@ -1615,23 +1595,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
}) : function(o, v) {
|
|
|
|
|
o["default"] = v;
|
|
|
|
|
});
|
|
|
|
|
var __importStar = (this && this.__importStar) || (function () {
|
|
|
|
|
var ownKeys = function(o) {
|
|
|
|
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
|
|
|
var ar = [];
|
|
|
|
|
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
|
|
|
return ar;
|
|
|
|
|
};
|
|
|
|
|
return ownKeys(o);
|
|
|
|
|
};
|
|
|
|
|
return function (mod) {
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
})();
|
|
|
|
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
|
|
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
|
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
|
|
|
@@ -1787,23 +1757,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
}) : function(o, v) {
|
|
|
|
|
o["default"] = v;
|
|
|
|
|
});
|
|
|
|
|
var __importStar = (this && this.__importStar) || (function () {
|
|
|
|
|
var ownKeys = function(o) {
|
|
|
|
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
|
|
|
var ar = [];
|
|
|
|
|
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
|
|
|
return ar;
|
|
|
|
|
};
|
|
|
|
|
return ownKeys(o);
|
|
|
|
|
};
|
|
|
|
|
return function (mod) {
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
})();
|
|
|
|
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
|
|
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
|
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
|
|
|
@@ -2313,7 +2273,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
|
|
|
};
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.cleanLabel = cleanLabel;
|
|
|
|
|
exports.cleanLabel = void 0;
|
|
|
|
|
const lodash_deburr_1 = __importDefault(__nccwpck_require__(61601));
|
|
|
|
|
/**
|
|
|
|
|
* @description
|
|
|
|
|
@@ -2326,6 +2286,7 @@ const lodash_deburr_1 = __importDefault(__nccwpck_require__(61601));
|
|
|
|
|
function cleanLabel(label) {
|
|
|
|
|
return (0, lodash_deburr_1.default)(label === null || label === void 0 ? void 0 : label.toLowerCase());
|
|
|
|
|
}
|
|
|
|
|
exports.cleanLabel = cleanLabel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -2336,7 +2297,7 @@ function cleanLabel(label) {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.getHumanizedDate = getHumanizedDate;
|
|
|
|
|
exports.getHumanizedDate = void 0;
|
|
|
|
|
function getHumanizedDate(date) {
|
|
|
|
|
const year = date.getFullYear();
|
|
|
|
|
let month = `${date.getMonth() + 1}`;
|
|
|
|
|
@@ -2349,6 +2310,7 @@ function getHumanizedDate(date) {
|
|
|
|
|
}
|
|
|
|
|
return [day, month, year].join('-');
|
|
|
|
|
}
|
|
|
|
|
exports.getHumanizedDate = getHumanizedDate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -2361,8 +2323,7 @@ function getHumanizedDate(date) {
|
|
|
|
|
/// returns false if the dates are equal within the `equalityToleranceInSeconds` number of seconds
|
|
|
|
|
/// otherwise returns true if `comparedDate` is after `date`
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.isDateMoreRecentThan = isDateMoreRecentThan;
|
|
|
|
|
exports.isDateEqualTo = isDateEqualTo;
|
|
|
|
|
exports.isDateEqualTo = exports.isDateMoreRecentThan = void 0;
|
|
|
|
|
function isDateMoreRecentThan(date, comparedDate, equalityToleranceInSeconds = 0) {
|
|
|
|
|
if (equalityToleranceInSeconds > 0) {
|
|
|
|
|
const areDatesEqual = isDateEqualTo(date, comparedDate, equalityToleranceInSeconds);
|
|
|
|
|
@@ -2370,12 +2331,14 @@ function isDateMoreRecentThan(date, comparedDate, equalityToleranceInSeconds = 0
|
|
|
|
|
}
|
|
|
|
|
return date > comparedDate;
|
|
|
|
|
}
|
|
|
|
|
exports.isDateMoreRecentThan = isDateMoreRecentThan;
|
|
|
|
|
function isDateEqualTo(date, otherDate, toleranceInSeconds) {
|
|
|
|
|
const timestamp = date.getTime();
|
|
|
|
|
const otherTimestamp = otherDate.getTime();
|
|
|
|
|
const deltaInSeconds = Math.abs(timestamp - otherTimestamp) / 1000;
|
|
|
|
|
return deltaInSeconds <= toleranceInSeconds;
|
|
|
|
|
}
|
|
|
|
|
exports.isDateEqualTo = isDateEqualTo;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -2386,7 +2349,7 @@ function isDateEqualTo(date, otherDate, toleranceInSeconds) {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.isValidDate = isValidDate;
|
|
|
|
|
exports.isValidDate = void 0;
|
|
|
|
|
/**
|
|
|
|
|
* @description
|
|
|
|
|
* Check if a date is valid
|
|
|
|
|
@@ -2404,6 +2367,7 @@ function isValidDate(date) {
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
exports.isValidDate = isValidDate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -2414,7 +2378,7 @@ function isValidDate(date) {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.getSortField = getSortField;
|
|
|
|
|
exports.getSortField = void 0;
|
|
|
|
|
function getSortField(sortOption) {
|
|
|
|
|
return sortOption === 'updated'
|
|
|
|
|
? 'updated'
|
|
|
|
|
@@ -2422,6 +2386,7 @@ function getSortField(sortOption) {
|
|
|
|
|
? 'comments'
|
|
|
|
|
: 'created';
|
|
|
|
|
}
|
|
|
|
|
exports.getSortField = getSortField;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -2432,10 +2397,11 @@ function getSortField(sortOption) {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.isBoolean = isBoolean;
|
|
|
|
|
exports.isBoolean = void 0;
|
|
|
|
|
function isBoolean(value) {
|
|
|
|
|
return value === true || value === false;
|
|
|
|
|
}
|
|
|
|
|
exports.isBoolean = isBoolean;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -2446,7 +2412,7 @@ function isBoolean(value) {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.isLabeled = isLabeled;
|
|
|
|
|
exports.isLabeled = void 0;
|
|
|
|
|
const clean_label_1 = __nccwpck_require__(67752);
|
|
|
|
|
/**
|
|
|
|
|
* @description
|
|
|
|
|
@@ -2462,6 +2428,7 @@ function isLabeled(issue, label) {
|
|
|
|
|
return (0, clean_label_1.cleanLabel)(label) === (0, clean_label_1.cleanLabel)(issueLabel.name);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.isLabeled = isLabeled;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -2472,10 +2439,11 @@ function isLabeled(issue, label) {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.isPullRequest = isPullRequest;
|
|
|
|
|
exports.isPullRequest = void 0;
|
|
|
|
|
function isPullRequest(issue) {
|
|
|
|
|
return !!issue.pull_request;
|
|
|
|
|
}
|
|
|
|
|
exports.isPullRequest = isPullRequest;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -2486,10 +2454,11 @@ function isPullRequest(issue) {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.shouldMarkWhenStale = shouldMarkWhenStale;
|
|
|
|
|
exports.shouldMarkWhenStale = void 0;
|
|
|
|
|
function shouldMarkWhenStale(daysBeforeStale) {
|
|
|
|
|
return daysBeforeStale >= 0;
|
|
|
|
|
}
|
|
|
|
|
exports.shouldMarkWhenStale = shouldMarkWhenStale;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -2500,7 +2469,7 @@ function shouldMarkWhenStale(daysBeforeStale) {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.wordsToList = wordsToList;
|
|
|
|
|
exports.wordsToList = void 0;
|
|
|
|
|
/**
|
|
|
|
|
* @description
|
|
|
|
|
* Transform a string of comma separated words
|
|
|
|
|
@@ -2523,6 +2492,7 @@ function wordsToList(words) {
|
|
|
|
|
}
|
|
|
|
|
return words.split(',').map((word) => word.trim());
|
|
|
|
|
}
|
|
|
|
|
exports.wordsToList = wordsToList;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -2548,23 +2518,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
|
|
}) : function(o, v) {
|
|
|
|
|
o["default"] = v;
|
|
|
|
|
});
|
|
|
|
|
var __importStar = (this && this.__importStar) || (function () {
|
|
|
|
|
var ownKeys = function(o) {
|
|
|
|
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
|
|
|
var ar = [];
|
|
|
|
|
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
|
|
|
return ar;
|
|
|
|
|
};
|
|
|
|
|
return ownKeys(o);
|
|
|
|
|
};
|
|
|
|
|
return function (mod) {
|
|
|
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
|
|
if (mod && mod.__esModule) return mod;
|
|
|
|
|
var result = {};
|
|
|
|
|
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
|
|
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
|
|
|
__setModuleDefault(result, mod);
|
|
|
|
|
return result;
|
|
|
|
|
};
|
|
|
|
|
})();
|
|
|
|
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
|
|
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
|
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
|
|
|
@@ -15958,7 +15918,7 @@ class HttpClient {
|
|
|
|
|
if (this._keepAlive && useProxy) {
|
|
|
|
|
agent = this._proxyAgent;
|
|
|
|
|
}
|
|
|
|
|
if (!useProxy) {
|
|
|
|
|
if (this._keepAlive && !useProxy) {
|
|
|
|
|
agent = this._agent;
|
|
|
|
|
}
|
|
|
|
|
// if agent is already assigned use that agent.
|
|
|
|
|
@@ -15990,12 +15950,16 @@ class HttpClient {
|
|
|
|
|
agent = tunnelAgent(agentOptions);
|
|
|
|
|
this._proxyAgent = agent;
|
|
|
|
|
}
|
|
|
|
|
// if tunneling agent isn't assigned create a new agent
|
|
|
|
|
if (!agent) {
|
|
|
|
|
// if reusing agent across request and tunneling agent isn't assigned create a new agent
|
|
|
|
|
if (this._keepAlive && !agent) {
|
|
|
|
|
const options = { keepAlive: this._keepAlive, maxSockets };
|
|
|
|
|
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
|
|
|
|
|
this._agent = agent;
|
|
|
|
|
}
|
|
|
|
|
// if not using private agent and tunnel agent isn't setup then use global agent
|
|
|
|
|
if (!agent) {
|
|
|
|
|
agent = usingSsl ? https.globalAgent : http.globalAgent;
|
|
|
|
|
}
|
|
|
|
|
if (usingSsl && this._ignoreSslError) {
|
|
|
|
|
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
|
|
|
|
|
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
|
|
|
|
|
@@ -16017,7 +15981,7 @@ class HttpClient {
|
|
|
|
|
}
|
|
|
|
|
const usingSsl = parsedUrl.protocol === 'https:';
|
|
|
|
|
proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {
|
|
|
|
|
token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`
|
|
|
|
|
token: `${proxyUrl.username}:${proxyUrl.password}`
|
|
|
|
|
})));
|
|
|
|
|
this._proxyAgentDispatcher = proxyAgent;
|
|
|
|
|
if (usingSsl && this._ignoreSslError) {
|
|
|
|
|
@@ -16131,11 +16095,11 @@ function getProxyUrl(reqUrl) {
|
|
|
|
|
})();
|
|
|
|
|
if (proxyVar) {
|
|
|
|
|
try {
|
|
|
|
|
return new DecodedURL(proxyVar);
|
|
|
|
|
return new URL(proxyVar);
|
|
|
|
|
}
|
|
|
|
|
catch (_a) {
|
|
|
|
|
if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
|
|
|
|
|
return new DecodedURL(`http://${proxyVar}`);
|
|
|
|
|
return new URL(`http://${proxyVar}`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
@@ -16194,19 +16158,6 @@ function isLoopbackAddress(host) {
|
|
|
|
|
hostLower.startsWith('[::1]') ||
|
|
|
|
|
hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
|
|
|
|
|
}
|
|
|
|
|
class DecodedURL extends URL {
|
|
|
|
|
constructor(url, base) {
|
|
|
|
|
super(url, base);
|
|
|
|
|
this._decodedUsername = decodeURIComponent(super.username);
|
|
|
|
|
this._decodedPassword = decodeURIComponent(super.password);
|
|
|
|
|
}
|
|
|
|
|
get username() {
|
|
|
|
|
return this._decodedUsername;
|
|
|
|
|
}
|
|
|
|
|
get password() {
|
|
|
|
|
return this._decodedPassword;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//# sourceMappingURL=proxy.js.map
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
@@ -20360,7 +20311,6 @@ __export(dist_src_exports, {
|
|
|
|
|
retry: () => retry
|
|
|
|
|
});
|
|
|
|
|
module.exports = __toCommonJS(dist_src_exports);
|
|
|
|
|
var import_core = __nccwpck_require__(76762);
|
|
|
|
|
|
|
|
|
|
// pkg/dist-src/error-request.js
|
|
|
|
|
async function errorRequest(state, octokit, error, options) {
|
|
|
|
|
@@ -20377,7 +20327,7 @@ async function errorRequest(state, octokit, error, options) {
|
|
|
|
|
|
|
|
|
|
// pkg/dist-src/wrap-request.js
|
|
|
|
|
var import_light = __toESM(__nccwpck_require__(11174));
|
|
|
|
|
var import_request_error = __nccwpck_require__(68036);
|
|
|
|
|
var import_request_error = __nccwpck_require__(10537);
|
|
|
|
|
async function wrapRequest(state, octokit, request, options) {
|
|
|
|
|
const limiter = new import_light.default();
|
|
|
|
|
limiter.on("failed", function(error, info) {
|
|
|
|
|
@@ -20408,13 +20358,13 @@ async function requestWithGraphqlErrorHandling(state, octokit, request, options)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// pkg/dist-src/index.js
|
|
|
|
|
var VERSION = "5.0.5";
|
|
|
|
|
var VERSION = "4.1.6";
|
|
|
|
|
function retry(octokit, octokitOptions) {
|
|
|
|
|
const state = Object.assign(
|
|
|
|
|
{
|
|
|
|
|
enabled: true,
|
|
|
|
|
retryAfterBaseValue: 1e3,
|
|
|
|
|
doNotRetry: [400, 401, 403, 404, 422, 451],
|
|
|
|
|
doNotRetry: [400, 401, 403, 404, 422],
|
|
|
|
|
retries: 3
|
|
|
|
|
},
|
|
|
|
|
octokitOptions.retry
|
|
|
|
|
@@ -20440,104 +20390,6 @@ retry.VERSION = VERSION;
|
|
|
|
|
0 && (0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 68036:
|
|
|
|
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
var __create = Object.create;
|
|
|
|
|
var __defProp = Object.defineProperty;
|
|
|
|
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
|
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
|
|
var __getProtoOf = Object.getPrototypeOf;
|
|
|
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
|
|
var __export = (target, all) => {
|
|
|
|
|
for (var name in all)
|
|
|
|
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
|
|
|
};
|
|
|
|
|
var __copyProps = (to, from, except, desc) => {
|
|
|
|
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
|
|
|
for (let key of __getOwnPropNames(from))
|
|
|
|
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
|
|
|
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
|
|
|
}
|
|
|
|
|
return to;
|
|
|
|
|
};
|
|
|
|
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
|
|
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
|
|
|
// file that has been converted to a CommonJS file using a Babel-
|
|
|
|
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
|
|
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
|
|
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
|
|
|
mod
|
|
|
|
|
));
|
|
|
|
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
|
|
|
|
|
|
|
|
// pkg/dist-src/index.js
|
|
|
|
|
var dist_src_exports = {};
|
|
|
|
|
__export(dist_src_exports, {
|
|
|
|
|
RequestError: () => RequestError
|
|
|
|
|
});
|
|
|
|
|
module.exports = __toCommonJS(dist_src_exports);
|
|
|
|
|
var import_deprecation = __nccwpck_require__(58932);
|
|
|
|
|
var import_once = __toESM(__nccwpck_require__(1223));
|
|
|
|
|
var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));
|
|
|
|
|
var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));
|
|
|
|
|
var RequestError = class extends Error {
|
|
|
|
|
constructor(message, statusCode, options) {
|
|
|
|
|
super(message);
|
|
|
|
|
if (Error.captureStackTrace) {
|
|
|
|
|
Error.captureStackTrace(this, this.constructor);
|
|
|
|
|
}
|
|
|
|
|
this.name = "HttpError";
|
|
|
|
|
this.status = statusCode;
|
|
|
|
|
let headers;
|
|
|
|
|
if ("headers" in options && typeof options.headers !== "undefined") {
|
|
|
|
|
headers = options.headers;
|
|
|
|
|
}
|
|
|
|
|
if ("response" in options) {
|
|
|
|
|
this.response = options.response;
|
|
|
|
|
headers = options.response.headers;
|
|
|
|
|
}
|
|
|
|
|
const requestCopy = Object.assign({}, options.request);
|
|
|
|
|
if (options.request.headers.authorization) {
|
|
|
|
|
requestCopy.headers = Object.assign({}, options.request.headers, {
|
|
|
|
|
authorization: options.request.headers.authorization.replace(
|
|
|
|
|
/ .*$/,
|
|
|
|
|
" [REDACTED]"
|
|
|
|
|
)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
|
|
|
|
|
this.request = requestCopy;
|
|
|
|
|
Object.defineProperty(this, "code", {
|
|
|
|
|
get() {
|
|
|
|
|
logOnceCode(
|
|
|
|
|
new import_deprecation.Deprecation(
|
|
|
|
|
"[@octokit/request-error] `error.code` is deprecated, use `error.status`."
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
return statusCode;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
Object.defineProperty(this, "headers", {
|
|
|
|
|
get() {
|
|
|
|
|
logOnceHeaders(
|
|
|
|
|
new import_deprecation.Deprecation(
|
|
|
|
|
"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
return headers || {};
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
// Annotate the CommonJS export names for ESM import in node:
|
|
|
|
|
0 && (0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 10537:
|
|
|
|
|
@@ -28541,17 +28393,14 @@ function useColors() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let m;
|
|
|
|
|
|
|
|
|
|
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
|
|
|
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
|
|
|
// eslint-disable-next-line no-return-assign
|
|
|
|
|
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
|
|
|
|
// Is firebug? http://stackoverflow.com/a/398120/376773
|
|
|
|
|
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
|
|
|
|
// Is firefox >= v31?
|
|
|
|
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
|
|
|
(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
|
|
|
|
|
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
|
|
|
|
// Double check webkit in userAgent just in case we are in a worker
|
|
|
|
|
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
|
|
|
|
}
|
|
|
|
|
@@ -28635,7 +28484,7 @@ function save(namespaces) {
|
|
|
|
|
function load() {
|
|
|
|
|
let r;
|
|
|
|
|
try {
|
|
|
|
|
r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
|
|
|
|
|
r = exports.storage.getItem('debug');
|
|
|
|
|
} catch (error) {
|
|
|
|
|
// Swallow
|
|
|
|
|
// XXX (@Qix-) should we be logging these?
|
|
|
|
|
@@ -28861,64 +28710,26 @@ function setup(env) {
|
|
|
|
|
createDebug.names = [];
|
|
|
|
|
createDebug.skips = [];
|
|
|
|
|
|
|
|
|
|
const split = (typeof namespaces === 'string' ? namespaces : '')
|
|
|
|
|
.trim()
|
|
|
|
|
.replace(/\s+/g, ',')
|
|
|
|
|
.split(',')
|
|
|
|
|
.filter(Boolean);
|
|
|
|
|
let i;
|
|
|
|
|
const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
|
|
|
|
const len = split.length;
|
|
|
|
|
|
|
|
|
|
for (const ns of split) {
|
|
|
|
|
if (ns[0] === '-') {
|
|
|
|
|
createDebug.skips.push(ns.slice(1));
|
|
|
|
|
for (i = 0; i < len; i++) {
|
|
|
|
|
if (!split[i]) {
|
|
|
|
|
// ignore empty strings
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespaces = split[i].replace(/\*/g, '.*?');
|
|
|
|
|
|
|
|
|
|
if (namespaces[0] === '-') {
|
|
|
|
|
createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
|
|
|
|
|
} else {
|
|
|
|
|
createDebug.names.push(ns);
|
|
|
|
|
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks if the given string matches a namespace template, honoring
|
|
|
|
|
* asterisks as wildcards.
|
|
|
|
|
*
|
|
|
|
|
* @param {String} search
|
|
|
|
|
* @param {String} template
|
|
|
|
|
* @return {Boolean}
|
|
|
|
|
*/
|
|
|
|
|
function matchesTemplate(search, template) {
|
|
|
|
|
let searchIndex = 0;
|
|
|
|
|
let templateIndex = 0;
|
|
|
|
|
let starIndex = -1;
|
|
|
|
|
let matchIndex = 0;
|
|
|
|
|
|
|
|
|
|
while (searchIndex < search.length) {
|
|
|
|
|
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
|
|
|
|
|
// Match character or proceed with wildcard
|
|
|
|
|
if (template[templateIndex] === '*') {
|
|
|
|
|
starIndex = templateIndex;
|
|
|
|
|
matchIndex = searchIndex;
|
|
|
|
|
templateIndex++; // Skip the '*'
|
|
|
|
|
} else {
|
|
|
|
|
searchIndex++;
|
|
|
|
|
templateIndex++;
|
|
|
|
|
}
|
|
|
|
|
} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
|
|
|
|
|
// Backtrack to the last '*' and try to match more characters
|
|
|
|
|
templateIndex = starIndex + 1;
|
|
|
|
|
matchIndex++;
|
|
|
|
|
searchIndex = matchIndex;
|
|
|
|
|
} else {
|
|
|
|
|
return false; // No match
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Handle trailing '*' in template
|
|
|
|
|
while (templateIndex < template.length && template[templateIndex] === '*') {
|
|
|
|
|
templateIndex++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return templateIndex === template.length;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Disable debug output.
|
|
|
|
|
*
|
|
|
|
|
@@ -28927,8 +28738,8 @@ function setup(env) {
|
|
|
|
|
*/
|
|
|
|
|
function disable() {
|
|
|
|
|
const namespaces = [
|
|
|
|
|
...createDebug.names,
|
|
|
|
|
...createDebug.skips.map(namespace => '-' + namespace)
|
|
|
|
|
...createDebug.names.map(toNamespace),
|
|
|
|
|
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
|
|
|
|
|
].join(',');
|
|
|
|
|
createDebug.enable('');
|
|
|
|
|
return namespaces;
|
|
|
|
|
@@ -28942,14 +28753,21 @@ function setup(env) {
|
|
|
|
|
* @api public
|
|
|
|
|
*/
|
|
|
|
|
function enabled(name) {
|
|
|
|
|
for (const skip of createDebug.skips) {
|
|
|
|
|
if (matchesTemplate(name, skip)) {
|
|
|
|
|
if (name[name.length - 1] === '*') {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let i;
|
|
|
|
|
let len;
|
|
|
|
|
|
|
|
|
|
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
|
|
|
if (createDebug.skips[i].test(name)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (const ns of createDebug.names) {
|
|
|
|
|
if (matchesTemplate(name, ns)) {
|
|
|
|
|
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
|
|
|
if (createDebug.names[i].test(name)) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -28957,6 +28775,19 @@ function setup(env) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert regexp to namespace
|
|
|
|
|
*
|
|
|
|
|
* @param {RegExp} regxep
|
|
|
|
|
* @return {String} namespace
|
|
|
|
|
* @api private
|
|
|
|
|
*/
|
|
|
|
|
function toNamespace(regexp) {
|
|
|
|
|
return regexp.toString()
|
|
|
|
|
.substring(2, regexp.toString().length - 2)
|
|
|
|
|
.replace(/\.\*\?$/, '*');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Coerce `val`.
|
|
|
|
|
*
|
|
|
|
|
@@ -29198,11 +29029,11 @@ function getDate() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
|
|
|
|
|
* Invokes `util.format()` with the specified arguments and writes to stderr.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
function log(...args) {
|
|
|
|
|
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
|
|
|
|
|
return process.stderr.write(util.format(...args) + '\n');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -90358,7 +90189,7 @@ Dicer.prototype._write = function (data, encoding, cb) {
|
|
|
|
|
if (this._headerFirst && this._isPreamble) {
|
|
|
|
|
if (!this._part) {
|
|
|
|
|
this._part = new PartStream(this._partOpts)
|
|
|
|
|
if (this.listenerCount('preamble') !== 0) { this.emit('preamble', this._part) } else { this._ignore() }
|
|
|
|
|
if (this._events.preamble) { this.emit('preamble', this._part) } else { this._ignore() }
|
|
|
|
|
}
|
|
|
|
|
const r = this._hparser.push(data)
|
|
|
|
|
if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() }
|
|
|
|
|
@@ -90415,7 +90246,7 @@ Dicer.prototype._oninfo = function (isMatch, data, start, end) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (this._dashes === 2) {
|
|
|
|
|
if ((start + i) < end && this.listenerCount('trailer') !== 0) { this.emit('trailer', data.slice(start + i, end)) }
|
|
|
|
|
if ((start + i) < end && this._events.trailer) { this.emit('trailer', data.slice(start + i, end)) }
|
|
|
|
|
this.reset()
|
|
|
|
|
this._finished = true
|
|
|
|
|
// no more parts will be added
|
|
|
|
|
@@ -90433,13 +90264,7 @@ Dicer.prototype._oninfo = function (isMatch, data, start, end) {
|
|
|
|
|
this._part._read = function (n) {
|
|
|
|
|
self._unpause()
|
|
|
|
|
}
|
|
|
|
|
if (this._isPreamble && this.listenerCount('preamble') !== 0) {
|
|
|
|
|
this.emit('preamble', this._part)
|
|
|
|
|
} else if (this._isPreamble !== true && this.listenerCount('part') !== 0) {
|
|
|
|
|
this.emit('part', this._part)
|
|
|
|
|
} else {
|
|
|
|
|
this._ignore()
|
|
|
|
|
}
|
|
|
|
|
if (this._isPreamble && this._events.preamble) { this.emit('preamble', this._part) } else if (this._isPreamble !== true && this._events.part) { this.emit('part', this._part) } else { this._ignore() }
|
|
|
|
|
if (!this._isPreamble) { this._inHeader = true }
|
|
|
|
|
}
|
|
|
|
|
if (data && start < end && !this._ignoreData) {
|
|
|
|
|
@@ -91122,7 +90947,7 @@ function Multipart (boy, cfg) {
|
|
|
|
|
|
|
|
|
|
++nfiles
|
|
|
|
|
|
|
|
|
|
if (boy.listenerCount('file') === 0) {
|
|
|
|
|
if (!boy._events.file) {
|
|
|
|
|
self.parser._ignore()
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
@@ -91651,7 +91476,7 @@ const decoders = {
|
|
|
|
|
if (textDecoders.has(this.toString())) {
|
|
|
|
|
try {
|
|
|
|
|
return textDecoders.get(this).decode(data)
|
|
|
|
|
} catch {}
|
|
|
|
|
} catch (e) { }
|
|
|
|
|
}
|
|
|
|
|
return typeof data === 'string'
|
|
|
|
|
? data
|
|
|
|
|
|