@sentry/mcp-server 0.30.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/auth/constants.cjs +9 -0
  2. package/dist/auth/constants.d.cts +31 -0
  3. package/dist/auth/constants.d.cts.map +1 -0
  4. package/dist/auth/constants.d.ts +31 -0
  5. package/dist/auth/constants.d.ts.map +1 -0
  6. package/dist/auth/constants.js +3 -0
  7. package/dist/auth/device-code-flow.cjs +10 -0
  8. package/dist/auth/device-code-flow.d.cts +34 -0
  9. package/dist/auth/device-code-flow.d.cts.map +1 -0
  10. package/dist/auth/device-code-flow.d.ts +34 -0
  11. package/dist/auth/device-code-flow.d.ts.map +1 -0
  12. package/dist/auth/device-code-flow.js +6 -0
  13. package/dist/auth/resolve-token.cjs +8 -0
  14. package/dist/auth/resolve-token.d.cts +17 -0
  15. package/dist/auth/resolve-token.d.cts.map +1 -0
  16. package/dist/auth/resolve-token.d.ts +17 -0
  17. package/dist/auth/resolve-token.d.ts.map +1 -0
  18. package/dist/auth/resolve-token.js +8 -0
  19. package/dist/auth/token-cache.cjs +5 -0
  20. package/dist/auth/token-cache.d.cts +11 -0
  21. package/dist/auth/token-cache.d.cts.map +1 -0
  22. package/dist/auth/token-cache.d.ts +11 -0
  23. package/dist/auth/token-cache.d.ts.map +1 -0
  24. package/dist/auth/token-cache.js +3 -0
  25. package/dist/auth/types.cjs +6 -0
  26. package/dist/auth/types.d.cts +2 -0
  27. package/dist/auth/types.d.ts +2 -0
  28. package/dist/auth/types.js +3 -0
  29. package/dist/auth-BIb4PBnL.js +79 -0
  30. package/dist/auth-BIb4PBnL.js.map +1 -0
  31. package/dist/auth-BK5LL8QY.cjs +90 -0
  32. package/dist/auth-BK5LL8QY.cjs.map +1 -0
  33. package/dist/cli/commands/auth.cjs +11 -0
  34. package/dist/cli/commands/auth.d.cts +8 -0
  35. package/dist/cli/commands/auth.d.cts.map +1 -0
  36. package/dist/cli/commands/auth.d.ts +8 -0
  37. package/dist/cli/commands/auth.d.ts.map +1 -0
  38. package/dist/cli/commands/auth.js +10 -0
  39. package/dist/cli/parse.cjs +1 -1
  40. package/dist/cli/parse.d.cts +1 -1
  41. package/dist/cli/parse.d.cts.map +1 -1
  42. package/dist/cli/parse.d.ts +1 -1
  43. package/dist/cli/parse.d.ts.map +1 -1
  44. package/dist/cli/parse.js +1 -1
  45. package/dist/cli/resolve.cjs +4 -2
  46. package/dist/cli/resolve.d.cts +9 -3
  47. package/dist/cli/resolve.d.cts.map +1 -1
  48. package/dist/cli/resolve.d.ts +9 -3
  49. package/dist/cli/resolve.d.ts.map +1 -1
  50. package/dist/cli/resolve.js +3 -2
  51. package/dist/cli/types.d.cts +2 -2
  52. package/dist/cli/types.d.ts +2 -2
  53. package/dist/cli/usage.cjs +1 -1
  54. package/dist/cli/usage.js +1 -1
  55. package/dist/{config-NKdlAxBc.js → config--FiEKpQR.js} +1 -1
  56. package/dist/{config-BYPjNBPX-CdPOenPb.js → config-BYPjNBPX-7d8TAxBc.js} +1 -1
  57. package/dist/{config-BYPjNBPX-CdPOenPb.js.map → config-BYPjNBPX-7d8TAxBc.js.map} +1 -1
  58. package/dist/{config-BYPjNBPX-CxPh7iM8.cjs → config-BYPjNBPX-Bqwc8iZW.cjs} +1 -1
  59. package/dist/{config-BYPjNBPX-CxPh7iM8.cjs.map → config-BYPjNBPX-Bqwc8iZW.cjs.map} +1 -1
  60. package/dist/{config-CLW41PUq.cjs → config-DU03TDiU.cjs} +1 -1
  61. package/dist/{resolve-Ci97NUwJ.js → constants-Ciwj7kb9.js} +30 -121
  62. package/dist/constants-Ciwj7kb9.js.map +1 -0
  63. package/dist/{resolve-CxQZsYhh.cjs → constants-DmV1Benp.cjs} +65 -132
  64. package/dist/constants-DmV1Benp.cjs.map +1 -0
  65. package/dist/device-code-flow-CpGZ3Eqv.cjs +154 -0
  66. package/dist/device-code-flow-CpGZ3Eqv.cjs.map +1 -0
  67. package/dist/device-code-flow-DmgeS5QN.js +124 -0
  68. package/dist/device-code-flow-DmgeS5QN.js.map +1 -0
  69. package/dist/index.cjs +876 -690
  70. package/dist/index.cjs.map +1 -1
  71. package/dist/index.js +865 -679
  72. package/dist/index.js.map +1 -1
  73. package/dist/{parse-c8rvP4YQ.js → parse-BC0czE2L.js} +3 -1
  74. package/dist/{parse-c8rvP4YQ.js.map → parse-BC0czE2L.js.map} +1 -1
  75. package/dist/{parse-C6k7VZkG.cjs → parse-CBlXTQfk.cjs} +3 -1
  76. package/dist/{parse-C6k7VZkG.cjs.map → parse-CBlXTQfk.cjs.map} +1 -1
  77. package/dist/resolve-BfYJ9Cqy.cjs +168 -0
  78. package/dist/resolve-BfYJ9Cqy.cjs.map +1 -0
  79. package/dist/resolve-D0W2gbu8.js +133 -0
  80. package/dist/resolve-D0W2gbu8.js.map +1 -0
  81. package/dist/resolve-token-C2eTEtoo.cjs +52 -0
  82. package/dist/resolve-token-C2eTEtoo.cjs.map +1 -0
  83. package/dist/resolve-token-pfPBO9EK.js +47 -0
  84. package/dist/resolve-token-pfPBO9EK.js.map +1 -0
  85. package/dist/{stdio-BlFtz2dW.cjs → stdio-B08zZS4X.cjs} +3 -19
  86. package/dist/stdio-B08zZS4X.cjs.map +1 -0
  87. package/dist/{stdio-D7HAkmRe.js → stdio-CUhyR_jH.js} +3 -7
  88. package/dist/stdio-CUhyR_jH.js.map +1 -0
  89. package/dist/{token-CwkkxgwR.js → token-D7eiINbV.js} +2 -2
  90. package/dist/{token-CwkkxgwR.js.map → token-D7eiINbV.js.map} +1 -1
  91. package/dist/{token-C7V4_3ji.cjs → token-Dx4qrxlx.cjs} +3 -3
  92. package/dist/{token-C7V4_3ji.cjs.map → token-Dx4qrxlx.cjs.map} +1 -1
  93. package/dist/token-cache-BTEUyVx2.js +66 -0
  94. package/dist/token-cache-BTEUyVx2.js.map +1 -0
  95. package/dist/token-cache-iqkTOca3.cjs +84 -0
  96. package/dist/token-cache-iqkTOca3.cjs.map +1 -0
  97. package/dist/{token-error-BCFB3iKM.cjs → token-error-x_miDBP3.cjs} +1 -1
  98. package/dist/{token-error-BCFB3iKM.cjs.map → token-error-x_miDBP3.cjs.map} +1 -1
  99. package/dist/{token-util-D5kD3Z8e.js → token-util-DtX1UM9f.js} +1 -1
  100. package/dist/{token-util-CQ4Ghf_7.js → token-util-VkLmCUNV.js} +1 -1
  101. package/dist/{token-util-CQ4Ghf_7.js.map → token-util-VkLmCUNV.js.map} +1 -1
  102. package/dist/{token-util-8fvl2CtH.cjs → token-util-bEa_1v46.cjs} +2 -2
  103. package/dist/{token-util-CMaRPlqM.cjs → token-util-oe0G9a-s.cjs} +2 -2
  104. package/dist/{token-util-CMaRPlqM.cjs.map → token-util-oe0G9a-s.cjs.map} +1 -1
  105. package/dist/transports/stdio.cjs +2 -1
  106. package/dist/transports/stdio.js +2 -1
  107. package/dist/types-BN426G4g.d.ts +111 -0
  108. package/dist/types-BN426G4g.d.ts.map +1 -0
  109. package/dist/types-C8FoyqMN.js +54 -0
  110. package/dist/types-C8FoyqMN.js.map +1 -0
  111. package/dist/{types-C0DSLPbp.d.cts → types-CX4uOY82.d.ts} +14 -4
  112. package/dist/types-CX4uOY82.d.ts.map +1 -0
  113. package/dist/types-ClEPUb_D.d.cts +111 -0
  114. package/dist/types-ClEPUb_D.d.cts.map +1 -0
  115. package/dist/{types-BZvFOe59.d.ts → types-rlmLVpNO.d.cts} +14 -4
  116. package/dist/types-rlmLVpNO.d.cts.map +1 -0
  117. package/dist/types-xUmfecYm.cjs +78 -0
  118. package/dist/types-xUmfecYm.cjs.map +1 -0
  119. package/dist/{usage-BRTpzFg9.js → usage-DB-MGezA.js} +14 -4
  120. package/dist/usage-DB-MGezA.js.map +1 -0
  121. package/dist/{usage-DAChHAia.cjs → usage-DRK6TiDr.cjs} +14 -4
  122. package/dist/usage-DRK6TiDr.cjs.map +1 -0
  123. package/dist/version-CYYpU4RZ.js +7 -0
  124. package/dist/version-CYYpU4RZ.js.map +1 -0
  125. package/dist/version-Ca7qUBih.cjs +19 -0
  126. package/dist/version-Ca7qUBih.cjs.map +1 -0
  127. package/package.json +4 -4
  128. package/dist/resolve-Ci97NUwJ.js.map +0 -1
  129. package/dist/resolve-CxQZsYhh.cjs.map +0 -1
  130. package/dist/stdio-BlFtz2dW.cjs.map +0 -1
  131. package/dist/stdio-D7HAkmRe.js.map +0 -1
  132. package/dist/types-BZvFOe59.d.ts.map +0 -1
  133. package/dist/types-C0DSLPbp.d.cts.map +0 -1
  134. package/dist/usage-BRTpzFg9.js.map +0 -1
  135. package/dist/usage-DAChHAia.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stdio-B08zZS4X.cjs","names":["server: McpServer","context: ServerContext","LIB_VERSION","StdioServerTransport"],"sources":["../src/transports/stdio.ts"],"sourcesContent":["/**\n * Standard I/O Transport for MCP Server.\n *\n * Provides stdio-based communication for the Sentry MCP server, typically used\n * when the server runs as a subprocess communicating via stdin/stdout pipes.\n *\n * @example Basic Usage\n * ```typescript\n * import { Server } from \"@modelcontextprotocol/sdk/server/index.js\";\n * import { startStdio } from \"./transports/stdio.js\";\n *\n * const server = new Server();\n * const context = {\n * accessToken: process.env.SENTRY_TOKEN,\n * host: \"sentry.io\"\n * };\n *\n * await startStdio(server, context);\n * ```\n */\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"@sentry/mcp-core/version\";\nimport type { ServerContext } from \"@sentry/mcp-core/types\";\n\n/**\n * Starts the MCP server with stdio transport and telemetry.\n *\n * Connects the server using stdio transport for process-based communication.\n * Context is already captured in tool handler closures during buildServer().\n * All operations are wrapped in Sentry tracing for observability.\n *\n * @param server - Configured and instrumented MCP server instance (with context in closures)\n * @param context - Server context with authentication and configuration (for telemetry attributes)\n *\n * @example CLI Integration\n * ```typescript\n * import { buildServer } from \"./server.js\";\n * import { startStdio } from \"./transports/stdio.js\";\n *\n * const context = {\n * accessToken: userToken,\n * sentryHost: \"sentry.io\",\n * userId: \"user-123\",\n * clientId: \"cursor-ide\",\n * constraints: {}\n * };\n *\n * const server = buildServer({ context }); // Context captured in closures\n * await startStdio(server, context);\n * ```\n */\nexport async function startStdio(server: McpServer, context: ServerContext) {\n await Sentry.startNewTrace(async () => {\n return await Sentry.startSpan(\n {\n name: \"mcp.server/stdio\",\n attributes: {\n \"mcp.transport\": \"stdio\",\n \"network.transport\": \"pipe\",\n \"service.version\": LIB_VERSION,\n },\n },\n async () => {\n // Context already captured in tool handler closures during buildServer()\n const transport = new StdioServerTransport();\n await server.connect(transport);\n },\n );\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,eAAsB,WAAWA,QAAmBC,SAAwB;AAC1E,OAAM,cAAO,cAAc,YAAY;AACrC,SAAO,MAAM,cAAO,UAClB;GACE,MAAM;GACN,YAAY;IACV,iBAAiB;IACjB,qBAAqB;IACrB,mBAAmBC;GACpB;EACF,GACD,YAAY;GAEV,MAAM,YAAY,IAAIC;AACtB,SAAM,OAAO,QAAQ,UAAU;EAChC,EACF;CACF,EAAC;AACH"}
