@codemation/core-nodes-ocr 0.2.5 → 0.2.7

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 (42) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/codemation.plugin.cjs +1153 -14470
  3. package/dist/codemation.plugin.cjs.map +1 -1
  4. package/dist/codemation.plugin.d.cts +1 -1
  5. package/dist/codemation.plugin.d.ts +1 -1
  6. package/dist/codemation.plugin.js +1193 -14509
  7. package/dist/codemation.plugin.js.map +1 -1
  8. package/dist/dist-BDgdLisG.js +5378 -0
  9. package/dist/dist-BDgdLisG.js.map +1 -0
  10. package/dist/dist-BYInIjS8.js +2246 -0
  11. package/dist/dist-BYInIjS8.js.map +1 -0
  12. package/dist/dist-BlD4pqf2.cjs +4358 -0
  13. package/dist/dist-BlD4pqf2.cjs.map +1 -0
  14. package/dist/dist-CUcwHflE.cjs +14870 -0
  15. package/dist/dist-CUcwHflE.cjs.map +1 -0
  16. package/dist/dist-DB2xMXXm.cjs +5380 -0
  17. package/dist/dist-DB2xMXXm.cjs.map +1 -0
  18. package/dist/dist-DBYFkhSG.js +14739 -0
  19. package/dist/dist-DBYFkhSG.js.map +1 -0
  20. package/dist/dist-DZfaPW8T.js +4356 -0
  21. package/dist/dist-DZfaPW8T.js.map +1 -0
  22. package/dist/dist-Zdvm5pqX.cjs +2464 -0
  23. package/dist/dist-Zdvm5pqX.cjs.map +1 -0
  24. package/dist/{index-DF2ht42F.d.ts → index-RNoZqCPr.d.ts} +30 -4
  25. package/dist/index.d.cts +23 -4
  26. package/dist/index.d.ts +1 -1
  27. package/dist/metadata.json +1 -1
  28. package/dist/{runtimeTypes-WCvsnJMY.d.cts → runtimeTypes-B6RO-Yki.d.cts} +8 -1
  29. package/dist/{token-CgF09kyP.cjs → token-Cbd8b88n.cjs} +2 -2
  30. package/dist/{token-CgF09kyP.cjs.map → token-Cbd8b88n.cjs.map} +1 -1
  31. package/dist/{token-CIu4PqRI.js → token-P-r3QR1d.js} +2 -2
  32. package/dist/{token-CIu4PqRI.js.map → token-P-r3QR1d.js.map} +1 -1
  33. package/dist/{token-util-B2kSJtEV.cjs → token-util-B2Ofk2zk.cjs} +77 -77
  34. package/dist/token-util-B2Ofk2zk.cjs.map +1 -0
  35. package/dist/{token-util-Lr5foG4r.cjs → token-util-CT85hbGe.cjs} +1 -1
  36. package/dist/{token-util-EUxa8JtH.js → token-util-CfNdwRXi.js} +77 -77
  37. package/dist/token-util-CfNdwRXi.js.map +1 -0
  38. package/dist/token-util-rTxWuZPt.js +5 -0
  39. package/package.json +2 -2
  40. package/dist/token-util-B2kSJtEV.cjs.map +0 -1
  41. package/dist/token-util-BsR6OYHz.js +0 -5
  42. package/dist/token-util-EUxa8JtH.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"token-CIu4PqRI.js","names":[],"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.2.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(options) {\n let projectId = options?.project;\n let teamId = options?.team;\n if (!projectId && !teamId) {\n const projectInfo = (0, import_token_util.findProjectInfo)();\n projectId = projectInfo.projectId;\n teamId = projectInfo.teamId;\n } else if (!projectId || !teamId) {\n const projectInfo = (0, import_token_util.findProjectInfo)();\n projectId = projectId ?? projectInfo.projectId;\n teamId = teamId ?? projectInfo.teamId;\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`\"\n );\n }\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token), options?.expirationBufferMs)) {\n const authToken = await (0, import_token_util.getVercelToken)({\n expirationBufferMs: options?.expirationBufferMs\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,YAAY,QAAQ,QAAQ;AAC9B,OAAK,IAAI,QAAQ,IACf,WAAU,QAAQ,MAAM;GAAE,KAAK,IAAI;GAAO,YAAY;GAAM,CAAC;;CAEjE,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;AAC5C,MAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YACtD;QAAK,IAAI,OAAO,kBAAkB,KAAK,CACrC,KAAI,CAAC,aAAa,KAAK,IAAI,IAAI,IAAI,QAAQ,OACzC,WAAU,IAAI,KAAK;IAAE,WAAW,KAAK;IAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,IAAI,KAAK,KAAK;IAAY,CAAC;;AAExH,SAAO;;CAET,IAAI,gBAAgB,QAAQ,YAAY,UAAU,EAAE,EAAE,cAAc,EAAE,OAAO,MAAM,CAAC,EAAE,IAAI;CAC1F,IAAI,gBAAgB,EAAE;AACtB,UAAS,eAAe,EACtB,oBAAoB,cACrB,CAAC;AACF,QAAO,UAAU,aAAa,cAAc;CAC5C,IAAI;CACJ,IAAI;CACJ,eAAe,aAAa,SAAS;EACnC,IAAI,YAAY,SAAS;EACzB,IAAI,SAAS,SAAS;AACtB,MAAI,CAAC,aAAa,CAAC,QAAQ;GACzB,MAAM,eAAe,GAAG,kBAAkB,kBAAkB;AAC5D,eAAY,YAAY;AACxB,YAAS,YAAY;aACZ,CAAC,aAAa,CAAC,QAAQ;GAChC,MAAM,eAAe,GAAG,kBAAkB,kBAAkB;AAC5D,eAAY,aAAa,YAAY;AACrC,YAAS,UAAU,YAAY;;AAEjC,MAAI,CAAC,UACH,OAAM,IAAI,mBAAmB,qBAC3B,iGACD;EAEH,IAAI,cAAc,GAAG,kBAAkB,WAAW,UAAU;AAC5D,MAAI,CAAC,eAAe,GAAG,kBAAkB,YAAY,GAAG,kBAAkB,iBAAiB,WAAW,MAAM,EAAE,SAAS,mBAAmB,EAAE;GAC1I,MAAM,YAAY,OAAO,GAAG,kBAAkB,gBAAgB,EAC5D,oBAAoB,SAAS,oBAC9B,CAAC;AACF,gBAAa,OAAO,GAAG,kBAAkB,oBAAoB,WAAW,WAAW,OAAO;AAC1F,OAAI,CAAC,WACH,OAAM,IAAI,mBAAmB,qBAAqB,+BAA+B;AAEnF,IAAC,GAAG,kBAAkB,WAAW,YAAY,UAAU;;AAEzD,UAAQ,IAAI,oBAAoB,WAAW"}
