@cloudsnorkel/cdk-github-runners 0.10.5 → 0.10.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 (45) hide show
  1. package/.jsii +120 -120
  2. package/README.md +1 -1
  3. package/assets/delete-failed-runner.lambda/index.js +2117 -972
  4. package/assets/docker-images/codebuild/linux-arm64/Dockerfile +1 -2
  5. package/assets/docker-images/codebuild/linux-x64/Dockerfile +1 -2
  6. package/assets/docker-images/fargate/linux-arm64/Dockerfile +1 -2
  7. package/assets/docker-images/fargate/linux-x64/Dockerfile +1 -2
  8. package/assets/idle-runner-repear.lambda/index.js +2113 -968
  9. package/assets/image-builders/aws-image-builder/versioner.lambda/index.js +118 -54
  10. package/assets/setup.lambda/index.html +13 -13
  11. package/assets/setup.lambda/index.js +1552 -616
  12. package/assets/status.lambda/index.js +704 -432
  13. package/assets/token-retriever.lambda/index.js +2115 -970
  14. package/assets/webhook-handler.lambda/index.js +10 -8
  15. package/lib/access.js +1 -1
  16. package/lib/image-builders/api.js +1 -1
  17. package/lib/image-builders/aws-image-builder/ami.d.ts +1 -1
  18. package/lib/image-builders/aws-image-builder/ami.js +9 -9
  19. package/lib/image-builders/aws-image-builder/builder.js +1 -1
  20. package/lib/image-builders/aws-image-builder/deprecated/ami.d.ts +1 -1
  21. package/lib/image-builders/aws-image-builder/deprecated/ami.js +9 -9
  22. package/lib/image-builders/aws-image-builder/deprecated/common.d.ts +1 -1
  23. package/lib/image-builders/aws-image-builder/deprecated/common.js +10 -10
  24. package/lib/image-builders/aws-image-builder/deprecated/container.js +1 -1
  25. package/lib/image-builders/aws-image-builder/deprecated/linux-components.d.ts +1 -1
  26. package/lib/image-builders/aws-image-builder/deprecated/linux-components.js +11 -12
  27. package/lib/image-builders/aws-image-builder/deprecated/windows-components.js +1 -1
  28. package/lib/image-builders/codebuild-deprecated.js +1 -1
  29. package/lib/image-builders/components.js +3 -4
  30. package/lib/image-builders/static.js +1 -1
  31. package/lib/providers/codebuild.js +7 -5
  32. package/lib/providers/common.d.ts +2 -1
  33. package/lib/providers/common.js +5 -6
  34. package/lib/providers/ec2.d.ts +1 -0
  35. package/lib/providers/ec2.js +16 -11
  36. package/lib/providers/ecs.js +12 -5
  37. package/lib/providers/fargate.js +6 -3
  38. package/lib/providers/lambda.js +2 -2
  39. package/lib/runner.js +1 -1
  40. package/lib/secrets.js +1 -1
  41. package/lib/status.lambda.js +12 -7
  42. package/lib/utils.d.ts +19 -1
  43. package/lib/utils.js +48 -2
  44. package/lib/webhook-handler.lambda.js +11 -9
  45. package/package.json +12 -11
@@ -24,24 +24,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
25
  mod
26
26
  ));
27
- var __accessCheck = (obj, member, msg) => {
28
- if (!member.has(obj))
29
- throw TypeError("Cannot " + msg);
30
- };
31
- var __privateGet = (obj, member, getter) => {
32
- __accessCheck(obj, member, "read from private field");
33
- return getter ? getter.call(obj) : member.get(obj);
34
- };
35
- var __privateAdd = (obj, member, value) => {
36
- if (member.has(obj))
37
- throw TypeError("Cannot add the same private member more than once");
38
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
39
- };
40
- var __privateSet = (obj, member, value, setter) => {
41
- __accessCheck(obj, member, "write to private field");
42
- setter ? setter.call(obj, value) : member.set(obj, value);
43
- return value;
44
- };
45
27
 
46
28
  // node_modules/universal-user-agent/dist-node/index.js
47
29
  var require_dist_node = __commonJS({
@@ -90,11 +72,30 @@ var require_is_plain_object = __commonJS({
90
72
 
91
73
  // node_modules/@octokit/endpoint/dist-node/index.js
92
74
  var require_dist_node2 = __commonJS({
93
- "node_modules/@octokit/endpoint/dist-node/index.js"(exports2) {
75
+ "node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) {
94
76
  "use strict";
95
- Object.defineProperty(exports2, "__esModule", { value: true });
96
- var isPlainObject = require_is_plain_object();
97
- var universalUserAgent = require_dist_node();
77
+ var __defProp2 = Object.defineProperty;
78
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
79
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
80
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
81
+ var __export = (target, all) => {
82
+ for (var name in all)
83
+ __defProp2(target, name, { get: all[name], enumerable: true });
84
+ };
85
+ var __copyProps2 = (to, from, except, desc) => {
86
+ if (from && typeof from === "object" || typeof from === "function") {
87
+ for (let key of __getOwnPropNames2(from))
88
+ if (!__hasOwnProp2.call(to, key) && key !== except)
89
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
90
+ }
91
+ return to;
92
+ };
93
+ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
94
+ var dist_src_exports = {};
95
+ __export(dist_src_exports, {
96
+ endpoint: () => endpoint
97
+ });
98
+ module2.exports = __toCommonJS(dist_src_exports);
98
99
  function lowercaseKeys(object) {
99
100
  if (!object) {
100
101
  return {};
@@ -104,20 +105,17 @@ var require_dist_node2 = __commonJS({
104
105
  return newObj;
105
106
  }, {});
106
107
  }
108
+ var import_is_plain_object = require_is_plain_object();
107
109
  function mergeDeep(defaults, options) {
108
110
  const result = Object.assign({}, defaults);
109
111
  Object.keys(options).forEach((key) => {
110
- if (isPlainObject.isPlainObject(options[key])) {
112
+ if ((0, import_is_plain_object.isPlainObject)(options[key])) {
111
113
  if (!(key in defaults))
112
- Object.assign(result, {
113
- [key]: options[key]
114
- });
114
+ Object.assign(result, { [key]: options[key] });
115
115
  else
116
116
  result[key] = mergeDeep(defaults[key], options[key]);
117
117
  } else {
118
- Object.assign(result, {
119
- [key]: options[key]
120
- });
118
+ Object.assign(result, { [key]: options[key] });
121
119
  }
122
120
  });
123
121
  return result;
@@ -133,12 +131,7 @@ var require_dist_node2 = __commonJS({
133
131
  function merge(defaults, route, options) {
134
132
  if (typeof route === "string") {
135
133
  let [method, url] = route.split(" ");
136
- options = Object.assign(url ? {
137
- method,
138
- url
139
- } : {
140
- url: method
141
- }, options);
134
+ options = Object.assign(url ? { method, url } : { url: method }, options);
142
135
  } else {
143
136
  options = Object.assign({}, route);
144
137
  }
@@ -149,7 +142,9 @@ var require_dist_node2 = __commonJS({
149
142
  if (defaults && defaults.mediaType.previews.length) {
150
143
  mergedOptions.mediaType.previews = defaults.mediaType.previews.filter((preview) => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews);
151
144
  }
152
- mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, ""));
145
+ mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(
146
+ (preview) => preview.replace(/-preview/, "")
147
+ );
153
148
  return mergedOptions;
154
149
  }
155
150
  function addQueryParameters(url, parameters) {
@@ -217,12 +212,16 @@ var require_dist_node2 = __commonJS({
217
212
  if (modifier && modifier !== "*") {
218
213
  value = value.substring(0, parseInt(modifier, 10));
219
214
  }
220
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : ""));
215
+ result.push(
216
+ encodeValue(operator, value, isKeyOperator(operator) ? key : "")
217
+ );
221
218
  } else {
222
219
  if (modifier === "*") {
223
220
  if (Array.isArray(value)) {
224
221
  value.filter(isDefined).forEach(function(value2) {
225
- result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
222
+ result.push(
223
+ encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
224
+ );
226
225
  });
227
226
  } else {
228
227
  Object.keys(value).forEach(function(k) {
@@ -272,40 +271,50 @@ var require_dist_node2 = __commonJS({
272
271
  }
273
272
  function expand(template, context) {
274
273
  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;
274
+ return template.replace(
275
+ /\{([^\{\}]+)\}|([^\{\}]+)/g,
276
+ function(_, expression, literal) {
277
+ if (expression) {
278
+ let operator = "";
279
+ const values = [];
280
+ if (operators.indexOf(expression.charAt(0)) !== -1) {
281
+ operator = expression.charAt(0);
282
+ expression = expression.substr(1);
283
+ }
284
+ expression.split(/,/g).forEach(function(variable) {
285
+ var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
286
+ values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
287
+ });
288
+ if (operator && operator !== "+") {
289
+ var separator = ",";
290
+ if (operator === "?") {
291
+ separator = "&";
292
+ } else if (operator !== "#") {
293
+ separator = operator;
294
+ }
295
+ return (values.length !== 0 ? operator : "") + values.join(separator);
296
+ } else {
297
+ return values.join(",");
293
298
  }
294
- return (values.length !== 0 ? operator : "") + values.join(separator);
295
299
  } else {
296
- return values.join(",");
300
+ return encodeReserved(literal);
297
301
  }
298
- } else {
299
- return encodeReserved(literal);
300
302
  }
301
- });
303
+ );
302
304
  }
303
305
  function parse(options) {
304
306
  let method = options.method.toUpperCase();
305
307
  let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
306
308
  let headers = Object.assign({}, options.headers);
307
309
  let body;
308
- let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]);
310
+ let parameters = omit(options, [
311
+ "method",
312
+ "baseUrl",
313
+ "url",
314
+ "headers",
315
+ "request",
316
+ "mediaType"
317
+ ]);
309
318
  const urlVariableNames = extractUrlVariableNames(url);
310
319
  url = parseUrl(url).expand(parameters);
311
320
  if (!/^http/.test(url)) {
@@ -316,7 +325,12 @@ var require_dist_node2 = __commonJS({
316
325
  const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
317
326
  if (!isBinaryRequest) {
318
327
  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(",");
328
+ headers.accept = headers.accept.split(/,/).map(
329
+ (preview) => preview.replace(
330
+ /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
331
+ `application/vnd$1$2.${options.mediaType.format}`
332
+ )
333
+ ).join(",");
320
334
  }
321
335
  if (options.mediaType.previews.length) {
322
336
  const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
@@ -343,15 +357,11 @@ var require_dist_node2 = __commonJS({
343
357
  if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
344
358
  body = "";
345
359
  }
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);
360
+ return Object.assign(
361
+ { method, url, headers },
362
+ typeof body !== "undefined" ? { body } : null,
363
+ options.request ? { request: options.request } : null
364
+ );
355
365
  }
356
366
  function endpointWithDefaults(defaults, route, options) {
357
367
  return parse(merge(defaults, route, options));
@@ -366,8 +376,9 @@ var require_dist_node2 = __commonJS({
366
376
  parse
367
377
  });
368
378
  }
369
- var VERSION = "7.0.5";
370
- var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
379
+ var import_universal_user_agent = require_dist_node();
380
+ var VERSION = "7.0.6";
381
+ var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
371
382
  var DEFAULTS = {
372
383
  method: "GET",
373
384
  baseUrl: "https://api.github.com",
@@ -381,7 +392,6 @@ var require_dist_node2 = __commonJS({
381
392
  }
382
393
  };
383
394
  var endpoint = withDefaults(null, DEFAULTS);
384
- exports2.endpoint = endpoint;
385
395
  }
386
396
  });
387
397
 
@@ -5885,7 +5895,7 @@ var require_lib3 = __commonJS({
5885
5895
  var Readable = Stream.Readable;
5886
5896
  var BUFFER = Symbol("buffer");
5887
5897
  var TYPE = Symbol("type");
5888
- var Blob = class {
5898
+ var Blob = class _Blob {
5889
5899
  constructor() {
5890
5900
  this[TYPE] = "";
5891
5901
  const blobParts = arguments[0];
@@ -5904,7 +5914,7 @@ var require_lib3 = __commonJS({
5904
5914
  buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
5905
5915
  } else if (element instanceof ArrayBuffer) {
5906
5916
  buffer = Buffer.from(element);
5907
- } else if (element instanceof Blob) {
5917
+ } else if (element instanceof _Blob) {
5908
5918
  buffer = element[BUFFER];
5909
5919
  } else {
5910
5920
  buffer = Buffer.from(typeof element === "string" ? element : String(element));
@@ -5966,7 +5976,7 @@ var require_lib3 = __commonJS({
5966
5976
  const span = Math.max(relativeEnd - relativeStart, 0);
5967
5977
  const buffer = this[BUFFER];
5968
5978
  const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
5969
- const blob = new Blob([], { type: arguments[2] });
5979
+ const blob = new _Blob([], { type: arguments[2] });
5970
5980
  blob[BUFFER] = slicedBuffer;
5971
5981
  return blob;
5972
5982
  }
@@ -6343,7 +6353,7 @@ var require_lib3 = __commonJS({
6343
6353
  return void 0;
6344
6354
  }
6345
6355
  var MAP = Symbol("map");
6346
- var Headers = class {
6356
+ var Headers = class _Headers {
6347
6357
  /**
6348
6358
  * Headers class
6349
6359
  *
@@ -6353,7 +6363,7 @@ var require_lib3 = __commonJS({
6353
6363
  constructor() {
6354
6364
  let init = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : void 0;
6355
6365
  this[MAP] = /* @__PURE__ */ Object.create(null);
6356
- if (init instanceof Headers) {
6366
+ if (init instanceof _Headers) {
6357
6367
  const rawHeaders = init.raw();
6358
6368
  const headerNames = Object.keys(rawHeaders);
6359
6369
  for (const headerName of headerNames) {
@@ -6622,7 +6632,7 @@ var require_lib3 = __commonJS({
6622
6632
  }
6623
6633
  var INTERNALS$1 = Symbol("Response internals");
6624
6634
  var STATUS_CODES = http.STATUS_CODES;
6625
- var Response = class {
6635
+ var Response = class _Response {
6626
6636
  constructor() {
6627
6637
  let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
6628
6638
  let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -6670,7 +6680,7 @@ var require_lib3 = __commonJS({
6670
6680
  * @return Response
6671
6681
  */
6672
6682
  clone() {
6673
- return new Response(clone(this), {
6683
+ return new _Response(clone(this), {
6674
6684
  url: this.url,
6675
6685
  status: this.status,
6676
6686
  statusText: this.statusText,
@@ -6714,7 +6724,7 @@ var require_lib3 = __commonJS({
6714
6724
  const proto = signal && typeof signal === "object" && Object.getPrototypeOf(signal);
6715
6725
  return !!(proto && proto.constructor.name === "AbortSignal");
6716
6726
  }
6717
- var Request = class {
6727
+ var Request = class _Request {
6718
6728
  constructor(input) {
6719
6729
  let init = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6720
6730
  let parsedURL;
@@ -6784,7 +6794,7 @@ var require_lib3 = __commonJS({
6784
6794
  * @return Request
6785
6795
  */
6786
6796
  clone() {
6787
- return new Request(this);
6797
+ return new _Request(this);
6788
6798
  }
6789
6799
  };
6790
6800
  Body.mixIn(Request.prototype);
@@ -7085,7 +7095,7 @@ var require_lib3 = __commonJS({
7085
7095
  const headers = response.headers;
7086
7096
  if (headers["transfer-encoding"] === "chunked" && !headers["content-length"]) {
7087
7097
  response.once("close", function(hadError) {
7088
- const hasDataListener = socket.listenerCount("data") > 0;
7098
+ const hasDataListener = socket && socket.listenerCount("data") > 0;
7089
7099
  if (hasDataListener && !hadError) {
7090
7100
  const err = new Error("Premature close");
7091
7101
  err.code = "ERR_STREAM_PREMATURE_CLOSE";
@@ -7138,6 +7148,7 @@ var require_dist_node3 = __commonJS({
7138
7148
  // node_modules/wrappy/wrappy.js
7139
7149
  var require_wrappy = __commonJS({
7140
7150
  "node_modules/wrappy/wrappy.js"(exports2, module2) {
7151
+ "use strict";
7141
7152
  module2.exports = wrappy;
7142
7153
  function wrappy(fn, cb) {
7143
7154
  if (fn && cb)
@@ -7169,6 +7180,7 @@ var require_wrappy = __commonJS({
7169
7180
  // node_modules/once/once.js
7170
7181
  var require_once = __commonJS({
7171
7182
  "node_modules/once/once.js"(exports2, module2) {
7183
+ "use strict";
7172
7184
  var wrappy = require_wrappy();
7173
7185
  module2.exports = wrappy(once);
7174
7186
  module2.exports.strict = wrappy(onceStrict);
@@ -7303,7 +7315,7 @@ var require_dist_node5 = __commonJS({
7303
7315
  module2.exports = __toCommonJS(dist_src_exports);
7304
7316
  var import_endpoint = require_dist_node2();
7305
7317
  var import_universal_user_agent = require_dist_node();
7306
- var VERSION = "6.2.5";
7318
+ var VERSION = "6.2.8";
7307
7319
  var import_is_plain_object = require_is_plain_object();
7308
7320
  var import_node_fetch = __toESM2(require_lib3());
7309
7321
  var import_request_error = require_dist_node4();
@@ -7463,6 +7475,7 @@ var require_dist_node5 = __commonJS({
7463
7475
  // node_modules/btoa-lite/btoa-node.js
7464
7476
  var require_btoa_node = __commonJS({
7465
7477
  "node_modules/btoa-lite/btoa-node.js"(exports2, module2) {
7478
+ "use strict";
7466
7479
  module2.exports = function btoa(str) {
7467
7480
  return new Buffer(str).toString("base64");
7468
7481
  };
@@ -7521,59 +7534,108 @@ var require_dist_node6 = __commonJS({
7521
7534
 
7522
7535
  // node_modules/@octokit/oauth-methods/dist-node/index.js
7523
7536
  var require_dist_node7 = __commonJS({
7524
- "node_modules/@octokit/oauth-methods/dist-node/index.js"(exports2) {
7537
+ "node_modules/@octokit/oauth-methods/dist-node/index.js"(exports2, module2) {
7525
7538
  "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;
7539
+ var __create2 = Object.create;
7540
+ var __defProp2 = Object.defineProperty;
7541
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
7542
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
7543
+ var __getProtoOf2 = Object.getPrototypeOf;
7544
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
7545
+ var __export = (target, all) => {
7546
+ for (var name in all)
7547
+ __defProp2(target, name, { get: all[name], enumerable: true });
7548
+ };
7549
+ var __copyProps2 = (to, from, except, desc) => {
7550
+ if (from && typeof from === "object" || typeof from === "function") {
7551
+ for (let key of __getOwnPropNames2(from))
7552
+ if (!__hasOwnProp2.call(to, key) && key !== except)
7553
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
7554
+ }
7555
+ return to;
7556
+ };
7557
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
7558
+ // If the importer is in node compatibility mode or this is not an ESM
7559
+ // file that has been converted to a CommonJS file using a Babel-
7560
+ // compatible transform (i.e. "__esModule" has not been set), then set
7561
+ // "default" to the CommonJS "module.exports" for node compatibility.
7562
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
7563
+ mod
7564
+ ));
7565
+ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
7566
+ var dist_src_exports = {};
7567
+ __export(dist_src_exports, {
7568
+ VERSION: () => VERSION,
7569
+ checkToken: () => checkToken,
7570
+ createDeviceCode: () => createDeviceCode,
7571
+ deleteAuthorization: () => deleteAuthorization,
7572
+ deleteToken: () => deleteToken,
7573
+ exchangeDeviceCode: () => exchangeDeviceCode,
7574
+ exchangeWebFlowCode: () => exchangeWebFlowCode,
7575
+ getWebFlowAuthorizationUrl: () => getWebFlowAuthorizationUrl,
7576
+ refreshToken: () => refreshToken,
7577
+ resetToken: () => resetToken,
7578
+ scopeToken: () => scopeToken
7579
+ });
7580
+ module2.exports = __toCommonJS(dist_src_exports);
7581
+ var VERSION = "2.0.6";
7582
+ var import_oauth_authorization_url = require_dist_node6();
7583
+ var import_request = require_dist_node5();
7584
+ var import_request_error = require_dist_node4();
7585
+ function requestToOAuthBaseUrl(request) {
7586
+ const endpointDefaults = request.endpoint.DEFAULTS;
7537
7587
  return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", "");
7538
7588
  }
7539
- async function oauthRequest(request2, route, parameters) {
7589
+ async function oauthRequest(request, route, parameters) {
7540
7590
  const withOAuthParameters = {
7541
- baseUrl: requestToOAuthBaseUrl(request2),
7591
+ baseUrl: requestToOAuthBaseUrl(request),
7542
7592
  headers: {
7543
7593
  accept: "application/json"
7544
7594
  },
7545
7595
  ...parameters
7546
7596
  };
7547
- const response = await request2(route, withOAuthParameters);
7597
+ const response = await request(route, withOAuthParameters);
7548
7598
  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
- });
7599
+ const error = new import_request_error.RequestError(
7600
+ `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`,
7601
+ 400,
7602
+ {
7603
+ request: request.endpoint.merge(
7604
+ route,
7605
+ withOAuthParameters
7606
+ ),
7607
+ headers: response.headers
7608
+ }
7609
+ );
7553
7610
  error.response = response;
7554
7611
  throw error;
7555
7612
  }
7556
7613
  return response;
7557
7614
  }
7558
7615
  function getWebFlowAuthorizationUrl({
7559
- request: request$1 = request.request,
7616
+ request = import_request.request,
7560
7617
  ...options
7561
7618
  }) {
7562
- const baseUrl = requestToOAuthBaseUrl(request$1);
7563
- return oauthAuthorizationUrl.oauthAuthorizationUrl({
7619
+ const baseUrl = requestToOAuthBaseUrl(request);
7620
+ return (0, import_oauth_authorization_url.oauthAuthorizationUrl)({
7564
7621
  ...options,
7565
7622
  baseUrl
7566
7623
  });
7567
7624
  }
7625
+ var import_request2 = require_dist_node5();
7568
7626
  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
- });
7627
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7628
+ import_request2.request;
7629
+ const response = await oauthRequest(
7630
+ request,
7631
+ "POST /login/oauth/access_token",
7632
+ {
7633
+ client_id: options.clientId,
7634
+ client_secret: options.clientSecret,
7635
+ code: options.code,
7636
+ redirect_uri: options.redirectUrl
7637
+ }
7638
+ );
7577
7639
  const authentication = {
7578
7640
  clientType: options.clientType,
7579
7641
  clientId: options.clientId,
@@ -7584,37 +7646,46 @@ var require_dist_node7 = __commonJS({
7584
7646
  if (options.clientType === "github-app") {
7585
7647
  if ("refresh_token" in response.data) {
7586
7648
  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);
7649
+ authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp(
7650
+ apiTimeInMs,
7651
+ response.data.expires_in
7652
+ ), authentication.refreshTokenExpiresAt = toTimestamp(
7653
+ apiTimeInMs,
7654
+ response.data.refresh_token_expires_in
7655
+ );
7588
7656
  }
7589
7657
  delete authentication.scopes;
7590
7658
  }
7591
- return {
7592
- ...response,
7593
- authentication
7594
- };
7659
+ return { ...response, authentication };
7595
7660
  }
7596
7661
  function toTimestamp(apiTimeInMs, expirationInSeconds) {
7597
7662
  return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString();
7598
7663
  }
7664
+ var import_request3 = require_dist_node5();
7599
7665
  async function createDeviceCode(options) {
7600
- const request$1 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7601
- request.request;
7666
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7667
+ import_request3.request;
7602
7668
  const parameters = {
7603
7669
  client_id: options.clientId
7604
7670
  };
7605
7671
  if ("scopes" in options && Array.isArray(options.scopes)) {
7606
7672
  parameters.scope = options.scopes.join(" ");
7607
7673
  }
7608
- return oauthRequest(request$1, "POST /login/device/code", parameters);
7674
+ return oauthRequest(request, "POST /login/device/code", parameters);
7609
7675
  }
7676
+ var import_request4 = require_dist_node5();
7610
7677
  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
- });
7678
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7679
+ import_request4.request;
7680
+ const response = await oauthRequest(
7681
+ request,
7682
+ "POST /login/oauth/access_token",
7683
+ {
7684
+ client_id: options.clientId,
7685
+ device_code: options.code,
7686
+ grant_type: "urn:ietf:params:oauth:grant-type:device_code"
7687
+ }
7688
+ );
7618
7689
  const authentication = {
7619
7690
  clientType: options.clientType,
7620
7691
  clientId: options.clientId,
@@ -7627,24 +7698,31 @@ var require_dist_node7 = __commonJS({
7627
7698
  if (options.clientType === "github-app") {
7628
7699
  if ("refresh_token" in response.data) {
7629
7700
  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);
7701
+ authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp2(
7702
+ apiTimeInMs,
7703
+ response.data.expires_in
7704
+ ), authentication.refreshTokenExpiresAt = toTimestamp2(
7705
+ apiTimeInMs,
7706
+ response.data.refresh_token_expires_in
7707
+ );
7631
7708
  }
7632
7709
  delete authentication.scopes;
7633
7710
  }
7634
- return {
7635
- ...response,
7636
- authentication
7637
- };
7711
+ return { ...response, authentication };
7638
7712
  }
7639
- function toTimestamp$1(apiTimeInMs, expirationInSeconds) {
7713
+ function toTimestamp2(apiTimeInMs, expirationInSeconds) {
7640
7714
  return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString();
7641
7715
  }
7716
+ var import_request5 = require_dist_node5();
7717
+ var import_btoa_lite = __toESM2(require_btoa_node());
7642
7718
  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", {
7719
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7720
+ import_request5.request;
7721
+ const response = await request("POST /applications/{client_id}/token", {
7646
7722
  headers: {
7647
- authorization: `basic ${btoa(`${options.clientId}:${options.clientSecret}`)}`
7723
+ authorization: `basic ${(0, import_btoa_lite.default)(
7724
+ `${options.clientId}:${options.clientSecret}`
7725
+ )}`
7648
7726
  },
7649
7727
  client_id: options.clientId,
7650
7728
  access_token: options.token
@@ -7661,20 +7739,22 @@ var require_dist_node7 = __commonJS({
7661
7739
  if (options.clientType === "github-app") {
7662
7740
  delete authentication.scopes;
7663
7741
  }
7664
- return {
7665
- ...response,
7666
- authentication
7667
- };
7742
+ return { ...response, authentication };
7668
7743
  }
7744
+ var import_request6 = require_dist_node5();
7669
7745
  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
- });
7746
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7747
+ import_request6.request;
7748
+ const response = await oauthRequest(
7749
+ request,
7750
+ "POST /login/oauth/access_token",
7751
+ {
7752
+ client_id: options.clientId,
7753
+ client_secret: options.clientSecret,
7754
+ grant_type: "refresh_token",
7755
+ refresh_token: options.refreshToken
7756
+ }
7757
+ );
7678
7758
  const apiTimeInMs = new Date(response.headers.date).getTime();
7679
7759
  const authentication = {
7680
7760
  clientType: "github-app",
@@ -7682,17 +7762,19 @@ var require_dist_node7 = __commonJS({
7682
7762
  clientSecret: options.clientSecret,
7683
7763
  token: response.data.access_token,
7684
7764
  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
7765
+ expiresAt: toTimestamp3(apiTimeInMs, response.data.expires_in),
7766
+ refreshTokenExpiresAt: toTimestamp3(
7767
+ apiTimeInMs,
7768
+ response.data.refresh_token_expires_in
7769
+ )
7691
7770
  };
7771
+ return { ...response, authentication };
7692
7772
  }
7693
- function toTimestamp$2(apiTimeInMs, expirationInSeconds) {
7773
+ function toTimestamp3(apiTimeInMs, expirationInSeconds) {
7694
7774
  return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString();
7695
7775
  }
7776
+ var import_request7 = require_dist_node5();
7777
+ var import_btoa_lite2 = __toESM2(require_btoa_node());
7696
7778
  async function scopeToken(options) {
7697
7779
  const {
7698
7780
  request: optionsRequest,
@@ -7702,40 +7784,46 @@ var require_dist_node7 = __commonJS({
7702
7784
  token,
7703
7785
  ...requestOptions
7704
7786
  } = 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}`)}`
7787
+ const request = optionsRequest || /* istanbul ignore next: we always pass a custom request in tests */
7788
+ import_request7.request;
7789
+ const response = await request(
7790
+ "POST /applications/{client_id}/token/scoped",
7791
+ {
7792
+ headers: {
7793
+ authorization: `basic ${(0, import_btoa_lite2.default)(`${clientId}:${clientSecret}`)}`
7794
+ },
7795
+ client_id: clientId,
7796
+ access_token: token,
7797
+ ...requestOptions
7798
+ }
7799
+ );
7800
+ const authentication = Object.assign(
7801
+ {
7802
+ clientType,
7803
+ clientId,
7804
+ clientSecret,
7805
+ token: response.data.token
7710
7806
  },
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
- };
7807
+ response.data.expires_at ? { expiresAt: response.data.expires_at } : {}
7808
+ );
7809
+ return { ...response, authentication };
7727
7810
  }
7811
+ var import_request8 = require_dist_node5();
7812
+ var import_btoa_lite3 = __toESM2(require_btoa_node());
7728
7813
  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
- });
7814
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7815
+ import_request8.request;
7816
+ const auth = (0, import_btoa_lite3.default)(`${options.clientId}:${options.clientSecret}`);
7817
+ const response = await request(
7818
+ "PATCH /applications/{client_id}/token",
7819
+ {
7820
+ headers: {
7821
+ authorization: `basic ${auth}`
7822
+ },
7823
+ client_id: options.clientId,
7824
+ access_token: options.token
7825
+ }
7826
+ );
7739
7827
  const authentication = {
7740
7828
  clientType: options.clientType,
7741
7829
  clientId: options.clientId,
@@ -7748,64 +7836,79 @@ var require_dist_node7 = __commonJS({
7748
7836
  if (options.clientType === "github-app") {
7749
7837
  delete authentication.scopes;
7750
7838
  }
7751
- return {
7752
- ...response,
7753
- authentication
7754
- };
7839
+ return { ...response, authentication };
7755
7840
  }
7841
+ var import_request9 = require_dist_node5();
7842
+ var import_btoa_lite4 = __toESM2(require_btoa_node());
7756
7843
  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
- });
7844
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7845
+ import_request9.request;
7846
+ const auth = (0, import_btoa_lite4.default)(`${options.clientId}:${options.clientSecret}`);
7847
+ return request(
7848
+ "DELETE /applications/{client_id}/token",
7849
+ {
7850
+ headers: {
7851
+ authorization: `basic ${auth}`
7852
+ },
7853
+ client_id: options.clientId,
7854
+ access_token: options.token
7855
+ }
7856
+ );
7767
7857
  }
7858
+ var import_request10 = require_dist_node5();
7859
+ var import_btoa_lite5 = __toESM2(require_btoa_node());
7768
7860
  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
- });
7861
+ const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */
7862
+ import_request10.request;
7863
+ const auth = (0, import_btoa_lite5.default)(`${options.clientId}:${options.clientSecret}`);
7864
+ return request(
7865
+ "DELETE /applications/{client_id}/grant",
7866
+ {
7867
+ headers: {
7868
+ authorization: `basic ${auth}`
7869
+ },
7870
+ client_id: options.clientId,
7871
+ access_token: options.token
7872
+ }
7873
+ );
7779
7874
  }
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
7875
  }
7792
7876
  });
7793
7877
 
7794
7878
  // node_modules/@octokit/auth-oauth-device/dist-node/index.js
7795
7879
  var require_dist_node8 = __commonJS({
7796
- "node_modules/@octokit/auth-oauth-device/dist-node/index.js"(exports2) {
7880
+ "node_modules/@octokit/auth-oauth-device/dist-node/index.js"(exports2, module2) {
7797
7881
  "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();
7882
+ var __defProp2 = Object.defineProperty;
7883
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
7884
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
7885
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
7886
+ var __export = (target, all) => {
7887
+ for (var name in all)
7888
+ __defProp2(target, name, { get: all[name], enumerable: true });
7889
+ };
7890
+ var __copyProps2 = (to, from, except, desc) => {
7891
+ if (from && typeof from === "object" || typeof from === "function") {
7892
+ for (let key of __getOwnPropNames2(from))
7893
+ if (!__hasOwnProp2.call(to, key) && key !== except)
7894
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
7895
+ }
7896
+ return to;
7897
+ };
7898
+ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
7899
+ var dist_src_exports = {};
7900
+ __export(dist_src_exports, {
7901
+ createOAuthDeviceAuth: () => createOAuthDeviceAuth
7902
+ });
7903
+ module2.exports = __toCommonJS(dist_src_exports);
7904
+ var import_universal_user_agent = require_dist_node();
7905
+ var import_request = require_dist_node5();
7906
+ var import_oauth_methods = require_dist_node7();
7802
7907
  async function getOAuthAccessToken(state, options) {
7803
7908
  const cachedAuthentication = getCachedAuthentication(state, options.auth);
7804
7909
  if (cachedAuthentication)
7805
7910
  return cachedAuthentication;
7806
- const {
7807
- data: verification
7808
- } = await oauthMethods.createDeviceCode({
7911
+ const { data: verification } = await (0, import_oauth_methods.createDeviceCode)({
7809
7912
  clientType: state.clientType,
7810
7913
  clientId: state.clientId,
7811
7914
  request: options.request || state.request,
@@ -7813,7 +7916,12 @@ var require_dist_node8 = __commonJS({
7813
7916
  scopes: options.auth.scopes || state.scopes
7814
7917
  });
7815
7918
  await state.onVerification(verification);
7816
- const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification);
7919
+ const authentication = await waitForAccessToken(
7920
+ options.request || state.request,
7921
+ state.clientId,
7922
+ state.clientType,
7923
+ verification
7924
+ );
7817
7925
  state.authentication = authentication;
7818
7926
  return authentication;
7819
7927
  }
@@ -7826,26 +7934,26 @@ var require_dist_node8 = __commonJS({
7826
7934
  return state.authentication;
7827
7935
  }
7828
7936
  const authentication = state.authentication;
7829
- const newScope = ("scopes" in auth2 && auth2.scopes || state.scopes).join(" ");
7937
+ const newScope = ("scopes" in auth2 && auth2.scopes || state.scopes).join(
7938
+ " "
7939
+ );
7830
7940
  const currentScope = authentication.scopes.join(" ");
7831
7941
  return newScope === currentScope ? authentication : false;
7832
7942
  }
7833
7943
  async function wait(seconds) {
7834
7944
  await new Promise((resolve) => setTimeout(resolve, seconds * 1e3));
7835
7945
  }
7836
- async function waitForAccessToken(request2, clientId, clientType, verification) {
7946
+ async function waitForAccessToken(request, clientId, clientType, verification) {
7837
7947
  try {
7838
7948
  const options = {
7839
7949
  clientId,
7840
- request: request2,
7950
+ request,
7841
7951
  code: verification.device_code
7842
7952
  };
7843
- const {
7844
- authentication
7845
- } = clientType === "oauth-app" ? await oauthMethods.exchangeDeviceCode({
7953
+ const { authentication } = clientType === "oauth-app" ? await (0, import_oauth_methods.exchangeDeviceCode)({
7846
7954
  ...options,
7847
7955
  clientType: "oauth-app"
7848
- }) : await oauthMethods.exchangeDeviceCode({
7956
+ }) : await (0, import_oauth_methods.exchangeDeviceCode)({
7849
7957
  ...options,
7850
7958
  clientType: "github-app"
7851
7959
  });
@@ -7860,11 +7968,11 @@ var require_dist_node8 = __commonJS({
7860
7968
  const errorType = error.response.data.error;
7861
7969
  if (errorType === "authorization_pending") {
7862
7970
  await wait(verification.interval);
7863
- return waitForAccessToken(request2, clientId, clientType, verification);
7971
+ return waitForAccessToken(request, clientId, clientType, verification);
7864
7972
  }
7865
7973
  if (errorType === "slow_down") {
7866
7974
  await wait(verification.interval + 5);
7867
- return waitForAccessToken(request2, clientId, clientType, verification);
7975
+ return waitForAccessToken(request, clientId, clientType, verification);
7868
7976
  }
7869
7977
  throw error;
7870
7978
  }
@@ -7874,76 +7982,101 @@ var require_dist_node8 = __commonJS({
7874
7982
  auth: authOptions
7875
7983
  });
7876
7984
  }
7877
- async function hook(state, request2, route, parameters) {
7878
- let endpoint = request2.endpoint.merge(route, parameters);
7985
+ async function hook(state, request, route, parameters) {
7986
+ let endpoint = request.endpoint.merge(
7987
+ route,
7988
+ parameters
7989
+ );
7879
7990
  if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
7880
- return request2(endpoint);
7991
+ return request(endpoint);
7881
7992
  }
7882
- const {
7883
- token
7884
- } = await getOAuthAccessToken(state, {
7885
- request: request2,
7886
- auth: {
7887
- type: "oauth"
7888
- }
7993
+ const { token } = await getOAuthAccessToken(state, {
7994
+ request,
7995
+ auth: { type: "oauth" }
7889
7996
  });
7890
7997
  endpoint.headers.authorization = `token ${token}`;
7891
- return request2(endpoint);
7998
+ return request(endpoint);
7892
7999
  }
7893
- var VERSION = "4.0.4";
8000
+ var VERSION = "4.0.5";
7894
8001
  function createOAuthDeviceAuth(options) {
7895
- const requestWithDefaults = options.request || request.request.defaults({
8002
+ const requestWithDefaults = options.request || import_request.request.defaults({
7896
8003
  headers: {
7897
- "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${universalUserAgent.getUserAgent()}`
8004
+ "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
7898
8005
  }
7899
8006
  });
7900
- const {
7901
- request: request$1 = requestWithDefaults,
7902
- ...otherOptions
7903
- } = options;
8007
+ const { request = requestWithDefaults, ...otherOptions } = options;
7904
8008
  const state = options.clientType === "github-app" ? {
7905
8009
  ...otherOptions,
7906
8010
  clientType: "github-app",
7907
- request: request$1
8011
+ request
7908
8012
  } : {
7909
8013
  ...otherOptions,
7910
8014
  clientType: "oauth-app",
7911
- request: request$1,
8015
+ request,
7912
8016
  scopes: options.scopes || []
7913
8017
  };
7914
8018
  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)');
8019
+ throw new Error(
8020
+ '[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)'
8021
+ );
7916
8022
  }
7917
8023
  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)');
8024
+ throw new Error(
8025
+ '[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)'
8026
+ );
7919
8027
  }
7920
8028
  return Object.assign(auth.bind(null, state), {
7921
8029
  hook: hook.bind(null, state)
7922
8030
  });
7923
8031
  }
7924
- exports2.createOAuthDeviceAuth = createOAuthDeviceAuth;
7925
8032
  }
7926
8033
  });
7927
8034
 
7928
8035
  // node_modules/@octokit/auth-oauth-user/dist-node/index.js
7929
8036
  var require_dist_node9 = __commonJS({
7930
- "node_modules/@octokit/auth-oauth-user/dist-node/index.js"(exports2) {
8037
+ "node_modules/@octokit/auth-oauth-user/dist-node/index.js"(exports2, module2) {
7931
8038
  "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";
8039
+ var __create2 = Object.create;
8040
+ var __defProp2 = Object.defineProperty;
8041
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
8042
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
8043
+ var __getProtoOf2 = Object.getPrototypeOf;
8044
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
8045
+ var __export = (target, all) => {
8046
+ for (var name in all)
8047
+ __defProp2(target, name, { get: all[name], enumerable: true });
8048
+ };
8049
+ var __copyProps2 = (to, from, except, desc) => {
8050
+ if (from && typeof from === "object" || typeof from === "function") {
8051
+ for (let key of __getOwnPropNames2(from))
8052
+ if (!__hasOwnProp2.call(to, key) && key !== except)
8053
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
8054
+ }
8055
+ return to;
8056
+ };
8057
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
8058
+ // If the importer is in node compatibility mode or this is not an ESM
8059
+ // file that has been converted to a CommonJS file using a Babel-
8060
+ // compatible transform (i.e. "__esModule" has not been set), then set
8061
+ // "default" to the CommonJS "module.exports" for node compatibility.
8062
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
8063
+ mod
8064
+ ));
8065
+ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
8066
+ var dist_src_exports = {};
8067
+ __export(dist_src_exports, {
8068
+ createOAuthUserAuth: () => createOAuthUserAuth2,
8069
+ requiresBasicAuth: () => requiresBasicAuth
8070
+ });
8071
+ module2.exports = __toCommonJS(dist_src_exports);
8072
+ var import_universal_user_agent = require_dist_node();
8073
+ var import_request = require_dist_node5();
8074
+ var VERSION = "2.1.2";
8075
+ var import_auth_oauth_device = require_dist_node8();
8076
+ var import_oauth_methods = require_dist_node7();
7942
8077
  async function getAuthentication(state) {
7943
8078
  if ("code" in state.strategyOptions) {
7944
- const {
7945
- authentication
7946
- } = await oauthMethods.exchangeWebFlowCode({
8079
+ const { authentication } = await (0, import_oauth_methods.exchangeWebFlowCode)({
7947
8080
  clientId: state.clientId,
7948
8081
  clientSecret: state.clientSecret,
7949
8082
  clientType: state.clientType,
@@ -7958,7 +8091,7 @@ var require_dist_node9 = __commonJS({
7958
8091
  };
7959
8092
  }
7960
8093
  if ("onVerification" in state.strategyOptions) {
7961
- const deviceAuth = authOauthDevice.createOAuthDeviceAuth({
8094
+ const deviceAuth = (0, import_auth_oauth_device.createOAuthDeviceAuth)({
7962
8095
  clientType: state.clientType,
7963
8096
  clientId: state.clientId,
7964
8097
  onTokenCreated: state.onTokenCreated,
@@ -7986,7 +8119,9 @@ var require_dist_node9 = __commonJS({
7986
8119
  }
7987
8120
  throw new Error("[@octokit/auth-oauth-user] Invalid strategy options");
7988
8121
  }
8122
+ var import_oauth_methods2 = require_dist_node7();
7989
8123
  async function auth(state, options = {}) {
8124
+ var _a, _b;
7990
8125
  if (!state.authentication) {
7991
8126
  state.authentication = state.clientType === "oauth-app" ? await getAuthentication(state) : await getAuthentication(state);
7992
8127
  }
@@ -7996,9 +8131,7 @@ var require_dist_node9 = __commonJS({
7996
8131
  const currentAuthentication = state.authentication;
7997
8132
  if ("expiresAt" in currentAuthentication) {
7998
8133
  if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < /* @__PURE__ */ new Date()) {
7999
- const {
8000
- authentication
8001
- } = await oauthMethods.refreshToken({
8134
+ const { authentication } = await (0, import_oauth_methods2.refreshToken)({
8002
8135
  clientType: "github-app",
8003
8136
  clientId: state.clientId,
8004
8137
  clientSecret: state.clientSecret,
@@ -8013,23 +8146,22 @@ var require_dist_node9 = __commonJS({
8013
8146
  }
8014
8147
  }
8015
8148
  if (options.type === "refresh") {
8016
- var _state$onTokenCreated;
8017
8149
  if (state.clientType === "oauth-app") {
8018
- throw new Error("[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens");
8150
+ throw new Error(
8151
+ "[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens"
8152
+ );
8019
8153
  }
8020
8154
  if (!currentAuthentication.hasOwnProperty("expiresAt")) {
8021
8155
  throw new Error("[@octokit/auth-oauth-user] Refresh token missing");
8022
8156
  }
8023
- await ((_state$onTokenCreated = state.onTokenCreated) === null || _state$onTokenCreated === void 0 ? void 0 : _state$onTokenCreated.call(state, state.authentication, {
8157
+ await ((_a = state.onTokenCreated) == null ? void 0 : _a.call(state, state.authentication, {
8024
8158
  type: options.type
8025
8159
  }));
8026
8160
  }
8027
8161
  if (options.type === "check" || options.type === "reset") {
8028
- const method = options.type === "check" ? oauthMethods.checkToken : oauthMethods.resetToken;
8162
+ const method = options.type === "check" ? import_oauth_methods2.checkToken : import_oauth_methods2.resetToken;
8029
8163
  try {
8030
- const {
8031
- authentication
8032
- } = await method({
8164
+ const { authentication } = await method({
8033
8165
  // @ts-expect-error making TS happy would require unnecessary code so no
8034
8166
  clientType: state.clientType,
8035
8167
  clientId: state.clientId,
@@ -8044,8 +8176,7 @@ var require_dist_node9 = __commonJS({
8044
8176
  ...authentication
8045
8177
  };
8046
8178
  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, {
8179
+ await ((_b = state.onTokenCreated) == null ? void 0 : _b.call(state, state.authentication, {
8049
8180
  type: options.type
8050
8181
  }));
8051
8182
  }
@@ -8059,7 +8190,7 @@ var require_dist_node9 = __commonJS({
8059
8190
  }
8060
8191
  }
8061
8192
  if (options.type === "delete" || options.type === "deleteAuthorization") {
8062
- const method = options.type === "delete" ? oauthMethods.deleteToken : oauthMethods.deleteAuthorization;
8193
+ const method = options.type === "delete" ? import_oauth_methods2.deleteToken : import_oauth_methods2.deleteAuthorization;
8063
8194
  try {
8064
8195
  await method({
8065
8196
  // @ts-expect-error making TS happy would require unnecessary code so no
@@ -8078,39 +8209,35 @@ var require_dist_node9 = __commonJS({
8078
8209
  }
8079
8210
  return state.authentication;
8080
8211
  }
8212
+ var import_btoa_lite = __toESM2(require_btoa_node());
8081
8213
  var ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/;
8082
8214
  function requiresBasicAuth(url) {
8083
8215
  return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);
8084
8216
  }
8085
- async function hook(state, request2, route, parameters = {}) {
8086
- const endpoint = request2.endpoint.merge(route, parameters);
8217
+ async function hook(state, request, route, parameters = {}) {
8218
+ const endpoint = request.endpoint.merge(
8219
+ route,
8220
+ parameters
8221
+ );
8087
8222
  if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
8088
- return request2(endpoint);
8223
+ return request(endpoint);
8089
8224
  }
8090
8225
  if (requiresBasicAuth(endpoint.url)) {
8091
- const credentials = btoa(`${state.clientId}:${state.clientSecret}`);
8226
+ const credentials = (0, import_btoa_lite.default)(`${state.clientId}:${state.clientSecret}`);
8092
8227
  endpoint.headers.authorization = `basic ${credentials}`;
8093
- return request2(endpoint);
8228
+ return request(endpoint);
8094
8229
  }
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
- });
8230
+ const { token } = state.clientType === "oauth-app" ? await auth({ ...state, request }) : await auth({ ...state, request });
8104
8231
  endpoint.headers.authorization = "token " + token;
8105
- return request2(endpoint);
8232
+ return request(endpoint);
8106
8233
  }
8107
8234
  function createOAuthUserAuth2({
8108
8235
  clientId,
8109
8236
  clientSecret,
8110
8237
  clientType = "oauth-app",
8111
- request: request$1 = request.request.defaults({
8238
+ request = import_request.request.defaults({
8112
8239
  headers: {
8113
- "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${universalUserAgent.getUserAgent()}`
8240
+ "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
8114
8241
  }
8115
8242
  }),
8116
8243
  onTokenCreated,
@@ -8122,7 +8249,7 @@ var require_dist_node9 = __commonJS({
8122
8249
  clientSecret,
8123
8250
  onTokenCreated,
8124
8251
  strategyOptions,
8125
- request: request$1
8252
+ request
8126
8253
  });
8127
8254
  return Object.assign(auth.bind(null, state), {
8128
8255
  // @ts-expect-error not worth the extra code needed to appease TS
@@ -8130,23 +8257,50 @@ var require_dist_node9 = __commonJS({
8130
8257
  });
8131
8258
  }
8132
8259
  createOAuthUserAuth2.VERSION = VERSION;
8133
- exports2.createOAuthUserAuth = createOAuthUserAuth2;
8134
- exports2.requiresBasicAuth = requiresBasicAuth;
8135
8260
  }
8136
8261
  });
8137
8262
 
8138
8263
  // node_modules/@octokit/auth-oauth-app/dist-node/index.js
8139
8264
  var require_dist_node10 = __commonJS({
8140
- "node_modules/@octokit/auth-oauth-app/dist-node/index.js"(exports2) {
8265
+ "node_modules/@octokit/auth-oauth-app/dist-node/index.js"(exports2, module2) {
8141
8266
  "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();
8267
+ var __create2 = Object.create;
8268
+ var __defProp2 = Object.defineProperty;
8269
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
8270
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
8271
+ var __getProtoOf2 = Object.getPrototypeOf;
8272
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
8273
+ var __export = (target, all) => {
8274
+ for (var name in all)
8275
+ __defProp2(target, name, { get: all[name], enumerable: true });
8276
+ };
8277
+ var __copyProps2 = (to, from, except, desc) => {
8278
+ if (from && typeof from === "object" || typeof from === "function") {
8279
+ for (let key of __getOwnPropNames2(from))
8280
+ if (!__hasOwnProp2.call(to, key) && key !== except)
8281
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
8282
+ }
8283
+ return to;
8284
+ };
8285
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
8286
+ // If the importer is in node compatibility mode or this is not an ESM
8287
+ // file that has been converted to a CommonJS file using a Babel-
8288
+ // compatible transform (i.e. "__esModule" has not been set), then set
8289
+ // "default" to the CommonJS "module.exports" for node compatibility.
8290
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
8291
+ mod
8292
+ ));
8293
+ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
8294
+ var dist_src_exports = {};
8295
+ __export(dist_src_exports, {
8296
+ createOAuthAppAuth: () => createOAuthAppAuth,
8297
+ createOAuthUserAuth: () => import_auth_oauth_user3.createOAuthUserAuth
8298
+ });
8299
+ module2.exports = __toCommonJS(dist_src_exports);
8300
+ var import_universal_user_agent = require_dist_node();
8301
+ var import_request = require_dist_node5();
8302
+ var import_btoa_lite = __toESM2(require_btoa_node());
8303
+ var import_auth_oauth_user = require_dist_node9();
8150
8304
  async function auth(state, authOptions) {
8151
8305
  if (authOptions.type === "oauth-app") {
8152
8306
  return {
@@ -8155,15 +8309,14 @@ var require_dist_node10 = __commonJS({
8155
8309
  clientSecret: state.clientSecret,
8156
8310
  clientType: state.clientType,
8157
8311
  headers: {
8158
- authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`
8312
+ authorization: `basic ${(0, import_btoa_lite.default)(
8313
+ `${state.clientId}:${state.clientSecret}`
8314
+ )}`
8159
8315
  }
8160
8316
  };
8161
8317
  }
8162
8318
  if ("factory" in authOptions) {
8163
- const {
8164
- type,
8165
- ...options
8166
- } = {
8319
+ const { type, ...options } = {
8167
8320
  ...authOptions,
8168
8321
  ...state
8169
8322
  };
@@ -8175,24 +8328,31 @@ var require_dist_node10 = __commonJS({
8175
8328
  request: state.request,
8176
8329
  ...authOptions
8177
8330
  };
8178
- const userAuth = state.clientType === "oauth-app" ? await authOauthUser.createOAuthUserAuth({
8331
+ const userAuth = state.clientType === "oauth-app" ? await (0, import_auth_oauth_user.createOAuthUserAuth)({
8179
8332
  ...common,
8180
8333
  clientType: state.clientType
8181
- }) : await authOauthUser.createOAuthUserAuth({
8334
+ }) : await (0, import_auth_oauth_user.createOAuthUserAuth)({
8182
8335
  ...common,
8183
8336
  clientType: state.clientType
8184
8337
  });
8185
8338
  return userAuth();
8186
8339
  }
8340
+ var import_btoa_lite2 = __toESM2(require_btoa_node());
8341
+ var import_auth_oauth_user2 = require_dist_node9();
8187
8342
  async function hook(state, request2, route, parameters) {
8188
- let endpoint = request2.endpoint.merge(route, parameters);
8343
+ let endpoint = request2.endpoint.merge(
8344
+ route,
8345
+ parameters
8346
+ );
8189
8347
  if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
8190
8348
  return request2(endpoint);
8191
8349
  }
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.`);
8350
+ if (state.clientType === "github-app" && !(0, import_auth_oauth_user2.requiresBasicAuth)(endpoint.url)) {
8351
+ throw new Error(
8352
+ `[@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.`
8353
+ );
8194
8354
  }
8195
- const credentials = btoa(`${state.clientId}:${state.clientSecret}`);
8355
+ const credentials = (0, import_btoa_lite2.default)(`${state.clientId}:${state.clientSecret}`);
8196
8356
  endpoint.headers.authorization = `basic ${credentials}`;
8197
8357
  try {
8198
8358
  return await request2(endpoint);
@@ -8203,33 +8363,31 @@ var require_dist_node10 = __commonJS({
8203
8363
  throw error;
8204
8364
  }
8205
8365
  }
8206
- var VERSION = "5.0.5";
8366
+ var VERSION = "5.0.6";
8367
+ var import_auth_oauth_user3 = require_dist_node9();
8207
8368
  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);
8369
+ const state = Object.assign(
8370
+ {
8371
+ request: import_request.request.defaults({
8372
+ headers: {
8373
+ "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
8374
+ }
8375
+ }),
8376
+ clientType: "oauth-app"
8377
+ },
8378
+ options
8379
+ );
8216
8380
  return Object.assign(auth.bind(null, state), {
8217
8381
  hook: hook.bind(null, state)
8218
8382
  });
8219
8383
  }
8220
- Object.defineProperty(exports2, "createOAuthUserAuth", {
8221
- enumerable: true,
8222
- get: function() {
8223
- return authOauthUser.createOAuthUserAuth;
8224
- }
8225
- });
8226
- exports2.createOAuthAppAuth = createOAuthAppAuth;
8227
8384
  }
8228
8385
  });
8229
8386
 
8230
8387
  // node_modules/jsonwebtoken/lib/JsonWebTokenError.js
8231
8388
  var require_JsonWebTokenError = __commonJS({
8232
8389
  "node_modules/jsonwebtoken/lib/JsonWebTokenError.js"(exports2, module2) {
8390
+ "use strict";
8233
8391
  var JsonWebTokenError = function(message, error) {
8234
8392
  Error.call(this, message);
8235
8393
  if (Error.captureStackTrace) {
@@ -8249,6 +8407,7 @@ var require_JsonWebTokenError = __commonJS({
8249
8407
  // node_modules/jsonwebtoken/lib/NotBeforeError.js
8250
8408
  var require_NotBeforeError = __commonJS({
8251
8409
  "node_modules/jsonwebtoken/lib/NotBeforeError.js"(exports2, module2) {
8410
+ "use strict";
8252
8411
  var JsonWebTokenError = require_JsonWebTokenError();
8253
8412
  var NotBeforeError = function(message, date) {
8254
8413
  JsonWebTokenError.call(this, message);
@@ -8264,6 +8423,7 @@ var require_NotBeforeError = __commonJS({
8264
8423
  // node_modules/jsonwebtoken/lib/TokenExpiredError.js
8265
8424
  var require_TokenExpiredError = __commonJS({
8266
8425
  "node_modules/jsonwebtoken/lib/TokenExpiredError.js"(exports2, module2) {
8426
+ "use strict";
8267
8427
  var JsonWebTokenError = require_JsonWebTokenError();
8268
8428
  var TokenExpiredError = function(message, expiredAt) {
8269
8429
  JsonWebTokenError.call(this, message);
@@ -8279,6 +8439,7 @@ var require_TokenExpiredError = __commonJS({
8279
8439
  // node_modules/safe-buffer/index.js
8280
8440
  var require_safe_buffer = __commonJS({
8281
8441
  "node_modules/safe-buffer/index.js"(exports2, module2) {
8442
+ "use strict";
8282
8443
  var buffer = require("buffer");
8283
8444
  var Buffer2 = buffer.Buffer;
8284
8445
  function copyProps(src, dst) {
@@ -8337,6 +8498,7 @@ var require_safe_buffer = __commonJS({
8337
8498
  // node_modules/jws/lib/data-stream.js
8338
8499
  var require_data_stream = __commonJS({
8339
8500
  "node_modules/jws/lib/data-stream.js"(exports2, module2) {
8501
+ "use strict";
8340
8502
  var Buffer2 = require_safe_buffer().Buffer;
8341
8503
  var Stream = require("stream");
8342
8504
  var util = require("util");
@@ -8583,6 +8745,7 @@ var require_ecdsa_sig_formatter = __commonJS({
8583
8745
  // node_modules/jwa/index.js
8584
8746
  var require_jwa = __commonJS({
8585
8747
  "node_modules/jwa/index.js"(exports2, module2) {
8748
+ "use strict";
8586
8749
  var bufferEqual = require_buffer_equal_constant_time();
8587
8750
  var Buffer2 = require_safe_buffer().Buffer;
8588
8751
  var crypto = require("crypto");
@@ -8796,6 +8959,7 @@ var require_jwa = __commonJS({
8796
8959
  // node_modules/jws/lib/tostring.js
8797
8960
  var require_tostring = __commonJS({
8798
8961
  "node_modules/jws/lib/tostring.js"(exports2, module2) {
8962
+ "use strict";
8799
8963
  var Buffer2 = require("buffer").Buffer;
8800
8964
  module2.exports = function toString(obj) {
8801
8965
  if (typeof obj === "string")
@@ -8810,6 +8974,7 @@ var require_tostring = __commonJS({
8810
8974
  // node_modules/jws/lib/sign-stream.js
8811
8975
  var require_sign_stream = __commonJS({
8812
8976
  "node_modules/jws/lib/sign-stream.js"(exports2, module2) {
8977
+ "use strict";
8813
8978
  var Buffer2 = require_safe_buffer().Buffer;
8814
8979
  var DataStream = require_data_stream();
8815
8980
  var jwa = require_jwa();
@@ -8880,6 +9045,7 @@ var require_sign_stream = __commonJS({
8880
9045
  // node_modules/jws/lib/verify-stream.js
8881
9046
  var require_verify_stream = __commonJS({
8882
9047
  "node_modules/jws/lib/verify-stream.js"(exports2, module2) {
9048
+ "use strict";
8883
9049
  var Buffer2 = require_safe_buffer().Buffer;
8884
9050
  var DataStream = require_data_stream();
8885
9051
  var jwa = require_jwa();
@@ -8990,6 +9156,7 @@ var require_verify_stream = __commonJS({
8990
9156
  // node_modules/jws/index.js
8991
9157
  var require_jws = __commonJS({
8992
9158
  "node_modules/jws/index.js"(exports2) {
9159
+ "use strict";
8993
9160
  var SignStream = require_sign_stream();
8994
9161
  var VerifyStream = require_verify_stream();
8995
9162
  var ALGORITHMS = [
@@ -9023,6 +9190,7 @@ var require_jws = __commonJS({
9023
9190
  // node_modules/jsonwebtoken/decode.js
9024
9191
  var require_decode = __commonJS({
9025
9192
  "node_modules/jsonwebtoken/decode.js"(exports2, module2) {
9193
+ "use strict";
9026
9194
  var jws = require_jws();
9027
9195
  module2.exports = function(jwt, options) {
9028
9196
  options = options || {};
@@ -9055,6 +9223,7 @@ var require_decode = __commonJS({
9055
9223
  // node_modules/ms/index.js
9056
9224
  var require_ms = __commonJS({
9057
9225
  "node_modules/ms/index.js"(exports2, module2) {
9226
+ "use strict";
9058
9227
  var s = 1e3;
9059
9228
  var m = s * 60;
9060
9229
  var h = m * 60;
@@ -9171,6 +9340,7 @@ var require_ms = __commonJS({
9171
9340
  // node_modules/jsonwebtoken/lib/timespan.js
9172
9341
  var require_timespan = __commonJS({
9173
9342
  "node_modules/jsonwebtoken/lib/timespan.js"(exports2, module2) {
9343
+ "use strict";
9174
9344
  var ms = require_ms();
9175
9345
  module2.exports = function(time, iat) {
9176
9346
  var timestamp = iat || Math.floor(Date.now() / 1e3);
@@ -9192,11 +9362,13 @@ var require_timespan = __commonJS({
9192
9362
  // node_modules/semver/internal/constants.js
9193
9363
  var require_constants = __commonJS({
9194
9364
  "node_modules/semver/internal/constants.js"(exports2, module2) {
9365
+ "use strict";
9195
9366
  var SEMVER_SPEC_VERSION = "2.0.0";
9196
9367
  var MAX_LENGTH = 256;
9197
9368
  var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
9198
9369
  9007199254740991;
9199
9370
  var MAX_SAFE_COMPONENT_LENGTH = 16;
9371
+ var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
9200
9372
  var RELEASE_TYPES = [
9201
9373
  "major",
9202
9374
  "premajor",
@@ -9209,6 +9381,7 @@ var require_constants = __commonJS({
9209
9381
  module2.exports = {
9210
9382
  MAX_LENGTH,
9211
9383
  MAX_SAFE_COMPONENT_LENGTH,
9384
+ MAX_SAFE_BUILD_LENGTH,
9212
9385
  MAX_SAFE_INTEGER,
9213
9386
  RELEASE_TYPES,
9214
9387
  SEMVER_SPEC_VERSION,
@@ -9221,6 +9394,7 @@ var require_constants = __commonJS({
9221
9394
  // node_modules/semver/internal/debug.js
9222
9395
  var require_debug = __commonJS({
9223
9396
  "node_modules/semver/internal/debug.js"(exports2, module2) {
9397
+ "use strict";
9224
9398
  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
9399
  };
9226
9400
  module2.exports = debug;
@@ -9230,30 +9404,46 @@ var require_debug = __commonJS({
9230
9404
  // node_modules/semver/internal/re.js
9231
9405
  var require_re = __commonJS({
9232
9406
  "node_modules/semver/internal/re.js"(exports2, module2) {
9233
- var { MAX_SAFE_COMPONENT_LENGTH } = require_constants();
9407
+ "use strict";
9408
+ var { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH } = require_constants();
9234
9409
  var debug = require_debug();
9235
9410
  exports2 = module2.exports = {};
9236
9411
  var re = exports2.re = [];
9412
+ var safeRe = exports2.safeRe = [];
9237
9413
  var src = exports2.src = [];
9238
9414
  var t = exports2.t = {};
9239
9415
  var R = 0;
9416
+ var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
9417
+ var safeRegexReplacements = [
9418
+ ["\\s", 1],
9419
+ ["\\d", MAX_SAFE_COMPONENT_LENGTH],
9420
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
9421
+ ];
9422
+ var makeSafeRegex = (value) => {
9423
+ for (const [token, max] of safeRegexReplacements) {
9424
+ value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
9425
+ }
9426
+ return value;
9427
+ };
9240
9428
  var createToken = (name, value, isGlobal) => {
9429
+ const safe = makeSafeRegex(value);
9241
9430
  const index = R++;
9242
9431
  debug(name, index, value);
9243
9432
  t[name] = index;
9244
9433
  src[index] = value;
9245
9434
  re[index] = new RegExp(value, isGlobal ? "g" : void 0);
9435
+ safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
9246
9436
  };
9247
9437
  createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
9248
- createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+");
9249
- createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*");
9438
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
9439
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
9250
9440
  createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
9251
9441
  createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
9252
9442
  createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
9253
9443
  createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
9254
9444
  createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
9255
9445
  createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
9256
- createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+");
9446
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
9257
9447
  createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
9258
9448
  createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
9259
9449
  createToken("FULL", `^${src[t.FULLPLAIN]}$`);
@@ -9293,6 +9483,7 @@ var require_re = __commonJS({
9293
9483
  // node_modules/semver/internal/parse-options.js
9294
9484
  var require_parse_options = __commonJS({
9295
9485
  "node_modules/semver/internal/parse-options.js"(exports2, module2) {
9486
+ "use strict";
9296
9487
  var looseOption = Object.freeze({ loose: true });
9297
9488
  var emptyOpts = Object.freeze({});
9298
9489
  var parseOptions = (options) => {
@@ -9311,6 +9502,7 @@ var require_parse_options = __commonJS({
9311
9502
  // node_modules/semver/internal/identifiers.js
9312
9503
  var require_identifiers = __commonJS({
9313
9504
  "node_modules/semver/internal/identifiers.js"(exports2, module2) {
9505
+ "use strict";
9314
9506
  var numeric = /^[0-9]+$/;
9315
9507
  var compareIdentifiers = (a, b) => {
9316
9508
  const anum = numeric.test(a);
@@ -9332,15 +9524,16 @@ var require_identifiers = __commonJS({
9332
9524
  // node_modules/semver/classes/semver.js
9333
9525
  var require_semver = __commonJS({
9334
9526
  "node_modules/semver/classes/semver.js"(exports2, module2) {
9527
+ "use strict";
9335
9528
  var debug = require_debug();
9336
9529
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
9337
- var { re, t } = require_re();
9530
+ var { safeRe: re, t } = require_re();
9338
9531
  var parseOptions = require_parse_options();
9339
9532
  var { compareIdentifiers } = require_identifiers();
9340
- var SemVer = class {
9533
+ var SemVer = class _SemVer {
9341
9534
  constructor(version, options) {
9342
9535
  options = parseOptions(options);
9343
- if (version instanceof SemVer) {
9536
+ if (version instanceof _SemVer) {
9344
9537
  if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
9345
9538
  return version;
9346
9539
  } else {
@@ -9403,11 +9596,11 @@ var require_semver = __commonJS({
9403
9596
  }
9404
9597
  compare(other) {
9405
9598
  debug("SemVer.compare", this.version, this.options, other);
9406
- if (!(other instanceof SemVer)) {
9599
+ if (!(other instanceof _SemVer)) {
9407
9600
  if (typeof other === "string" && other === this.version) {
9408
9601
  return 0;
9409
9602
  }
9410
- other = new SemVer(other, this.options);
9603
+ other = new _SemVer(other, this.options);
9411
9604
  }
9412
9605
  if (other.version === this.version) {
9413
9606
  return 0;
@@ -9415,14 +9608,14 @@ var require_semver = __commonJS({
9415
9608
  return this.compareMain(other) || this.comparePre(other);
9416
9609
  }
9417
9610
  compareMain(other) {
9418
- if (!(other instanceof SemVer)) {
9419
- other = new SemVer(other, this.options);
9611
+ if (!(other instanceof _SemVer)) {
9612
+ other = new _SemVer(other, this.options);
9420
9613
  }
9421
9614
  return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
9422
9615
  }
9423
9616
  comparePre(other) {
9424
- if (!(other instanceof SemVer)) {
9425
- other = new SemVer(other, this.options);
9617
+ if (!(other instanceof _SemVer)) {
9618
+ other = new _SemVer(other, this.options);
9426
9619
  }
9427
9620
  if (this.prerelease.length && !other.prerelease.length) {
9428
9621
  return -1;
@@ -9450,8 +9643,8 @@ var require_semver = __commonJS({
9450
9643
  } while (++i);
9451
9644
  }
9452
9645
  compareBuild(other) {
9453
- if (!(other instanceof SemVer)) {
9454
- other = new SemVer(other, this.options);
9646
+ if (!(other instanceof _SemVer)) {
9647
+ other = new _SemVer(other, this.options);
9455
9648
  }
9456
9649
  let i = 0;
9457
9650
  do {
@@ -9560,8 +9753,10 @@ var require_semver = __commonJS({
9560
9753
  default:
9561
9754
  throw new Error(`invalid increment argument: ${release}`);
9562
9755
  }
9563
- this.format();
9564
- this.raw = this.version;
9756
+ this.raw = this.format();
9757
+ if (this.build.length) {
9758
+ this.raw += `+${this.build.join(".")}`;
9759
+ }
9565
9760
  return this;
9566
9761
  }
9567
9762
  };
@@ -9572,6 +9767,7 @@ var require_semver = __commonJS({
9572
9767
  // node_modules/semver/functions/parse.js
9573
9768
  var require_parse = __commonJS({
9574
9769
  "node_modules/semver/functions/parse.js"(exports2, module2) {
9770
+ "use strict";
9575
9771
  var SemVer = require_semver();
9576
9772
  var parse = (version, options, throwErrors = false) => {
9577
9773
  if (version instanceof SemVer) {
@@ -9593,6 +9789,7 @@ var require_parse = __commonJS({
9593
9789
  // node_modules/semver/functions/valid.js
9594
9790
  var require_valid = __commonJS({
9595
9791
  "node_modules/semver/functions/valid.js"(exports2, module2) {
9792
+ "use strict";
9596
9793
  var parse = require_parse();
9597
9794
  var valid = (version, options) => {
9598
9795
  const v = parse(version, options);
@@ -9605,6 +9802,7 @@ var require_valid = __commonJS({
9605
9802
  // node_modules/semver/functions/clean.js
9606
9803
  var require_clean = __commonJS({
9607
9804
  "node_modules/semver/functions/clean.js"(exports2, module2) {
9805
+ "use strict";
9608
9806
  var parse = require_parse();
9609
9807
  var clean = (version, options) => {
9610
9808
  const s = parse(version.trim().replace(/^[=v]+/, ""), options);
@@ -9617,6 +9815,7 @@ var require_clean = __commonJS({
9617
9815
  // node_modules/semver/functions/inc.js
9618
9816
  var require_inc = __commonJS({
9619
9817
  "node_modules/semver/functions/inc.js"(exports2, module2) {
9818
+ "use strict";
9620
9819
  var SemVer = require_semver();
9621
9820
  var inc = (version, release, options, identifier, identifierBase) => {
9622
9821
  if (typeof options === "string") {
@@ -9640,6 +9839,7 @@ var require_inc = __commonJS({
9640
9839
  // node_modules/semver/functions/diff.js
9641
9840
  var require_diff = __commonJS({
9642
9841
  "node_modules/semver/functions/diff.js"(exports2, module2) {
9842
+ "use strict";
9643
9843
  var parse = require_parse();
9644
9844
  var diff = (version1, version2) => {
9645
9845
  const v1 = parse(version1, null, true);
@@ -9652,6 +9852,19 @@ var require_diff = __commonJS({
9652
9852
  const highVersion = v1Higher ? v1 : v2;
9653
9853
  const lowVersion = v1Higher ? v2 : v1;
9654
9854
  const highHasPre = !!highVersion.prerelease.length;
9855
+ const lowHasPre = !!lowVersion.prerelease.length;
9856
+ if (lowHasPre && !highHasPre) {
9857
+ if (!lowVersion.patch && !lowVersion.minor) {
9858
+ return "major";
9859
+ }
9860
+ if (highVersion.patch) {
9861
+ return "patch";
9862
+ }
9863
+ if (highVersion.minor) {
9864
+ return "minor";
9865
+ }
9866
+ return "major";
9867
+ }
9655
9868
  const prefix = highHasPre ? "pre" : "";
9656
9869
  if (v1.major !== v2.major) {
9657
9870
  return prefix + "major";
@@ -9662,16 +9875,7 @@ var require_diff = __commonJS({
9662
9875
  if (v1.patch !== v2.patch) {
9663
9876
  return prefix + "patch";
9664
9877
  }
9665
- if (highHasPre) {
9666
- return "prerelease";
9667
- }
9668
- if (lowVersion.patch) {
9669
- return "patch";
9670
- }
9671
- if (lowVersion.minor) {
9672
- return "minor";
9673
- }
9674
- return "major";
9878
+ return "prerelease";
9675
9879
  };
9676
9880
  module2.exports = diff;
9677
9881
  }
@@ -9680,6 +9884,7 @@ var require_diff = __commonJS({
9680
9884
  // node_modules/semver/functions/major.js
9681
9885
  var require_major = __commonJS({
9682
9886
  "node_modules/semver/functions/major.js"(exports2, module2) {
9887
+ "use strict";
9683
9888
  var SemVer = require_semver();
9684
9889
  var major = (a, loose) => new SemVer(a, loose).major;
9685
9890
  module2.exports = major;
@@ -9689,6 +9894,7 @@ var require_major = __commonJS({
9689
9894
  // node_modules/semver/functions/minor.js
9690
9895
  var require_minor = __commonJS({
9691
9896
  "node_modules/semver/functions/minor.js"(exports2, module2) {
9897
+ "use strict";
9692
9898
  var SemVer = require_semver();
9693
9899
  var minor = (a, loose) => new SemVer(a, loose).minor;
9694
9900
  module2.exports = minor;
@@ -9698,6 +9904,7 @@ var require_minor = __commonJS({
9698
9904
  // node_modules/semver/functions/patch.js
9699
9905
  var require_patch = __commonJS({
9700
9906
  "node_modules/semver/functions/patch.js"(exports2, module2) {
9907
+ "use strict";
9701
9908
  var SemVer = require_semver();
9702
9909
  var patch = (a, loose) => new SemVer(a, loose).patch;
9703
9910
  module2.exports = patch;
@@ -9707,6 +9914,7 @@ var require_patch = __commonJS({
9707
9914
  // node_modules/semver/functions/prerelease.js
9708
9915
  var require_prerelease = __commonJS({
9709
9916
  "node_modules/semver/functions/prerelease.js"(exports2, module2) {
9917
+ "use strict";
9710
9918
  var parse = require_parse();
9711
9919
  var prerelease = (version, options) => {
9712
9920
  const parsed = parse(version, options);
@@ -9719,6 +9927,7 @@ var require_prerelease = __commonJS({
9719
9927
  // node_modules/semver/functions/compare.js
9720
9928
  var require_compare = __commonJS({
9721
9929
  "node_modules/semver/functions/compare.js"(exports2, module2) {
9930
+ "use strict";
9722
9931
  var SemVer = require_semver();
9723
9932
  var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
9724
9933
  module2.exports = compare;
@@ -9728,6 +9937,7 @@ var require_compare = __commonJS({
9728
9937
  // node_modules/semver/functions/rcompare.js
9729
9938
  var require_rcompare = __commonJS({
9730
9939
  "node_modules/semver/functions/rcompare.js"(exports2, module2) {
9940
+ "use strict";
9731
9941
  var compare = require_compare();
9732
9942
  var rcompare = (a, b, loose) => compare(b, a, loose);
9733
9943
  module2.exports = rcompare;
@@ -9737,6 +9947,7 @@ var require_rcompare = __commonJS({
9737
9947
  // node_modules/semver/functions/compare-loose.js
9738
9948
  var require_compare_loose = __commonJS({
9739
9949
  "node_modules/semver/functions/compare-loose.js"(exports2, module2) {
9950
+ "use strict";
9740
9951
  var compare = require_compare();
9741
9952
  var compareLoose = (a, b) => compare(a, b, true);
9742
9953
  module2.exports = compareLoose;
@@ -9746,6 +9957,7 @@ var require_compare_loose = __commonJS({
9746
9957
  // node_modules/semver/functions/compare-build.js
9747
9958
  var require_compare_build = __commonJS({
9748
9959
  "node_modules/semver/functions/compare-build.js"(exports2, module2) {
9960
+ "use strict";
9749
9961
  var SemVer = require_semver();
9750
9962
  var compareBuild = (a, b, loose) => {
9751
9963
  const versionA = new SemVer(a, loose);
@@ -9759,6 +9971,7 @@ var require_compare_build = __commonJS({
9759
9971
  // node_modules/semver/functions/sort.js
9760
9972
  var require_sort = __commonJS({
9761
9973
  "node_modules/semver/functions/sort.js"(exports2, module2) {
9974
+ "use strict";
9762
9975
  var compareBuild = require_compare_build();
9763
9976
  var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
9764
9977
  module2.exports = sort;
@@ -9768,6 +9981,7 @@ var require_sort = __commonJS({
9768
9981
  // node_modules/semver/functions/rsort.js
9769
9982
  var require_rsort = __commonJS({
9770
9983
  "node_modules/semver/functions/rsort.js"(exports2, module2) {
9984
+ "use strict";
9771
9985
  var compareBuild = require_compare_build();
9772
9986
  var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
9773
9987
  module2.exports = rsort;
@@ -9777,6 +9991,7 @@ var require_rsort = __commonJS({
9777
9991
  // node_modules/semver/functions/gt.js
9778
9992
  var require_gt = __commonJS({
9779
9993
  "node_modules/semver/functions/gt.js"(exports2, module2) {
9994
+ "use strict";
9780
9995
  var compare = require_compare();
9781
9996
  var gt = (a, b, loose) => compare(a, b, loose) > 0;
9782
9997
  module2.exports = gt;
@@ -9786,6 +10001,7 @@ var require_gt = __commonJS({
9786
10001
  // node_modules/semver/functions/lt.js
9787
10002
  var require_lt = __commonJS({
9788
10003
  "node_modules/semver/functions/lt.js"(exports2, module2) {
10004
+ "use strict";
9789
10005
  var compare = require_compare();
9790
10006
  var lt = (a, b, loose) => compare(a, b, loose) < 0;
9791
10007
  module2.exports = lt;
@@ -9795,6 +10011,7 @@ var require_lt = __commonJS({
9795
10011
  // node_modules/semver/functions/eq.js
9796
10012
  var require_eq = __commonJS({
9797
10013
  "node_modules/semver/functions/eq.js"(exports2, module2) {
10014
+ "use strict";
9798
10015
  var compare = require_compare();
9799
10016
  var eq = (a, b, loose) => compare(a, b, loose) === 0;
9800
10017
  module2.exports = eq;
@@ -9804,6 +10021,7 @@ var require_eq = __commonJS({
9804
10021
  // node_modules/semver/functions/neq.js
9805
10022
  var require_neq = __commonJS({
9806
10023
  "node_modules/semver/functions/neq.js"(exports2, module2) {
10024
+ "use strict";
9807
10025
  var compare = require_compare();
9808
10026
  var neq = (a, b, loose) => compare(a, b, loose) !== 0;
9809
10027
  module2.exports = neq;
@@ -9813,6 +10031,7 @@ var require_neq = __commonJS({
9813
10031
  // node_modules/semver/functions/gte.js
9814
10032
  var require_gte = __commonJS({
9815
10033
  "node_modules/semver/functions/gte.js"(exports2, module2) {
10034
+ "use strict";
9816
10035
  var compare = require_compare();
9817
10036
  var gte = (a, b, loose) => compare(a, b, loose) >= 0;
9818
10037
  module2.exports = gte;
@@ -9822,6 +10041,7 @@ var require_gte = __commonJS({
9822
10041
  // node_modules/semver/functions/lte.js
9823
10042
  var require_lte = __commonJS({
9824
10043
  "node_modules/semver/functions/lte.js"(exports2, module2) {
10044
+ "use strict";
9825
10045
  var compare = require_compare();
9826
10046
  var lte = (a, b, loose) => compare(a, b, loose) <= 0;
9827
10047
  module2.exports = lte;
@@ -9831,6 +10051,7 @@ var require_lte = __commonJS({
9831
10051
  // node_modules/semver/functions/cmp.js
9832
10052
  var require_cmp = __commonJS({
9833
10053
  "node_modules/semver/functions/cmp.js"(exports2, module2) {
10054
+ "use strict";
9834
10055
  var eq = require_eq();
9835
10056
  var neq = require_neq();
9836
10057
  var gt = require_gt();
@@ -9880,9 +10101,10 @@ var require_cmp = __commonJS({
9880
10101
  // node_modules/semver/functions/coerce.js
9881
10102
  var require_coerce = __commonJS({
9882
10103
  "node_modules/semver/functions/coerce.js"(exports2, module2) {
10104
+ "use strict";
9883
10105
  var SemVer = require_semver();
9884
10106
  var parse = require_parse();
9885
- var { re, t } = require_re();
10107
+ var { safeRe: re, t } = require_re();
9886
10108
  var coerce = (version, options) => {
9887
10109
  if (version instanceof SemVer) {
9888
10110
  return version;
@@ -10572,14 +10794,15 @@ var require_lru_cache = __commonJS({
10572
10794
  // node_modules/semver/classes/range.js
10573
10795
  var require_range = __commonJS({
10574
10796
  "node_modules/semver/classes/range.js"(exports2, module2) {
10575
- var Range = class {
10797
+ "use strict";
10798
+ var Range = class _Range {
10576
10799
  constructor(range, options) {
10577
10800
  options = parseOptions(options);
10578
- if (range instanceof Range) {
10801
+ if (range instanceof _Range) {
10579
10802
  if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
10580
10803
  return range;
10581
10804
  } else {
10582
- return new Range(range.raw, options);
10805
+ return new _Range(range.raw, options);
10583
10806
  }
10584
10807
  }
10585
10808
  if (range instanceof Comparator) {
@@ -10591,10 +10814,10 @@ var require_range = __commonJS({
10591
10814
  this.options = options;
10592
10815
  this.loose = !!options.loose;
10593
10816
  this.includePrerelease = !!options.includePrerelease;
10594
- this.raw = range;
10595
- this.set = range.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
10817
+ this.raw = range.trim().split(/\s+/).join(" ");
10818
+ this.set = this.raw.split("||").map((r) => this.parseRange(r)).filter((c) => c.length);
10596
10819
  if (!this.set.length) {
10597
- throw new TypeError(`Invalid SemVer Range: ${range}`);
10820
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
10598
10821
  }
10599
10822
  if (this.set.length > 1) {
10600
10823
  const first = this.set[0];
@@ -10613,16 +10836,13 @@ var require_range = __commonJS({
10613
10836
  this.format();
10614
10837
  }
10615
10838
  format() {
10616
- this.range = this.set.map((comps) => {
10617
- return comps.join(" ").trim();
10618
- }).join("||").trim();
10839
+ this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
10619
10840
  return this.range;
10620
10841
  }
10621
10842
  toString() {
10622
10843
  return this.range;
10623
10844
  }
10624
10845
  parseRange(range) {
10625
- range = range.trim();
10626
10846
  const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
10627
10847
  const memoKey = memoOpts + ":" + range;
10628
10848
  const cached = cache.get(memoKey);
@@ -10636,8 +10856,9 @@ var require_range = __commonJS({
10636
10856
  range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
10637
10857
  debug("comparator trim", range);
10638
10858
  range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
10859
+ debug("tilde trim", range);
10639
10860
  range = range.replace(re[t.CARETTRIM], caretTrimReplace);
10640
- range = range.split(/\s+/).join(" ");
10861
+ debug("caret trim", range);
10641
10862
  let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
10642
10863
  if (loose) {
10643
10864
  rangeList = rangeList.filter((comp) => {
@@ -10662,7 +10883,7 @@ var require_range = __commonJS({
10662
10883
  return result;
10663
10884
  }
10664
10885
  intersects(range, options) {
10665
- if (!(range instanceof Range)) {
10886
+ if (!(range instanceof _Range)) {
10666
10887
  throw new TypeError("a Range is required");
10667
10888
  }
10668
10889
  return this.set.some((thisComparators) => {
@@ -10703,7 +10924,7 @@ var require_range = __commonJS({
10703
10924
  var debug = require_debug();
10704
10925
  var SemVer = require_semver();
10705
10926
  var {
10706
- re,
10927
+ safeRe: re,
10707
10928
  t,
10708
10929
  comparatorTrimReplace,
10709
10930
  tildeTrimReplace,
@@ -10737,9 +10958,9 @@ var require_range = __commonJS({
10737
10958
  return comp;
10738
10959
  };
10739
10960
  var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
10740
- var replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => {
10741
- return replaceTilde(c, options);
10742
- }).join(" ");
10961
+ var replaceTildes = (comp, options) => {
10962
+ return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
10963
+ };
10743
10964
  var replaceTilde = (comp, options) => {
10744
10965
  const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
10745
10966
  return comp.replace(r, (_, M, m, p, pr) => {
@@ -10761,9 +10982,9 @@ var require_range = __commonJS({
10761
10982
  return ret;
10762
10983
  });
10763
10984
  };
10764
- var replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => {
10765
- return replaceCaret(c, options);
10766
- }).join(" ");
10985
+ var replaceCarets = (comp, options) => {
10986
+ return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
10987
+ };
10767
10988
  var replaceCaret = (comp, options) => {
10768
10989
  debug("caret", comp, options);
10769
10990
  const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
@@ -10810,9 +11031,7 @@ var require_range = __commonJS({
10810
11031
  };
10811
11032
  var replaceXRanges = (comp, options) => {
10812
11033
  debug("replaceXRanges", comp, options);
10813
- return comp.split(/\s+/).map((c) => {
10814
- return replaceXRange(c, options);
10815
- }).join(" ");
11034
+ return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
10816
11035
  };
10817
11036
  var replaceXRange = (comp, options) => {
10818
11037
  comp = comp.trim();
@@ -10933,20 +11152,22 @@ var require_range = __commonJS({
10933
11152
  // node_modules/semver/classes/comparator.js
10934
11153
  var require_comparator = __commonJS({
10935
11154
  "node_modules/semver/classes/comparator.js"(exports2, module2) {
11155
+ "use strict";
10936
11156
  var ANY = Symbol("SemVer ANY");
10937
- var Comparator = class {
11157
+ var Comparator = class _Comparator {
10938
11158
  static get ANY() {
10939
11159
  return ANY;
10940
11160
  }
10941
11161
  constructor(comp, options) {
10942
11162
  options = parseOptions(options);
10943
- if (comp instanceof Comparator) {
11163
+ if (comp instanceof _Comparator) {
10944
11164
  if (comp.loose === !!options.loose) {
10945
11165
  return comp;
10946
11166
  } else {
10947
11167
  comp = comp.value;
10948
11168
  }
10949
11169
  }
11170
+ comp = comp.trim().split(/\s+/).join(" ");
10950
11171
  debug("comparator", comp, options);
10951
11172
  this.options = options;
10952
11173
  this.loose = !!options.loose;
@@ -10992,7 +11213,7 @@ var require_comparator = __commonJS({
10992
11213
  return cmp(version, this.operator, this.semver, this.options);
10993
11214
  }
10994
11215
  intersects(comp, options) {
10995
- if (!(comp instanceof Comparator)) {
11216
+ if (!(comp instanceof _Comparator)) {
10996
11217
  throw new TypeError("a Comparator is required");
10997
11218
  }
10998
11219
  if (this.operator === "") {
@@ -11033,7 +11254,7 @@ var require_comparator = __commonJS({
11033
11254
  };
11034
11255
  module2.exports = Comparator;
11035
11256
  var parseOptions = require_parse_options();
11036
- var { re, t } = require_re();
11257
+ var { safeRe: re, t } = require_re();
11037
11258
  var cmp = require_cmp();
11038
11259
  var debug = require_debug();
11039
11260
  var SemVer = require_semver();
@@ -11044,6 +11265,7 @@ var require_comparator = __commonJS({
11044
11265
  // node_modules/semver/functions/satisfies.js
11045
11266
  var require_satisfies = __commonJS({
11046
11267
  "node_modules/semver/functions/satisfies.js"(exports2, module2) {
11268
+ "use strict";
11047
11269
  var Range = require_range();
11048
11270
  var satisfies = (version, range, options) => {
11049
11271
  try {
@@ -11060,6 +11282,7 @@ var require_satisfies = __commonJS({
11060
11282
  // node_modules/semver/ranges/to-comparators.js
11061
11283
  var require_to_comparators = __commonJS({
11062
11284
  "node_modules/semver/ranges/to-comparators.js"(exports2, module2) {
11285
+ "use strict";
11063
11286
  var Range = require_range();
11064
11287
  var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
11065
11288
  module2.exports = toComparators;
@@ -11069,6 +11292,7 @@ var require_to_comparators = __commonJS({
11069
11292
  // node_modules/semver/ranges/max-satisfying.js
11070
11293
  var require_max_satisfying = __commonJS({
11071
11294
  "node_modules/semver/ranges/max-satisfying.js"(exports2, module2) {
11295
+ "use strict";
11072
11296
  var SemVer = require_semver();
11073
11297
  var Range = require_range();
11074
11298
  var maxSatisfying = (versions, range, options) => {
@@ -11097,6 +11321,7 @@ var require_max_satisfying = __commonJS({
11097
11321
  // node_modules/semver/ranges/min-satisfying.js
11098
11322
  var require_min_satisfying = __commonJS({
11099
11323
  "node_modules/semver/ranges/min-satisfying.js"(exports2, module2) {
11324
+ "use strict";
11100
11325
  var SemVer = require_semver();
11101
11326
  var Range = require_range();
11102
11327
  var minSatisfying = (versions, range, options) => {
@@ -11125,6 +11350,7 @@ var require_min_satisfying = __commonJS({
11125
11350
  // node_modules/semver/ranges/min-version.js
11126
11351
  var require_min_version = __commonJS({
11127
11352
  "node_modules/semver/ranges/min-version.js"(exports2, module2) {
11353
+ "use strict";
11128
11354
  var SemVer = require_semver();
11129
11355
  var Range = require_range();
11130
11356
  var gt = require_gt();
@@ -11181,6 +11407,7 @@ var require_min_version = __commonJS({
11181
11407
  // node_modules/semver/ranges/valid.js
11182
11408
  var require_valid2 = __commonJS({
11183
11409
  "node_modules/semver/ranges/valid.js"(exports2, module2) {
11410
+ "use strict";
11184
11411
  var Range = require_range();
11185
11412
  var validRange = (range, options) => {
11186
11413
  try {
@@ -11196,6 +11423,7 @@ var require_valid2 = __commonJS({
11196
11423
  // node_modules/semver/ranges/outside.js
11197
11424
  var require_outside = __commonJS({
11198
11425
  "node_modules/semver/ranges/outside.js"(exports2, module2) {
11426
+ "use strict";
11199
11427
  var SemVer = require_semver();
11200
11428
  var Comparator = require_comparator();
11201
11429
  var { ANY } = Comparator;
@@ -11264,6 +11492,7 @@ var require_outside = __commonJS({
11264
11492
  // node_modules/semver/ranges/gtr.js
11265
11493
  var require_gtr = __commonJS({
11266
11494
  "node_modules/semver/ranges/gtr.js"(exports2, module2) {
11495
+ "use strict";
11267
11496
  var outside = require_outside();
11268
11497
  var gtr = (version, range, options) => outside(version, range, ">", options);
11269
11498
  module2.exports = gtr;
@@ -11273,6 +11502,7 @@ var require_gtr = __commonJS({
11273
11502
  // node_modules/semver/ranges/ltr.js
11274
11503
  var require_ltr = __commonJS({
11275
11504
  "node_modules/semver/ranges/ltr.js"(exports2, module2) {
11505
+ "use strict";
11276
11506
  var outside = require_outside();
11277
11507
  var ltr = (version, range, options) => outside(version, range, "<", options);
11278
11508
  module2.exports = ltr;
@@ -11282,6 +11512,7 @@ var require_ltr = __commonJS({
11282
11512
  // node_modules/semver/ranges/intersects.js
11283
11513
  var require_intersects = __commonJS({
11284
11514
  "node_modules/semver/ranges/intersects.js"(exports2, module2) {
11515
+ "use strict";
11285
11516
  var Range = require_range();
11286
11517
  var intersects = (r1, r2, options) => {
11287
11518
  r1 = new Range(r1, options);
@@ -11295,6 +11526,7 @@ var require_intersects = __commonJS({
11295
11526
  // node_modules/semver/ranges/simplify.js
11296
11527
  var require_simplify = __commonJS({
11297
11528
  "node_modules/semver/ranges/simplify.js"(exports2, module2) {
11529
+ "use strict";
11298
11530
  var satisfies = require_satisfies();
11299
11531
  var compare = require_compare();
11300
11532
  module2.exports = (versions, range, options) => {
@@ -11344,6 +11576,7 @@ var require_simplify = __commonJS({
11344
11576
  // node_modules/semver/ranges/subset.js
11345
11577
  var require_subset = __commonJS({
11346
11578
  "node_modules/semver/ranges/subset.js"(exports2, module2) {
11579
+ "use strict";
11347
11580
  var Range = require_range();
11348
11581
  var Comparator = require_comparator();
11349
11582
  var { ANY } = Comparator;
@@ -11506,6 +11739,7 @@ var require_subset = __commonJS({
11506
11739
  // node_modules/semver/index.js
11507
11740
  var require_semver2 = __commonJS({
11508
11741
  "node_modules/semver/index.js"(exports2, module2) {
11742
+ "use strict";
11509
11743
  var internalRe = require_re();
11510
11744
  var constants = require_constants();
11511
11745
  var SemVer = require_semver();
@@ -11600,6 +11834,7 @@ var require_semver2 = __commonJS({
11600
11834
  // node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js
11601
11835
  var require_asymmetricKeyDetailsSupported = __commonJS({
11602
11836
  "node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js"(exports2, module2) {
11837
+ "use strict";
11603
11838
  var semver = require_semver2();
11604
11839
  module2.exports = semver.satisfies(process.version, ">=15.7.0");
11605
11840
  }
@@ -11608,6 +11843,7 @@ var require_asymmetricKeyDetailsSupported = __commonJS({
11608
11843
  // node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js
11609
11844
  var require_rsaPssKeyDetailsSupported = __commonJS({
11610
11845
  "node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js"(exports2, module2) {
11846
+ "use strict";
11611
11847
  var semver = require_semver2();
11612
11848
  module2.exports = semver.satisfies(process.version, ">=16.9.0");
11613
11849
  }
@@ -11616,6 +11852,7 @@ var require_rsaPssKeyDetailsSupported = __commonJS({
11616
11852
  // node_modules/jsonwebtoken/lib/validateAsymmetricKey.js
11617
11853
  var require_validateAsymmetricKey = __commonJS({
11618
11854
  "node_modules/jsonwebtoken/lib/validateAsymmetricKey.js"(exports2, module2) {
11855
+ "use strict";
11619
11856
  var ASYMMETRIC_KEY_DETAILS_SUPPORTED = require_asymmetricKeyDetailsSupported();
11620
11857
  var RSA_PSS_KEY_DETAILS_SUPPORTED = require_rsaPssKeyDetailsSupported();
11621
11858
  var allowedAlgorithmsForKeys = {
@@ -11671,6 +11908,7 @@ var require_validateAsymmetricKey = __commonJS({
11671
11908
  // node_modules/jsonwebtoken/lib/psSupported.js
11672
11909
  var require_psSupported = __commonJS({
11673
11910
  "node_modules/jsonwebtoken/lib/psSupported.js"(exports2, module2) {
11911
+ "use strict";
11674
11912
  var semver = require_semver2();
11675
11913
  module2.exports = semver.satisfies(process.version, "^6.12.0 || >=8.0.0");
11676
11914
  }
@@ -11679,6 +11917,7 @@ var require_psSupported = __commonJS({
11679
11917
  // node_modules/jsonwebtoken/verify.js
11680
11918
  var require_verify = __commonJS({
11681
11919
  "node_modules/jsonwebtoken/verify.js"(exports2, module2) {
11920
+ "use strict";
11682
11921
  var JsonWebTokenError = require_JsonWebTokenError();
11683
11922
  var NotBeforeError = require_NotBeforeError();
11684
11923
  var TokenExpiredError = require_TokenExpiredError();
@@ -11895,6 +12134,7 @@ var require_verify = __commonJS({
11895
12134
  // node_modules/lodash/lodash.js
11896
12135
  var require_lodash = __commonJS({
11897
12136
  "node_modules/lodash/lodash.js"(exports2, module2) {
12137
+ "use strict";
11898
12138
  (function() {
11899
12139
  var undefined2;
11900
12140
  var VERSION = "4.17.21";
@@ -12610,10 +12850,10 @@ var require_lodash = __commonJS({
12610
12850
  }();
12611
12851
  var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
12612
12852
  var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined2, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
12613
- var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
12614
- var metaMap = WeakMap2 && new WeakMap2();
12853
+ var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
12854
+ var metaMap = WeakMap && new WeakMap();
12615
12855
  var realNames = {};
12616
- var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
12856
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap);
12617
12857
  var symbolProto = Symbol2 ? Symbol2.prototype : undefined2, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined2, symbolToString = symbolProto ? symbolProto.toString : undefined2;
12618
12858
  function lodash(value) {
12619
12859
  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
@@ -14667,7 +14907,7 @@ var require_lodash = __commonJS({
14667
14907
  return result2;
14668
14908
  };
14669
14909
  var getTag = baseGetTag;
14670
- if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
14910
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
14671
14911
  getTag = function(value) {
14672
14912
  var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined2, ctorString = Ctor ? toSource(Ctor) : "";
14673
14913
  if (ctorString) {
@@ -17375,6 +17615,7 @@ var require_lodash = __commonJS({
17375
17615
  // node_modules/jsonwebtoken/sign.js
17376
17616
  var require_sign = __commonJS({
17377
17617
  "node_modules/jsonwebtoken/sign.js"(exports2, module2) {
17618
+ "use strict";
17378
17619
  var timespan = require_timespan();
17379
17620
  var PS_SUPPORTED = require_psSupported();
17380
17621
  var validateAsymmetricKey = require_validateAsymmetricKey();
@@ -17594,6 +17835,7 @@ var require_sign = __commonJS({
17594
17835
  // node_modules/jsonwebtoken/index.js
17595
17836
  var require_jsonwebtoken = __commonJS({
17596
17837
  "node_modules/jsonwebtoken/index.js"(exports2, module2) {
17838
+ "use strict";
17597
17839
  module2.exports = {
17598
17840
  verify: require_verify(),
17599
17841
  sign: require_sign(),
@@ -17711,21 +17953,22 @@ var require_cjs = __commonJS({
17711
17953
  this.fill(0);
17712
17954
  }
17713
17955
  };
17714
- var _constructing;
17715
- var _Stack = class {
17956
+ var Stack = class _Stack {
17716
17957
  heap;
17717
17958
  length;
17959
+ // private constructor
17960
+ static #constructing = false;
17718
17961
  static create(max) {
17719
17962
  const HeapCls = getUintArray(max);
17720
17963
  if (!HeapCls)
17721
17964
  return [];
17722
- __privateSet(_Stack, _constructing, true);
17965
+ _Stack.#constructing = true;
17723
17966
  const s = new _Stack(max, HeapCls);
17724
- __privateSet(_Stack, _constructing, false);
17967
+ _Stack.#constructing = false;
17725
17968
  return s;
17726
17969
  }
17727
17970
  constructor(max, HeapCls) {
17728
- if (!__privateGet(_Stack, _constructing)) {
17971
+ if (!_Stack.#constructing) {
17729
17972
  throw new TypeError("instantiate Stack using Stack.create(n)");
17730
17973
  }
17731
17974
  this.heap = new HeapCls(max);
@@ -17738,11 +17981,7 @@ var require_cjs = __commonJS({
17738
17981
  return this.heap[--this.length];
17739
17982
  }
17740
17983
  };
17741
- var Stack = _Stack;
17742
- _constructing = new WeakMap();
17743
- // private constructor
17744
- __privateAdd(Stack, _constructing, false);
17745
- var LRUCache = class {
17984
+ var LRUCache = class _LRUCache {
17746
17985
  // properties coming in from the options of these, only max and maxSize
17747
17986
  // really *need* to be protected. The rest can be modified, as they just
17748
17987
  // set defaults for various methods.
@@ -17994,7 +18233,7 @@ var require_cjs = __commonJS({
17994
18233
  if (shouldWarn(code)) {
17995
18234
  warned.add(code);
17996
18235
  const msg = "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";
17997
- emitWarning(msg, "UnboundedCacheWarning", code, LRUCache);
18236
+ emitWarning(msg, "UnboundedCacheWarning", code, _LRUCache);
17998
18237
  }
17999
18238
  }
18000
18239
  }
@@ -19353,6 +19592,7 @@ var require_dist_node12 = __commonJS({
19353
19592
  // node_modules/before-after-hook/lib/register.js
19354
19593
  var require_register = __commonJS({
19355
19594
  "node_modules/before-after-hook/lib/register.js"(exports2, module2) {
19595
+ "use strict";
19356
19596
  module2.exports = register;
19357
19597
  function register(state, name, method, options) {
19358
19598
  if (typeof method !== "function") {
@@ -19381,6 +19621,7 @@ var require_register = __commonJS({
19381
19621
  // node_modules/before-after-hook/lib/add.js
19382
19622
  var require_add = __commonJS({
19383
19623
  "node_modules/before-after-hook/lib/add.js"(exports2, module2) {
19624
+ "use strict";
19384
19625
  module2.exports = addHook;
19385
19626
  function addHook(state, kind, name, hook) {
19386
19627
  var orig = hook;
@@ -19421,6 +19662,7 @@ var require_add = __commonJS({
19421
19662
  // node_modules/before-after-hook/lib/remove.js
19422
19663
  var require_remove = __commonJS({
19423
19664
  "node_modules/before-after-hook/lib/remove.js"(exports2, module2) {
19665
+ "use strict";
19424
19666
  module2.exports = removeHook;
19425
19667
  function removeHook(state, name, method) {
19426
19668
  if (!state.registry[name]) {
@@ -19440,6 +19682,7 @@ var require_remove = __commonJS({
19440
19682
  // node_modules/before-after-hook/index.js
19441
19683
  var require_before_after_hook = __commonJS({
19442
19684
  "node_modules/before-after-hook/index.js"(exports2, module2) {
19685
+ "use strict";
19443
19686
  var register = require_register();
19444
19687
  var addHook = require_add();
19445
19688
  var removeHook = require_remove();
@@ -19629,9 +19872,30 @@ var require_dist_node13 = __commonJS({
19629
19872
 
19630
19873
  // node_modules/@octokit/auth-token/dist-node/index.js
19631
19874
  var require_dist_node14 = __commonJS({
19632
- "node_modules/@octokit/auth-token/dist-node/index.js"(exports2) {
19875
+ "node_modules/@octokit/auth-token/dist-node/index.js"(exports2, module2) {
19633
19876
  "use strict";
19634
- Object.defineProperty(exports2, "__esModule", { value: true });
19877
+ var __defProp2 = Object.defineProperty;
19878
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
19879
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
19880
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
19881
+ var __export = (target, all) => {
19882
+ for (var name in all)
19883
+ __defProp2(target, name, { get: all[name], enumerable: true });
19884
+ };
19885
+ var __copyProps2 = (to, from, except, desc) => {
19886
+ if (from && typeof from === "object" || typeof from === "function") {
19887
+ for (let key of __getOwnPropNames2(from))
19888
+ if (!__hasOwnProp2.call(to, key) && key !== except)
19889
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
19890
+ }
19891
+ return to;
19892
+ };
19893
+ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
19894
+ var dist_src_exports = {};
19895
+ __export(dist_src_exports, {
19896
+ createTokenAuth: () => createTokenAuth
19897
+ });
19898
+ module2.exports = __toCommonJS(dist_src_exports);
19635
19899
  var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
19636
19900
  var REGEX_IS_INSTALLATION = /^ghs_/;
19637
19901
  var REGEX_IS_USER_TO_SERVER = /^ghu_/;
@@ -19653,7 +19917,10 @@ var require_dist_node14 = __commonJS({
19653
19917
  return `token ${token}`;
19654
19918
  }
19655
19919
  async function hook(token, request, route, parameters) {
19656
- const endpoint = request.endpoint.merge(route, parameters);
19920
+ const endpoint = request.endpoint.merge(
19921
+ route,
19922
+ parameters
19923
+ );
19657
19924
  endpoint.headers.authorization = withAuthorizationPrefix(token);
19658
19925
  return request(endpoint);
19659
19926
  }
@@ -19662,14 +19929,15 @@ var require_dist_node14 = __commonJS({
19662
19929
  throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
19663
19930
  }
19664
19931
  if (typeof token !== "string") {
19665
- throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
19932
+ throw new Error(
19933
+ "[@octokit/auth-token] Token passed to createTokenAuth is not a string"
19934
+ );
19666
19935
  }
19667
19936
  token = token.replace(/^(token|bearer) +/i, "");
19668
19937
  return Object.assign(auth.bind(null, token), {
19669
19938
  hook: hook.bind(null, token)
19670
19939
  });
19671
19940
  };
19672
- exports2.createTokenAuth = createTokenAuth;
19673
19941
  }
19674
19942
  });
19675
19943
 
@@ -19704,7 +19972,7 @@ var require_dist_node15 = __commonJS({
19704
19972
  var import_request = require_dist_node5();
19705
19973
  var import_graphql = require_dist_node13();
19706
19974
  var import_auth_token = require_dist_node14();
19707
- var VERSION = "4.2.1";
19975
+ var VERSION = "4.2.4";
19708
19976
  var Octokit2 = class {
19709
19977
  static defaults(defaults) {
19710
19978
  const OctokitWithDefaults = class extends this {
@@ -19929,7 +20197,7 @@ function safeReturnValue(event, status) {
19929
20197
  return status;
19930
20198
  }
19931
20199
  exports.handler = async function(event) {
19932
- if (!process.env.WEBHOOK_SECRET_ARN || !process.env.GITHUB_SECRET_ARN || !process.env.GITHUB_PRIVATE_KEY_SECRET_ARN || !process.env.LOGICAL_ID || !process.env.WEBHOOK_HANDLER_ARN || !process.env.STEP_FUNCTION_ARN || !process.env.SETUP_SECRET_ARN || !process.env.SETUP_FUNCTION_URL || !process.env.STACK_NAME) {
20200
+ if (!process.env.WEBHOOK_SECRET_ARN || !process.env.GITHUB_SECRET_ARN || !process.env.GITHUB_PRIVATE_KEY_SECRET_ARN || !process.env.LOGICAL_ID || !process.env.WEBHOOK_HANDLER_ARN || !process.env.STEP_FUNCTION_ARN || !process.env.SETUP_SECRET_ARN || !process.env.STACK_NAME) {
19933
20201
  throw new Error("Missing environment variables");
19934
20202
  }
19935
20203
  const status = {
@@ -19972,12 +20240,16 @@ exports.handler = async function(event) {
19972
20240
  recentRuns: []
19973
20241
  }
19974
20242
  };
19975
- const setupToken = (await getSecretJsonValue(process.env.SETUP_SECRET_ARN)).token;
19976
- if (setupToken) {
19977
- status.github.setup.status = "Pending";
19978
- status.github.setup.url = `${process.env.SETUP_FUNCTION_URL}?token=${setupToken}`;
20243
+ if (process.env.SETUP_FUNCTION_URL) {
20244
+ const setupToken = (await getSecretJsonValue(process.env.SETUP_SECRET_ARN)).token;
20245
+ if (setupToken) {
20246
+ status.github.setup.status = "Pending";
20247
+ status.github.setup.url = `${process.env.SETUP_FUNCTION_URL}?token=${setupToken}`;
20248
+ } else {
20249
+ status.github.setup.status = "Complete";
20250
+ }
19979
20251
  } else {
19980
- status.github.setup.status = "Complete";
20252
+ status.github.setup.status = "Disabled";
19981
20253
  }
19982
20254
  try {
19983
20255
  const executions = await sf.listExecutions({