@solana-epic/github-action 0.1.0-beta.2 → 0.2.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -191,7 +191,7 @@ var require_file_command = __commonJS({
191
191
  Object.defineProperty(exports2, "__esModule", { value: true });
192
192
  exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0;
193
193
  var crypto = __importStar(require("crypto"));
194
- var fs2 = __importStar(require("fs"));
194
+ var fs3 = __importStar(require("fs"));
195
195
  var os = __importStar(require("os"));
196
196
  var utils_1 = require_utils();
197
197
  function issueFileCommand(command, message) {
@@ -199,10 +199,10 @@ var require_file_command = __commonJS({
199
199
  if (!filePath) {
200
200
  throw new Error(`Unable to find environment variable for file command ${command}`);
201
201
  }
202
- if (!fs2.existsSync(filePath)) {
202
+ if (!fs3.existsSync(filePath)) {
203
203
  throw new Error(`Missing file at path: ${filePath}`);
204
204
  }
205
- fs2.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, {
205
+ fs3.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, {
206
206
  encoding: "utf8"
207
207
  });
208
208
  }
@@ -1005,14 +1005,14 @@ var require_util = __commonJS({
1005
1005
  }
1006
1006
  const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80;
1007
1007
  let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`;
1008
- let path5 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`;
1008
+ let path7 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`;
1009
1009
  if (origin.endsWith("/")) {
1010
1010
  origin = origin.substring(0, origin.length - 1);
1011
1011
  }
1012
- if (path5 && !path5.startsWith("/")) {
1013
- path5 = `/${path5}`;
1012
+ if (path7 && !path7.startsWith("/")) {
1013
+ path7 = `/${path7}`;
1014
1014
  }
1015
- url = new URL(origin + path5);
1015
+ url = new URL(origin + path7);
1016
1016
  }
1017
1017
  return url;
1018
1018
  }
@@ -2628,19 +2628,19 @@ var require_parseParams = __commonJS({
2628
2628
  var require_basename = __commonJS({
2629
2629
  "../../node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module2) {
2630
2630
  "use strict";
2631
- module2.exports = function basename(path5) {
2632
- if (typeof path5 !== "string") {
2631
+ module2.exports = function basename2(path7) {
2632
+ if (typeof path7 !== "string") {
2633
2633
  return "";
2634
2634
  }
2635
- for (var i = path5.length - 1; i >= 0; --i) {
2636
- switch (path5.charCodeAt(i)) {
2635
+ for (var i = path7.length - 1; i >= 0; --i) {
2636
+ switch (path7.charCodeAt(i)) {
2637
2637
  case 47:
2638
2638
  case 92:
2639
- path5 = path5.slice(i + 1);
2640
- return path5 === ".." || path5 === "." ? "" : path5;
2639
+ path7 = path7.slice(i + 1);
2640
+ return path7 === ".." || path7 === "." ? "" : path7;
2641
2641
  }
2642
2642
  }
2643
- return path5 === ".." || path5 === "." ? "" : path5;
2643
+ return path7 === ".." || path7 === "." ? "" : path7;
2644
2644
  };
2645
2645
  }
2646
2646
  });
@@ -2654,7 +2654,7 @@ var require_multipart = __commonJS({
2654
2654
  var Dicer = require_Dicer();
2655
2655
  var parseParams = require_parseParams();
2656
2656
  var decodeText = require_decodeText();
2657
- var basename = require_basename();
2657
+ var basename2 = require_basename();
2658
2658
  var getLimit = require_getLimit();
2659
2659
  var RE_BOUNDARY = /^boundary$/i;
2660
2660
  var RE_FIELD = /^form-data$/i;
@@ -2771,7 +2771,7 @@ var require_multipart = __commonJS({
2771
2771
  } else if (RE_FILENAME.test(parsed[i][0])) {
2772
2772
  filename = parsed[i][1];
2773
2773
  if (!preservePath) {
2774
- filename = basename(filename);
2774
+ filename = basename2(filename);
2775
2775
  }
2776
2776
  }
2777
2777
  }
@@ -4022,8 +4022,8 @@ var require_util2 = __commonJS({
4022
4022
  function createDeferredPromise() {
4023
4023
  let res;
4024
4024
  let rej;
4025
- const promise = new Promise((resolve, reject) => {
4026
- res = resolve;
4025
+ const promise = new Promise((resolve3, reject) => {
4026
+ res = resolve3;
4027
4027
  rej = reject;
4028
4028
  });
4029
4029
  return { promise, resolve: res, reject: rej };
@@ -5532,8 +5532,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r
5532
5532
  });
5533
5533
  }
5534
5534
  });
5535
- const busboyResolve = new Promise((resolve, reject) => {
5536
- busboy.on("finish", resolve);
5535
+ const busboyResolve = new Promise((resolve3, reject) => {
5536
+ busboy.on("finish", resolve3);
5537
5537
  busboy.on("error", (err) => reject(new TypeError(err)));
5538
5538
  });
5539
5539
  if (this.body !== null)
@@ -5666,7 +5666,7 @@ var require_request = __commonJS({
5666
5666
  }
5667
5667
  var Request = class _Request {
5668
5668
  constructor(origin, {
5669
- path: path5,
5669
+ path: path7,
5670
5670
  method,
5671
5671
  body,
5672
5672
  headers,
@@ -5680,11 +5680,11 @@ var require_request = __commonJS({
5680
5680
  throwOnError,
5681
5681
  expectContinue
5682
5682
  }, handler) {
5683
- if (typeof path5 !== "string") {
5683
+ if (typeof path7 !== "string") {
5684
5684
  throw new InvalidArgumentError("path must be a string");
5685
- } else if (path5[0] !== "/" && !(path5.startsWith("http://") || path5.startsWith("https://")) && method !== "CONNECT") {
5685
+ } else if (path7[0] !== "/" && !(path7.startsWith("http://") || path7.startsWith("https://")) && method !== "CONNECT") {
5686
5686
  throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
5687
- } else if (invalidPathRegex.exec(path5) !== null) {
5687
+ } else if (invalidPathRegex.exec(path7) !== null) {
5688
5688
  throw new InvalidArgumentError("invalid request path");
5689
5689
  }
5690
5690
  if (typeof method !== "string") {
@@ -5747,7 +5747,7 @@ var require_request = __commonJS({
5747
5747
  this.completed = false;
5748
5748
  this.aborted = false;
5749
5749
  this.upgrade = upgrade || null;
5750
- this.path = query ? util2.buildURL(path5, query) : path5;
5750
+ this.path = query ? util2.buildURL(path7, query) : path7;
5751
5751
  this.origin = origin;
5752
5752
  this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
5753
5753
  this.blocking = blocking == null ? false : blocking;
@@ -6078,9 +6078,9 @@ var require_dispatcher_base = __commonJS({
6078
6078
  }
6079
6079
  close(callback) {
6080
6080
  if (callback === void 0) {
6081
- return new Promise((resolve, reject) => {
6081
+ return new Promise((resolve3, reject) => {
6082
6082
  this.close((err, data) => {
6083
- return err ? reject(err) : resolve(data);
6083
+ return err ? reject(err) : resolve3(data);
6084
6084
  });
6085
6085
  });
6086
6086
  }
@@ -6118,12 +6118,12 @@ var require_dispatcher_base = __commonJS({
6118
6118
  err = null;
6119
6119
  }
6120
6120
  if (callback === void 0) {
6121
- return new Promise((resolve, reject) => {
6121
+ return new Promise((resolve3, reject) => {
6122
6122
  this.destroy(err, (err2, data) => {
6123
6123
  return err2 ? (
6124
6124
  /* istanbul ignore next: should never error */
6125
6125
  reject(err2)
6126
- ) : resolve(data);
6126
+ ) : resolve3(data);
6127
6127
  });
6128
6128
  });
6129
6129
  }
@@ -6764,9 +6764,9 @@ var require_RedirectHandler = __commonJS({
6764
6764
  return this.handler.onHeaders(statusCode, headers, resume, statusText);
6765
6765
  }
6766
6766
  const { origin, pathname, search } = util2.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
6767
- const path5 = search ? `${pathname}${search}` : pathname;
6767
+ const path7 = search ? `${pathname}${search}` : pathname;
6768
6768
  this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
6769
- this.opts.path = path5;
6769
+ this.opts.path = path7;
6770
6770
  this.opts.origin = origin;
6771
6771
  this.opts.maxRedirections = 0;
6772
6772
  this.opts.query = null;
@@ -7183,16 +7183,16 @@ var require_client = __commonJS({
7183
7183
  return this[kNeedDrain] < 2;
7184
7184
  }
7185
7185
  async [kClose]() {
7186
- return new Promise((resolve) => {
7186
+ return new Promise((resolve3) => {
7187
7187
  if (!this[kSize]) {
7188
- resolve(null);
7188
+ resolve3(null);
7189
7189
  } else {
7190
- this[kClosedResolve] = resolve;
7190
+ this[kClosedResolve] = resolve3;
7191
7191
  }
7192
7192
  });
7193
7193
  }
7194
7194
  async [kDestroy](err) {
7195
- return new Promise((resolve) => {
7195
+ return new Promise((resolve3) => {
7196
7196
  const requests = this[kQueue].splice(this[kPendingIdx]);
7197
7197
  for (let i = 0; i < requests.length; i++) {
7198
7198
  const request = requests[i];
@@ -7203,7 +7203,7 @@ var require_client = __commonJS({
7203
7203
  this[kClosedResolve]();
7204
7204
  this[kClosedResolve] = null;
7205
7205
  }
7206
- resolve();
7206
+ resolve3();
7207
7207
  };
7208
7208
  if (this[kHTTP2Session] != null) {
7209
7209
  util2.destroy(this[kHTTP2Session], err);
@@ -7783,7 +7783,7 @@ var require_client = __commonJS({
7783
7783
  });
7784
7784
  }
7785
7785
  try {
7786
- const socket = await new Promise((resolve, reject) => {
7786
+ const socket = await new Promise((resolve3, reject) => {
7787
7787
  client[kConnector]({
7788
7788
  host,
7789
7789
  hostname,
@@ -7795,7 +7795,7 @@ var require_client = __commonJS({
7795
7795
  if (err) {
7796
7796
  reject(err);
7797
7797
  } else {
7798
- resolve(socket2);
7798
+ resolve3(socket2);
7799
7799
  }
7800
7800
  });
7801
7801
  });
@@ -8006,7 +8006,7 @@ var require_client = __commonJS({
8006
8006
  writeH2(client, client[kHTTP2Session], request);
8007
8007
  return;
8008
8008
  }
8009
- const { body, method, path: path5, host, upgrade, headers, blocking, reset } = request;
8009
+ const { body, method, path: path7, host, upgrade, headers, blocking, reset } = request;
8010
8010
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
8011
8011
  if (body && typeof body.read === "function") {
8012
8012
  body.read(0);
@@ -8056,7 +8056,7 @@ var require_client = __commonJS({
8056
8056
  if (blocking) {
8057
8057
  socket[kBlocking] = true;
8058
8058
  }
8059
- let header = `${method} ${path5} HTTP/1.1\r
8059
+ let header = `${method} ${path7} HTTP/1.1\r
8060
8060
  `;
8061
8061
  if (typeof host === "string") {
8062
8062
  header += `host: ${host}\r
@@ -8119,7 +8119,7 @@ upgrade: ${upgrade}\r
8119
8119
  return true;
8120
8120
  }
8121
8121
  function writeH2(client, session, request) {
8122
- const { body, method, path: path5, host, upgrade, expectContinue, signal, headers: reqHeaders } = request;
8122
+ const { body, method, path: path7, host, upgrade, expectContinue, signal, headers: reqHeaders } = request;
8123
8123
  let headers;
8124
8124
  if (typeof reqHeaders === "string")
8125
8125
  headers = Request[kHTTP2CopyHeaders](reqHeaders.trim());
@@ -8165,7 +8165,7 @@ upgrade: ${upgrade}\r
8165
8165
  });
8166
8166
  return true;
8167
8167
  }
8168
- headers[HTTP2_HEADER_PATH] = path5;
8168
+ headers[HTTP2_HEADER_PATH] = path7;
8169
8169
  headers[HTTP2_HEADER_SCHEME] = "https";
8170
8170
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
8171
8171
  if (body && typeof body.read === "function") {
@@ -8422,12 +8422,12 @@ upgrade: ${upgrade}\r
8422
8422
  cb();
8423
8423
  }
8424
8424
  }
8425
- const waitForDrain = () => new Promise((resolve, reject) => {
8425
+ const waitForDrain = () => new Promise((resolve3, reject) => {
8426
8426
  assert(callback === null);
8427
8427
  if (socket[kError]) {
8428
8428
  reject(socket[kError]);
8429
8429
  } else {
8430
- callback = resolve;
8430
+ callback = resolve3;
8431
8431
  }
8432
8432
  });
8433
8433
  if (client[kHTTPConnVersion] === "h2") {
@@ -8772,8 +8772,8 @@ var require_pool_base = __commonJS({
8772
8772
  if (this[kQueue].isEmpty()) {
8773
8773
  return Promise.all(this[kClients].map((c) => c.close()));
8774
8774
  } else {
8775
- return new Promise((resolve) => {
8776
- this[kClosedResolve] = resolve;
8775
+ return new Promise((resolve3) => {
8776
+ this[kClosedResolve] = resolve3;
8777
8777
  });
8778
8778
  }
8779
8779
  }
@@ -9352,7 +9352,7 @@ var require_readable = __commonJS({
9352
9352
  if (this.closed) {
9353
9353
  return Promise.resolve(null);
9354
9354
  }
9355
- return new Promise((resolve, reject) => {
9355
+ return new Promise((resolve3, reject) => {
9356
9356
  const signalListenerCleanup = signal ? util2.addAbortListener(signal, () => {
9357
9357
  this.destroy();
9358
9358
  }) : noop;
@@ -9361,7 +9361,7 @@ var require_readable = __commonJS({
9361
9361
  if (signal && signal.aborted) {
9362
9362
  reject(signal.reason || Object.assign(new Error("The operation was aborted"), { name: "AbortError" }));
9363
9363
  } else {
9364
- resolve(null);
9364
+ resolve3(null);
9365
9365
  }
9366
9366
  }).on("error", noop).on("data", function(chunk) {
9367
9367
  limit -= chunk.length;
@@ -9383,11 +9383,11 @@ var require_readable = __commonJS({
9383
9383
  throw new TypeError("unusable");
9384
9384
  }
9385
9385
  assert(!stream[kConsume]);
9386
- return new Promise((resolve, reject) => {
9386
+ return new Promise((resolve3, reject) => {
9387
9387
  stream[kConsume] = {
9388
9388
  type,
9389
9389
  stream,
9390
- resolve,
9390
+ resolve: resolve3,
9391
9391
  reject,
9392
9392
  length: 0,
9393
9393
  body: []
@@ -9422,12 +9422,12 @@ var require_readable = __commonJS({
9422
9422
  }
9423
9423
  }
9424
9424
  function consumeEnd(consume2) {
9425
- const { type, body, resolve, stream, length } = consume2;
9425
+ const { type, body, resolve: resolve3, stream, length } = consume2;
9426
9426
  try {
9427
9427
  if (type === "text") {
9428
- resolve(toUSVString(Buffer.concat(body)));
9428
+ resolve3(toUSVString(Buffer.concat(body)));
9429
9429
  } else if (type === "json") {
9430
- resolve(JSON.parse(Buffer.concat(body)));
9430
+ resolve3(JSON.parse(Buffer.concat(body)));
9431
9431
  } else if (type === "arrayBuffer") {
9432
9432
  const dst = new Uint8Array(length);
9433
9433
  let pos = 0;
@@ -9435,12 +9435,12 @@ var require_readable = __commonJS({
9435
9435
  dst.set(buf, pos);
9436
9436
  pos += buf.byteLength;
9437
9437
  }
9438
- resolve(dst.buffer);
9438
+ resolve3(dst.buffer);
9439
9439
  } else if (type === "blob") {
9440
9440
  if (!Blob2) {
9441
9441
  Blob2 = require("buffer").Blob;
9442
9442
  }
9443
- resolve(new Blob2(body, { type: stream[kContentType] }));
9443
+ resolve3(new Blob2(body, { type: stream[kContentType] }));
9444
9444
  }
9445
9445
  consumeFinish(consume2);
9446
9446
  } catch (err) {
@@ -9695,9 +9695,9 @@ var require_api_request = __commonJS({
9695
9695
  };
9696
9696
  function request(opts, callback) {
9697
9697
  if (callback === void 0) {
9698
- return new Promise((resolve, reject) => {
9698
+ return new Promise((resolve3, reject) => {
9699
9699
  request.call(this, opts, (err, data) => {
9700
- return err ? reject(err) : resolve(data);
9700
+ return err ? reject(err) : resolve3(data);
9701
9701
  });
9702
9702
  });
9703
9703
  }
@@ -9870,9 +9870,9 @@ var require_api_stream = __commonJS({
9870
9870
  };
9871
9871
  function stream(opts, factory, callback) {
9872
9872
  if (callback === void 0) {
9873
- return new Promise((resolve, reject) => {
9873
+ return new Promise((resolve3, reject) => {
9874
9874
  stream.call(this, opts, factory, (err, data) => {
9875
- return err ? reject(err) : resolve(data);
9875
+ return err ? reject(err) : resolve3(data);
9876
9876
  });
9877
9877
  });
9878
9878
  }
@@ -10153,9 +10153,9 @@ var require_api_upgrade = __commonJS({
10153
10153
  };
10154
10154
  function upgrade(opts, callback) {
10155
10155
  if (callback === void 0) {
10156
- return new Promise((resolve, reject) => {
10156
+ return new Promise((resolve3, reject) => {
10157
10157
  upgrade.call(this, opts, (err, data) => {
10158
- return err ? reject(err) : resolve(data);
10158
+ return err ? reject(err) : resolve3(data);
10159
10159
  });
10160
10160
  });
10161
10161
  }
@@ -10244,9 +10244,9 @@ var require_api_connect = __commonJS({
10244
10244
  };
10245
10245
  function connect(opts, callback) {
10246
10246
  if (callback === void 0) {
10247
- return new Promise((resolve, reject) => {
10247
+ return new Promise((resolve3, reject) => {
10248
10248
  connect.call(this, opts, (err, data) => {
10249
- return err ? reject(err) : resolve(data);
10249
+ return err ? reject(err) : resolve3(data);
10250
10250
  });
10251
10251
  });
10252
10252
  }
@@ -10406,20 +10406,20 @@ var require_mock_utils = __commonJS({
10406
10406
  }
10407
10407
  return true;
10408
10408
  }
10409
- function safeUrl(path5) {
10410
- if (typeof path5 !== "string") {
10411
- return path5;
10409
+ function safeUrl(path7) {
10410
+ if (typeof path7 !== "string") {
10411
+ return path7;
10412
10412
  }
10413
- const pathSegments = path5.split("?");
10413
+ const pathSegments = path7.split("?");
10414
10414
  if (pathSegments.length !== 2) {
10415
- return path5;
10415
+ return path7;
10416
10416
  }
10417
10417
  const qp = new URLSearchParams(pathSegments.pop());
10418
10418
  qp.sort();
10419
10419
  return [...pathSegments, qp.toString()].join("?");
10420
10420
  }
10421
- function matchKey(mockDispatch2, { path: path5, method, body, headers }) {
10422
- const pathMatch = matchValue(mockDispatch2.path, path5);
10421
+ function matchKey(mockDispatch2, { path: path7, method, body, headers }) {
10422
+ const pathMatch = matchValue(mockDispatch2.path, path7);
10423
10423
  const methodMatch = matchValue(mockDispatch2.method, method);
10424
10424
  const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
10425
10425
  const headersMatch = matchHeaders(mockDispatch2, headers);
@@ -10437,7 +10437,7 @@ var require_mock_utils = __commonJS({
10437
10437
  function getMockDispatch(mockDispatches, key) {
10438
10438
  const basePath = key.query ? buildURL(key.path, key.query) : key.path;
10439
10439
  const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
10440
- let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path5 }) => matchValue(safeUrl(path5), resolvedPath));
10440
+ let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path7 }) => matchValue(safeUrl(path7), resolvedPath));
10441
10441
  if (matchedMockDispatches.length === 0) {
10442
10442
  throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
10443
10443
  }
@@ -10474,9 +10474,9 @@ var require_mock_utils = __commonJS({
10474
10474
  }
10475
10475
  }
10476
10476
  function buildKey(opts) {
10477
- const { path: path5, method, body, headers, query } = opts;
10477
+ const { path: path7, method, body, headers, query } = opts;
10478
10478
  return {
10479
- path: path5,
10479
+ path: path7,
10480
10480
  method,
10481
10481
  body,
10482
10482
  headers,
@@ -10925,10 +10925,10 @@ var require_pending_interceptors_formatter = __commonJS({
10925
10925
  }
10926
10926
  format(pendingInterceptors) {
10927
10927
  const withPrettyHeaders = pendingInterceptors.map(
10928
- ({ method, path: path5, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
10928
+ ({ method, path: path7, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
10929
10929
  Method: method,
10930
10930
  Origin: origin,
10931
- Path: path5,
10931
+ Path: path7,
10932
10932
  "Status code": statusCode,
10933
10933
  Persistent: persist ? "\u2705" : "\u274C",
10934
10934
  Invocations: timesInvoked,
@@ -13871,7 +13871,7 @@ var require_fetch = __commonJS({
13871
13871
  async function dispatch({ body }) {
13872
13872
  const url = requestCurrentURL(request);
13873
13873
  const agent = fetchParams.controller.dispatcher;
13874
- return new Promise((resolve, reject) => agent.dispatch(
13874
+ return new Promise((resolve3, reject) => agent.dispatch(
13875
13875
  {
13876
13876
  path: url.pathname + url.search,
13877
13877
  origin: url.origin,
@@ -13947,7 +13947,7 @@ var require_fetch = __commonJS({
13947
13947
  }
13948
13948
  }
13949
13949
  }
13950
- resolve({
13950
+ resolve3({
13951
13951
  status,
13952
13952
  statusText,
13953
13953
  headersList: headers[kHeadersList],
@@ -13990,7 +13990,7 @@ var require_fetch = __commonJS({
13990
13990
  const val = headersList[n + 1].toString("latin1");
13991
13991
  headers[kHeadersList].append(key, val);
13992
13992
  }
13993
- resolve({
13993
+ resolve3({
13994
13994
  status,
13995
13995
  statusText: STATUS_CODES[status],
13996
13996
  headersList: headers[kHeadersList],
@@ -15553,8 +15553,8 @@ var require_util6 = __commonJS({
15553
15553
  }
15554
15554
  }
15555
15555
  }
15556
- function validateCookiePath(path5) {
15557
- for (const char of path5) {
15556
+ function validateCookiePath(path7) {
15557
+ for (const char of path7) {
15558
15558
  const code = char.charCodeAt(0);
15559
15559
  if (code < 33 || char === ";") {
15560
15560
  throw new Error("Invalid cookie path");
@@ -17234,11 +17234,11 @@ var require_undici = __commonJS({
17234
17234
  if (typeof opts.path !== "string") {
17235
17235
  throw new InvalidArgumentError("invalid opts.path");
17236
17236
  }
17237
- let path5 = opts.path;
17237
+ let path7 = opts.path;
17238
17238
  if (!opts.path.startsWith("/")) {
17239
- path5 = `/${path5}`;
17239
+ path7 = `/${path7}`;
17240
17240
  }
17241
- url = new URL(util2.parseOrigin(url).origin + path5);
17241
+ url = new URL(util2.parseOrigin(url).origin + path7);
17242
17242
  } else {
17243
17243
  if (!opts) {
17244
17244
  opts = typeof url === "object" ? url : {};
@@ -17351,11 +17351,11 @@ var require_lib = __commonJS({
17351
17351
  };
17352
17352
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
17353
17353
  function adopt(value) {
17354
- return value instanceof P ? value : new P(function(resolve) {
17355
- resolve(value);
17354
+ return value instanceof P ? value : new P(function(resolve3) {
17355
+ resolve3(value);
17356
17356
  });
17357
17357
  }
17358
- return new (P || (P = Promise))(function(resolve, reject) {
17358
+ return new (P || (P = Promise))(function(resolve3, reject) {
17359
17359
  function fulfilled(value) {
17360
17360
  try {
17361
17361
  step(generator.next(value));
@@ -17371,7 +17371,7 @@ var require_lib = __commonJS({
17371
17371
  }
17372
17372
  }
17373
17373
  function step(result) {
17374
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
17374
+ result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
17375
17375
  }
17376
17376
  step((generator = generator.apply(thisArg, _arguments || [])).next());
17377
17377
  });
@@ -17457,26 +17457,26 @@ var require_lib = __commonJS({
17457
17457
  }
17458
17458
  readBody() {
17459
17459
  return __awaiter(this, void 0, void 0, function* () {
17460
- return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
17460
+ return new Promise((resolve3) => __awaiter(this, void 0, void 0, function* () {
17461
17461
  let output = Buffer.alloc(0);
17462
17462
  this.message.on("data", (chunk) => {
17463
17463
  output = Buffer.concat([output, chunk]);
17464
17464
  });
17465
17465
  this.message.on("end", () => {
17466
- resolve(output.toString());
17466
+ resolve3(output.toString());
17467
17467
  });
17468
17468
  }));
17469
17469
  });
17470
17470
  }
17471
17471
  readBodyBuffer() {
17472
17472
  return __awaiter(this, void 0, void 0, function* () {
17473
- return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
17473
+ return new Promise((resolve3) => __awaiter(this, void 0, void 0, function* () {
17474
17474
  const chunks = [];
17475
17475
  this.message.on("data", (chunk) => {
17476
17476
  chunks.push(chunk);
17477
17477
  });
17478
17478
  this.message.on("end", () => {
17479
- resolve(Buffer.concat(chunks));
17479
+ resolve3(Buffer.concat(chunks));
17480
17480
  });
17481
17481
  }));
17482
17482
  });
@@ -17685,14 +17685,14 @@ var require_lib = __commonJS({
17685
17685
  */
17686
17686
  requestRaw(info3, data) {
17687
17687
  return __awaiter(this, void 0, void 0, function* () {
17688
- return new Promise((resolve, reject) => {
17688
+ return new Promise((resolve3, reject) => {
17689
17689
  function callbackForResult(err, res) {
17690
17690
  if (err) {
17691
17691
  reject(err);
17692
17692
  } else if (!res) {
17693
17693
  reject(new Error("Unknown error"));
17694
17694
  } else {
17695
- resolve(res);
17695
+ resolve3(res);
17696
17696
  }
17697
17697
  }
17698
17698
  this.requestRawWithCallback(info3, data, callbackForResult);
@@ -17874,12 +17874,12 @@ var require_lib = __commonJS({
17874
17874
  return __awaiter(this, void 0, void 0, function* () {
17875
17875
  retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
17876
17876
  const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
17877
- return new Promise((resolve) => setTimeout(() => resolve(), ms));
17877
+ return new Promise((resolve3) => setTimeout(() => resolve3(), ms));
17878
17878
  });
17879
17879
  }
17880
17880
  _processResponse(res, options) {
17881
17881
  return __awaiter(this, void 0, void 0, function* () {
17882
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
17882
+ return new Promise((resolve3, reject) => __awaiter(this, void 0, void 0, function* () {
17883
17883
  const statusCode = res.message.statusCode || 0;
17884
17884
  const response = {
17885
17885
  statusCode,
@@ -17887,7 +17887,7 @@ var require_lib = __commonJS({
17887
17887
  headers: {}
17888
17888
  };
17889
17889
  if (statusCode === HttpCodes.NotFound) {
17890
- resolve(response);
17890
+ resolve3(response);
17891
17891
  }
17892
17892
  function dateTimeDeserializer(key, value) {
17893
17893
  if (typeof value === "string") {
@@ -17926,7 +17926,7 @@ var require_lib = __commonJS({
17926
17926
  err.result = response.result;
17927
17927
  reject(err);
17928
17928
  } else {
17929
- resolve(response);
17929
+ resolve3(response);
17930
17930
  }
17931
17931
  }));
17932
17932
  });
@@ -17943,11 +17943,11 @@ var require_auth = __commonJS({
17943
17943
  "use strict";
17944
17944
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
17945
17945
  function adopt(value) {
17946
- return value instanceof P ? value : new P(function(resolve) {
17947
- resolve(value);
17946
+ return value instanceof P ? value : new P(function(resolve3) {
17947
+ resolve3(value);
17948
17948
  });
17949
17949
  }
17950
- return new (P || (P = Promise))(function(resolve, reject) {
17950
+ return new (P || (P = Promise))(function(resolve3, reject) {
17951
17951
  function fulfilled(value) {
17952
17952
  try {
17953
17953
  step(generator.next(value));
@@ -17963,7 +17963,7 @@ var require_auth = __commonJS({
17963
17963
  }
17964
17964
  }
17965
17965
  function step(result) {
17966
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
17966
+ result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
17967
17967
  }
17968
17968
  step((generator = generator.apply(thisArg, _arguments || [])).next());
17969
17969
  });
@@ -18047,11 +18047,11 @@ var require_oidc_utils = __commonJS({
18047
18047
  "use strict";
18048
18048
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
18049
18049
  function adopt(value) {
18050
- return value instanceof P ? value : new P(function(resolve) {
18051
- resolve(value);
18050
+ return value instanceof P ? value : new P(function(resolve3) {
18051
+ resolve3(value);
18052
18052
  });
18053
18053
  }
18054
- return new (P || (P = Promise))(function(resolve, reject) {
18054
+ return new (P || (P = Promise))(function(resolve3, reject) {
18055
18055
  function fulfilled(value) {
18056
18056
  try {
18057
18057
  step(generator.next(value));
@@ -18067,7 +18067,7 @@ var require_oidc_utils = __commonJS({
18067
18067
  }
18068
18068
  }
18069
18069
  function step(result) {
18070
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
18070
+ result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
18071
18071
  }
18072
18072
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18073
18073
  });
@@ -18145,11 +18145,11 @@ var require_summary = __commonJS({
18145
18145
  "use strict";
18146
18146
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
18147
18147
  function adopt(value) {
18148
- return value instanceof P ? value : new P(function(resolve) {
18149
- resolve(value);
18148
+ return value instanceof P ? value : new P(function(resolve3) {
18149
+ resolve3(value);
18150
18150
  });
18151
18151
  }
18152
- return new (P || (P = Promise))(function(resolve, reject) {
18152
+ return new (P || (P = Promise))(function(resolve3, reject) {
18153
18153
  function fulfilled(value) {
18154
18154
  try {
18155
18155
  step(generator.next(value));
@@ -18165,7 +18165,7 @@ var require_summary = __commonJS({
18165
18165
  }
18166
18166
  }
18167
18167
  function step(result) {
18168
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
18168
+ result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
18169
18169
  }
18170
18170
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18171
18171
  });
@@ -18471,7 +18471,7 @@ var require_path_utils = __commonJS({
18471
18471
  };
18472
18472
  Object.defineProperty(exports2, "__esModule", { value: true });
18473
18473
  exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0;
18474
- var path5 = __importStar(require("path"));
18474
+ var path7 = __importStar(require("path"));
18475
18475
  function toPosixPath(pth) {
18476
18476
  return pth.replace(/[\\]/g, "/");
18477
18477
  }
@@ -18481,7 +18481,7 @@ var require_path_utils = __commonJS({
18481
18481
  }
18482
18482
  exports2.toWin32Path = toWin32Path;
18483
18483
  function toPlatformPath(pth) {
18484
- return pth.replace(/[/\\]/g, path5.sep);
18484
+ return pth.replace(/[/\\]/g, path7.sep);
18485
18485
  }
18486
18486
  exports2.toPlatformPath = toPlatformPath;
18487
18487
  }
@@ -18521,11 +18521,11 @@ var require_io_util = __commonJS({
18521
18521
  };
18522
18522
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
18523
18523
  function adopt(value) {
18524
- return value instanceof P ? value : new P(function(resolve) {
18525
- resolve(value);
18524
+ return value instanceof P ? value : new P(function(resolve3) {
18525
+ resolve3(value);
18526
18526
  });
18527
18527
  }
18528
- return new (P || (P = Promise))(function(resolve, reject) {
18528
+ return new (P || (P = Promise))(function(resolve3, reject) {
18529
18529
  function fulfilled(value) {
18530
18530
  try {
18531
18531
  step(generator.next(value));
@@ -18541,7 +18541,7 @@ var require_io_util = __commonJS({
18541
18541
  }
18542
18542
  }
18543
18543
  function step(result) {
18544
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
18544
+ result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
18545
18545
  }
18546
18546
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18547
18547
  });
@@ -18549,12 +18549,12 @@ var require_io_util = __commonJS({
18549
18549
  var _a;
18550
18550
  Object.defineProperty(exports2, "__esModule", { value: true });
18551
18551
  exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0;
18552
- var fs2 = __importStar(require("fs"));
18553
- var path5 = __importStar(require("path"));
18554
- _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink;
18552
+ var fs3 = __importStar(require("fs"));
18553
+ var path7 = __importStar(require("path"));
18554
+ _a = fs3.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink;
18555
18555
  exports2.IS_WINDOWS = process.platform === "win32";
18556
18556
  exports2.UV_FS_O_EXLOCK = 268435456;
18557
- exports2.READONLY = fs2.constants.O_RDONLY;
18557
+ exports2.READONLY = fs3.constants.O_RDONLY;
18558
18558
  function exists(fsPath) {
18559
18559
  return __awaiter(this, void 0, void 0, function* () {
18560
18560
  try {
@@ -18599,7 +18599,7 @@ var require_io_util = __commonJS({
18599
18599
  }
18600
18600
  if (stats && stats.isFile()) {
18601
18601
  if (exports2.IS_WINDOWS) {
18602
- const upperExt = path5.extname(filePath).toUpperCase();
18602
+ const upperExt = path7.extname(filePath).toUpperCase();
18603
18603
  if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) {
18604
18604
  return filePath;
18605
18605
  }
@@ -18623,11 +18623,11 @@ var require_io_util = __commonJS({
18623
18623
  if (stats && stats.isFile()) {
18624
18624
  if (exports2.IS_WINDOWS) {
18625
18625
  try {
18626
- const directory = path5.dirname(filePath);
18627
- const upperName = path5.basename(filePath).toUpperCase();
18626
+ const directory = path7.dirname(filePath);
18627
+ const upperName = path7.basename(filePath).toUpperCase();
18628
18628
  for (const actualName of yield exports2.readdir(directory)) {
18629
18629
  if (upperName === actualName.toUpperCase()) {
18630
- filePath = path5.join(directory, actualName);
18630
+ filePath = path7.join(directory, actualName);
18631
18631
  break;
18632
18632
  }
18633
18633
  }
@@ -18699,11 +18699,11 @@ var require_io = __commonJS({
18699
18699
  };
18700
18700
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
18701
18701
  function adopt(value) {
18702
- return value instanceof P ? value : new P(function(resolve) {
18703
- resolve(value);
18702
+ return value instanceof P ? value : new P(function(resolve3) {
18703
+ resolve3(value);
18704
18704
  });
18705
18705
  }
18706
- return new (P || (P = Promise))(function(resolve, reject) {
18706
+ return new (P || (P = Promise))(function(resolve3, reject) {
18707
18707
  function fulfilled(value) {
18708
18708
  try {
18709
18709
  step(generator.next(value));
@@ -18719,7 +18719,7 @@ var require_io = __commonJS({
18719
18719
  }
18720
18720
  }
18721
18721
  function step(result) {
18722
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
18722
+ result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
18723
18723
  }
18724
18724
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18725
18725
  });
@@ -18727,7 +18727,7 @@ var require_io = __commonJS({
18727
18727
  Object.defineProperty(exports2, "__esModule", { value: true });
18728
18728
  exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0;
18729
18729
  var assert_1 = require("assert");
18730
- var path5 = __importStar(require("path"));
18730
+ var path7 = __importStar(require("path"));
18731
18731
  var ioUtil = __importStar(require_io_util());
18732
18732
  function cp(source, dest, options = {}) {
18733
18733
  return __awaiter(this, void 0, void 0, function* () {
@@ -18736,7 +18736,7 @@ var require_io = __commonJS({
18736
18736
  if (destStat && destStat.isFile() && !force) {
18737
18737
  return;
18738
18738
  }
18739
- const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path5.join(dest, path5.basename(source)) : dest;
18739
+ const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path7.join(dest, path7.basename(source)) : dest;
18740
18740
  if (!(yield ioUtil.exists(source))) {
18741
18741
  throw new Error(`no such file or directory: ${source}`);
18742
18742
  }
@@ -18748,7 +18748,7 @@ var require_io = __commonJS({
18748
18748
  yield cpDirRecursive(source, newDest, 0, force);
18749
18749
  }
18750
18750
  } else {
18751
- if (path5.relative(source, newDest) === "") {
18751
+ if (path7.relative(source, newDest) === "") {
18752
18752
  throw new Error(`'${newDest}' and '${source}' are the same file`);
18753
18753
  }
18754
18754
  yield copyFile(source, newDest, force);
@@ -18761,7 +18761,7 @@ var require_io = __commonJS({
18761
18761
  if (yield ioUtil.exists(dest)) {
18762
18762
  let destExists = true;
18763
18763
  if (yield ioUtil.isDirectory(dest)) {
18764
- dest = path5.join(dest, path5.basename(source));
18764
+ dest = path7.join(dest, path7.basename(source));
18765
18765
  destExists = yield ioUtil.exists(dest);
18766
18766
  }
18767
18767
  if (destExists) {
@@ -18772,7 +18772,7 @@ var require_io = __commonJS({
18772
18772
  }
18773
18773
  }
18774
18774
  }
18775
- yield mkdirP(path5.dirname(dest));
18775
+ yield mkdirP(path7.dirname(dest));
18776
18776
  yield ioUtil.rename(source, dest);
18777
18777
  });
18778
18778
  }
@@ -18835,7 +18835,7 @@ var require_io = __commonJS({
18835
18835
  }
18836
18836
  const extensions = [];
18837
18837
  if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) {
18838
- for (const extension of process.env["PATHEXT"].split(path5.delimiter)) {
18838
+ for (const extension of process.env["PATHEXT"].split(path7.delimiter)) {
18839
18839
  if (extension) {
18840
18840
  extensions.push(extension);
18841
18841
  }
@@ -18848,12 +18848,12 @@ var require_io = __commonJS({
18848
18848
  }
18849
18849
  return [];
18850
18850
  }
18851
- if (tool.includes(path5.sep)) {
18851
+ if (tool.includes(path7.sep)) {
18852
18852
  return [];
18853
18853
  }
18854
18854
  const directories = [];
18855
18855
  if (process.env.PATH) {
18856
- for (const p of process.env.PATH.split(path5.delimiter)) {
18856
+ for (const p of process.env.PATH.split(path7.delimiter)) {
18857
18857
  if (p) {
18858
18858
  directories.push(p);
18859
18859
  }
@@ -18861,7 +18861,7 @@ var require_io = __commonJS({
18861
18861
  }
18862
18862
  const matches = [];
18863
18863
  for (const directory of directories) {
18864
- const filePath = yield ioUtil.tryGetExecutablePath(path5.join(directory, tool), extensions);
18864
+ const filePath = yield ioUtil.tryGetExecutablePath(path7.join(directory, tool), extensions);
18865
18865
  if (filePath) {
18866
18866
  matches.push(filePath);
18867
18867
  }
@@ -18952,11 +18952,11 @@ var require_toolrunner = __commonJS({
18952
18952
  };
18953
18953
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
18954
18954
  function adopt(value) {
18955
- return value instanceof P ? value : new P(function(resolve) {
18956
- resolve(value);
18955
+ return value instanceof P ? value : new P(function(resolve3) {
18956
+ resolve3(value);
18957
18957
  });
18958
18958
  }
18959
- return new (P || (P = Promise))(function(resolve, reject) {
18959
+ return new (P || (P = Promise))(function(resolve3, reject) {
18960
18960
  function fulfilled(value) {
18961
18961
  try {
18962
18962
  step(generator.next(value));
@@ -18972,7 +18972,7 @@ var require_toolrunner = __commonJS({
18972
18972
  }
18973
18973
  }
18974
18974
  function step(result) {
18975
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
18975
+ result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
18976
18976
  }
18977
18977
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18978
18978
  });
@@ -18982,7 +18982,7 @@ var require_toolrunner = __commonJS({
18982
18982
  var os = __importStar(require("os"));
18983
18983
  var events = __importStar(require("events"));
18984
18984
  var child = __importStar(require("child_process"));
18985
- var path5 = __importStar(require("path"));
18985
+ var path7 = __importStar(require("path"));
18986
18986
  var io = __importStar(require_io());
18987
18987
  var ioUtil = __importStar(require_io_util());
18988
18988
  var timers_1 = require("timers");
@@ -19197,10 +19197,10 @@ var require_toolrunner = __commonJS({
19197
19197
  exec() {
19198
19198
  return __awaiter(this, void 0, void 0, function* () {
19199
19199
  if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) {
19200
- this.toolPath = path5.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
19200
+ this.toolPath = path7.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
19201
19201
  }
19202
19202
  this.toolPath = yield io.which(this.toolPath, true);
19203
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
19203
+ return new Promise((resolve3, reject) => __awaiter(this, void 0, void 0, function* () {
19204
19204
  this._debug(`exec tool: ${this.toolPath}`);
19205
19205
  this._debug("arguments:");
19206
19206
  for (const arg of this.args) {
@@ -19283,7 +19283,7 @@ var require_toolrunner = __commonJS({
19283
19283
  if (error) {
19284
19284
  reject(error);
19285
19285
  } else {
19286
- resolve(exitCode);
19286
+ resolve3(exitCode);
19287
19287
  }
19288
19288
  });
19289
19289
  if (this.options.input) {
@@ -19441,11 +19441,11 @@ var require_exec = __commonJS({
19441
19441
  };
19442
19442
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
19443
19443
  function adopt(value) {
19444
- return value instanceof P ? value : new P(function(resolve) {
19445
- resolve(value);
19444
+ return value instanceof P ? value : new P(function(resolve3) {
19445
+ resolve3(value);
19446
19446
  });
19447
19447
  }
19448
- return new (P || (P = Promise))(function(resolve, reject) {
19448
+ return new (P || (P = Promise))(function(resolve3, reject) {
19449
19449
  function fulfilled(value) {
19450
19450
  try {
19451
19451
  step(generator.next(value));
@@ -19461,7 +19461,7 @@ var require_exec = __commonJS({
19461
19461
  }
19462
19462
  }
19463
19463
  function step(result) {
19464
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
19464
+ result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
19465
19465
  }
19466
19466
  step((generator = generator.apply(thisArg, _arguments || [])).next());
19467
19467
  });
@@ -19557,11 +19557,11 @@ var require_platform = __commonJS({
19557
19557
  };
19558
19558
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
19559
19559
  function adopt(value) {
19560
- return value instanceof P ? value : new P(function(resolve) {
19561
- resolve(value);
19560
+ return value instanceof P ? value : new P(function(resolve3) {
19561
+ resolve3(value);
19562
19562
  });
19563
19563
  }
19564
- return new (P || (P = Promise))(function(resolve, reject) {
19564
+ return new (P || (P = Promise))(function(resolve3, reject) {
19565
19565
  function fulfilled(value) {
19566
19566
  try {
19567
19567
  step(generator.next(value));
@@ -19577,7 +19577,7 @@ var require_platform = __commonJS({
19577
19577
  }
19578
19578
  }
19579
19579
  function step(result) {
19580
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
19580
+ result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
19581
19581
  }
19582
19582
  step((generator = generator.apply(thisArg, _arguments || [])).next());
19583
19583
  });
@@ -19681,11 +19681,11 @@ var require_core = __commonJS({
19681
19681
  };
19682
19682
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
19683
19683
  function adopt(value) {
19684
- return value instanceof P ? value : new P(function(resolve) {
19685
- resolve(value);
19684
+ return value instanceof P ? value : new P(function(resolve3) {
19685
+ resolve3(value);
19686
19686
  });
19687
19687
  }
19688
- return new (P || (P = Promise))(function(resolve, reject) {
19688
+ return new (P || (P = Promise))(function(resolve3, reject) {
19689
19689
  function fulfilled(value) {
19690
19690
  try {
19691
19691
  step(generator.next(value));
@@ -19701,7 +19701,7 @@ var require_core = __commonJS({
19701
19701
  }
19702
19702
  }
19703
19703
  function step(result) {
19704
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
19704
+ result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
19705
19705
  }
19706
19706
  step((generator = generator.apply(thisArg, _arguments || [])).next());
19707
19707
  });
@@ -19712,7 +19712,7 @@ var require_core = __commonJS({
19712
19712
  var file_command_1 = require_file_command();
19713
19713
  var utils_1 = require_utils();
19714
19714
  var os = __importStar(require("os"));
19715
- var path5 = __importStar(require("path"));
19715
+ var path7 = __importStar(require("path"));
19716
19716
  var oidc_utils_1 = require_oidc_utils();
19717
19717
  var ExitCode;
19718
19718
  (function(ExitCode2) {
@@ -19740,7 +19740,7 @@ var require_core = __commonJS({
19740
19740
  } else {
19741
19741
  (0, command_1.issueCommand)("add-path", {}, inputPath);
19742
19742
  }
19743
- process.env["PATH"] = `${inputPath}${path5.delimiter}${process.env["PATH"]}`;
19743
+ process.env["PATH"] = `${inputPath}${path7.delimiter}${process.env["PATH"]}`;
19744
19744
  }
19745
19745
  exports2.addPath = addPath;
19746
19746
  function getInput2(name, options) {
@@ -20134,8 +20134,8 @@ var require_utils3 = __commonJS({
20134
20134
  }
20135
20135
  return output;
20136
20136
  };
20137
- exports2.basename = (path5, { windows } = {}) => {
20138
- const segs = path5.split(windows ? /[\\/]/ : "/");
20137
+ exports2.basename = (path7, { windows } = {}) => {
20138
+ const segs = path7.split(windows ? /[\\/]/ : "/");
20139
20139
  const last = segs[segs.length - 1];
20140
20140
  if (last === "") {
20141
20141
  return segs[segs.length - 2];
@@ -21662,8 +21662,8 @@ var require_context = __commonJS({
21662
21662
  if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) {
21663
21663
  this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" }));
21664
21664
  } else {
21665
- const path5 = process.env.GITHUB_EVENT_PATH;
21666
- process.stdout.write(`GITHUB_EVENT_PATH ${path5} does not exist${os_1.EOL}`);
21665
+ const path7 = process.env.GITHUB_EVENT_PATH;
21666
+ process.stdout.write(`GITHUB_EVENT_PATH ${path7} does not exist${os_1.EOL}`);
21667
21667
  }
21668
21668
  }
21669
21669
  this.eventName = process.env.GITHUB_EVENT_NAME;
@@ -21740,11 +21740,11 @@ var require_utils4 = __commonJS({
21740
21740
  };
21741
21741
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
21742
21742
  function adopt(value) {
21743
- return value instanceof P ? value : new P(function(resolve) {
21744
- resolve(value);
21743
+ return value instanceof P ? value : new P(function(resolve3) {
21744
+ resolve3(value);
21745
21745
  });
21746
21746
  }
21747
- return new (P || (P = Promise))(function(resolve, reject) {
21747
+ return new (P || (P = Promise))(function(resolve3, reject) {
21748
21748
  function fulfilled(value) {
21749
21749
  try {
21750
21750
  step(generator.next(value));
@@ -21760,7 +21760,7 @@ var require_utils4 = __commonJS({
21760
21760
  }
21761
21761
  }
21762
21762
  function step(result) {
21763
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
21763
+ result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
21764
21764
  }
21765
21765
  step((generator = generator.apply(thisArg, _arguments || [])).next());
21766
21766
  });
@@ -25733,6 +25733,9 @@ var require_github = __commonJS({
25733
25733
  // src/index.ts
25734
25734
  var core2 = __toESM(require_core());
25735
25735
 
25736
+ // ../cli/dist/api.js
25737
+ var path5 = __toESM(require("path"), 1);
25738
+
25736
25739
  // ../parser/dist/project.js
25737
25740
  var import_promises = require("node:fs/promises");
25738
25741
  var import_node_path = __toESM(require("node:path"), 1);
@@ -27027,8 +27030,8 @@ function getErrorMap() {
27027
27030
 
27028
27031
  // ../../node_modules/zod/v3/helpers/parseUtil.js
27029
27032
  var makeIssue = (params) => {
27030
- const { data, path: path5, errorMaps, issueData } = params;
27031
- const fullPath = [...path5, ...issueData.path || []];
27033
+ const { data, path: path7, errorMaps, issueData } = params;
27034
+ const fullPath = [...path7, ...issueData.path || []];
27032
27035
  const fullIssue = {
27033
27036
  ...issueData,
27034
27037
  path: fullPath
@@ -27144,11 +27147,11 @@ var errorUtil;
27144
27147
 
27145
27148
  // ../../node_modules/zod/v3/types.js
27146
27149
  var ParseInputLazyPath = class {
27147
- constructor(parent, value, path5, key) {
27150
+ constructor(parent, value, path7, key) {
27148
27151
  this._cachedPath = [];
27149
27152
  this.parent = parent;
27150
27153
  this.data = value;
27151
- this._path = path5;
27154
+ this._path = path7;
27152
27155
  this._key = key;
27153
27156
  }
27154
27157
  get path() {
@@ -30657,125 +30660,6 @@ function validateEpicConfigSecurity(config) {
30657
30660
  var import_node_fs = __toESM(require("node:fs"), 1);
30658
30661
  var import_node_path2 = __toESM(require("node:path"), 1);
30659
30662
 
30660
- // ../../node_modules/smol-toml/dist/error.js
30661
- function getLineColFromPtr(string, ptr) {
30662
- let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
30663
- return [lines.length, lines.pop().length + 1];
30664
- }
30665
- function makeCodeBlock(string, line, column) {
30666
- let lines = string.split(/\r\n|\n|\r/g);
30667
- let codeblock = "";
30668
- let numberLen = (Math.log10(line + 1) | 0) + 1;
30669
- for (let i = line - 1; i <= line + 1; i++) {
30670
- let l = lines[i - 1];
30671
- if (!l)
30672
- continue;
30673
- codeblock += i.toString().padEnd(numberLen, " ");
30674
- codeblock += ": ";
30675
- codeblock += l;
30676
- codeblock += "\n";
30677
- if (i === line) {
30678
- codeblock += " ".repeat(numberLen + column + 2);
30679
- codeblock += "^\n";
30680
- }
30681
- }
30682
- return codeblock;
30683
- }
30684
- var TomlError = class extends Error {
30685
- line;
30686
- column;
30687
- codeblock;
30688
- constructor(message, options) {
30689
- const [line, column] = getLineColFromPtr(options.toml, options.ptr);
30690
- const codeblock = makeCodeBlock(options.toml, line, column);
30691
- super(`Invalid TOML document: ${message}
30692
-
30693
- ${codeblock}`, options);
30694
- this.line = line;
30695
- this.column = column;
30696
- this.codeblock = codeblock;
30697
- }
30698
- };
30699
-
30700
- // ../../node_modules/smol-toml/dist/util.js
30701
- function isEscaped(str, ptr) {
30702
- let i = 0;
30703
- while (str[ptr - ++i] === "\\")
30704
- ;
30705
- return --i && i % 2;
30706
- }
30707
- function indexOfNewline(str, start = 0, end = str.length) {
30708
- let idx = str.indexOf("\n", start);
30709
- if (str[idx - 1] === "\r")
30710
- idx--;
30711
- return idx <= end ? idx : -1;
30712
- }
30713
- function skipComment(str, ptr) {
30714
- for (let i = ptr; i < str.length; i++) {
30715
- let c = str[i];
30716
- if (c === "\n")
30717
- return i;
30718
- if (c === "\r" && str[i + 1] === "\n")
30719
- return i + 1;
30720
- if (c < " " && c !== " " || c === "\x7F") {
30721
- throw new TomlError("control characters are not allowed in comments", {
30722
- toml: str,
30723
- ptr
30724
- });
30725
- }
30726
- }
30727
- return str.length;
30728
- }
30729
- function skipVoid(str, ptr, banNewLines, banComments) {
30730
- let c;
30731
- while (1) {
30732
- while ((c = str[ptr]) === " " || c === " " || !banNewLines && (c === "\n" || c === "\r" && str[ptr + 1] === "\n"))
30733
- ptr++;
30734
- if (banComments || c !== "#")
30735
- break;
30736
- ptr = skipComment(str, ptr);
30737
- }
30738
- return ptr;
30739
- }
30740
- function skipUntil(str, ptr, sep, end, banNewLines = false) {
30741
- if (!end) {
30742
- ptr = indexOfNewline(str, ptr);
30743
- return ptr < 0 ? str.length : ptr;
30744
- }
30745
- for (let i = ptr; i < str.length; i++) {
30746
- let c = str[i];
30747
- if (c === "#") {
30748
- i = indexOfNewline(str, i);
30749
- } else if (c === sep) {
30750
- return i + 1;
30751
- } else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
30752
- return i;
30753
- }
30754
- }
30755
- throw new TomlError("cannot find end of structure", {
30756
- toml: str,
30757
- ptr
30758
- });
30759
- }
30760
- function getStringEnd(str, seek) {
30761
- let first = str[seek];
30762
- let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first;
30763
- seek += target.length - 1;
30764
- do
30765
- seek = str.indexOf(target, ++seek);
30766
- while (seek > -1 && first !== "'" && isEscaped(str, seek));
30767
- if (seek > -1) {
30768
- seek += target.length;
30769
- if (target.length > 1) {
30770
- if (str[seek] === first)
30771
- seek++;
30772
- if (str[seek] === first)
30773
- seek++;
30774
- }
30775
- }
30776
- return seek;
30777
- }
30778
-
30779
30663
  // ../../node_modules/smol-toml/dist/date.js
30780
30664
  var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
30781
30665
  var TomlDate = class _TomlDate extends Date {
@@ -30868,93 +30752,153 @@ var TomlDate = class _TomlDate extends Date {
30868
30752
  }
30869
30753
  };
30870
30754
 
30755
+ // ../../node_modules/smol-toml/dist/error.js
30756
+ function getLineColFromPtr(string, ptr) {
30757
+ let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
30758
+ return [lines.length, lines.pop().length + 1];
30759
+ }
30760
+ function makeCodeBlock(string, line, column) {
30761
+ let lines = string.split(/\r\n|\n|\r/g);
30762
+ let codeblock = "";
30763
+ let numberLen = (Math.log10(line + 1) | 0) + 1;
30764
+ for (let i = line - 1; i <= line + 1; i++) {
30765
+ let l = lines[i - 1];
30766
+ if (!l)
30767
+ continue;
30768
+ codeblock += i.toString().padEnd(numberLen, " ");
30769
+ codeblock += ": ";
30770
+ codeblock += l;
30771
+ codeblock += "\n";
30772
+ if (i === line) {
30773
+ codeblock += " ".repeat(numberLen + column + 2);
30774
+ codeblock += "^\n";
30775
+ }
30776
+ }
30777
+ return codeblock;
30778
+ }
30779
+ var TomlError = class extends Error {
30780
+ line;
30781
+ column;
30782
+ codeblock;
30783
+ constructor(message, options) {
30784
+ const [line, column] = getLineColFromPtr(options.toml, options.ptr);
30785
+ const codeblock = makeCodeBlock(options.toml, line, column);
30786
+ super(`Invalid TOML document: ${message}
30787
+
30788
+ ${codeblock}`, options);
30789
+ this.line = line;
30790
+ this.column = column;
30791
+ this.codeblock = codeblock;
30792
+ }
30793
+ };
30794
+
30871
30795
  // ../../node_modules/smol-toml/dist/primitive.js
30872
30796
  var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
30873
30797
  var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
30874
30798
  var LEADING_ZERO = /^[+-]?0[0-9_]/;
30875
- var ESCAPE_REGEX = /^[0-9a-f]{2,8}$/i;
30876
- var ESC_MAP = {
30877
- b: "\b",
30878
- t: " ",
30879
- n: "\n",
30880
- f: "\f",
30881
- r: "\r",
30882
- e: "\x1B",
30883
- '"': '"',
30884
- "\\": "\\"
30885
- };
30886
- function parseString(str, ptr = 0, endPtr = str.length) {
30887
- let isLiteral = str[ptr] === "'";
30888
- let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1];
30799
+ function parseString(str, ptr) {
30800
+ let c = str[ptr++];
30801
+ let first = c;
30802
+ let isLiteral = c === "'";
30803
+ let isMultiline = c === str[ptr] && c === str[ptr + 1];
30889
30804
  if (isMultiline) {
30890
- endPtr -= 2;
30891
- if (str[ptr += 2] === "\r")
30892
- ptr++;
30893
- if (str[ptr] === "\n")
30805
+ if (str[ptr += 2] === "\n")
30894
30806
  ptr++;
30807
+ else if (str[ptr] === "\r" && str[ptr + 1] === "\n")
30808
+ ptr += 2;
30895
30809
  }
30896
- let tmp = 0;
30897
- let isEscape;
30898
30810
  let parsed = "";
30899
30811
  let sliceStart = ptr;
30900
- while (ptr < endPtr - 1) {
30901
- let c = str[ptr++];
30902
- if (c === "\n" || c === "\r" && str[ptr] === "\n") {
30903
- if (!isMultiline) {
30904
- throw new TomlError("newlines are not allowed in strings", {
30905
- toml: str,
30906
- ptr: ptr - 1
30907
- });
30908
- }
30812
+ let state = 0;
30813
+ for (let i = ptr; i < str.length; i++) {
30814
+ c = str[i];
30815
+ if (isMultiline && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
30816
+ state = state && 3;
30909
30817
  } else if (c < " " && c !== " " || c === "\x7F") {
30910
30818
  throw new TomlError("control characters are not allowed in strings", {
30911
30819
  toml: str,
30912
- ptr: ptr - 1
30820
+ ptr: i
30913
30821
  });
30914
- }
30915
- if (isEscape) {
30916
- isEscape = false;
30822
+ } else if ((!state || state === 3) && c === first && (!isMultiline || str[i + 1] === first && str[i + 2] === first)) {
30823
+ if (isMultiline) {
30824
+ if (str[i + 3] === first)
30825
+ i++;
30826
+ if (str[i + 3] === first)
30827
+ i++;
30828
+ }
30829
+ return [
30830
+ // If we're in a newline escape still, then there's nothing to add.
30831
+ // Also try to avoid concat if there's nothing to add to parsed, or nothing has been added to parsed.
30832
+ state ? parsed : parsed + str.slice(sliceStart, i),
30833
+ i + (isMultiline ? 3 : 1)
30834
+ ];
30835
+ } else if (!state) {
30836
+ if (!isLiteral && c === "\\") {
30837
+ parsed += str.slice(sliceStart, sliceStart = i);
30838
+ state = 1;
30839
+ }
30840
+ } else if (state === 1) {
30917
30841
  if (c === "x" || c === "u" || c === "U") {
30918
- let code = str.slice(ptr, ptr += c === "x" ? 2 : c === "u" ? 4 : 8);
30919
- if (!ESCAPE_REGEX.test(code)) {
30920
- throw new TomlError("invalid unicode escape", {
30921
- toml: str,
30922
- ptr: tmp
30923
- });
30924
- }
30925
- try {
30926
- parsed += String.fromCodePoint(parseInt(code, 16));
30927
- } catch {
30928
- throw new TomlError("invalid unicode escape", {
30929
- toml: str,
30930
- ptr: tmp
30931
- });
30932
- }
30933
- } else if (isMultiline && (c === "\n" || c === " " || c === " " || c === "\r")) {
30934
- ptr = skipVoid(str, ptr - 1, true);
30935
- if (str[ptr] !== "\n" && str[ptr] !== "\r") {
30936
- throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
30937
- toml: str,
30938
- ptr: tmp
30939
- });
30940
- }
30941
- ptr = skipVoid(str, ptr);
30942
- } else if (c in ESC_MAP) {
30943
- parsed += ESC_MAP[c];
30842
+ let value = 0;
30843
+ let len = c === "x" ? 2 : c === "u" ? 4 : 8;
30844
+ for (let j = 0; j < len; j++, i++) {
30845
+ let hex = str.charCodeAt(i + 1);
30846
+ let digit = (
30847
+ /* 0-9 */
30848
+ hex >= 48 && hex <= 57 ? hex - 48 : (
30849
+ /* A-F */
30850
+ hex >= 65 && hex <= 70 ? hex - 65 + 10 : (
30851
+ /* a-f */
30852
+ hex >= 97 && hex <= 102 ? hex - 97 + 10 : -1
30853
+ )
30854
+ )
30855
+ );
30856
+ if (digit < 0)
30857
+ throw new TomlError("invalid non-hex character in unicode escape", { toml: str, ptr: i + 1 });
30858
+ value = value << 4 | digit;
30859
+ }
30860
+ if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) {
30861
+ throw new TomlError("invalid unicode escape", { toml: str, ptr: i });
30862
+ }
30863
+ parsed += String.fromCodePoint(value);
30864
+ sliceStart = i + 1;
30865
+ state = 0;
30866
+ } else if (c === " " || c === " ") {
30867
+ state = 2;
30944
30868
  } else {
30945
- throw new TomlError("unrecognized escape sequence", {
30869
+ if (c === "b")
30870
+ parsed += "\b";
30871
+ else if (c === "t")
30872
+ parsed += " ";
30873
+ else if (c === "n")
30874
+ parsed += "\n";
30875
+ else if (c === "f")
30876
+ parsed += "\f";
30877
+ else if (c === "r")
30878
+ parsed += "\r";
30879
+ else if (c === "e")
30880
+ parsed += "\x1B";
30881
+ else if (c === '"')
30882
+ parsed += '"';
30883
+ else if (c === "\\")
30884
+ parsed += "\\";
30885
+ else
30886
+ throw new TomlError("unrecognized escape sequence", { toml: str, ptr: i });
30887
+ sliceStart = i + 1;
30888
+ state = 0;
30889
+ }
30890
+ } else if (c !== " " && c !== " ") {
30891
+ if (state === 2) {
30892
+ throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
30946
30893
  toml: str,
30947
- ptr: tmp
30894
+ ptr: sliceStart
30948
30895
  });
30949
30896
  }
30950
- sliceStart = ptr;
30951
- } else if (!isLiteral && c === "\\") {
30952
- tmp = ptr - 1;
30953
- isEscape = true;
30954
- parsed += str.slice(sliceStart, tmp);
30897
+ state = !isLiteral && c === "\\" ? 1 : 0;
30898
+ sliceStart = i;
30955
30899
  }
30956
30900
  }
30957
- return parsed + str.slice(sliceStart, endPtr - 1);
30901
+ throw new TomlError("unfinished string", { toml: str, ptr });
30958
30902
  }
30959
30903
  function parseValue(value, toml, ptr, integersAsBigInt) {
30960
30904
  if (value === "true")
@@ -31007,6 +30951,61 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
31007
30951
  return date;
31008
30952
  }
31009
30953
 
30954
+ // ../../node_modules/smol-toml/dist/util.js
30955
+ function indexOfNewline(str, start = 0, end = str.length) {
30956
+ let idx = str.indexOf("\n", start);
30957
+ if (str[idx - 1] === "\r")
30958
+ idx--;
30959
+ return idx <= end ? idx : -1;
30960
+ }
30961
+ function skipComment(str, ptr) {
30962
+ for (let i = ptr; i < str.length; i++) {
30963
+ let c = str[i];
30964
+ if (c === "\n")
30965
+ return i;
30966
+ if (c === "\r" && str[i + 1] === "\n")
30967
+ return i + 1;
30968
+ if (c < " " && c !== " " || c === "\x7F") {
30969
+ throw new TomlError("control characters are not allowed in comments", {
30970
+ toml: str,
30971
+ ptr
30972
+ });
30973
+ }
30974
+ }
30975
+ return str.length;
30976
+ }
30977
+ function skipVoid(str, ptr, banNewLines, banComments) {
30978
+ let c;
30979
+ while (1) {
30980
+ while ((c = str[ptr]) === " " || c === " " || !banNewLines && (c === "\n" || c === "\r" && str[ptr + 1] === "\n"))
30981
+ ptr++;
30982
+ if (banComments || c !== "#")
30983
+ break;
30984
+ ptr = skipComment(str, ptr);
30985
+ }
30986
+ return ptr;
30987
+ }
30988
+ function skipUntil(str, ptr, sep, end, banNewLines = false) {
30989
+ if (!end) {
30990
+ ptr = indexOfNewline(str, ptr);
30991
+ return ptr < 0 ? str.length : ptr;
30992
+ }
30993
+ for (let i = ptr; i < str.length; i++) {
30994
+ let c = str[i];
30995
+ if (c === "#") {
30996
+ i = indexOfNewline(str, i);
30997
+ } else if (c === sep) {
30998
+ return i + 1;
30999
+ } else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
31000
+ return i;
31001
+ }
31002
+ }
31003
+ throw new TomlError("cannot find end of structure", {
31004
+ toml: str,
31005
+ ptr
31006
+ });
31007
+ }
31008
+
31010
31009
  // ../../node_modules/smol-toml/dist/extract.js
31011
31010
  function sliceAndTrimEndOf(str, startPtr, endPtr) {
31012
31011
  let value = str.slice(startPtr, endPtr);
@@ -31040,24 +31039,23 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) {
31040
31039
  }
31041
31040
  return [value, endPtr2];
31042
31041
  }
31043
- let endPtr;
31044
31042
  if (c === '"' || c === "'") {
31045
- endPtr = getStringEnd(str, ptr);
31046
- let parsed = parseString(str, ptr, endPtr);
31043
+ let [parsed, endPtr2] = parseString(str, ptr);
31047
31044
  if (end) {
31048
- endPtr = skipVoid(str, endPtr);
31049
- if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") {
31045
+ endPtr2 = skipVoid(str, endPtr2);
31046
+ if (str[endPtr2] && str[endPtr2] !== "," && str[endPtr2] !== end && str[endPtr2] !== "\n" && str[endPtr2] !== "\r") {
31050
31047
  throw new TomlError("unexpected character encountered", {
31051
31048
  toml: str,
31052
- ptr: endPtr
31049
+ ptr: endPtr2
31053
31050
  });
31054
31051
  }
31055
- endPtr += +(str[endPtr] === ",");
31052
+ if (str[endPtr2] === ",")
31053
+ endPtr2++;
31056
31054
  }
31057
- return [parsed, endPtr];
31055
+ return [parsed, endPtr2];
31058
31056
  }
31059
- endPtr = skipUntil(str, ptr, ",", end);
31060
- let slice = sliceAndTrimEndOf(str, ptr, endPtr - +(str[endPtr - 1] === ","));
31057
+ let endPtr = skipUntil(str, ptr, ",", end);
31058
+ let slice = sliceAndTrimEndOf(str, ptr, endPtr - (str[endPtr - 1] === "," ? 1 : 0));
31061
31059
  if (!slice[0]) {
31062
31060
  throw new TomlError("incomplete key-value declaration: no value specified", {
31063
31061
  toml: str,
@@ -31066,7 +31064,8 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) {
31066
31064
  }
31067
31065
  if (end && slice[1] > -1) {
31068
31066
  endPtr = skipVoid(str, ptr + slice[1]);
31069
- endPtr += +(str[endPtr] === ",");
31067
+ if (str[endPtr] === ",")
31068
+ endPtr++;
31070
31069
  }
31071
31070
  return [
31072
31071
  parseValue(slice[0], str, ptr, integersAsBigInt),
@@ -31096,13 +31095,7 @@ function parseKey(str, ptr, end = "=") {
31096
31095
  ptr
31097
31096
  });
31098
31097
  }
31099
- let eos = getStringEnd(str, ptr);
31100
- if (eos < 0) {
31101
- throw new TomlError("unfinished string encountered", {
31102
- toml: str,
31103
- ptr
31104
- });
31105
- }
31098
+ let [part, eos] = parseString(str, ptr);
31106
31099
  dot = str.indexOf(".", eos);
31107
31100
  let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
31108
31101
  let newLine = indexOfNewline(strEnd);
@@ -31127,7 +31120,7 @@ function parseKey(str, ptr, end = "=") {
31127
31120
  });
31128
31121
  }
31129
31122
  }
31130
- parsed.push(parseString(str, ptr, eos));
31123
+ parsed.push(part);
31131
31124
  } else {
31132
31125
  dot = str.indexOf(".", ptr);
31133
31126
  let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot);
@@ -31505,12 +31498,12 @@ function resolveFindingsWithConfig(programName, findings, cfg) {
31505
31498
 
31506
31499
  // ../diff-engine/dist/compare.js
31507
31500
  var import_node_path4 = __toESM(require("node:path"), 1);
31508
- async function compareAnchorPrograms(oldProgramDir, newProgramDir, cfg) {
31501
+ async function analyzePrograms(oldProgramDir, newProgramDir, cfg) {
31509
31502
  const [oldProgram, newProgram] = await Promise.all([
31510
31503
  analyzeAnchorProject(oldProgramDir, cfg?.excludePaths),
31511
31504
  analyzeAnchorProject(newProgramDir, cfg?.excludePaths)
31512
31505
  ]);
31513
- return compareAccountLayouts(oldProgram, newProgram, cfg);
31506
+ return { oldProgram, newProgram };
31514
31507
  }
31515
31508
  function compareAccountLayouts(oldProgram, newProgram, cfg) {
31516
31509
  const oldAccounts = mapAccountsByName(oldProgram.accounts);
@@ -31663,6 +31656,12 @@ function mapFieldsByName(fields) {
31663
31656
  }
31664
31657
 
31665
31658
  // ../diff-engine/dist/intelligence.js
31659
+ function createUpgradeIntelligence(report) {
31660
+ return {
31661
+ severity: report.severity,
31662
+ items: report.findings.map(createUpgradeIntelligenceItem)
31663
+ };
31664
+ }
31666
31665
  function createUpgradeIntelligenceItem(finding) {
31667
31666
  const riskCategory = riskCategoryForFinding(finding);
31668
31667
  return {
@@ -31751,6 +31750,471 @@ function isDynamicType(type) {
31751
31750
  return /^(Vec|String|HashMap|HashSet|BTreeMap|BTreeSet)\b/.test(type);
31752
31751
  }
31753
31752
 
31753
+ // ../diff-engine/dist/compatibility.js
31754
+ var LAMPORTS_PER_BYTE_YEAR = 3480;
31755
+ var EXEMPTION_THRESHOLD = 2;
31756
+ var DISCRIMINATOR_BYTES = 8;
31757
+ var BORSH_ASSUMPTION = "Layouts are analyzed under Borsh serialization rules. Zero-copy (#[account(zero_copy)] / repr(C)) accounts use different alignment and padding and are not modeled in v1.";
31758
+ var STATIC_ASSUMPTION = "Static analysis only: this compares the declared old and new layouts. It does not yet sample real on-chain accounts via RPC.";
31759
+ function computeFieldOffsets(account) {
31760
+ const layout = [];
31761
+ let offset = DISCRIMINATOR_BYTES;
31762
+ let seenDynamic = false;
31763
+ for (const field of account.fields) {
31764
+ layout.push({
31765
+ name: field.name,
31766
+ type: field.type,
31767
+ offset,
31768
+ byteSize: field.byteSize,
31769
+ dynamic: field.dynamic,
31770
+ offsetApproximate: seenDynamic
31771
+ });
31772
+ if (field.dynamic)
31773
+ seenDynamic = true;
31774
+ offset += field.byteSize;
31775
+ }
31776
+ return layout;
31777
+ }
31778
+ function firstDynamicIndex(account) {
31779
+ return account.fields.findIndex((f) => f.dynamic);
31780
+ }
31781
+ function fieldAtOffset(layout, byteOffset) {
31782
+ return layout.find((f) => byteOffset >= f.offset && byteOffset < f.offset + f.byteSize);
31783
+ }
31784
+ function diffFields(oldAccount, newAccount) {
31785
+ const oldByName = new Map(oldAccount.fields.map((f) => [f.name, f]));
31786
+ const newByName = new Map(newAccount.fields.map((f) => [f.name, f]));
31787
+ const removed = oldAccount.fields.filter((f) => !newByName.has(f.name));
31788
+ const added = newAccount.fields.filter((f) => !oldByName.has(f.name));
31789
+ const typeChanged = [];
31790
+ for (const oldField of oldAccount.fields) {
31791
+ const newField = newByName.get(oldField.name);
31792
+ if (newField && newField.type !== oldField.type) {
31793
+ typeChanged.push({
31794
+ name: oldField.name,
31795
+ oldType: oldField.type,
31796
+ newType: newField.type,
31797
+ oldSize: oldField.byteSize,
31798
+ newSize: newField.byteSize
31799
+ });
31800
+ }
31801
+ }
31802
+ const retainedOld = oldAccount.fields.filter((f) => newByName.has(f.name)).map((f) => f.name);
31803
+ const retainedNew = newAccount.fields.filter((f) => oldByName.has(f.name)).map((f) => f.name);
31804
+ const reordered = retainedOld.some((name, i) => retainedNew[i] !== name);
31805
+ let middleInsertion = false;
31806
+ for (let i = 0; i < newAccount.fields.length; i++) {
31807
+ if (!oldByName.has(newAccount.fields[i].name)) {
31808
+ const trailing = newAccount.fields.slice(i + 1);
31809
+ if (trailing.some((f) => oldByName.has(f.name))) {
31810
+ middleInsertion = true;
31811
+ break;
31812
+ }
31813
+ }
31814
+ }
31815
+ return { removed, added, typeChanged, reordered, middleInsertion };
31816
+ }
31817
+ function firstDivergence(oldLayout, newLayout) {
31818
+ const min = Math.min(oldLayout.length, newLayout.length);
31819
+ for (let i = 0; i < min; i++) {
31820
+ const a = oldLayout[i];
31821
+ const b = newLayout[i];
31822
+ if (a.name !== b.name || a.type !== b.type || a.offset !== b.offset)
31823
+ return i;
31824
+ }
31825
+ return -1;
31826
+ }
31827
+ function buildByteReasoning(oldAccount, newAccount, oldLayout, newLayout, diff, appendOnly) {
31828
+ const explanations = [];
31829
+ const ranges = [];
31830
+ const caveats = [];
31831
+ const oldDyn = firstDynamicIndex(oldAccount);
31832
+ const newDyn = firstDynamicIndex(newAccount);
31833
+ const hasDynamic = oldDyn !== -1 || newDyn !== -1;
31834
+ let certainty = "Exact";
31835
+ if (appendOnly) {
31836
+ const oldEnd = oldAccount.byteSize;
31837
+ const newEnd = newAccount.byteSize;
31838
+ const names = diff.added.map((f) => `\`${f.name}: ${f.type}\``).join(", ");
31839
+ explanations.push(`Existing accounts occupy bytes ${DISCRIMINATOR_BYTES}\u2013${oldEnd - 1}. The appended field(s) ${names} require bytes ${oldEnd}\u2013${newEnd - 1}, which existing accounts do not have until they are reallocated and zero-initialized.`);
31840
+ if (hasDynamic) {
31841
+ certainty = "Approximate";
31842
+ caveats.push("Account contains a dynamically-sized field, so the appended-bytes range is a lower bound on the real on-chain size.");
31843
+ }
31844
+ return { reasoning: { account: oldAccount.name, oldLayout, newLayout, explanations, affectedOffsetRanges: ranges }, certainty, caveats };
31845
+ }
31846
+ const divergenceIndex = firstDivergence(oldLayout, newLayout);
31847
+ if (divergenceIndex === -1) {
31848
+ const anchor = diff.removed[0] || oldAccount.fields[oldAccount.fields.length - 1];
31849
+ if (anchor) {
31850
+ const of = oldLayout.find((f) => f.name === anchor.name);
31851
+ if (of) {
31852
+ explanations.push(`Field \`${anchor.name}: ${anchor.type}\` at bytes ${of.offset}\u2013${of.offset + of.byteSize - 1} no longer matches the new layout, so bytes from offset ${of.offset} onward are reinterpreted.`);
31853
+ ranges.push({
31854
+ start: of.offset,
31855
+ end: oldAccount.byteSize - 1,
31856
+ was: `${anchor.name}: ${anchor.type}`,
31857
+ nowReadsAs: fieldDescAtOffset(newLayout, of.offset)
31858
+ });
31859
+ }
31860
+ }
31861
+ } else {
31862
+ const oldField = oldLayout[divergenceIndex];
31863
+ const divergesInDynamicRegion = oldDyn !== -1 && divergenceIndex >= oldDyn || newDyn !== -1 && divergenceIndex >= newDyn;
31864
+ if (divergesInDynamicRegion) {
31865
+ certainty = "ManualReview";
31866
+ caveats.push(`The change lands in or after a dynamically-sized field (\`${oldField.name}\`), so exact byte offsets cannot be asserted. Manual review of the on-disk consequence is recommended.`);
31867
+ explanations.push(`The persisted layout of \`${oldAccount.name}\` diverges at field \`${oldField.name}\`, which follows a dynamically-sized field. Existing accounts will deserialize incorrectly, but the precise affected byte range is not statically determinable.`);
31868
+ } else {
31869
+ if (hasDynamic) {
31870
+ certainty = "Approximate";
31871
+ caveats.push("Account contains a dynamically-sized field; offsets after it are not asserted, though the divergence above occurs in the fixed region and is exact.");
31872
+ }
31873
+ const start = oldField.offset;
31874
+ const end = oldField.offset + oldField.byteSize - 1;
31875
+ const nowReads = fieldDescAtOffset(newLayout, start);
31876
+ explanations.push(`Bytes ${start}\u2013${end} previously held \`${oldField.name}: ${oldField.type}\`. Under the new layout those same bytes deserialize as ${nowReads}. Existing on-chain accounts will silently decode into the wrong fields.`);
31877
+ ranges.push({
31878
+ start,
31879
+ end: oldAccount.byteSize - 1,
31880
+ was: `${oldField.name}: ${oldField.type}`,
31881
+ nowReadsAs: nowReads
31882
+ });
31883
+ }
31884
+ }
31885
+ return {
31886
+ reasoning: { account: oldAccount.name, oldLayout, newLayout, explanations, affectedOffsetRanges: ranges },
31887
+ certainty,
31888
+ caveats
31889
+ };
31890
+ }
31891
+ function fieldDescAtOffset(layout, byteOffset) {
31892
+ const f = fieldAtOffset(layout, byteOffset);
31893
+ if (!f)
31894
+ return "unmapped bytes (out of bounds / shifted past end)";
31895
+ return `\`${f.name}: ${f.type}\``;
31896
+ }
31897
+ function buildUpgradePlan(status, account, primaryReason, additionalBytes) {
31898
+ if (status === "Compatible") {
31899
+ return [
31900
+ `No migration required \u2014 existing \`${account}\` accounts remain valid.`,
31901
+ "Deploy the upgraded program."
31902
+ ];
31903
+ }
31904
+ if (status === "Migration-Required") {
31905
+ return [
31906
+ `Deploy a migration instruction that reallocs \`${account}\` and zero-initializes the ${additionalBytes} new byte(s).`,
31907
+ "Reallocate all existing accounts in batches (top up rent for the added bytes).",
31908
+ "Verify every account reached the new size before relying on the new field(s).",
31909
+ "Deploy the upgraded program once all accounts are migrated."
31910
+ ];
31911
+ }
31912
+ return [
31913
+ `DO NOT deploy over existing \`${account}\` accounts \u2014 ${primaryReason}`,
31914
+ "Keep the persisted layout backward-compatible (append fields at the tail; never reorder, remove, retype, or shrink in place).",
31915
+ "If the new shape is required, introduce a versioned account (new discriminator) and migrate state explicitly into it.",
31916
+ "Re-run `epic check` and verify the migration against a forked mainnet state before shipping."
31917
+ ];
31918
+ }
31919
+ function classifyMatchedAccount(oldAccount, newAccount) {
31920
+ const oldLayout = computeFieldOffsets(oldAccount);
31921
+ const newLayout = computeFieldOffsets(newAccount);
31922
+ const diff = diffFields(oldAccount, newAccount);
31923
+ const oldSize = oldAccount.byteSize;
31924
+ const newSize = newAccount.byteSize;
31925
+ const sizeDelta = newSize - oldSize;
31926
+ const discriminatorChanged = Boolean(oldAccount.discriminator && newAccount.discriminator && oldAccount.discriminator !== newAccount.discriminator);
31927
+ const reasons = [];
31928
+ const caveats = [];
31929
+ let status;
31930
+ let primaryReason = "";
31931
+ let appendOnly = false;
31932
+ if (discriminatorChanged) {
31933
+ status = "Blocked";
31934
+ primaryReason = "the account discriminator changed; existing accounts are no longer recognized.";
31935
+ reasons.push("Discriminator changed \u2014 existing accounts become unrecognizable to the new program.");
31936
+ } else if (diff.reordered) {
31937
+ status = "Blocked";
31938
+ primaryReason = "fields were reordered, so existing bytes decode into the wrong fields.";
31939
+ reasons.push("Persisted fields were reordered \u2014 Borsh offsets shift and existing accounts decode incorrectly.");
31940
+ } else if (diff.removed.length > 0) {
31941
+ status = "Blocked";
31942
+ primaryReason = "a persisted field was removed, shifting every later field.";
31943
+ reasons.push(`Field(s) removed: ${diff.removed.map((f) => `\`${f.name}\``).join(", ")} \u2014 removing persisted fields shifts subsequent offsets.`);
31944
+ } else if (diff.typeChanged.length > 0) {
31945
+ status = "Blocked";
31946
+ const tc = diff.typeChanged[0];
31947
+ primaryReason = `field \`${tc.name}\` changed type (${tc.oldType} \u2192 ${tc.newType}), reinterpreting existing bytes.`;
31948
+ reasons.push(`Type change(s): ${diff.typeChanged.map((t) => `\`${t.name}\` ${t.oldType}\u2192${t.newType}`).join(", ")} \u2014 existing bytes are reinterpreted.`);
31949
+ } else if (sizeDelta < 0) {
31950
+ status = "Blocked";
31951
+ primaryReason = "the account shrank; trailing bytes from existing accounts are truncated or misread.";
31952
+ reasons.push(`Account size decreased (${oldSize} \u2192 ${newSize} bytes) \u2014 existing accounts are larger than the new layout.`);
31953
+ } else if (diff.added.length > 0 && diff.middleInsertion) {
31954
+ status = "Blocked";
31955
+ primaryReason = "a field was inserted before the end, shifting every later field.";
31956
+ reasons.push("Field inserted in the middle \u2014 every field after the insertion point shifts on disk.");
31957
+ } else if (diff.added.length > 0) {
31958
+ status = "Migration-Required";
31959
+ primaryReason = "new fields were appended and existing accounts are too short.";
31960
+ reasons.push(`Append-only growth: ${diff.added.map((f) => `\`${f.name}: ${f.type}\``).join(", ")} added at the tail (+${sizeDelta} bytes).`);
31961
+ appendOnly = true;
31962
+ } else {
31963
+ status = "Compatible";
31964
+ reasons.push("No persisted layout change \u2014 field names, types, order, size, and discriminator are unchanged.");
31965
+ }
31966
+ let byteReasoning;
31967
+ let certainty = "Exact";
31968
+ if (status === "Compatible") {
31969
+ certainty = oldAccount.hasDynamicSize || newAccount.hasDynamicSize ? "Approximate" : "Exact";
31970
+ } else {
31971
+ const built = buildByteReasoning(oldAccount, newAccount, oldLayout, newLayout, diff, appendOnly);
31972
+ byteReasoning = built.reasoning;
31973
+ certainty = built.certainty;
31974
+ caveats.push(...built.caveats);
31975
+ }
31976
+ let rentDeltaLamports = null;
31977
+ if (sizeDelta > 0) {
31978
+ if (oldAccount.hasDynamicSize || newAccount.hasDynamicSize) {
31979
+ caveats.push("Rent delta is indeterminate because the account is dynamically sized.");
31980
+ } else {
31981
+ rentDeltaLamports = sizeDelta * LAMPORTS_PER_BYTE_YEAR * EXEMPTION_THRESHOLD;
31982
+ }
31983
+ }
31984
+ const upgradePlan = buildUpgradePlan(status, oldAccount.name, primaryReason, Math.max(sizeDelta, 0));
31985
+ return {
31986
+ account: oldAccount.name,
31987
+ status,
31988
+ certainty,
31989
+ reasons,
31990
+ discriminatorChanged,
31991
+ oldSize,
31992
+ newSize,
31993
+ sizeDelta,
31994
+ byteReasoning,
31995
+ rentDeltaLamports,
31996
+ upgradePlan,
31997
+ caveats
31998
+ };
31999
+ }
32000
+ function classifyRemovedAccount(oldAccount) {
32001
+ return {
32002
+ account: oldAccount.name,
32003
+ status: "Migration-Required",
32004
+ certainty: "ManualReview",
32005
+ reasons: [
32006
+ `Account type \`${oldAccount.name}\` was removed from the program. Existing on-chain accounts of this type are no longer referenced.`
32007
+ ],
32008
+ discriminatorChanged: false,
32009
+ oldSize: oldAccount.byteSize,
32010
+ newSize: null,
32011
+ sizeDelta: null,
32012
+ rentDeltaLamports: null,
32013
+ upgradePlan: [
32014
+ `Decide the fate of existing \`${oldAccount.name}\` accounts before deploying.`,
32015
+ "If this is a rename, treat it as a discriminator change (BLOCKED) and migrate state into the renamed type explicitly.",
32016
+ "If genuinely retired, drain/close existing accounts via a migration instruction before removing support."
32017
+ ],
32018
+ caveats: [
32019
+ "EPIC cannot statically distinguish a removed account type from a rename. Confirm which case applies."
32020
+ ]
32021
+ };
32022
+ }
32023
+ function classifyAddedAccount(newAccount) {
32024
+ return {
32025
+ account: newAccount.name,
32026
+ status: "Compatible",
32027
+ certainty: "Exact",
32028
+ reasons: [`New account type \`${newAccount.name}\` \u2014 no pre-existing on-chain state to break.`],
32029
+ discriminatorChanged: false,
32030
+ oldSize: null,
32031
+ newSize: newAccount.byteSize,
32032
+ sizeDelta: null,
32033
+ rentDeltaLamports: null,
32034
+ upgradePlan: [`No migration required \u2014 \`${newAccount.name}\` has no existing accounts.`, "Deploy the upgraded program."],
32035
+ caveats: []
32036
+ };
32037
+ }
32038
+ var STATUS_RANK = {
32039
+ Compatible: 0,
32040
+ "Migration-Required": 1,
32041
+ Blocked: 2
32042
+ };
32043
+ function worst(a, b) {
32044
+ return STATUS_RANK[a] >= STATUS_RANK[b] ? a : b;
32045
+ }
32046
+ function simulateCompatibility(oldProgram, newProgram, _cfg) {
32047
+ const oldByName = new Map(oldProgram.accounts.map((a) => [a.name, a]));
32048
+ const newByName = new Map(newProgram.accounts.map((a) => [a.name, a]));
32049
+ const names = Array.from(/* @__PURE__ */ new Set([...oldByName.keys(), ...newByName.keys()])).sort();
32050
+ const accounts = [];
32051
+ for (const name of names) {
32052
+ const oldAccount = oldByName.get(name);
32053
+ const newAccount = newByName.get(name);
32054
+ if (oldAccount && newAccount) {
32055
+ accounts.push(classifyMatchedAccount(oldAccount, newAccount));
32056
+ } else if (oldAccount) {
32057
+ accounts.push(classifyRemovedAccount(oldAccount));
32058
+ } else if (newAccount) {
32059
+ accounts.push(classifyAddedAccount(newAccount));
32060
+ }
32061
+ }
32062
+ const overall = accounts.reduce((acc, a) => worst(acc, a.status), "Compatible");
32063
+ return {
32064
+ oldProgramPath: oldProgram.projectPath,
32065
+ newProgramPath: newProgram.projectPath,
32066
+ overall,
32067
+ accounts,
32068
+ assumptions: [STATIC_ASSUMPTION, BORSH_ASSUMPTION]
32069
+ };
32070
+ }
32071
+
32072
+ // ../cli/dist/formatters.js
32073
+ function formatMarkdown(result, configChanged = false) {
32074
+ const { compatibility, report, programName, epicConfig } = result;
32075
+ const lines = [];
32076
+ const blocked = compatibility.overall === "Blocked";
32077
+ const migration = compatibility.overall === "Migration-Required";
32078
+ const safe = compatibility.overall === "Compatible";
32079
+ if (blocked) {
32080
+ lines.push("## \u{1F534} EPIC Guard: UPGRADE BLOCKED");
32081
+ } else if (migration) {
32082
+ lines.push("## \u{1F7E1} EPIC Guard: MIGRATION REQUIRED");
32083
+ } else {
32084
+ lines.push("## \u{1F7E2} EPIC Guard: APPROVED");
32085
+ }
32086
+ lines.push("");
32087
+ if (configChanged) {
32088
+ lines.push("> [!WARNING]");
32089
+ lines.push("> **UPGRADE CONFIGURATION GATE MODIFIED**");
32090
+ lines.push("> This Pull Request contains changes to `epic.toml` configuration rules.");
32091
+ lines.push("> Signers must audit the modifications below to ensure safety limits are not bypassed.");
32092
+ lines.push("");
32093
+ }
32094
+ lines.push(`### Upgrade Compatibility: \`${programName}\``);
32095
+ lines.push("");
32096
+ if (compatibility.accounts.length === 0) {
32097
+ lines.push("No state accounts found. Upgrade is safe.");
32098
+ return lines.join("\n");
32099
+ }
32100
+ for (const acc of compatibility.accounts) {
32101
+ const isBlocked = acc.status === "Blocked";
32102
+ const isMigration = acc.status === "Migration-Required";
32103
+ const icon = isBlocked ? "\u{1F534}" : isMigration ? "\u{1F7E1}" : "\u{1F7E2}";
32104
+ lines.push(`#### ${icon} Struct \`${acc.account}\` (${acc.status})`);
32105
+ if (acc.reasons && acc.reasons.length > 0) {
32106
+ lines.push("");
32107
+ lines.push("**Reasoning:**");
32108
+ for (const r of acc.reasons) {
32109
+ lines.push(`* ${r}`);
32110
+ }
32111
+ }
32112
+ if (acc.upgradePlan && acc.upgradePlan.length > 0) {
32113
+ lines.push("");
32114
+ lines.push("**Migration Plan:**");
32115
+ if (acc.rentDeltaLamports !== null) {
32116
+ lines.push(`* Rent Delta: \`${acc.rentDeltaLamports} lamports\` (\`${acc.sizeDelta} bytes\`)`);
32117
+ }
32118
+ for (const step of acc.upgradePlan) {
32119
+ lines.push(`* ${step}`);
32120
+ }
32121
+ }
32122
+ lines.push("");
32123
+ }
32124
+ const appliedOverrides = report.findings.filter((f) => f.severity !== (f.kind === "FIELD_ADDED" ? "MAJOR" : "CRITICAL"));
32125
+ if (appliedOverrides.length > 0) {
32126
+ lines.push("### \u{1F511} Applied Layout Overrides");
32127
+ lines.push("");
32128
+ lines.push("| Struct | Finding | Field | Severity Shift | Note |");
32129
+ lines.push("| :--- | :--- | :--- | :--- | :--- |");
32130
+ for (const o of appliedOverrides) {
32131
+ const original = o.kind === "FIELD_ADDED" ? "MAJOR" : "CRITICAL";
32132
+ let note = "No note provided.";
32133
+ for (const [name, program] of epicConfig.programs.entries()) {
32134
+ const match = program.overrides.find((override) => override.account.toLowerCase() === o.account.toLowerCase() && override.finding.toUpperCase() === o.kind.toUpperCase());
32135
+ if (match) {
32136
+ note = match.note;
32137
+ break;
32138
+ }
32139
+ }
32140
+ lines.push(`| \`${o.account}\` | \`${o.kind}\` | \`${o.field?.name || "global"}\` | \`${original}\` \u2500\u2500\u25BA \`${o.severity}\` | ${note} |`);
32141
+ }
32142
+ lines.push("");
32143
+ }
32144
+ return lines.join("\n");
32145
+ }
32146
+ function formatSarif(result) {
32147
+ const sarif = {
32148
+ version: "2.1.0",
32149
+ $schema: "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
32150
+ runs: [
32151
+ {
32152
+ tool: {
32153
+ driver: {
32154
+ name: "EPIC Upgrade Intelligence",
32155
+ version: "0.2.0-beta.0",
32156
+ informationUri: "https://github.com/solana-epic/epic",
32157
+ rules: []
32158
+ }
32159
+ },
32160
+ results: []
32161
+ }
32162
+ ]
32163
+ };
32164
+ const run2 = sarif.runs[0];
32165
+ const rules = /* @__PURE__ */ new Map();
32166
+ for (const finding of result.report.findings) {
32167
+ const ruleId = `EPIC-LAYOUT-${finding.kind}`;
32168
+ if (!rules.has(ruleId)) {
32169
+ rules.set(ruleId, {
32170
+ id: ruleId,
32171
+ shortDescription: { text: `State Layout Drift: ${finding.kind}` },
32172
+ helpUri: "https://github.com/solana-epic/epic"
32173
+ });
32174
+ }
32175
+ let level = "warning";
32176
+ if (finding.severity === "CRITICAL")
32177
+ level = "error";
32178
+ if (finding.severity === "SAFE")
32179
+ level = "note";
32180
+ run2.results.push({
32181
+ ruleId,
32182
+ level,
32183
+ message: {
32184
+ text: `Account \`${finding.account}\` changed: ${finding.kind}. Field: ${finding.field?.name || "N/A"}`
32185
+ },
32186
+ locations: [
32187
+ {
32188
+ physicalLocation: {
32189
+ artifactLocation: { uri: "epic.toml" },
32190
+ region: { startLine: 1 }
32191
+ }
32192
+ }
32193
+ ]
32194
+ });
32195
+ }
32196
+ run2.tool.driver.rules = Array.from(rules.values());
32197
+ return sarif;
32198
+ }
32199
+
32200
+ // ../cli/dist/api.js
32201
+ async function runCheck(oldPath, newPath, epicConfig) {
32202
+ const resolvedOldPath = path5.resolve(oldPath);
32203
+ const resolvedNewPath = path5.resolve(newPath);
32204
+ const { oldProgram, newProgram } = await analyzePrograms(resolvedOldPath, resolvedNewPath, epicConfig);
32205
+ const compatibility = simulateCompatibility(oldProgram, newProgram, epicConfig);
32206
+ const report = compareAccountLayouts(oldProgram, newProgram, epicConfig);
32207
+ const intelligence = createUpgradeIntelligence(report);
32208
+ const programName = compatibility.accounts[0]?.account || report.findings[0]?.account || path5.basename(resolvedNewPath);
32209
+ return {
32210
+ programName,
32211
+ compatibility,
32212
+ report,
32213
+ intelligence,
32214
+ epicConfig
32215
+ };
32216
+ }
32217
+
31754
32218
  // src/github.ts
31755
32219
  var github = __toESM(require_github());
31756
32220
  var core = __toESM(require_core());
@@ -31820,164 +32284,52 @@ async function checkIfConfigChanged(token) {
31820
32284
  }
31821
32285
  }