@@ -1,11 +1,7 @@
1
+ import { LIB_VERSION } from "./version-CYYpU4RZ.js";
1
2
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
2
3
  import * as Sentry from "@sentry/node";
3
4
 
4
- //#region ../mcp-core/dist/version-CQ6lY8HC.js
5
- const LIB_VERSION = typeof process !== "undefined" && "0.30.0" || "0.0.0";
6
- const USER_AGENT = `sentry-mcp/${LIB_VERSION} (https://mcp.sentry.dev)`;
7
-
8
- //#endregion
9
5
  //#region src/transports/stdio.ts
10
6
  /**
11
7
  * Starts the MCP server with stdio transport and telemetry.
@@ -51,5 +47,5 @@ async function startStdio(server, context) {
51
47
  }
52
48
 
53
49
  //#endregion
54
- export { LIB_VERSION, USER_AGENT, startStdio };
55
- //# sourceMappingURL=stdio-D7HAkmRe.js.map
50
+ export { startStdio };
51
+ //# sourceMappingURL=stdio-CUhyR_jH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stdio-CUhyR_jH.js","names":["server: McpServer","context: ServerContext"],"sources":["../src/transports/stdio.ts"],"sourcesContent":["/**\n * Standard I/O Transport for MCP Server.\n *\n * Provides stdio-based communication for the Sentry MCP server, typically used\n * when the server runs as a subprocess communicating via stdin/stdout pipes.\n *\n * @example Basic Usage\n * ```typescript\n * import { Server } from \"@modelcontextprotocol/sdk/server/index.js\";\n * import { startStdio } from \"./transports/stdio.js\";\n *\n * const server = new Server();\n * const context = {\n * accessToken: process.env.SENTRY_TOKEN,\n * host: \"sentry.io\"\n * };\n *\n * await startStdio(server, context);\n * ```\n */\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"@sentry/mcp-core/version\";\nimport type { ServerContext } from \"@sentry/mcp-core/types\";\n\n/**\n * Starts the MCP server with stdio transport and telemetry.\n *\n * Connects the server using stdio transport for process-based communication.\n * Context is already captured in tool handler closures during buildServer().\n * All operations are wrapped in Sentry tracing for observability.\n *\n * @param server - Configured and instrumented MCP server instance (with context in closures)\n * @param context - Server context with authentication and configuration (for telemetry attributes)\n *\n * @example CLI Integration\n * ```typescript\n * import { buildServer } from \"./server.js\";\n * import { startStdio } from \"./transports/stdio.js\";\n *\n * const context = {\n * accessToken: userToken,\n * sentryHost: \"sentry.io\",\n * userId: \"user-123\",\n * clientId: \"cursor-ide\",\n * constraints: {}\n * };\n *\n * const server = buildServer({ context }); // Context captured in closures\n * await startStdio(server, context);\n * ```\n */\nexport async function startStdio(server: McpServer, context: ServerContext) {\n await Sentry.startNewTrace(async () => {\n return await Sentry.startSpan(\n {\n name: \"mcp.server/stdio\",\n attributes: {\n \"mcp.transport\": \"stdio\",\n \"network.transport\": \"pipe\",\n \"service.version\": LIB_VERSION,\n },\n },\n async () => {\n // Context already captured in tool handler closures during buildServer()\n const transport = new StdioServerTransport();\n await server.connect(transport);\n },\n );\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,eAAsB,WAAWA,QAAmBC,SAAwB;AAC1E,OAAM,OAAO,cAAc,YAAY;AACrC,SAAO,MAAM,OAAO,UAClB;GACE,MAAM;GACN,YAAY;IACV,iBAAiB;IACjB,qBAAqB;IACrB,mBAAmB;GACpB;EACF,GACD,YAAY;GAEV,MAAM,YAAY,IAAI;AACtB,SAAM,OAAO,QAAQ,UAAU;EAChC,EACF;CACF,EAAC;AACH"}
@@ -1,5 +1,5 @@
1
1
  import { __commonJS, require_token_error } from "./token-error-Df8A7mgb.js";
2
- import { require_token_util } from "./token-util-CQ4Ghf_7.js";
2
+ import { require_token_util } from "./token-util-VkLmCUNV.js";
3
3
 
4
4
  //#region ../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js
5
5
  var require_token = __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
@@ -47,4 +47,4 @@ var require_token = __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/no
47
47
  //#endregion
48
48
  export default require_token();
49
49
 
50
- //# sourceMappingURL=token-CwkkxgwR.js.map
50
+ //# sourceMappingURL=token-D7eiINbV.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"token-CwkkxgwR.js","names":[],"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_exports = {};\n__export(token_exports, {\n refreshToken: () => refreshToken\n});\nmodule.exports = __toCommonJS(token_exports);\nvar import_token_error = require(\"./token-error\");\nvar import_token_util = require(\"./token-util\");\nasync function refreshToken() {\n const { projectId, teamId } = (0, import_token_util.findProjectInfo)();\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {\n const authToken = await (0, import_token_util.getVercelCliToken)();\n if (!authToken) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: Log in to Vercel CLI and link your project with `vc link`\"\n );\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: Try re-linking your project with `vc link`\"\n );\n }\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n refreshToken\n});\n"],"x_google_ignoreList":[0],"mappings":";;;;;CACA,IAAI,YAAY,OAAO;CACvB,IAAI,mBAAmB,OAAO;CAC9B,IAAI,oBAAoB,OAAO;CAC/B,IAAI,eAAe,OAAO,UAAU;CACpC,IAAI,WAAW,CAAC,QAAQ,QAAQ;AAC9B,OAAK,IAAI,QAAQ,IAC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names":[],"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_exports = {};\n__export(token_exports, {\n refreshToken: () => refreshToken\n});\nmodule.exports = __toCommonJS(token_exports);\nvar import_token_error = require(\"./token-error\");\nvar import_token_util = require(\"./token-util\");\nasync function refreshToken() {\n const { projectId, teamId } = (0, import_token_util.findProjectInfo)();\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {\n const authToken = await (0, import_token_util.getVercelCliToken)();\n if (!authToken) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: Log in to Vercel CLI and link your project with `vc link`\"\n );\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: Try re-linking your project with `vc link`\"\n );\n }\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n}\n// Annotate the CommonJS export names for ES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GJ,gBAAa,MAAM,CAAC,GAAG,kBAAkB,oBAAoB,WAAW,WAAW,OAAO;AAC1F,QAAK,WACH,OAAM,IAAI,mBAAmB,qBAAqB;AAEpD,IAAC,GAAG,kBAAkB,WAAW,YAAY,UAAU;EACxD;AACD,UAAQ,IAAI,oBAAoB,WAAW;AAC3C;CACD"}
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./chunk-Cv9WC9bY.cjs');
2
- const require_token_error$1 = require('./token-error-BCFB3iKM.cjs');
3
- const require_token_util$1 = require('./token-util-CMaRPlqM.cjs');
2
+ const require_token_error$1 = require('./token-error-x_miDBP3.cjs');
3
+ const require_token_util$1 = require('./token-util-oe0G9a-s.cjs');
4
4
 
