Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2025-04-21 18:01:41 +00:00
parent c9f0d30a86
commit 95d52b7807
647 changed files with 498055 additions and 3880 deletions

View file

@ -74,5 +74,6 @@ function optionsToCacheKey({
export {
get,
getCache,
optionsToCacheKey,
set
};

View file

@ -1,4 +1,4 @@
import { get, set } from "./cache.js";
import { get, optionsToCacheKey, set } from "./cache.js";
import { getAppAuthentication } from "./get-app-authentication.js";
import { toTokenAuthentication } from "./to-token-authentication.js";
async function getInstallationAuthentication(state, options, customRequest) {
@ -15,15 +15,30 @@ async function getInstallationAuthentication(state, options, customRequest) {
};
return factory(factoryAuthOptions);
}
const optionsWithInstallationTokenFromState = Object.assign(
{ installationId },
options
const request = customRequest || state.request;
return getInstallationAuthenticationConcurrently(
state,
{ ...options, installationId },
request
);
}
const pendingPromises = /* @__PURE__ */ new Map();
function getInstallationAuthenticationConcurrently(state, options, request) {
const cacheKey = optionsToCacheKey(options);
if (pendingPromises.has(cacheKey)) {
return pendingPromises.get(cacheKey);
}
const promise = getInstallationAuthenticationImpl(
state,
options,
request
).finally(() => pendingPromises.delete(cacheKey));
pendingPromises.set(cacheKey, promise);
return promise;
}
async function getInstallationAuthenticationImpl(state, options, request) {
if (!options.refresh) {
const result = await get(
state.cache,
optionsWithInstallationTokenFromState
);
const result = await get(state.cache, options);
if (result) {
const {
token: token2,
@ -36,7 +51,7 @@ async function getInstallationAuthentication(state, options, customRequest) {
repositorySelection: repositorySelection2
} = result;
return toTokenAuthentication({
installationId,
installationId: options.installationId,
token: token2,
createdAt: createdAt2,
expiresAt: expiresAt2,
@ -49,9 +64,8 @@ async function getInstallationAuthentication(state, options, customRequest) {
}
}
const appAuthentication = await getAppAuthentication(state);
const request = customRequest || state.request;
const payload = {
installation_id: installationId,
installation_id: options.installationId,
mediaType: {
previews: ["machine-man"]
},
@ -100,9 +114,9 @@ async function getInstallationAuthentication(state, options, customRequest) {
if (singleFileName) {
Object.assign(payload, { singleFileName });
}
await set(state.cache, optionsWithInstallationTokenFromState, cacheOptions);
await set(state.cache, options, cacheOptions);
const cacheData = {
installationId,
installationId: options.installationId,
token,
createdAt,
expiresAt,

View file

@ -1,4 +1,4 @@
const VERSION = "7.1.5";
const VERSION = "7.2.1";
export {
VERSION
};