@cloudsnorkel/cdk-github-runners 0.10.5 → 0.10.6

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 (37) hide show
  1. package/.jsii +101 -101
  2. package/README.md +1 -1
  3. package/assets/delete-failed-runner.lambda/index.js +1981 -856
  4. package/assets/idle-runner-repear.lambda/index.js +1981 -856
  5. package/assets/image-builders/aws-image-builder/versioner.lambda/index.js +44 -0
  6. package/assets/setup.lambda/index.html +13 -13
  7. package/assets/setup.lambda/index.js +1506 -591
  8. package/assets/status.lambda/index.js +596 -327
  9. package/assets/token-retriever.lambda/index.js +1981 -856
  10. package/lib/access.js +1 -1
  11. package/lib/image-builders/api.js +1 -1
  12. package/lib/image-builders/aws-image-builder/ami.d.ts +1 -1
  13. package/lib/image-builders/aws-image-builder/ami.js +9 -9
  14. package/lib/image-builders/aws-image-builder/builder.js +1 -1
  15. package/lib/image-builders/aws-image-builder/deprecated/ami.d.ts +1 -1
  16. package/lib/image-builders/aws-image-builder/deprecated/ami.js +9 -9
  17. package/lib/image-builders/aws-image-builder/deprecated/common.d.ts +1 -1
  18. package/lib/image-builders/aws-image-builder/deprecated/common.js +10 -10
  19. package/lib/image-builders/aws-image-builder/deprecated/container.js +1 -1
  20. package/lib/image-builders/aws-image-builder/deprecated/linux-components.js +1 -1
  21. package/lib/image-builders/aws-image-builder/deprecated/windows-components.js +1 -1
  22. package/lib/image-builders/codebuild-deprecated.js +1 -1
  23. package/lib/image-builders/components.js +1 -1
  24. package/lib/image-builders/static.js +1 -1
  25. package/lib/providers/codebuild.js +7 -5
  26. package/lib/providers/common.d.ts +2 -1
  27. package/lib/providers/common.js +5 -6
  28. package/lib/providers/ec2.d.ts +1 -0
  29. package/lib/providers/ec2.js +16 -11
  30. package/lib/providers/ecs.js +12 -5
  31. package/lib/providers/fargate.js +6 -3
  32. package/lib/providers/lambda.js +2 -2
  33. package/lib/runner.js +1 -1
  34. package/lib/secrets.js +1 -1
  35. package/lib/utils.d.ts +19 -1
  36. package/lib/utils.js +48 -2
  37. package/package.json +9 -8