5
5
  //#region ../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js
6
6
  var require_token = require_chunk.__commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
@@ -52,4 +52,4 @@ Object.defineProperty(exports, 'default', {
52
52
  return require_token();
53
53
  }
54
54
  });
55
- //# sourceMappingURL=token-C7V4_3ji.cjs.map
55
+ //# sourceMappingURL=token-Dx4qrxlx.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"token-C7V4_3ji.cjs","names":[],"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_exports = {};\n__export(token_exports, {\n refreshToken: () => refreshToken\n});\nmodule.exports = __toCommonJS(token_exports);\nvar import_token_error = require(\"./token-error\");\nvar import_token_util = require(\"./token-util\");\nasync function refreshToken() {\n const { projectId, teamId } = (0, import_token_util.findProjectInfo)();\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {\n const authToken = await (0, import_token_util.getVercelCliToken)();\n if (!authToken) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: Log in to Vercel CLI and link your project with `vc link`\"\n );\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: Try re-linking your project with `vc link`\"\n );\n }\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n refreshToken\n});\n"],"x_google_ignoreList":[0],"mappings":";;;;;;CACA,IAAI,YAAY,OAAO;CACvB,IAAI,mBAAmB,OAAO;CAC9B,IAAI,oBAAoB,OAAO;CAC/B,IAAI,eAAe,OAAO,UAAU;CACpC,IAAI,WAAW,CAAC,QAAQ,QAAQ;AAC9B,OAAK,IAAI,QAAQ,IACf,WAAU,QAAQ,MAAM;GAAE,KAAK,IAAI;GAAO,YAAY;EAAM,EAAC;CAChE;CACD,IAAI,cAAc,CAAC,IAAI,MAAM,QAAQ,SAAS;AAC5C,MAAI,eAAe,SAAS,mBAAmB,SAAS,YACtD;QAAK,IAAI,OAAO,kBAAkB,KAAK,CACrC,MAAK,aAAa,KAAK,IAAI,IAAI,IAAI,QAAQ,OACzC,WAAU,IAAI,KAAK;IAAE,KAAK,MAAM,KAAK;IAAM,cAAc,OAAO,iBAAiB,MAAM,IAAI,KAAK,KAAK;GAAY,EAAC;EAAC;AAEzH,SAAO;CACR;CACD,IAAI,eAAe,CAAC,QAAQ,YAAY,UAAU,CAAE,GAAE,cAAc,EAAE,OAAO,KAAM,EAAC,EAAE,IAAI;CAC1F,IAAI,gBAAgB,CAAE;AACtB,UAAS,eAAe,EACtB,cAAc,MAAM,aACrB,EAAC;AACF,QAAO,UAAU,aAAa,cAAc;CAC5C,IAAI;CACJ,IAAI;CACJ,eAAe,eAAe;EAC5B,MAAM,EAAE,WAAW,QAAQ,GAAG,CAAC,GAAG,kBAAkB,kBAAkB;EACtE,IAAI,aAAa,CAAC,GAAG,kBAAkB,WAAW,UAAU;AAC5D,OAAK,cAAc,CAAC,GAAG,kBAAkB,WAAW,CAAC,GAAG,kBAAkB,iBAAiB,WAAW,MAAM,CAAC,EAAE;GAC7G,MAAM,YAAY,MAAM,CAAC,GAAG,kBAAkB,oBAAoB;AAClE,QAAK,UACH,OAAM,IAAI,mBAAmB,qBAC3B;AAGJ,QAAK,UACH,OAAM,IAAI,mBAAmB,qBAC3B;AAGJ,gBAAa,MAAM,CAAC,GAAG,kBAAkB,oBAAoB,WAAW,WAAW,OAAO;AAC1F,QAAK,WACH,OAAM,IAAI,mBAAmB,qBAAqB;AAEpD,IAAC,GAAG,kBAAkB,WAAW,YAAY,UAAU;EACxD;AACD,UAAQ,IAAI,oBAAoB,WAAW;AAC3C;CACD"}
1
+ {"version":3,"file":"token-Dx4qrxlx.cjs","names":[],"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_exports = {};\n__export(token_exports, {\n refreshToken: () => refreshToken\n});\nmodule.exports = __toCommonJS(token_exports);\nvar import_token_error = require(\"./token-error\");\nvar import_token_util = require(\"./token-util\");\nasync function refreshToken() {\n const { projectId, teamId } = (0, import_token_util.findProjectInfo)();\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {\n const authToken = await (0, import_token_util.getVercelCliToken)();\n if (!authToken) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: Log in to Vercel CLI and link your project with `vc link`\"\n );\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: Try re-linking your project with `vc link`\"\n );\n }\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n refreshToken\n});\n"],"x_google_ignoreList":[0],"mappings":";;;;;;CACA,IAAI,YAAY,OAAO;CACvB,IAAI,mBAAmB,OAAO;CAC9B,IAAI,oBAAoB,OAAO;CAC/B,IAAI,eAAe,OAAO,UAAU;CAC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AAI,oBAAoB,WAAW;AAC3C;CACD"}
@@ -0,0 +1,66 @@
1
+ import * as fs from "node:fs/promises";
2
+ import * as path from "node:path";
3
+ import * as os from "node:os";
4
+
5
+ //#region src/auth/token-cache.ts
6
+ /** Safety window: treat tokens as expired 5 minutes before actual expiry. */
7
+ const EXPIRY_SAFETY_MS = 5 * 60 * 1e3;
8
+ function getCacheFilePath() {
9
+ if (process.env.SENTRY_MCP_AUTH_CACHE) return process.env.SENTRY_MCP_AUTH_CACHE;
10
+ return path.join(os.homedir(), ".sentry", "mcp.json");
11
+ }
12
+ function cacheKey(host, clientId) {
13
+ return `${host}:${clientId}`;
14
+ }
15
+ async function readCacheFile() {
16
+ try {
17
+ const raw = await fs.readFile(getCacheFilePath(), "utf-8");
18
+ return JSON.parse(raw);
19
+ } catch {
20
+ return {};
21
+ }
22
+ }
23
+ async function writeCacheFile(data) {
24
+ const filePath = getCacheFilePath();
25
+ const dir = path.dirname(filePath);
26
+ await fs.mkdir(dir, {
27
+ recursive: true,
28
+ mode: 448
29
+ });
30
+ const tmpPath = `${filePath}.tmp.${process.pid}`;
31
+ await fs.writeFile(tmpPath, JSON.stringify(data, null, 2), {
32
+ encoding: "utf-8",
33
+ mode: 384
34
+ });
35
+ await fs.rename(tmpPath, filePath);
36
+ }
37
+ async function readCachedToken(host, clientId) {
38
+ const data = await readCacheFile();
39
+ const key = cacheKey(host, clientId);
40
+ const entry = data[key];
41
+ if (!entry) return null;
42
+ const expiresAt = new Date(entry.expires_at).getTime();
43
+ if (!Number.isFinite(expiresAt) || expiresAt - Date.now() <= EXPIRY_SAFETY_MS) {
44
+ delete data[key];
45
+ await writeCacheFile(data);
46
+ return null;
47
+ }
48
+ return entry;
49
+ }
50
+ async function writeCachedToken(token) {
51
+ const data = await readCacheFile();
52
+ data[cacheKey(token.sentry_host, token.client_id)] = token;
53
+ await writeCacheFile(data);
54
+ }
55
+ async function clearCachedToken(host, clientId) {
56
+ const data = await readCacheFile();
57
+ const key = cacheKey(host, clientId);
58
+ if (key in data) {
59
+ delete data[key];
60
+ await writeCacheFile(data);
61
+ }
62
+ }
63
+
64
+ //#endregion
65
+ export { clearCachedToken, readCachedToken, writeCachedToken };
66
+ //# sourceMappingURL=token-cache-BTEUyVx2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-cache-BTEUyVx2.js","names":["host: string","clientId: string","data: CacheFile","token: CachedToken"],"sources":["../src/auth/token-cache.ts"],"sourcesContent":["/**\n * Persistent token cache for device code auth.\n * Tokens are stored at ~/.sentry/mcp.json, keyed by {host}:{clientId}.\n * See docs/stdio-auth.md for cache format and security details.\n */\nimport * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport * as os from \"node:os\";\nimport type { CachedToken } from \"./types\";\n\n/** Safety window: treat tokens as expired 5 minutes before actual expiry. */\nconst EXPIRY_SAFETY_MS = 5 * 60 * 1000;\n\nfunction getCacheFilePath(): string {\n if (process.env.SENTRY_MCP_AUTH_CACHE) {\n return process.env.SENTRY_MCP_AUTH_CACHE;\n }\n return path.join(os.homedir(), \".sentry\", \"mcp.json\");\n}\n\nfunction cacheKey(host: string, clientId: string): string {\n return `${host}:${clientId}`;\n}\n\ntype CacheFile = Record<string, CachedToken>;\n\nasync function readCacheFile(): Promise<CacheFile> {\n try {\n const raw = await fs.readFile(getCacheFilePath(), \"utf-8\");\n return JSON.parse(raw) as CacheFile;\n } catch {\n return {};\n }\n}\n\nasync function writeCacheFile(data: CacheFile): Promise<void> {\n const filePath = getCacheFilePath();\n const dir = path.dirname(filePath);\n\n await fs.mkdir(dir, { recursive: true, mode: 0o700 });\n\n // Atomic write: write to temp file then rename\n const tmpPath = `${filePath}.tmp.${process.pid}`;\n await fs.writeFile(tmpPath, JSON.stringify(data, null, 2), {\n encoding: \"utf-8\",\n mode: 0o600,\n });\n await fs.rename(tmpPath, filePath);\n}\n\nexport async function readCachedToken(\n host: string,\n clientId: string,\n): Promise<CachedToken | null> {\n const data = await readCacheFile();\n const key = cacheKey(host, clientId);\n const entry = data[key];\n if (!entry) return null;\n\n const expiresAt = new Date(entry.expires_at).getTime();\n if (\n !Number.isFinite(expiresAt) ||\n expiresAt - Date.now() <= EXPIRY_SAFETY_MS\n ) {\n delete data[key];\n await writeCacheFile(data);\n return null;\n }\n\n return entry;\n}\n\nexport async function writeCachedToken(token: CachedToken): Promise<void> {\n const data = await readCacheFile();\n data[cacheKey(token.sentry_host, token.client_id)] = token;\n await writeCacheFile(data);\n}\n\nexport async function clearCachedToken(\n host: string,\n clientId: string,\n): Promise<void> {\n const data = await readCacheFile();\n const key = cacheKey(host, clientId);\n if (key in data) {\n delete data[key];\n await writeCacheFile(data);\n }\n}\n"],"mappings":";;;;;;AAWA,MAAM,mBAAmB,IAAI,KAAK;AAElC,SAAS,mBAA2B;AAClC,KAAI,QAAQ,IAAI,sBACd,QAAO,QAAQ,IAAI;AAErB,QAAO,KAAK,KAAK,GAAG,SAAS,EAAE,WAAW,WAAW;AACtD;AAED,SAAS,SAASA,MAAcC,UAA0B;AACxD,WAAU,KAAK,GAAG;AACnB;AAID,eAAe,gBAAoC;AACjD,KAAI;EACF,MAAM,MAAM,MAAM,GAAG,SAAS,kBAAkB,EAAE,QAAQ;AAC1D,SAAO,KAAK,MAAM,IAAI;CACvB,QAAO;AACN,SAAO,CAAE;CACV;AACF;AAED,eAAe,eAAeC,MAAgC;CAC5D,MAAM,WAAW,kBAAkB;CACnC,MAAM,MAAM,KAAK,QAAQ,SAAS;AAElC,OAAM,GAAG,MAAM,KAAK;EAAE,WAAW;EAAM,MAAM;CAAO,EAAC;CAGrD,MAAM,aAAa,SAAS,OAAO,QAAQ;AAC3C,OAAM,GAAG,UAAU,SAAS,KAAK,UAAU,MAAM,MAAM,EAAE,EAAE;EACzD,UAAU;EACV,MAAM;CACP,EAAC;AACF,OAAM,GAAG,OAAO,SAAS,SAAS;AACnC;AAED,eAAsB,gBACpBF,MACAC,UAC6B;CAC7B,MAAM,OAAO,MAAM,eAAe;CAClC,MAAM,MAAM,SAAS,MAAM,SAAS;CACpC,MAAM,QAAQ,KAAK;AACnB,MAAK,MAAO,QAAO;CAEnB,MAAM,YAAY,IAAI,KAAK,MAAM,YAAY,SAAS;AACtD,MACG,OAAO,SAAS,UAAU,IAC3B,YAAY,KAAK,KAAK,IAAI,kBAC1B;AACA,SAAO,KAAK;AACZ,QAAM,eAAe,KAAK;AAC1B,SAAO;CACR;AAED,QAAO;AACR;AAED,eAAsB,iBAAiBE,OAAmC;CACxE,MAAM,OAAO,MAAM,eAAe;AAClC,MAAK,SAAS,MAAM,aAAa,MAAM,UAAU,IAAI;AACrD,OAAM,eAAe,KAAK;AAC3B;AAED,eAAsB,iBACpBH,MACAC,UACe;CACf,MAAM,OAAO,MAAM,eAAe;CAClC,MAAM,MAAM,SAAS,MAAM,SAAS;AACpC,KAAI,OAAO,MAAM;AACf,SAAO,KAAK;AACZ,QAAM,eAAe,KAAK;CAC3B;AACF"}
@@ -0,0 +1,84 @@
1
+ const require_chunk = require('./chunk-Cv9WC9bY.cjs');
2
+ const node_fs_promises = require_chunk.__toESM(require("node:fs/promises"));
3
+ const node_path = require_chunk.__toESM(require("node:path"));
4
+ const node_os = require_chunk.__toESM(require("node:os"));
5
+
6
+ //#region src/auth/token-cache.ts
7
+ /** Safety window: treat tokens as expired 5 minutes before actual expiry. */
8
+ const EXPIRY_SAFETY_MS = 5 * 60 * 1e3;
9
+ function getCacheFilePath() {
10
+ if (process.env.SENTRY_MCP_AUTH_CACHE) return process.env.SENTRY_MCP_AUTH_CACHE;
11
+ return node_path.join(node_os.homedir(), ".sentry", "mcp.json");
12
+ }
13
+ function cacheKey(host, clientId) {
14
+ return `${host}:${clientId}`;
15
+ }
16
+ async function readCacheFile() {
17
+ try {
18
+ const raw = await node_fs_promises.readFile(getCacheFilePath(), "utf-8");
19
+ return JSON.parse(raw);
20
+ } catch {
21
+ return {};
22
+ }
23
+ }
24
+ async function writeCacheFile(data) {
25
+ const filePath = getCacheFilePath();
26
+ const dir = node_path.dirname(filePath);
27
+ await node_fs_promises.mkdir(dir, {
28
+ recursive: true,
29
+ mode: 448
30
+ });
31
+ const tmpPath = `${filePath}.tmp.${process.pid}`;
32
+ await node_fs_promises.writeFile(tmpPath, JSON.stringify(data, null, 2), {
33
+ encoding: "utf-8",
34
+ mode: 384
35
+ });
36
+ await node_fs_promises.rename(tmpPath, filePath);
37
+ }
38
+ async function readCachedToken(host, clientId) {
39
+ const data = await readCacheFile();
40
+ const key = cacheKey(host, clientId);
41
+ const entry = data[key];
42
+ if (!entry) return null;
43
+ const expiresAt = new Date(entry.expires_at).getTime();
44
+ if (!Number.isFinite(expiresAt) || expiresAt - Date.now() <= EXPIRY_SAFETY_MS) {
45
+ delete data[key];
46
+ await writeCacheFile(data);
47
+ return null;
48
+ }
49
+ return entry;
50
+ }
51
+ async function writeCachedToken(token) {
52
+ const data = await readCacheFile();
53
+ data[cacheKey(token.sentry_host, token.client_id)] = token;
54
+ await writeCacheFile(data);
55
+ }
56
+ async function clearCachedToken(host, clientId) {
57
+ const data = await readCacheFile();
58
+ const key = cacheKey(host, clientId);
59
+ if (key in data) {
60
+ delete data[key];
61
+ await writeCacheFile(data);
62
+ }
63
+ }
64
+
65
+ //#endregion
66
+ Object.defineProperty(exports, 'clearCachedToken', {
67
+ enumerable: true,
68
+ get: function () {
69
+ return clearCachedToken;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, 'readCachedToken', {
73
+ enumerable: true,
74
+ get: function () {
75
+ return readCachedToken;
76
+ }
77
+ });
78
+ Object.defineProperty(exports, 'writeCachedToken', {
79
+ enumerable: true,
80
+ get: function () {
81
+ return writeCachedToken;
82
+ }
83
+ });
84
+ //# sourceMappingURL=token-cache-iqkTOca3.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-cache-iqkTOca3.cjs","names":["host: string","clientId: string","data: CacheFile","token: CachedToken"],"sources":["../src/auth/token-cache.ts"],"sourcesContent":["/**\n * Persistent token cache for device code auth.\n * Tokens are stored at ~/.sentry/mcp.json, keyed by {host}:{clientId}.\n * See docs/stdio-auth.md for cache format and security details.\n */\nimport * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport * as os from \"node:os\";\nimport type { CachedToken } from \"./types\";\n\n/** Safety window: treat tokens as expired 5 minutes before actual expiry. */\nconst EXPIRY_SAFETY_MS = 5 * 60 * 1000;\n\nfunction getCacheFilePath(): string {\n if (process.env.SENTRY_MCP_AUTH_CACHE) {\n return process.env.SENTRY_MCP_AUTH_CACHE;\n }\n return path.join(os.homedir(), \".sentry\", \"mcp.json\");\n}\n\nfunction cacheKey(host: string, clientId: string): string {\n return `${host}:${clientId}`;\n}\n\ntype CacheFile = Record<string, CachedToken>;\n\nasync function readCacheFile(): Promise<CacheFile> {\n try {\n const raw = await fs.readFile(getCacheFilePath(), \"utf-8\");\n return JSON.parse(raw) as CacheFile;\n } catch {\n return {};\n }\n}\n\nasync function writeCacheFile(data: CacheFile): Promise<void> {\n const filePath = getCacheFilePath();\n const dir = path.dirname(filePath);\n\n await fs.mkdir(dir, { recursive: true, mode: 0o700 });\n\n // Atomic write: write to temp file then rename\n const tmpPath = `${filePath}.tmp.${process.pid}`;\n await fs.writeFile(tmpPath, JSON.stringify(data, null, 2), {\n encoding: \"utf-8\",\n mode: 0o600,\n });\n await fs.rename(tmpPath, filePath);\n}\n\nexport async function readCachedToken(\n host: string,\n clientId: string,\n): Promise<CachedToken | null> {\n const data = await readCacheFile();\n const key = cacheKey(host, clientId);\n const entry = data[key];\n if (!entry) return null;\n\n const expiresAt = new Date(entry.expires_at).getTime();\n if (\n !Number.isFinite(expiresAt) ||\n expiresAt - Date.now() <= EXPIRY_SAFETY_MS\n ) {\n delete data[key];\n await writeCacheFile(data);\n return null;\n }\n\n return entry;\n}\n\nexport async function writeCachedToken(token: CachedToken): Promise<void> {\n const data = await readCacheFile();\n data[cacheKey(token.sentry_host, token.client_id)] = token;\n await writeCacheFile(data);\n}\n\nexport async function clearCachedToken(\n host: string,\n clientId: string,\n): Promise<void> {\n const data = await readCacheFile();\n const key = cacheKey(host, clientId);\n if (key in data) {\n delete data[key];\n await writeCacheFile(data);\n }\n}\n"],"mappings":";;;;;;;AAWA,MAAM,mBAAmB,IAAI,KAAK;AAElC,SAAS,mBAA2B;AAClC,KAAI,QAAQ,IAAI,sBACd,QAAO,QAAQ,IAAI;AAErB,QAAO,UAAK,KAAK,QAAG,SAAS,EAAE,WAAW,WAAW;AACtD;AAED,SAAS,SAASA,MAAcC,UAA0B;AACxD,WAAU,KAAK,GAAG;AACnB;AAID,eAAe,gBAAoC;AACjD,KAAI;EACF,MAAM,MAAM,MAAM,iBAAG,SAAS,kBAAkB,EAAE,QAAQ;AAC1D,SAAO,KAAK,MAAM,IAAI;CACvB,QAAO;AACN,SAAO,CAAE;CACV;AACF;AAED,eAAe,eAAeC,MAAgC;CAC5D,MAAM,WAAW,kBAAkB;CACnC,MAAM,MAAM,UAAK,QAAQ,SAAS;AAElC,OAAM,iBAAG,MAAM,KAAK;EAAE,WAAW;EAAM,MAAM;CAAO,EAAC;CAGrD,MAAM,aAAa,SAAS,OAAO,QAAQ;AAC3C,OAAM,iBAAG,UAAU,SAAS,KAAK,UAAU,MAAM,MAAM,EAAE,EAAE;EACzD,UAAU;EACV,MAAM;CACP,EAAC;AACF,OAAM,iBAAG,OAAO,SAAS,SAAS;AACnC;AAED,eAAsB,gBACpBF,MACAC,UAC6B;CAC7B,MAAM,OAAO,MAAM,eAAe;CAClC,MAAM,MAAM,SAAS,MAAM,SAAS;CACpC,MAAM,QAAQ,KAAK;AACnB,MAAK,MAAO,QAAO;CAEnB,MAAM,YAAY,IAAI,KAAK,MAAM,YAAY,SAAS;AACtD,MACG,OAAO,SAAS,UAAU,IAC3B,YAAY,KAAK,KAAK,IAAI,kBAC1B;AACA,SAAO,KAAK;AACZ,QAAM,eAAe,KAAK;AAC1B,SAAO;CACR;AAED,QAAO;AACR;AAED,eAAsB,iBAAiBE,OAAmC;CACxE,MAAM,OAAO,MAAM,eAAe;AAClC,MAAK,SAAS,MAAM,aAAa,MAAM,UAAU,IAAI;AACrD,OAAM,eAAe,KAAK;AAC3B;AAED,eAAsB,iBACpBH,MACAC,UACe;CACf,MAAM,OAAO,MAAM,eAAe;CAClC,MAAM,MAAM,SAAS,MAAM,SAAS;AACpC,KAAI,OAAO,MAAM;AACf,SAAO,KAAK;AACZ,QAAM,eAAe,KAAK;CAC3B;AACF"}
@@ -45,4 +45,4 @@ Object.defineProperty(exports, 'require_token_error', {
45
45
  return require_token_error;
46
46
  }
47
47
  });
48
- //# sourceMappingURL=token-error-BCFB3iKM.cjs.map
48
+ //# sourceMappingURL=token-error-x_miDBP3.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"token-error-BCFB3iKM.cjs","names":[],"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-error.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_error_exports = {};\n__export(token_error_exports, {\n VercelOidcTokenError: () => VercelOidcTokenError\n});\nmodule.exports = __toCommonJS(token_error_exports);\nclass VercelOidcTokenError extends Error {\n constructor(message, cause) {\n super(message);\n this.name = \"VercelOidcTokenError\";\n this.cause = cause;\n }\n toString() {\n if (this.cause) {\n return `${this.name}: ${this.message}: ${this.cause}`;\n }\n return `${this.name}: ${this.message}`;\n }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n VercelOidcTokenError\n});\n"],"x_google_ignoreList":[0],"mappings":";;;;CACA,IAAI,YAAY,OAAO;CACvB,IAAI,mBAAmB,OAAO;CAC9B,IAAI,oBAAoB,OAAO;CAC/B,IAAI,eAAe,OAAO,UAAU;CACpC,IAAI,WAAW,CAAC,QAAQ,QAAQ;AAC9B,OAAK,IAAI,QAAQ,IACf,WAAU,QAAQ,MAAM;GAAE,KAAK,IAAI;GAAO,YAAY;EAAM,EAAC;CAChE;CACD,IAAI,cAAc,CAAC,IAAI,MAAM,QAAQ,SAAS;AAC5C,MAAI,eAAe,SAAS,mBAAmB,SAAS,YACtD;QAAK,IAAI,OAAO,kBAAkB,KAAK,CACrC,MAAK,aAAa,KAAK,IAAI,IAAI,IAAI,QAAQ,OACzC,WAAU,IAAI,KAAK;IAAE,KAAK,MAAM,KAAK;IAAM,cAAc,OAAO,iBAAiB,MAAM,IAAI,KAAK,KAAK;GAAY,EAAC;EAAC;AAEzH,SAAO;CACR;CACD,IAAI,eAAe,CAAC,QAAQ,YAAY,UAAU,CAAE,GAAE,cAAc,EAAE,OAAO,KAAM,EAAC,EAAE,IAAI;CAC1F,IAAI,sBAAsB,CAAE;AAC5B,UAAS,qBAAqB,EAC5B,sBAAsB,MAAM,qBAC7B,EAAC;AACF,QAAO,UAAU,aAAa,oBAAoB;CAClD,IAAM,uBAAN,cAAmC,MAAM;EACvC,YAAY,SAAS,OAAO;AAC1B,SAAM,QAAQ;AACd,QAAK,OAAO;AACZ,QAAK,QAAQ;EACd;EACD,WAAW;AACT,OAAI,KAAK,MACP,WAAU,KAAK,KAAK,IAAI,KAAK,QAAQ,IAAI,KAAK;AAEhD,aAAU,KAAK,KAAK,IAAI,KAAK;EAC9B;CACF"}
1
+ {"version":3,"file":"token-error-x_miDBP3.cjs","names":[],"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-error.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_error_exports = {};\n__export(token_error_exports, {\n VercelOidcTokenError: () => VercelOidcTokenError\n});\nmodule.exports = __toCommonJS(token_error_exports);\nclass VercelOidcTokenError extends Error {\n constructor(message, cause) {\n super(message);\n this.name = \"VercelOidcTokenError\";\n this.cause = cause;\n }\n toString() {\n if (this.cause) {\n return `${this.name}: ${this.message}: ${this.cause}`;\n }\n return `${this.name}: ${this.message}`;\n }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n VercelOidcTokenError\n});\n"],"x_google_ignoreList":[0],"mappings":";;;;CACA,IAAI,YAAY,OAAO;CACvB,IAAI,mBAAmB,OAAO;CAC9B,IAAI,oBAAoB,OAAO;CAC/B,IAAI,eAAe,OAAO,UAAU;CACpC,IAAI,WAAW,CAAC,QAAQ,QAAQ;AAC9B,OAAK,IAAI,QAAQ,IACf,WAAU,QAAQ,MAAM;GAAE,KAAK,IAAI;GAAO,YAAY;EAAM,EAAC;CAChE;CACD,IAAI,cAAc,CAAC,IAAI,MAAM,QAAQ,SAAS;AAC5C,MAAI,eAAe,SAAS,mBAAmB,SAAS,YACtD;QAAK,IAAI,OAAO,kBAAkB,KAAK,CACrC,MAAK,aAAa,KAAK,IAAI,IAAI,IAAI,QAAQ,OACzC,WAAU,IAAI,KAAK;IAAE,KAAK,MAAM,KAAK;IAAM,cAAc,OAAO,iBAAiB,MAAM,IAAI,KAAK,KAAK;GAAY,EAAC;EAAC;AAEzH,SAAO;CACR;CACD,IAAI,eAAe,CAAC,QAAQ,YAAY,UAAU,CAAE,GAAE,cAAc,EAAE,OAAO,KAAM,EAAC,EAAE,IAAI;CAC1F,IAAI,sBAAsB,CAAE;AAC5B,UAAS,qBAAqB,EAC5B,sBAAsB,MAAM,qBAC7B,EAAC;AACF,QAAO,UAAU,aAAa,oBAAoB;CAClD,IAAM,uBAAN,cAAmC,MAAM;EACvC,YAAY,SAAS,OAAO;AAC1B,SAAM,QAAQ;AACd,QAAK,OAAO;AACZ,QAAK,QAAQ;EACd;EACD,WAAW;AACT,OAAI,KAAK,MACP,WAAU,KAAK,KAAK,IAAI,KAAK,QAAQ,IAAI,KAAK;AAEhD,aAAU,KAAK,KAAK,IAAI,KAAK;EAC9B;CACF"}
@@ -1,4 +1,4 @@
1
1
  import "./token-error-Df8A7mgb.js";
