{
  "version": 3,
  "sources": ["../dist-src/index.js", "../dist-src/auth.js", "../dist-src/get-app-authentication.js", "../dist-src/cache.js", "../dist-src/to-token-authentication.js", "../dist-src/get-installation-authentication.js", "../dist-src/hook.js", "../dist-src/requires-app-auth.js", "../dist-src/version.js"],
  "sourcesContent": ["import { getUserAgent } from \"universal-user-agent\";\nimport { request as defaultRequest } from \"@octokit/request\";\nimport { createOAuthAppAuth } from \"@octokit/auth-oauth-app\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { getCache } from \"./cache\";\nimport { VERSION } from \"./version\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nfunction createAppAuth(options) {\n  if (!options.appId) {\n    throw new Error(\"[@octokit/auth-app] appId option is required\");\n  }\n  if (!Number.isFinite(+options.appId)) {\n    throw new Error(\n      \"[@octokit/auth-app] appId option must be a number or numeric string\"\n    );\n  }\n  if (!options.privateKey) {\n    throw new Error(\"[@octokit/auth-app] privateKey option is required\");\n  }\n  if (\"installationId\" in options && !options.installationId) {\n    throw new Error(\n      \"[@octokit/auth-app] installationId is set to a falsy value\"\n    );\n  }\n  const log = Object.assign(\n    {\n      warn: console.warn.bind(console)\n    },\n    options.log\n  );\n  const request = options.request || defaultRequest.defaults({\n    headers: {\n      \"user-agent\": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`\n    }\n  });\n  const state = Object.assign(\n    {\n      request,\n      cache: getCache()\n    },\n    options,\n    options.installationId ? { installationId: Number(options.installationId) } : {},\n    {\n      log,\n      oauthApp: createOAuthAppAuth({\n        clientType: \"github-app\",\n        clientId: options.clientId || \"\",\n        clientSecret: options.clientSecret || \"\",\n        request\n      })\n    }\n  );\n  return Object.assign(auth.bind(null, state), {\n    hook: hook.bind(null, state)\n  });\n}\nexport {\n  createAppAuth,\n  createOAuthUserAuth\n};\n", "import { Deprecation } from \"deprecation\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nasync function auth(state, authOptions) {\n  switch (authOptions.type) {\n    case \"app\":\n      return getAppAuthentication(state);\n    case \"oauth\":\n      state.log.warn(\n        // @ts-expect-error `log.warn()` expects string\n        new Deprecation(\n          `[@octokit/auth-app] {type: \"oauth\"} is deprecated. Use {type: \"oauth-app\"} instead`\n        )\n      );\n    case \"oauth-app\":\n      return state.oauthApp({ type: \"oauth-app\" });\n    case \"installation\":\n      authOptions;\n      return getInstallationAuthentication(state, {\n        ...authOptions,\n        type: \"installation\"\n      });\n    case \"oauth-user\":\n      return state.oauthApp(authOptions);\n    default:\n      throw new Error(`Invalid auth type: ${authOptions.type}`);\n  }\n}\nexport {\n  auth\n};\n", "import { githubAppJwt } from \"universal-github-app-jwt\";\nasync function getAppAuthentication({\n  appId,\n  privateKey,\n  timeDifference\n}) {\n  try {\n    const appAuthentication = await githubAppJwt({\n      id: +appId,\n      privateKey,\n      now: timeDifference && Math.floor(Date.now() / 1e3) + timeDifference\n    });\n    return {\n      type: \"app\",\n      token: appAuthentication.token,\n      appId: appAuthentication.appId,\n      expiresAt: new Date(appAuthentication.expiration * 1e3).toISOString()\n    };\n  } catch (error) {\n    if (privateKey === \"-----BEGIN RSA PRIVATE KEY-----\") {\n      throw new Error(\n        \"The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\\n'\"\n      );\n    } else {\n      throw error;\n    }\n  }\n}\nexport {\n  getAppAuthentication\n};\n", "import { LRUCache } from \"lru-cache\";\nfunction getCache() {\n  return new LRUCache({\n    // cache max. 15000 tokens, that will use less than 10mb memory\n    max: 15e3,\n    // Cache for 1 minute less than GitHub expiry\n    ttl: 1e3 * 60 * 59\n  });\n}\nasync function get(cache, options) {\n  const cacheKey = optionsToCacheKey(options);\n  const result = await cache.get(cacheKey);\n  if (!result) {\n    return;\n  }\n  const [\n    token,\n    createdAt,\n    expiresAt,\n    repositorySelection,\n    permissionsString,\n    singleFileName\n  ] = result.split(\"|\");\n  const permissions = options.permissions || permissionsString.split(/,/).reduce((permissions2, string) => {\n    if (/!$/.test(string)) {\n      permissions2[string.slice(0, -1)] = \"write\";\n    } else {\n      permissions2[string] = \"read\";\n    }\n    return permissions2;\n  }, {});\n  return {\n    token,\n    createdAt,\n    expiresAt,\n    permissions,\n    repositoryIds: options.repositoryIds,\n    repositoryNames: options.repositoryNames,\n    singleFileName,\n    repositorySelection\n  };\n}\nasync function set(cache, options, data) {\n  const key = optionsToCacheKey(options);\n  const permissionsString = options.permissions ? \"\" : Object.keys(data.permissions).map(\n    (name) => `${name}${data.permissions[name] === \"write\" ? \"!\" : \"\"}`\n  ).join(\",\");\n  const value = [\n    data.token,\n    data.createdAt,\n    data.expiresAt,\n    data.repositorySelection,\n    permissionsString,\n    data.singleFileName\n  ].join(\"|\");\n  await cache.set(key, value);\n}\nfunction optionsToCacheKey({\n  installationId,\n  permissions = {},\n  repositoryIds = [],\n  repositoryNames = []\n}) {\n  const permissionsString = Object.keys(permissions).sort().map((name) => permissions[name] === \"read\" ? name : `${name}!`).join(\",\");\n  const repositoryIdsString = repositoryIds.sort().join(\",\");\n  const repositoryNamesString = repositoryNames.join(\",\");\n  return [\n    installationId,\n    repositoryIdsString,\n    repositoryNamesString,\n    permissionsString\n  ].filter(Boolean).join(\"|\");\n}\nexport {\n  get,\n  getCache,\n  set\n};\n", "function toTokenAuthentication({\n  installationId,\n  token,\n  createdAt,\n  expiresAt,\n  repositorySelection,\n  permissions,\n  repositoryIds,\n  repositoryNames,\n  singleFileName\n}) {\n  return Object.assign(\n    {\n      type: \"token\",\n      tokenType: \"installation\",\n      token,\n      installationId,\n      permissions,\n      createdAt,\n      expiresAt,\n      repositorySelection\n    },\n    repositoryIds ? { repositoryIds } : null,\n    repositoryNames ? { repositoryNames } : null,\n    singleFileName ? { singleFileName } : null\n  );\n}\nexport {\n  toTokenAuthentication\n};\n", "import { get, set } from \"./cache\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { toTokenAuthentication } from \"./to-token-authentication\";\nasync function getInstallationAuthentication(state, options, customRequest) {\n  const installationId = Number(options.installationId || state.installationId);\n  if (!installationId) {\n    throw new Error(\n      \"[@octokit/auth-app] installationId option is required for installation authentication.\"\n    );\n  }\n  if (options.factory) {\n    const { type, factory, oauthApp, ...factoryAuthOptions } = {\n      ...state,\n      ...options\n    };\n    return factory(factoryAuthOptions);\n  }\n  const optionsWithInstallationTokenFromState = Object.assign(\n    { installationId },\n    options\n  );\n  if (!options.refresh) {\n    const result = await get(\n      state.cache,\n      optionsWithInstallationTokenFromState\n    );\n    if (result) {\n      const {\n        token: token2,\n        createdAt: createdAt2,\n        expiresAt: expiresAt2,\n        permissions: permissions2,\n        repositoryIds: repositoryIds2,\n        repositoryNames: repositoryNames2,\n        singleFileName: singleFileName2,\n        repositorySelection: repositorySelection2\n      } = result;\n      return toTokenAuthentication({\n        installationId,\n        token: token2,\n        createdAt: createdAt2,\n        expiresAt: expiresAt2,\n        permissions: permissions2,\n        repositorySelection: repositorySelection2,\n        repositoryIds: repositoryIds2,\n        repositoryNames: repositoryNames2,\n        singleFileName: singleFileName2\n      });\n    }\n  }\n  const appAuthentication = await getAppAuthentication(state);\n  const request = customRequest || state.request;\n  const {\n    data: {\n      token,\n      expires_at: expiresAt,\n      repositories,\n      permissions: permissionsOptional,\n      repository_selection: repositorySelectionOptional,\n      single_file: singleFileName\n    }\n  } = await request(\"POST /app/installations/{installation_id}/access_tokens\", {\n    installation_id: installationId,\n    repository_ids: options.repositoryIds,\n    repositories: options.repositoryNames,\n    permissions: options.permissions,\n    mediaType: {\n      previews: [\"machine-man\"]\n    },\n    headers: {\n      authorization: `bearer ${appAuthentication.token}`\n    }\n  });\n  const permissions = permissionsOptional || {};\n  const repositorySelection = repositorySelectionOptional || \"all\";\n  const repositoryIds = repositories ? repositories.map((r) => r.id) : void 0;\n  const repositoryNames = repositories ? repositories.map((repo) => repo.name) : void 0;\n  const createdAt = (/* @__PURE__ */ new Date()).toISOString();\n  await set(state.cache, optionsWithInstallationTokenFromState, {\n    token,\n    createdAt,\n    expiresAt,\n    repositorySelection,\n    permissions,\n    repositoryIds,\n    repositoryNames,\n    singleFileName\n  });\n  return toTokenAuthentication({\n    installationId,\n    token,\n    createdAt,\n    expiresAt,\n    repositorySelection,\n    permissions,\n    repositoryIds,\n    repositoryNames,\n    singleFileName\n  });\n}\nexport {\n  getInstallationAuthentication\n};\n", "import { requiresBasicAuth } from \"@octokit/auth-oauth-user\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nimport { requiresAppAuth } from \"./requires-app-auth\";\nconst FIVE_SECONDS_IN_MS = 5 * 1e3;\nfunction isNotTimeSkewError(error) {\n  return !(error.message.match(\n    /'Expiration time' claim \\('exp'\\) must be a numeric value representing the future time at which the assertion expires/\n  ) || error.message.match(\n    /'Issued at' claim \\('iat'\\) must be an Integer representing the time that the assertion was issued/\n  ));\n}\nasync function hook(state, request, route, parameters) {\n  const endpoint = request.endpoint.merge(route, parameters);\n  const url = endpoint.url;\n  if (/\\/login\\/oauth\\/access_token$/.test(url)) {\n    return request(endpoint);\n  }\n  if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, \"\"))) {\n    const { token: token2 } = await getAppAuthentication(state);\n    endpoint.headers.authorization = `bearer ${token2}`;\n    let response;\n    try {\n      response = await request(endpoint);\n    } catch (error) {\n      if (isNotTimeSkewError(error)) {\n        throw error;\n      }\n      if (typeof error.response.headers.date === \"undefined\") {\n        throw error;\n      }\n      const diff = Math.floor(\n        (Date.parse(error.response.headers.date) - Date.parse((/* @__PURE__ */ new Date()).toString())) / 1e3\n      );\n      state.log.warn(error.message);\n      state.log.warn(\n        `[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`\n      );\n      const { token: token3 } = await getAppAuthentication({\n        ...state,\n        timeDifference: diff\n      });\n      endpoint.headers.authorization = `bearer ${token3}`;\n      return request(endpoint);\n    }\n    return response;\n  }\n  if (requiresBasicAuth(url)) {\n    const authentication = await state.oauthApp({ type: \"oauth-app\" });\n    endpoint.headers.authorization = authentication.headers.authorization;\n    return request(endpoint);\n  }\n  const { token, createdAt } = await getInstallationAuthentication(\n    state,\n    // @ts-expect-error TBD\n    {},\n    request\n  );\n  endpoint.headers.authorization = `token ${token}`;\n  return sendRequestWithRetries(\n    state,\n    request,\n    endpoint,\n    createdAt\n  );\n}\nasync function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {\n  const timeSinceTokenCreationInMs = +/* @__PURE__ */ new Date() - +new Date(createdAt);\n  try {\n    return await request(options);\n  } catch (error) {\n    if (error.status !== 401) {\n      throw error;\n    }\n    if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {\n      if (retries > 0) {\n        error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1e3}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;\n      }\n      throw error;\n    }\n    ++retries;\n    const awaitTime = retries * 1e3;\n    state.log.warn(\n      `[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1e3}s)`\n    );\n    await new Promise((resolve) => setTimeout(resolve, awaitTime));\n    return sendRequestWithRetries(state, request, options, createdAt, retries);\n  }\n}\nexport {\n  hook\n};\n", "const PATHS = [\n  \"/app\",\n  \"/app/hook/config\",\n  \"/app/hook/deliveries\",\n  \"/app/hook/deliveries/{delivery_id}\",\n  \"/app/hook/deliveries/{delivery_id}/attempts\",\n  \"/app/installations\",\n  \"/app/installations/{installation_id}\",\n  \"/app/installations/{installation_id}/access_tokens\",\n  \"/app/installations/{installation_id}/suspended\",\n  \"/marketplace_listing/accounts/{account_id}\",\n  \"/marketplace_listing/plan\",\n  \"/marketplace_listing/plans\",\n  \"/marketplace_listing/plans/{plan_id}/accounts\",\n  \"/marketplace_listing/stubbed/accounts/{account_id}\",\n  \"/marketplace_listing/stubbed/plan\",\n  \"/marketplace_listing/stubbed/plans\",\n  \"/marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n  \"/orgs/{org}/installation\",\n  \"/repos/{owner}/{repo}/installation\",\n  \"/users/{username}/installation\"\n];\nfunction routeMatcher(paths) {\n  const regexes = paths.map(\n    (p) => p.split(\"/\").map((c) => c.startsWith(\"{\") ? \"(?:.+?)\" : c).join(\"/\")\n  );\n  const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})$`;\n  return new RegExp(regex, \"i\");\n}\nconst REGEX = routeMatcher(PATHS);\nfunction requiresAppAuth(url) {\n  return !!url && REGEX.test(url.split(\"?\")[0]);\n}\nexport {\n  requiresAppAuth\n};\n", "const VERSION = \"4.0.13\";\nexport {\n  VERSION\n};\n"],
  "mappings": ";AAAA,SAAS,oBAAoB;AAC7B,SAAS,WAAW,sBAAsB;AAC1C,SAAS,0BAA0B;;;ACFnC,SAAS,mBAAmB;;;ACA5B,SAAS,oBAAoB;AAC7B,eAAe,qBAAqB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI;AACF,UAAM,oBAAoB,MAAM,aAAa;AAAA,MAC3C,IAAI,CAAC;AAAA,MACL;AAAA,MACA,KAAK,kBAAkB,KAAK,MAAM,KAAK,IAAI,IAAI,GAAG,IAAI;AAAA,IACxD,CAAC;AACD,WAAO;AAAA,MACL,MAAM;AAAA,MACN,OAAO,kBAAkB;AAAA,MACzB,OAAO,kBAAkB;AAAA,MACzB,WAAW,IAAI,KAAK,kBAAkB,aAAa,GAAG,EAAE,YAAY;AAAA,IACtE;AAAA,EACF,SAAS,OAAP;AACA,QAAI,eAAe,mCAAmC;AACpD,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF,OAAO;AACL,YAAM;AAAA,IACR;AAAA,EACF;AACF;;;AC3BA,SAAS,gBAAgB;AACzB,SAAS,WAAW;AAClB,SAAO,IAAI,SAAS;AAAA;AAAA,IAElB,KAAK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