1
+ {"version":3,"file":"token-P-r3QR1d.js","names":[],"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.2.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(options) {\n let projectId = options?.project;\n let teamId = options?.team;\n if (!projectId && !teamId) {\n const projectInfo = (0, import_token_util.findProjectInfo)();\n projectId = projectInfo.projectId;\n teamId = projectInfo.teamId;\n } else if (!projectId || !teamId) {\n const projectInfo = (0, import_token_util.findProjectInfo)();\n projectId = projectId ?? projectInfo.projectId;\n teamId = teamId ?? projectInfo.teamId;\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`\"\n );\n }\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token), options?.expirationBufferMs)) {\n const authToken = await (0, import_token_util.getVercelToken)({\n expirationBufferMs: options?.expirationBufferMs\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,YAAY,QAAQ,QAAQ;AAC9B,OAAK,IAAI,QAAQ,IACf,WAAU,QAAQ,MAAM;GAAE,KAAK,IAAI;GAAO,YAAY;GAAM,CAAC;;CAEjE,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;AAC5C,MAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YACtD;QAAK,IAAI,OAAO,kBAAkB,KAAK,CACrC,KAAI,CAAC,aAAa,KAAK,IAAI,IAAI,IAAI,QAAQ,OACzC,WAAU,IAAI,KAAK;IAAE,WAAW,KAAK;IAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,IAAI,KAAK,KAAK;IAAY,CAAC;;AAExH,SAAO;;CAET,IAAI,gBAAgB,QAAQ,YAAY,UAAU,EAAE,EAAE,cAAc,EAAE,OAAO,MAAM,CAAC,EAAE,IAAI;CAC1F,IAAI,gBAAgB,EAAE;AACtB,UAAS,eAAe,EACtB,oBAAoB,cACrB,CAAC;AACF,QAAO,UAAU,aAAa,cAAc;CAC5C,IAAI;CACJ,IAAI;CACJ,eAAe,aAAa,SAAS;EACnC,IAAI,YAAY,SAAS;EACzB,IAAI,SAAS,SAAS;AACtB,MAAI,CAAC,aAAa,CAAC,QAAQ;GACzB,MAAM,eAAe,GAAG,kBAAkB,kBAAkB;AAC5D,eAAY,YAAY;AACxB,YAAS,YAAY;aACZ,CAAC,aAAa,CAAC,QAAQ;GAChC,MAAM,eAAe,GAAG,kBAAkB,kBAAkB;AAC5D,eAAY,aAAa,YAAY;AACrC,YAAS,UAAU,YAAY;;AAEjC,MAAI,CAAC,UACH,OAAM,IAAI,mBAAmB,qBAC3B,iGACD;EAEH,IAAI,cAAc,GAAG,kBAAkB,WAAW,UAAU;AAC5D,MAAI,CAAC,eAAe,GAAG,kBAAkB,YAAY,GAAG,kBAAkB,iBAAiB,WAAW,MAAM,EAAE,SAAS,mBAAmB,EAAE;GAC1I,MAAM,YAAY,OAAO,GAAG,kBAAkB,gBAAgB,EAC5D,oBAAoB,SAAS,oBAC9B,CAAC;AACF,gBAAa,OAAO,GAAG,kBAAkB,oBAAoB,WAAW,WAAW,OAAO;AAC1F,OAAI,CAAC,WACH,OAAM,IAAI,mBAAmB,qBAAqB,+BAA+B;AAEnF,IAAC,GAAG,kBAAkB,WAAW,YAAY,UAAU;;AAEzD,UAAQ,IAAI,oBAAoB,WAAW"}
@@ -39,11 +39,13 @@ var require_token_error = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
39
39
  }) });
