Merge pull request #740 from peter-evans/update-distribution
Update distribution
This commit is contained in:
commit
09b9ac155b
1 changed files with 88 additions and 63 deletions
151
dist/index.js
vendored
151
dist/index.js
vendored
|
@ -2910,7 +2910,7 @@ function _objectWithoutProperties(source, excluded) {
|
|||
return target;
|
||||
}
|
||||
|
||||
const VERSION = "3.2.4";
|
||||
const VERSION = "3.2.5";
|
||||
|
||||
class Octokit {
|
||||
constructor(options = {}) {
|
||||
|
@ -3414,7 +3414,7 @@ function withDefaults(oldDefaults, newDefaults) {
|
|||
});
|
||||
}
|
||||
|
||||
const VERSION = "6.0.10";
|
||||
const VERSION = "6.0.11";
|
||||
|
||||
const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url.
|
||||
// So we use RequestParameters and add method as additional required property.
|
||||
|
@ -3497,7 +3497,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||
var request = __nccwpck_require__(234);
|
||||
var universalUserAgent = __nccwpck_require__(30);
|
||||
|
||||
const VERSION = "4.5.8";
|
||||
const VERSION = "4.6.0";
|
||||
|
||||
class GraphqlError extends Error {
|
||||
constructor(request, response) {
|
||||
|
@ -3610,7 +3610,7 @@ exports.withCustomRequest = withCustomRequest;
|
|||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
|
||||
const VERSION = "2.8.0";
|
||||
const VERSION = "2.10.0";
|
||||
|
||||
/**
|
||||
* Some “list” response that can be paginated have a different response structure
|
||||
|
@ -3912,12 +3912,16 @@ const Endpoints = {
|
|||
update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]
|
||||
},
|
||||
codeScanning: {
|
||||
deleteAnalysis: ["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"],
|
||||
getAlert: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", {}, {
|
||||
renamedParameters: {
|
||||
alert_id: "alert_number"
|
||||
}
|
||||
}],
|
||||
getAnalysis: ["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"],
|
||||
getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"],
|
||||
listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"],
|
||||
listAlertsInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"],
|
||||
listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"],
|
||||
updateAlert: ["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"],
|
||||
uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"]
|
||||
|
@ -3994,15 +3998,24 @@ const Endpoints = {
|
|||
getTemplate: ["GET /gitignore/templates/{name}"]
|
||||
},
|
||||
interactions: {
|
||||
getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"],
|
||||
getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"],
|
||||
getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"],
|
||||
getRestrictionsForYourPublicRepos: ["GET /user/interaction-limits"],
|
||||
getRestrictionsForYourPublicRepos: ["GET /user/interaction-limits", {}, {
|
||||
renamed: ["interactions", "getRestrictionsForAuthenticatedUser"]
|
||||
}],
|
||||
removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"],
|
||||
removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"],
|
||||
removeRestrictionsForRepo: ["DELETE /repos/{owner}/{repo}/interaction-limits"],
|
||||
removeRestrictionsForYourPublicRepos: ["DELETE /user/interaction-limits"],
|
||||
removeRestrictionsForYourPublicRepos: ["DELETE /user/interaction-limits", {}, {
|
||||
renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"]
|
||||
}],
|
||||
setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"],
|
||||
setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"],
|
||||
setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"],
|
||||
setRestrictionsForYourPublicRepos: ["PUT /user/interaction-limits"]
|
||||
setRestrictionsForYourPublicRepos: ["PUT /user/interaction-limits", {}, {
|
||||
renamed: ["interactions", "setRestrictionsForAuthenticatedUser"]
|
||||
}]
|
||||
},
|
||||
issues: {
|
||||
addAssignees: ["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],
|
||||
|
@ -4142,6 +4155,7 @@ const Endpoints = {
|
|||
},
|
||||
orgs: {
|
||||
blockUser: ["PUT /orgs/{org}/blocks/{username}"],
|
||||
cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"],
|
||||
checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"],
|
||||
checkMembershipForUser: ["GET /orgs/{org}/members/{username}"],
|
||||
checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"],
|
||||
|
@ -4157,6 +4171,7 @@ const Endpoints = {
|
|||
list: ["GET /organizations"],
|
||||
listAppInstallations: ["GET /orgs/{org}/installations"],
|
||||
listBlockedUsers: ["GET /orgs/{org}/blocks"],
|
||||
listFailedInvitations: ["GET /orgs/{org}/failed_invitations"],
|
||||
listForAuthenticatedUser: ["GET /user/orgs"],
|
||||
listForUser: ["GET /users/{username}/orgs"],
|
||||
listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"],
|
||||
|
@ -4179,6 +4194,25 @@ const Endpoints = {
|
|||
updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"],
|
||||
updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"]
|
||||
},
|
||||
packages: {
|
||||
deletePackageForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}"],
|
||||
deletePackageForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}"],
|
||||
deletePackageVersionForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
||||
deletePackageVersionForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
||||
getAllPackageVersionsForAPackageOwnedByAnOrg: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"],
|
||||
getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions"],
|
||||
getAllPackageVersionsForPackageOwnedByUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions"],
|
||||
getPackageForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}"],
|
||||
getPackageForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}"],
|
||||
getPackageForUser: ["GET /users/{username}/packages/{package_type}/{package_name}"],
|
||||
getPackageVersionForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
||||
getPackageVersionForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
||||
getPackageVersionForUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
||||
restorePackageForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/restore"],
|
||||
restorePackageForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/restore"],
|
||||
restorePackageVersionForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],
|
||||
restorePackageVersionForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]
|
||||
},
|
||||
projects: {
|
||||
addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}", {
|
||||
mediaType: {
|
||||
|
@ -4638,6 +4672,7 @@ const Endpoints = {
|
|||
removeUserAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, {
|
||||
mapToData: "users"
|
||||
}],
|
||||
renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"],
|
||||
replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics", {
|
||||
mediaType: {
|
||||
previews: ["mercy"]
|
||||
|
@ -4779,7 +4814,7 @@ const Endpoints = {
|
|||
}
|
||||
};
|
||||
|
||||
const VERSION = "4.5.2";
|
||||
const VERSION = "4.12.2";
|
||||
|
||||
function endpointsToMethods(octokit, endpointsMap) {
|
||||
const newMethods = {};
|
||||
|
@ -4862,17 +4897,6 @@ function decorate(octokit, scope, methodName, defaults, decorations) {
|
|||
return Object.assign(withDecorations, requestWithDefaults);
|
||||
}
|
||||
|
||||
/**
|
||||
* This plugin is a 1:1 copy of internal @octokit/rest plugins. The primary
|
||||
* goal is to rebuild @octokit/rest on top of @octokit/core. Once that is
|
||||
* done, we will remove the registerEndpoints methods and return the methods
|
||||
* directly as with the other plugins. At that point we will also remove the
|
||||
* legacy workarounds and deprecations.
|
||||
*
|
||||
* See the plan at
|
||||
* https://github.com/octokit/plugin-rest-endpoint-methods.js/pull/1
|
||||
*/
|
||||
|
||||
function restEndpointMethods(octokit) {
|
||||
return endpointsToMethods(octokit, Endpoints);
|
||||
}
|
||||
|
@ -4963,7 +4987,7 @@ var isPlainObject = __nccwpck_require__(62);
|
|||
var nodeFetch = _interopDefault(__nccwpck_require__(467));
|
||||
var requestError = __nccwpck_require__(537);
|
||||
|
||||
const VERSION = "5.4.12";
|
||||
const VERSION = "5.4.14";
|
||||
|
||||
function getBufferResponse(response) {
|
||||
return response.arrayBuffer();
|
||||
|
@ -5216,51 +5240,51 @@ module.exports.Collection = Hook.Collection
|
|||
/***/ 549:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = addHook
|
||||
module.exports = addHook;
|
||||
|
||||
function addHook (state, kind, name, hook) {
|
||||
var orig = hook
|
||||
function addHook(state, kind, name, hook) {
|
||||
var orig = hook;
|
||||
if (!state.registry[name]) {
|
||||
state.registry[name] = []
|
||||
state.registry[name] = [];
|
||||
}
|
||||
|
||||
if (kind === 'before') {
|
||||
if (kind === "before") {
|
||||
hook = function (method, options) {
|
||||
return Promise.resolve()
|
||||
.then(orig.bind(null, options))
|
||||
.then(method.bind(null, options))
|
||||
}
|
||||
.then(method.bind(null, options));
|
||||
};
|
||||
}
|
||||
|
||||
if (kind === 'after') {
|
||||
if (kind === "after") {
|
||||
hook = function (method, options) {
|
||||
var result
|
||||
var result;
|
||||
return Promise.resolve()
|
||||
.then(method.bind(null, options))
|
||||
.then(function (result_) {
|
||||
result = result_
|
||||
return orig(result, options)
|
||||
result = result_;
|
||||
return orig(result, options);
|
||||
})
|
||||
.then(function () {
|
||||
return result
|
||||
})
|
||||
}
|
||||
return result;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
if (kind === 'error') {
|
||||
if (kind === "error") {
|
||||
hook = function (method, options) {
|
||||
return Promise.resolve()
|
||||
.then(method.bind(null, options))
|
||||
.catch(function (error) {
|
||||
return orig(error, options)
|
||||
})
|
||||
}
|
||||
return orig(error, options);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
state.registry[name].push({
|
||||
hook: hook,
|
||||
orig: orig
|
||||
})
|
||||
orig: orig,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -5269,33 +5293,32 @@ function addHook (state, kind, name, hook) {
|
|||
/***/ 670:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = register
|
||||
module.exports = register;
|
||||
|
||||
function register (state, name, method, options) {
|
||||
if (typeof method !== 'function') {
|
||||
throw new Error('method for before hook must be a function')
|
||||
function register(state, name, method, options) {
|
||||
if (typeof method !== "function") {
|
||||
throw new Error("method for before hook must be a function");
|
||||
}
|
||||
|
||||
if (!options) {
|
||||
options = {}
|
||||
options = {};
|
||||
}
|
||||
|
||||
if (Array.isArray(name)) {
|
||||
return name.reverse().reduce(function (callback, name) {
|
||||
return register.bind(null, state, name, callback, options)
|
||||
}, method)()
|
||||
return register.bind(null, state, name, callback, options);
|
||||
}, method)();
|
||||
}
|
||||
|
||||
return Promise.resolve()
|
||||
.then(function () {
|
||||
if (!state.registry[name]) {
|
||||
return method(options)
|
||||
}
|
||||
return Promise.resolve().then(function () {
|
||||
if (!state.registry[name]) {
|
||||
return method(options);
|
||||
}
|
||||
|
||||
return (state.registry[name]).reduce(function (method, registered) {
|
||||
return registered.hook.bind(null, method, options)
|
||||
}, method)()
|
||||
})
|
||||
return state.registry[name].reduce(function (method, registered) {
|
||||
return registered.hook.bind(null, method, options);
|
||||
}, method)();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -5304,22 +5327,24 @@ function register (state, name, method, options) {
|
|||
/***/ 819:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = removeHook
|
||||
module.exports = removeHook;
|
||||
|
||||
function removeHook (state, name, method) {
|
||||
function removeHook(state, name, method) {
|
||||
if (!state.registry[name]) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
var index = state.registry[name]
|
||||
.map(function (registered) { return registered.orig })
|
||||
.indexOf(method)
|
||||
.map(function (registered) {
|
||||
return registered.orig;
|
||||
})
|
||||
.indexOf(method);
|
||||
|
||||
if (index === -1) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
state.registry[name].splice(index, 1)
|
||||
state.registry[name].splice(index, 1);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue