Github actions require checking in the entire node_modules or using a vercel service what the fuck github
This commit is contained in:
125
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js
generated
vendored
Normal file
125
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js
generated
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
import ENDPOINTS from "./generated/endpoints.js";
|
||||
const endpointMethodsMap = /* @__PURE__ */ new Map();
|
||||
for (const [scope, endpoints] of Object.entries(ENDPOINTS)) {
|
||||
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
|
||||
});
|
||||
}
|
||||
}
|
||||
const handler = {
|
||||
has({ scope }, methodName) {
|
||||
return endpointMethodsMap.get(scope).has(methodName);
|
||||
},
|
||||
getOwnPropertyDescriptor(target, methodName) {
|
||||
return {
|
||||
value: this.get(target, methodName),
|
||||
// ensures method is in the cache
|
||||
configurable: true,
|
||||
writable: true,
|
||||
enumerable: true
|
||||
};
|
||||
},
|
||||
defineProperty(target, methodName, descriptor) {
|
||||
Object.defineProperty(target.cache, methodName, descriptor);
|
||||
return true;
|
||||
},
|
||||
deleteProperty(target, methodName) {
|
||||
delete target.cache[methodName];
|
||||
return true;
|
||||
},
|
||||
ownKeys({ scope }) {
|
||||
return [...endpointMethodsMap.get(scope).keys()];
|
||||
},
|
||||
set(target, methodName, value) {
|
||||
return target.cache[methodName] = value;
|
||||
},
|
||||
get({ octokit, scope, cache }, methodName) {
|
||||
if (cache[methodName]) {
|
||||
return cache[methodName];
|
||||
}
|
||||
const method = endpointMethodsMap.get(scope).get(methodName);
|
||||
if (!method) {
|
||||
return void 0;
|
||||
}
|
||||
const { endpointDefaults, decorations } = method;
|
||||
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;
|
||||
}
|
||||
function decorate(octokit, scope, methodName, defaults, decorations) {
|
||||
const requestWithDefaults = octokit.request.defaults(defaults);
|
||||
function withDecorations(...args) {
|
||||
let options = requestWithDefaults.endpoint.merge(...args);
|
||||
if (decorations.mapToData) {
|
||||
options = Object.assign({}, options, {
|
||||
data: options[decorations.mapToData],
|
||||
[decorations.mapToData]: void 0
|
||||
});
|
||||
return requestWithDefaults(options);
|
||||
}
|
||||
if (decorations.renamed) {
|
||||
const [newScope, newMethodName] = decorations.renamed;
|
||||
octokit.log.warn(
|
||||
`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`
|
||||
);
|
||||
}
|
||||
if (decorations.deprecated) {
|
||||
octokit.log.warn(decorations.deprecated);
|
||||
}
|
||||
if (decorations.renamedParameters) {
|
||||
const options2 = requestWithDefaults.endpoint.merge(...args);
|
||||
for (const [name, alias] of Object.entries(
|
||||
decorations.renamedParameters
|
||||
)) {
|
||||
if (name in options2) {
|
||||
octokit.log.warn(
|
||||
`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`
|
||||
);
|
||||
if (!(alias in options2)) {
|
||||
options2[alias] = options2[name];
|
||||
}
|
||||
delete options2[name];
|
||||
}
|
||||
}
|
||||
return requestWithDefaults(options2);
|
||||
}
|
||||
return requestWithDefaults(...args);
|
||||
}
|
||||
return Object.assign(withDecorations, requestWithDefaults);
|
||||
}
|
||||
export {
|
||||
endpointsToMethods
|
||||
};
|
||||
1992
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js
generated
vendored
Normal file
1992
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
0
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/method-types.js
generated
vendored
Normal file
0
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/method-types.js
generated
vendored
Normal file
0
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/parameters-and-response-types.js
generated
vendored
Normal file
0
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/parameters-and-response-types.js
generated
vendored
Normal file
21
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js
generated
vendored
Normal file
21
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { VERSION } from "./version.js";
|
||||
import { endpointsToMethods } from "./endpoints-to-methods.js";
|
||||
function restEndpointMethods(octokit) {
|
||||
const api = endpointsToMethods(octokit);
|
||||
return {
|
||||
rest: api
|
||||
};
|
||||
}
|
||||
restEndpointMethods.VERSION = VERSION;
|
||||
function legacyRestEndpointMethods(octokit) {
|
||||
const api = endpointsToMethods(octokit);
|
||||
return {
|
||||
...api,
|
||||
rest: api
|
||||
};
|
||||
}
|
||||
legacyRestEndpointMethods.VERSION = VERSION;
|
||||
export {
|
||||
legacyRestEndpointMethods,
|
||||
restEndpointMethods
|
||||
};
|
||||
4
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
generated
vendored
Normal file
4
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
const VERSION = "10.4.1";
|
||||
export {
|
||||
VERSION
|
||||
};
|
||||
Reference in New Issue
Block a user