40
40
 
41
41
  //#endregion
42
- //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-errors.js
43
- var require_auth_errors = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-errors.js": ((exports, module) => {
42
+ //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-io.js
43
+ var require_token_io = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-io.js": ((exports, module) => {
44
+ var __create$2 = Object.create;
44
45
  var __defProp$4 = Object.defineProperty;
45
46
  var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
46
47
  var __getOwnPropNames$4 = Object.getOwnPropertyNames;
48
+ var __getProtoOf$2 = Object.getPrototypeOf;
47
49
  var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
48
50
  var __export$4 = (target, all) => {
49
51
  for (var name in all) __defProp$4(target, name, {
@@ -60,62 +62,17 @@ var require_auth_errors = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
60
62
  }
61
63
  return to;
62
64
  };
63
- var __toCommonJS$4 = (mod) => __copyProps$4(__defProp$4({}, "__esModule", { value: true }), mod);
64
- var auth_errors_exports = {};
65
- __export$4(auth_errors_exports, {
66
- AccessTokenMissingError: () => AccessTokenMissingError,
67
- RefreshAccessTokenFailedError: () => RefreshAccessTokenFailedError
68
- });
69
- module.exports = __toCommonJS$4(auth_errors_exports);
70
- var AccessTokenMissingError = class extends Error {
71
- constructor() {
72
- super("No authentication found. Please log in with the Vercel CLI (vercel login).");
73
- this.name = "AccessTokenMissingError";
74
- }
75
- };
76
- var RefreshAccessTokenFailedError = class extends Error {
77
- constructor(cause) {
78
- super("Failed to refresh authentication token.", { cause });
79
- this.name = "RefreshAccessTokenFailedError";
80
- }
81
- };
82
- }) });
83
-
84
- //#endregion
85
- //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-io.js
86
- var require_token_io = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-io.js": ((exports, module) => {
87
- var __create$2 = Object.create;
88
- var __defProp$3 = Object.defineProperty;
89
- var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
90
- var __getOwnPropNames$3 = Object.getOwnPropertyNames;
91
- var __getProtoOf$2 = Object.getPrototypeOf;
92
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
93
- var __export$3 = (target, all) => {
94
- for (var name in all) __defProp$3(target, name, {
95
- get: all[name],
96
- enumerable: true
97
- });
98
- };
99
- var __copyProps$3 = (to, from, except, desc) => {
100
- if (from && typeof from === "object" || typeof from === "function") {
101
- for (let key of __getOwnPropNames$3(from)) if (!__hasOwnProp$3.call(to, key) && key !== except) __defProp$3(to, key, {
102
- get: () => from[key],
103
- enumerable: !(desc = __getOwnPropDesc$3(from, key)) || desc.enumerable
104
- });
105
- }
106
- return to;
107
- };
108
- var __toESM$2 = (mod, isNodeMode, target) => (target = mod != null ? __create$2(__getProtoOf$2(mod)) : {}, __copyProps$3(isNodeMode || !mod || !mod.__esModule ? __defProp$3(target, "default", {
65
+ var __toESM$2 = (mod, isNodeMode, target) => (target = mod != null ? __create$2(__getProtoOf$2(mod)) : {}, __copyProps$4(isNodeMode || !mod || !mod.__esModule ? __defProp$4(target, "default", {
109
66
  value: mod,
110
67
  enumerable: true
111
68
  }) : target, mod));
112
- var __toCommonJS$3 = (mod) => __copyProps$3(__defProp$3({}, "__esModule", { value: true }), mod);
69
+ var __toCommonJS$4 = (mod) => __copyProps$4(__defProp$4({}, "__esModule", { value: true }), mod);
113
70
  var token_io_exports = {};
114
- __export$3(token_io_exports, {
71
+ __export$4(token_io_exports, {
115
72
  findRootDir: () => findRootDir,
116
73
  getUserDataDir: () => getUserDataDir
117
74
  });
118
- module.exports = __toCommonJS$3(token_io_exports);
75
+ module.exports = __toCommonJS$4(token_io_exports);
119
76
  var import_path = __toESM$2(require("path"));
120
77
  var import_fs = __toESM$2(require("fs"));
121
78
  var import_os$1 = __toESM$2(require("os"));
@@ -150,38 +107,38 @@ var require_token_io = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
150
107
  //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-config.js
151
108
  var require_auth_config = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-config.js": ((exports, module) => {
152
109
  var __create$1 = Object.create;
153
- var __defProp$2 = Object.defineProperty;
154
- var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
155
- var __getOwnPropNames$2 = Object.getOwnPropertyNames;
110
+ var __defProp$3 = Object.defineProperty;
111
+ var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
112
+ var __getOwnPropNames$3 = Object.getOwnPropertyNames;
156
113
  var __getProtoOf$1 = Object.getPrototypeOf;
157
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
158
- var __export$2 = (target, all) => {
159
- for (var name in all) __defProp$2(target, name, {
114
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
115
+ var __export$3 = (target, all) => {
116
+ for (var name in all) __defProp$3(target, name, {
160
117
  get: all[name],
161
118
  enumerable: true
162
119
  });
163
120
  };
164
- var __copyProps$2 = (to, from, except, desc) => {
121
+ var __copyProps$3 = (to, from, except, desc) => {
165
122
  if (from && typeof from === "object" || typeof from === "function") {
166
- for (let key of __getOwnPropNames$2(from)) if (!__hasOwnProp$2.call(to, key) && key !== except) __defProp$2(to, key, {
123
+ for (let key of __getOwnPropNames$3(from)) if (!__hasOwnProp$3.call(to, key) && key !== except) __defProp$3(to, key, {
167
124
  get: () => from[key],
168
- enumerable: !(desc = __getOwnPropDesc$2(from, key)) || desc.enumerable
125
+ enumerable: !(desc = __getOwnPropDesc$3(from, key)) || desc.enumerable
169
126
  });
170
127
  }
171
128
  return to;
172
129
  };
173
- var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$2(isNodeMode || !mod || !mod.__esModule ? __defProp$2(target, "default", {
130
+ var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$3(isNodeMode || !mod || !mod.__esModule ? __defProp$3(target, "default", {
174
131
  value: mod,
175
132
  enumerable: true
176
133
  }) : target, mod));
177
- var __toCommonJS$2 = (mod) => __copyProps$2(__defProp$2({}, "__esModule", { value: true }), mod);
134
+ var __toCommonJS$3 = (mod) => __copyProps$3(__defProp$3({}, "__esModule", { value: true }), mod);
178
135
  var auth_config_exports = {};
179
- __export$2(auth_config_exports, {
136
+ __export$3(auth_config_exports, {
180
137
  isValidAccessToken: () => isValidAccessToken,
181
138
  readAuthConfig: () => readAuthConfig,
182
139
  writeAuthConfig: () => writeAuthConfig
183
140
  });
184
- module.exports = __toCommonJS$2(auth_config_exports);
141
+ module.exports = __toCommonJS$3(auth_config_exports);
185
142
  var fs$1 = __toESM$1(require("fs"));
186
143
  var path$1 = __toESM$1(require("path"));
187
144
  var import_token_util = require_token_util();
@@ -222,32 +179,32 @@ var require_auth_config = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
222
179
  //#endregion
223
180
  //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/oauth.js
224
181
  var require_oauth = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/oauth.js": ((exports, module) => {
225
- var __defProp$1 = Object.defineProperty;
226
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
227
- var __getOwnPropNames$1 = Object.getOwnPropertyNames;
228
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
229
- var __export$1 = (target, all) => {
230
- for (var name in all) __defProp$1(target, name, {
182
+ var __defProp$2 = Object.defineProperty;
183
+ var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
184
+ var __getOwnPropNames$2 = Object.getOwnPropertyNames;
185
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
186
+ var __export$2 = (target, all) => {
187
+ for (var name in all) __defProp$2(target, name, {
231
188
  get: all[name],
232
189
  enumerable: true
233
190
  });
234
191
  };
235
- var __copyProps$1 = (to, from, except, desc) => {
192
+ var __copyProps$2 = (to, from, except, desc) => {
236
193
  if (from && typeof from === "object" || typeof from === "function") {
237
- for (let key of __getOwnPropNames$1(from)) if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$1(to, key, {
194
+ for (let key of __getOwnPropNames$2(from)) if (!__hasOwnProp$2.call(to, key) && key !== except) __defProp$2(to, key, {
238
195
  get: () => from[key],
239
- enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable
196
+ enumerable: !(desc = __getOwnPropDesc$2(from, key)) || desc.enumerable
240
197
  });
241
198
  }
242
199
  return to;
243
200
  };
244
- var __toCommonJS$1 = (mod) => __copyProps$1(__defProp$1({}, "__esModule", { value: true }), mod);
201
+ var __toCommonJS$2 = (mod) => __copyProps$2(__defProp$2({}, "__esModule", { value: true }), mod);
245
202
  var oauth_exports = {};
246
- __export$1(oauth_exports, {
203
+ __export$2(oauth_exports, {
247
204
  processTokenResponse: () => processTokenResponse,
248
205
  refreshTokenRequest: () => refreshTokenRequest
249
206
  });
250
- module.exports = __toCommonJS$1(oauth_exports);
207
+ module.exports = __toCommonJS$2(oauth_exports);
251
208
  var import_os = require("os");
252
209
  const VERCEL_ISSUER = "https://vercel.com";
253
210
  const VERCEL_CLI_CLIENT_ID = "cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp";
@@ -293,6 +250,49 @@ var require_oauth = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
293
250
  }
294
251
  }) });
295
252
 
253
+ //#endregion
254
+ //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-errors.js
255
+ var require_auth_errors = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-errors.js": ((exports, module) => {
256
+ var __defProp$1 = Object.defineProperty;
257
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
258
+ var __getOwnPropNames$1 = Object.getOwnPropertyNames;
259
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
260
+ var __export$1 = (target, all) => {
261
+ for (var name in all) __defProp$1(target, name, {
262
+ get: all[name],
263
+ enumerable: true
264
+ });
265
+ };
266
+ var __copyProps$1 = (to, from, except, desc) => {
267
+ if (from && typeof from === "object" || typeof from === "function") {
268
+ for (let key of __getOwnPropNames$1(from)) if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$1(to, key, {
269
+ get: () => from[key],
270
+ enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable
271
+ });
272
+ }
273
+ return to;
274
+ };
275
+ var __toCommonJS$1 = (mod) => __copyProps$1(__defProp$1({}, "__esModule", { value: true }), mod);
276
+ var auth_errors_exports = {};
277
+ __export$1(auth_errors_exports, {
278
+ AccessTokenMissingError: () => AccessTokenMissingError,
279
+ RefreshAccessTokenFailedError: () => RefreshAccessTokenFailedError
280
+ });
281
+ module.exports = __toCommonJS$1(auth_errors_exports);
282
+ var AccessTokenMissingError = class extends Error {
283
+ constructor() {
284
+ super("No authentication found. Please log in with the Vercel CLI (vercel login).");
285
+ this.name = "AccessTokenMissingError";
286
+ }
287
+ };
288
+ var RefreshAccessTokenFailedError = class extends Error {
289
+ constructor(cause) {
290
+ super("Failed to refresh authentication token.", { cause });
291
+ this.name = "RefreshAccessTokenFailedError";
292
+ }
293
+ };
294
+ }) });
295
+
296
296
  //#endregion
297
297
  //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-util.js
298
298
  var require_token_util = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-util.js": ((exports, module) => {
@@ -455,4 +455,4 @@ Object.defineProperty(exports, 'require_token_util', {
455
455
  return require_token_util;
456
456
  }
457
457
  });
458
- //# sourceMappingURL=token-util-B2kSJtEV.cjs.map
458
+ //# sourceMappingURL=token-util-B2Ofk2zk.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-util-B2Ofk2zk.cjs","names":["__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","__toCommonJS","__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","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","__toCommonJS"],"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-error.js","../../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-io.js","../../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-config.js","../../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/oauth.js","../../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-errors.js","../../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-util.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","\"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, expirationBufferMs = 0) {\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 const bufferInSeconds = expirationBufferMs / 1e3;\n return authConfig.expiresAt >= nowInSeconds + bufferInSeconds;\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 __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 auth_errors_exports = {};\n__export(auth_errors_exports, {\n AccessTokenMissingError: () => AccessTokenMissingError,\n RefreshAccessTokenFailedError: () => RefreshAccessTokenFailedError\n});\nmodule.exports = __toCommonJS(auth_errors_exports);\nclass AccessTokenMissingError extends Error {\n constructor() {\n super(\n \"No authentication found. Please log in with the Vercel CLI (vercel login).\"\n );\n this.name = \"AccessTokenMissingError\";\n }\n}\nclass RefreshAccessTokenFailedError extends Error {\n constructor(cause) {\n super(\"Failed to refresh authentication token.\", { cause });\n this.name = \"RefreshAccessTokenFailedError\";\n }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n AccessTokenMissingError,\n RefreshAccessTokenFailedError\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 getVercelDataDir: () => getVercelDataDir,\n getVercelOidcToken: () => getVercelOidcToken,\n getVercelToken: () => getVercelToken,\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\");\nvar import_auth_errors = require(\"./auth-errors\");\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 getVercelToken(options) {\n const authConfig = (0, import_auth_config.readAuthConfig)();\n if (!authConfig?.token) {\n throw new import_auth_errors.AccessTokenMissingError();\n }\n if ((0, import_auth_config.isValidAccessToken)(authConfig, options?.expirationBufferMs)) {\n return authConfig.token;\n }\n if (!authConfig.refreshToken) {\n (0, import_auth_config.writeAuthConfig)({});\n throw new import_auth_errors.RefreshAccessTokenFailedError(\"No refresh token available\");\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 throw new import_auth_errors.RefreshAccessTokenFailedError(tokensError);\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;\n } catch (error) {\n (0, import_auth_config.writeAuthConfig)({});\n if (error instanceof import_auth_errors.AccessTokenMissingError || error instanceof import_auth_errors.RefreshAccessTokenFailedError) {\n throw error;\n }\n throw new import_auth_errors.RefreshAccessTokenFailedError(error);\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, bufferMs = 0) {\n return token.exp * 1e3 < Date.now() + bufferMs;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n assertVercelOidcTokenResponse,\n findProjectInfo,\n getTokenPayload,\n getVercelDataDir,\n getVercelOidcToken,\n getVercelToken,\n isExpired,\n loadToken,\n saveToken\n});\n"],"x_google_ignoreList":[0,1,2,3,4,5],"mappings":";;;;CACA,IAAIA,cAAY,OAAO;CACvB,IAAIC,qBAAmB,OAAO;CAC9B,IAAIC,sBAAoB,OAAO;CAC/B,IAAIC,iBAAe,OAAO,UAAU;CACpC,IAAIC,cAAY,QAAQ,QAAQ;AAC9B,OAAK,IAAI,QAAQ,IACf,aAAU,QAAQ,MAAM;GAAE,KAAK,IAAI;GAAO,YAAY;GAAM,CAAC;;CAEjE,IAAIC,iBAAe,IAAI,MAAM,QAAQ,SAAS;AAC5C,MAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YACtD;QAAK,IAAI,OAAOH,oBAAkB,KAAK,CACrC,KAAI,CAACC,eAAa,KAAK,IAAI,IAAI,IAAI,QAAQ,OACzC,aAAU,IAAI,KAAK;IAAE,WAAW,KAAK;IAAM,YAAY,EAAE,OAAOF,mBAAiB,MAAM,IAAI,KAAK,KAAK;IAAY,CAAC;;AAExH,SAAO;;CAET,IAAIK,kBAAgB,QAAQD,cAAYL,YAAU,EAAE,EAAE,cAAc,EAAE,OAAO,MAAM,CAAC,EAAE,IAAI;CAC1F,IAAI,sBAAsB,EAAE;AAC5B,YAAS,qBAAqB,EAC5B,4BAA4B,sBAC7B,CAAC;AACF,QAAO,UAAUM,eAAa,oBAAoB;CAClD,IAAM,uBAAN,cAAmC,MAAM;EACvC,YAAY,SAAS,OAAO;AAC1B,SAAM,QAAQ;AACd,QAAK,OAAO;AACZ,QAAK,QAAQ;;EAEf,WAAW;AACT,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,mBAAmB,qBAC3B,0EACD;EAEH,MAAM,YAAY,KAAK,KAAK,KAAK,oBAAoB,GAAG,UAAU,OAAO;AACzE,MAAI,CAAC,GAAG,WAAW,UAAU,CAC3B,QAAO;EAET,MAAM,QAAQ,KAAK,MAAM,GAAG,aAAa,WAAW,OAAO,CAAC;AAC5D,gCAA8B,MAAM;AACpC,SAAO;;CAET,SAAS,gBAAgB,OAAO;EAC9B,MAAM,aAAa,MAAM,MAAM,IAAI;AACnC,MAAI,WAAW,WAAW,EACxB,OAAM,IAAI,mBAAmB,qBAC3B,wDACD;EAEH,MAAM,SAAS,WAAW,GAAG,QAAQ,MAAM,IAAI,CAAC,QAAQ,MAAM,IAAI;EAClE,MAAM,SAAS,OAAO,OACpB,OAAO,UAAU,IAAI,OAAO,SAAS,KAAK,GAC1C,IACD;AACD,SAAO,KAAK,MAAM,OAAO,KAAK,QAAQ,SAAS,CAAC,SAAS,OAAO,CAAC;;CAEnE,SAAS,UAAU,OAAO,WAAW,GAAG;AACtC,SAAO,MAAM,MAAM,MAAM,KAAK,KAAK,GAAG"}
@@ -1,4 +1,4 @@
1
- const require_token_util$1 = require('./token-util-B2kSJtEV.cjs');
1
+ const require_token_util$1 = require('./token-util-B2Ofk2zk.cjs');
2
2
 
3
3
  Object.defineProperty(exports, 'default', {
4
4
  enumerable: true,
@@ -68,11 +68,13 @@ var require_token_error = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
68
68
  }) });
69
69
 
70
70
  //#endregion
71
- //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-errors.js
72
- var require_auth_errors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-errors.js": ((exports, module) => {
71
+ //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-io.js
72
+ var require_token_io = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-io.js": ((exports, module) => {
73
+ var __create$2 = Object.create;
73
74
  var __defProp$4 = Object.defineProperty;
74
75
  var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
75
76
  var __getOwnPropNames$4 = Object.getOwnPropertyNames;
77
+ var __getProtoOf$2 = Object.getPrototypeOf;
76
78
  var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
77
79
  var __export$4 = (target, all) => {
78
80
  for (var name in all) __defProp$4(target, name, {
@@ -89,62 +91,17 @@ var require_auth_errors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
89
91
  }
90
92
  return to;
91
93
  };
92
- var __toCommonJS$4 = (mod) => __copyProps$4(__defProp$4({}, "__esModule", { value: true }), mod);
93
- var auth_errors_exports = {};
94
- __export$4(auth_errors_exports, {
95
- AccessTokenMissingError: () => AccessTokenMissingError,
96
- RefreshAccessTokenFailedError: () => RefreshAccessTokenFailedError
97
- });
98
- module.exports = __toCommonJS$4(auth_errors_exports);
99
- var AccessTokenMissingError = class extends Error {
100
- constructor() {
101
- super("No authentication found. Please log in with the Vercel CLI (vercel login).");
102
- this.name = "AccessTokenMissingError";
103
- }
104
- };
105
- var RefreshAccessTokenFailedError = class extends Error {
106
- constructor(cause) {
107
- super("Failed to refresh authentication token.", { cause });
108
- this.name = "RefreshAccessTokenFailedError";
109
- }
110
- };
111
- }) });
112
-
113
- //#endregion
114
- //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-io.js
115
- var require_token_io = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-io.js": ((exports, module) => {
116
- var __create$2 = Object.create;
117
- var __defProp$3 = Object.defineProperty;
118
- var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
119
- var __getOwnPropNames$3 = Object.getOwnPropertyNames;
120
- var __getProtoOf$2 = Object.getPrototypeOf;
121
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
122
- var __export$3 = (target, all) => {
123
- for (var name in all) __defProp$3(target, name, {
124
- get: all[name],
125
- enumerable: true
126
- });
127
- };
128
- var __copyProps$3 = (to, from, except, desc) => {
129
- if (from && typeof from === "object" || typeof from === "function") {
130
- for (let key of __getOwnPropNames$3(from)) if (!__hasOwnProp$3.call(to, key) && key !== except) __defProp$3(to, key, {
131
- get: () => from[key],
132
- enumerable: !(desc = __getOwnPropDesc$3(from, key)) || desc.enumerable
133
- });
134
- }
135
- return to;
136
- };
137
- var __toESM$2 = (mod, isNodeMode, target) => (target = mod != null ? __create$2(__getProtoOf$2(mod)) : {}, __copyProps$3(isNodeMode || !mod || !mod.__esModule ? __defProp$3(target, "default", {
94
+ var __toESM$2 = (mod, isNodeMode, target) => (target = mod != null ? __create$2(__getProtoOf$2(mod)) : {}, __copyProps$4(isNodeMode || !mod || !mod.__esModule ? __defProp$4(target, "default", {
138
95
  value: mod,
139
96
  enumerable: true
140
97
  }) : target, mod));
141
- var __toCommonJS$3 = (mod) => __copyProps$3(__defProp$3({}, "__esModule", { value: true }), mod);
98
+ var __toCommonJS$4 = (mod) => __copyProps$4(__defProp$4({}, "__esModule", { value: true }), mod);
142
99
  var token_io_exports = {};
143
- __export$3(token_io_exports, {
100
+ __export$4(token_io_exports, {
144
101
  findRootDir: () => findRootDir,
145
102
  getUserDataDir: () => getUserDataDir
146
103
  });
147
- module.exports = __toCommonJS$3(token_io_exports);
104
+ module.exports = __toCommonJS$4(token_io_exports);
148
105
  var import_path = __toESM$2(__require("path"));
149
106
  var import_fs = __toESM$2(__require("fs"));
150
107
  var import_os$1 = __toESM$2(__require("os"));
@@ -179,38 +136,38 @@ var require_token_io = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@v
179
136
  //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-config.js
180
137
  var require_auth_config = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-config.js": ((exports, module) => {
181
138
  var __create$1 = Object.create;
182
- var __defProp$2 = Object.defineProperty;
183
- var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
184
- var __getOwnPropNames$2 = Object.getOwnPropertyNames;
139
+ var __defProp$3 = Object.defineProperty;
140
+ var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
141
+ var __getOwnPropNames$3 = Object.getOwnPropertyNames;
185
142
  var __getProtoOf$1 = Object.getPrototypeOf;
186
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
187
- var __export$2 = (target, all) => {
188
- for (var name in all) __defProp$2(target, name, {
143
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
144
+ var __export$3 = (target, all) => {
145
+ for (var name in all) __defProp$3(target, name, {
189
146
  get: all[name],
190
147
  enumerable: true
191
148
  });
192
149
  };
193
- var __copyProps$2 = (to, from, except, desc) => {
150
+ var __copyProps$3 = (to, from, except, desc) => {
194
151
  if (from && typeof from === "object" || typeof from === "function") {
195
- for (let key of __getOwnPropNames$2(from)) if (!__hasOwnProp$2.call(to, key) && key !== except) __defProp$2(to, key, {
152
+ for (let key of __getOwnPropNames$3(from)) if (!__hasOwnProp$3.call(to, key) && key !== except) __defProp$3(to, key, {
196
153
  get: () => from[key],
197
- enumerable: !(desc = __getOwnPropDesc$2(from, key)) || desc.enumerable
154
+ enumerable: !(desc = __getOwnPropDesc$3(from, key)) || desc.enumerable
198
155
  });
199
156
  }
200
157
  return to;
201
158
  };
202
- var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$2(isNodeMode || !mod || !mod.__esModule ? __defProp$2(target, "default", {
159
+ var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$3(isNodeMode || !mod || !mod.__esModule ? __defProp$3(target, "default", {
203
160
  value: mod,
204
161
  enumerable: true
205
162
  }) : target, mod));
206
- var __toCommonJS$2 = (mod) => __copyProps$2(__defProp$2({}, "__esModule", { value: true }), mod);
163
+ var __toCommonJS$3 = (mod) => __copyProps$3(__defProp$3({}, "__esModule", { value: true }), mod);
207
164
  var auth_config_exports = {};
208
- __export$2(auth_config_exports, {
165
+ __export$3(auth_config_exports, {
209
166
  isValidAccessToken: () => isValidAccessToken,
210
167
  readAuthConfig: () => readAuthConfig,
211
168
  writeAuthConfig: () => writeAuthConfig
212
169
  });
213
- module.exports = __toCommonJS$2(auth_config_exports);
170
+ module.exports = __toCommonJS$3(auth_config_exports);
214
171
  var fs$1 = __toESM$1(__require("fs"));
215
172
  var path$1 = __toESM$1(__require("path"));
216
173
  var import_token_util = require_token_util();
@@ -251,32 +208,32 @@ var require_auth_config = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
251
208
  //#endregion
252
209
  //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/oauth.js
253
210
  var require_oauth = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/oauth.js": ((exports, module) => {
254
- var __defProp$1 = Object.defineProperty;
255
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
256
- var __getOwnPropNames$1 = Object.getOwnPropertyNames;
257
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
258
- var __export$1 = (target, all) => {
259
- for (var name in all) __defProp$1(target, name, {
211
+ var __defProp$2 = Object.defineProperty;
212
+ var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
213
+ var __getOwnPropNames$2 = Object.getOwnPropertyNames;
214
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
215
+ var __export$2 = (target, all) => {
216
+ for (var name in all) __defProp$2(target, name, {
260
217
  get: all[name],
261
218
  enumerable: true
262
219
  });
263
220
  };
264
- var __copyProps$1 = (to, from, except, desc) => {
221
+ var __copyProps$2 = (to, from, except, desc) => {
265
222
  if (from && typeof from === "object" || typeof from === "function") {
266
- for (let key of __getOwnPropNames$1(from)) if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$1(to, key, {
223
+ for (let key of __getOwnPropNames$2(from)) if (!__hasOwnProp$2.call(to, key) && key !== except) __defProp$2(to, key, {
267
224
  get: () => from[key],
268
- enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable
225
+ enumerable: !(desc = __getOwnPropDesc$2(from, key)) || desc.enumerable
269
226
  });
270
227
  }
271
228
  return to;
272
229
  };
273
- var __toCommonJS$1 = (mod) => __copyProps$1(__defProp$1({}, "__esModule", { value: true }), mod);
230
+ var __toCommonJS$2 = (mod) => __copyProps$2(__defProp$2({}, "__esModule", { value: true }), mod);
274
231
  var oauth_exports = {};
275
- __export$1(oauth_exports, {
232
+ __export$2(oauth_exports, {
276
233
  processTokenResponse: () => processTokenResponse,
277
234
  refreshTokenRequest: () => refreshTokenRequest
278
235
  });
279
- module.exports = __toCommonJS$1(oauth_exports);
236
+ module.exports = __toCommonJS$2(oauth_exports);
280
237
  var import_os = __require("os");
281
238
  const VERCEL_ISSUER = "https://vercel.com";
282
239
  const VERCEL_CLI_CLIENT_ID = "cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp";
@@ -322,6 +279,49 @@ var require_oauth = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@verc
322
279
  }
323
280
  }) });
324
281
 
282
+ //#endregion
283
+ //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-errors.js
284
+ var require_auth_errors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-errors.js": ((exports, module) => {
285
+ var __defProp$1 = Object.defineProperty;
286
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
287
+ var __getOwnPropNames$1 = Object.getOwnPropertyNames;
288
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
289
+ var __export$1 = (target, all) => {
290
+ for (var name in all) __defProp$1(target, name, {
291
+ get: all[name],
292
+ enumerable: true
293
+ });
294
+ };
295
+ var __copyProps$1 = (to, from, except, desc) => {
296
+ if (from && typeof from === "object" || typeof from === "function") {
297
+ for (let key of __getOwnPropNames$1(from)) if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$1(to, key, {
298
+ get: () => from[key],
299
+ enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable
300
+ });
301
+ }
302
+ return to;
303
+ };
304
+ var __toCommonJS$1 = (mod) => __copyProps$1(__defProp$1({}, "__esModule", { value: true }), mod);
305
+ var auth_errors_exports = {};
306
+ __export$1(auth_errors_exports, {
307
+ AccessTokenMissingError: () => AccessTokenMissingError,
308
+ RefreshAccessTokenFailedError: () => RefreshAccessTokenFailedError
309
+ });
310
+ module.exports = __toCommonJS$1(auth_errors_exports);
311
+ var AccessTokenMissingError = class extends Error {
312
+ constructor() {
313
+ super("No authentication found. Please log in with the Vercel CLI (vercel login).");
314
+ this.name = "AccessTokenMissingError";
315
+ }
316
+ };
317
+ var RefreshAccessTokenFailedError = class extends Error {
318
+ constructor(cause) {
319
+ super("Failed to refresh authentication token.", { cause });
320
+ this.name = "RefreshAccessTokenFailedError";
321
+ }
322
+ };
323
+ }) });
324
+
325
325
  //#endregion
326
326
  //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-util.js
327
327
  var require_token_util = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-util.js": ((exports, module) => {
@@ -467,4 +467,4 @@ var require_token_util = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
467
467
 
468
468
  //#endregion
469
469
  export { __toDynamicImportESM as a, __commonJS as i, require_auth_errors as n, __toESM$3 as o, require_token_error as r, require_token_util as t };
470
- //# sourceMappingURL=token-util-EUxa8JtH.js.map
470
+ //# sourceMappingURL=token-util-CfNdwRXi.js.map