@cloudsnorkel/cdk-github-runners 0.10.6 → 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 (35) hide show
  1. package/.jsii +22 -22
  2. package/assets/delete-failed-runner.lambda/index.js +151 -131
  3. package/assets/docker-images/codebuild/linux-arm64/Dockerfile +1 -2
  4. package/assets/docker-images/codebuild/linux-x64/Dockerfile +1 -2
  5. package/assets/docker-images/fargate/linux-arm64/Dockerfile +1 -2
  6. package/assets/docker-images/fargate/linux-x64/Dockerfile +1 -2
  7. package/assets/idle-runner-repear.lambda/index.js +147 -127
  8. package/assets/image-builders/aws-image-builder/versioner.lambda/index.js +74 -54
  9. package/assets/setup.lambda/index.html +1 -1
  10. package/assets/setup.lambda/index.js +61 -40
  11. package/assets/status.lambda/index.js +108 -105
  12. package/assets/token-retriever.lambda/index.js +149 -129
  13. package/assets/webhook-handler.lambda/index.js +10 -8
  14. package/lib/access.js +1 -1
  15. package/lib/image-builders/api.js +1 -1
  16. package/lib/image-builders/aws-image-builder/builder.js +1 -1
  17. package/lib/image-builders/aws-image-builder/deprecated/ami.js +1 -1
  18. package/lib/image-builders/aws-image-builder/deprecated/container.js +1 -1
  19. package/lib/image-builders/aws-image-builder/deprecated/linux-components.d.ts +1 -1
  20. package/lib/image-builders/aws-image-builder/deprecated/linux-components.js +11 -12
  21. package/lib/image-builders/aws-image-builder/deprecated/windows-components.js +1 -1
  22. package/lib/image-builders/codebuild-deprecated.js +1 -1
  23. package/lib/image-builders/components.js +3 -4
  24. package/lib/image-builders/static.js +1 -1
  25. package/lib/providers/codebuild.js +2 -2
  26. package/lib/providers/common.js +3 -3
  27. package/lib/providers/ec2.js +2 -2
  28. package/lib/providers/ecs.js +1 -1
  29. package/lib/providers/fargate.js +2 -2
  30. package/lib/providers/lambda.js +2 -2
  31. package/lib/runner.js +1 -1
  32. package/lib/secrets.js +1 -1
  33. package/lib/status.lambda.js +12 -7
  34. package/lib/webhook-handler.lambda.js +11 -9
  35. package/package.json +11 -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({
@@ -5913,7 +5895,7 @@ var require_lib3 = __commonJS({
5913
5895
  var Readable = Stream.Readable;
5914
5896
  var BUFFER = Symbol("buffer");
5915
5897
  var TYPE = Symbol("type");
5916
- var Blob = class {
5898
+ var Blob = class _Blob {
5917
5899
  constructor() {
5918
5900
  this[TYPE] = "";
5919
5901
  const blobParts = arguments[0];
@@ -5932,7 +5914,7 @@ var require_lib3 = __commonJS({
5932
5914
  buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
5933
5915
  } else if (element instanceof ArrayBuffer) {
5934
5916
  buffer = Buffer.from(element);
5935
- } else if (element instanceof Blob) {
5917
+ } else if (element instanceof _Blob) {
5936
5918
  buffer = element[BUFFER];
5937
5919
  } else {
5938
5920
  buffer = Buffer.from(typeof element === "string" ? element : String(element));
@@ -5994,7 +5976,7 @@ var require_lib3 = __commonJS({
5994
5976
  const span = Math.max(relativeEnd - relativeStart, 0);
5995
5977
  const buffer = this[BUFFER];
5996
5978
  const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
5997
- const blob = new Blob([], { type: arguments[2] });
5979
+ const blob = new _Blob([], { type: arguments[2] });
5998
5980
  blob[BUFFER] = slicedBuffer;
5999
5981
  return blob;
6000
5982
  }
@@ -6371,7 +6353,7 @@ var require_lib3 = __commonJS({
6371
6353
  return void 0;
6372
6354
  }
6373
6355
  var MAP = Symbol("map");
6374
- var Headers = class {
6356
+ var Headers = class _Headers {
6375
6357
  /**
6376
6358
  * Headers class
6377
6359
  *
@@ -6381,7 +6363,7 @@ var require_lib3 = __commonJS({
6381
6363
  constructor() {
6382
6364
  let init = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : void 0;
6383
6365
  this[MAP] = /* @__PURE__ */ Object.create(null);
6384
- if (init instanceof Headers) {
6366
+ if (init instanceof _Headers) {
6385
6367
  const rawHeaders = init.raw();
6386
6368
  const headerNames = Object.keys(rawHeaders);
6387
6369
  for (const headerName of headerNames) {
@@ -6650,7 +6632,7 @@ var require_lib3 = __commonJS({
6650
6632
  }
6651
6633
  var INTERNALS$1 = Symbol("Response internals");
6652
6634
  var STATUS_CODES = http.STATUS_CODES;
6653
- var Response = class {
6635
+ var Response = class _Response {
6654
6636
  constructor() {
6655
6637
  let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
6656
6638
  let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -6698,7 +6680,7 @@ var require_lib3 = __commonJS({
6698
6680
  * @return Response
6699
6681
  */
6700
6682
  clone() {
6701
- return new Response(clone(this), {
6683
+ return new _Response(clone(this), {
6702
6684
  url: this.url,
6703
6685
  status: this.status,
6704
6686
  statusText: this.statusText,
@@ -6742,7 +6724,7 @@ var require_lib3 = __commonJS({
6742
6724
  const proto = signal && typeof signal === "object" && Object.getPrototypeOf(signal);
6743
6725
  return !!(proto && proto.constructor.name === "AbortSignal");
6744
6726
  }
6745
- var Request = class {
6727
+ var Request = class _Request {
6746
6728
  constructor(input) {
6747
6729
  let init = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6748
6730
  let parsedURL;
@@ -6812,7 +6794,7 @@ var require_lib3 = __commonJS({
6812
6794
  * @return Request
6813
6795
  */
6814
6796
  clone() {
6815
- return new Request(this);
6797
+ return new _Request(this);
6816
6798
  }
6817
6799
  };
6818
6800
  Body.mixIn(Request.prototype);
@@ -7113,7 +7095,7 @@ var require_lib3 = __commonJS({
7113
7095
  const headers = response.headers;
7114
7096
  if (headers["transfer-encoding"] === "chunked" && !headers["content-length"]) {
7115
7097
  response.once("close", function(hadError) {
7116
- const hasDataListener = socket.listenerCount("data") > 0;
7098
+ const hasDataListener = socket && socket.listenerCount("data") > 0;
7117
7099
  if (hasDataListener && !hadError) {
7118
7100
  const err = new Error("Premature close");
7119
7101
  err.code = "ERR_STREAM_PREMATURE_CLOSE";
@@ -7333,7 +7315,7 @@ var require_dist_node5 = __commonJS({
7333
7315
  module2.exports = __toCommonJS(dist_src_exports);
7334
7316
  var import_endpoint = require_dist_node2();
7335
7317
  var import_universal_user_agent = require_dist_node();
7336
- var VERSION = "6.2.5";
7318
+ var VERSION = "6.2.8";
7337
7319
  var import_is_plain_object = require_is_plain_object();
7338
7320
  var import_node_fetch = __toESM2(require_lib3());
7339
7321
  var import_request_error = require_dist_node4();
@@ -9386,6 +9368,7 @@ var require_constants = __commonJS({
9386
9368
  var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
9387
9369
  9007199254740991;
9388
9370
  var MAX_SAFE_COMPONENT_LENGTH = 16;
9371
+ var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
9389
9372
  var RELEASE_TYPES = [
9390
9373
  "major",
9391
9374
  "premajor",
@@ -9398,6 +9381,7 @@ var require_constants = __commonJS({
9398
9381
  module2.exports = {
9399
9382
  MAX_LENGTH,
9400
9383
  MAX_SAFE_COMPONENT_LENGTH,
9384
+ MAX_SAFE_BUILD_LENGTH,
9401
9385
  MAX_SAFE_INTEGER,
9402
9386
  RELEASE_TYPES,
9403
9387
  SEMVER_SPEC_VERSION,
@@ -9421,30 +9405,45 @@ var require_debug = __commonJS({
9421
9405
  var require_re = __commonJS({
9422
9406
  "node_modules/semver/internal/re.js"(exports2, module2) {
9423
9407
  "use strict";
9424
- var { MAX_SAFE_COMPONENT_LENGTH } = require_constants();
9408
+ var { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH } = require_constants();
9425
9409
  var debug = require_debug();
9426
9410
  exports2 = module2.exports = {};
9427
9411
  var re = exports2.re = [];
9412
+ var safeRe = exports2.safeRe = [];
9428
9413
  var src = exports2.src = [];
9429
9414
  var t = exports2.t = {};
9430
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
+ };
9431
9428
  var createToken = (name, value, isGlobal) => {
9429
+ const safe = makeSafeRegex(value);
9432
9430
  const index = R++;
9433
9431
  debug(name, index, value);
9434
9432
  t[name] = index;
9435
9433
  src[index] = value;
9436
9434
  re[index] = new RegExp(value, isGlobal ? "g" : void 0);
9435
+ safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
9437
9436
  };
9438
9437
  createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
9439
- createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+");
9440
- createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*");
9438
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
9439
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
9441
9440
  createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
9442
9441
  createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
9443
9442
  createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
9444
9443
  createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
9445
9444
  createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
9446
9445
  createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
9447
- createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+");
9446
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
9448
9447
  createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
9449
9448
  createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
9450
9449
  createToken("FULL", `^${src[t.FULLPLAIN]}$`);
@@ -9528,13 +9527,13 @@ var require_semver = __commonJS({
9528
9527
  "use strict";
9529
9528
  var debug = require_debug();
9530
9529
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
9531
- var { re, t } = require_re();
9530
+ var { safeRe: re, t } = require_re();
9532
9531
  var parseOptions = require_parse_options();
9533
9532
  var { compareIdentifiers } = require_identifiers();
9534
- var SemVer = class {
9533
+ var SemVer = class _SemVer {
9535
9534
  constructor(version, options) {
9536
9535
  options = parseOptions(options);
9537
- if (version instanceof SemVer) {
9536
+ if (version instanceof _SemVer) {
9538
9537
  if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
9539
9538
  return version;
9540
9539
  } else {
@@ -9597,11 +9596,11 @@ var require_semver = __commonJS({
9597
9596
  }
9598
9597
  compare(other) {
9599
9598
  debug("SemVer.compare", this.version, this.options, other);
9600
- if (!(other instanceof SemVer)) {
9599
+ if (!(other instanceof _SemVer)) {
9601
9600
  if (typeof other === "string" && other === this.version) {
9602
9601
  return 0;
9603
9602
  }
9604
- other = new SemVer(other, this.options);
9603
+ other = new _SemVer(other, this.options);
9605
9604
  }
9606
9605
  if (other.version === this.version) {
9607
9606
  return 0;
@@ -9609,14 +9608,14 @@ var require_semver = __commonJS({
9609
9608
  return this.compareMain(other) || this.comparePre(other);
9610
9609
  }
9611
9610
  compareMain(other) {
9612
- if (!(other instanceof SemVer)) {
9613
- other = new SemVer(other, this.options);
9611
+ if (!(other instanceof _SemVer)) {
9612
+ other = new _SemVer(other, this.options);
9614
9613
  }
9615
9614
  return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
9616
9615
  }
9617
9616
  comparePre(other) {
9618
- if (!(other instanceof SemVer)) {
9619
- other = new SemVer(other, this.options);
9617
+ if (!(other instanceof _SemVer)) {
9618
+ other = new _SemVer(other, this.options);
9620
9619
  }
9621
9620
  if (this.prerelease.length && !other.prerelease.length) {
9622
9621
  return -1;
@@ -9644,8 +9643,8 @@ var require_semver = __commonJS({
9644
9643
  } while (++i);
9645
9644
  }
9646
9645
  compareBuild(other) {
9647
- if (!(other instanceof SemVer)) {
9648
- other = new SemVer(other, this.options);
9646
+ if (!(other instanceof _SemVer)) {
9647
+ other = new _SemVer(other, this.options);
9649
9648
  }
9650
9649
  let i = 0;
9651
9650
  do {
@@ -9754,8 +9753,10 @@ var require_semver = __commonJS({
9754
9753
  default:
9755
9754
  throw new Error(`invalid increment argument: ${release}`);
9756
9755
  }
9757
- this.format();
9758
- this.raw = this.version;
9756
+ this.raw = this.format();
9757
+ if (this.build.length) {
9758
+ this.raw += `+${this.build.join(".")}`;
9759
+ }
9759
9760
  return this;
9760
9761
  }
9761
9762
  };
@@ -9851,6 +9852,19 @@ var require_diff = __commonJS({
9851
9852
  const highVersion = v1Higher ? v1 : v2;
9852
9853
  const lowVersion = v1Higher ? v2 : v1;
9853
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
+ }
9854
9868
  const prefix = highHasPre ? "pre" : "";
9855
9869
  if (v1.major !== v2.major) {
9856
9870
  return prefix + "major";
@@ -9861,16 +9875,7 @@ var require_diff = __commonJS({
9861
9875
  if (v1.patch !== v2.patch) {
9862
9876
  return prefix + "patch";
9863
9877
  }
9864
- if (highHasPre) {
9865
- return "prerelease";
9866
- }
9867
- if (lowVersion.patch) {
9868
- return "patch";
9869
- }
9870
- if (lowVersion.minor) {
9871
- return "minor";
9872
- }
9873
- return "major";
9878
+ return "prerelease";
9874
9879
  };
9875
9880
  module2.exports = diff;
9876
9881
  }
@@ -10099,7 +10104,7 @@ var require_coerce = __commonJS({
10099
10104
  "use strict";
10100
10105
  var SemVer = require_semver();
10101
10106
  var parse = require_parse();
10102
- var { re, t } = require_re();
10107
+ var { safeRe: re, t } = require_re();
10103
10108
  var coerce = (version, options) => {
10104
10109
  if (version instanceof SemVer) {
10105
10110
  return version;
@@ -10790,14 +10795,14 @@ var require_lru_cache = __commonJS({
10790
10795
  var require_range = __commonJS({
10791
10796
  "node_modules/semver/classes/range.js"(exports2, module2) {
10792
10797
  "use strict";
10793
- var Range = class {
10798
+ var Range = class _Range {
10794
10799
  constructor(range, options) {
10795
10800
  options = parseOptions(options);
10796
- if (range instanceof Range) {
10801
+ if (range instanceof _Range) {
10797
10802
  if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
10798
10803
  return range;
10799
10804
  } else {
10800
- return new Range(range.raw, options);
10805
+ return new _Range(range.raw, options);
10801
10806
  }
10802
10807
  }
10803
10808
  if (range instanceof Comparator) {
@@ -10809,10 +10814,10 @@ var require_range = __commonJS({
10809
10814
  this.options = options;
10810
10815
  this.loose = !!options.loose;
10811
10816
  this.includePrerelease = !!options.includePrerelease;
10812
- this.raw = range;
10813
- 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);
10814
10819
  if (!this.set.length) {
10815
- throw new TypeError(`Invalid SemVer Range: ${range}`);
10820
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
10816
10821
  }
10817
10822
  if (this.set.length > 1) {
10818
10823
  const first = this.set[0];
@@ -10831,16 +10836,13 @@ var require_range = __commonJS({
10831
10836
  this.format();
10832
10837
  }
10833
10838
  format() {
10834
- this.range = this.set.map((comps) => {
10835
- return comps.join(" ").trim();
10836
- }).join("||").trim();
10839
+ this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
10837
10840
  return this.range;
10838
10841
  }
10839
10842
  toString() {
10840
10843
  return this.range;
10841
10844
  }
10842
10845
  parseRange(range) {
10843
- range = range.trim();
10844
10846
  const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
10845
10847
  const memoKey = memoOpts + ":" + range;
10846
10848
  const cached = cache.get(memoKey);
@@ -10854,8 +10856,9 @@ var require_range = __commonJS({
10854
10856
  range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
10855
10857
  debug("comparator trim", range);
10856
10858
  range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
10859
+ debug("tilde trim", range);
10857
10860
  range = range.replace(re[t.CARETTRIM], caretTrimReplace);
10858
- range = range.split(/\s+/).join(" ");
10861
+ debug("caret trim", range);
10859
10862
  let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
10860
10863
  if (loose) {
10861
10864
  rangeList = rangeList.filter((comp) => {
@@ -10880,7 +10883,7 @@ var require_range = __commonJS({
10880
10883
  return result;
10881
10884
  }
10882
10885
  intersects(range, options) {
10883
- if (!(range instanceof Range)) {
10886
+ if (!(range instanceof _Range)) {
10884
10887
  throw new TypeError("a Range is required");
10885
10888
  }
10886
10889
  return this.set.some((thisComparators) => {
@@ -10921,7 +10924,7 @@ var require_range = __commonJS({
10921
10924
  var debug = require_debug();
10922
10925
  var SemVer = require_semver();
10923
10926
  var {
10924
- re,
10927
+ safeRe: re,
10925
10928
  t,
10926
10929
  comparatorTrimReplace,
10927
10930
  tildeTrimReplace,
@@ -10955,9 +10958,9 @@ var require_range = __commonJS({
10955
10958
  return comp;
10956
10959
  };
10957
10960
  var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
10958
- var replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => {
10959
- return replaceTilde(c, options);
10960
- }).join(" ");
10961
+ var replaceTildes = (comp, options) => {
10962
+ return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
10963
+ };
10961
10964
  var replaceTilde = (comp, options) => {
10962
10965
  const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
10963
10966
  return comp.replace(r, (_, M, m, p, pr) => {
@@ -10979,9 +10982,9 @@ var require_range = __commonJS({
10979
10982
  return ret;
10980
10983
  });
10981
10984
  };
10982
- var replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => {
10983
- return replaceCaret(c, options);
10984
- }).join(" ");
10985
+ var replaceCarets = (comp, options) => {
10986
+ return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
10987
+ };
10985
10988
  var replaceCaret = (comp, options) => {
10986
10989
  debug("caret", comp, options);
10987
10990
  const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
@@ -11028,9 +11031,7 @@ var require_range = __commonJS({
11028
11031
  };
11029
11032
  var replaceXRanges = (comp, options) => {
11030
11033
  debug("replaceXRanges", comp, options);
11031
- return comp.split(/\s+/).map((c) => {
11032
- return replaceXRange(c, options);
11033
- }).join(" ");
11034
+ return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
11034
11035
  };
11035
11036
  var replaceXRange = (comp, options) => {
11036
11037
  comp = comp.trim();
@@ -11153,19 +11154,20 @@ var require_comparator = __commonJS({
11153
11154
  "node_modules/semver/classes/comparator.js"(exports2, module2) {
11154
11155
  "use strict";
11155
11156
  var ANY = Symbol("SemVer ANY");
11156
- var Comparator = class {
11157
+ var Comparator = class _Comparator {
11157
11158
  static get ANY() {
11158
11159
  return ANY;
11159
11160
  }
11160
11161
  constructor(comp, options) {
11161
11162
  options = parseOptions(options);
11162
- if (comp instanceof Comparator) {
11163
+ if (comp instanceof _Comparator) {
11163
11164
  if (comp.loose === !!options.loose) {
11164
11165
  return comp;
11165
11166
  } else {
11166
11167
  comp = comp.value;
11167
11168
  }
11168
11169
  }
11170
+ comp = comp.trim().split(/\s+/).join(" ");
11169
11171
  debug("comparator", comp, options);
11170
11172
  this.options = options;
11171
11173
  this.loose = !!options.loose;
@@ -11211,7 +11213,7 @@ var require_comparator = __commonJS({
11211
11213
  return cmp(version, this.operator, this.semver, this.options);
11212
11214
  }
11213
11215
  intersects(comp, options) {
11214
- if (!(comp instanceof Comparator)) {
11216
+ if (!(comp instanceof _Comparator)) {
11215
11217
  throw new TypeError("a Comparator is required");
11216
11218
  }
11217
11219
  if (this.operator === "") {
@@ -11252,7 +11254,7 @@ var require_comparator = __commonJS({
11252
11254
  };
11253
11255
  module2.exports = Comparator;
11254
11256
  var parseOptions = require_parse_options();
11255
- var { re, t } = require_re();
11257
+ var { safeRe: re, t } = require_re();
11256
11258
  var cmp = require_cmp();
11257
11259
  var debug = require_debug();
11258
11260
  var SemVer = require_semver();
@@ -12848,10 +12850,10 @@ var require_lodash = __commonJS({
12848
12850
  }();
12849
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;
12850
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;
12851
- 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");
12852
- 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();
12853
12855
  var realNames = {};
12854
- 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);
12855
12857
  var symbolProto = Symbol2 ? Symbol2.prototype : undefined2, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined2, symbolToString = symbolProto ? symbolProto.toString : undefined2;
12856
12858
  function lodash(value) {
12857
12859
  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
@@ -14905,7 +14907,7 @@ var require_lodash = __commonJS({
14905
14907
  return result2;
14906
14908
  };
14907
14909
  var getTag = baseGetTag;
14908
- 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) {
14909
14911
  getTag = function(value) {
14910
14912
  var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined2, ctorString = Ctor ? toSource(Ctor) : "";
14911
14913
  if (ctorString) {
@@ -17951,21 +17953,22 @@ var require_cjs = __commonJS({
17951
17953
  this.fill(0);
17952
17954
  }
17953
17955
  };
17954
- var _constructing;
17955
- var _Stack = class {
17956
+ var Stack = class _Stack {
17956
17957
  heap;
17957
17958
  length;
17959
+ // private constructor
17960
+ static #constructing = false;
17958
17961
  static create(max) {
17959
17962
  const HeapCls = getUintArray(max);
17960
17963
  if (!HeapCls)
17961
17964
  return [];
17962
- __privateSet(_Stack, _constructing, true);
17965
+ _Stack.#constructing = true;
17963
17966
  const s = new _Stack(max, HeapCls);
17964
- __privateSet(_Stack, _constructing, false);
17967
+ _Stack.#constructing = false;
17965
17968
  return s;
17966
17969
  }
17967
17970
  constructor(max, HeapCls) {
17968
- if (!__privateGet(_Stack, _constructing)) {
17971
+ if (!_Stack.#constructing) {
17969
17972
  throw new TypeError("instantiate Stack using Stack.create(n)");
17970
17973
  }
17971
17974
  this.heap = new HeapCls(max);
@@ -17978,11 +17981,7 @@ var require_cjs = __commonJS({
17978
17981
  return this.heap[--this.length];
17979
17982
  }
17980
17983
  };
17981
- var Stack = _Stack;
17982
- _constructing = new WeakMap();
17983
- // private constructor
17984
- __privateAdd(Stack, _constructing, false);
17985
- var LRUCache = class {
17984
+ var LRUCache = class _LRUCache {
17986
17985
  // properties coming in from the options of these, only max and maxSize
17987
17986
  // really *need* to be protected. The rest can be modified, as they just
17988
17987
  // set defaults for various methods.
@@ -18234,7 +18233,7 @@ var require_cjs = __commonJS({
18234
18233
  if (shouldWarn(code)) {
18235
18234
  warned.add(code);
18236
18235
  const msg = "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";
18237
- emitWarning(msg, "UnboundedCacheWarning", code, LRUCache);
18236
+ emitWarning(msg, "UnboundedCacheWarning", code, _LRUCache);
18238
18237
  }
18239
18238
  }
18240
18239
  }
@@ -19973,7 +19972,7 @@ var require_dist_node15 = __commonJS({
19973
19972
  var import_request = require_dist_node5();
19974
19973
  var import_graphql = require_dist_node13();
19975
19974
  var import_auth_token = require_dist_node14();
19976
- var VERSION = "4.2.1";
19975
+ var VERSION = "4.2.4";
19977
19976
  var Octokit2 = class {
19978
19977
  static defaults(defaults) {
19979
19978
  const OctokitWithDefaults = class extends this {
@@ -20198,7 +20197,7 @@ function safeReturnValue(event, status) {
20198
20197
  return status;
20199
20198
  }
20200
20199
  exports.handler = async function(event) {
20201
- 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) {
20202
20201
  throw new Error("Missing environment variables");
20203
20202
  }
20204
20203
  const status = {
@@ -20241,12 +20240,16 @@ exports.handler = async function(event) {
20241
20240
  recentRuns: []
20242
20241
  }
20243
20242
  };
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}`;
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
+ }
20248
20251
  } else {
20249
- status.github.setup.status = "Complete";
20252
+ status.github.setup.status = "Disabled";
20250
20253
  }
20251
20254
  try {
20252
20255
  const executions = await sf.listExecutions({