chore(release): 1.1.8 [skip ci]
## [1.1.8](https://github.com/KengoTODA/actions-setup-docker-compose/compare/v1.1.7...v1.1.8) (2023-06-18) ### Bug Fixes * **deps:** update dependency @octokit/action to v6.0.3 ([5d49115](5d49115b6a))
This commit is contained in:
494
dist/index.js
vendored
494
dist/index.js
vendored
@@ -5240,7 +5240,7 @@ var import_plugin_paginate_rest = __nccwpck_require__(9331);
|
||||
var import_plugin_rest_endpoint_methods = __nccwpck_require__(8528);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "6.0.1";
|
||||
var VERSION = "6.0.3";
|
||||
|
||||
// pkg/dist-src/index.js
|
||||
var import_https_proxy_agent = __nccwpck_require__(6478);
|
||||
@@ -5403,7 +5403,7 @@ var import_graphql = __nccwpck_require__(3526);
|
||||
var import_auth_token = __nccwpck_require__(1793);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "4.2.1";
|
||||
var VERSION = "4.2.4";
|
||||
|
||||
// pkg/dist-src/index.js
|
||||
var Octokit = class {
|
||||
@@ -5531,16 +5531,36 @@ Octokit.plugins = [];
|
||||
/***/ }),
|
||||
|
||||
/***/ 3348:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
|
||||
var isPlainObject = __nccwpck_require__(3287);
|
||||
var universalUserAgent = __nccwpck_require__(5030);
|
||||
// pkg/dist-src/index.js
|
||||
var dist_src_exports = {};
|
||||
__export(dist_src_exports, {
|
||||
endpoint: () => endpoint
|
||||
});
|
||||
module.exports = __toCommonJS(dist_src_exports);
|
||||
|
||||
// pkg/dist-src/util/lowercase-keys.js
|
||||
function lowercaseKeys(object) {
|
||||
if (!object) {
|
||||
return {};
|
||||
@@ -5551,64 +5571,62 @@ function lowercaseKeys(object) {
|
||||
}, {});
|
||||
}
|
||||
|
||||
// pkg/dist-src/util/merge-deep.js
|
||||
var import_is_plain_object = __nccwpck_require__(3287);
|
||||
function mergeDeep(defaults, options) {
|
||||
const result = Object.assign({}, defaults);
|
||||
Object.keys(options).forEach(key => {
|
||||
if (isPlainObject.isPlainObject(options[key])) {
|
||||
if (!(key in defaults)) Object.assign(result, {
|
||||
[key]: options[key]
|
||||
});else result[key] = mergeDeep(defaults[key], options[key]);
|
||||
Object.keys(options).forEach((key) => {
|
||||
if ((0, import_is_plain_object.isPlainObject)(options[key])) {
|
||||
if (!(key in defaults))
|
||||
Object.assign(result, { [key]: options[key] });
|
||||
else
|
||||
result[key] = mergeDeep(defaults[key], options[key]);
|
||||
} else {
|
||||
Object.assign(result, {
|
||||
[key]: options[key]
|
||||
});
|
||||
Object.assign(result, { [key]: options[key] });
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
// pkg/dist-src/util/remove-undefined-properties.js
|
||||
function removeUndefinedProperties(obj) {
|
||||
for (const key in obj) {
|
||||
if (obj[key] === undefined) {
|
||||
if (obj[key] === void 0) {
|
||||
delete obj[key];
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
// pkg/dist-src/merge.js
|
||||
function merge(defaults, route, options) {
|
||||
if (typeof route === "string") {
|
||||
let [method, url] = route.split(" ");
|
||||
options = Object.assign(url ? {
|
||||
method,
|
||||
url
|
||||
} : {
|
||||
url: method
|
||||
}, options);
|
||||
options = Object.assign(url ? { method, url } : { url: method }, options);
|
||||
} else {
|
||||
options = Object.assign({}, route);
|
||||
}
|
||||
// lowercase header names before merging with defaults to avoid duplicates
|
||||
options.headers = lowercaseKeys(options.headers);
|
||||
// remove properties with undefined values before merging
|
||||
removeUndefinedProperties(options);
|
||||
removeUndefinedProperties(options.headers);
|
||||
const mergedOptions = mergeDeep(defaults || {}, options);
|
||||
// mediaType.previews arrays are merged, instead of overwritten
|
||||
if (defaults && defaults.mediaType.previews.length) {
|
||||
mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews);
|
||||
mergedOptions.mediaType.previews = defaults.mediaType.previews.filter((preview) => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews);
|
||||
}
|
||||
mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, ""));
|
||||
mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(
|
||||
(preview) => preview.replace(/-preview/, "")
|
||||
);
|
||||
return mergedOptions;
|
||||
}
|
||||
|
||||
// pkg/dist-src/util/add-query-parameters.js
|
||||
function addQueryParameters(url, parameters) {
|
||||
const separator = /\?/.test(url) ? "&" : "?";
|
||||
const names = Object.keys(parameters);
|
||||
if (names.length === 0) {
|
||||
return url;
|
||||
}
|
||||
return url + separator + names.map(name => {
|
||||
return url + separator + names.map((name) => {
|
||||
if (name === "q") {
|
||||
return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
|
||||
}
|
||||
@@ -5616,7 +5634,8 @@ function addQueryParameters(url, parameters) {
|
||||
}).join("&");
|
||||
}
|
||||
|
||||
const urlVariableRegex = /\{[^}]+\}/g;
|
||||
// pkg/dist-src/util/extract-url-variable-names.js
|
||||
var urlVariableRegex = /\{[^}]+\}/g;
|
||||
function removeNonChars(variableName) {
|
||||
return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
|
||||
}
|
||||
@@ -5628,41 +5647,17 @@ function extractUrlVariableNames(url) {
|
||||
return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);
|
||||
}
|
||||
|
||||
// pkg/dist-src/util/omit.js
|
||||
function omit(object, keysToOmit) {
|
||||
return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => {
|
||||
return Object.keys(object).filter((option) => !keysToOmit.includes(option)).reduce((obj, key) => {
|
||||
obj[key] = object[key];
|
||||
return obj;
|
||||
}, {});
|
||||
}
|
||||
|
||||
// Based on https://github.com/bramstein/url-template, licensed under BSD
|
||||
// TODO: create separate package.
|
||||
//
|
||||
// Copyright (c) 2012-2014, Bram Stein
|
||||
// All rights reserved.
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. The name of the author may not be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
/* istanbul ignore file */
|
||||
// pkg/dist-src/util/url-template.js
|
||||
function encodeReserved(str) {
|
||||
return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {
|
||||
return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
|
||||
if (!/%[0-9A-Fa-f]/.test(part)) {
|
||||
part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
|
||||
}
|
||||
@@ -5670,7 +5665,7 @@ function encodeReserved(str) {
|
||||
}).join("");
|
||||
}
|
||||
function encodeUnreserved(str) {
|
||||
return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
|
||||
return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
|
||||
return "%" + c.charCodeAt(0).toString(16).toUpperCase();
|
||||
});
|
||||
}
|
||||
@@ -5683,29 +5678,32 @@ function encodeValue(operator, value, key) {
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
return value !== undefined && value !== null;
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
return operator === ";" || operator === "&" || operator === "?";
|
||||
}
|
||||
function getValues(context, operator, key, modifier) {
|
||||
var value = context[key],
|
||||
result = [];
|
||||
var value = context[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
value = value.substring(0, parseInt(modifier, 10));
|
||||
}
|
||||
result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : ""));
|
||||
result.push(
|
||||
encodeValue(operator, value, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function (value) {
|
||||
result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : ""));
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function (k) {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
@@ -5714,11 +5712,11 @@ function getValues(context, operator, key, modifier) {
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function (value) {
|
||||
tmp.push(encodeValue(operator, value));
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function (k) {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
@@ -5752,67 +5750,77 @@ function parseUrl(template) {
|
||||
}
|
||||
function expand(template, context) {
|
||||
var operators = ["+", "#", ".", "/", ";", "?", "&"];
|
||||
return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) {
|
||||
if (expression) {
|
||||
let operator = "";
|
||||
const values = [];
|
||||
if (operators.indexOf(expression.charAt(0)) !== -1) {
|
||||
operator = expression.charAt(0);
|
||||
expression = expression.substr(1);
|
||||
}
|
||||
expression.split(/,/g).forEach(function (variable) {
|
||||
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
|
||||
values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
});
|
||||
if (operator && operator !== "+") {
|
||||
var separator = ",";
|
||||
if (operator === "?") {
|
||||
separator = "&";
|
||||
} else if (operator !== "#") {
|
||||
separator = operator;
|
||||
return template.replace(
|
||||
/\{([^\{\}]+)\}|([^\{\}]+)/g,
|
||||
function(_, expression, literal) {
|
||||
if (expression) {
|
||||
let operator = "";
|
||||
const values = [];
|
||||
if (operators.indexOf(expression.charAt(0)) !== -1) {
|
||||
operator = expression.charAt(0);
|
||||
expression = expression.substr(1);
|
||||
}
|
||||
expression.split(/,/g).forEach(function(variable) {
|
||||
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
|
||||
values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
});
|
||||
if (operator && operator !== "+") {
|
||||
var separator = ",";
|
||||
if (operator === "?") {
|
||||
separator = "&";
|
||||
} else if (operator !== "#") {
|
||||
separator = operator;
|
||||
}
|
||||
return (values.length !== 0 ? operator : "") + values.join(separator);
|
||||
} else {
|
||||
return values.join(",");
|
||||
}
|
||||
return (values.length !== 0 ? operator : "") + values.join(separator);
|
||||
} else {
|
||||
return values.join(",");
|
||||
return encodeReserved(literal);
|
||||
}
|
||||
} else {
|
||||
return encodeReserved(literal);
|
||||
}
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
// pkg/dist-src/parse.js
|
||||
function parse(options) {
|
||||
// https://fetch.spec.whatwg.org/#methods
|
||||
let method = options.method.toUpperCase();
|
||||
// replace :varname with {varname} to make it RFC 6570 compatible
|
||||
let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
|
||||
let headers = Object.assign({}, options.headers);
|
||||
let body;
|
||||
let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]);
|
||||
// extract variable names from URL to calculate remaining variables later
|
||||
let parameters = omit(options, [
|
||||
"method",
|
||||
"baseUrl",
|
||||
"url",
|
||||
"headers",
|
||||
"request",
|
||||
"mediaType"
|
||||
]);
|
||||
const urlVariableNames = extractUrlVariableNames(url);
|
||||
url = parseUrl(url).expand(parameters);
|
||||
if (!/^http/.test(url)) {
|
||||
url = options.baseUrl + url;
|
||||
}
|
||||
const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl");
|
||||
const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl");
|
||||
const remainingParameters = omit(parameters, omittedParameters);
|
||||
const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
|
||||
if (!isBinaryRequest) {
|
||||
if (options.mediaType.format) {
|
||||
// e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw
|
||||
headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(",");
|
||||
headers.accept = headers.accept.split(/,/).map(
|
||||
(preview) => preview.replace(
|
||||
/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
|
||||
`application/vnd$1$2.${options.mediaType.format}`
|
||||
)
|
||||
).join(",");
|
||||
}
|
||||
if (options.mediaType.previews.length) {
|
||||
const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
|
||||
headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => {
|
||||
headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
|
||||
const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
|
||||
return `application/vnd.github.${preview}-preview${format}`;
|
||||
}).join(",");
|
||||
}
|
||||
}
|
||||
// for GET/HEAD requests, set URL query parameters from remaining parameters
|
||||
// for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters
|
||||
if (["GET", "HEAD"].includes(method)) {
|
||||
url = addQueryParameters(url, remainingParameters);
|
||||
} else {
|
||||
@@ -5824,48 +5832,45 @@ function parse(options) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// default content-type for JSON if body is set
|
||||
if (!headers["content-type"] && typeof body !== "undefined") {
|
||||
headers["content-type"] = "application/json; charset=utf-8";
|
||||
}
|
||||
// GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.
|
||||
// fetch does not allow to set `content-length` header, but we can set body to an empty string
|
||||
if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
|
||||
body = "";
|
||||
}
|
||||
// Only return body/request keys if present
|
||||
return Object.assign({
|
||||
method,
|
||||
url,
|
||||
headers
|
||||
}, typeof body !== "undefined" ? {
|
||||
body
|
||||
} : null, options.request ? {
|
||||
request: options.request
|
||||
} : null);
|
||||
return Object.assign(
|
||||
{ method, url, headers },
|
||||
typeof body !== "undefined" ? { body } : null,
|
||||
options.request ? { request: options.request } : null
|
||||
);
|
||||
}
|
||||
|
||||
// pkg/dist-src/endpoint-with-defaults.js
|
||||
function endpointWithDefaults(defaults, route, options) {
|
||||
return parse(merge(defaults, route, options));
|
||||
}
|
||||
|
||||
// pkg/dist-src/with-defaults.js
|
||||
function withDefaults(oldDefaults, newDefaults) {
|
||||
const DEFAULTS = merge(oldDefaults, newDefaults);
|
||||
const endpoint = endpointWithDefaults.bind(null, DEFAULTS);
|
||||
return Object.assign(endpoint, {
|
||||
DEFAULTS,
|
||||
defaults: withDefaults.bind(null, DEFAULTS),
|
||||
merge: merge.bind(null, DEFAULTS),
|
||||
const DEFAULTS2 = merge(oldDefaults, newDefaults);
|
||||
const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);
|
||||
return Object.assign(endpoint2, {
|
||||
DEFAULTS: DEFAULTS2,
|
||||
defaults: withDefaults.bind(null, DEFAULTS2),
|
||||
merge: merge.bind(null, DEFAULTS2),
|
||||
parse
|
||||
});
|
||||
}
|
||||
|
||||
const VERSION = "7.0.5";
|
||||
// pkg/dist-src/defaults.js
|
||||
var import_universal_user_agent = __nccwpck_require__(5030);
|
||||
|
||||
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.
|
||||
const DEFAULTS = {
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "7.0.6";
|
||||
|
||||
// pkg/dist-src/defaults.js
|
||||
var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
|
||||
var DEFAULTS = {
|
||||
method: "GET",
|
||||
baseUrl: "https://api.github.com",
|
||||
headers: {
|
||||
@@ -5878,10 +5883,10 @@ const DEFAULTS = {
|
||||
}
|
||||
};
|
||||
|
||||
const endpoint = withDefaults(null, DEFAULTS);
|
||||
|
||||
exports.endpoint = endpoint;
|
||||
//# sourceMappingURL=index.js.map
|
||||
// pkg/dist-src/index.js
|
||||
var endpoint = withDefaults(null, DEFAULTS);
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (0);
|
||||
|
||||
|
||||
/***/ }),
|
||||
@@ -6070,7 +6075,7 @@ __export(dist_src_exports, {
|
||||
module.exports = __toCommonJS(dist_src_exports);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "7.0.0";
|
||||
var VERSION = "7.1.2";
|
||||
|
||||
// pkg/dist-src/normalize-paginated-list-response.js
|
||||
function normalizePaginatedListResponse(response) {
|
||||
@@ -6237,6 +6242,7 @@ var paginatingEndpoints = [
|
||||
"GET /orgs/{org}/projects",
|
||||
"GET /orgs/{org}/public_members",
|
||||
"GET /orgs/{org}/repos",
|
||||
"GET /orgs/{org}/rulesets",
|
||||
"GET /orgs/{org}/secret-scanning/alerts",
|
||||
"GET /orgs/{org}/teams",
|
||||
"GET /orgs/{org}/teams/{team_slug}/discussions",
|
||||
@@ -6326,6 +6332,8 @@ var paginatingEndpoints = [
|
||||
"GET /repos/{owner}/{repo}/releases",
|
||||
"GET /repos/{owner}/{repo}/releases/{release_id}/assets",
|
||||
"GET /repos/{owner}/{repo}/releases/{release_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/rules/branches/{branch}",
|
||||
"GET /repos/{owner}/{repo}/rulesets",
|
||||
"GET /repos/{owner}/{repo}/secret-scanning/alerts",
|
||||
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations",
|
||||
"GET /repos/{owner}/{repo}/security-advisories",
|
||||
@@ -6456,6 +6464,9 @@ __export(dist_src_exports, {
|
||||
});
|
||||
module.exports = __toCommonJS(dist_src_exports);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "7.2.3";
|
||||
|
||||
// pkg/dist-src/generated/endpoints.js
|
||||
var Endpoints = {
|
||||
actions: {
|
||||
@@ -6566,6 +6577,12 @@ var Endpoints = {
|
||||
enableWorkflow: [
|
||||
"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"
|
||||
],
|
||||
generateRunnerJitconfigForOrg: [
|
||||
"POST /orgs/{org}/actions/runners/generate-jitconfig"
|
||||
],
|
||||
generateRunnerJitconfigForRepo: [
|
||||
"POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig"
|
||||
],
|
||||
getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"],
|
||||
getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"],
|
||||
getActionsCacheUsageByRepoForOrg: [
|
||||
@@ -8319,36 +8336,54 @@ var Endpoints = {
|
||||
};
|
||||
var endpoints_default = Endpoints;
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "7.1.3";
|
||||
|
||||
// pkg/dist-src/endpoints-to-methods.js
|
||||
function endpointsToMethods(octokit, endpointsMap) {
|
||||
const newMethods = {};
|
||||
for (const [scope, endpoints] of Object.entries(endpointsMap)) {
|
||||
for (const [methodName, endpoint] of Object.entries(endpoints)) {
|
||||
const [route, defaults, decorations] = endpoint;
|
||||
const [method, url] = route.split(/ /);
|
||||
const endpointDefaults = Object.assign(
|
||||
{ method, url },
|
||||
defaults
|
||||
);
|
||||
if (!newMethods[scope]) {
|
||||
newMethods[scope] = {};
|
||||
}
|
||||
const scopeMethods = newMethods[scope];
|
||||
if (decorations) {
|
||||
scopeMethods[methodName] = decorate(
|
||||
octokit,
|
||||
scope,
|
||||
methodName,
|
||||
endpointDefaults,
|
||||
decorations
|
||||
);
|
||||
continue;
|
||||
}
|
||||
scopeMethods[methodName] = octokit.request.defaults(endpointDefaults);
|
||||
var endpointMethodsMap = /* @__PURE__ */ new Map();
|
||||
for (const [scope, endpoints] of Object.entries(endpoints_default)) {
|
||||
for (const [methodName, endpoint] of Object.entries(endpoints)) {
|
||||
const [route, defaults, decorations] = endpoint;
|
||||
const [method, url] = route.split(/ /);
|
||||
const endpointDefaults = Object.assign(
|
||||
{
|
||||
method,
|
||||
url
|
||||
},
|
||||
defaults
|
||||
);
|
||||
if (!endpointMethodsMap.has(scope)) {
|
||||
endpointMethodsMap.set(scope, /* @__PURE__ */ new Map());
|
||||
}
|
||||
endpointMethodsMap.get(scope).set(methodName, {
|
||||
scope,
|
||||
methodName,
|
||||
endpointDefaults,
|
||||
decorations
|
||||
});
|
||||
}
|
||||
}
|
||||
var handler = {
|
||||
get({ octokit, scope, cache }, methodName) {
|
||||
if (cache[methodName]) {
|
||||
return cache[methodName];
|
||||
}
|
||||
const { decorations, endpointDefaults } = endpointMethodsMap.get(scope).get(methodName);
|
||||
if (decorations) {
|
||||
cache[methodName] = decorate(
|
||||
octokit,
|
||||
scope,
|
||||
methodName,
|
||||
endpointDefaults,
|
||||
decorations
|
||||
);
|
||||
} else {
|
||||
cache[methodName] = octokit.request.defaults(endpointDefaults);
|
||||
}
|
||||
return cache[methodName];
|
||||
}
|
||||
};
|
||||
function endpointsToMethods(octokit) {
|
||||
const newMethods = {};
|
||||
for (const scope of endpointMethodsMap.keys()) {
|
||||
newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler);
|
||||
}
|
||||
return newMethods;
|
||||
}
|
||||
@@ -8396,14 +8431,14 @@ function decorate(octokit, scope, methodName, defaults, decorations) {
|
||||
|
||||
// pkg/dist-src/index.js
|
||||
function restEndpointMethods(octokit) {
|
||||
const api = endpointsToMethods(octokit, endpoints_default);
|
||||
const api = endpointsToMethods(octokit);
|
||||
return {
|
||||
rest: api
|
||||
};
|
||||
}
|
||||
restEndpointMethods.VERSION = VERSION;
|
||||
function legacyRestEndpointMethods(octokit) {
|
||||
const api = endpointsToMethods(octokit, endpoints_default);
|
||||
const api = endpointsToMethods(octokit);
|
||||
return {
|
||||
...api,
|
||||
rest: api
|
||||
@@ -8532,7 +8567,7 @@ var import_endpoint = __nccwpck_require__(3348);
|
||||
var import_universal_user_agent = __nccwpck_require__(5030);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "6.2.5";
|
||||
var VERSION = "6.2.8";
|
||||
|
||||
// pkg/dist-src/fetch-wrapper.js
|
||||
var import_is_plain_object = __nccwpck_require__(3287);
|
||||
@@ -9177,51 +9212,99 @@ exports.parseProxyResponse = parseProxyResponse;
|
||||
/***/ }),
|
||||
|
||||
/***/ 20:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
|
||||
var authToken = __nccwpck_require__(6434);
|
||||
|
||||
const createActionAuth = function createActionAuth() {
|
||||
if (!process.env.GITHUB_ACTION) {
|
||||
throw new Error("[@octokit/auth-action] `GITHUB_ACTION` environment variable is not set. @octokit/auth-action is meant to be used in GitHub Actions only.");
|
||||
}
|
||||
|
||||
const definitions = [process.env.GITHUB_TOKEN, process.env.INPUT_GITHUB_TOKEN, process.env.INPUT_TOKEN].filter(Boolean);
|
||||
|
||||
if (definitions.length === 0) {
|
||||
throw new Error("[@octokit/auth-action] `GITHUB_TOKEN` variable is not set. It must be set on either `env:` or `with:`. See https://github.com/octokit/auth-action.js#createactionauth");
|
||||
}
|
||||
|
||||
if (definitions.length > 1) {
|
||||
throw new Error("[@octokit/auth-action] The token variable is specified more than once. Use either `with.token`, `with.GITHUB_TOKEN`, or `env.GITHUB_TOKEN`. See https://github.com/octokit/auth-action.js#createactionauth");
|
||||
}
|
||||
|
||||
const token = definitions.pop();
|
||||
return authToken.createTokenAuth(token);
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
exports.createActionAuth = createActionAuth;
|
||||
//# sourceMappingURL=index.js.map
|
||||
// pkg/dist-src/index.js
|
||||
var dist_src_exports = {};
|
||||
__export(dist_src_exports, {
|
||||
createActionAuth: () => createActionAuth
|
||||
});
|
||||
module.exports = __toCommonJS(dist_src_exports);
|
||||
var import_auth_token = __nccwpck_require__(6434);
|
||||
var createActionAuth = function createActionAuth2() {
|
||||
if (!process.env.GITHUB_ACTION) {
|
||||
throw new Error(
|
||||
"[@octokit/auth-action] `GITHUB_ACTION` environment variable is not set. @octokit/auth-action is meant to be used in GitHub Actions only."
|
||||
);
|
||||
}
|
||||
const definitions = [
|
||||
process.env.GITHUB_TOKEN,
|
||||
process.env.INPUT_GITHUB_TOKEN,
|
||||
process.env.INPUT_TOKEN
|
||||
].filter(Boolean);
|
||||
if (definitions.length === 0) {
|
||||
throw new Error(
|
||||
"[@octokit/auth-action] `GITHUB_TOKEN` variable is not set. It must be set on either `env:` or `with:`. See https://github.com/octokit/auth-action.js#createactionauth"
|
||||
);
|
||||
}
|
||||
if (definitions.length > 1) {
|
||||
throw new Error(
|
||||
"[@octokit/auth-action] The token variable is specified more than once. Use either `with.token`, `with.GITHUB_TOKEN`, or `env.GITHUB_TOKEN`. See https://github.com/octokit/auth-action.js#createactionauth"
|
||||
);
|
||||
}
|
||||
const token = definitions.pop();
|
||||
return (0, import_auth_token.createTokenAuth)(token);
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (0);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 6434:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
// pkg/dist-src/index.js
|
||||
var dist_src_exports = {};
|
||||
__export(dist_src_exports, {
|
||||
createTokenAuth: () => createTokenAuth
|
||||
});
|
||||
module.exports = __toCommonJS(dist_src_exports);
|
||||
|
||||
const REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
|
||||
const REGEX_IS_INSTALLATION = /^ghs_/;
|
||||
const REGEX_IS_USER_TO_SERVER = /^ghu_/;
|
||||
// pkg/dist-src/auth.js
|
||||
var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
|
||||
var REGEX_IS_INSTALLATION = /^ghs_/;
|
||||
var REGEX_IS_USER_TO_SERVER = /^ghu_/;
|
||||
async function auth(token) {
|
||||
const isApp = token.split(/\./).length === 3;
|
||||
const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);
|
||||
@@ -9229,47 +9312,46 @@ async function auth(token) {
|
||||
const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
|
||||
return {
|
||||
type: "token",
|
||||
token: token,
|
||||
token,
|
||||
tokenType
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Prefix token for usage in the Authorization header
|
||||
*
|
||||
* @param token OAuth token or JSON Web Token
|
||||
*/
|
||||
// pkg/dist-src/with-authorization-prefix.js
|
||||
function withAuthorizationPrefix(token) {
|
||||
if (token.split(/\./).length === 3) {
|
||||
return `bearer ${token}`;
|
||||
}
|
||||
|
||||
return `token ${token}`;
|
||||
}
|
||||
|
||||
// pkg/dist-src/hook.js
|
||||
async function hook(token, request, route, parameters) {
|
||||
const endpoint = request.endpoint.merge(route, parameters);
|
||||
const endpoint = request.endpoint.merge(
|
||||
route,
|
||||
parameters
|
||||
);
|
||||
endpoint.headers.authorization = withAuthorizationPrefix(token);
|
||||
return request(endpoint);
|
||||
}
|
||||
|
||||
const createTokenAuth = function createTokenAuth(token) {
|
||||
// pkg/dist-src/index.js
|
||||
var createTokenAuth = function createTokenAuth2(token) {
|
||||
if (!token) {
|
||||
throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
|
||||
}
|
||||
|
||||
if (typeof token !== "string") {
|
||||
throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
|
||||
throw new Error(
|
||||
"[@octokit/auth-token] Token passed to createTokenAuth is not a string"
|
||||
);
|
||||
}
|
||||
|
||||
token = token.replace(/^(token|bearer) +/i, "");
|
||||
return Object.assign(auth.bind(null, token), {
|
||||
hook: hook.bind(null, token)
|
||||
});
|
||||
};
|
||||
|
||||
exports.createTokenAuth = createTokenAuth;
|
||||
//# sourceMappingURL=index.js.map
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (0);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
Reference in New Issue
Block a user