31822
32286
 
31823
- // src/report.ts
31824
- function generateCompactMarkdownReport(report, cfg, configChanged) {
31825
- const lines = [];
31826
- const failSeverity = cfg.failOnSeverity;
31827
- const severityOrder = ["SAFE", "MINOR", "MAJOR", "CRITICAL"];
31828
- const thresholdIndex = severityOrder.indexOf(failSeverity);
31829
- const reportSeverityIndex = severityOrder.indexOf(report.severity);
31830
- const blocked = thresholdIndex !== -1 && reportSeverityIndex !== -1 && reportSeverityIndex >= thresholdIndex;
31831
- const hasOverrides = report.findings.some((f) => {
31832
- const original = f.kind === "FIELD_ADDED" ? "MAJOR" : "CRITICAL";
31833
- return f.severity !== original;
31834
- });
31835
- if (blocked) {
31836
- lines.push("## \u{1F534} EPIC Guard: UPGRADE BLOCKED");
31837
- lines.push("");
31838
- lines.push(`Upgrade checks failed because layout changes exceed the **${failSeverity}** threshold.`);
31839
- } else if (hasOverrides) {
31840
- lines.push("## \u{1F7E1} EPIC Guard: APPROVED WITH OVERRIDES");
31841
- lines.push("");
31842
- lines.push("Upgrade checks passed with muted warnings. Custom overrides are active in `epic.toml`.");
31843
- } else {
31844
- lines.push("## \u{1F7E2} EPIC Guard: APPROVED");
31845
- lines.push("");
31846
- lines.push("Upgrade checks approved. No layout compatibility risks detected.");
31847
- }
31848
- lines.push("");
31849
- if (configChanged) {
31850
- lines.push("> [!WARNING]");
31851
- lines.push("> **UPGRADE CONFIGURATION GATE MODIFIED**");
31852
- lines.push("> This Pull Request contains changes to `epic.toml` configuration rules.");
31853
- lines.push("> Signers must audit the modifications below to ensure safety limits are not bypassed.");
31854
- lines.push("");
31855
- }
31856
- lines.push("### \u{1F4CA} Upgrade Summary");
31857
- lines.push("");
31858
- lines.push("| Program | Account | Finding | Final Severity | Overridden? |");
31859
- lines.push("| :--- | :--- | :--- | :--- | :--- |");
31860
- if (report.findings.length === 0) {
31861
- lines.push("| *N/A* | *All Accounts* | *No structural changes* | `SAFE` | No |");
31862
- } else {
31863
- for (const f of report.findings) {
31864
- const original = f.kind === "FIELD_ADDED" ? "MAJOR" : "CRITICAL";
31865
- const isOverridden = f.severity !== original;
31866
- lines.push(`| \`marginfi\` | \`${f.account}\` | \`${f.kind}\` | \`${f.severity}\` | ${isOverridden ? "\u2705 Yes" : "No"} |`);
31867
- }
31868
- }
31869
- lines.push("");
31870
- if (report.findings.length > 0) {
31871
- lines.push("### \u{1F50D} Layout Findings");
31872
- lines.push("");
31873
- for (const f of report.findings) {
31874
- const intel = createUpgradeIntelligenceItem(f);
31875
- lines.push(`#### Struct \`${f.account}\` \u2014 **${f.kind}**`);
31876
- lines.push("");
31877
- lines.push(`* **Finding Type**: ${f.kind}`);
31878
- if (f.field) {
31879
- lines.push(`* **Field**: \`${f.field.name}\` (${f.field.oldType || "new"} \u2500\u2500\u25BA ${f.field.newType || "removed"})`);
31880
- }
31881
- lines.push(`* **Size Impact**: \`${f.oldSize}B\` \u2500\u2500\u25BA \`${f.newSize}B\` (${f.newSize - f.oldSize >= 0 ? "+" : ""}${f.newSize - f.oldSize} bytes)`);
31882
- lines.push(`* **Risk Class**: ${intel.riskCategory}`);
31883
- lines.push(`* **Severity**: \`${f.severity}\``);
31884
- lines.push("");
31885
- }
31886
- }
31887
- const appliedOverrides = [];
31888
- for (const f of report.findings) {
31889
- const original = f.kind === "FIELD_ADDED" ? "MAJOR" : "CRITICAL";
31890
- if (f.severity !== original) {
31891
- let note = "No note provided.";
31892
- for (const [name, program] of cfg.programs.entries()) {
31893
- const match = program.overrides.find((o) => {
31894
- const accountMatch = o.account.toLowerCase() === f.account.toLowerCase();
31895
- const findingMatch = o.finding.toUpperCase() === f.kind.toUpperCase();
31896
- const fieldMatch = f.field && o.field && o.field.toLowerCase() === f.field.name.toLowerCase();
31897
- return accountMatch && findingMatch && (fieldMatch || !o.field);
31898
- });
31899
- if (match) {
31900
- note = match.note;
31901
- break;
31902
- }
31903
- }
31904
- appliedOverrides.push({
31905
- account: f.account,
31906
- finding: f.kind,
31907
- field: f.field?.name,
31908
- shift: `\`${original}\` \u2500\u2500\u25BA \`${f.severity}\``,
31909
- note
31910
- });
31911
- }
31912
- }
31913
- if (appliedOverrides.length > 0) {
31914
- lines.push("### \u{1F511} Applied Layout Overrides");
31915
- lines.push("");
31916
- lines.push("| Struct | Finding | Field | Severity Shift | Note / Safety Justification |");
31917
- lines.push("| :--- | :--- | :--- | :--- | :--- |");
31918
- for (const o of appliedOverrides) {
31919
- lines.push(`| \`${o.account}\` | \`${o.finding}\` | \`${o.field || "global"}\` | ${o.shift} | ${o.note} |`);
31920
- }
31921
- lines.push("");
31922
- }
31923
- lines.push("### \u{1F4A1} Recommended Actions");
31924
- lines.push("");
31925
- if (report.findings.length === 0) {
31926
- lines.push("* No action required. Layout upgrades are safe to proceed.");
31927
- } else {
31928
- const uniqueRecommendations = /* @__PURE__ */ new Set();
31929
- for (const f of report.findings) {
31930
- const intel = createUpgradeIntelligenceItem(f);
31931
- uniqueRecommendations.add(intel.recommendation);
31932
- }
31933
- for (const rec of uniqueRecommendations) {
31934
- lines.push(`* ${rec}`);
31935
- }
31936
- }
31937
- lines.push("");
31938
- return lines.join("\n");
31939
- }
31940
-
31941
32287
  // src/index.ts