2
- import { require_token_util } from "./token-util-CQ4Ghf_7.js";
2
+ import { require_token_util } from "./token-util-VkLmCUNV.js";
3
3
 
4
4
  export default require_token_util();
@@ -354,4 +354,4 @@ var require_token_util = __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.1
354
354
 
355
355
  //#endregion
356
356
  export { require_token_util };
357
- //# sourceMappingURL=token-util-CQ4Ghf_7.js.map
357
+ //# sourceMappingURL=token-util-VkLmCUNV.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"token-util-CQ4Ghf_7.js","names":["__create","__defProp","__getOwnPropDesc","__getOwnPropNames","__getProtoOf","__hasOwnProp","__export","__copyProps","__toESM","__toCommonJS","import_os","import_token_error","__create","__defProp","__getOwnPropDesc","__getOwnPropNames","__getProtoOf","__hasOwnProp","__export","__copyProps","__toESM","__toCommonJS","fs","path","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","__toCommonJS"],"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-io.js","../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/auth-config.js","../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/oauth.js","../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-util.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_io_exports = {};\n__export(token_io_exports, {\n findRootDir: () => findRootDir,\n getUserDataDir: () => getUserDataDir\n});\nmodule.exports = __toCommonJS(token_io_exports);\nvar import_path = __toESM(require(\"path\"));\nvar import_fs = __toESM(require(\"fs\"));\nvar import_os = __toESM(require(\"os\"));\nvar import_token_error = require(\"./token-error\");\nfunction findRootDir() {\n try {\n let dir = process.cwd();\n while (dir !== import_path.default.dirname(dir)) {\n const pkgPath = import_path.default.join(dir, \".vercel\");\n if (import_fs.default.existsSync(pkgPath)) {\n return dir;\n }\n dir = import_path.default.dirname(dir);\n }\n } catch (e) {\n throw new import_token_error.VercelOidcTokenError(\n \"Token refresh only supported in node server environments\"\n );\n }\n return null;\n}\nfunction getUserDataDir() {\n if (process.env.XDG_DATA_HOME) {\n return process.env.XDG_DATA_HOME;\n }\n switch (import_os.default.platform()) {\n case \"darwin\":\n return import_path.default.join(import_os.default.homedir(), \"Library/Application Support\");\n case \"linux\":\n return import_path.default.join(import_os.default.homedir(), \".local/share\");\n case \"win32\":\n if (process.env.LOCALAPPDATA) {\n return process.env.LOCALAPPDATA;\n }\n return null;\n default:\n return null;\n }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n findRootDir,\n getUserDataDir\n});\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar auth_config_exports = {};\n__export(auth_config_exports, {\n isValidAccessToken: () => isValidAccessToken,\n readAuthConfig: () => readAuthConfig,\n writeAuthConfig: () => writeAuthConfig\n});\nmodule.exports = __toCommonJS(auth_config_exports);\nvar fs = __toESM(require(\"fs\"));\nvar path = __toESM(require(\"path\"));\nvar import_token_util = require(\"./token-util\");\nfunction getAuthConfigPath() {\n const dataDir = (0, import_token_util.getVercelDataDir)();\n if (!dataDir) {\n throw new Error(\n `Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`\n );\n }\n return path.join(dataDir, \"auth.json\");\n}\nfunction readAuthConfig() {\n try {\n const authPath = getAuthConfigPath();\n if (!fs.existsSync(authPath)) {\n return null;\n }\n const content = fs.readFileSync(authPath, \"utf8\");\n if (!content) {\n return null;\n }\n return JSON.parse(content);\n } catch (error) {\n return null;\n }\n}\nfunction writeAuthConfig(config) {\n const authPath = getAuthConfigPath();\n const authDir = path.dirname(authPath);\n if (!fs.existsSync(authDir)) {\n fs.mkdirSync(authDir, { mode: 504, recursive: true });\n }\n fs.writeFileSync(authPath, JSON.stringify(config, null, 2), { mode: 384 });\n}\nfunction isValidAccessToken(authConfig) {\n if (!authConfig.token)\n return false;\n if (typeof authConfig.expiresAt !== \"number\")\n return true;\n const nowInSeconds = Math.floor(Date.now() / 1e3);\n return authConfig.expiresAt >= nowInSeconds;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n isValidAccessToken,\n readAuthConfig,\n writeAuthConfig\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar oauth_exports = {};\n__export(oauth_exports, {\n processTokenResponse: () => processTokenResponse,\n refreshTokenRequest: () => refreshTokenRequest\n});\nmodule.exports = __toCommonJS(oauth_exports);\nvar import_os = require(\"os\");\nconst VERCEL_ISSUER = \"https://vercel.com\";\nconst VERCEL_CLI_CLIENT_ID = \"cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp\";\nconst userAgent = `@vercel/oidc node-${process.version} ${(0, import_os.platform)()} (${(0, import_os.arch)()}) ${(0, import_os.hostname)()}`;\nlet _tokenEndpoint = null;\nasync function getTokenEndpoint() {\n if (_tokenEndpoint) {\n return _tokenEndpoint;\n }\n const discoveryUrl = `${VERCEL_ISSUER}/.well-known/openid-configuration`;\n const response = await fetch(discoveryUrl, {\n headers: { \"user-agent\": userAgent }\n });\n if (!response.ok) {\n throw new Error(\"Failed to discover OAuth endpoints\");\n }\n const metadata = await response.json();\n if (!metadata || typeof metadata.token_endpoint !== \"string\") {\n throw new Error(\"Invalid OAuth discovery response\");\n }\n const endpoint = metadata.token_endpoint;\n _tokenEndpoint = endpoint;\n return endpoint;\n}\nasync function refreshTokenRequest(options) {\n const tokenEndpoint = await getTokenEndpoint();\n return await fetch(tokenEndpoint, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"user-agent\": userAgent\n },\n body: new URLSearchParams({\n client_id: VERCEL_CLI_CLIENT_ID,\n grant_type: \"refresh_token\",\n ...options\n })\n });\n}\nasync function processTokenResponse(response) {\n const json = await response.json();\n if (!response.ok) {\n const errorMsg = typeof json === \"object\" && json && \"error\" in json ? String(json.error) : \"Token refresh failed\";\n return [new Error(errorMsg)];\n }\n if (typeof json !== \"object\" || json === null) {\n return [new Error(\"Invalid token response\")];\n }\n if (typeof json.access_token !== \"string\") {\n return [new Error(\"Missing access_token in response\")];\n }\n if (json.token_type !== \"Bearer\") {\n return [new Error(\"Invalid token_type in response\")];\n }\n if (typeof json.expires_in !== \"number\") {\n return [new Error(\"Missing expires_in in response\")];\n }\n return [null, json];\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n processTokenResponse,\n refreshTokenRequest\n});\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_util_exports = {};\n__export(token_util_exports, {\n assertVercelOidcTokenResponse: () => assertVercelOidcTokenResponse,\n findProjectInfo: () => findProjectInfo,\n getTokenPayload: () => getTokenPayload,\n getVercelCliToken: () => getVercelCliToken,\n getVercelDataDir: () => getVercelDataDir,\n getVercelOidcToken: () => getVercelOidcToken,\n isExpired: () => isExpired,\n loadToken: () => loadToken,\n saveToken: () => saveToken\n});\nmodule.exports = __toCommonJS(token_util_exports);\nvar path = __toESM(require(\"path\"));\nvar fs = __toESM(require(\"fs\"));\nvar import_token_error = require(\"./token-error\");\nvar import_token_io = require(\"./token-io\");\nvar import_auth_config = require(\"./auth-config\");\nvar import_oauth = require(\"./oauth\");\nfunction getVercelDataDir() {\n const vercelFolder = \"com.vercel.cli\";\n const dataDir = (0, import_token_io.getUserDataDir)();\n if (!dataDir) {\n return null;\n }\n return path.join(dataDir, vercelFolder);\n}\nasync function getVercelCliToken() {\n const authConfig = (0, import_auth_config.readAuthConfig)();\n if (!authConfig) {\n return null;\n }\n if ((0, import_auth_config.isValidAccessToken)(authConfig)) {\n return authConfig.token || null;\n }\n if (!authConfig.refreshToken) {\n (0, import_auth_config.writeAuthConfig)({});\n return null;\n }\n try {\n const tokenResponse = await (0, import_oauth.refreshTokenRequest)({\n refresh_token: authConfig.refreshToken\n });\n const [tokensError, tokens] = await (0, import_oauth.processTokenResponse)(tokenResponse);\n if (tokensError || !tokens) {\n (0, import_auth_config.writeAuthConfig)({});\n return null;\n }\n const updatedConfig = {\n token: tokens.access_token,\n expiresAt: Math.floor(Date.now() / 1e3) + tokens.expires_in\n };\n if (tokens.refresh_token) {\n updatedConfig.refreshToken = tokens.refresh_token;\n }\n (0, import_auth_config.writeAuthConfig)(updatedConfig);\n return updatedConfig.token ?? null;\n } catch (error) {\n (0, import_auth_config.writeAuthConfig)({});\n return null;\n }\n}\nasync function getVercelOidcToken(authToken, projectId, teamId) {\n const url = `https://api.vercel.com/v1/projects/${projectId}/token?source=vercel-oidc-refresh${teamId ? `&teamId=${teamId}` : \"\"}`;\n const res = await fetch(url, {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${authToken}`\n }\n });\n if (!res.ok) {\n throw new import_token_error.VercelOidcTokenError(\n `Failed to refresh OIDC token: ${res.statusText}`\n );\n }\n const tokenRes = await res.json();\n assertVercelOidcTokenResponse(tokenRes);\n return tokenRes;\n}\nfunction assertVercelOidcTokenResponse(res) {\n if (!res || typeof res !== \"object\") {\n throw new TypeError(\n \"Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again\"\n );\n }\n if (!(\"token\" in res) || typeof res.token !== \"string\") {\n throw new TypeError(\n \"Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again\"\n );\n }\n}\nfunction findProjectInfo() {\n const dir = (0, import_token_io.findRootDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\n \"Unable to find project root directory. Have you linked your project with `vc link?`\"\n );\n }\n const prjPath = path.join(dir, \".vercel\", \"project.json\");\n if (!fs.existsSync(prjPath)) {\n throw new import_token_error.VercelOidcTokenError(\n \"project.json not found, have you linked your project with `vc link?`\"\n );\n }\n const prj = JSON.parse(fs.readFileSync(prjPath, \"utf8\"));\n if (typeof prj.projectId !== \"string\" && typeof prj.orgId !== \"string\") {\n throw new TypeError(\n \"Expected a string-valued projectId property. Try running `vc link` to re-link your project.\"\n );\n }\n return { projectId: prj.projectId, teamId: prj.orgId };\n}\nfunction saveToken(token, projectId) {\n const dir = (0, import_token_io.getUserDataDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\n \"Unable to find user data directory. Please reach out to Vercel support.\"\n );\n }\n const tokenPath = path.join(dir, \"com.vercel.token\", `${projectId}.json`);\n const tokenJson = JSON.stringify(token);\n fs.mkdirSync(path.dirname(tokenPath), { mode: 504, recursive: true });\n fs.writeFileSync(tokenPath, tokenJson);\n fs.chmodSync(tokenPath, 432);\n return;\n}\nfunction loadToken(projectId) {\n const dir = (0, import_token_io.getUserDataDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\n \"Unable to find user data directory. Please reach out to Vercel support.\"\n );\n }\n const tokenPath = path.join(dir, \"com.vercel.token\", `${projectId}.json`);\n if (!fs.existsSync(tokenPath)) {\n return null;\n }\n const token = JSON.parse(fs.readFileSync(tokenPath, \"utf8\"));\n assertVercelOidcTokenResponse(token);\n return token;\n}\nfunction getTokenPayload(token) {\n const tokenParts = token.split(\".\");\n if (tokenParts.length !== 3) {\n throw new import_token_error.VercelOidcTokenError(\n \"Invalid token. Please run `vc env pull` and try again\"\n );\n }\n const base64 = tokenParts[1].replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padded = base64.padEnd(\n base64.length + (4 - base64.length % 4) % 4,\n \"=\"\n );\n return JSON.parse(Buffer.from(padded, \"base64\").toString(\"utf8\"));\n}\nfunction isExpired(token) {\n return token.exp * 1e3 < Date.now();\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n assertVercelOidcTokenResponse,\n findProjectInfo,\n getTokenPayload,\n getVercelCliToken,\n getVercelDataDir,\n getVercelOidcToken,\n isExpired,\n loadToken,\n saveToken\n});\n"],"x_google_ignoreList":[0,1,2,3],"mappings":";;;;CACA,IAAIA,aAAW,OAAO;CACtB,IAAIC,cAAY,OAAO;CACvB,IAAIC,qBAAmB,OAAO;CAC9B,IAAIC,sBAAoB,OAAO;CAC/B,IAAIC,iBAAe,OAAO;CAC1B,IAAIC,iBAAe,OAAO,UAAU;CACpC,IAAIC,aAAW,CAAC,QAAQ,QAAQ;AAC9B,OAAK,IAAI,QAAQ,IACf,aAAU,QAAQ,MAAM;GAAE,KAAK,IAAI;GAAO,YAAY;EAAM,EAAC;CAChE;CACD,IAAIC,gBAAc,CAAC,IAAI,MAAM,QAAQ,SAAS;AAC5C,MAAI,eAAe,SAAS,mBAAmB,SAAS,YACtD;QAAK,IAAI,OAAO,oBAAkB,KAAK,CACrC,MAAK,eAAa,KAAK,IAAI,IAAI,IAAI,QAAQ,OACzC,aAAU,IAAI,KAAK;IAAE,KAAK,MAAM,KAAK;IAAM,cAAc,OAAO,mBAAiB,MA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nPropNames","__getProtoOf","__hasOwnProp","__export","__copyProps","__toESM","__toCommonJS","import_os","import_token_error","__create","__defProp","__getOwnPropDesc","__getOwnPropNames","__getProtoOf","__hasOwnProp","__export","__copyProps","__toESM","__toCommonJS","fs","path","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","__toCommonJS"],"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-io.js","../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/auth-config.js","../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/oauth.js","../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-util.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_io_exports = {};\n__export(token_io_exports, {\n findRootDir: () => findRootDir,\n getUserDataDir: () => getUserDataDir\n});\nmodule.exports = __toCommonJS(token_io_exports);\nvar import_path = __toESM(require(\"path\"));\nvar import_fs = __toESM(require(\"fs\"));\nvar import_os = __toESM(require(\"os\"));\nvar import_token_error = require(\"./token-error\");\nfunction findRootDir() {\n try {\n let dir = process.cwd();\n while (dir !== import_path.default.dirname(dir)) {\n const pkgPath = import_path.default.join(dir, \".vercel\");\n if (import_fs.default.existsSync(pkgPath)) {\n return dir;\n }\n dir = import_path.default.dirname(dir);\n }\n } catch (e) {\n throw new import_token_error.VercelOidcTokenError(\n \"Token refresh only supported in node server environments\"\n );\n }\n return null;\n}\nfunction getUserDataDir() {\n if (process.env.XDG_DATA_HOME) {\n return process.env.XDG_DATA_HOME;\n }\n switch (import_os.default.platform()) {\n case \"darwin\":\n return import_path.default.join(import_os.default.homedir(), \"Library/Application Support\");\n case \"linux\":\n return import_path.default.join(import_os.default.homedir(), \".local/share\");\n case \"win32\":\n if (process.env.LOCALAPPDATA) {\n return process.env.LOCALAPPDATA;\n }\n return null;\n default:\n return null;\n }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n findRootDir,\n getUserDataDir\n});\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar auth_config_exports = {};\n__export(auth_config_exports, {\n isValidAccessToken: () => isValidAccessToken,\n readAuthConfig: () => readAuthConfig,\n writeAuthConfig: () => writeAuthConfig\n});\nmodule.exports = __toCommonJS(auth_config_exports);\nvar fs = __toESM(require(\"fs\"));\nvar path = __toESM(require(\"path\"));\nvar import_token_util = require(\"./token-util\");\nfunction getAuthConfigPath() {\n const dataDir = (0, import_token_util.getVercelDataDir)();\n if (!dataDir) {\n throw new Error(\n `Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`\n );\n }\n return path.join(dataDir, \"auth.json\");\n}\nfunction readAuthConfig() {\n try {\n const authPath = getAuthConfigPath();\n if (!fs.existsSync(authPath)) {\n return null;\n }\n const content = fs.readFileSync(authPath, \"utf8\");\n if (!content) {\n return null;\n }\n return JSON.parse(content);\n } catch (error) {\n return null;\n }\n}\nfunction writeAuthConfig(config) {\n const authPath = getAuthConfigPath();\n const authDir = path.dirname(authPath);\n if (!fs.existsSync(authDir)) {\n fs.mkdirSync(authDir, { mode: 504, recursive: true });\n }\n fs.writeFileSync(authPath, JSON.stringify(config, null, 2), { mode: 384 });\n}\nfunction isValidAccessToken(authConfig) {\n if (!authConfig.token)\n return false;\n if (typeof authConfig.expiresAt !== \"number\")\n return true;\n const nowInSeconds = Math.floor(Date.now() / 1e3);\n return authConfig.expiresAt >= nowInSeconds;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n isValidAccessToken,\n readAuthConfig,\n writeAuthConfig\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar oauth_exports = {};\n__export(oauth_exports, {\n processTokenResponse: () => processTokenResponse,\n refreshTokenRequest: () => refreshTokenRequest\n});\nmodule.exports = __toCommonJS(oauth_exports);\nvar import_os = require(\"os\");\nconst VERCEL_ISSUER = \"https://vercel.com\";\nconst VERCEL_CLI_CLIENT_ID = \"cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp\";\nconst userAgent = `@vercel/oidc node-${process.version} ${(0, import_os.platform)()} (${(0, import_os.arch)()}) ${(0, import_os.hostname)()}`;\nlet _tokenEndpoint = null;\nasync function getTokenEndpoint() {\n if (_tokenEndpoint) {\n return _tokenEndpoint;\n }\n const discoveryUrl = `${VERCEL_ISSUER}/.well-known/openid-configuration`;\n const response = await fetch(discoveryUrl, {\n headers: { \"user-agent\": userAgent }\n });\n if (!response.ok) {\n throw new Error(\"Failed to discover OAuth endpoints\");\n }\n const metadata = await response.json();\n if (!metadata || typeof metadata.token_endpoint !== \"string\") {\n throw new Error(\"Invalid OAuth discovery response\");\n }\n const endpoint = metadata.token_endpoint;\n _tokenEndpoint = endpoint;\n return endpoint;\n}\nasync function refreshTokenRequest(options) {\n const tokenEndpoint = await getTokenEndpoint();\n return await fetch(tokenEndpoint, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"user-agent\": userAgent\n },\n body: new URLSearchParams({\n client_id: VERCEL_CLI_CLIENT_ID,\n grant_type: \"refresh_token\",\n ...options\n })\n });\n}\nasync function processTokenResponse(response) {\n const json = await response.json();\n if (!response.ok) {\n const errorMsg = typeof json === \"object\" && json && \"error\" in json ? String(json.error) : \"Token refresh failed\";\n return [new Error(errorMsg)];\n }\n if (typeof json !== \"object\" || json === null) {\n return [new Error(\"Invalid token response\")];\n }\n if (typeof json.access_token !== \"string\") {\n return [new Error(\"Missing access_token in response\")];\n }\n if (json.token_type !== \"Bearer\") {\n return [new Error(\"Invalid token_type in response\")];\n }\n if (typeof json.expires_in !== \"number\") {\n return [new Error(\"Missing expires_in in response\")];\n }\n return [null, json];\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n processTokenResponse,\n refreshTokenRequest\n});\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_util_exports = {};\n__export(token_util_exports, {\n assertVercelOidcTokenResponse: () => assertVercelOidcTokenResponse,\n findProjectInfo: () => findProjectInfo,\n getTokenPayload: () => getTokenPayload,\n getVercelCliToken: () => getVercelCliToken,\n getVercelDataDir: () => getVercelDataDir,\n getVercelOidcToken: () => getVercelOidcToken,\n isExpired: () => isExpired,\n loadToken: () => loadToken,\n saveToken: () => saveToken\n});\nmodule.exports = __toCommonJS(token_util_exports);\nvar path = __toESM(require(\"path\"));\nvar fs = __toESM(require(\"fs\"));\nvar import_token_error = require(\"./token-error\");\nvar import_token_io = require(\"./token-io\");\nvar import_auth_config = require(\"./auth-config\");\nvar import_oauth = require(\"./oauth\");\nfunction getVercelDataDir() {\n const vercelFolder = \"com.vercel.cli\";\n const dataDir = (0, import_token_io.getUserDataDir)();\n if (!dataDir) {\n return null;\n }\n return path.join(dataDir, vercelFolder);\n}\nasync function getVercelCliToken() {\n const authConfig = (0, import_auth_config.readAuthConfig)();\n if (!authConfig) {\n return null;\n }\n if ((0, import_auth_config.isValidAccessToken)(authConfig)) {\n return authConfig.token || null;\n }\n if (!authConfig.refreshToken) {\n (0, import_auth_config.writeAuthConfig)({});\n return null;\n }\n try {\n const tokenResponse = await (0, import_oauth.refreshTokenRequest)({\n refresh_token: authConfig.refreshToken\n });\n const [tokensError, tokens] = await (0, import_oauth.processTokenResponse)(tokenResponse);\n if (tokensError || !tokens) {\n (0, import_auth_config.writeAuthConfig)({});\n return null;\n }\n const updatedConfig = {\n token: tokens.access_token,\n expiresAt: Math.floor(Date.now() / 1e3) + tokens.expires_in\n };\n if (tokens.refresh_token) {\n updatedConfig.refreshToken = tokens.refresh_token;\n }\n (0, import_auth_config.writeAuthConfig)(updatedConfig);\n return updatedConfig.token ?? null;\n } catch (error) {\n (0, import_auth_config.writeAuthConfig)({});\n return null;\n }\n}\nasync function getVercelOidcToken(authToken, projectId, teamId) {\n const url = `https://api.vercel.com/v1/projects/${projectId}/token?source=vercel-oidc-refresh${teamId ? `&teamId=${teamId}` : \"\"}`;\n const res = await fetch(url, {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${authToken}`\n }\n });\n if (!res.ok) {\n throw new import_token_error.VercelOidcTokenError(\n `Failed to refresh OIDC token: ${res.statusText}`\n );\n }\n const tokenRes = await res.json();\n assertVercelOidcTokenResponse(tokenRes);\n return tokenRes;\n}\nfunction assertVercelOidcTokenResponse(res) {\n if (!res || typeof res !== \"object\") {\n throw new TypeError(\n \"Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again\"\n );\n }\n if (!(\"token\" in res) || typeof res.token !== \"string\") {\n throw new TypeError(\n \"Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again\"\n );\n }\n}\nfunction findProjectInfo() {\n const dir = (0, import_token_io.findRootDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\n \"Unable to find project root directory. Have you linked your project with `vc link?`\"\n );\n }\n const prjPath = path.join(dir, \".vercel\", \"project.json\");\n if (!fs.existsSync(prjPath)) {\n throw new import_token_error.VercelOidcTokenError(\n \"project.json not found, have you linked your project with `vc link?`\"\n );\n }\n const prj = JSON.parse(fs.readFileSync(prjPath, \"utf8\"));\n if (typeof prj.projectId !== \"string\" && typeof prj.orgId !== \"string\") {\n throw new TypeError(\n \"Expected a string-valued projectId property. Try running `vc link` to re-link your project.\"\n );\n }\n return { projectId: prj.projectId, teamId: prj.orgId };\n}\nfunction saveToken(token, projectId) {\n const dir = (0, import_token_io.getUserDataDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\n \"Unable to find user data directory. Please reach out to Vercel support.\"\n );\n }\n const tokenPath = path.join(dir, \"com.vercel.token\", `${projectId}.json`);\n const tokenJson = JSON.stringify(token);\n fs.mkdirSync(path.dirname(tokenPath), { mode: 504, recursive: true });\n fs.writeFileSync(tokenPath, tokenJson);\n fs.chmodSync(tokenPath, 432);\n return;\n}\nfunction loadToken(projectId) {\n const dir = (0, import_token_io.getUserDataDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\n \"Unable to find user data directory. Please reach out to Vercel support.\"\n );\n }\n const tokenPath = path.join(dir, \"com.vercel.token\", `${projectId}.json`);\n if (!fs.existsSync(tokenPath)) {\n return null;\n }\n const token = JSON.parse(fs.readFileSync(tokenPath, \"utf8\"));\n assertVercelOidcTokenResponse(token);\n return token;\n}\nfunction getTokenPayload(token) {\n const tokenParts = token.split(\".\");\n if (tokenParts.length !== 3) {\n throw new import_token_error.VercelOidcTokenError(\n \"Invalid token. Please run `vc env pull` and try again\"\n );\n }\n const base64 = tokenParts[1].replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padded = base64.padEnd(\n base64.length + (4 - base64.length % 4) % 4,\n \"=\"\n );\n return JSON.parse(Buffer.from(padded, \"base64\").toString(\"utf8\"));\n}\nfunction isExpired(token) {\n return token.exp * 1e3 < Date.now();\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n assertVercelOidcTokenResponse,\n findProjectInfo,\n getTokenPayload,\n getVercelCliToken,\n getVercelDataDir,\n getVercelOidcToken,\n isExpired,\n loadToken,\n saveToken\n});\n"],"x_google_ignoreList":[0,1,2,3],"mappings":";;;;CACA,IAAIA,aAAW,OAAO;CACtB,IAAIC,cAAY,OAAO;CACvB,IAAIC,qBAAmB,OAAO;CAC9B,IAAIC,sBAAoB,OAAO;CAC/B,IAAIC,iBAAe,OAAO;CAC1B,IAAIC,iBAAe,OAAO,UAAU;CACpC,IAAIC,aAAW,CAAC,QAAQ,QAAQ;AAC9B,OAAK,IAAI,QAAQ,IACf,aAAU,QAAQ,MAAM;GAAE,KAAK,IAAI;GAAO,YAAY;EAAM,EAAC;CAChE;CACD,IAAIC,gBAAc,CAAC,IAAI,MAAM,QAAQ,SAAS;AAC5C,M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,OAAO,KAAK,QAAQ,SAAS,CAAC,SAAS,OAAO,CAAC;CAClE;CACD,SAAS,UAAU,OAAO;AACxB,SAAO,MAAM,MAAM,MAAM,KAAK,KAAK;CACpC"}
@@ -1,5 +1,5 @@
1
- require('./token-error-BCFB3iKM.cjs');
2
- const require_token_util$1 = require('./token-util-CMaRPlqM.cjs');
1
+ require('./token-error-x_miDBP3.cjs');
2
+ const require_token_util$1 = require('./token-util-oe0G9a-s.cjs');
3
3
 
4
4
  Object.defineProperty(exports, 'default', {
5
5
  enumerable: true,
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-Cv9WC9bY.cjs');
2
- const require_token_error$1 = require('./token-error-BCFB3iKM.cjs');
2
+ const require_token_error$1 = require('./token-error-x_miDBP3.cjs');
3
3
 
4
4
  //#region ../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-io.js
5
5
  var require_token_io = require_chunk.__commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-io.js"(exports, module) {
@@ -360,4 +360,4 @@ Object.defineProperty(exports, 'require_token_util', {
360
360
  return require_token_util;
361
361
  }
362
362
  });
363
- //# sourceMappingURL=token-util-CMaRPlqM.cjs.map
363
+ //# sourceMappingURL=token-util-oe0G9a-s.cjs.map