@@ -90,11 +90,30 @@ var require_is_plain_object = __commonJS({
90
90
 
91
91
  // node_modules/@octokit/endpoint/dist-node/index.js
92
92
  var require_dist_node2 = __commonJS({
93
- "node_modules/@octokit/endpoint/dist-node/index.js"(exports2) {
93
+ "node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) {
94
94
  "use strict";
95
- Object.defineProperty(exports2, "__esModule", { value: true });
96
- var isPlainObject = require_is_plain_object();
97
- var universalUserAgent = require_dist_node();
95
+ var __defProp2 = Object.defineProperty;
96
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
97
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
98
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
99
+ var __export = (target, all) => {
100
+ for (var name in all)
101
+ __defProp2(target, name, { get: all[name], enumerable: true });
102
+ };
103
+ var __copyProps2 = (to, from, except, desc) => {
104
+ if (from && typeof from === "object" || typeof from === "function") {
105
+ for (let key of __getOwnPropNames2(from))
106
+ if (!__hasOwnProp2.call(to, key) && key !== except)
107
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
108
+ }
109
+ return to;
110
+ };
111
+ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
112
+ var dist_src_exports = {};
113
+ __export(dist_src_exports, {
114
+ endpoint: () => endpoint
115
+ });
116
+ module2.exports = __toCommonJS(dist_src_exports);
98
117
  function lowercaseKeys(object) {
99
118
  if (!object) {
100
119
  return {};
@@ -104,20 +123,17 @@ var require_dist_node2 = __commonJS({
104
123
  return newObj;
105
124
  }, {});
106
125
  }
126
+ var import_is_plain_object = require_is_plain_object();
107
127
  function mergeDeep(defaults, options) {
108
128
  const result = Object.assign({}, defaults);
109
129
  Object.keys(options).forEach((key) => {
110
- if (isPlainObject.isPlainObject(options[key])) {
130
+ if ((0, import_is_plain_object.isPlainObject)(options[key])) {
111
131
  if (!(key in defaults))
112
- Object.assign(result, {
113
- [key]: options[key]
114
- });
132
+ Object.assign(result, { [key]: options[key] });
115
133
  else
116
134
  result[key] = mergeDeep(defaults[key], options[key]);
117
135
  } else {
118
- Object.assign(result, {
119
- [key]: options[key]
120
- });
136
+ Object.assign(result, { [key]: options[key] });
121
137
  }
122
138
  });
123
139
  return result;
@@ -133,12 +149,7 @@ var require_dist_node2 = __commonJS({
133
149
  function merge(defaults, route, options) {
134
150
  if (typeof route === "string") {
135
151
  let [method, url] = route.split(" ");
136
- options = Object.assign(url ? {
137
- method,
138
- url
139
- } : {
140
- url: method
141
- }, options);
152
+ options = Object.assign(url ? { method, url } : { url: method }, options);
142
153
  } else {
143
154
  options = Object.assign({}, route);
144
155
  }
@@ -149,7 +160,9 @@ var require_dist_node2 = __commonJS({
149
160
  if (defaults && defaults.mediaType.previews.length) {
150
161
  mergedOptions.mediaType.previews = defaults.mediaType.previews.filter((preview) => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews);
151
162
  }
152
- mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, ""));
163
+ mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(
164
+ (preview) => preview.replace(/-preview/, "")
165
+ );
153
166
  return mergedOptions;
154
167
  }
155
168
  function addQueryParameters(url, parameters) {
@@ -217,12 +230,16 @@ var require_dist_node2 = __commonJS({
217
230
  if (modifier && modifier !== "*") {
218
231
  value = value.substring(0, parseInt(modifier, 10));
219
232
  }
220
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : ""));
233
+ result.push(
234
+ encodeValue(operator, value, isKeyOperator(operator) ? key : "")
235
+ );
221
236
  } else {
222
237
  if (modifier === "*") {
223
238
  if (Array.isArray(value)) {
224
239
  value.filter(isDefined).forEach(function(value2) {
225
- result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
240
+ result.push(
241
+ encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
242
+ );
226
243
  });
227
244
  } else {
228
245
  Object.keys(value).forEach(function(k) {
@@ -272,40 +289,50 @@ var require_dist_node2 = __commonJS({
272
289
  }
273
290
  function expand(template, context) {
274
291
  var operators = ["+", "#", ".", "/", ";", "?", "&"];
275
- return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function(_, expression, literal) {
276
- if (expression) {
277
- let operator = "";
278
- const values = [];
279
- if (operators.indexOf(expression.charAt(0)) !== -1) {
280
- operator = expression.charAt(0);
281
- expression = expression.substr(1);
282
- }
283
- expression.split(/,/g).forEach(function(variable) {
284
- var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
285
- values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
286
- });
287
- if (operator && operator !== "+") {
288
- var separator = ",";
289
- if (operator === "?") {
290
- separator = "&";
291
- } else if (operator !== "#") {
292
- separator = operator;
292
+ return template.replace(
293
+ /\{([^\{\}]+)\}|([^\{\}]+)/g,
294
+ function(_, expression, literal) {
295
+ if (expression) {
296
+ let operator = "";
297
+ const values = [];
298
+ if (operators.indexOf(expression.charAt(0)) !== -1) {
299
+ operator = expression.charAt(0);
300
+ expression = expression.substr(1);
301
+ }
302
+ expression.split(/,/g).forEach(function(variable) {
303
+ var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
304
+ values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
305
+ });
306
+ if (operator && operator !== "+") {
307
+ var separator = ",";
308
+ if (operator === "?") {
309
+ separator = "&";
310
+ } else if (operator !== "#") {
311
+ separator = operator;
312
+ }
313
+ return (values.length !== 0 ? operator : "") + values.join(separator);
314
+ } else {
315
+ return values.join(",");
293
316
  }
294
- return (values.length !== 0 ? operator : "") + values.join(separator);
295
317
  } else {
296
- return values.join(",");
318
+ return encodeReserved(literal);
297
319
  }
298
- } else {
299
- return encodeReserved(literal);
300
320
  }
301
- });
321
+ );
302
322
  }
303
323
  function parse(options) {
304
324
  let method = options.method.toUpperCase();
305
325
  let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
306
326
  let headers = Object.assign({}, options.headers);
307
327
  let body;
308
- let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]);
328
+ let parameters = omit(options, [
329
+ "method",
330
+ "baseUrl",
331
+ "url",
332
+ "headers",
333
+ "request",
334
+ "mediaType"
335
+ ]);
309
336
  const urlVariableNames = extractUrlVariableNames(url);
310
337
  url = parseUrl(url).expand(parameters);
311
338
  if (!/^http/.test(url)) {
@@ -316,7 +343,12 @@ var require_dist_node2 = __commonJS({
316
343
  const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
317
344
  if (!isBinaryRequest) {
318
345
  if (options.mediaType.format) {
319
- headers.accept = headers.accept.split(/,/).map((preview) => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(",");
346
+ headers.accept = headers.accept.split(/,/).map(
347
+ (preview) => preview.replace(
348
+ /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
349
+ `application/vnd$1$2.${options.mediaType.format}`
350
+ )
351
+ ).join(",");
320
352
  }
321
353
  if (options.mediaType.previews.length) {
322
354
  const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
@@ -343,15 +375,11 @@ var require_dist_node2 = __commonJS({
343
375
  if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
344
376
  body = "";
345
377
  }
346
- return Object.assign({
347
- method,
348
- url,
349
- headers
350
- }, typeof body !== "undefined" ? {
351
- body
352
- } : null, options.request ? {
353
- request: options.request
354
- } : null);
378
+ return Object.assign(
379
+ { method, url, headers },
380
+ typeof body !== "undefined" ? { body } : null,
381
+ options.request ? { request: options.request } : null
382
+ );
355
383
  }
356
384
  function endpointWithDefaults(defaults, route, options) {
357
385
  return parse(merge(defaults, route, options));
@@ -366,8 +394,9 @@ var require_dist_node2 = __commonJS({
366
394
  parse
367
395
  });
368
396
  }
369
- var VERSION = "7.0.5";
370
- var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
397
+ var import_universal_user_agent = require_dist_node();
398
+ var VERSION = "7.0.6";
399
+ var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
371
400
  var DEFAULTS = {
372
401
  method: "GET",
373
402
  baseUrl: "https://api.github.com",
@@ -381,7 +410,6 @@ var require_dist_node2 = __commonJS({
381
410
  }
382
411
  };
383
412
  var endpoint = withDefaults(null, DEFAULTS);
384
- exports2.endpoint = endpoint;
385
413
  }
386
414
  });
387
415
 
@@ -7138,6 +7166,7 @@ var require_dist_node3 = __commonJS({
7138
7166
  // node_modules/wrappy/wrappy.js
7139
7167
  var require_wrappy = __commonJS({
7140
7168
  "node_modules/wrappy/wrappy.js"(exports2, module2) {
7169
+ "use strict";
7141
7170
  module2.exports = wrappy;
7142
7171
  function wrappy(fn, cb) {
7143
7172
  if (fn && cb)
@@ -7169,6 +7198,7 @@ var require_wrappy = __commonJS({
7169
7198
  // node_modules/once/once.js
7170
7199
  var require_once = __commonJS({
7171
7200
  "node_modules/once/once.js"(exports2, module2) {
7201
+ "use strict";
7172
7202
  var wrappy = require_wrappy();
7173
7203
  module2.exports = wrappy(once);
7174
7204
  module2.exports.strict = wrappy(onceStrict);
@@ -7463,6 +7493,7 @@ var require_dist_node5 = __commonJS({
7463
7493
  // node_modules/btoa-lite/btoa-node.js
7464
7494
  var require_btoa_node = __commonJS({
7465
7495
  "node_modules/btoa-lite/btoa-node.js"(exports2, module2) {
7496
+ "use strict";
7466
7497
  module2.exports = function btoa(str) {
7467
7498
  return new Buffer(str).toString("base64");
7468
7499
  };
@@ -7521,59 +7552,108 @@ var require_dist_node6 = __commonJS({
7521
7552
 
7522
7553
  // node_modules/@octokit/oauth-methods/dist-node/index.js
7523
7554
  var require_dist_node7 = __commonJS({
7524
- "node_modules/@octokit/oauth-methods/dist-node/index.js"(exports2) {
7555
+ "node_modules/@octokit/oauth-methods/dist-node/index.js"(exports2, module2) {
7525
7556
  "use strict";
7526
- Object.defineProperty(exports2, "__esModule", { value: true });
7527
- function _interopDefault(ex) {
7528
- return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
7529
- }
7530
- var oauthAuthorizationUrl = require_dist_node6();
7531
- var request = require_dist_node5();
7532
- var requestError = require_dist_node4();
7533
- var btoa = _interopDefault(require_btoa_node());
7534
- var VERSION = "2.0.5";
7535
- function requestToOAuthBaseUrl(request2) {
7536
- const endpointDefaults = request2.endpoint.DEFAULTS;
7557
+ var __create2 = Object.create;
7558
+ var __defProp2 = Object.defineProperty;
7559
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
7560
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
7561
+ var __getProtoOf2 = Object.getPrototypeOf;
7562
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
7563
+ var __export = (target, all) => {
7564
+ for (var name in all)
7565
+ __defProp2(target, name, { get: all[name], enumerable: true });
7566
+ };
7567
+ var __copyProps2 = (to, from, except, desc) => {
7568
+ if (from && typeof from === "object" || typeof from === "function") {
7569
+ for (let key of __getOwnPropNames2(from))
7570
+ if (!__hasOwnProp2.call(to, key) && key !== except)
7571
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
7572
+ }
7573
+ return to;
7574
+ };
7575
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
7576
+ // If the importer is in node compatibility mode or this is not an ESM
7577
+ // file that has been converted to a CommonJS file using a Babel-
7578
+ // compatible transform (i.e. "__esModule" has not been set), then set
7579
+ // "default" to the CommonJS "module.exports" for node compatibility.
7580
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
7581
+ mod
7582
+ ));
7583
+ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
7584
+ var dist_src_exports = {};
7585
+ __export(dist_src_exports, {
7586
+ VERSION: () => VERSION,
7587
+ checkToken: () => checkToken,
7588
+ createDeviceCode: () => createDeviceCode,
7589
+ deleteAuthorization: () => deleteAuthorization,
7590
+ deleteToken: () => deleteToken,
7591
+ exchangeDeviceCode: () => exchangeDeviceCode,
7592
+ exchangeWebFlowCode: () => exchangeWebFlowCode,
7593
+ getWebFlowAuthorizationUrl: () => getWebFlowAuthorizationUrl,
7594
+ refreshToken: () => refreshToken,
7595
+ resetToken: () => resetToken,
7596
+ scopeToken: () => scopeToken
7597
+ });
7598
+ module2.exports = __toCommonJS(dist_src_exports);
7599
+ var VERSION = "2.0.6";
7600
+ var import_oauth_authorization_url = require_dist_node6();
7601
+ var import_request = require_dist_node5();
7602
+ var import_request_error = require_dist_node4();
7603
+ function requestToOAuthBaseUrl(request) {
7604
+ const endpointDefaults = request.endpoint.DEFAULTS;
7537
7605
  return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", "");
7538
7606
  }
7539
- async function oauthRequest(request2, route, parameters) {
7607
+ async function oauthRequest(request, route, parameters) {
7540
7608
  const withOAuthParameters = {
7541
- baseUrl: requestToOAuthBaseUrl(request2),
7609
+ baseUrl: requestToOAuthBaseUrl(request),
7542
7610
  headers: {
7543
7611
  accept: "application/json"
7544
7612
  },
7545
7613
  ...parameters
7546
7614
  };
7547
- const response = await request2(route, withOAuthParameters);
7615
+ const response = await request(route, withOAuthParameters);
7548
7616
  if ("error" in response.data) {
7549
- const error = new requestError.RequestError(`${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, {
7550
- request: request2.endpoint.merge(route, withOAuthParameters),
7551
- headers: response.headers
7552
- });
7617
+ const error = new import_request_error.RequestError(
7618
+ `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`,
7619
+ 400,
7620
+ {
7621
+ request: request.endpoint.merge(
7622
+ route,
7623
+ withOAuthParameters
7624
+ ),
7625
+ headers: response.headers
7626
+ }
7627
+ );
7553
7628
  error.response = response;
7554
7629
  throw error;
7555
7630
  }
7556
7631
  return response;
7557
7632
  }
7558
7633
  function getWebFlowAuthorizationUrl({
7559
- request: request$1 = request.request,
7634
+ request = import_request.request,
7560
7635
  ...options
7561
7636
  }) {
7562
- const baseUrl = requestToOAuthBaseUrl(request$1);
7563
- return oauthAuthorizationUrl.oauthAuthorizationUrl({
7637
+ const baseUrl = requestToOAuthBaseUrl(request);
7638
+ return (0, import_oauth_authorization_url.oauthAuthorizationUrl)({
7564
7639
  ...options,
7565
7640
  baseUrl
7566
7641
  });
7567
7642
  }
7643
+ var import_request2 = require_dist_node5();
7568
7644
  async function exchangeWebFlowCode(options) {
7569
- const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7570
- request.request;
7571
- const response = await oauthRequest(request$1, "POST /login/oauth/access_token", {
7572
- client_id: options.clientId,
7573
- client_secret: options.clientSecret,
7574
- code: options.code,
7575
- redirect_uri: options.redirectUrl
7576
- });
7645
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7646
+ import_request2.request;
7647
+ const response = await oauthRequest(
7648
+ request,
7649
+ "POST /login/oauth/access_token",
7650
+ {
7651
+ client_id: options.clientId,
7652
+ client_secret: options.clientSecret,
7653
+ code: options.code,
7654
+ redirect_uri: options.redirectUrl
7655
+ }
7656
+ );
7577
7657
  const authentication = {
7578
7658
  clientType: options.clientType,
7579
7659
  clientId: options.clientId,
@@ -7584,37 +7664,46 @@ var require_dist_node7 = __commonJS({
7584
7664
  if (options.clientType === "github-app") {
7585
7665
  if ("refresh_token" in response.data) {
7586
7666
  const apiTimeInMs = new Date(response.headers.date).getTime();
7587
- authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp(apiTimeInMs, response.data.expires_in), authentication.refreshTokenExpiresAt = toTimestamp(apiTimeInMs, response.data.refresh_token_expires_in);
7667
+ authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp(
7668
+ apiTimeInMs,
7669
+ response.data.expires_in
7670
+ ), authentication.refreshTokenExpiresAt = toTimestamp(
7671
+ apiTimeInMs,
7672
+ response.data.refresh_token_expires_in
7673
+ );
7588
7674
  }
7589
7675
  delete authentication.scopes;
7590
7676
  }
7591
- return {
7592
- ...response,
7593
- authentication
7594
- };
7677
+ return { ...response, authentication };
7595
7678
  }
7596
7679
  function toTimestamp(apiTimeInMs, expirationInSeconds) {
7597
7680
  return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString();
7598
7681
  }
7682
+ var import_request3 = require_dist_node5();
7599
7683
  async function createDeviceCode(options) {
7600
- const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7601
- request.request;
7684
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7685
+ import_request3.request;
7602
7686
  const parameters = {
7603
7687
  client_id: options.clientId
7604
7688
  };
7605
7689
  if ("scopes" in options && Array.isArray(options.scopes)) {
7606
7690
  parameters.scope = options.scopes.join(" ");
7607
7691
  }
7608
- return oauthRequest(request$1, "POST /login/device/code", parameters);
7692
+ return oauthRequest(request, "POST /login/device/code", parameters);
7609
7693
  }
7694
+ var import_request4 = require_dist_node5();
7610
7695
  async function exchangeDeviceCode(options) {
7611
- const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7612
- request.request;
7613
- const response = await oauthRequest(request$1, "POST /login/oauth/access_token", {
7614
- client_id: options.clientId,
7615
- device_code: options.code,
7616
- grant_type: "urn:ietf:params:oauth:grant-type:device_code"
7617
- });
7696
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7697
+ import_request4.request;
7698
+ const response = await oauthRequest(
7699
+ request,
7700
+ "POST /login/oauth/access_token",
7701
+ {
7702
+ client_id: options.clientId,
7703
+ device_code: options.code,
7704
+ grant_type: "urn:ietf:params:oauth:grant-type:device_code"
7705
+ }
7706
+ );
7618
7707
  const authentication = {
7619
7708
  clientType: options.clientType,
7620
7709
  clientId: options.clientId,
@@ -7627,24 +7716,31 @@ var require_dist_node7 = __commonJS({
7627
7716
  if (options.clientType === "github-app") {
7628
7717
  if ("refresh_token" in response.data) {
7629
7718
  const apiTimeInMs = new Date(response.headers.date).getTime();
7630
- authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp$1(apiTimeInMs, response.data.expires_in), authentication.refreshTokenExpiresAt = toTimestamp$1(apiTimeInMs, response.data.refresh_token_expires_in);
7719
+ authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp2(
7720
+ apiTimeInMs,
7721
+ response.data.expires_in
7722
+ ), authentication.refreshTokenExpiresAt = toTimestamp2(
7723
+ apiTimeInMs,
7724
+ response.data.refresh_token_expires_in
7725
+ );
7631
7726
  }
7632
7727
  delete authentication.scopes;
7633
7728
  }
7634
- return {
7635
- ...response,
7636
- authentication
7637
- };
7729
+ return { ...response, authentication };
7638
7730
  }
7639
- function toTimestamp$1(apiTimeInMs, expirationInSeconds) {
7731
+ function toTimestamp2(apiTimeInMs, expirationInSeconds) {
7640
7732
  return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString();
7641
7733
  }
7734
+ var import_request5 = require_dist_node5();
7735
+ var import_btoa_lite = __toESM2(require_btoa_node());
7642
7736
  async function checkToken(options) {
7643
- const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7644
- request.request;
7645
- const response = await request$1("POST /applications/{client_id}/token", {
7737
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7738
+ import_request5.request;
7739
+ const response = await request("POST /applications/{client_id}/token", {
7646
7740
  headers: {
7647
- authorization: `basic ${btoa(`${options.clientId}:${options.clientSecret}`)}`
7741
+ authorization: `basic ${(0, import_btoa_lite.default)(
7742
+ `${options.clientId}:${options.clientSecret}`
7743
+ )}`
7648
7744
  },
7649
7745
  client_id: options.clientId,
7650
7746
  access_token: options.token
@@ -7661,20 +7757,22 @@ var require_dist_node7 = __commonJS({
7661
7757
  if (options.clientType === "github-app") {
7662
7758
  delete authentication.scopes;
7663
7759
  }
7664
- return {
7665
- ...response,
7666
- authentication
7667
- };
7760
+ return { ...response, authentication };
7668
7761
  }
7762
+ var import_request6 = require_dist_node5();
7669
7763
  async function refreshToken(options) {
7670
- const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7671
- request.request;
7672
- const response = await oauthRequest(request$1, "POST /login/oauth/access_token", {
7673
- client_id: options.clientId,
7674
- client_secret: options.clientSecret,
7675
- grant_type: "refresh_token",
7676
- refresh_token: options.refreshToken
7677
- });
7764
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7765
+ import_request6.request;
7766
+ const response = await oauthRequest(
7767
+ request,
7768
+ "POST /login/oauth/access_token",
7769
+ {
7770
+ client_id: options.clientId,
7771
+ client_secret: options.clientSecret,
7772
+ grant_type: "refresh_token",
7773
+ refresh_token: options.refreshToken
7774
+ }
7775
+ );
7678
7776
  const apiTimeInMs = new Date(response.headers.date).getTime();
7679
7777
  const authentication = {
7680
7778
  clientType: "github-app",
@@ -7682,17 +7780,19 @@ var require_dist_node7 = __commonJS({
7682
7780
  clientSecret: options.clientSecret,
7683
7781
  token: response.data.access_token,
7684
7782
  refreshToken: response.data.refresh_token,
7685
- expiresAt: toTimestamp$2(apiTimeInMs, response.data.expires_in),
7686
- refreshTokenExpiresAt: toTimestamp$2(apiTimeInMs, response.data.refresh_token_expires_in)
7687
- };
7688
- return {
7689
- ...response,
7690
- authentication
7783
+ expiresAt: toTimestamp3(apiTimeInMs, response.data.expires_in),
7784
+ refreshTokenExpiresAt: toTimestamp3(
7785
+ apiTimeInMs,
7786
+ response.data.refresh_token_expires_in
7787
+ )
7691
7788
  };
7789
+ return { ...response, authentication };
7692
7790
  }
7693
- function toTimestamp$2(apiTimeInMs, expirationInSeconds) {
7791
+ function toTimestamp3(apiTimeInMs, expirationInSeconds) {
7694
7792
  return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString();
7695
7793
  }
7794
+ var import_request7 = require_dist_node5();
7795
+ var import_btoa_lite2 = __toESM2(require_btoa_node());
7696
7796
  async function scopeToken(options) {
7697
7797
  const {
7698
7798
  request: optionsRequest,
@@ -7702,40 +7802,46 @@ var require_dist_node7 = __commonJS({
7702
7802
  token,
7703
7803
  ...requestOptions
7704
7804
  } = options;
7705
- const request$1 = optionsRequest || /* istanbul ignore next: we always pass a custom request in tests */
7706
- request.request;
7707
- const response = await request$1("POST /applications/{client_id}/token/scoped", {
7708
- headers: {
7709
- authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}`
7805
+ const request = optionsRequest || /* istanbul ignore next: we always pass a custom request in tests */
7806
+ import_request7.request;
7807
+ const response = await request(
7808
+ "POST /applications/{client_id}/token/scoped",
7809
+ {
7810
+ headers: {
7811
+ authorization: `basic ${(0, import_btoa_lite2.default)(`${clientId}:${clientSecret}`)}`
7812
+ },
7813
+ client_id: clientId,
7814
+ access_token: token,
7815
+ ...requestOptions
7816
+ }
7817
+ );
7818
+ const authentication = Object.assign(
7819
+ {
7820
+ clientType,
7821
+ clientId,
7822
+ clientSecret,
7823
+ token: response.data.token
7710
7824
  },
7711
- client_id: clientId,
7712
- access_token: token,
7713
- ...requestOptions
7714
- });
7715
- const authentication = Object.assign({
7716
- clientType,
7717
- clientId,
7718
- clientSecret,
7719
- token: response.data.token
7720
- }, response.data.expires_at ? {
7721
- expiresAt: response.data.expires_at
7722
- } : {});
7723
- return {
7724
- ...response,
7725
- authentication
7726
- };
7825
+ response.data.expires_at ? { expiresAt: response.data.expires_at } : {}
7826
+ );
7827
+ return { ...response, authentication };
7727
7828
  }
7829
+ var import_request8 = require_dist_node5();
7830
+ var import_btoa_lite3 = __toESM2(require_btoa_node());
7728
7831
  async function resetToken(options) {
7729
- const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7730
- request.request;
7731
- const auth = btoa(`${options.clientId}:${options.clientSecret}`);
7732
- const response = await request$1("PATCH /applications/{client_id}/token", {
7733
- headers: {
7734
- authorization: `basic ${auth}`
7735
- },
7736
- client_id: options.clientId,
7737
- access_token: options.token
7738
- });
7832
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7833
+ import_request8.request;
7834
+ const auth = (0, import_btoa_lite3.default)(`${options.clientId}:${options.clientSecret}`);
7835
+ const response = await request(
7836
+ "PATCH /applications/{client_id}/token",
7837
+ {
7838
+ headers: {
7839
+ authorization: `basic ${auth}`
7840
+ },
7841
+ client_id: options.clientId,
7842
+ access_token: options.token
7843
+ }
7844
+ );
7739
7845
  const authentication = {
7740
7846
  clientType: options.clientType,
7741
7847
  clientId: options.clientId,
@@ -7748,64 +7854,79 @@ var require_dist_node7 = __commonJS({
7748
7854
  if (options.clientType === "github-app") {
7749
7855
  delete authentication.scopes;
7750
7856
  }
7751
- return {
7752
- ...response,
7753
- authentication
7754
- };
7857
+ return { ...response, authentication };
7755
7858
  }
7859
+ var import_request9 = require_dist_node5();
7860
+ var import_btoa_lite4 = __toESM2(require_btoa_node());
7756
7861
  async function deleteToken(options) {
7757
- const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7758
- request.request;
7759
- const auth = btoa(`${options.clientId}:${options.clientSecret}`);
7760
- return request$1("DELETE /applications/{client_id}/token", {
7761
- headers: {
7762
- authorization: `basic ${auth}`
7763
- },
7764
- client_id: options.clientId,
7765
- access_token: options.token
7766
- });
7862
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7863
+ import_request9.request;
7864
+ const auth = (0, import_btoa_lite4.default)(`${options.clientId}:${options.clientSecret}`);
7865
+ return request(
7866
+ "DELETE /applications/{client_id}/token",
7867
+ {
7868
+ headers: {
7869
+ authorization: `basic ${auth}`
7870
+ },
7871
+ client_id: options.clientId,
7872
+ access_token: options.token
7873
+ }
7874
+ );
7767
7875
  }
7876
+ var import_request10 = require_dist_node5();
7877
+ var import_btoa_lite5 = __toESM2(require_btoa_node());
7768
7878
  async function deleteAuthorization(options) {
7769
- const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7770
- request.request;
7771
- const auth = btoa(`${options.clientId}:${options.clientSecret}`);
7772
- return request$1("DELETE /applications/{client_id}/grant", {
7773
- headers: {
7774
- authorization: `basic ${auth}`
7775
- },
7776
- client_id: options.clientId,
7777
- access_token: options.token
7778
- });
7879
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7880
+ import_request10.request;
7881
+ const auth = (0, import_btoa_lite5.default)(`${options.clientId}:${options.clientSecret}`);
7882
+ return request(
7883
+ "DELETE /applications/{client_id}/grant",
7884
+ {
7885
+ headers: {
7886
+ authorization: `basic ${auth}`
7887
+ },
7888
+ client_id: options.clientId,
7889
+ access_token: options.token
7890
+ }
7891
+ );
7779
7892
  }
7780
- exports2.VERSION = VERSION;
7781
- exports2.checkToken = checkToken;
7782
- exports2.createDeviceCode = createDeviceCode;
7783
- exports2.deleteAuthorization = deleteAuthorization;
7784
- exports2.deleteToken = deleteToken;
7785
- exports2.exchangeDeviceCode = exchangeDeviceCode;
7786
- exports2.exchangeWebFlowCode = exchangeWebFlowCode;
7787
- exports2.getWebFlowAuthorizationUrl = getWebFlowAuthorizationUrl;
7788
- exports2.refreshToken = refreshToken;
7789
- exports2.resetToken = resetToken;
7790
- exports2.scopeToken = scopeToken;
7791
7893
  }
7792
7894
  });
7793
7895
 
7794
7896
  // node_modules/@octokit/auth-oauth-device/dist-node/index.js
7795
7897
  var require_dist_node8 = __commonJS({
7796
- "node_modules/@octokit/auth-oauth-device/dist-node/index.js"(exports2) {
7898
+ "node_modules/@octokit/auth-oauth-device/dist-node/index.js"(exports2, module2) {
7797
7899
  "use strict";
7798
- Object.defineProperty(exports2, "__esModule", { value: true });
7799
- var universalUserAgent = require_dist_node();
7800
- var request = require_dist_node5();
7801
- var oauthMethods = require_dist_node7();
7900
+ var __defProp2 = Object.defineProperty;
7901
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
7902
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
7903
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
7904
+ var __export = (target, all) => {
7905
+ for (var name in all)
7906
+ __defProp2(target, name, { get: all[name], enumerable: true });
7907
+ };
7908
+ var __copyProps2 = (to, from, except, desc) => {
7909
+ if (from && typeof from === "object" || typeof from === "function") {
7910
+ for (let key of __getOwnPropNames2(from))
7911
+ if (!__hasOwnProp2.call(to, key) && key !== except)
7912
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
7913
+ }
7914
+ return to;
7915
+ };
7916
+ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
7917
+ var dist_src_exports = {};
7918
+ __export(dist_src_exports, {
7919
+ createOAuthDeviceAuth: () => createOAuthDeviceAuth
7920
+ });
7921
+ module2.exports = __toCommonJS(dist_src_exports);
7922
+ var import_universal_user_agent = require_dist_node();
7923
+ var import_request = require_dist_node5();
7924
+ var import_oauth_methods = require_dist_node7();
7802
7925
  async function getOAuthAccessToken(state, options) {
7803
7926
  const cachedAuthentication = getCachedAuthentication(state, options.auth);
7804
7927
  if (cachedAuthentication)
7805
7928
  return cachedAuthentication;
7806
- const {
7807
- data: verification
7808
- } = await oauthMethods.createDeviceCode({
7929
+ const { data: verification } = await (0, import_oauth_methods.createDeviceCode)({
7809
7930
  clientType: state.clientType,
7810
7931
  clientId: state.clientId,
7811
7932
  request: options.request || state.request,
@@ -7813,7 +7934,12 @@ var require_dist_node8 = __commonJS({
7813
7934
  scopes: options.auth.scopes || state.scopes
7814
7935
  });
7815
7936
  await state.onVerification(verification);
7816
- const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification);
7937
+ const authentication = await waitForAccessToken(
7938
+ options.request || state.request,
7939
+ state.clientId,
7940
+ state.clientType,
7941
+ verification
7942
+ );
7817
7943
  state.authentication = authentication;
7818
7944
  return authentication;
7819
7945
  }
@@ -7826,26 +7952,26 @@ var require_dist_node8 = __commonJS({
7826
7952
  return state.authentication;
7827
7953
  }
7828
7954
  const authentication = state.authentication;
7829
- const newScope = ("scopes" in auth2 && auth2.scopes || state.scopes).join(" ");
7955
+ const newScope = ("scopes" in auth2 && auth2.scopes || state.scopes).join(
7956
+ " "
7957
+ );
7830
7958
  const currentScope = authentication.scopes.join(" ");
7831
7959
  return newScope === currentScope ? authentication : false;
7832
7960
  }
7833
7961
  async function wait(seconds) {
7834
7962
  await new Promise((resolve) => setTimeout(resolve, seconds * 1e3));
7835
7963
  }
7836
- async function waitForAccessToken(request2, clientId, clientType, verification) {
7964
+ async function waitForAccessToken(request, clientId, clientType, verification) {
7837
7965
  try {
7838
7966
  const options = {
7839
7967
  clientId,
7840
- request: request2,
7968
+ request,
7841
7969
  code: verification.device_code
7842
7970
  };
7843
- const {
7844
- authentication
7845
- } = clientType === "oauth-app" ? await oauthMethods.exchangeDeviceCode({
7971
+ const { authentication } = clientType === "oauth-app" ? await (0, import_oauth_methods.exchangeDeviceCode)({
7846
7972
  ...options,
7847
7973
  clientType: "oauth-app"
7848
- }) : await oauthMethods.exchangeDeviceCode({
7974
+ }) : await (0, import_oauth_methods.exchangeDeviceCode)({
7849
7975
  ...options,
7850
7976
  clientType: "github-app"
7851
7977
  });
@@ -7860,11 +7986,11 @@ var require_dist_node8 = __commonJS({
7860
7986
  const errorType = error.response.data.error;
7861
7987
  if (errorType === "authorization_pending") {
7862
7988
  await wait(verification.interval);
7863
- return waitForAccessToken(request2, clientId, clientType, verification);
7989
+ return waitForAccessToken(request, clientId, clientType, verification);
7864
7990
  }
7865
7991
  if (errorType === "slow_down") {
7866
7992
  await wait(verification.interval + 5);
7867
- return waitForAccessToken(request2, clientId, clientType, verification);
7993
+ return waitForAccessToken(request, clientId, clientType, verification);
7868
7994
  }
7869
7995
  throw error;
7870
7996
  }
@@ -7874,76 +8000,101 @@ var require_dist_node8 = __commonJS({
7874
8000
  auth: authOptions
7875
8001
  });
7876
8002
  }
7877
- async function hook(state, request2, route, parameters) {
7878
- let endpoint = request2.endpoint.merge(route, parameters);
8003
+ async function hook(state, request, route, parameters) {
8004
+ let endpoint = request.endpoint.merge(
8005
+ route,
8006
+ parameters
8007
+ );
7879
8008
  if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
7880
- return request2(endpoint);
8009
+ return request(endpoint);
7881
8010
  }
7882
- const {
7883
- token
7884
- } = await getOAuthAccessToken(state, {
7885
- request: request2,
7886
- auth: {
7887
- type: "oauth"
7888
- }
8011
+ const { token } = await getOAuthAccessToken(state, {
8012
+ request,
8013
+ auth: { type: "oauth" }
7889
8014
  });
7890
8015
  endpoint.headers.authorization = `token ${token}`;
7891
- return request2(endpoint);
8016
+ return request(endpoint);
7892
8017
  }
7893
- var VERSION = "4.0.4";
8018
+ var VERSION = "4.0.5";
7894
8019
  function createOAuthDeviceAuth(options) {
7895
- const requestWithDefaults = options.request || request.request.defaults({
8020
+ const requestWithDefaults = options.request || import_request.request.defaults({
7896
8021
  headers: {
7897
- "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${universalUserAgent.getUserAgent()}`
8022
+ "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
7898
8023
  }
7899
8024
  });
7900
- const {
7901
- request: request$1 = requestWithDefaults,
7902
- ...otherOptions
7903
- } = options;
8025
+ const { request = requestWithDefaults, ...otherOptions } = options;
7904
8026
  const state = options.clientType === "github-app" ? {
7905
8027
  ...otherOptions,
7906
8028
  clientType: "github-app",
7907
- request: request$1
8029
+ request
7908
8030
  } : {
7909
8031
  ...otherOptions,
7910
8032
  clientType: "oauth-app",
7911
- request: request$1,
8033
+ request,
7912
8034
  scopes: options.scopes || []
7913
8035
  };
7914
8036
  if (!options.clientId) {
7915
- throw new Error('[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)');
8037
+ throw new Error(
8038
+ '[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)'
8039
+ );
7916
8040
  }
7917
8041
  if (!options.onVerification) {
7918
- throw new Error('[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)');
8042
+ throw new Error(
8043
+ '[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)'
8044
+ );
7919
8045
  }
7920
8046
  return Object.assign(auth.bind(null, state), {
7921
8047
  hook: hook.bind(null, state)
7922
8048
  });
7923
8049
  }
7924
- exports2.createOAuthDeviceAuth = createOAuthDeviceAuth;
7925
8050
  }
7926
8051
  });
7927
8052
 
7928
8053
  // node_modules/@octokit/auth-oauth-user/dist-node/index.js
7929
8054
  var require_dist_node9 = __commonJS({
7930
- "node_modules/@octokit/auth-oauth-user/dist-node/index.js"(exports2) {
8055
+ "node_modules/@octokit/auth-oauth-user/dist-node/index.js"(exports2, module2) {
7931
8056
  "use strict";
7932
- Object.defineProperty(exports2, "__esModule", { value: true });
7933
- function _interopDefault(ex) {
7934
- return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
7935
- }
7936
- var universalUserAgent = require_dist_node();
7937
- var request = require_dist_node5();
7938
- var authOauthDevice = require_dist_node8();
7939
- var oauthMethods = require_dist_node7();
7940
- var btoa = _interopDefault(require_btoa_node());
7941
- var VERSION = "2.1.1";
8057
+ var __create2 = Object.create;
8058
+ var __defProp2 = Object.defineProperty;
8059
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
8060
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
8061
+ var __getProtoOf2 = Object.getPrototypeOf;
8062
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
8063
+ var __export = (target, all) => {
8064
+ for (var name in all)
8065
+ __defProp2(target, name, { get: all[name], enumerable: true });
8066
+ };
8067
+ var __copyProps2 = (to, from, except, desc) => {
8068
+ if (from && typeof from === "object" || typeof from === "function") {
8069
+ for (let key of __getOwnPropNames2(from))
8070
+ if (!__hasOwnProp2.call(to, key) && key !== except)
8071
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
8072
+ }
8073
+ return to;
8074
+ };
8075
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
8076
+ // If the importer is in node compatibility mode or this is not an ESM
8077
+ // file that has been converted to a CommonJS file using a Babel-
8078
+ // compatible transform (i.e. "__esModule" has not been set), then set
8079
+ // "default" to the CommonJS "module.exports" for node compatibility.
8080
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
8081
+ mod
8082
+ ));
8083
+ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
8084
+ var dist_src_exports = {};
8085
+ __export(dist_src_exports, {
8086
+ createOAuthUserAuth: () => createOAuthUserAuth2,
8087
+ requiresBasicAuth: () => requiresBasicAuth
8088
+ });
8089
+ module2.exports = __toCommonJS(dist_src_exports);
8090
+ var import_universal_user_agent = require_dist_node();
8091
+ var import_request = require_dist_node5();
8092
+ var VERSION = "2.1.2";
8093
+ var import_auth_oauth_device = require_dist_node8();
8094
+ var import_oauth_methods = require_dist_node7();
7942
8095
  async function getAuthentication(state) {
7943
8096
  if ("code" in state.strategyOptions) {
7944
- const {
7945
- authentication
7946
- } = await oauthMethods.exchangeWebFlowCode({
8097
+ const { authentication } = await (0, import_oauth_methods.exchangeWebFlowCode)({
7947
8098
  clientId: state.clientId,
7948
8099
  clientSecret: state.clientSecret,
7949
8100
  clientType: state.clientType,
@@ -7958,7 +8109,7 @@ var require_dist_node9 = __commonJS({
7958
8109
  };
7959
8110
  }
7960
8111
  if ("onVerification" in state.strategyOptions) {
7961
- const deviceAuth = authOauthDevice.createOAuthDeviceAuth({
8112
+ const deviceAuth = (0, import_auth_oauth_device.createOAuthDeviceAuth)({
7962
8113
  clientType: state.clientType,
7963
8114
  clientId: state.clientId,
7964
8115
  onTokenCreated: state.onTokenCreated,
@@ -7986,7 +8137,9 @@ var require_dist_node9 = __commonJS({
7986
8137
  }
7987
8138
  throw new Error("[@octokit/auth-oauth-user] Invalid strategy options");
7988
8139
  }
8140
+ var import_oauth_methods2 = require_dist_node7();
7989
8141
  async function auth(state, options = {}) {
8142
+ var _a, _b;
7990
8143
  if (!state.authentication) {
7991
8144
  state.authentication = state.clientType === "oauth-app" ? await getAuthentication(state) : await getAuthentication(state);
7992
8145
  }
@@ -7996,9 +8149,7 @@ var require_dist_node9 = __commonJS({
7996
8149
  const currentAuthentication = state.authentication;
7997
8150
  if ("expiresAt" in currentAuthentication) {
7998
8151
  if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < /* @__PURE__ */ new Date()) {
7999
- const {
8000
- authentication
8001
- } = await oauthMethods.refreshToken({
8152
+ const { authentication } = await (0, import_oauth_methods2.refreshToken)({
8002
8153
  clientType: "github-app",
8003
8154
  clientId: state.clientId,
8004
8155
  clientSecret: state.clientSecret,
@@ -8013,23 +8164,22 @@ var require_dist_node9 = __commonJS({
8013
8164
  }
8014
8165
  }
8015
8166
  if (options.type === "refresh") {
8016
- var _state$onTokenCreated;
8017
8167
  if (state.clientType === "oauth-app") {
8018
- throw new Error("[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens");
8168
+ throw new Error(
8169
+ "[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens"
8170
+ );
8019
8171
  }
8020
8172
  if (!currentAuthentication.hasOwnProperty("expiresAt")) {
8021
8173
  throw new Error("[@octokit/auth-oauth-user] Refresh token missing");
8022
8174
  }
8023
- await ((_state$onTokenCreated = state.onTokenCreated) === null || _state$onTokenCreated === void 0 ? void 0 : _state$onTokenCreated.call(state, state.authentication, {
8175
+ await ((_a = state.onTokenCreated) == null ? void 0 : _a.call(state, state.authentication, {
8024
8176
  type: options.type
8025
8177
  }));
8026
8178
  }
8027
8179
  if (options.type === "check" || options.type === "reset") {
8028
- const method = options.type === "check" ? oauthMethods.checkToken : oauthMethods.resetToken;
8180
+ const method = options.type === "check" ? import_oauth_methods2.checkToken : import_oauth_methods2.resetToken;
8029
8181
  try {
8030
- const {
8031
- authentication
8032
- } = await method({
8182
+ const { authentication } = await method({
8033
8183
  // @ts-expect-error making TS happy would require unnecessary code so no
8034
8184
  clientType: state.clientType,
8035
8185
  clientId: state.clientId,
@@ -8044,8 +8194,7 @@ var require_dist_node9 = __commonJS({
8044
8194
  ...authentication
8045
8195
  };
8046
8196
  if (options.type === "reset") {
8047
- var _state$onTokenCreated2;
8048
- await ((_state$onTokenCreated2 = state.onTokenCreated) === null || _state$onTokenCreated2 === void 0 ? void 0 : _state$onTokenCreated2.call(state, state.authentication, {
8197
+ await ((_b = state.onTokenCreated) == null ? void 0 : _b.call(state, state.authentication, {
8049
8198
  type: options.type
8050
8199
  }));
8051
8200
  }
@@ -8059,7 +8208,7 @@ var require_dist_node9 = __commonJS({
8059
8208
  }
8060
8209
  }
8061
8210
  if (options.type === "delete" || options.type === "deleteAuthorization") {
8062
- const method = options.type === "delete" ? oauthMethods.deleteToken : oauthMethods.deleteAuthorization;
8211
+ const method = options.type === "delete" ? import_oauth_methods2.deleteToken : import_oauth_methods2.deleteAuthorization;
8063
8212
  try {
8064
8213
  await method({
8065
8214
  // @ts-expect-error making TS happy would require unnecessary code so no
@@ -8078,39 +8227,35 @@ var require_dist_node9 = __commonJS({
8078
8227
  }
8079
8228
  return state.authentication;
8080
8229
  }
8230
+ var import_btoa_lite = __toESM2(require_btoa_node());
8081
8231
  var ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/;
8082
8232
  function requiresBasicAuth(url) {
8083
8233
  return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);
8084
8234
  }
8085
- async function hook(state, request2, route, parameters = {}) {
8086
- const endpoint = request2.endpoint.merge(route, parameters);
8235
+ async function hook(state, request, route, parameters = {}) {
8236
+ const endpoint = request.endpoint.merge(
8237
+ route,
8238
+ parameters
8239
+ );
8087
8240
  if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
8088
- return request2(endpoint);
8241
+ return request(endpoint);
8089
8242
  }
8090
8243
  if (requiresBasicAuth(endpoint.url)) {
8091
- const credentials = btoa(`${state.clientId}:${state.clientSecret}`);
8244
+ const credentials = (0, import_btoa_lite.default)(`${state.clientId}:${state.clientSecret}`);
8092
8245
  endpoint.headers.authorization = `basic ${credentials}`;
8093
- return request2(endpoint);
8246
+ return request(endpoint);
8094
8247
  }
8095
- const {
8096
- token
8097
- } = state.clientType === "oauth-app" ? await auth({
8098
- ...state,
8099
- request: request2
8100
- }) : await auth({
8101
- ...state,
8102
- request: request2
8103
- });
8248
+ const { token } = state.clientType === "oauth-app" ? await auth({ ...state, request }) : await auth({ ...state, request });
8104
8249
  endpoint.headers.authorization = "token " + token;
8105
- return request2(endpoint);
8250
+ return request(endpoint);
8106
8251
  }
8107
8252
  function createOAuthUserAuth2({
8108
8253
  clientId,
8109
8254
  clientSecret,
8110
8255
  clientType = "oauth-app",
8111
- request: request$1 = request.request.defaults({
8256
+ request = import_request.request.defaults({
8112
8257
  headers: {
8113
- "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${universalUserAgent.getUserAgent()}`
8258
+ "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
8114
8259
  }
8115
8260
  }),
8116
8261
  onTokenCreated,
@@ -8122,7 +8267,7 @@ var require_dist_node9 = __commonJS({
8122
8267
  clientSecret,
8123
8268
  onTokenCreated,
8124
8269
  strategyOptions,
8125
- request: request$1
8270
+ request
8126
8271
  });
8127
8272
  return Object.assign(auth.bind(null, state), {
8128
8273
  // @ts-expect-error not worth the extra code needed to appease TS
@@ -8130,23 +8275,50 @@ var require_dist_node9 = __commonJS({
8130
8275
  });
8131
8276
  }
8132
8277
  createOAuthUserAuth2.VERSION = VERSION;
8133
- exports2.createOAuthUserAuth = createOAuthUserAuth2;
8134
- exports2.requiresBasicAuth = requiresBasicAuth;
8135
8278
  }
8136
8279
  });
8137
8280
 
8138
8281
  // node_modules/@octokit/auth-oauth-app/dist-node/index.js
8139
8282
  var require_dist_node10 = __commonJS({
8140
- "node_modules/@octokit/auth-oauth-app/dist-node/index.js"(exports2) {
8283
+ "node_modules/@octokit/auth-oauth-app/dist-node/index.js"(exports2, module2) {
8141
8284
  "use strict";
8142
- Object.defineProperty(exports2, "__esModule", { value: true });
8143
- function _interopDefault(ex) {
8144
- return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
8145
- }
8146
- var universalUserAgent = require_dist_node();
8147
- var request = require_dist_node5();
8148
- var btoa = _interopDefault(require_btoa_node());
8149
- var authOauthUser = require_dist_node9();
8285
+ var __create2 = Object.create;
8286
+ var __defProp2 = Object.defineProperty;
8287
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
8288
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
8289
+ var __getProtoOf2 = Object.getPrototypeOf;
8290
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
8291
+ var __export = (target, all) => {
8292
+ for (var name in all)
8293
+ __defProp2(target, name, { get: all[name], enumerable: true });
8294
+ };
8295
+ var __copyProps2 = (to, from, except, desc) => {
8296
+ if (from && typeof from === "object" || typeof from === "function") {
8297
+ for (let key of __getOwnPropNames2(from))
8298
+ if (!__hasOwnProp2.call(to, key) && key !== except)
8299
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
8300
+ }
8301
+ return to;
8302
+ };
8303
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
8304
+ // If the importer is in node compatibility mode or this is not an ESM
8305
+ // file that has been converted to a CommonJS file using a Babel-
8306
+ // compatible transform (i.e. "__esModule" has not been set), then set
8307
+ // "default" to the CommonJS "module.exports" for node compatibility.
8308
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
8309
+ mod
8310
+ ));
8311
+ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
8312
+ var dist_src_exports = {};
8313
+ __export(dist_src_exports, {
8314
+ createOAuthAppAuth: () => createOAuthAppAuth,
8315
+ createOAuthUserAuth: () => import_auth_oauth_user3.createOAuthUserAuth
8316
+ });
8317
+ module2.exports = __toCommonJS(dist_src_exports);
8318
+ var import_universal_user_agent = require_dist_node();
8319
+ var import_request = require_dist_node5();
8320
+ var import_btoa_lite = __toESM2(require_btoa_node());
8321
+ var import_auth_oauth_user = require_dist_node9();
8150
8322
  async function auth(state, authOptions) {
8151
8323
  if (authOptions.type === "oauth-app") {
8152
8324
  return {
@@ -8155,15 +8327,14 @@ var require_dist_node10 = __commonJS({
8155
8327
  clientSecret: state.clientSecret,
8156
8328
  clientType: state.clientType,
8157
8329
  headers: {
8158
- authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`
8330
+ authorization: `basic ${(0, import_btoa_lite.default)(
8331
+ `${state.clientId}:${state.clientSecret}`
8332
+ )}`
8159
8333
  }
8160
8334
  };
8161
8335
  }
8162
8336
  if ("factory" in authOptions) {
8163
- const {
8164
- type,
8165
- ...options
8166
- } = {
8337
+ const { type, ...options } = {
8167
8338
  ...authOptions,
8168
8339
  ...state
8169
8340
  };
@@ -8175,24 +8346,31 @@ var require_dist_node10 = __commonJS({
8175
8346
  request: state.request,
8176
8347
  ...authOptions
8177
8348
  };
8178
- const userAuth = state.clientType === "oauth-app" ? await authOauthUser.createOAuthUserAuth({
8349
+ const userAuth = state.clientType === "oauth-app" ? await (0, import_auth_oauth_user.createOAuthUserAuth)({
8179
8350
  ...common,
8180
8351
  clientType: state.clientType
8181
- }) : await authOauthUser.createOAuthUserAuth({
8352
+ }) : await (0, import_auth_oauth_user.createOAuthUserAuth)({
8182
8353
  ...common,
8183
8354
  clientType: state.clientType
8184
8355
  });
8185
8356
  return userAuth();
8186
8357
  }
8358
+ var import_btoa_lite2 = __toESM2(require_btoa_node());
8359
+ var import_auth_oauth_user2 = require_dist_node9();
8187
8360
  async function hook(state, request2, route, parameters) {
8188
- let endpoint = request2.endpoint.merge(route, parameters);
8361
+ let endpoint = request2.endpoint.merge(
8362
+ route,
8363
+ parameters
8364
+ );
8189
8365
  if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
8190
8366
  return request2(endpoint);
8191
8367
  }
8192
- if (state.clientType === "github-app" && !authOauthUser.requiresBasicAuth(endpoint.url)) {
8193
- throw new Error(`[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint.method} ${endpoint.url}" is not supported.`);
8368
+ if (state.clientType === "github-app" && !(0, import_auth_oauth_user2.requiresBasicAuth)(endpoint.url)) {
8369
+ throw new Error(
8370
+ `[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint.method} ${endpoint.url}" is not supported.`
8371
+ );
8194
8372
  }
8195
- const credentials = btoa(`${state.clientId}:${state.clientSecret}`);
8373
+ const credentials = (0, import_btoa_lite2.default)(`${state.clientId}:${state.clientSecret}`);
8196
8374
  endpoint.headers.authorization = `basic ${credentials}`;
8197
8375
  try {
8198
8376
  return await request2(endpoint);
@@ -8203,33 +8381,31 @@ var require_dist_node10 = __commonJS({
8203
8381
  throw error;
8204
8382
  }
8205
8383
  }
8206
- var VERSION = "5.0.5";
8384
+ var VERSION = "5.0.6";
8385
+ var import_auth_oauth_user3 = require_dist_node9();
8207
8386
  function createOAuthAppAuth(options) {
8208
- const state = Object.assign({
8209
- request: request.request.defaults({
8210
- headers: {
8211
- "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${universalUserAgent.getUserAgent()}`
8212
- }
8213
- }),
8214
- clientType: "oauth-app"
8215
- }, options);
8387
+ const state = Object.assign(
8388
+ {
8389
+ request: import_request.request.defaults({
8390
+ headers: {
8391
+ "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
8392
+ }
8393
+ }),
8394
+ clientType: "oauth-app"
8395
+ },
8396
+ options
8397
+ );
8216
8398
  return Object.assign(auth.bind(null, state), {
8217
8399
  hook: hook.bind(null, state)
8218
8400
  });
8219
8401
  }
8220
- Object.defineProperty(exports2, "createOAuthUserAuth", {
8221
- enumerable: true,
8222
- get: function() {
8223
- return authOauthUser.createOAuthUserAuth;
8224
- }
8225
- });
8226
- exports2.createOAuthAppAuth = createOAuthAppAuth;
8227
8402
  }
8228
8403
  });
8229
8404
 
8230
8405
  // node_modules/jsonwebtoken/lib/JsonWebTokenError.js
8231
8406
  var require_JsonWebTokenError = __commonJS({
8232
8407
  "node_modules/jsonwebtoken/lib/JsonWebTokenError.js"(exports2, module2) {
8408
+ "use strict";
8233
8409
  var JsonWebTokenError = function(message, error) {
8234
8410
  Error.call(this, message);
8235
8411
  if (Error.captureStackTrace) {
@@ -8249,6 +8425,7 @@ var require_JsonWebTokenError = __commonJS({
8249
8425
  // node_modules/jsonwebtoken/lib/NotBeforeError.js
8250
8426
  var require_NotBeforeError = __commonJS({
8251
8427
  "node_modules/jsonwebtoken/lib/NotBeforeError.js"(exports2, module2) {
8428
+ "use strict";
8252
8429
  var JsonWebTokenError = require_JsonWebTokenError();
8253
8430
  var NotBeforeError = function(message, date) {
8254
8431
  JsonWebTokenError.call(this, message);
@@ -8264,6 +8441,7 @@ var require_NotBeforeError = __commonJS({
8264
8441
  // node_modules/jsonwebtoken/lib/TokenExpiredError.js
8265
8442
  var require_TokenExpiredError = __commonJS({
8266
8443
  "node_modules/jsonwebtoken/lib/TokenExpiredError.js"(exports2, module2) {
8444
+ "use strict";
8267
8445
  var JsonWebTokenError = require_JsonWebTokenError();
8268
8446
  var TokenExpiredError = function(message, expiredAt) {
8269
8447
  JsonWebTokenError.call(this, message);
@@ -8279,6 +8457,7 @@ var require_TokenExpiredError = __commonJS({
8279
8457
  // node_modules/safe-buffer/index.js
8280
8458
  var require_safe_buffer = __commonJS({
8281
8459
  "node_modules/safe-buffer/index.js"(exports2, module2) {
8460
+ "use strict";
8282
8461
  var buffer = require("buffer");
8283
8462
  var Buffer2 = buffer.Buffer;
8284
8463
  function copyProps(src, dst) {
@@ -8337,6 +8516,7 @@ var require_safe_buffer = __commonJS({
8337
8516
  // node_modules/jws/lib/data-stream.js
8338
8517
  var require_data_stream = __commonJS({
8339
8518
  "node_modules/jws/lib/data-stream.js"(exports2, module2) {
8519
+ "use strict";
8340
8520
  var Buffer2 = require_safe_buffer().Buffer;
8341
8521
  var Stream = require("stream");
8342
8522
  var util = require("util");
@@ -8583,6 +8763,7 @@ var require_ecdsa_sig_formatter = __commonJS({
8583
8763
  // node_modules/jwa/index.js
8584
8764
  var require_jwa = __commonJS({
8585
8765
  "node_modules/jwa/index.js"(exports2, module2) {
8766
+ "use strict";
8586
8767
  var bufferEqual = require_buffer_equal_constant_time();
8587
8768
  var Buffer2 = require_safe_buffer().Buffer;
8588
8769
  var crypto = require("crypto");
@@ -8796,6 +8977,7 @@ var require_jwa = __commonJS({
8796
8977
  // node_modules/jws/lib/tostring.js
8797
8978
  var require_tostring = __commonJS({
8798
8979
  "node_modules/jws/lib/tostring.js"(exports2, module2) {
8980
+ "use strict";
8799
8981
  var Buffer2 = require("buffer").Buffer;
8800
8982
  module2.exports = function toString(obj) {
8801
8983
  if (typeof obj === "string")
@@ -8810,6 +8992,7 @@ var require_tostring = __commonJS({
8810
8992
  // node_modules/jws/lib/sign-stream.js
8811
8993
  var require_sign_stream = __commonJS({
8812
8994
  "node_modules/jws/lib/sign-stream.js"(exports2, module2) {
8995
+ "use strict";
8813
8996
  var Buffer2 = require_safe_buffer().Buffer;
8814
8997
  var DataStream = require_data_stream();
8815
8998
  var jwa = require_jwa();
@@ -8880,6 +9063,7 @@ var require_sign_stream = __commonJS({
8880
9063
  // node_modules/jws/lib/verify-stream.js
8881
9064
  var require_verify_stream = __commonJS({
8882
9065
  "node_modules/jws/lib/verify-stream.js"(exports2, module2) {
9066
+ "use strict";
8883
9067
  var Buffer2 = require_safe_buffer().Buffer;
8884
9068
  var DataStream = require_data_stream();
8885
9069
  var jwa = require_jwa();
@@ -8990,6 +9174,7 @@ var require_verify_stream = __commonJS({
8990
9174
  // node_modules/jws/index.js
8991
9175
  var require_jws = __commonJS({
8992
9176
  "node_modules/jws/index.js"(exports2) {
9177
+ "use strict";
8993
9178
  var SignStream = require_sign_stream();
8994
9179
  var VerifyStream = require_verify_stream();
8995
9180
  var ALGORITHMS = [
@@ -9023,6 +9208,7 @@ var require_jws = __commonJS({
9023
9208
  // node_modules/jsonwebtoken/decode.js
9024
9209
  var require_decode = __commonJS({
9025
9210
  "node_modules/jsonwebtoken/decode.js"(exports2, module2) {
9211
+ "use strict";
9026
9212
  var jws = require_jws();
9027
9213
  module2.exports = function(jwt, options) {
9028
9214
  options = options || {};
@@ -9055,6 +9241,7 @@ var require_decode = __commonJS({
9055
9241
  // node_modules/ms/index.js
9056
9242
  var require_ms = __commonJS({
9057
9243
  "node_modules/ms/index.js"(exports2, module2) {
9244
+ "use strict";
9058
9245
  var s = 1e3;
9059
9246
  var m = s * 60;
9060
9247
  var h = m * 60;
@@ -9171,6 +9358,7 @@ var require_ms = __commonJS({
9171
9358
  // node_modules/jsonwebtoken/lib/timespan.js
9172
9359
  var require_timespan = __commonJS({
9173
9360
  "node_modules/jsonwebtoken/lib/timespan.js"(exports2, module2) {
9361
+ "use strict";
9174
9362
  var ms = require_ms();
9175
9363
  module2.exports = function(time, iat) {
9176
9364
  var timestamp = iat || Math.floor(Date.now() / 1e3);
@@ -9192,6 +9380,7 @@ var require_timespan = __commonJS({
9192
9380
  // node_modules/semver/internal/constants.js
9193
9381
  var require_constants = __commonJS({
9194
9382
  "node_modules/semver/internal/constants.js"(exports2, module2) {
9383
+ "use strict";
9195
9384
  var SEMVER_SPEC_VERSION = "2.0.0";
9196
9385
  var MAX_LENGTH = 256;
9197
9386
  var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
@@ -9221,6 +9410,7 @@ var require_constants = __commonJS({
9221
9410
  // node_modules/semver/internal/debug.js
9222
9411
  var require_debug = __commonJS({
9223
9412
  "node_modules/semver/internal/debug.js"(exports2, module2) {
9413
+ "use strict";
9224
9414
  var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
9225
9415
  };
9226
9416
  module2.exports = debug;
@@ -9230,6 +9420,7 @@ var require_debug = __commonJS({
9230
9420
  // node_modules/semver/internal/re.js
9231
9421
  var require_re = __commonJS({
9232
9422
  "node_modules/semver/internal/re.js"(exports2, module2) {
9423
+ "use strict";
9233
9424
  var { MAX_SAFE_COMPONENT_LENGTH } = require_constants();
9234
9425
  var debug = require_debug();
9235
9426
  exports2 = module2.exports = {};
@@ -9293,6 +9484,7 @@ var require_re = __commonJS({
9293
9484
  // node_modules/semver/internal/parse-options.js
9294
9485
  var require_parse_options = __commonJS({
9295
9486
  "node_modules/semver/internal/parse-options.js"(exports2, module2) {
9487
+ "use strict";
9296
9488
  var looseOption = Object.freeze({ loose: true });
9297
9489
  var emptyOpts = Object.freeze({});
9298
9490
  var parseOptions = (options) => {
@@ -9311,6 +9503,7 @@ var require_parse_options = __commonJS({
9311
9503
  // node_modules/semver/internal/identifiers.js
9312
9504
  var require_identifiers = __commonJS({
9313
9505
  "node_modules/semver/internal/identifiers.js"(exports2, module2) {
9506
+ "use strict";
9314
9507
  var numeric = /^[0-9]+$/;
9315
9508
  var compareIdentifiers = (a, b) => {
9316
9509
  const anum = numeric.test(a);
@@ -9332,6 +9525,7 @@ var require_identifiers = __commonJS({
9332
9525
  // node_modules/semver/classes/semver.js
9333
9526
  var require_semver = __commonJS({
9334
9527
  "node_modules/semver/classes/semver.js"(exports2, module2) {
9528
+ "use strict";
9335
9529
  var debug = require_debug();
9336
9530
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
9337
9531
  var { re, t } = require_re();
@@ -9572,6 +9766,7 @@ var require_semver = __commonJS({
9572
9766
  // node_modules/semver/functions/parse.js
9573
9767
  var require_parse = __commonJS({
9574
9768
  "node_modules/semver/functions/parse.js"(exports2, module2) {
9769
+ "use strict";
9575
9770
  var SemVer = require_semver();
9576
9771
  var parse = (version, options, throwErrors = false) => {
9577
9772
  if (version instanceof SemVer) {
@@ -9593,6 +9788,7 @@ var require_parse = __commonJS({
9593
9788
  // node_modules/semver/functions/valid.js
9594
9789
  var require_valid = __commonJS({
9595
9790
  "node_modules/semver/functions/valid.js"(exports2, module2) {
9791
+ "use strict";
9596
9792
  var parse = require_parse();
9597
9793
  var valid = (version, options) => {
9598
9794
  const v = parse(version, options);
@@ -9605,6 +9801,7 @@ var require_valid = __commonJS({
9605
9801
  // node_modules/semver/functions/clean.js
9606
9802
  var require_clean = __commonJS({
9607
9803
  "node_modules/semver/functions/clean.js"(exports2, module2) {
9804
+ "use strict";
9608
9805
  var parse = require_parse();
9609
9806
  var clean = (version, options) => {
9610
9807
  const s = parse(version.trim().replace(/^[=v]+/, ""), options);
@@ -9617,6 +9814,7 @@ var require_clean = __commonJS({
9617
9814
  // node_modules/semver/functions/inc.js
9618
9815
  var require_inc = __commonJS({
9619
9816
  "node_modules/semver/functions/inc.js"(exports2, module2) {
9817
+ "use strict";
9620
9818
  var SemVer = require_semver();
9621
9819
  var inc = (version, release, options, identifier, identifierBase) => {
9622
9820
  if (typeof options === "string") {
@@ -9640,6 +9838,7 @@ var require_inc = __commonJS({
9640
9838
  // node_modules/semver/functions/diff.js
9641
9839
  var require_diff = __commonJS({
9642
9840
  "node_modules/semver/functions/diff.js"(exports2, module2) {
9841
+ "use strict";
9643
9842
  var parse = require_parse();
9644
9843
  var diff = (version1, version2) => {
9645
9844
  const v1 = parse(version1, null, true);
@@ -9680,6 +9879,7 @@ var require_diff = __commonJS({
9680
9879
  // node_modules/semver/functions/major.js
9681
9880
  var require_major = __commonJS({
9682
9881
  "node_modules/semver/functions/major.js"(exports2, module2) {
9882
+ "use strict";
9683
9883
  var SemVer = require_semver();
9684
9884
  var major = (a, loose) => new SemVer(a, loose).major;
9685
9885
  module2.exports = major;
@@ -9689,6 +9889,7 @@ var require_major = __commonJS({
9689
9889
  // node_modules/semver/functions/minor.js
9690
9890
  var require_minor = __commonJS({
9691
9891
  "node_modules/semver/functions/minor.js"(exports2, module2) {
9892
+ "use strict";
9692
9893
  var SemVer = require_semver();
9693
9894
  var minor = (a, loose) => new SemVer(a, loose).minor;
9694
9895
  module2.exports = minor;
@@ -9698,6 +9899,7 @@ var require_minor = __commonJS({
9698
9899
  // node_modules/semver/functions/patch.js
9699
9900
  var require_patch = __commonJS({
9700
9901
  "node_modules/semver/functions/patch.js"(exports2, module2) {
9902
+ "use strict";
9701
9903
  var SemVer = require_semver();
9702
9904
  var patch = (a, loose) => new SemVer(a, loose).patch;
9703
9905
  module2.exports = patch;
@@ -9707,6 +9909,7 @@ var require_patch = __commonJS({
9707
9909
  // node_modules/semver/functions/prerelease.js
9708
9910
  var require_prerelease = __commonJS({
9709
9911
  "node_modules/semver/functions/prerelease.js"(exports2, module2) {
9912
+ "use strict";
9710
9913
  var parse = require_parse();
9711
9914
  var prerelease = (version, options) => {
9712
9915
  const parsed = parse(version, options);
@@ -9719,6 +9922,7 @@ var require_prerelease = __commonJS({
9719
9922
  // node_modules/semver/functions/compare.js
9720
9923
  var require_compare = __commonJS({
9721
9924
  "node_modules/semver/functions/compare.js"(exports2, module2) {
9925
+ "use strict";
9722
9926
  var SemVer = require_semver();
9723
9927
  var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
9724
9928
  module2.exports = compare;
@@ -9728,6 +9932,7 @@ var require_compare = __commonJS({
9728
9932
  // node_modules/semver/functions/rcompare.js
9729
9933
  var require_rcompare = __commonJS({
9730
9934
  "node_modules/semver/functions/rcompare.js"(exports2, module2) {
9935
+ "use strict";
9731
9936
  var compare = require_compare();
9732
9937
  var rcompare = (a, b, loose) => compare(b, a, loose);
9733
9938
  module2.exports = rcompare;
@@ -9737,6 +9942,7 @@ var require_rcompare = __commonJS({
9737
9942
  // node_modules/semver/functions/compare-loose.js
9738
9943
  var require_compare_loose = __commonJS({
9739
9944
  "node_modules/semver/functions/compare-loose.js"(exports2, module2) {
9945
+ "use strict";
9740
9946
  var compare = require_compare();
9741
9947
  var compareLoose = (a, b) => compare(a, b, true);
9742
9948
  module2.exports = compareLoose;
@@ -9746,6 +9952,7 @@ var require_compare_loose = __commonJS({
9746
9952
  // node_modules/semver/functions/compare-build.js
9747
9953
  var require_compare_build = __commonJS({
9748
9954
  "node_modules/semver/functions/compare-build.js"(exports2, module2) {
9955
+ "use strict";
9749
9956
  var SemVer = require_semver();
9750
9957
  var compareBuild = (a, b, loose) => {
9751
9958
  const versionA = new SemVer(a, loose);
@@ -9759,6 +9966,7 @@ var require_compare_build = __commonJS({
9759
9966
  // node_modules/semver/functions/sort.js
9760
9967
  var require_sort = __commonJS({
9761
9968
  "node_modules/semver/functions/sort.js"(exports2, module2) {
9969
+ "use strict";
9762
9970
  var compareBuild = require_compare_build();
9763
9971
  var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
9764
9972
  module2.exports = sort;
@@ -9768,6 +9976,7 @@ var require_sort = __commonJS({
9768
9976
  // node_modules/semver/functions/rsort.js
9769
9977
  var require_rsort = __commonJS({
9770
9978
  "node_modules/semver/functions/rsort.js"(exports2, module2) {
9979
+ "use strict";
9771
9980
  var compareBuild = require_compare_build();
9772
9981
  var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
9773
9982
  module2.exports = rsort;
@@ -9777,6 +9986,7 @@ var require_rsort = __commonJS({
9777
9986
  // node_modules/semver/functions/gt.js
9778
9987
  var require_gt = __commonJS({
9779
9988
  "node_modules/semver/functions/gt.js"(exports2, module2) {
9989
+ "use strict";
9780
9990
  var compare = require_compare();
9781
9991
  var gt = (a, b, loose) => compare(a, b, loose) > 0;
9782
9992
  module2.exports = gt;
@@ -9786,6 +9996,7 @@ var require_gt = __commonJS({
9786
9996
  // node_modules/semver/functions/lt.js
9787
9997
  var require_lt = __commonJS({
9788
9998
  "node_modules/semver/functions/lt.js"(exports2, module2) {
9999
+ "use strict";
9789
10000
  var compare = require_compare();
9790
10001
  var lt = (a, b, loose) => compare(a, b, loose) < 0;
9791
10002
  module2.exports = lt;
@@ -9795,6 +10006,7 @@ var require_lt = __commonJS({
9795
10006
  // node_modules/semver/functions/eq.js
9796
10007
  var require_eq = __commonJS({
9797
10008
  "node_modules/semver/functions/eq.js"(exports2, module2) {
10009
+ "use strict";
9798
10010
  var compare = require_compare();
9799
10011
  var eq = (a, b, loose) => compare(a, b, loose) === 0;
9800
10012
  module2.exports = eq;
@@ -9804,6 +10016,7 @@ var require_eq = __commonJS({
9804
10016
  // node_modules/semver/functions/neq.js
9805
10017
  var require_neq = __commonJS({
9806
10018
  "node_modules/semver/functions/neq.js"(exports2, module2) {
10019
+ "use strict";
9807
10020
  var compare = require_compare();
9808
10021
  var neq = (a, b, loose) => compare(a, b, loose) !== 0;
9809
10022
  module2.exports = neq;
@@ -9813,6 +10026,7 @@ var require_neq = __commonJS({
9813
10026
  // node_modules/semver/functions/gte.js
9814
10027
  var require_gte = __commonJS({
9815
10028
  "node_modules/semver/functions/gte.js"(exports2, module2) {
10029
+ "use strict";
9816
10030
  var compare = require_compare();
9817
10031
  var gte = (a, b, loose) => compare(a, b, loose) >= 0;
9818
10032
  module2.exports = gte;
@@ -9822,6 +10036,7 @@ var require_gte = __commonJS({
9822
10036
  // node_modules/semver/functions/lte.js
9823
10037
  var require_lte = __commonJS({
9824
10038
  "node_modules/semver/functions/lte.js"(exports2, module2) {
10039
+ "use strict";
9825
10040
  var compare = require_compare();
9826
10041
  var lte = (a, b, loose) => compare(a, b, loose) <= 0;
9827
10042
  module2.exports = lte;
@@ -9831,6 +10046,7 @@ var require_lte = __commonJS({
9831
10046
  // node_modules/semver/functions/cmp.js
9832
10047
  var require_cmp = __commonJS({
9833
10048
  "node_modules/semver/functions/cmp.js"(exports2, module2) {
10049
+ "use strict";
9834
10050
  var eq = require_eq();
9835
10051
  var neq = require_neq();
9836
10052
  var gt = require_gt();
@@ -9880,6 +10096,7 @@ var require_cmp = __commonJS({
9880
10096
  // node_modules/semver/functions/coerce.js
9881
10097
  var require_coerce = __commonJS({
9882
10098
  "node_modules/semver/functions/coerce.js"(exports2, module2) {
10099
+ "use strict";
9883
10100
  var SemVer = require_semver();
9884
10101
  var parse = require_parse();
9885
10102
  var { re, t } = require_re();
@@ -10572,6 +10789,7 @@ var require_lru_cache = __commonJS({
10572
10789
  // node_modules/semver/classes/range.js
10573
10790
  var require_range = __commonJS({
10574
10791
  "node_modules/semver/classes/range.js"(exports2, module2) {
10792
+ "use strict";
10575
10793
  var Range = class {
10576
10794
  constructor(range, options) {
10577
10795
  options = parseOptions(options);
@@ -10933,6 +11151,7 @@ var require_range = __commonJS({
10933
11151
  // node_modules/semver/classes/comparator.js
10934
11152
  var require_comparator = __commonJS({
10935
11153
  "node_modules/semver/classes/comparator.js"(exports2, module2) {
11154
+ "use strict";
10936
11155
  var ANY = Symbol("SemVer ANY");
10937
11156
  var Comparator = class {
10938
11157
  static get ANY() {
@@ -11044,6 +11263,7 @@ var require_comparator = __commonJS({
11044
11263
  // node_modules/semver/functions/satisfies.js
11045
11264
  var require_satisfies = __commonJS({
11046
11265
  "node_modules/semver/functions/satisfies.js"(exports2, module2) {
11266
+ "use strict";
11047
11267
  var Range = require_range();
11048
11268
  var satisfies = (version, range, options) => {
11049
11269
  try {
@@ -11060,6 +11280,7 @@ var require_satisfies = __commonJS({
11060
11280
  // node_modules/semver/ranges/to-comparators.js
11061
11281
  var require_to_comparators = __commonJS({
11062
11282
  "node_modules/semver/ranges/to-comparators.js"(exports2, module2) {
11283
+ "use strict";
11063
11284
  var Range = require_range();
11064
11285
  var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
11065
11286
  module2.exports = toComparators;
@@ -11069,6 +11290,7 @@ var require_to_comparators = __commonJS({
11069
11290
  // node_modules/semver/ranges/max-satisfying.js
11070
11291
  var require_max_satisfying = __commonJS({
11071
11292
  "node_modules/semver/ranges/max-satisfying.js"(exports2, module2) {
11293
+ "use strict";
11072
11294
  var SemVer = require_semver();
11073
11295
  var Range = require_range();
11074
11296
  var maxSatisfying = (versions, range, options) => {
@@ -11097,6 +11319,7 @@ var require_max_satisfying = __commonJS({
11097
11319
  // node_modules/semver/ranges/min-satisfying.js
11098
11320
  var require_min_satisfying = __commonJS({
11099
11321
  "node_modules/semver/ranges/min-satisfying.js"(exports2, module2) {
11322
+ "use strict";
11100
11323
  var SemVer = require_semver();
11101
11324
  var Range = require_range();
11102
11325
  var minSatisfying = (versions, range, options) => {
@@ -11125,6 +11348,7 @@ var require_min_satisfying = __commonJS({
11125
11348
  // node_modules/semver/ranges/min-version.js
11126
11349
  var require_min_version = __commonJS({
11127
11350
  "node_modules/semver/ranges/min-version.js"(exports2, module2) {
11351
+ "use strict";
11128
11352
  var SemVer = require_semver();
11129
11353
  var Range = require_range();
11130
11354
  var gt = require_gt();
@@ -11181,6 +11405,7 @@ var require_min_version = __commonJS({
11181
11405
  // node_modules/semver/ranges/valid.js
11182
11406
  var require_valid2 = __commonJS({
11183
11407
  "node_modules/semver/ranges/valid.js"(exports2, module2) {
11408
+ "use strict";
11184
11409
  var Range = require_range();
11185
11410
  var validRange = (range, options) => {
11186
11411
  try {
@@ -11196,6 +11421,7 @@ var require_valid2 = __commonJS({
11196
11421
  // node_modules/semver/ranges/outside.js
11197
11422
  var require_outside = __commonJS({
11198
11423
  "node_modules/semver/ranges/outside.js"(exports2, module2) {
11424
+ "use strict";
11199
11425
  var SemVer = require_semver();
11200
11426
  var Comparator = require_comparator();
11201
11427
  var { ANY } = Comparator;
@@ -11264,6 +11490,7 @@ var require_outside = __commonJS({
11264
11490
  // node_modules/semver/ranges/gtr.js
11265
11491
  var require_gtr = __commonJS({
11266
11492
  "node_modules/semver/ranges/gtr.js"(exports2, module2) {
11493
+ "use strict";
11267
11494
  var outside = require_outside();
11268
11495
  var gtr = (version, range, options) => outside(version, range, ">", options);
11269
11496
  module2.exports = gtr;
@@ -11273,6 +11500,7 @@ var require_gtr = __commonJS({
11273
11500
  // node_modules/semver/ranges/ltr.js
11274
11501
  var require_ltr = __commonJS({
11275
11502
  "node_modules/semver/ranges/ltr.js"(exports2, module2) {
11503
+ "use strict";
11276
11504
  var outside = require_outside();
11277
11505
  var ltr = (version, range, options) => outside(version, range, "<", options);
11278
11506
  module2.exports = ltr;
@@ -11282,6 +11510,7 @@ var require_ltr = __commonJS({
11282
11510
  // node_modules/semver/ranges/intersects.js
11283
11511
  var require_intersects = __commonJS({
11284
11512
  "node_modules/semver/ranges/intersects.js"(exports2, module2) {
11513
+ "use strict";
11285
11514
  var Range = require_range();
11286
11515
  var intersects = (r1, r2, options) => {
11287
11516
  r1 = new Range(r1, options);
@@ -11295,6 +11524,7 @@ var require_intersects = __commonJS({
11295
11524
  // node_modules/semver/ranges/simplify.js
11296
11525
  var require_simplify = __commonJS({
11297
11526
  "node_modules/semver/ranges/simplify.js"(exports2, module2) {
11527
+ "use strict";
11298
11528
  var satisfies = require_satisfies();
11299
11529
  var compare = require_compare();
11300
11530
  module2.exports = (versions, range, options) => {
@@ -11344,6 +11574,7 @@ var require_simplify = __commonJS({
11344
11574
  // node_modules/semver/ranges/subset.js
11345
11575
  var require_subset = __commonJS({
11346
11576
  "node_modules/semver/ranges/subset.js"(exports2, module2) {
11577
+ "use strict";
11347
11578
  var Range = require_range();
11348
11579
  var Comparator = require_comparator();
11349
11580
  var { ANY } = Comparator;
@@ -11506,6 +11737,7 @@ var require_subset = __commonJS({
11506
11737
  // node_modules/semver/index.js
11507
11738
  var require_semver2 = __commonJS({
11508
11739
  "node_modules/semver/index.js"(exports2, module2) {
11740
+ "use strict";
11509
11741
  var internalRe = require_re();
11510
11742
  var constants = require_constants();
11511
11743
  var SemVer = require_semver();
@@ -11600,6 +11832,7 @@ var require_semver2 = __commonJS({
11600
11832
  // node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js
11601
11833
  var require_asymmetricKeyDetailsSupported = __commonJS({
11602
11834
  "node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js"(exports2, module2) {
11835
+ "use strict";
11603
11836
  var semver = require_semver2();
11604
11837
  module2.exports = semver.satisfies(process.version, ">=15.7.0");
11605
11838
  }
@@ -11608,6 +11841,7 @@ var require_asymmetricKeyDetailsSupported = __commonJS({
11608
11841
  // node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js
11609
11842
  var require_rsaPssKeyDetailsSupported = __commonJS({
11610
11843
  "node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js"(exports2, module2) {
11844
+ "use strict";
11611
11845
  var semver = require_semver2();
11612
11846
  module2.exports = semver.satisfies(process.version, ">=16.9.0");
11613
11847
  }
@@ -11616,6 +11850,7 @@ var require_rsaPssKeyDetailsSupported = __commonJS({
11616
11850
  // node_modules/jsonwebtoken/lib/validateAsymmetricKey.js
11617
11851
  var require_validateAsymmetricKey = __commonJS({
11618
11852
  "node_modules/jsonwebtoken/lib/validateAsymmetricKey.js"(exports2, module2) {
11853
+ "use strict";
11619
11854
  var ASYMMETRIC_KEY_DETAILS_SUPPORTED = require_asymmetricKeyDetailsSupported();
11620
11855
  var RSA_PSS_KEY_DETAILS_SUPPORTED = require_rsaPssKeyDetailsSupported();
11621
11856
  var allowedAlgorithmsForKeys = {
@@ -11671,6 +11906,7 @@ var require_validateAsymmetricKey = __commonJS({
11671
11906
  // node_modules/jsonwebtoken/lib/psSupported.js
11672
11907
  var require_psSupported = __commonJS({
11673
11908
  "node_modules/jsonwebtoken/lib/psSupported.js"(exports2, module2) {
11909
+ "use strict";
11674
11910
  var semver = require_semver2();
11675
11911
  module2.exports = semver.satisfies(process.version, "^6.12.0 || >=8.0.0");
11676
11912
  }
@@ -11679,6 +11915,7 @@ var require_psSupported = __commonJS({
11679
11915
  // node_modules/jsonwebtoken/verify.js
11680
11916
  var require_verify = __commonJS({
11681
11917
  "node_modules/jsonwebtoken/verify.js"(exports2, module2) {
11918
+ "use strict";
11682
11919
  var JsonWebTokenError = require_JsonWebTokenError();
11683
11920
  var NotBeforeError = require_NotBeforeError();
11684
11921
  var TokenExpiredError = require_TokenExpiredError();
@@ -11895,6 +12132,7 @@ var require_verify = __commonJS({
11895
12132
  // node_modules/lodash/lodash.js
11896
12133
  var require_lodash = __commonJS({
11897
12134
  "node_modules/lodash/lodash.js"(exports2, module2) {
12135
+ "use strict";
11898
12136
  (function() {
11899
12137
  var undefined2;
11900
12138
  var VERSION = "4.17.21";
@@ -17375,6 +17613,7 @@ var require_lodash = __commonJS({
17375
17613
  // node_modules/jsonwebtoken/sign.js
17376
17614
  var require_sign = __commonJS({
17377
17615
  "node_modules/jsonwebtoken/sign.js"(exports2, module2) {
17616
+ "use strict";
17378
17617
  var timespan = require_timespan();
17379
17618
  var PS_SUPPORTED = require_psSupported();
17380
17619
  var validateAsymmetricKey = require_validateAsymmetricKey();
@@ -17594,6 +17833,7 @@ var require_sign = __commonJS({
17594
17833
  // node_modules/jsonwebtoken/index.js
17595
17834
  var require_jsonwebtoken = __commonJS({
17596
17835
  "node_modules/jsonwebtoken/index.js"(exports2, module2) {
17836
+ "use strict";
17597
17837
  module2.exports = {
17598
17838
  verify: require_verify(),
17599
17839
  sign: require_sign(),
@@ -19353,6 +19593,7 @@ var require_dist_node12 = __commonJS({
19353
19593
  // node_modules/before-after-hook/lib/register.js
19354
19594
  var require_register = __commonJS({
19355
19595
  "node_modules/before-after-hook/lib/register.js"(exports2, module2) {
19596
+ "use strict";
19356
19597
  module2.exports = register;
19357
19598
  function register(state, name, method, options) {
19358
19599
  if (typeof method !== "function") {
@@ -19381,6 +19622,7 @@ var require_register = __commonJS({
19381
19622
  // node_modules/before-after-hook/lib/add.js
19382
19623
  var require_add = __commonJS({
19383
19624
  "node_modules/before-after-hook/lib/add.js"(exports2, module2) {
19625
+ "use strict";
19384
19626
  module2.exports = addHook;
19385
19627
  function addHook(state, kind, name, hook) {
19386
19628
  var orig = hook;
@@ -19421,6 +19663,7 @@ var require_add = __commonJS({
19421
19663
  // node_modules/before-after-hook/lib/remove.js
19422
19664
  var require_remove = __commonJS({
19423
19665
  "node_modules/before-after-hook/lib/remove.js"(exports2, module2) {
19666
+ "use strict";
19424
19667
  module2.exports = removeHook;
19425
19668
  function removeHook(state, name, method) {
19426
19669
  if (!state.registry[name]) {
@@ -19440,6 +19683,7 @@ var require_remove = __commonJS({
19440
19683
  // node_modules/before-after-hook/index.js
19441
19684
  var require_before_after_hook = __commonJS({
19442
19685
  "node_modules/before-after-hook/index.js"(exports2, module2) {
19686
+ "use strict";
19443
19687
  var register = require_register();
19444
19688
  var addHook = require_add();
19445
19689
  var removeHook = require_remove();
@@ -19629,9 +19873,30 @@ var require_dist_node13 = __commonJS({
19629
19873
 
19630
19874
  // node_modules/@octokit/auth-token/dist-node/index.js
19631
19875
  var require_dist_node14 = __commonJS({
19632
- "node_modules/@octokit/auth-token/dist-node/index.js"(exports2) {
19876
+ "node_modules/@octokit/auth-token/dist-node/index.js"(exports2, module2) {
19633
19877
  "use strict";
19634
- Object.defineProperty(exports2, "__esModule", { value: true });
19878
+ var __defProp2 = Object.defineProperty;
19879
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
19880
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
19881
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
19882
+ var __export = (target, all) => {
19883
+ for (var name in all)
19884
+ __defProp2(target, name, { get: all[name], enumerable: true });
19885
+ };
19886
+ var __copyProps2 = (to, from, except, desc) => {
19887
+ if (from && typeof from === "object" || typeof from === "function") {
19888
+ for (let key of __getOwnPropNames2(from))
19889
+ if (!__hasOwnProp2.call(to, key) && key !== except)
19890
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
19891
+ }
19892
+ return to;
19893
+ };
19894
+ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
19895
+ var dist_src_exports = {};
19896
+ __export(dist_src_exports, {
19897
+ createTokenAuth: () => createTokenAuth
19898
+ });
19899
+ module2.exports = __toCommonJS(dist_src_exports);
19635
19900
  var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
19636
19901
  var REGEX_IS_INSTALLATION = /^ghs_/;
19637
19902
  var REGEX_IS_USER_TO_SERVER = /^ghu_/;
@@ -19653,7 +19918,10 @@ var require_dist_node14 = __commonJS({
19653
19918
  return `token ${token}`;
19654
19919
  }
19655
19920
  async function hook(token, request, route, parameters) {
19656
- const endpoint = request.endpoint.merge(route, parameters);
19921
+ const endpoint = request.endpoint.merge(
19922
+ route,
19923
+ parameters
19924
+ );
19657
19925
  endpoint.headers.authorization = withAuthorizationPrefix(token);
19658
19926
  return request(endpoint);
19659
19927
  }
@@ -19662,14 +19930,15 @@ var require_dist_node14 = __commonJS({
19662
19930
  throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
19663
19931
  }
19664
19932
  if (typeof token !== "string") {
19665
- throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
19933
+ throw new Error(
19934
+ "[@octokit/auth-token] Token passed to createTokenAuth is not a string"
19935
+ );
19666
19936
  }
19667
19937
  token = token.replace(/^(token|bearer) +/i, "");
19668
19938
  return Object.assign(auth.bind(null, token), {
19669
19939
  hook: hook.bind(null, token)
19670
19940
  });
19671
19941
  };
19672
- exports2.createTokenAuth = createTokenAuth;
19673
19942
  }
19674
19943
  });
19675
19944