32288
+ var fs2 = __toESM(require("fs"));
32289
+ var path6 = __toESM(require("path"));
31942
32290
  async function run() {
31943
32291
  try {
31944
32292
  const githubToken = core2.getInput("github_token", { required: true });
31945
32293
  const oldPath = core2.getInput("old_path", { required: true });
31946
32294
  const newPath = core2.getInput("new_path", { required: true });
31947
32295
  const configPath = core2.getInput("config_path") || void 0;
31948
- core2.info(`Running EPIC Upgrade Guard compare:`);
32296
+ const sarifOutput = core2.getInput("sarif_output") || "epic-report.sarif";
32297
+ core2.info(`Running EPIC Upgrade Intelligence:`);
31949
32298
  core2.info(`Old path: ${oldPath}`);
31950
32299
  core2.info(`New path: ${newPath}`);
31951
- if (configPath) {
31952
- core2.info(`Custom config path: ${configPath}`);
31953
- }
31954
32300
  let epicConfig;
31955
32301
  try {
31956
32302
  epicConfig = config_exports.loadEpicConfig(configPath);
31957
- core2.info(`Loaded epic.toml settings. Fail severity threshold: ${epicConfig.failOnSeverity}`);
31958
32303
  } catch (err) {
31959
32304
  core2.setFailed(`Failed to validate epic.toml configuration: ${err.message}`);
31960
32305
  return;
31961
32306
  }
31962
32307
  const configChanged = await checkIfConfigChanged(githubToken);
31963
- const report = await compareAnchorPrograms(oldPath, newPath, epicConfig);
31964
- const findingsCount = report.findings.length;
31965
- core2.setOutput("severity", report.severity);
31966
- core2.setOutput("findings_count", findingsCount.toString());
31967
- core2.info(`Diff completed. Severity: ${report.severity}, Findings: ${findingsCount}`);
31968
- const markdownReport = generateCompactMarkdownReport(report, epicConfig, configChanged);
32308
+ const result = await runCheck(oldPath, newPath, epicConfig);
32309
+ const { compatibility } = result;
32310
+ core2.setOutput("severity", compatibility.overall);
32311
+ core2.setOutput("findings_count", result.report.findings.length.toString());
32312
+ const markdownReport = formatMarkdown(result, configChanged);
32313
+ await core2.summary.addRaw(markdownReport).write();
31969
32314
  await upsertPRComment(githubToken, markdownReport);
31970
- const severityLevels = ["SAFE", "MINOR", "MAJOR", "CRITICAL"];
31971
- const thresholdIndex = severityLevels.indexOf(epicConfig.failOnSeverity);
31972
- const reportSeverityIndex = severityLevels.indexOf(report.severity);
31973
- if (thresholdIndex !== -1 && reportSeverityIndex !== -1 && reportSeverityIndex >= thresholdIndex) {
31974
- core2.setFailed(`EPIC Guard Blocked: Upgrade severity is ${report.severity} (threshold: ${epicConfig.failOnSeverity}).`);
32315
+ const sarif = formatSarif(result);
32316
+ fs2.writeFileSync(path6.resolve(sarifOutput), JSON.stringify(sarif, null, 2));
32317
+ core2.info(`Wrote SARIF report to ${sarifOutput}`);
32318
+ const severityLevels = ["Compatible", "Migration-Required", "Blocked"];
32319
+ const blocked = compatibility.overall === "Blocked";
32320
+ const reportSeverityIndex = ["SAFE", "MINOR", "WARNING", "MAJOR", "CRITICAL"].indexOf(result.report.severity);
32321
+ const thresholdIndex = ["SAFE", "MINOR", "WARNING", "MAJOR", "CRITICAL"].indexOf(epicConfig.failOnSeverity.toUpperCase());
32322
+ const failsThreshold = thresholdIndex !== -1 && reportSeverityIndex !== -1 && reportSeverityIndex >= thresholdIndex;
32323
+ if (blocked) {
32324
+ core2.setFailed(`EPIC Guard Blocked: deploying would corrupt existing on-chain accounts.`);
32325
+ } else if (failsThreshold) {
32326
+ core2.setFailed(`EPIC Guard Blocked: Upgrade severity is ${result.report.severity} (threshold: ${epicConfig.failOnSeverity}).`);
31975
32327
  } else {
31976
32328
  core2.info("EPIC Guard approved upgrade.");
31977
32329
  }
31978
32330
  } catch (error) {
31979
32331
  const message = error instanceof Error ? error.message : String(error);
31980
- core2.setFailed(`EPIC Upgrade Guard failed: ${message}`);
32332
+ core2.setFailed(`EPIC Upgrade Intelligence failed: ${message}`);
31981
32333
  }
31982
32334
  }
31983
32335
  run();
@@ -31989,7 +32341,7 @@ undici/lib/fetch/body.js:
31989
32341
  undici/lib/websocket/frame.js:
31990
32342
  (*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
31991
32343
 
31992
- smol-toml/dist/error.js:
32344
+ smol-toml/dist/date.js:
31993
32345
  (*!
31994
32346
  * Copyright (c) Squirrel Chat et al., All rights reserved.
31995
32347
  * SPDX-License-Identifier: BSD-3-Clause
@@ -32018,7 +32370,7 @@ smol-toml/dist/error.js:
32018
32370
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32019
32371
  *)
32020
32372
 
32021
- smol-toml/dist/util.js:
32373
+ smol-toml/dist/error.js:
32022
32374
  (*!
32023
32375
  * Copyright (c) Squirrel Chat et al., All rights reserved.
32024
32376
  * SPDX-License-Identifier: BSD-3-Clause
@@ -32047,7 +32399,7 @@ smol-toml/dist/util.js:
32047
32399
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32048
32400
  *)
32049
32401
 
32050
- smol-toml/dist/date.js:
32402
+ smol-toml/dist/primitive.js:
32051
32403
  (*!
32052
32404
  * Copyright (c) Squirrel Chat et al., All rights reserved.
32053
32405
  * SPDX-License-Identifier: BSD-3-Clause
@@ -32076,7 +32428,7 @@ smol-toml/dist/date.js:
32076
32428
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32077
32429
  *)
32078
32430
 
32079
- smol-toml/dist/primitive.js:
32431
+ smol-toml/dist/util.js:
32080
32432
  (*!
32081
32433
  * Copyright (c) Squirrel Chat et al., All rights reserved.
32082
32434
  * SPDX-License-Identifier: BSD-3-Clause