@datadog/datadog-ci-plugin-container-app 5.13.1 → 5.15.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/bundle.js CHANGED
@@ -59579,7 +59579,7 @@ var require_src$9 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
59579
59579
  var require_package$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
59580
59580
  module.exports = {
59581
59581
  "name": "@datadog/datadog-ci-base",
59582
- "version": "5.13.1",
59582
+ "version": "5.15.0",
59583
59583
  "description": "Base package for Datadog CI",
59584
59584
  "license": "Apache-2.0",
59585
59585
  "keywords": ["datadog", "datadog-ci"],
@@ -59609,6 +59609,10 @@ var require_package$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
59609
59609
  "development": "./src/constants.ts",
59610
59610
  "default": "./dist/constants.js"
59611
59611
  },
59612
+ "./helpers/request/*": {
59613
+ "development": "./src/helpers/request/*.ts",
59614
+ "default": "./dist/helpers/request/*.js"
59615
+ },
59612
59616
  "./helpers/*": {
59613
59617
  "development": "./src/helpers/*.ts",
59614
59618
  "default": "./dist/helpers/*.js"
@@ -60921,7 +60925,7 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports) => {
60921
60925
  //#region ../base/dist/helpers/serverless/constants.js
60922
60926
  var require_constants$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
60923
60927
  Object.defineProperty(exports, "__esModule", { value: true });
60924
- exports.ENV_VAR_REGEX = exports.DEFAULT_HEALTH_CHECK_PORT = exports.DEFAULT_LOGS_PATH = exports.DEFAULT_VOLUME_PATH = exports.DEFAULT_VOLUME_NAME = exports.DEFAULT_SIDECAR_NAME = exports.SIDECAR_PORT = exports.SIDECAR_IMAGE = exports.SIDECAR_CONTAINER_NAME = exports.FLARE_PROJECT_FILES = exports.FLARE_ENDPOINT_PATH = exports.INSIGHTS_FILE_NAME = exports.ADDITIONAL_FILES_DIRECTORY = exports.PROJECT_FILES_DIRECTORY = exports.LOGS_DIRECTORY = exports.FLARE_OUTPUT_DIRECTORY = exports.EXTRA_TAGS_REG_EXP = exports.VERSION_ENV_VAR = exports.ENVIRONMENT_ENV_VAR = exports.SERVICE_ENV_VAR = exports.DD_SOURCE_ENV_VAR = exports.DD_TAGS_ENV_VAR = exports.DD_LLMOBS_AGENTLESS_ENABLED_ENV_VAR = exports.DD_LLMOBS_ML_APP_ENV_VAR = exports.DD_LLMOBS_ENABLED_ENV_VAR = exports.DD_TRACE_ENABLED_ENV_VAR = exports.DD_LOG_LEVEL_ENV_VAR = exports.HEALTH_PORT_ENV_VAR = exports.LOGS_PATH_ENV_VAR = exports.LOGS_INJECTION_ENV_VAR = exports.SITE_ENV_VAR = exports.CI_SITE_ENV_VAR = exports.CI_API_KEY_ENV_VAR = exports.API_KEY_ENV_VAR = void 0;
60928
+ exports.ENV_VAR_REGEX = exports.DEFAULT_HEALTH_CHECK_PORT = exports.DEFAULT_LOGS_PATH = exports.DEFAULT_VOLUME_PATH = exports.DEFAULT_VOLUME_NAME = exports.DEFAULT_SIDECAR_NAME = exports.SIDECAR_PORT = exports.SIDECAR_IMAGE = exports.SIDECAR_CONTAINER_NAME = exports.FLARE_PROJECT_FILES = exports.INSIGHTS_FILE_NAME = exports.ADDITIONAL_FILES_DIRECTORY = exports.PROJECT_FILES_DIRECTORY = exports.LOGS_DIRECTORY = exports.FLARE_OUTPUT_DIRECTORY = exports.EXTRA_TAGS_REG_EXP = exports.VERSION_ENV_VAR = exports.ENVIRONMENT_ENV_VAR = exports.SERVICE_ENV_VAR = exports.DD_SOURCE_ENV_VAR = exports.DD_TAGS_ENV_VAR = exports.DD_LLMOBS_AGENTLESS_ENABLED_ENV_VAR = exports.DD_LLMOBS_ML_APP_ENV_VAR = exports.DD_LLMOBS_ENABLED_ENV_VAR = exports.DD_TRACE_ENABLED_ENV_VAR = exports.DD_LOG_LEVEL_ENV_VAR = exports.HEALTH_PORT_ENV_VAR = exports.LOGS_PATH_ENV_VAR = exports.LOGS_INJECTION_ENV_VAR = exports.SITE_ENV_VAR = exports.CI_SITE_ENV_VAR = exports.CI_API_KEY_ENV_VAR = exports.API_KEY_ENV_VAR = void 0;
60925
60929
  exports.API_KEY_ENV_VAR = "DD_API_KEY";
60926
60930
  exports.CI_API_KEY_ENV_VAR = "DATADOG_API_KEY";
60927
60931
  exports.CI_SITE_ENV_VAR = "DATADOG_SITE";
@@ -60945,7 +60949,6 @@ var require_constants$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
60945
60949
  exports.PROJECT_FILES_DIRECTORY = "project_files";
60946
60950
  exports.ADDITIONAL_FILES_DIRECTORY = "additional_files";
60947
60951
  exports.INSIGHTS_FILE_NAME = "INSIGHTS.md";
60948
- exports.FLARE_ENDPOINT_PATH = "/api/ui/support/serverless/flare";
60949
60952
  exports.FLARE_PROJECT_FILES = [
60950
60953
  "datadog-cloudfomation-macro.yaml",
60951
60954
  "datadog-cloudfomation-macro.yml",
@@ -92638,177 +92641,6 @@ var require_dist$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
92638
92641
  exports.ProxyAgent = ProxyAgent;
92639
92642
  }));
92640
92643
  //#endregion
92641
- //#region ../../node_modules/ansi-escapes/index.js
92642
- var require_ansi_escapes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
92643
- const ansiEscapes = module.exports;
92644
- module.exports.default = ansiEscapes;
92645
- const ESC = "\x1B[";
92646
- const OSC = "\x1B]";
92647
- const BEL = "\x07";
92648
- const SEP = ";";
92649
- const isTerminalApp = process.env.TERM_PROGRAM === "Apple_Terminal";
92650
- ansiEscapes.cursorTo = (x, y) => {
92651
- if (typeof x !== "number") throw new TypeError("The `x` argument is required");
92652
- if (typeof y !== "number") return ESC + (x + 1) + "G";
92653
- return ESC + (y + 1) + ";" + (x + 1) + "H";
92654
- };
92655
- ansiEscapes.cursorMove = (x, y) => {
92656
- if (typeof x !== "number") throw new TypeError("The `x` argument is required");
92657
- let ret = "";
92658
- if (x < 0) ret += ESC + -x + "D";
92659
- else if (x > 0) ret += ESC + x + "C";
92660
- if (y < 0) ret += ESC + -y + "A";
92661
- else if (y > 0) ret += ESC + y + "B";
92662
- return ret;
92663
- };
92664
- ansiEscapes.cursorUp = (count = 1) => ESC + count + "A";
92665
- ansiEscapes.cursorDown = (count = 1) => ESC + count + "B";
92666
- ansiEscapes.cursorForward = (count = 1) => ESC + count + "C";
92667
- ansiEscapes.cursorBackward = (count = 1) => ESC + count + "D";
92668
- ansiEscapes.cursorLeft = ESC + "G";
92669
- ansiEscapes.cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s";
92670
- ansiEscapes.cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u";
92671
- ansiEscapes.cursorGetPosition = ESC + "6n";
92672
- ansiEscapes.cursorNextLine = ESC + "E";
92673
- ansiEscapes.cursorPrevLine = ESC + "F";
92674
- ansiEscapes.cursorHide = ESC + "?25l";
92675
- ansiEscapes.cursorShow = ESC + "?25h";
92676
- ansiEscapes.eraseLines = (count) => {
92677
- let clear = "";
92678
- for (let i = 0; i < count; i++) clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : "");
92679
- if (count) clear += ansiEscapes.cursorLeft;
92680
- return clear;
92681
- };
92682
- ansiEscapes.eraseEndLine = ESC + "K";
92683
- ansiEscapes.eraseStartLine = ESC + "1K";
92684
- ansiEscapes.eraseLine = ESC + "2K";
92685
- ansiEscapes.eraseDown = ESC + "J";
92686
- ansiEscapes.eraseUp = ESC + "1J";
92687
- ansiEscapes.eraseScreen = ESC + "2J";
92688
- ansiEscapes.scrollUp = ESC + "S";
92689
- ansiEscapes.scrollDown = ESC + "T";
92690
- ansiEscapes.clearScreen = "\x1Bc";
92691
- ansiEscapes.clearTerminal = process.platform === "win32" ? `${ansiEscapes.eraseScreen}${ESC}0f` : `${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`;
92692
- ansiEscapes.beep = BEL;
92693
- ansiEscapes.link = (text, url) => {
92694
- return [
92695
- OSC,
92696
- "8",
92697
- SEP,
92698
- SEP,
92699
- url,
92700
- BEL,
92701
- text,
92702
- OSC,
92703
- "8",
92704
- SEP,
92705
- SEP,
92706
- BEL
92707
- ].join("");
92708
- };
92709
- ansiEscapes.image = (buffer, options = {}) => {
92710
- let ret = `${OSC}1337;File=inline=1`;
92711
- if (options.width) ret += `;width=${options.width}`;
92712
- if (options.height) ret += `;height=${options.height}`;
92713
- if (options.preserveAspectRatio === false) ret += ";preserveAspectRatio=0";
92714
- return ret + ":" + buffer.toString("base64") + BEL;
92715
- };
92716
- ansiEscapes.iTerm = {
92717
- setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
92718
- annotation: (message, options = {}) => {
92719
- let ret = `${OSC}1337;`;
92720
- const hasX = typeof options.x !== "undefined";
92721
- const hasY = typeof options.y !== "undefined";
92722
- if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== "undefined")) throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
92723
- message = message.replace(/\|/g, "");
92724
- ret += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
92725
- if (options.length > 0) ret += (hasX ? [
92726
- message,
92727
- options.length,
92728
- options.x,
92729
- options.y
92730
- ] : [options.length, message]).join("|");
92731
- else ret += message;
92732
- return ret + BEL;
92733
- }
92734
- };
92735
- }));
92736
- //#endregion
92737
- //#region ../../node_modules/supports-hyperlinks/index.js
92738
- var require_supports_hyperlinks = /* @__PURE__ */ __commonJSMin(((exports, module) => {
92739
- const supportsColor = require_supports_color();
92740
- const hasFlag = require_has_flag();
92741
- function parseVersion(versionString) {
92742
- if (/^\d{3,4}$/.test(versionString)) {
92743
- const m = /(\d{1,2})(\d{2})/.exec(versionString);
92744
- return {
92745
- major: 0,
92746
- minor: parseInt(m[1], 10),
92747
- patch: parseInt(m[2], 10)
92748
- };
92749
- }
92750
- const versions = (versionString || "").split(".").map((n) => parseInt(n, 10));
92751
- return {
92752
- major: versions[0],
92753
- minor: versions[1],
92754
- patch: versions[2]
92755
- };
92756
- }
92757
- function supportsHyperlink(stream) {
92758
- const { env } = process;
92759
- if ("FORCE_HYPERLINK" in env) return !(env.FORCE_HYPERLINK.length > 0 && parseInt(env.FORCE_HYPERLINK, 10) === 0);
92760
- if (hasFlag("no-hyperlink") || hasFlag("no-hyperlinks") || hasFlag("hyperlink=false") || hasFlag("hyperlink=never")) return false;
92761
- if (hasFlag("hyperlink=true") || hasFlag("hyperlink=always")) return true;
92762
- if ("NETLIFY" in env) return true;
92763
- if (!supportsColor.supportsColor(stream)) return false;
92764
- if (stream && !stream.isTTY) return false;
92765
- if (process.platform === "win32") return false;
92766
- if ("CI" in env) return false;
92767
- if ("TEAMCITY_VERSION" in env) return false;
92768
- if ("TERM_PROGRAM" in env) {
92769
- const version = parseVersion(env.TERM_PROGRAM_VERSION);
92770
- switch (env.TERM_PROGRAM) {
92771
- case "iTerm.app":
92772
- if (version.major === 3) return version.minor >= 1;
92773
- return version.major > 3;
92774
- case "WezTerm": return version.major >= 20200620;
92775
- case "vscode": return version.major > 1 || version.major === 1 && version.minor >= 72;
92776
- }
92777
- }
92778
- if ("VTE_VERSION" in env) {
92779
- if (env.VTE_VERSION === "0.50.0") return false;
92780
- const version = parseVersion(env.VTE_VERSION);
92781
- return version.major > 0 || version.minor >= 50;
92782
- }
92783
- return false;
92784
- }
92785
- module.exports = {
92786
- supportsHyperlink,
92787
- stdout: supportsHyperlink(process.stdout),
92788
- stderr: supportsHyperlink(process.stderr)
92789
- };
92790
- }));
92791
- //#endregion
92792
- //#region ../../node_modules/terminal-link/index.js
92793
- var require_terminal_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
92794
- const ansiEscapes = require_ansi_escapes();
92795
- const supportsHyperlinks = require_supports_hyperlinks();
92796
- const terminalLink = (text, url, { target = "stdout", ...options } = {}) => {
92797
- if (!supportsHyperlinks[target]) {
92798
- if (options.fallback === false) return text;
92799
- return typeof options.fallback === "function" ? options.fallback(text, url) : `${text} (\u200B${url}\u200B)`;
92800
- }
92801
- return ansiEscapes.link(text, url);
92802
- };
92803
- module.exports = (text, url, options = {}) => terminalLink(text, url, options);
92804
- module.exports.stderr = (text, url, options = {}) => terminalLink(text, url, {
92805
- target: "stderr",
92806
- ...options
92807
- });
92808
- module.exports.isSupported = supportsHyperlinks.stdout;
92809
- module.exports.stderr.isSupported = supportsHyperlinks.stderr;
92810
- }));
92811
- //#endregion
92812
92644
  //#region ../../node_modules/undici/lib/core/symbols.js
92813
92645
  var require_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
92814
92646
  module.exports = {
@@ -114434,20 +114266,15 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
114434
114266
  return mod && mod.__esModule ? mod : { "default": mod };
114435
114267
  };
114436
114268
  Object.defineProperty(exports, "__esModule", { value: true });
114437
- exports.isFile = exports.getGitHubEventPayload = exports.execute = exports.maskString = exports.formatBytes = exports.timedExecAsync = exports.filterAndFormatGithubRemote = exports.filterSensitiveInfoFromRepository = exports.performSubCommand = exports.pluralize = exports.normalizeRef = exports.recursivelyRemoveUndefinedValues = exports.removeUndefinedValues = exports.removeEmptyValues = exports.buildPath = exports.getApiHostForSite = exports.getProxyAgent = exports.getRequestBuilder = exports.getProxyUrl = exports.resolveConfigFromFile = exports.resolveConfigFromFileAndEnvironment = exports.getConfig = exports.pick = exports.makeTerminalLink = exports.DEFAULT_CONFIG_PATHS = void 0;
114269
+ exports.isFile = exports.getGitHubEventPayload = exports.execute = exports.maskString = exports.formatBytes = exports.timedExecAsync = exports.filterAndFormatGithubRemote = exports.filterSensitiveInfoFromRepository = exports.performSubCommand = exports.pluralize = exports.normalizeRef = exports.recursivelyRemoveUndefinedValues = exports.removeUndefinedValues = exports.removeEmptyValues = exports.buildPath = exports.getApiHostForSite = exports.getProxyAgent = exports.getRequestBuilder = exports.getProxyUrl = exports.resolveConfigFromFile = exports.resolveConfigFromFileAndEnvironment = exports.getConfig = exports.pick = exports.DEFAULT_CONFIG_PATHS = void 0;
114438
114270
  const child_process_1$1 = require("child_process");
114439
114271
  const fs_1$5 = require("fs");
114440
114272
  const util_1 = require("util");
114441
114273
  const clipanion_1 = require_advanced();
114442
114274
  const deep_extend_1 = __importDefault(require_deep_extend());
114443
114275
  const proxy_agent_1 = require_dist$3();
114444
- const terminal_link_1 = __importDefault(require_terminal_link());
114445
114276
  const request_1 = require_request();
114446
114277
  exports.DEFAULT_CONFIG_PATHS = ["datadog-ci.json"];
114447
- const makeTerminalLink = (url) => {
114448
- return ((strings) => (0, terminal_link_1.default)(strings[0], url));
114449
- };
114450
- exports.makeTerminalLink = makeTerminalLink;
114451
114278
  const pick = (base, keys) => {
114452
114279
  const definedKeys = keys.filter((key) => !!base[key]);
114453
114280
  const pickedObject = {};
@@ -114846,6 +114673,7 @@ var require_instrument = /* @__PURE__ */ __commonJSMin(((exports) => {
114846
114673
  description: `The amount of memory (in GiB) to allocate to the sidecar container. Defaults to '${exports.DEFAULT_SIDECAR_MEMORY}'.`,
114847
114674
  validator: (0, typanion_1.isNumber)()
114848
114675
  });
114676
+ this.sidecarImage = clipanion_1.Option.String("--sidecar-image", constants_1.SIDECAR_IMAGE, { description: `Override to pin a specific version tag or to use a mirrored image from a custom registry (e.g., ACR) to avoid pull rate limits. Defaults to '${constants_1.SIDECAR_IMAGE}'` });
114849
114677
  this.sourceCodeIntegration = clipanion_1.Option.Boolean("--source-code-integration,--sourceCodeIntegration", true, { description: "Whether to enable the Datadog Source Code integration. This tags your service(s) with the Git repository and the latest commit hash of the local directory. Specify `--no-source-code-integration` to disable." });
114850
114678
  this.uploadGitMetadata = clipanion_1.Option.Boolean("--upload-git-metadata,--uploadGitMetadata", true, { description: "Whether to enable Git metadata uploading, as a part of the source code integration. Git metadata uploading is only required if you don't have the Datadog GitHub integration installed. Specify `--no-upload-git-metadata` to disable." });
114851
114679
  this.extraTags = clipanion_1.Option.String("--extra-tags,--extraTags", { description: "Additional tags to add to the app in the format \"key1:value1,key2:value2\"." });
@@ -114861,6 +114689,7 @@ var require_instrument = /* @__PURE__ */ __commonJSMin(((exports) => {
114861
114689
  logsPath: this.logsPath,
114862
114690
  sidecarCpu: this.sidecarCpu,
114863
114691
  sidecarMemory: this.sidecarMemory,
114692
+ sidecarImage: this.sidecarImage,
114864
114693
  sourceCodeIntegration: this.sourceCodeIntegration,
114865
114694
  uploadGitMetadata: this.uploadGitMetadata,
114866
114695
  extraTags: this.extraTags
@@ -114931,6 +114760,66 @@ var require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {
114931
114760
  exports.InvalidConfigurationError = InvalidConfigurationError;
114932
114761
  }));
114933
114762
  //#endregion
114763
+ //#region ../base/dist/helpers/request/datadog-route.js
114764
+ var require_datadog_route = /* @__PURE__ */ __commonJSMin(((exports) => {
114765
+ Object.defineProperty(exports, "__esModule", { value: true });
114766
+ exports.datadogRoute = exports.DATADOG_ROUTE_PATHS = void 0;
114767
+ /**
114768
+ * List of all Datadog API routes used by datadog-ci.
114769
+ *
114770
+ * Only those routes are accepted by {@link datadogRoute}.
114771
+ */
114772
+ exports.DATADOG_ROUTE_PATHS = [
114773
+ "/api/intake/ci/custom_spans",
114774
+ "/api/ui/support/serverless/flare",
114775
+ "/api/unstable/deployments/gates/evaluation",
114776
+ "/api/unstable/deployments/gates/evaluation/:evaluationId",
114777
+ "/api/v1/validate",
114778
+ "/api/v2/ci/deployments/correlate-image",
114779
+ "/api/v2/ci/deployments/correlate",
114780
+ "/api/v2/ci/pipeline/metrics",
114781
+ "/api/v2/ci/pipeline/tags",
114782
+ "/api/v2/cicodescan",
114783
+ "/api/v2/cicovreprt",
114784
+ "/api/v2/ciiac",
114785
+ "/api/v2/cireport",
114786
+ "/api/v2/dora/deployment",
114787
+ "/api/v2/git/repository/packfile",
114788
+ "/api/v2/git/repository/search_commits",
114789
+ "/api/v2/quality-gates/evaluate",
114790
+ "/api/v2/srcmap",
114791
+ "/api/v2/static-analysis-sca/dependencies",
114792
+ "/synthetics/ci/batch/:batchId",
114793
+ "/synthetics/ci/tunnel",
114794
+ "/synthetics/mobile/applications/:applicationId/multipart-presigned-urls",
114795
+ "/synthetics/mobile/applications/:applicationId/multipart-upload-complete",
114796
+ "/synthetics/mobile/applications/validation-job-status/:jobId",
114797
+ "/synthetics/settings",
114798
+ "/synthetics/tests/:testId",
114799
+ "/synthetics/tests/:testId/version_history/:version?only_check_existence=true",
114800
+ "/synthetics/tests/:testType/:testId",
114801
+ "/synthetics/tests/poll_results",
114802
+ "/synthetics/tests/search",
114803
+ "/synthetics/tests/trigger/ci",
114804
+ "/v1/input"
114805
+ ];
114806
+ /**
114807
+ * Format a Datadog API route with optional parameters.
114808
+ *
114809
+ * @example
114810
+ * ```ts
114811
+ * const route = datadogRoute('/api/v2/resources/:resourceId', {
114812
+ * resourceId: '123',
114813
+ * })
114814
+ * ```
114815
+ */
114816
+ const datadogRoute = (route, ...[params]) => {
114817
+ if (!params) return route;
114818
+ return route.replace(/:([A-Za-z0-9_]+)/g, (_, key) => encodeURIComponent(String(params[key])));
114819
+ };
114820
+ exports.datadogRoute = datadogRoute;
114821
+ }));
114822
+ //#endregion
114934
114823
  //#region ../base/dist/helpers/apikey.js
114935
114824
  var require_apikey = /* @__PURE__ */ __commonJSMin(((exports) => {
114936
114825
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
@@ -114968,6 +114857,7 @@ var require_apikey = /* @__PURE__ */ __commonJSMin(((exports) => {
114968
114857
  const chalk_1 = __importDefault(require_source$1());
114969
114858
  const errors_1 = require_errors();
114970
114859
  const request_1 = require_request();
114860
+ const datadog_route_1 = require_datadog_route();
114971
114861
  const newApiKeyValidator = (params) => new ApiKeyValidatorImplem(params.apiKey, params.datadogSite, params.metricsLogger);
114972
114862
  exports.newApiKeyValidator = newApiKeyValidator;
114973
114863
  /** ApiKeyValidator is an helper class to interpret Datadog error responses and possibly check the
@@ -115004,7 +114894,8 @@ var require_apikey = /* @__PURE__ */ __commonJSMin(((exports) => {
115004
114894
  return (yield (0, request_1.httpRequest)({
115005
114895
  headers: { "DD-API-KEY": this.apiKey },
115006
114896
  method: "GET",
115007
- url: this.getApiKeyValidationURL()
114897
+ baseURL: `https://api.${this.datadogSite}`,
114898
+ url: (0, datadog_route_1.datadogRoute)("/api/v1/validate")
115008
114899
  })).data.valid;
115009
114900
  } catch (error) {
115010
114901
  if ((0, request_1.isRequestError)(error) && error.response && error.response.status === 403) return false;
@@ -115012,9 +114903,6 @@ var require_apikey = /* @__PURE__ */ __commonJSMin(((exports) => {
115012
114903
  }
115013
114904
  });
115014
114905
  }
115015
- getApiKeyValidationURL() {
115016
- return `https://api.${this.datadogSite}/api/v1/validate`;
115017
- }
115018
114906
  isApiKeyValid() {
115019
114907
  return __awaiter(this, void 0, void 0, function* () {
115020
114908
  if (this.isValid === void 0) this.isValid = yield this.validateApiKey();
@@ -123389,6 +123277,3453 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
123389
123277
  });
123390
123278
  }));
123391
123279
  //#endregion
123280
+ //#region ../../node_modules/glob/dist/commonjs/index.min.js
123281
+ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
123282
+ var R = (n, t) => () => (t || n((t = { exports: {} }).exports, t), t.exports);
123283
+ var Ge = R((Y) => {
123284
+ "use strict";
123285
+ Object.defineProperty(Y, "__esModule", { value: !0 });
123286
+ Y.range = Y.balanced = void 0;
123287
+ var Gs = (n, t, e) => {
123288
+ let s = n instanceof RegExp ? Ie(n, e) : n, i = t instanceof RegExp ? Ie(t, e) : t, r = s !== null && i != null && (0, Y.range)(s, i, e);
123289
+ return r && {
123290
+ start: r[0],
123291
+ end: r[1],
123292
+ pre: e.slice(0, r[0]),
123293
+ body: e.slice(r[0] + s.length, r[1]),
123294
+ post: e.slice(r[1] + i.length)
123295
+ };
123296
+ };
123297
+ Y.balanced = Gs;
123298
+ var Ie = (n, t) => {
123299
+ let e = t.match(n);
123300
+ return e ? e[0] : null;
123301
+ }, zs = (n, t, e) => {
123302
+ let s, i, r, h, o, a = e.indexOf(n), l = e.indexOf(t, a + 1), f = a;
123303
+ if (a >= 0 && l > 0) {
123304
+ if (n === t) return [a, l];
123305
+ for (s = [], r = e.length; f >= 0 && !o;) {
123306
+ if (f === a) s.push(f), a = e.indexOf(n, f + 1);
123307
+ else if (s.length === 1) {
123308
+ let c = s.pop();
123309
+ c !== void 0 && (o = [c, l]);
123310
+ } else i = s.pop(), i !== void 0 && i < r && (r = i, h = l), l = e.indexOf(t, f + 1);
123311
+ f = a < l && a >= 0 ? a : l;
123312
+ }
123313
+ s.length && h !== void 0 && (o = [r, h]);
123314
+ }
123315
+ return o;
123316
+ };
123317
+ Y.range = zs;
123318
+ });
123319
+ var Ke = R((it) => {
123320
+ "use strict";
123321
+ Object.defineProperty(it, "__esModule", { value: !0 });
123322
+ it.EXPANSION_MAX = void 0;
123323
+ it.expand = ei;
123324
+ var ze = Ge(), Ue = "\0SLASH" + Math.random() + "\0", $e = "\0OPEN" + Math.random() + "\0", ue = "\0CLOSE" + Math.random() + "\0", qe = "\0COMMA" + Math.random() + "\0", He = "\0PERIOD" + Math.random() + "\0", Us = new RegExp(Ue, "g"), $s = new RegExp($e, "g"), qs = new RegExp(ue, "g"), Hs = new RegExp(qe, "g"), Vs = new RegExp(He, "g"), Ks = /\\\\/g, Xs = /\\{/g, Ys = /\\}/g, Js = /\\,/g, Zs = /\\./g;
123325
+ it.EXPANSION_MAX = 1e5;
123326
+ function ce(n) {
123327
+ return isNaN(n) ? n.charCodeAt(0) : parseInt(n, 10);
123328
+ }
123329
+ function Qs(n) {
123330
+ return n.replace(Ks, Ue).replace(Xs, $e).replace(Ys, ue).replace(Js, qe).replace(Zs, He);
123331
+ }
123332
+ function ti(n) {
123333
+ return n.replace(Us, "\\").replace($s, "{").replace(qs, "}").replace(Hs, ",").replace(Vs, ".");
123334
+ }
123335
+ function Ve(n) {
123336
+ if (!n) return [""];
123337
+ let t = [], e = (0, ze.balanced)("{", "}", n);
123338
+ if (!e) return n.split(",");
123339
+ let { pre: s, body: i, post: r } = e, h = s.split(",");
123340
+ h[h.length - 1] += "{" + i + "}";
123341
+ let o = Ve(r);
123342
+ return r.length && (h[h.length - 1] += o.shift(), h.push.apply(h, o)), t.push.apply(t, h), t;
123343
+ }
123344
+ function ei(n, t = {}) {
123345
+ if (!n) return [];
123346
+ let { max: e = it.EXPANSION_MAX } = t;
123347
+ return n.slice(0, 2) === "{}" && (n = "\\{\\}" + n.slice(2)), ht(Qs(n), e, !0).map(ti);
123348
+ }
123349
+ function si(n) {
123350
+ return "{" + n + "}";
123351
+ }
123352
+ function ii(n) {
123353
+ return /^-?0\d/.test(n);
123354
+ }
123355
+ function ri(n, t) {
123356
+ return n <= t;
123357
+ }
123358
+ function ni(n, t) {
123359
+ return n >= t;
123360
+ }
123361
+ function ht(n, t, e) {
123362
+ let s = [], i = (0, ze.balanced)("{", "}", n);
123363
+ if (!i) return [n];
123364
+ let r = i.pre, h = i.post.length ? ht(i.post, t, !1) : [""];
123365
+ if (/\$$/.test(i.pre)) for (let o = 0; o < h.length && o < t; o++) {
123366
+ let a = r + "{" + i.body + "}" + h[o];
123367
+ s.push(a);
123368
+ }
123369
+ else {
123370
+ let o = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body), a = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body), l = o || a, f = i.body.indexOf(",") >= 0;
123371
+ if (!l && !f) return i.post.match(/,(?!,).*\}/) ? (n = i.pre + "{" + i.body + ue + i.post, ht(n, t, !0)) : [n];
123372
+ let c;
123373
+ if (l) c = i.body.split(/\.\./);
123374
+ else if (c = Ve(i.body), c.length === 1 && c[0] !== void 0 && (c = ht(c[0], t, !1).map(si), c.length === 1)) return h.map((u) => i.pre + c[0] + u);
123375
+ let d;
123376
+ if (l && c[0] !== void 0 && c[1] !== void 0) {
123377
+ let u = ce(c[0]), m = ce(c[1]), p = Math.max(c[0].length, c[1].length), b = c.length === 3 && c[2] !== void 0 ? Math.abs(ce(c[2])) : 1, w = ri;
123378
+ m < u && (b *= -1, w = ni);
123379
+ let E = c.some(ii);
123380
+ d = [];
123381
+ for (let y = u; w(y, m); y += b) {
123382
+ let S;
123383
+ if (a) S = String.fromCharCode(y), S === "\\" && (S = "");
123384
+ else if (S = String(y), E) {
123385
+ let B = p - S.length;
123386
+ if (B > 0) {
123387
+ let U = new Array(B + 1).join("0");
123388
+ y < 0 ? S = "-" + U + S.slice(1) : S = U + S;
123389
+ }
123390
+ }
123391
+ d.push(S);
123392
+ }
123393
+ } else {
123394
+ d = [];
123395
+ for (let u = 0; u < c.length; u++) d.push.apply(d, ht(c[u], t, !1));
123396
+ }
123397
+ for (let u = 0; u < d.length; u++) for (let m = 0; m < h.length && s.length < t; m++) {
123398
+ let p = r + d[u] + h[m];
123399
+ (!e || l || p) && s.push(p);
123400
+ }
123401
+ }
123402
+ return s;
123403
+ }
123404
+ });
123405
+ var Xe = R((Ct) => {
123406
+ "use strict";
123407
+ Object.defineProperty(Ct, "__esModule", { value: !0 });
123408
+ Ct.assertValidPattern = void 0;
123409
+ var hi = 1024 * 64, oi = (n) => {
123410
+ if (typeof n != "string") throw new TypeError("invalid pattern");
123411
+ if (n.length > hi) throw new TypeError("pattern is too long");
123412
+ };
123413
+ Ct.assertValidPattern = oi;
123414
+ });
123415
+ var Je = R((Rt) => {
123416
+ "use strict";
123417
+ Object.defineProperty(Rt, "__esModule", { value: !0 });
123418
+ Rt.parseClass = void 0;
123419
+ var ai = {
123420
+ "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
123421
+ "[:alpha:]": ["\\p{L}\\p{Nl}", !0],
123422
+ "[:ascii:]": ["\\x00-\\x7f", !1],
123423
+ "[:blank:]": ["\\p{Zs}\\t", !0],
123424
+ "[:cntrl:]": ["\\p{Cc}", !0],
123425
+ "[:digit:]": ["\\p{Nd}", !0],
123426
+ "[:graph:]": [
123427
+ "\\p{Z}\\p{C}",
123428
+ !0,
123429
+ !0
123430
+ ],
123431
+ "[:lower:]": ["\\p{Ll}", !0],
123432
+ "[:print:]": ["\\p{C}", !0],
123433
+ "[:punct:]": ["\\p{P}", !0],
123434
+ "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", !0],
123435
+ "[:upper:]": ["\\p{Lu}", !0],
123436
+ "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
123437
+ "[:xdigit:]": ["A-Fa-f0-9", !1]
123438
+ }, ot = (n) => n.replace(/[[\]\\-]/g, "\\$&"), li = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), Ye = (n) => n.join(""), ci = (n, t) => {
123439
+ let e = t;
123440
+ if (n.charAt(e) !== "[") throw new Error("not in a brace expression");
123441
+ let s = [], i = [], r = e + 1, h = !1, o = !1, a = !1, l = !1, f = e, c = "";
123442
+ t: for (; r < n.length;) {
123443
+ let p = n.charAt(r);
123444
+ if ((p === "!" || p === "^") && r === e + 1) {
123445
+ l = !0, r++;
123446
+ continue;
123447
+ }
123448
+ if (p === "]" && h && !a) {
123449
+ f = r + 1;
123450
+ break;
123451
+ }
123452
+ if (h = !0, p === "\\" && !a) {
123453
+ a = !0, r++;
123454
+ continue;
123455
+ }
123456
+ if (p === "[" && !a) {
123457
+ for (let [b, [w, v, E]] of Object.entries(ai)) if (n.startsWith(b, r)) {
123458
+ if (c) return [
123459
+ "$.",
123460
+ !1,
123461
+ n.length - e,
123462
+ !0
123463
+ ];
123464
+ r += b.length, E ? i.push(w) : s.push(w), o = o || v;
123465
+ continue t;
123466
+ }
123467
+ }
123468
+ if (a = !1, c) {
123469
+ p > c ? s.push(ot(c) + "-" + ot(p)) : p === c && s.push(ot(p)), c = "", r++;
123470
+ continue;
123471
+ }
123472
+ if (n.startsWith("-]", r + 1)) {
123473
+ s.push(ot(p + "-")), r += 2;
123474
+ continue;
123475
+ }
123476
+ if (n.startsWith("-", r + 1)) {
123477
+ c = p, r += 2;
123478
+ continue;
123479
+ }
123480
+ s.push(ot(p)), r++;
123481
+ }
123482
+ if (f < r) return [
123483
+ "",
123484
+ !1,
123485
+ 0,
123486
+ !1
123487
+ ];
123488
+ if (!s.length && !i.length) return [
123489
+ "$.",
123490
+ !1,
123491
+ n.length - e,
123492
+ !0
123493
+ ];
123494
+ if (i.length === 0 && s.length === 1 && /^\\?.$/.test(s[0]) && !l) return [
123495
+ li(s[0].length === 2 ? s[0].slice(-1) : s[0]),
123496
+ !1,
123497
+ f - e,
123498
+ !1
123499
+ ];
123500
+ let d = "[" + (l ? "^" : "") + Ye(s) + "]", u = "[" + (l ? "" : "^") + Ye(i) + "]";
123501
+ return [
123502
+ s.length && i.length ? "(" + d + "|" + u + ")" : s.length ? d : u,
123503
+ o,
123504
+ f - e,
123505
+ !0
123506
+ ];
123507
+ };
123508
+ Rt.parseClass = ci;
123509
+ });
123510
+ var kt = R((At) => {
123511
+ "use strict";
123512
+ Object.defineProperty(At, "__esModule", { value: !0 });
123513
+ At.unescape = void 0;
123514
+ var ui = (n, { windowsPathsNoEscape: t = !1, magicalBraces: e = !0 } = {}) => e ? t ? n.replace(/\[([^\/\\])\]/g, "$1") : n.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1") : t ? n.replace(/\[([^\/\\{}])\]/g, "$1") : n.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
123515
+ At.unescape = ui;
123516
+ });
123517
+ var pe = R((Dt) => {
123518
+ "use strict";
123519
+ Object.defineProperty(Dt, "__esModule", { value: !0 });
123520
+ Dt.AST = void 0;
123521
+ var fi = Je(), Mt = kt(), di = new Set([
123522
+ "!",
123523
+ "?",
123524
+ "+",
123525
+ "*",
123526
+ "@"
123527
+ ]), Ze = (n) => di.has(n), pi = "(?!(?:^|/)\\.\\.?(?:$|/))", Pt = "(?!\\.)", mi = new Set(["[", "."]), gi = new Set(["..", "."]), wi = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), bi = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), de = "[^/]", Qe = de + "*?", ts = de + "+?";
123528
+ Dt.AST = class n {
123529
+ type;
123530
+ #t;
123531
+ #s;
123532
+ #n = !1;
123533
+ #r = [];
123534
+ #h;
123535
+ #S;
123536
+ #w;
123537
+ #c = !1;
123538
+ #o;
123539
+ #f;
123540
+ #u = !1;
123541
+ constructor(t, e, s = {}) {
123542
+ this.type = t, t && (this.#s = !0), this.#h = e, this.#t = this.#h ? this.#h.#t : this, this.#o = this.#t === this ? s : this.#t.#o, this.#w = this.#t === this ? [] : this.#t.#w, t === "!" && !this.#t.#c && this.#w.push(this), this.#S = this.#h ? this.#h.#r.length : 0;
123543
+ }
123544
+ get hasMagic() {
123545
+ if (this.#s !== void 0) return this.#s;
123546
+ for (let t of this.#r) if (typeof t != "string" && (t.type || t.hasMagic)) return this.#s = !0;
123547
+ return this.#s;
123548
+ }
123549
+ toString() {
123550
+ return this.#f !== void 0 ? this.#f : this.type ? this.#f = this.type + "(" + this.#r.map((t) => String(t)).join("|") + ")" : this.#f = this.#r.map((t) => String(t)).join("");
123551
+ }
123552
+ #a() {
123553
+ if (this !== this.#t) throw new Error("should only call on root");
123554
+ if (this.#c) return this;
123555
+ this.toString(), this.#c = !0;
123556
+ let t;
123557
+ for (; t = this.#w.pop();) {
123558
+ if (t.type !== "!") continue;
123559
+ let e = t, s = e.#h;
123560
+ for (; s;) {
123561
+ for (let i = e.#S + 1; !s.type && i < s.#r.length; i++) for (let r of t.#r) {
123562
+ if (typeof r == "string") throw new Error("string part in extglob AST??");
123563
+ r.copyIn(s.#r[i]);
123564
+ }
123565
+ e = s, s = e.#h;
123566
+ }
123567
+ }
123568
+ return this;
123569
+ }
123570
+ push(...t) {
123571
+ for (let e of t) if (e !== "") {
123572
+ if (typeof e != "string" && !(e instanceof n && e.#h === this)) throw new Error("invalid part: " + e);
123573
+ this.#r.push(e);
123574
+ }
123575
+ }
123576
+ toJSON() {
123577
+ let t = this.type === null ? this.#r.slice().map((e) => typeof e == "string" ? e : e.toJSON()) : [this.type, ...this.#r.map((e) => e.toJSON())];
123578
+ return this.isStart() && !this.type && t.unshift([]), this.isEnd() && (this === this.#t || this.#t.#c && this.#h?.type === "!") && t.push({}), t;
123579
+ }
123580
+ isStart() {
123581
+ if (this.#t === this) return !0;
123582
+ if (!this.#h?.isStart()) return !1;
123583
+ if (this.#S === 0) return !0;
123584
+ let t = this.#h;
123585
+ for (let e = 0; e < this.#S; e++) {
123586
+ let s = t.#r[e];
123587
+ if (!(s instanceof n && s.type === "!")) return !1;
123588
+ }
123589
+ return !0;
123590
+ }
123591
+ isEnd() {
123592
+ if (this.#t === this || this.#h?.type === "!") return !0;
123593
+ if (!this.#h?.isEnd()) return !1;
123594
+ if (!this.type) return this.#h?.isEnd();
123595
+ let t = this.#h ? this.#h.#r.length : 0;
123596
+ return this.#S === t - 1;
123597
+ }
123598
+ copyIn(t) {
123599
+ typeof t == "string" ? this.push(t) : this.push(t.clone(this));
123600
+ }
123601
+ clone(t) {
123602
+ let e = new n(this.type, t);
123603
+ for (let s of this.#r) e.copyIn(s);
123604
+ return e;
123605
+ }
123606
+ static #i(t, e, s, i) {
123607
+ let r = !1, h = !1, o = -1, a = !1;
123608
+ if (e.type === null) {
123609
+ let u = s, m = "";
123610
+ for (; u < t.length;) {
123611
+ let p = t.charAt(u++);
123612
+ if (r || p === "\\") {
123613
+ r = !r, m += p;
123614
+ continue;
123615
+ }
123616
+ if (h) {
123617
+ u === o + 1 ? (p === "^" || p === "!") && (a = !0) : p === "]" && !(u === o + 2 && a) && (h = !1), m += p;
123618
+ continue;
123619
+ } else if (p === "[") {
123620
+ h = !0, o = u, a = !1, m += p;
123621
+ continue;
123622
+ }
123623
+ if (!i.noext && Ze(p) && t.charAt(u) === "(") {
123624
+ e.push(m), m = "";
123625
+ let b = new n(p, e);
123626
+ u = n.#i(t, b, u, i), e.push(b);
123627
+ continue;
123628
+ }
123629
+ m += p;
123630
+ }
123631
+ return e.push(m), u;
123632
+ }
123633
+ let l = s + 1, f = new n(null, e), c = [], d = "";
123634
+ for (; l < t.length;) {
123635
+ let u = t.charAt(l++);
123636
+ if (r || u === "\\") {
123637
+ r = !r, d += u;
123638
+ continue;
123639
+ }
123640
+ if (h) {
123641
+ l === o + 1 ? (u === "^" || u === "!") && (a = !0) : u === "]" && !(l === o + 2 && a) && (h = !1), d += u;
123642
+ continue;
123643
+ } else if (u === "[") {
123644
+ h = !0, o = l, a = !1, d += u;
123645
+ continue;
123646
+ }
123647
+ if (Ze(u) && t.charAt(l) === "(") {
123648
+ f.push(d), d = "";
123649
+ let m = new n(u, f);
123650
+ f.push(m), l = n.#i(t, m, l, i);
123651
+ continue;
123652
+ }
123653
+ if (u === "|") {
123654
+ f.push(d), d = "", c.push(f), f = new n(null, e);
123655
+ continue;
123656
+ }
123657
+ if (u === ")") return d === "" && e.#r.length === 0 && (e.#u = !0), f.push(d), d = "", e.push(...c, f), l;
123658
+ d += u;
123659
+ }
123660
+ return e.type = null, e.#s = void 0, e.#r = [t.substring(s - 1)], l;
123661
+ }
123662
+ static fromGlob(t, e = {}) {
123663
+ let s = new n(null, void 0, e);
123664
+ return n.#i(t, s, 0, e), s;
123665
+ }
123666
+ toMMPattern() {
123667
+ if (this !== this.#t) return this.#t.toMMPattern();
123668
+ let t = this.toString(), [e, s, i, r] = this.toRegExpSource();
123669
+ if (!(i || this.#s || this.#o.nocase && !this.#o.nocaseMagicOnly && t.toUpperCase() !== t.toLowerCase())) return s;
123670
+ let o = (this.#o.nocase ? "i" : "") + (r ? "u" : "");
123671
+ return Object.assign(new RegExp(`^${e}$`, o), {
123672
+ _src: e,
123673
+ _glob: t
123674
+ });
123675
+ }
123676
+ get options() {
123677
+ return this.#o;
123678
+ }
123679
+ toRegExpSource(t) {
123680
+ let e = t ?? !!this.#o.dot;
123681
+ if (this.#t === this && this.#a(), !this.type) {
123682
+ let a = this.isStart() && this.isEnd() && !this.#r.some((u) => typeof u != "string"), l = this.#r.map((u) => {
123683
+ let [m, p, b, w] = typeof u == "string" ? n.#v(u, this.#s, a) : u.toRegExpSource(t);
123684
+ return this.#s = this.#s || b, this.#n = this.#n || w, m;
123685
+ }).join(""), f = "";
123686
+ if (this.isStart() && typeof this.#r[0] == "string" && !(this.#r.length === 1 && gi.has(this.#r[0]))) {
123687
+ let m = mi, p = e && m.has(l.charAt(0)) || l.startsWith("\\.") && m.has(l.charAt(2)) || l.startsWith("\\.\\.") && m.has(l.charAt(4)), b = !e && !t && m.has(l.charAt(0));
123688
+ f = p ? pi : b ? Pt : "";
123689
+ }
123690
+ let c = "";
123691
+ return this.isEnd() && this.#t.#c && this.#h?.type === "!" && (c = "(?:$|\\/)"), [
123692
+ f + l + c,
123693
+ (0, Mt.unescape)(l),
123694
+ this.#s = !!this.#s,
123695
+ this.#n
123696
+ ];
123697
+ }
123698
+ let s = this.type === "*" || this.type === "+", i = this.type === "!" ? "(?:(?!(?:" : "(?:", r = this.#d(e);
123699
+ if (this.isStart() && this.isEnd() && !r && this.type !== "!") {
123700
+ let a = this.toString();
123701
+ return this.#r = [a], this.type = null, this.#s = void 0, [
123702
+ a,
123703
+ (0, Mt.unescape)(this.toString()),
123704
+ !1,
123705
+ !1
123706
+ ];
123707
+ }
123708
+ let h = !s || t || e || !Pt ? "" : this.#d(!0);
123709
+ h === r && (h = ""), h && (r = `(?:${r})(?:${h})*?`);
123710
+ let o = "";
123711
+ if (this.type === "!" && this.#u) o = (this.isStart() && !e ? Pt : "") + ts;
123712
+ else {
123713
+ let a = this.type === "!" ? "))" + (this.isStart() && !e && !t ? Pt : "") + Qe + ")" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && h ? ")" : this.type === "*" && h ? ")?" : `)${this.type}`;
123714
+ o = i + r + a;
123715
+ }
123716
+ return [
123717
+ o,
123718
+ (0, Mt.unescape)(r),
123719
+ this.#s = !!this.#s,
123720
+ this.#n
123721
+ ];
123722
+ }
123723
+ #d(t) {
123724
+ return this.#r.map((e) => {
123725
+ if (typeof e == "string") throw new Error("string type in extglob ast??");
123726
+ let [s, i, r, h] = e.toRegExpSource(t);
123727
+ return this.#n = this.#n || h, s;
123728
+ }).filter((e) => !(this.isStart() && this.isEnd()) || !!e).join("|");
123729
+ }
123730
+ static #v(t, e, s = !1) {
123731
+ let i = !1, r = "", h = !1, o = !1;
123732
+ for (let a = 0; a < t.length; a++) {
123733
+ let l = t.charAt(a);
123734
+ if (i) {
123735
+ i = !1, r += (wi.has(l) ? "\\" : "") + l;
123736
+ continue;
123737
+ }
123738
+ if (l === "*") {
123739
+ if (o) continue;
123740
+ o = !0, r += s && /^[*]+$/.test(t) ? ts : Qe, e = !0;
123741
+ continue;
123742
+ } else o = !1;
123743
+ if (l === "\\") {
123744
+ a === t.length - 1 ? r += "\\\\" : i = !0;
123745
+ continue;
123746
+ }
123747
+ if (l === "[") {
123748
+ let [f, c, d, u] = (0, fi.parseClass)(t, a);
123749
+ if (d) {
123750
+ r += f, h = h || c, a += d - 1, e = e || u;
123751
+ continue;
123752
+ }
123753
+ }
123754
+ if (l === "?") {
123755
+ r += de, e = !0;
123756
+ continue;
123757
+ }
123758
+ r += bi(l);
123759
+ }
123760
+ return [
123761
+ r,
123762
+ (0, Mt.unescape)(t),
123763
+ !!e,
123764
+ h
123765
+ ];
123766
+ }
123767
+ };
123768
+ });
123769
+ var me = R((Ft) => {
123770
+ "use strict";
123771
+ Object.defineProperty(Ft, "__esModule", { value: !0 });
123772
+ Ft.escape = void 0;
123773
+ var yi = (n, { windowsPathsNoEscape: t = !1, magicalBraces: e = !1 } = {}) => e ? t ? n.replace(/[?*()[\]{}]/g, "[$&]") : n.replace(/[?*()[\]\\{}]/g, "\\$&") : t ? n.replace(/[?*()[\]]/g, "[$&]") : n.replace(/[?*()[\]\\]/g, "\\$&");
123774
+ Ft.escape = yi;
123775
+ });
123776
+ var H = R((g) => {
123777
+ "use strict";
123778
+ Object.defineProperty(g, "__esModule", { value: !0 });
123779
+ g.unescape = g.escape = g.AST = g.Minimatch = g.match = g.makeRe = g.braceExpand = g.defaults = g.filter = g.GLOBSTAR = g.sep = g.minimatch = void 0;
123780
+ var Si = Ke(), jt = Xe(), is = pe(), vi = me(), Ei = kt(), _i = (n, t, e = {}) => ((0, jt.assertValidPattern)(t), !e.nocomment && t.charAt(0) === "#" ? !1 : new J(t, e).match(n));
123781
+ g.minimatch = _i;
123782
+ var Oi = /^\*+([^+@!?\*\[\(]*)$/, xi = (n) => (t) => !t.startsWith(".") && t.endsWith(n), Ti = (n) => (t) => t.endsWith(n), Ci = (n) => (n = n.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(n)), Ri = (n) => (n = n.toLowerCase(), (t) => t.toLowerCase().endsWith(n)), Ai = /^\*+\.\*+$/, ki = (n) => !n.startsWith(".") && n.includes("."), Mi = (n) => n !== "." && n !== ".." && n.includes("."), Pi = /^\.\*+$/, Di = (n) => n !== "." && n !== ".." && n.startsWith("."), Fi = /^\*+$/, ji = (n) => n.length !== 0 && !n.startsWith("."), Ni = (n) => n.length !== 0 && n !== "." && n !== "..", Li = /^\?+([^+@!?\*\[\(]*)?$/, Wi = ([n, t = ""]) => {
123783
+ let e = rs([n]);
123784
+ return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
123785
+ }, Bi = ([n, t = ""]) => {
123786
+ let e = ns([n]);
123787
+ return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
123788
+ }, Ii = ([n, t = ""]) => {
123789
+ let e = ns([n]);
123790
+ return t ? (s) => e(s) && s.endsWith(t) : e;
123791
+ }, Gi = ([n, t = ""]) => {
123792
+ let e = rs([n]);
123793
+ return t ? (s) => e(s) && s.endsWith(t) : e;
123794
+ }, rs = ([n]) => {
123795
+ let t = n.length;
123796
+ return (e) => e.length === t && !e.startsWith(".");
123797
+ }, ns = ([n]) => {
123798
+ let t = n.length;
123799
+ return (e) => e.length === t && e !== "." && e !== "..";
123800
+ }, hs = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix", es = {
123801
+ win32: { sep: "\\" },
123802
+ posix: { sep: "/" }
123803
+ };
123804
+ g.sep = hs === "win32" ? es.win32.sep : es.posix.sep;
123805
+ g.minimatch.sep = g.sep;
123806
+ g.GLOBSTAR = Symbol("globstar **");
123807
+ g.minimatch.GLOBSTAR = g.GLOBSTAR;
123808
+ var Ui = "[^/]*?", $i = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", qi = "(?:(?!(?:\\/|^)\\.).)*?", Hi = (n, t = {}) => (e) => (0, g.minimatch)(e, n, t);
123809
+ g.filter = Hi;
123810
+ g.minimatch.filter = g.filter;
123811
+ var F = (n, t = {}) => Object.assign({}, n, t), Vi = (n) => {
123812
+ if (!n || typeof n != "object" || !Object.keys(n).length) return g.minimatch;
123813
+ let t = g.minimatch;
123814
+ return Object.assign((s, i, r = {}) => t(s, i, F(n, r)), {
123815
+ Minimatch: class extends t.Minimatch {
123816
+ constructor(i, r = {}) {
123817
+ super(i, F(n, r));
123818
+ }
123819
+ static defaults(i) {
123820
+ return t.defaults(F(n, i)).Minimatch;
123821
+ }
123822
+ },
123823
+ AST: class extends t.AST {
123824
+ constructor(i, r, h = {}) {
123825
+ super(i, r, F(n, h));
123826
+ }
123827
+ static fromGlob(i, r = {}) {
123828
+ return t.AST.fromGlob(i, F(n, r));
123829
+ }
123830
+ },
123831
+ unescape: (s, i = {}) => t.unescape(s, F(n, i)),
123832
+ escape: (s, i = {}) => t.escape(s, F(n, i)),
123833
+ filter: (s, i = {}) => t.filter(s, F(n, i)),
123834
+ defaults: (s) => t.defaults(F(n, s)),
123835
+ makeRe: (s, i = {}) => t.makeRe(s, F(n, i)),
123836
+ braceExpand: (s, i = {}) => t.braceExpand(s, F(n, i)),
123837
+ match: (s, i, r = {}) => t.match(s, i, F(n, r)),
123838
+ sep: t.sep,
123839
+ GLOBSTAR: g.GLOBSTAR
123840
+ });
123841
+ };
123842
+ g.defaults = Vi;
123843
+ g.minimatch.defaults = g.defaults;
123844
+ var Ki = (n, t = {}) => ((0, jt.assertValidPattern)(n), t.nobrace || !/\{(?:(?!\{).)*\}/.test(n) ? [n] : (0, Si.expand)(n, { max: t.braceExpandMax }));
123845
+ g.braceExpand = Ki;
123846
+ g.minimatch.braceExpand = g.braceExpand;
123847
+ var Xi = (n, t = {}) => new J(n, t).makeRe();
123848
+ g.makeRe = Xi;
123849
+ g.minimatch.makeRe = g.makeRe;
123850
+ var Yi = (n, t, e = {}) => {
123851
+ let s = new J(t, e);
123852
+ return n = n.filter((i) => s.match(i)), s.options.nonull && !n.length && n.push(t), n;
123853
+ };
123854
+ g.match = Yi;
123855
+ g.minimatch.match = g.match;
123856
+ var ss = /[?*]|[+@!]\(.*?\)|\[|\]/, Ji = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), J = class {
123857
+ options;
123858
+ set;
123859
+ pattern;
123860
+ windowsPathsNoEscape;
123861
+ nonegate;
123862
+ negate;
123863
+ comment;
123864
+ empty;
123865
+ preserveMultipleSlashes;
123866
+ partial;
123867
+ globSet;
123868
+ globParts;
123869
+ nocase;
123870
+ isWindows;
123871
+ platform;
123872
+ windowsNoMagicRoot;
123873
+ regexp;
123874
+ constructor(t, e = {}) {
123875
+ (0, jt.assertValidPattern)(t), e = e || {}, this.options = e, this.pattern = t, this.platform = e.platform || hs, this.isWindows = this.platform === "win32";
123876
+ this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || e["allowWindowsEscape"] === !1, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, "/")), this.preserveMultipleSlashes = !!e.preserveMultipleSlashes, this.regexp = null, this.negate = !1, this.nonegate = !!e.nonegate, this.comment = !1, this.empty = !1, this.partial = !!e.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = e.windowsNoMagicRoot !== void 0 ? e.windowsNoMagicRoot : !!(this.isWindows && this.nocase), this.globSet = [], this.globParts = [], this.set = [], this.make();
123877
+ }
123878
+ hasMagic() {
123879
+ if (this.options.magicalBraces && this.set.length > 1) return !0;
123880
+ for (let t of this.set) for (let e of t) if (typeof e != "string") return !0;
123881
+ return !1;
123882
+ }
123883
+ debug(...t) {}
123884
+ make() {
123885
+ let t = this.pattern, e = this.options;
123886
+ if (!e.nocomment && t.charAt(0) === "#") {
123887
+ this.comment = !0;
123888
+ return;
123889
+ }
123890
+ if (!t) {
123891
+ this.empty = !0;
123892
+ return;
123893
+ }
123894
+ this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], e.debug && (this.debug = (...r) => console.error(...r)), this.debug(this.pattern, this.globSet);
123895
+ let s = this.globSet.map((r) => this.slashSplit(r));
123896
+ this.globParts = this.preprocess(s), this.debug(this.pattern, this.globParts);
123897
+ let i = this.globParts.map((r, h, o) => {
123898
+ if (this.isWindows && this.windowsNoMagicRoot) {
123899
+ let a = r[0] === "" && r[1] === "" && (r[2] === "?" || !ss.test(r[2])) && !ss.test(r[3]), l = /^[a-z]:/i.test(r[0]);
123900
+ if (a) return [...r.slice(0, 4), ...r.slice(4).map((f) => this.parse(f))];
123901
+ if (l) return [r[0], ...r.slice(1).map((f) => this.parse(f))];
123902
+ }
123903
+ return r.map((a) => this.parse(a));
123904
+ });
123905
+ if (this.debug(this.pattern, i), this.set = i.filter((r) => r.indexOf(!1) === -1), this.isWindows) for (let r = 0; r < this.set.length; r++) {
123906
+ let h = this.set[r];
123907
+ h[0] === "" && h[1] === "" && this.globParts[r][2] === "?" && typeof h[3] == "string" && /^[a-z]:$/i.test(h[3]) && (h[2] = "?");
123908
+ }
123909
+ this.debug(this.pattern, this.set);
123910
+ }
123911
+ preprocess(t) {
123912
+ if (this.options.noglobstar) for (let s = 0; s < t.length; s++) for (let i = 0; i < t[s].length; i++) t[s][i] === "**" && (t[s][i] = "*");
123913
+ let { optimizationLevel: e = 1 } = this.options;
123914
+ return e >= 2 ? (t = this.firstPhasePreProcess(t), t = this.secondPhasePreProcess(t)) : e >= 1 ? t = this.levelOneOptimize(t) : t = this.adjascentGlobstarOptimize(t), t;
123915
+ }
123916
+ adjascentGlobstarOptimize(t) {
123917
+ return t.map((e) => {
123918
+ let s = -1;
123919
+ for (; (s = e.indexOf("**", s + 1)) !== -1;) {
123920
+ let i = s;
123921
+ for (; e[i + 1] === "**";) i++;
123922
+ i !== s && e.splice(s, i - s);
123923
+ }
123924
+ return e;
123925
+ });
123926
+ }
123927
+ levelOneOptimize(t) {
123928
+ return t.map((e) => (e = e.reduce((s, i) => {
123929
+ let r = s[s.length - 1];
123930
+ return i === "**" && r === "**" ? s : i === ".." && r && r !== ".." && r !== "." && r !== "**" ? (s.pop(), s) : (s.push(i), s);
123931
+ }, []), e.length === 0 ? [""] : e));
123932
+ }
123933
+ levelTwoFileOptimize(t) {
123934
+ Array.isArray(t) || (t = this.slashSplit(t));
123935
+ let e = !1;
123936
+ do {
123937
+ if (e = !1, !this.preserveMultipleSlashes) {
123938
+ for (let i = 1; i < t.length - 1; i++) {
123939
+ let r = t[i];
123940
+ i === 1 && r === "" && t[0] === "" || (r === "." || r === "") && (e = !0, t.splice(i, 1), i--);
123941
+ }
123942
+ t[0] === "." && t.length === 2 && (t[1] === "." || t[1] === "") && (e = !0, t.pop());
123943
+ }
123944
+ let s = 0;
123945
+ for (; (s = t.indexOf("..", s + 1)) !== -1;) {
123946
+ let i = t[s - 1];
123947
+ i && i !== "." && i !== ".." && i !== "**" && (e = !0, t.splice(s - 1, 2), s -= 2);
123948
+ }
123949
+ } while (e);
123950
+ return t.length === 0 ? [""] : t;
123951
+ }
123952
+ firstPhasePreProcess(t) {
123953
+ let e = !1;
123954
+ do {
123955
+ e = !1;
123956
+ for (let s of t) {
123957
+ let i = -1;
123958
+ for (; (i = s.indexOf("**", i + 1)) !== -1;) {
123959
+ let h = i;
123960
+ for (; s[h + 1] === "**";) h++;
123961
+ h > i && s.splice(i + 1, h - i);
123962
+ let o = s[i + 1], a = s[i + 2], l = s[i + 3];
123963
+ if (o !== ".." || !a || a === "." || a === ".." || !l || l === "." || l === "..") continue;
123964
+ e = !0, s.splice(i, 1);
123965
+ let f = s.slice(0);
123966
+ f[i] = "**", t.push(f), i--;
123967
+ }
123968
+ if (!this.preserveMultipleSlashes) {
123969
+ for (let h = 1; h < s.length - 1; h++) {
123970
+ let o = s[h];
123971
+ h === 1 && o === "" && s[0] === "" || (o === "." || o === "") && (e = !0, s.splice(h, 1), h--);
123972
+ }
123973
+ s[0] === "." && s.length === 2 && (s[1] === "." || s[1] === "") && (e = !0, s.pop());
123974
+ }
123975
+ let r = 0;
123976
+ for (; (r = s.indexOf("..", r + 1)) !== -1;) {
123977
+ let h = s[r - 1];
123978
+ if (h && h !== "." && h !== ".." && h !== "**") {
123979
+ e = !0;
123980
+ let a = r === 1 && s[r + 1] === "**" ? ["."] : [];
123981
+ s.splice(r - 1, 2, ...a), s.length === 0 && s.push(""), r -= 2;
123982
+ }
123983
+ }
123984
+ }
123985
+ } while (e);
123986
+ return t;
123987
+ }
123988
+ secondPhasePreProcess(t) {
123989
+ for (let e = 0; e < t.length - 1; e++) for (let s = e + 1; s < t.length; s++) {
123990
+ let i = this.partsMatch(t[e], t[s], !this.preserveMultipleSlashes);
123991
+ if (i) {
123992
+ t[e] = [], t[s] = i;
123993
+ break;
123994
+ }
123995
+ }
123996
+ return t.filter((e) => e.length);
123997
+ }
123998
+ partsMatch(t, e, s = !1) {
123999
+ let i = 0, r = 0, h = [], o = "";
124000
+ for (; i < t.length && r < e.length;) if (t[i] === e[r]) h.push(o === "b" ? e[r] : t[i]), i++, r++;
124001
+ else if (s && t[i] === "**" && e[r] === t[i + 1]) h.push(t[i]), i++;
124002
+ else if (s && e[r] === "**" && t[i] === e[r + 1]) h.push(e[r]), r++;
124003
+ else if (t[i] === "*" && e[r] && (this.options.dot || !e[r].startsWith(".")) && e[r] !== "**") {
124004
+ if (o === "b") return !1;
124005
+ o = "a", h.push(t[i]), i++, r++;
124006
+ } else if (e[r] === "*" && t[i] && (this.options.dot || !t[i].startsWith(".")) && t[i] !== "**") {
124007
+ if (o === "a") return !1;
124008
+ o = "b", h.push(e[r]), i++, r++;
124009
+ } else return !1;
124010
+ return t.length === e.length && h;
124011
+ }
124012
+ parseNegate() {
124013
+ if (this.nonegate) return;
124014
+ let t = this.pattern, e = !1, s = 0;
124015
+ for (let i = 0; i < t.length && t.charAt(i) === "!"; i++) e = !e, s++;
124016
+ s && (this.pattern = t.slice(s)), this.negate = e;
124017
+ }
124018
+ matchOne(t, e, s = !1) {
124019
+ let i = this.options;
124020
+ if (this.isWindows) {
124021
+ let p = typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]), b = !p && t[0] === "" && t[1] === "" && t[2] === "?" && /^[a-z]:$/i.test(t[3]), w = typeof e[0] == "string" && /^[a-z]:$/i.test(e[0]), v = !w && e[0] === "" && e[1] === "" && e[2] === "?" && typeof e[3] == "string" && /^[a-z]:$/i.test(e[3]), E = b ? 3 : p ? 0 : void 0, y = v ? 3 : w ? 0 : void 0;
124022
+ if (typeof E == "number" && typeof y == "number") {
124023
+ let [S, B] = [t[E], e[y]];
124024
+ S.toLowerCase() === B.toLowerCase() && (e[y] = S, y > E ? e = e.slice(y) : E > y && (t = t.slice(E)));
124025
+ }
124026
+ }
124027
+ let { optimizationLevel: r = 1 } = this.options;
124028
+ r >= 2 && (t = this.levelTwoFileOptimize(t)), this.debug("matchOne", this, {
124029
+ file: t,
124030
+ pattern: e
124031
+ }), this.debug("matchOne", t.length, e.length);
124032
+ for (var h = 0, o = 0, a = t.length, l = e.length; h < a && o < l; h++, o++) {
124033
+ this.debug("matchOne loop");
124034
+ var f = e[o], c = t[h];
124035
+ if (this.debug(e, f, c), f === !1) return !1;
124036
+ if (f === g.GLOBSTAR) {
124037
+ this.debug("GLOBSTAR", [
124038
+ e,
124039
+ f,
124040
+ c
124041
+ ]);
124042
+ var d = h, u = o + 1;
124043
+ if (u === l) {
124044
+ for (this.debug("** at the end"); h < a; h++) if (t[h] === "." || t[h] === ".." || !i.dot && t[h].charAt(0) === ".") return !1;
124045
+ return !0;
124046
+ }
124047
+ for (; d < a;) {
124048
+ var m = t[d];
124049
+ if (this.debug(`
124050
+ globstar while`, t, d, e, u, m), this.matchOne(t.slice(d), e.slice(u), s)) return this.debug("globstar found match!", d, a, m), !0;
124051
+ if (m === "." || m === ".." || !i.dot && m.charAt(0) === ".") {
124052
+ this.debug("dot detected!", t, d, e, u);
124053
+ break;
124054
+ }
124055
+ this.debug("globstar swallow a segment, and continue"), d++;
124056
+ }
124057
+ return !!(s && (this.debug(`
124058
+ >>> no match, partial?`, t, d, e, u), d === a));
124059
+ }
124060
+ let p;
124061
+ if (typeof f == "string" ? (p = c === f, this.debug("string match", f, c, p)) : (p = f.test(c), this.debug("pattern match", f, c, p)), !p) return !1;
124062
+ }
124063
+ if (h === a && o === l) return !0;
124064
+ if (h === a) return s;
124065
+ if (o === l) return h === a - 1 && t[h] === "";
124066
+ throw new Error("wtf?");
124067
+ }
124068
+ braceExpand() {
124069
+ return (0, g.braceExpand)(this.pattern, this.options);
124070
+ }
124071
+ parse(t) {
124072
+ (0, jt.assertValidPattern)(t);
124073
+ let e = this.options;
124074
+ if (t === "**") return g.GLOBSTAR;
124075
+ if (t === "") return "";
124076
+ let s, i = null;
124077
+ (s = t.match(Fi)) ? i = e.dot ? Ni : ji : (s = t.match(Oi)) ? i = (e.nocase ? e.dot ? Ri : Ci : e.dot ? Ti : xi)(s[1]) : (s = t.match(Li)) ? i = (e.nocase ? e.dot ? Bi : Wi : e.dot ? Ii : Gi)(s) : (s = t.match(Ai)) ? i = e.dot ? Mi : ki : (s = t.match(Pi)) && (i = Di);
124078
+ let r = is.AST.fromGlob(t, this.options).toMMPattern();
124079
+ return i && typeof r == "object" && Reflect.defineProperty(r, "test", { value: i }), r;
124080
+ }
124081
+ makeRe() {
124082
+ if (this.regexp || this.regexp === !1) return this.regexp;
124083
+ let t = this.set;
124084
+ if (!t.length) return this.regexp = !1, this.regexp;
124085
+ let e = this.options, s = e.noglobstar ? Ui : e.dot ? $i : qi, i = new Set(e.nocase ? ["i"] : []), r = t.map((a) => {
124086
+ let l = a.map((c) => {
124087
+ if (c instanceof RegExp) for (let d of c.flags.split("")) i.add(d);
124088
+ return typeof c == "string" ? Ji(c) : c === g.GLOBSTAR ? g.GLOBSTAR : c._src;
124089
+ });
124090
+ l.forEach((c, d) => {
124091
+ let u = l[d + 1], m = l[d - 1];
124092
+ c !== g.GLOBSTAR || m === g.GLOBSTAR || (m === void 0 ? u !== void 0 && u !== g.GLOBSTAR ? l[d + 1] = "(?:\\/|" + s + "\\/)?" + u : l[d] = s : u === void 0 ? l[d - 1] = m + "(?:\\/|\\/" + s + ")?" : u !== g.GLOBSTAR && (l[d - 1] = m + "(?:\\/|\\/" + s + "\\/)" + u, l[d + 1] = g.GLOBSTAR));
124093
+ });
124094
+ let f = l.filter((c) => c !== g.GLOBSTAR);
124095
+ if (this.partial && f.length >= 1) {
124096
+ let c = [];
124097
+ for (let d = 1; d <= f.length; d++) c.push(f.slice(0, d).join("/"));
124098
+ return "(?:" + c.join("|") + ")";
124099
+ }
124100
+ return f.join("/");
124101
+ }).join("|"), [h, o] = t.length > 1 ? ["(?:", ")"] : ["", ""];
124102
+ r = "^" + h + r + o + "$", this.partial && (r = "^(?:\\/|" + h + r.slice(1, -1) + o + ")$"), this.negate && (r = "^(?!" + r + ").+$");
124103
+ try {
124104
+ this.regexp = new RegExp(r, [...i].join(""));
124105
+ } catch {
124106
+ this.regexp = !1;
124107
+ }
124108
+ return this.regexp;
124109
+ }
124110
+ slashSplit(t) {
124111
+ return this.preserveMultipleSlashes ? t.split("/") : this.isWindows && /^\/\/[^\/]+/.test(t) ? ["", ...t.split(/\/+/)] : t.split(/\/+/);
124112
+ }
124113
+ match(t, e = this.partial) {
124114
+ if (this.debug("match", t, this.pattern), this.comment) return !1;
124115
+ if (this.empty) return t === "";
124116
+ if (t === "/" && e) return !0;
124117
+ let s = this.options;
124118
+ this.isWindows && (t = t.split("\\").join("/"));
124119
+ let i = this.slashSplit(t);
124120
+ this.debug(this.pattern, "split", i);
124121
+ let r = this.set;
124122
+ this.debug(this.pattern, "set", r);
124123
+ let h = i[i.length - 1];
124124
+ if (!h) for (let o = i.length - 2; !h && o >= 0; o--) h = i[o];
124125
+ for (let o = 0; o < r.length; o++) {
124126
+ let a = r[o], l = i;
124127
+ if (s.matchBase && a.length === 1 && (l = [h]), this.matchOne(l, a, e)) return s.flipNegate ? !0 : !this.negate;
124128
+ }
124129
+ return s.flipNegate ? !1 : this.negate;
124130
+ }
124131
+ static defaults(t) {
124132
+ return g.minimatch.defaults(t).Minimatch;
124133
+ }
124134
+ };
124135
+ g.Minimatch = J;
124136
+ var Zi = pe();
124137
+ Object.defineProperty(g, "AST", {
124138
+ enumerable: !0,
124139
+ get: function() {
124140
+ return Zi.AST;
124141
+ }
124142
+ });
124143
+ var Qi = me();
124144
+ Object.defineProperty(g, "escape", {
124145
+ enumerable: !0,
124146
+ get: function() {
124147
+ return Qi.escape;
124148
+ }
124149
+ });
124150
+ var tr = kt();
124151
+ Object.defineProperty(g, "unescape", {
124152
+ enumerable: !0,
124153
+ get: function() {
124154
+ return tr.unescape;
124155
+ }
124156
+ });
124157
+ g.minimatch.AST = is.AST;
124158
+ g.minimatch.Minimatch = J;
124159
+ g.minimatch.escape = vi.escape;
124160
+ g.minimatch.unescape = Ei.unescape;
124161
+ });
124162
+ var fs = R((Wt) => {
124163
+ "use strict";
124164
+ Object.defineProperty(Wt, "__esModule", { value: !0 });
124165
+ Wt.LRUCache = void 0;
124166
+ var er = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, as = /* @__PURE__ */ new Set(), ge = typeof process == "object" && process ? process : {}, ls = (n, t, e, s) => {
124167
+ typeof ge.emitWarning == "function" ? ge.emitWarning(n, t, e, s) : console.error(`[${e}] ${t}: ${n}`);
124168
+ }, Lt = globalThis.AbortController, os = globalThis.AbortSignal;
124169
+ if (typeof Lt > "u") {
124170
+ os = class {
124171
+ onabort;
124172
+ _onabort = [];
124173
+ reason;
124174
+ aborted = !1;
124175
+ addEventListener(e, s) {
124176
+ this._onabort.push(s);
124177
+ }
124178
+ }, Lt = class {
124179
+ constructor() {
124180
+ t();
124181
+ }
124182
+ signal = new os();
124183
+ abort(e) {
124184
+ if (!this.signal.aborted) {
124185
+ this.signal.reason = e, this.signal.aborted = !0;
124186
+ for (let s of this.signal._onabort) s(e);
124187
+ this.signal.onabort?.(e);
124188
+ }
124189
+ }
124190
+ };
124191
+ let n = ge.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t = () => {
124192
+ n && (n = !1, ls("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", t));
124193
+ };
124194
+ }
124195
+ var sr = (n) => !as.has(n), V = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n), cs = (n) => V(n) ? n <= Math.pow(2, 8) ? Uint8Array : n <= Math.pow(2, 16) ? Uint16Array : n <= Math.pow(2, 32) ? Uint32Array : n <= Number.MAX_SAFE_INTEGER ? Nt : null : null, Nt = class extends Array {
124196
+ constructor(n) {
124197
+ super(n), this.fill(0);
124198
+ }
124199
+ }, ir = class at {
124200
+ heap;
124201
+ length;
124202
+ static #t = !1;
124203
+ static create(t) {
124204
+ let e = cs(t);
124205
+ if (!e) return [];
124206
+ at.#t = !0;
124207
+ let s = new at(t, e);
124208
+ return at.#t = !1, s;
124209
+ }
124210
+ constructor(t, e) {
124211
+ if (!at.#t) throw new TypeError("instantiate Stack using Stack.create(n)");
124212
+ this.heap = new e(t), this.length = 0;
124213
+ }
124214
+ push(t) {
124215
+ this.heap[this.length++] = t;
124216
+ }
124217
+ pop() {
124218
+ return this.heap[--this.length];
124219
+ }
124220
+ };
124221
+ Wt.LRUCache = class us {
124222
+ #t;
124223
+ #s;
124224
+ #n;
124225
+ #r;
124226
+ #h;
124227
+ #S;
124228
+ #w;
124229
+ #c;
124230
+ get perf() {
124231
+ return this.#c;
124232
+ }
124233
+ ttl;
124234
+ ttlResolution;
124235
+ ttlAutopurge;
124236
+ updateAgeOnGet;
124237
+ updateAgeOnHas;
124238
+ allowStale;
124239
+ noDisposeOnSet;
124240
+ noUpdateTTL;
124241
+ maxEntrySize;
124242
+ sizeCalculation;
124243
+ noDeleteOnFetchRejection;
124244
+ noDeleteOnStaleGet;
124245
+ allowStaleOnFetchAbort;
124246
+ allowStaleOnFetchRejection;
124247
+ ignoreFetchAbort;
124248
+ #o;
124249
+ #f;
124250
+ #u;
124251
+ #a;
124252
+ #i;
124253
+ #d;
124254
+ #v;
124255
+ #y;
124256
+ #p;
124257
+ #R;
124258
+ #m;
124259
+ #O;
124260
+ #x;
124261
+ #g;
124262
+ #b;
124263
+ #E;
124264
+ #T;
124265
+ #e;
124266
+ #F;
124267
+ static unsafeExposeInternals(t) {
124268
+ return {
124269
+ starts: t.#x,
124270
+ ttls: t.#g,
124271
+ autopurgeTimers: t.#b,
124272
+ sizes: t.#O,
124273
+ keyMap: t.#u,
124274
+ keyList: t.#a,
124275
+ valList: t.#i,
124276
+ next: t.#d,
124277
+ prev: t.#v,
124278
+ get head() {
124279
+ return t.#y;
124280
+ },
124281
+ get tail() {
124282
+ return t.#p;
124283
+ },
124284
+ free: t.#R,
124285
+ isBackgroundFetch: (e) => t.#l(e),
124286
+ backgroundFetch: (e, s, i, r) => t.#z(e, s, i, r),
124287
+ moveToTail: (e) => t.#N(e),
124288
+ indexes: (e) => t.#k(e),
124289
+ rindexes: (e) => t.#M(e),
124290
+ isStale: (e) => t.#_(e)
124291
+ };
124292
+ }
124293
+ get max() {
124294
+ return this.#t;
124295
+ }
124296
+ get maxSize() {
124297
+ return this.#s;
124298
+ }
124299
+ get calculatedSize() {
124300
+ return this.#f;
124301
+ }
124302
+ get size() {
124303
+ return this.#o;
124304
+ }
124305
+ get fetchMethod() {
124306
+ return this.#S;
124307
+ }
124308
+ get memoMethod() {
124309
+ return this.#w;
124310
+ }
124311
+ get dispose() {
124312
+ return this.#n;
124313
+ }
124314
+ get onInsert() {
124315
+ return this.#r;
124316
+ }
124317
+ get disposeAfter() {
124318
+ return this.#h;
124319
+ }
124320
+ constructor(t) {
124321
+ let { max: e = 0, ttl: s, ttlResolution: i = 1, ttlAutopurge: r, updateAgeOnGet: h, updateAgeOnHas: o, allowStale: a, dispose: l, onInsert: f, disposeAfter: c, noDisposeOnSet: d, noUpdateTTL: u, maxSize: m = 0, maxEntrySize: p = 0, sizeCalculation: b, fetchMethod: w, memoMethod: v, noDeleteOnFetchRejection: E, noDeleteOnStaleGet: y, allowStaleOnFetchRejection: S, allowStaleOnFetchAbort: B, ignoreFetchAbort: U, perf: et } = t;
124322
+ if (et !== void 0 && typeof et?.now != "function") throw new TypeError("perf option must have a now() method if specified");
124323
+ if (this.#c = et ?? er, e !== 0 && !V(e)) throw new TypeError("max option must be a nonnegative integer");
124324
+ let st = e ? cs(e) : Array;
124325
+ if (!st) throw new Error("invalid max value: " + e);
124326
+ if (this.#t = e, this.#s = m, this.maxEntrySize = p || this.#s, this.sizeCalculation = b, this.sizeCalculation) {
124327
+ if (!this.#s && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
124328
+ if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
124329
+ }
124330
+ if (v !== void 0 && typeof v != "function") throw new TypeError("memoMethod must be a function if defined");
124331
+ if (this.#w = v, w !== void 0 && typeof w != "function") throw new TypeError("fetchMethod must be a function if specified");
124332
+ if (this.#S = w, this.#T = !!w, this.#u = /* @__PURE__ */ new Map(), this.#a = new Array(e).fill(void 0), this.#i = new Array(e).fill(void 0), this.#d = new st(e), this.#v = new st(e), this.#y = 0, this.#p = 0, this.#R = ir.create(e), this.#o = 0, this.#f = 0, typeof l == "function" && (this.#n = l), typeof f == "function" && (this.#r = f), typeof c == "function" ? (this.#h = c, this.#m = []) : (this.#h = void 0, this.#m = void 0), this.#E = !!this.#n, this.#F = !!this.#r, this.#e = !!this.#h, this.noDisposeOnSet = !!d, this.noUpdateTTL = !!u, this.noDeleteOnFetchRejection = !!E, this.allowStaleOnFetchRejection = !!S, this.allowStaleOnFetchAbort = !!B, this.ignoreFetchAbort = !!U, this.maxEntrySize !== 0) {
124333
+ if (this.#s !== 0 && !V(this.#s)) throw new TypeError("maxSize must be a positive integer if specified");
124334
+ if (!V(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
124335
+ this.#$();
124336
+ }
124337
+ if (this.allowStale = !!a, this.noDeleteOnStaleGet = !!y, this.updateAgeOnGet = !!h, this.updateAgeOnHas = !!o, this.ttlResolution = V(i) || i === 0 ? i : 1, this.ttlAutopurge = !!r, this.ttl = s || 0, this.ttl) {
124338
+ if (!V(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
124339
+ this.#P();
124340
+ }
124341
+ if (this.#t === 0 && this.ttl === 0 && this.#s === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
124342
+ if (!this.ttlAutopurge && !this.#t && !this.#s) {
124343
+ let le = "LRU_CACHE_UNBOUNDED";
124344
+ sr(le) && (as.add(le), ls("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", le, us));
124345
+ }
124346
+ }
124347
+ getRemainingTTL(t) {
124348
+ return this.#u.has(t) ? Infinity : 0;
124349
+ }
124350
+ #P() {
124351
+ let t = new Nt(this.#t), e = new Nt(this.#t);
124352
+ this.#g = t, this.#x = e;
124353
+ let s = this.ttlAutopurge ? new Array(this.#t) : void 0;
124354
+ this.#b = s, this.#W = (h, o, a = this.#c.now()) => {
124355
+ if (e[h] = o !== 0 ? a : 0, t[h] = o, s?.[h] && (clearTimeout(s[h]), s[h] = void 0), o !== 0 && s) {
124356
+ let l = setTimeout(() => {
124357
+ this.#_(h) && this.#A(this.#a[h], "expire");
124358
+ }, o + 1);
124359
+ l.unref && l.unref(), s[h] = l;
124360
+ }
124361
+ }, this.#C = (h) => {
124362
+ e[h] = t[h] !== 0 ? this.#c.now() : 0;
124363
+ }, this.#D = (h, o) => {
124364
+ if (t[o]) {
124365
+ let a = t[o], l = e[o];
124366
+ if (!a || !l) return;
124367
+ h.ttl = a, h.start = l, h.now = i || r();
124368
+ h.remainingTTL = a - (h.now - l);
124369
+ }
124370
+ };
124371
+ let i = 0, r = () => {
124372
+ let h = this.#c.now();
124373
+ if (this.ttlResolution > 0) {
124374
+ i = h;
124375
+ let o = setTimeout(() => i = 0, this.ttlResolution);
124376
+ o.unref && o.unref();
124377
+ }
124378
+ return h;
124379
+ };
124380
+ this.getRemainingTTL = (h) => {
124381
+ let o = this.#u.get(h);
124382
+ if (o === void 0) return 0;
124383
+ let a = t[o], l = e[o];
124384
+ if (!a || !l) return Infinity;
124385
+ return a - ((i || r()) - l);
124386
+ }, this.#_ = (h) => {
124387
+ let o = e[h], a = t[h];
124388
+ return !!a && !!o && (i || r()) - o > a;
124389
+ };
124390
+ }
124391
+ #C = () => {};
124392
+ #D = () => {};
124393
+ #W = () => {};
124394
+ #_ = () => !1;
124395
+ #$() {
124396
+ let t = new Nt(this.#t);
124397
+ this.#f = 0, this.#O = t, this.#L = (e) => {
124398
+ this.#f -= t[e], t[e] = 0;
124399
+ }, this.#B = (e, s, i, r) => {
124400
+ if (this.#l(s)) return 0;
124401
+ if (!V(i)) if (r) {
124402
+ if (typeof r != "function") throw new TypeError("sizeCalculation must be a function");
124403
+ if (i = r(s, e), !V(i)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
124404
+ } else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
124405
+ return i;
124406
+ }, this.#j = (e, s, i) => {
124407
+ if (t[e] = s, this.#s) {
124408
+ let r = this.#s - t[e];
124409
+ for (; this.#f > r;) this.#G(!0);
124410
+ }
124411
+ this.#f += t[e], i && (i.entrySize = s, i.totalCalculatedSize = this.#f);
124412
+ };
124413
+ }
124414
+ #L = (t) => {};
124415
+ #j = (t, e, s) => {};
124416
+ #B = (t, e, s, i) => {
124417
+ if (s || i) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
124418
+ return 0;
124419
+ };
124420
+ *#k({ allowStale: t = this.allowStale } = {}) {
124421
+ if (this.#o) for (let e = this.#p; !(!this.#I(e) || ((t || !this.#_(e)) && (yield e), e === this.#y));) e = this.#v[e];
124422
+ }
124423
+ *#M({ allowStale: t = this.allowStale } = {}) {
124424
+ if (this.#o) for (let e = this.#y; !(!this.#I(e) || ((t || !this.#_(e)) && (yield e), e === this.#p));) e = this.#d[e];
124425
+ }
124426
+ #I(t) {
124427
+ return t !== void 0 && this.#u.get(this.#a[t]) === t;
124428
+ }
124429
+ *entries() {
124430
+ for (let t of this.#k()) this.#i[t] !== void 0 && this.#a[t] !== void 0 && !this.#l(this.#i[t]) && (yield [this.#a[t], this.#i[t]]);
124431
+ }
124432
+ *rentries() {
124433
+ for (let t of this.#M()) this.#i[t] !== void 0 && this.#a[t] !== void 0 && !this.#l(this.#i[t]) && (yield [this.#a[t], this.#i[t]]);
124434
+ }
124435
+ *keys() {
124436
+ for (let t of this.#k()) {
124437
+ let e = this.#a[t];
124438
+ e !== void 0 && !this.#l(this.#i[t]) && (yield e);
124439
+ }
124440
+ }
124441
+ *rkeys() {
124442
+ for (let t of this.#M()) {
124443
+ let e = this.#a[t];
124444
+ e !== void 0 && !this.#l(this.#i[t]) && (yield e);
124445
+ }
124446
+ }
124447
+ *values() {
124448
+ for (let t of this.#k()) this.#i[t] !== void 0 && !this.#l(this.#i[t]) && (yield this.#i[t]);
124449
+ }
124450
+ *rvalues() {
124451
+ for (let t of this.#M()) this.#i[t] !== void 0 && !this.#l(this.#i[t]) && (yield this.#i[t]);
124452
+ }
124453
+ [Symbol.iterator]() {
124454
+ return this.entries();
124455
+ }
124456
+ [Symbol.toStringTag] = "LRUCache";
124457
+ find(t, e = {}) {
124458
+ for (let s of this.#k()) {
124459
+ let i = this.#i[s], r = this.#l(i) ? i.__staleWhileFetching : i;
124460
+ if (r !== void 0 && t(r, this.#a[s], this)) return this.get(this.#a[s], e);
124461
+ }
124462
+ }
124463
+ forEach(t, e = this) {
124464
+ for (let s of this.#k()) {
124465
+ let i = this.#i[s], r = this.#l(i) ? i.__staleWhileFetching : i;
124466
+ r !== void 0 && t.call(e, r, this.#a[s], this);
124467
+ }
124468
+ }
124469
+ rforEach(t, e = this) {
124470
+ for (let s of this.#M()) {
124471
+ let i = this.#i[s], r = this.#l(i) ? i.__staleWhileFetching : i;
124472
+ r !== void 0 && t.call(e, r, this.#a[s], this);
124473
+ }
124474
+ }
124475
+ purgeStale() {
124476
+ let t = !1;
124477
+ for (let e of this.#M({ allowStale: !0 })) this.#_(e) && (this.#A(this.#a[e], "expire"), t = !0);
124478
+ return t;
124479
+ }
124480
+ info(t) {
124481
+ let e = this.#u.get(t);
124482
+ if (e === void 0) return;
124483
+ let s = this.#i[e], i = this.#l(s) ? s.__staleWhileFetching : s;
124484
+ if (i === void 0) return;
124485
+ let r = { value: i };
124486
+ if (this.#g && this.#x) {
124487
+ let h = this.#g[e], o = this.#x[e];
124488
+ if (h && o) r.ttl = h - (this.#c.now() - o), r.start = Date.now();
124489
+ }
124490
+ return this.#O && (r.size = this.#O[e]), r;
124491
+ }
124492
+ dump() {
124493
+ let t = [];
124494
+ for (let e of this.#k({ allowStale: !0 })) {
124495
+ let s = this.#a[e], i = this.#i[e], r = this.#l(i) ? i.__staleWhileFetching : i;
124496
+ if (r === void 0 || s === void 0) continue;
124497
+ let h = { value: r };
124498
+ if (this.#g && this.#x) {
124499
+ h.ttl = this.#g[e];
124500
+ let o = this.#c.now() - this.#x[e];
124501
+ h.start = Math.floor(Date.now() - o);
124502
+ }
124503
+ this.#O && (h.size = this.#O[e]), t.unshift([s, h]);
124504
+ }
124505
+ return t;
124506
+ }
124507
+ load(t) {
124508
+ this.clear();
124509
+ for (let [e, s] of t) {
124510
+ if (s.start) {
124511
+ let i = Date.now() - s.start;
124512
+ s.start = this.#c.now() - i;
124513
+ }
124514
+ this.set(e, s.value, s);
124515
+ }
124516
+ }
124517
+ set(t, e, s = {}) {
124518
+ if (e === void 0) return this.delete(t), this;
124519
+ let { ttl: i = this.ttl, start: r, noDisposeOnSet: h = this.noDisposeOnSet, sizeCalculation: o = this.sizeCalculation, status: a } = s, { noUpdateTTL: l = this.noUpdateTTL } = s, f = this.#B(t, e, s.size || 0, o);
124520
+ if (this.maxEntrySize && f > this.maxEntrySize) return a && (a.set = "miss", a.maxEntrySizeExceeded = !0), this.#A(t, "set"), this;
124521
+ let c = this.#o === 0 ? void 0 : this.#u.get(t);
124522
+ if (c === void 0) c = this.#o === 0 ? this.#p : this.#R.length !== 0 ? this.#R.pop() : this.#o === this.#t ? this.#G(!1) : this.#o, this.#a[c] = t, this.#i[c] = e, this.#u.set(t, c), this.#d[this.#p] = c, this.#v[c] = this.#p, this.#p = c, this.#o++, this.#j(c, f, a), a && (a.set = "add"), l = !1, this.#F && this.#r?.(e, t, "add");
124523
+ else {
124524
+ this.#N(c);
124525
+ let d = this.#i[c];
124526
+ if (e !== d) {
124527
+ if (this.#T && this.#l(d)) {
124528
+ d.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
124529
+ let { __staleWhileFetching: u } = d;
124530
+ u !== void 0 && !h && (this.#E && this.#n?.(u, t, "set"), this.#e && this.#m?.push([
124531
+ u,
124532
+ t,
124533
+ "set"
124534
+ ]));
124535
+ } else h || (this.#E && this.#n?.(d, t, "set"), this.#e && this.#m?.push([
124536
+ d,
124537
+ t,
124538
+ "set"
124539
+ ]));
124540
+ if (this.#L(c), this.#j(c, f, a), this.#i[c] = e, a) {
124541
+ a.set = "replace";
124542
+ let u = d && this.#l(d) ? d.__staleWhileFetching : d;
124543
+ u !== void 0 && (a.oldValue = u);
124544
+ }
124545
+ } else a && (a.set = "update");
124546
+ this.#F && this.onInsert?.(e, t, e === d ? "update" : "replace");
124547
+ }
124548
+ if (i !== 0 && !this.#g && this.#P(), this.#g && (l || this.#W(c, i, r), a && this.#D(a, c)), !h && this.#e && this.#m) {
124549
+ let d = this.#m, u;
124550
+ for (; u = d?.shift();) this.#h?.(...u);
124551
+ }
124552
+ return this;
124553
+ }
124554
+ pop() {
124555
+ try {
124556
+ for (; this.#o;) {
124557
+ let t = this.#i[this.#y];
124558
+ if (this.#G(!0), this.#l(t)) {
124559
+ if (t.__staleWhileFetching) return t.__staleWhileFetching;
124560
+ } else if (t !== void 0) return t;
124561
+ }
124562
+ } finally {
124563
+ if (this.#e && this.#m) {
124564
+ let t = this.#m, e;
124565
+ for (; e = t?.shift();) this.#h?.(...e);
124566
+ }
124567
+ }
124568
+ }
124569
+ #G(t) {
124570
+ let e = this.#y, s = this.#a[e], i = this.#i[e];
124571
+ return this.#T && this.#l(i) ? i.__abortController.abort(/* @__PURE__ */ new Error("evicted")) : (this.#E || this.#e) && (this.#E && this.#n?.(i, s, "evict"), this.#e && this.#m?.push([
124572
+ i,
124573
+ s,
124574
+ "evict"
124575
+ ])), this.#L(e), this.#b?.[e] && (clearTimeout(this.#b[e]), this.#b[e] = void 0), t && (this.#a[e] = void 0, this.#i[e] = void 0, this.#R.push(e)), this.#o === 1 ? (this.#y = this.#p = 0, this.#R.length = 0) : this.#y = this.#d[e], this.#u.delete(s), this.#o--, e;
124576
+ }
124577
+ has(t, e = {}) {
124578
+ let { updateAgeOnHas: s = this.updateAgeOnHas, status: i } = e, r = this.#u.get(t);
124579
+ if (r !== void 0) {
124580
+ let h = this.#i[r];
124581
+ if (this.#l(h) && h.__staleWhileFetching === void 0) return !1;
124582
+ if (this.#_(r)) i && (i.has = "stale", this.#D(i, r));
124583
+ else return s && this.#C(r), i && (i.has = "hit", this.#D(i, r)), !0;
124584
+ } else i && (i.has = "miss");
124585
+ return !1;
124586
+ }
124587
+ peek(t, e = {}) {
124588
+ let { allowStale: s = this.allowStale } = e, i = this.#u.get(t);
124589
+ if (i === void 0 || !s && this.#_(i)) return;
124590
+ let r = this.#i[i];
124591
+ return this.#l(r) ? r.__staleWhileFetching : r;
124592
+ }
124593
+ #z(t, e, s, i) {
124594
+ let r = e === void 0 ? void 0 : this.#i[e];
124595
+ if (this.#l(r)) return r;
124596
+ let h = new Lt(), { signal: o } = s;
124597
+ o?.addEventListener("abort", () => h.abort(o.reason), { signal: h.signal });
124598
+ let a = {
124599
+ signal: h.signal,
124600
+ options: s,
124601
+ context: i
124602
+ }, l = (p, b = !1) => {
124603
+ let { aborted: w } = h.signal, v = s.ignoreFetchAbort && p !== void 0, E = s.ignoreFetchAbort || !!(s.allowStaleOnFetchAbort && p !== void 0);
124604
+ if (s.status && (w && !b ? (s.status.fetchAborted = !0, s.status.fetchError = h.signal.reason, v && (s.status.fetchAbortIgnored = !0)) : s.status.fetchResolved = !0), w && !v && !b) return c(h.signal.reason, E);
124605
+ let y = u, S = this.#i[e];
124606
+ return (S === u || v && b && S === void 0) && (p === void 0 ? y.__staleWhileFetching !== void 0 ? this.#i[e] = y.__staleWhileFetching : this.#A(t, "fetch") : (s.status && (s.status.fetchUpdated = !0), this.set(t, p, a.options))), p;
124607
+ }, f = (p) => (s.status && (s.status.fetchRejected = !0, s.status.fetchError = p), c(p, !1)), c = (p, b) => {
124608
+ let { aborted: w } = h.signal, v = w && s.allowStaleOnFetchAbort, E = v || s.allowStaleOnFetchRejection, y = E || s.noDeleteOnFetchRejection, S = u;
124609
+ if (this.#i[e] === u && (!y || !b && S.__staleWhileFetching === void 0 ? this.#A(t, "fetch") : v || (this.#i[e] = S.__staleWhileFetching)), E) return s.status && S.__staleWhileFetching !== void 0 && (s.status.returnedStale = !0), S.__staleWhileFetching;
124610
+ if (S.__returned === S) throw p;
124611
+ }, d = (p, b) => {
124612
+ let w = this.#S?.(t, r, a);
124613
+ w && w instanceof Promise && w.then((v) => p(v === void 0 ? void 0 : v), b), h.signal.addEventListener("abort", () => {
124614
+ (!s.ignoreFetchAbort || s.allowStaleOnFetchAbort) && (p(void 0), s.allowStaleOnFetchAbort && (p = (v) => l(v, !0)));
124615
+ });
124616
+ };
124617
+ s.status && (s.status.fetchDispatched = !0);
124618
+ let u = new Promise(d).then(l, f), m = Object.assign(u, {
124619
+ __abortController: h,
124620
+ __staleWhileFetching: r,
124621
+ __returned: void 0
124622
+ });
124623
+ return e === void 0 ? (this.set(t, m, {
124624
+ ...a.options,
124625
+ status: void 0
124626
+ }), e = this.#u.get(t)) : this.#i[e] = m, m;
124627
+ }
124628
+ #l(t) {
124629
+ if (!this.#T) return !1;
124630
+ let e = t;
124631
+ return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof Lt;
124632
+ }
124633
+ async fetch(t, e = {}) {
124634
+ let { allowStale: s = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, ttl: h = this.ttl, noDisposeOnSet: o = this.noDisposeOnSet, size: a = 0, sizeCalculation: l = this.sizeCalculation, noUpdateTTL: f = this.noUpdateTTL, noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: u = this.ignoreFetchAbort, allowStaleOnFetchAbort: m = this.allowStaleOnFetchAbort, context: p, forceRefresh: b = !1, status: w, signal: v } = e;
124635
+ if (!this.#T) return w && (w.fetch = "get"), this.get(t, {
124636
+ allowStale: s,
124637
+ updateAgeOnGet: i,
124638
+ noDeleteOnStaleGet: r,
124639
+ status: w
124640
+ });
124641
+ let E = {
124642
+ allowStale: s,
124643
+ updateAgeOnGet: i,
124644
+ noDeleteOnStaleGet: r,
124645
+ ttl: h,
124646
+ noDisposeOnSet: o,
124647
+ size: a,
124648
+ sizeCalculation: l,
124649
+ noUpdateTTL: f,
124650
+ noDeleteOnFetchRejection: c,
124651
+ allowStaleOnFetchRejection: d,
124652
+ allowStaleOnFetchAbort: m,
124653
+ ignoreFetchAbort: u,
124654
+ status: w,
124655
+ signal: v
124656
+ }, y = this.#u.get(t);
124657
+ if (y === void 0) {
124658
+ w && (w.fetch = "miss");
124659
+ let S = this.#z(t, y, E, p);
124660
+ return S.__returned = S;
124661
+ } else {
124662
+ let S = this.#i[y];
124663
+ if (this.#l(S)) {
124664
+ let st = s && S.__staleWhileFetching !== void 0;
124665
+ return w && (w.fetch = "inflight", st && (w.returnedStale = !0)), st ? S.__staleWhileFetching : S.__returned = S;
124666
+ }
124667
+ let B = this.#_(y);
124668
+ if (!b && !B) return w && (w.fetch = "hit"), this.#N(y), i && this.#C(y), w && this.#D(w, y), S;
124669
+ let U = this.#z(t, y, E, p), et = U.__staleWhileFetching !== void 0 && s;
124670
+ return w && (w.fetch = B ? "stale" : "refresh", et && B && (w.returnedStale = !0)), et ? U.__staleWhileFetching : U.__returned = U;
124671
+ }
124672
+ }
124673
+ async forceFetch(t, e = {}) {
124674
+ let s = await this.fetch(t, e);
124675
+ if (s === void 0) throw new Error("fetch() returned undefined");
124676
+ return s;
124677
+ }
124678
+ memo(t, e = {}) {
124679
+ let s = this.#w;
124680
+ if (!s) throw new Error("no memoMethod provided to constructor");
124681
+ let { context: i, forceRefresh: r, ...h } = e, o = this.get(t, h);
124682
+ if (!r && o !== void 0) return o;
124683
+ let a = s(t, o, {
124684
+ options: h,
124685
+ context: i
124686
+ });
124687
+ return this.set(t, a, h), a;
124688
+ }
124689
+ get(t, e = {}) {
124690
+ let { allowStale: s = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, status: h } = e, o = this.#u.get(t);
124691
+ if (o !== void 0) {
124692
+ let a = this.#i[o], l = this.#l(a);
124693
+ return h && this.#D(h, o), this.#_(o) ? (h && (h.get = "stale"), l ? (h && s && a.__staleWhileFetching !== void 0 && (h.returnedStale = !0), s ? a.__staleWhileFetching : void 0) : (r || this.#A(t, "expire"), h && s && (h.returnedStale = !0), s ? a : void 0)) : (h && (h.get = "hit"), l ? a.__staleWhileFetching : (this.#N(o), i && this.#C(o), a));
124694
+ } else h && (h.get = "miss");
124695
+ }
124696
+ #U(t, e) {
124697
+ this.#v[e] = t, this.#d[t] = e;
124698
+ }
124699
+ #N(t) {
124700
+ t !== this.#p && (t === this.#y ? this.#y = this.#d[t] : this.#U(this.#v[t], this.#d[t]), this.#U(this.#p, t), this.#p = t);
124701
+ }
124702
+ delete(t) {
124703
+ return this.#A(t, "delete");
124704
+ }
124705
+ #A(t, e) {
124706
+ let s = !1;
124707
+ if (this.#o !== 0) {
124708
+ let i = this.#u.get(t);
124709
+ if (i !== void 0) if (this.#b?.[i] && (clearTimeout(this.#b?.[i]), this.#b[i] = void 0), s = !0, this.#o === 1) this.#q(e);
124710
+ else {
124711
+ this.#L(i);
124712
+ let r = this.#i[i];
124713
+ if (this.#l(r) ? r.__abortController.abort(/* @__PURE__ */ new Error("deleted")) : (this.#E || this.#e) && (this.#E && this.#n?.(r, t, e), this.#e && this.#m?.push([
124714
+ r,
124715
+ t,
124716
+ e
124717
+ ])), this.#u.delete(t), this.#a[i] = void 0, this.#i[i] = void 0, i === this.#p) this.#p = this.#v[i];
124718
+ else if (i === this.#y) this.#y = this.#d[i];
124719
+ else {
124720
+ let h = this.#v[i];
124721
+ this.#d[h] = this.#d[i];
124722
+ let o = this.#d[i];
124723
+ this.#v[o] = this.#v[i];
124724
+ }
124725
+ this.#o--, this.#R.push(i);
124726
+ }
124727
+ }
124728
+ if (this.#e && this.#m?.length) {
124729
+ let i = this.#m, r;
124730
+ for (; r = i?.shift();) this.#h?.(...r);
124731
+ }
124732
+ return s;
124733
+ }
124734
+ clear() {
124735
+ return this.#q("delete");
124736
+ }
124737
+ #q(t) {
124738
+ for (let e of this.#M({ allowStale: !0 })) {
124739
+ let s = this.#i[e];
124740
+ if (this.#l(s)) s.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
124741
+ else {
124742
+ let i = this.#a[e];
124743
+ this.#E && this.#n?.(s, i, t), this.#e && this.#m?.push([
124744
+ s,
124745
+ i,
124746
+ t
124747
+ ]);
124748
+ }
124749
+ }
124750
+ if (this.#u.clear(), this.#i.fill(void 0), this.#a.fill(void 0), this.#g && this.#x) {
124751
+ this.#g.fill(0), this.#x.fill(0);
124752
+ for (let e of this.#b ?? []) e !== void 0 && clearTimeout(e);
124753
+ this.#b?.fill(void 0);
124754
+ }
124755
+ if (this.#O && this.#O.fill(0), this.#y = 0, this.#p = 0, this.#R.length = 0, this.#f = 0, this.#o = 0, this.#e && this.#m) {
124756
+ let e = this.#m, s;
124757
+ for (; s = e?.shift();) this.#h?.(...s);
124758
+ }
124759
+ }
124760
+ };
124761
+ });
124762
+ var Oe = R((P) => {
124763
+ "use strict";
124764
+ var nr = P && P.__importDefault || function(n) {
124765
+ return n && n.__esModule ? n : { default: n };
124766
+ };
124767
+ Object.defineProperty(P, "__esModule", { value: !0 });
124768
+ P.Minipass = P.isWritable = P.isReadable = P.isStream = void 0;
124769
+ var ds = typeof process == "object" && process ? process : {
124770
+ stdout: null,
124771
+ stderr: null
124772
+ }, _e = require("node:events"), ws = nr(require("node:stream")), hr = require("node:string_decoder"), or = (n) => !!n && typeof n == "object" && (n instanceof qt || n instanceof ws.default || (0, P.isReadable)(n) || (0, P.isWritable)(n));
124773
+ P.isStream = or;
124774
+ var ar = (n) => !!n && typeof n == "object" && n instanceof _e.EventEmitter && typeof n.pipe == "function" && n.pipe !== ws.default.Writable.prototype.pipe;
124775
+ P.isReadable = ar;
124776
+ var lr = (n) => !!n && typeof n == "object" && n instanceof _e.EventEmitter && typeof n.write == "function" && typeof n.end == "function";
124777
+ P.isWritable = lr;
124778
+ var $ = Symbol("EOF"), q = Symbol("maybeEmitEnd"), K = Symbol("emittedEnd"), Bt = Symbol("emittingEnd"), lt = Symbol("emittedError"), It = Symbol("closed"), ps = Symbol("read"), Gt = Symbol("flush"), ms = Symbol("flushChunk"), L = Symbol("encoding"), rt = Symbol("decoder"), x = Symbol("flowing"), ct = Symbol("paused"), nt = Symbol("resume"), T = Symbol("buffer"), M = Symbol("pipes"), C = Symbol("bufferLength"), we = Symbol("bufferPush"), zt = Symbol("bufferShift"), k = Symbol("objectMode"), O = Symbol("destroyed"), be = Symbol("error"), ye = Symbol("emitData"), gs = Symbol("emitEnd"), Se = Symbol("emitEnd2"), I = Symbol("async"), ve = Symbol("abort"), Ut = Symbol("aborted"), ut = Symbol("signal"), Z = Symbol("dataListeners"), D = Symbol("discarded"), ft = (n) => Promise.resolve().then(n), cr = (n) => n(), ur = (n) => n === "end" || n === "finish" || n === "prefinish", fr = (n) => n instanceof ArrayBuffer || !!n && typeof n == "object" && n.constructor && n.constructor.name === "ArrayBuffer" && n.byteLength >= 0, dr = (n) => !Buffer.isBuffer(n) && ArrayBuffer.isView(n), $t = class {
124779
+ src;
124780
+ dest;
124781
+ opts;
124782
+ ondrain;
124783
+ constructor(t, e, s) {
124784
+ this.src = t, this.dest = e, this.opts = s, this.ondrain = () => t[nt](), this.dest.on("drain", this.ondrain);
124785
+ }
124786
+ unpipe() {
124787
+ this.dest.removeListener("drain", this.ondrain);
124788
+ }
124789
+ proxyErrors(t) {}
124790
+ end() {
124791
+ this.unpipe(), this.opts.end && this.dest.end();
124792
+ }
124793
+ }, Ee = class extends $t {
124794
+ unpipe() {
124795
+ this.src.removeListener("error", this.proxyErrors), super.unpipe();
124796
+ }
124797
+ constructor(t, e, s) {
124798
+ super(t, e, s), this.proxyErrors = (i) => this.dest.emit("error", i), t.on("error", this.proxyErrors);
124799
+ }
124800
+ }, pr = (n) => !!n.objectMode, mr = (n) => !n.objectMode && !!n.encoding && n.encoding !== "buffer", qt = class extends _e.EventEmitter {
124801
+ [x] = !1;
124802
+ [ct] = !1;
124803
+ [M] = [];
124804
+ [T] = [];
124805
+ [k];
124806
+ [L];
124807
+ [I];
124808
+ [rt];
124809
+ [$] = !1;
124810
+ [K] = !1;
124811
+ [Bt] = !1;
124812
+ [It] = !1;
124813
+ [lt] = null;
124814
+ [C] = 0;
124815
+ [O] = !1;
124816
+ [ut];
124817
+ [Ut] = !1;
124818
+ [Z] = 0;
124819
+ [D] = !1;
124820
+ writable = !0;
124821
+ readable = !0;
124822
+ constructor(...t) {
124823
+ let e = t[0] || {};
124824
+ if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
124825
+ pr(e) ? (this[k] = !0, this[L] = null) : mr(e) ? (this[L] = e.encoding, this[k] = !1) : (this[k] = !1, this[L] = null), this[I] = !!e.async, this[rt] = this[L] ? new hr.StringDecoder(this[L]) : null, e && e.debugExposeBuffer === !0 && Object.defineProperty(this, "buffer", { get: () => this[T] }), e && e.debugExposePipes === !0 && Object.defineProperty(this, "pipes", { get: () => this[M] });
124826
+ let { signal: s } = e;
124827
+ s && (this[ut] = s, s.aborted ? this[ve]() : s.addEventListener("abort", () => this[ve]()));
124828
+ }
124829
+ get bufferLength() {
124830
+ return this[C];
124831
+ }
124832
+ get encoding() {
124833
+ return this[L];
124834
+ }
124835
+ set encoding(t) {
124836
+ throw new Error("Encoding must be set at instantiation time");
124837
+ }
124838
+ setEncoding(t) {
124839
+ throw new Error("Encoding must be set at instantiation time");
124840
+ }
124841
+ get objectMode() {
124842
+ return this[k];
124843
+ }
124844
+ set objectMode(t) {
124845
+ throw new Error("objectMode must be set at instantiation time");
124846
+ }
124847
+ get async() {
124848
+ return this[I];
124849
+ }
124850
+ set async(t) {
124851
+ this[I] = this[I] || !!t;
124852
+ }
124853
+ [ve]() {
124854
+ this[Ut] = !0, this.emit("abort", this[ut]?.reason), this.destroy(this[ut]?.reason);
124855
+ }
124856
+ get aborted() {
124857
+ return this[Ut];
124858
+ }
124859
+ set aborted(t) {}
124860
+ write(t, e, s) {
124861
+ if (this[Ut]) return !1;
124862
+ if (this[$]) throw new Error("write after end");
124863
+ if (this[O]) return this.emit("error", Object.assign(/* @__PURE__ */ new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), !0;
124864
+ typeof e == "function" && (s = e, e = "utf8"), e || (e = "utf8");
124865
+ let i = this[I] ? ft : cr;
124866
+ if (!this[k] && !Buffer.isBuffer(t)) {
124867
+ if (dr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
124868
+ else if (fr(t)) t = Buffer.from(t);
124869
+ else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
124870
+ }
124871
+ return this[k] ? (this[x] && this[C] !== 0 && this[Gt](!0), this[x] ? this.emit("data", t) : this[we](t), this[C] !== 0 && this.emit("readable"), s && i(s), this[x]) : t.length ? (typeof t == "string" && !(e === this[L] && !this[rt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[L] && (t = this[rt].write(t)), this[x] && this[C] !== 0 && this[Gt](!0), this[x] ? this.emit("data", t) : this[we](t), this[C] !== 0 && this.emit("readable"), s && i(s), this[x]) : (this[C] !== 0 && this.emit("readable"), s && i(s), this[x]);
124872
+ }
124873
+ read(t) {
124874
+ if (this[O]) return null;
124875
+ if (this[D] = !1, this[C] === 0 || t === 0 || t && t > this[C]) return this[q](), null;
124876
+ this[k] && (t = null), this[T].length > 1 && !this[k] && (this[T] = [this[L] ? this[T].join("") : Buffer.concat(this[T], this[C])]);
124877
+ let e = this[ps](t || null, this[T][0]);
124878
+ return this[q](), e;
124879
+ }
124880
+ [ps](t, e) {
124881
+ if (this[k]) this[zt]();
124882
+ else {
124883
+ let s = e;
124884
+ t === s.length || t === null ? this[zt]() : typeof s == "string" ? (this[T][0] = s.slice(t), e = s.slice(0, t), this[C] -= t) : (this[T][0] = s.subarray(t), e = s.subarray(0, t), this[C] -= t);
124885
+ }
124886
+ return this.emit("data", e), !this[T].length && !this[$] && this.emit("drain"), e;
124887
+ }
124888
+ end(t, e, s) {
124889
+ return typeof t == "function" && (s = t, t = void 0), typeof e == "function" && (s = e, e = "utf8"), t !== void 0 && this.write(t, e), s && this.once("end", s), this[$] = !0, this.writable = !1, (this[x] || !this[ct]) && this[q](), this;
124890
+ }
124891
+ [nt]() {
124892
+ this[O] || (!this[Z] && !this[M].length && (this[D] = !0), this[ct] = !1, this[x] = !0, this.emit("resume"), this[T].length ? this[Gt]() : this[$] ? this[q]() : this.emit("drain"));
124893
+ }
124894
+ resume() {
124895
+ return this[nt]();
124896
+ }
124897
+ pause() {
124898
+ this[x] = !1, this[ct] = !0, this[D] = !1;
124899
+ }
124900
+ get destroyed() {
124901
+ return this[O];
124902
+ }
124903
+ get flowing() {
124904
+ return this[x];
124905
+ }
124906
+ get paused() {
124907
+ return this[ct];
124908
+ }
124909
+ [we](t) {
124910
+ this[k] ? this[C] += 1 : this[C] += t.length, this[T].push(t);
124911
+ }
124912
+ [zt]() {
124913
+ return this[k] ? this[C] -= 1 : this[C] -= this[T][0].length, this[T].shift();
124914
+ }
124915
+ [Gt](t = !1) {
124916
+ do ;
124917
+ while (this[ms](this[zt]()) && this[T].length);
124918
+ !t && !this[T].length && !this[$] && this.emit("drain");
124919
+ }
124920
+ [ms](t) {
124921
+ return this.emit("data", t), this[x];
124922
+ }
124923
+ pipe(t, e) {
124924
+ if (this[O]) return t;
124925
+ this[D] = !1;
124926
+ let s = this[K];
124927
+ return e = e || {}, t === ds.stdout || t === ds.stderr ? e.end = !1 : e.end = e.end !== !1, e.proxyErrors = !!e.proxyErrors, s ? e.end && t.end() : (this[M].push(e.proxyErrors ? new Ee(this, t, e) : new $t(this, t, e)), this[I] ? ft(() => this[nt]()) : this[nt]()), t;
124928
+ }
124929
+ unpipe(t) {
124930
+ let e = this[M].find((s) => s.dest === t);
124931
+ e && (this[M].length === 1 ? (this[x] && this[Z] === 0 && (this[x] = !1), this[M] = []) : this[M].splice(this[M].indexOf(e), 1), e.unpipe());
124932
+ }
124933
+ addListener(t, e) {
124934
+ return this.on(t, e);
124935
+ }
124936
+ on(t, e) {
124937
+ let s = super.on(t, e);
124938
+ if (t === "data") this[D] = !1, this[Z]++, !this[M].length && !this[x] && this[nt]();
124939
+ else if (t === "readable" && this[C] !== 0) super.emit("readable");
124940
+ else if (ur(t) && this[K]) super.emit(t), this.removeAllListeners(t);
124941
+ else if (t === "error" && this[lt]) {
124942
+ let i = e;
124943
+ this[I] ? ft(() => i.call(this, this[lt])) : i.call(this, this[lt]);
124944
+ }
124945
+ return s;
124946
+ }
124947
+ removeListener(t, e) {
124948
+ return this.off(t, e);
124949
+ }
124950
+ off(t, e) {
124951
+ let s = super.off(t, e);
124952
+ return t === "data" && (this[Z] = this.listeners("data").length, this[Z] === 0 && !this[D] && !this[M].length && (this[x] = !1)), s;
124953
+ }
124954
+ removeAllListeners(t) {
124955
+ let e = super.removeAllListeners(t);
124956
+ return (t === "data" || t === void 0) && (this[Z] = 0, !this[D] && !this[M].length && (this[x] = !1)), e;
124957
+ }
124958
+ get emittedEnd() {
124959
+ return this[K];
124960
+ }
124961
+ [q]() {
124962
+ !this[Bt] && !this[K] && !this[O] && this[T].length === 0 && this[$] && (this[Bt] = !0, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[It] && this.emit("close"), this[Bt] = !1);
124963
+ }
124964
+ emit(t, ...e) {
124965
+ let s = e[0];
124966
+ if (t !== "error" && t !== "close" && t !== O && this[O]) return !1;
124967
+ if (t === "data") return !this[k] && !s ? !1 : this[I] ? (ft(() => this[ye](s)), !0) : this[ye](s);
124968
+ if (t === "end") return this[gs]();
124969
+ if (t === "close") {
124970
+ if (this[It] = !0, !this[K] && !this[O]) return !1;
124971
+ let r = super.emit("close");
124972
+ return this.removeAllListeners("close"), r;
124973
+ } else if (t === "error") {
124974
+ this[lt] = s, super.emit(be, s);
124975
+ let r = !this[ut] || this.listeners("error").length ? super.emit("error", s) : !1;
124976
+ return this[q](), r;
124977
+ } else if (t === "resume") {
124978
+ let r = super.emit("resume");
124979
+ return this[q](), r;
124980
+ } else if (t === "finish" || t === "prefinish") {
124981
+ let r = super.emit(t);
124982
+ return this.removeAllListeners(t), r;
124983
+ }
124984
+ let i = super.emit(t, ...e);
124985
+ return this[q](), i;
124986
+ }
124987
+ [ye](t) {
124988
+ for (let s of this[M]) s.dest.write(t) === !1 && this.pause();
124989
+ let e = this[D] ? !1 : super.emit("data", t);
124990
+ return this[q](), e;
124991
+ }
124992
+ [gs]() {
124993
+ return this[K] ? !1 : (this[K] = !0, this.readable = !1, this[I] ? (ft(() => this[Se]()), !0) : this[Se]());
124994
+ }
124995
+ [Se]() {
124996
+ if (this[rt]) {
124997
+ let e = this[rt].end();
124998
+ if (e) {
124999
+ for (let s of this[M]) s.dest.write(e);
125000
+ this[D] || super.emit("data", e);
125001
+ }
125002
+ }
125003
+ for (let e of this[M]) e.end();
125004
+ let t = super.emit("end");
125005
+ return this.removeAllListeners("end"), t;
125006
+ }
125007
+ async collect() {
125008
+ let t = Object.assign([], { dataLength: 0 });
125009
+ this[k] || (t.dataLength = 0);
125010
+ let e = this.promise();
125011
+ return this.on("data", (s) => {
125012
+ t.push(s), this[k] || (t.dataLength += s.length);
125013
+ }), await e, t;
125014
+ }
125015
+ async concat() {
125016
+ if (this[k]) throw new Error("cannot concat in objectMode");
125017
+ let t = await this.collect();
125018
+ return this[L] ? t.join("") : Buffer.concat(t, t.dataLength);
125019
+ }
125020
+ async promise() {
125021
+ return new Promise((t, e) => {
125022
+ this.on(O, () => e(/* @__PURE__ */ new Error("stream destroyed"))), this.on("error", (s) => e(s)), this.on("end", () => t());
125023
+ });
125024
+ }
125025
+ [Symbol.asyncIterator]() {
125026
+ this[D] = !1;
125027
+ let t = !1, e = async () => (this.pause(), t = !0, {
125028
+ value: void 0,
125029
+ done: !0
125030
+ });
125031
+ return {
125032
+ next: () => {
125033
+ if (t) return e();
125034
+ let i = this.read();
125035
+ if (i !== null) return Promise.resolve({
125036
+ done: !1,
125037
+ value: i
125038
+ });
125039
+ if (this[$]) return e();
125040
+ let r, h, o = (c) => {
125041
+ this.off("data", a), this.off("end", l), this.off(O, f), e(), h(c);
125042
+ }, a = (c) => {
125043
+ this.off("error", o), this.off("end", l), this.off(O, f), this.pause(), r({
125044
+ value: c,
125045
+ done: !!this[$]
125046
+ });
125047
+ }, l = () => {
125048
+ this.off("error", o), this.off("data", a), this.off(O, f), e(), r({
125049
+ done: !0,
125050
+ value: void 0
125051
+ });
125052
+ }, f = () => o(/* @__PURE__ */ new Error("stream destroyed"));
125053
+ return new Promise((c, d) => {
125054
+ h = d, r = c, this.once(O, f), this.once("error", o), this.once("end", l), this.once("data", a);
125055
+ });
125056
+ },
125057
+ throw: e,
125058
+ return: e,
125059
+ [Symbol.asyncIterator]() {
125060
+ return this;
125061
+ },
125062
+ [Symbol.asyncDispose]: async () => {}
125063
+ };
125064
+ }
125065
+ [Symbol.iterator]() {
125066
+ this[D] = !1;
125067
+ let t = !1, e = () => (this.pause(), this.off(be, e), this.off(O, e), this.off("end", e), t = !0, {
125068
+ done: !0,
125069
+ value: void 0
125070
+ }), s = () => {
125071
+ if (t) return e();
125072
+ let i = this.read();
125073
+ return i === null ? e() : {
125074
+ done: !1,
125075
+ value: i
125076
+ };
125077
+ };
125078
+ return this.once("end", e), this.once(be, e), this.once(O, e), {
125079
+ next: s,
125080
+ throw: e,
125081
+ return: e,
125082
+ [Symbol.iterator]() {
125083
+ return this;
125084
+ },
125085
+ [Symbol.dispose]: () => {}
125086
+ };
125087
+ }
125088
+ destroy(t) {
125089
+ if (this[O]) return t ? this.emit("error", t) : this.emit(O), this;
125090
+ this[O] = !0, this[D] = !0, this[T].length = 0, this[C] = 0;
125091
+ let e = this;
125092
+ return typeof e.close == "function" && !this[It] && e.close(), t ? this.emit("error", t) : this.emit(O), this;
125093
+ }
125094
+ static get isStream() {
125095
+ return P.isStream;
125096
+ }
125097
+ };
125098
+ P.Minipass = qt;
125099
+ });
125100
+ var Ms = R((_) => {
125101
+ "use strict";
125102
+ var gr = _ && _.__createBinding || (Object.create ? (function(n, t, e, s) {
125103
+ s === void 0 && (s = e);
125104
+ var i = Object.getOwnPropertyDescriptor(t, e);
125105
+ (!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
125106
+ enumerable: !0,
125107
+ get: function() {
125108
+ return t[e];
125109
+ }
125110
+ }), Object.defineProperty(n, s, i);
125111
+ }) : (function(n, t, e, s) {
125112
+ s === void 0 && (s = e), n[s] = t[e];
125113
+ })), wr = _ && _.__setModuleDefault || (Object.create ? (function(n, t) {
125114
+ Object.defineProperty(n, "default", {
125115
+ enumerable: !0,
125116
+ value: t
125117
+ });
125118
+ }) : function(n, t) {
125119
+ n.default = t;
125120
+ }), br = _ && _.__importStar || function(n) {
125121
+ if (n && n.__esModule) return n;
125122
+ var t = {};
125123
+ if (n != null) for (var e in n) e !== "default" && Object.prototype.hasOwnProperty.call(n, e) && gr(t, n, e);
125124
+ return wr(t, n), t;
125125
+ };
125126
+ Object.defineProperty(_, "__esModule", { value: !0 });
125127
+ _.PathScurry = _.Path = _.PathScurryDarwin = _.PathScurryPosix = _.PathScurryWin32 = _.PathScurryBase = _.PathPosix = _.PathWin32 = _.PathBase = _.ChildrenCache = _.ResolveCache = void 0;
125128
+ var Qt = fs(), Yt = require("node:path"), yr = require("node:url"), pt = require("fs"), Sr = br(require("node:fs")), vr = pt.realpathSync.native, Ht = require("node:fs/promises"), bs = Oe(), mt = {
125129
+ lstatSync: pt.lstatSync,
125130
+ readdir: pt.readdir,
125131
+ readdirSync: pt.readdirSync,
125132
+ readlinkSync: pt.readlinkSync,
125133
+ realpathSync: vr,
125134
+ promises: {
125135
+ lstat: Ht.lstat,
125136
+ readdir: Ht.readdir,
125137
+ readlink: Ht.readlink,
125138
+ realpath: Ht.realpath
125139
+ }
125140
+ }, _s = (n) => !n || n === mt || n === Sr ? mt : {
125141
+ ...mt,
125142
+ ...n,
125143
+ promises: {
125144
+ ...mt.promises,
125145
+ ...n.promises || {}
125146
+ }
125147
+ }, Os = /^\\\\\?\\([a-z]:)\\?$/i, Er = (n) => n.replace(/\//g, "\\").replace(Os, "$1\\"), _r = /[\\\/]/, N = 0, xs = 1, Ts = 2, G = 4, Cs = 6, Rs = 8, Q = 10, As = 12, j = 15, dt = ~j, xe = 16, ys = 32, gt = 64, W = 128, Vt = 256, Xt = 512, Ss = gt | W | Xt, Or = 1023, Te = (n) => n.isFile() ? Rs : n.isDirectory() ? G : n.isSymbolicLink() ? Q : n.isCharacterDevice() ? Ts : n.isBlockDevice() ? Cs : n.isSocket() ? As : n.isFIFO() ? xs : N, vs = new Qt.LRUCache({ max: 2 ** 12 }), wt = (n) => {
125148
+ let t = vs.get(n);
125149
+ if (t) return t;
125150
+ let e = n.normalize("NFKD");
125151
+ return vs.set(n, e), e;
125152
+ }, Es = new Qt.LRUCache({ max: 2 ** 12 }), Kt = (n) => {
125153
+ let t = Es.get(n);
125154
+ if (t) return t;
125155
+ let e = wt(n.toLowerCase());
125156
+ return Es.set(n, e), e;
125157
+ }, bt = class extends Qt.LRUCache {
125158
+ constructor() {
125159
+ super({ max: 256 });
125160
+ }
125161
+ };
125162
+ _.ResolveCache = bt;
125163
+ var Jt = class extends Qt.LRUCache {
125164
+ constructor(t = 16 * 1024) {
125165
+ super({
125166
+ maxSize: t,
125167
+ sizeCalculation: (e) => e.length + 1
125168
+ });
125169
+ }
125170
+ };
125171
+ _.ChildrenCache = Jt;
125172
+ var ks = Symbol("PathScurry setAsCwd"), A = class {
125173
+ name;
125174
+ root;
125175
+ roots;
125176
+ parent;
125177
+ nocase;
125178
+ isCWD = !1;
125179
+ #t;
125180
+ #s;
125181
+ get dev() {
125182
+ return this.#s;
125183
+ }
125184
+ #n;
125185
+ get mode() {
125186
+ return this.#n;
125187
+ }
125188
+ #r;
125189
+ get nlink() {
125190
+ return this.#r;
125191
+ }
125192
+ #h;
125193
+ get uid() {
125194
+ return this.#h;
125195
+ }
125196
+ #S;
125197
+ get gid() {
125198
+ return this.#S;
125199
+ }
125200
+ #w;
125201
+ get rdev() {
125202
+ return this.#w;
125203
+ }
125204
+ #c;
125205
+ get blksize() {
125206
+ return this.#c;
125207
+ }
125208
+ #o;
125209
+ get ino() {
125210
+ return this.#o;
125211
+ }
125212
+ #f;
125213
+ get size() {
125214
+ return this.#f;
125215
+ }
125216
+ #u;
125217
+ get blocks() {
125218
+ return this.#u;
125219
+ }
125220
+ #a;
125221
+ get atimeMs() {
125222
+ return this.#a;
125223
+ }
125224
+ #i;
125225
+ get mtimeMs() {
125226
+ return this.#i;
125227
+ }
125228
+ #d;
125229
+ get ctimeMs() {
125230
+ return this.#d;
125231
+ }
125232
+ #v;
125233
+ get birthtimeMs() {
125234
+ return this.#v;
125235
+ }
125236
+ #y;
125237
+ get atime() {
125238
+ return this.#y;
125239
+ }
125240
+ #p;
125241
+ get mtime() {
125242
+ return this.#p;
125243
+ }
125244
+ #R;
125245
+ get ctime() {
125246
+ return this.#R;
125247
+ }
125248
+ #m;
125249
+ get birthtime() {
125250
+ return this.#m;
125251
+ }
125252
+ #O;
125253
+ #x;
125254
+ #g;
125255
+ #b;
125256
+ #E;
125257
+ #T;
125258
+ #e;
125259
+ #F;
125260
+ #P;
125261
+ #C;
125262
+ get parentPath() {
125263
+ return (this.parent || this).fullpath();
125264
+ }
125265
+ get path() {
125266
+ return this.parentPath;
125267
+ }
125268
+ constructor(t, e = N, s, i, r, h, o) {
125269
+ this.name = t, this.#O = r ? Kt(t) : wt(t), this.#e = e & Or, this.nocase = r, this.roots = i, this.root = s || this, this.#F = h, this.#g = o.fullpath, this.#E = o.relative, this.#T = o.relativePosix, this.parent = o.parent, this.parent ? this.#t = this.parent.#t : this.#t = _s(o.fs);
125270
+ }
125271
+ depth() {
125272
+ return this.#x !== void 0 ? this.#x : this.parent ? this.#x = this.parent.depth() + 1 : this.#x = 0;
125273
+ }
125274
+ childrenCache() {
125275
+ return this.#F;
125276
+ }
125277
+ resolve(t) {
125278
+ if (!t) return this;
125279
+ let e = this.getRootString(t), i = t.substring(e.length).split(this.splitSep);
125280
+ return e ? this.getRoot(e).#D(i) : this.#D(i);
125281
+ }
125282
+ #D(t) {
125283
+ let e = this;
125284
+ for (let s of t) e = e.child(s);
125285
+ return e;
125286
+ }
125287
+ children() {
125288
+ let t = this.#F.get(this);
125289
+ if (t) return t;
125290
+ let e = Object.assign([], { provisional: 0 });
125291
+ return this.#F.set(this, e), this.#e &= ~xe, e;
125292
+ }
125293
+ child(t, e) {
125294
+ if (t === "" || t === ".") return this;
125295
+ if (t === "..") return this.parent || this;
125296
+ let s = this.children(), i = this.nocase ? Kt(t) : wt(t);
125297
+ for (let a of s) if (a.#O === i) return a;
125298
+ let r = this.parent ? this.sep : "", h = this.#g ? this.#g + r + t : void 0, o = this.newChild(t, N, {
125299
+ ...e,
125300
+ parent: this,
125301
+ fullpath: h
125302
+ });
125303
+ return this.canReaddir() || (o.#e |= W), s.push(o), o;
125304
+ }
125305
+ relative() {
125306
+ if (this.isCWD) return "";
125307
+ if (this.#E !== void 0) return this.#E;
125308
+ let t = this.name, e = this.parent;
125309
+ if (!e) return this.#E = this.name;
125310
+ let s = e.relative();
125311
+ return s + (!s || !e.parent ? "" : this.sep) + t;
125312
+ }
125313
+ relativePosix() {
125314
+ if (this.sep === "/") return this.relative();
125315
+ if (this.isCWD) return "";
125316
+ if (this.#T !== void 0) return this.#T;
125317
+ let t = this.name, e = this.parent;
125318
+ if (!e) return this.#T = this.fullpathPosix();
125319
+ let s = e.relativePosix();
125320
+ return s + (!s || !e.parent ? "" : "/") + t;
125321
+ }
125322
+ fullpath() {
125323
+ if (this.#g !== void 0) return this.#g;
125324
+ let t = this.name, e = this.parent;
125325
+ if (!e) return this.#g = this.name;
125326
+ return this.#g = e.fullpath() + (e.parent ? this.sep : "") + t;
125327
+ }
125328
+ fullpathPosix() {
125329
+ if (this.#b !== void 0) return this.#b;
125330
+ if (this.sep === "/") return this.#b = this.fullpath();
125331
+ if (!this.parent) {
125332
+ let i = this.fullpath().replace(/\\/g, "/");
125333
+ return /^[a-z]:\//i.test(i) ? this.#b = `//?/${i}` : this.#b = i;
125334
+ }
125335
+ let t = this.parent, e = t.fullpathPosix();
125336
+ return this.#b = e + (!e || !t.parent ? "" : "/") + this.name;
125337
+ }
125338
+ isUnknown() {
125339
+ return (this.#e & j) === N;
125340
+ }
125341
+ isType(t) {
125342
+ return this[`is${t}`]();
125343
+ }
125344
+ getType() {
125345
+ return this.isUnknown() ? "Unknown" : this.isDirectory() ? "Directory" : this.isFile() ? "File" : this.isSymbolicLink() ? "SymbolicLink" : this.isFIFO() ? "FIFO" : this.isCharacterDevice() ? "CharacterDevice" : this.isBlockDevice() ? "BlockDevice" : this.isSocket() ? "Socket" : "Unknown";
125346
+ }
125347
+ isFile() {
125348
+ return (this.#e & j) === Rs;
125349
+ }
125350
+ isDirectory() {
125351
+ return (this.#e & j) === G;
125352
+ }
125353
+ isCharacterDevice() {
125354
+ return (this.#e & j) === Ts;
125355
+ }
125356
+ isBlockDevice() {
125357
+ return (this.#e & j) === Cs;
125358
+ }
125359
+ isFIFO() {
125360
+ return (this.#e & j) === xs;
125361
+ }
125362
+ isSocket() {
125363
+ return (this.#e & j) === As;
125364
+ }
125365
+ isSymbolicLink() {
125366
+ return (this.#e & Q) === Q;
125367
+ }
125368
+ lstatCached() {
125369
+ return this.#e & ys ? this : void 0;
125370
+ }
125371
+ readlinkCached() {
125372
+ return this.#P;
125373
+ }
125374
+ realpathCached() {
125375
+ return this.#C;
125376
+ }
125377
+ readdirCached() {
125378
+ let t = this.children();
125379
+ return t.slice(0, t.provisional);
125380
+ }
125381
+ canReadlink() {
125382
+ if (this.#P) return !0;
125383
+ if (!this.parent) return !1;
125384
+ let t = this.#e & j;
125385
+ return !(t !== N && t !== Q || this.#e & Vt || this.#e & W);
125386
+ }
125387
+ calledReaddir() {
125388
+ return !!(this.#e & xe);
125389
+ }
125390
+ isENOENT() {
125391
+ return !!(this.#e & W);
125392
+ }
125393
+ isNamed(t) {
125394
+ return this.nocase ? this.#O === Kt(t) : this.#O === wt(t);
125395
+ }
125396
+ async readlink() {
125397
+ let t = this.#P;
125398
+ if (t) return t;
125399
+ if (this.canReadlink() && this.parent) try {
125400
+ let e = await this.#t.promises.readlink(this.fullpath()), s = (await this.parent.realpath())?.resolve(e);
125401
+ if (s) return this.#P = s;
125402
+ } catch (e) {
125403
+ this.#M(e.code);
125404
+ return;
125405
+ }
125406
+ }
125407
+ readlinkSync() {
125408
+ let t = this.#P;
125409
+ if (t) return t;
125410
+ if (this.canReadlink() && this.parent) try {
125411
+ let e = this.#t.readlinkSync(this.fullpath()), s = this.parent.realpathSync()?.resolve(e);
125412
+ if (s) return this.#P = s;
125413
+ } catch (e) {
125414
+ this.#M(e.code);
125415
+ return;
125416
+ }
125417
+ }
125418
+ #W(t) {
125419
+ this.#e |= xe;
125420
+ for (let e = t.provisional; e < t.length; e++) {
125421
+ let s = t[e];
125422
+ s && s.#_();
125423
+ }
125424
+ }
125425
+ #_() {
125426
+ this.#e & W || (this.#e = (this.#e | W) & dt, this.#$());
125427
+ }
125428
+ #$() {
125429
+ let t = this.children();
125430
+ t.provisional = 0;
125431
+ for (let e of t) e.#_();
125432
+ }
125433
+ #L() {
125434
+ this.#e |= Xt, this.#j();
125435
+ }
125436
+ #j() {
125437
+ if (this.#e & gt) return;
125438
+ let t = this.#e;
125439
+ (t & j) === G && (t &= dt), this.#e = t | gt, this.#$();
125440
+ }
125441
+ #B(t = "") {
125442
+ t === "ENOTDIR" || t === "EPERM" ? this.#j() : t === "ENOENT" ? this.#_() : this.children().provisional = 0;
125443
+ }
125444
+ #k(t = "") {
125445
+ t === "ENOTDIR" ? this.parent.#j() : t === "ENOENT" && this.#_();
125446
+ }
125447
+ #M(t = "") {
125448
+ let e = this.#e;
125449
+ e |= Vt, t === "ENOENT" && (e |= W), (t === "EINVAL" || t === "UNKNOWN") && (e &= dt), this.#e = e, t === "ENOTDIR" && this.parent && this.parent.#j();
125450
+ }
125451
+ #I(t, e) {
125452
+ return this.#z(t, e) || this.#G(t, e);
125453
+ }
125454
+ #G(t, e) {
125455
+ let s = Te(t), i = this.newChild(t.name, s, { parent: this }), r = i.#e & j;
125456
+ return r !== G && r !== Q && r !== N && (i.#e |= gt), e.unshift(i), e.provisional++, i;
125457
+ }
125458
+ #z(t, e) {
125459
+ for (let s = e.provisional; s < e.length; s++) {
125460
+ let i = e[s];
125461
+ if ((this.nocase ? Kt(t.name) : wt(t.name)) === i.#O) return this.#l(t, i, s, e);
125462
+ }
125463
+ }
125464
+ #l(t, e, s, i) {
125465
+ let r = e.name;
125466
+ return e.#e = e.#e & dt | Te(t), r !== t.name && (e.name = t.name), s !== i.provisional && (s === i.length - 1 ? i.pop() : i.splice(s, 1), i.unshift(e)), i.provisional++, e;
125467
+ }
125468
+ async lstat() {
125469
+ if ((this.#e & W) === 0) try {
125470
+ return this.#U(await this.#t.promises.lstat(this.fullpath())), this;
125471
+ } catch (t) {
125472
+ this.#k(t.code);
125473
+ }
125474
+ }
125475
+ lstatSync() {
125476
+ if ((this.#e & W) === 0) try {
125477
+ return this.#U(this.#t.lstatSync(this.fullpath())), this;
125478
+ } catch (t) {
125479
+ this.#k(t.code);
125480
+ }
125481
+ }
125482
+ #U(t) {
125483
+ let { atime: e, atimeMs: s, birthtime: i, birthtimeMs: r, blksize: h, blocks: o, ctime: a, ctimeMs: l, dev: f, gid: c, ino: d, mode: u, mtime: m, mtimeMs: p, nlink: b, rdev: w, size: v, uid: E } = t;
125484
+ this.#y = e, this.#a = s, this.#m = i, this.#v = r, this.#c = h, this.#u = o, this.#R = a, this.#d = l, this.#s = f, this.#S = c, this.#o = d, this.#n = u, this.#p = m, this.#i = p, this.#r = b, this.#w = w, this.#f = v, this.#h = E;
125485
+ let y = Te(t);
125486
+ this.#e = this.#e & dt | y | ys, y !== N && y !== G && y !== Q && (this.#e |= gt);
125487
+ }
125488
+ #N = [];
125489
+ #A = !1;
125490
+ #q(t) {
125491
+ this.#A = !1;
125492
+ let e = this.#N.slice();
125493
+ this.#N.length = 0, e.forEach((s) => s(null, t));
125494
+ }
125495
+ readdirCB(t, e = !1) {
125496
+ if (!this.canReaddir()) {
125497
+ e ? t(null, []) : queueMicrotask(() => t(null, []));
125498
+ return;
125499
+ }
125500
+ let s = this.children();
125501
+ if (this.calledReaddir()) {
125502
+ let r = s.slice(0, s.provisional);
125503
+ e ? t(null, r) : queueMicrotask(() => t(null, r));
125504
+ return;
125505
+ }
125506
+ if (this.#N.push(t), this.#A) return;
125507
+ this.#A = !0;
125508
+ let i = this.fullpath();
125509
+ this.#t.readdir(i, { withFileTypes: !0 }, (r, h) => {
125510
+ if (r) this.#B(r.code), s.provisional = 0;
125511
+ else {
125512
+ for (let o of h) this.#I(o, s);
125513
+ this.#W(s);
125514
+ }
125515
+ this.#q(s.slice(0, s.provisional));
125516
+ });
125517
+ }
125518
+ #H;
125519
+ async readdir() {
125520
+ if (!this.canReaddir()) return [];
125521
+ let t = this.children();
125522
+ if (this.calledReaddir()) return t.slice(0, t.provisional);
125523
+ let e = this.fullpath();
125524
+ if (this.#H) await this.#H;
125525
+ else {
125526
+ let s = () => {};
125527
+ this.#H = new Promise((i) => s = i);
125528
+ try {
125529
+ for (let i of await this.#t.promises.readdir(e, { withFileTypes: !0 })) this.#I(i, t);
125530
+ this.#W(t);
125531
+ } catch (i) {
125532
+ this.#B(i.code), t.provisional = 0;
125533
+ }
125534
+ this.#H = void 0, s();
125535
+ }
125536
+ return t.slice(0, t.provisional);
125537
+ }
125538
+ readdirSync() {
125539
+ if (!this.canReaddir()) return [];
125540
+ let t = this.children();
125541
+ if (this.calledReaddir()) return t.slice(0, t.provisional);
125542
+ let e = this.fullpath();
125543
+ try {
125544
+ for (let s of this.#t.readdirSync(e, { withFileTypes: !0 })) this.#I(s, t);
125545
+ this.#W(t);
125546
+ } catch (s) {
125547
+ this.#B(s.code), t.provisional = 0;
125548
+ }
125549
+ return t.slice(0, t.provisional);
125550
+ }
125551
+ canReaddir() {
125552
+ if (this.#e & Ss) return !1;
125553
+ let t = j & this.#e;
125554
+ return t === N || t === G || t === Q;
125555
+ }
125556
+ shouldWalk(t, e) {
125557
+ return (this.#e & G) === G && !(this.#e & Ss) && !t.has(this) && (!e || e(this));
125558
+ }
125559
+ async realpath() {
125560
+ if (this.#C) return this.#C;
125561
+ if (!((Xt | Vt | W) & this.#e)) try {
125562
+ let t = await this.#t.promises.realpath(this.fullpath());
125563
+ return this.#C = this.resolve(t);
125564
+ } catch {
125565
+ this.#L();
125566
+ }
125567
+ }
125568
+ realpathSync() {
125569
+ if (this.#C) return this.#C;
125570
+ if (!((Xt | Vt | W) & this.#e)) try {
125571
+ let t = this.#t.realpathSync(this.fullpath());
125572
+ return this.#C = this.resolve(t);
125573
+ } catch {
125574
+ this.#L();
125575
+ }
125576
+ }
125577
+ [ks](t) {
125578
+ if (t === this) return;
125579
+ t.isCWD = !1, this.isCWD = !0;
125580
+ let e = /* @__PURE__ */ new Set([]), s = [], i = this;
125581
+ for (; i && i.parent;) e.add(i), i.#E = s.join(this.sep), i.#T = s.join("/"), i = i.parent, s.push("..");
125582
+ for (i = t; i && i.parent && !e.has(i);) i.#E = void 0, i.#T = void 0, i = i.parent;
125583
+ }
125584
+ };
125585
+ _.PathBase = A;
125586
+ var yt = class n extends A {
125587
+ sep = "\\";
125588
+ splitSep = _r;
125589
+ constructor(t, e = N, s, i, r, h, o) {
125590
+ super(t, e, s, i, r, h, o);
125591
+ }
125592
+ newChild(t, e = N, s = {}) {
125593
+ return new n(t, e, this.root, this.roots, this.nocase, this.childrenCache(), s);
125594
+ }
125595
+ getRootString(t) {
125596
+ return Yt.win32.parse(t).root;
125597
+ }
125598
+ getRoot(t) {
125599
+ if (t = Er(t.toUpperCase()), t === this.root.name) return this.root;
125600
+ for (let [e, s] of Object.entries(this.roots)) if (this.sameRoot(t, e)) return this.roots[t] = s;
125601
+ return this.roots[t] = new Et(t, this).root;
125602
+ }
125603
+ sameRoot(t, e = this.root.name) {
125604
+ return t = t.toUpperCase().replace(/\//g, "\\").replace(Os, "$1\\"), t === e;
125605
+ }
125606
+ };
125607
+ _.PathWin32 = yt;
125608
+ var St = class n extends A {
125609
+ splitSep = "/";
125610
+ sep = "/";
125611
+ constructor(t, e = N, s, i, r, h, o) {
125612
+ super(t, e, s, i, r, h, o);
125613
+ }
125614
+ getRootString(t) {
125615
+ return t.startsWith("/") ? "/" : "";
125616
+ }
125617
+ getRoot(t) {
125618
+ return this.root;
125619
+ }
125620
+ newChild(t, e = N, s = {}) {
125621
+ return new n(t, e, this.root, this.roots, this.nocase, this.childrenCache(), s);
125622
+ }
125623
+ };
125624
+ _.PathPosix = St;
125625
+ var vt = class {
125626
+ root;
125627
+ rootPath;
125628
+ roots;
125629
+ cwd;
125630
+ #t;
125631
+ #s;
125632
+ #n;
125633
+ nocase;
125634
+ #r;
125635
+ constructor(t = process.cwd(), e, s, { nocase: i, childrenCacheSize: r = 16 * 1024, fs: h = mt } = {}) {
125636
+ this.#r = _s(h), (t instanceof URL || t.startsWith("file://")) && (t = (0, yr.fileURLToPath)(t));
125637
+ let o = e.resolve(t);
125638
+ this.roots = Object.create(null), this.rootPath = this.parseRootPath(o), this.#t = new bt(), this.#s = new bt(), this.#n = new Jt(r);
125639
+ let a = o.substring(this.rootPath.length).split(s);
125640
+ if (a.length === 1 && !a[0] && a.pop(), i === void 0) throw new TypeError("must provide nocase setting to PathScurryBase ctor");
125641
+ this.nocase = i, this.root = this.newRoot(this.#r), this.roots[this.rootPath] = this.root;
125642
+ let l = this.root, f = a.length - 1, c = e.sep, d = this.rootPath, u = !1;
125643
+ for (let m of a) {
125644
+ let p = f--;
125645
+ l = l.child(m, {
125646
+ relative: new Array(p).fill("..").join(c),
125647
+ relativePosix: new Array(p).fill("..").join("/"),
125648
+ fullpath: d += (u ? "" : c) + m
125649
+ }), u = !0;
125650
+ }
125651
+ this.cwd = l;
125652
+ }
125653
+ depth(t = this.cwd) {
125654
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.depth();
125655
+ }
125656
+ childrenCache() {
125657
+ return this.#n;
125658
+ }
125659
+ resolve(...t) {
125660
+ let e = "";
125661
+ for (let r = t.length - 1; r >= 0; r--) {
125662
+ let h = t[r];
125663
+ if (!(!h || h === ".") && (e = e ? `${h}/${e}` : h, this.isAbsolute(h))) break;
125664
+ }
125665
+ let s = this.#t.get(e);
125666
+ if (s !== void 0) return s;
125667
+ let i = this.cwd.resolve(e).fullpath();
125668
+ return this.#t.set(e, i), i;
125669
+ }
125670
+ resolvePosix(...t) {
125671
+ let e = "";
125672
+ for (let r = t.length - 1; r >= 0; r--) {
125673
+ let h = t[r];
125674
+ if (!(!h || h === ".") && (e = e ? `${h}/${e}` : h, this.isAbsolute(h))) break;
125675
+ }
125676
+ let s = this.#s.get(e);
125677
+ if (s !== void 0) return s;
125678
+ let i = this.cwd.resolve(e).fullpathPosix();
125679
+ return this.#s.set(e, i), i;
125680
+ }
125681
+ relative(t = this.cwd) {
125682
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.relative();
125683
+ }
125684
+ relativePosix(t = this.cwd) {
125685
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.relativePosix();
125686
+ }
125687
+ basename(t = this.cwd) {
125688
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.name;
125689
+ }
125690
+ dirname(t = this.cwd) {
125691
+ return typeof t == "string" && (t = this.cwd.resolve(t)), (t.parent || t).fullpath();
125692
+ }
125693
+ async readdir(t = this.cwd, e = { withFileTypes: !0 }) {
125694
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
125695
+ let { withFileTypes: s } = e;
125696
+ if (t.canReaddir()) {
125697
+ let i = await t.readdir();
125698
+ return s ? i : i.map((r) => r.name);
125699
+ } else return [];
125700
+ }
125701
+ readdirSync(t = this.cwd, e = { withFileTypes: !0 }) {
125702
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
125703
+ let { withFileTypes: s = !0 } = e;
125704
+ return t.canReaddir() ? s ? t.readdirSync() : t.readdirSync().map((i) => i.name) : [];
125705
+ }
125706
+ async lstat(t = this.cwd) {
125707
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.lstat();
125708
+ }
125709
+ lstatSync(t = this.cwd) {
125710
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.lstatSync();
125711
+ }
125712
+ async readlink(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
125713
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t.withFileTypes, t = this.cwd);
125714
+ let s = await t.readlink();
125715
+ return e ? s : s?.fullpath();
125716
+ }
125717
+ readlinkSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
125718
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t.withFileTypes, t = this.cwd);
125719
+ let s = t.readlinkSync();
125720
+ return e ? s : s?.fullpath();
125721
+ }
125722
+ async realpath(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
125723
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t.withFileTypes, t = this.cwd);
125724
+ let s = await t.realpath();
125725
+ return e ? s : s?.fullpath();
125726
+ }
125727
+ realpathSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
125728
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t.withFileTypes, t = this.cwd);
125729
+ let s = t.realpathSync();
125730
+ return e ? s : s?.fullpath();
125731
+ }
125732
+ async walk(t = this.cwd, e = {}) {
125733
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
125734
+ let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: h } = e, o = [];
125735
+ (!r || r(t)) && o.push(s ? t : t.fullpath());
125736
+ let a = /* @__PURE__ */ new Set(), l = (c, d) => {
125737
+ a.add(c), c.readdirCB((u, m) => {
125738
+ if (u) return d(u);
125739
+ let p = m.length;
125740
+ if (!p) return d();
125741
+ let b = () => {
125742
+ --p === 0 && d();
125743
+ };
125744
+ for (let w of m) (!r || r(w)) && o.push(s ? w : w.fullpath()), i && w.isSymbolicLink() ? w.realpath().then((v) => v?.isUnknown() ? v.lstat() : v).then((v) => v?.shouldWalk(a, h) ? l(v, b) : b()) : w.shouldWalk(a, h) ? l(w, b) : b();
125745
+ }, !0);
125746
+ }, f = t;
125747
+ return new Promise((c, d) => {
125748
+ l(f, (u) => {
125749
+ if (u) return d(u);
125750
+ c(o);
125751
+ });
125752
+ });
125753
+ }
125754
+ walkSync(t = this.cwd, e = {}) {
125755
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
125756
+ let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: h } = e, o = [];
125757
+ (!r || r(t)) && o.push(s ? t : t.fullpath());
125758
+ let a = new Set([t]);
125759
+ for (let l of a) {
125760
+ let f = l.readdirSync();
125761
+ for (let c of f) {
125762
+ (!r || r(c)) && o.push(s ? c : c.fullpath());
125763
+ let d = c;
125764
+ if (c.isSymbolicLink()) {
125765
+ if (!(i && (d = c.realpathSync()))) continue;
125766
+ d.isUnknown() && d.lstatSync();
125767
+ }
125768
+ d.shouldWalk(a, h) && a.add(d);
125769
+ }
125770
+ }
125771
+ return o;
125772
+ }
125773
+ [Symbol.asyncIterator]() {
125774
+ return this.iterate();
125775
+ }
125776
+ iterate(t = this.cwd, e = {}) {
125777
+ return typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd), this.stream(t, e)[Symbol.asyncIterator]();
125778
+ }
125779
+ [Symbol.iterator]() {
125780
+ return this.iterateSync();
125781
+ }
125782
+ *iterateSync(t = this.cwd, e = {}) {
125783
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
125784
+ let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: h } = e;
125785
+ (!r || r(t)) && (yield s ? t : t.fullpath());
125786
+ let o = new Set([t]);
125787
+ for (let a of o) {
125788
+ let l = a.readdirSync();
125789
+ for (let f of l) {
125790
+ (!r || r(f)) && (yield s ? f : f.fullpath());
125791
+ let c = f;
125792
+ if (f.isSymbolicLink()) {
125793
+ if (!(i && (c = f.realpathSync()))) continue;
125794
+ c.isUnknown() && c.lstatSync();
125795
+ }
125796
+ c.shouldWalk(o, h) && o.add(c);
125797
+ }
125798
+ }
125799
+ }
125800
+ stream(t = this.cwd, e = {}) {
125801
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
125802
+ let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: h } = e, o = new bs.Minipass({ objectMode: !0 });
125803
+ (!r || r(t)) && o.write(s ? t : t.fullpath());
125804
+ let a = /* @__PURE__ */ new Set(), l = [t], f = 0, c = () => {
125805
+ let d = !1;
125806
+ for (; !d;) {
125807
+ let u = l.shift();
125808
+ if (!u) {
125809
+ f === 0 && o.end();
125810
+ return;
125811
+ }
125812
+ f++, a.add(u);
125813
+ let m = (b, w, v = !1) => {
125814
+ if (b) return o.emit("error", b);
125815
+ if (i && !v) {
125816
+ let E = [];
125817
+ for (let y of w) y.isSymbolicLink() && E.push(y.realpath().then((S) => S?.isUnknown() ? S.lstat() : S));
125818
+ if (E.length) {
125819
+ Promise.all(E).then(() => m(null, w, !0));
125820
+ return;
125821
+ }
125822
+ }
125823
+ for (let E of w) E && (!r || r(E)) && (o.write(s ? E : E.fullpath()) || (d = !0));
125824
+ f--;
125825
+ for (let E of w) {
125826
+ let y = E.realpathCached() || E;
125827
+ y.shouldWalk(a, h) && l.push(y);
125828
+ }
125829
+ d && !o.flowing ? o.once("drain", c) : p || c();
125830
+ }, p = !0;
125831
+ u.readdirCB(m, !0), p = !1;
125832
+ }
125833
+ };
125834
+ return c(), o;
125835
+ }
125836
+ streamSync(t = this.cwd, e = {}) {
125837
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
125838
+ let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: h } = e, o = new bs.Minipass({ objectMode: !0 }), a = /* @__PURE__ */ new Set();
125839
+ (!r || r(t)) && o.write(s ? t : t.fullpath());
125840
+ let l = [t], f = 0, c = () => {
125841
+ let d = !1;
125842
+ for (; !d;) {
125843
+ let u = l.shift();
125844
+ if (!u) {
125845
+ f === 0 && o.end();
125846
+ return;
125847
+ }
125848
+ f++, a.add(u);
125849
+ let m = u.readdirSync();
125850
+ for (let p of m) (!r || r(p)) && (o.write(s ? p : p.fullpath()) || (d = !0));
125851
+ f--;
125852
+ for (let p of m) {
125853
+ let b = p;
125854
+ if (p.isSymbolicLink()) {
125855
+ if (!(i && (b = p.realpathSync()))) continue;
125856
+ b.isUnknown() && b.lstatSync();
125857
+ }
125858
+ b.shouldWalk(a, h) && l.push(b);
125859
+ }
125860
+ }
125861
+ d && !o.flowing && o.once("drain", c);
125862
+ };
125863
+ return c(), o;
125864
+ }
125865
+ chdir(t = this.cwd) {
125866
+ let e = this.cwd;
125867
+ this.cwd = typeof t == "string" ? this.cwd.resolve(t) : t, this.cwd[ks](e);
125868
+ }
125869
+ };
125870
+ _.PathScurryBase = vt;
125871
+ var Et = class extends vt {
125872
+ sep = "\\";
125873
+ constructor(t = process.cwd(), e = {}) {
125874
+ let { nocase: s = !0 } = e;
125875
+ super(t, Yt.win32, "\\", {
125876
+ ...e,
125877
+ nocase: s
125878
+ }), this.nocase = s;
125879
+ for (let i = this.cwd; i; i = i.parent) i.nocase = this.nocase;
125880
+ }
125881
+ parseRootPath(t) {
125882
+ return Yt.win32.parse(t).root.toUpperCase();
125883
+ }
125884
+ newRoot(t) {
125885
+ return new yt(this.rootPath, G, void 0, this.roots, this.nocase, this.childrenCache(), { fs: t });
125886
+ }
125887
+ isAbsolute(t) {
125888
+ return t.startsWith("/") || t.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(t);
125889
+ }
125890
+ };
125891
+ _.PathScurryWin32 = Et;
125892
+ var _t = class extends vt {
125893
+ sep = "/";
125894
+ constructor(t = process.cwd(), e = {}) {
125895
+ let { nocase: s = !1 } = e;
125896
+ super(t, Yt.posix, "/", {
125897
+ ...e,
125898
+ nocase: s
125899
+ }), this.nocase = s;
125900
+ }
125901
+ parseRootPath(t) {
125902
+ return "/";
125903
+ }
125904
+ newRoot(t) {
125905
+ return new St(this.rootPath, G, void 0, this.roots, this.nocase, this.childrenCache(), { fs: t });
125906
+ }
125907
+ isAbsolute(t) {
125908
+ return t.startsWith("/");
125909
+ }
125910
+ };
125911
+ _.PathScurryPosix = _t;
125912
+ var Zt = class extends _t {
125913
+ constructor(t = process.cwd(), e = {}) {
125914
+ let { nocase: s = !0 } = e;
125915
+ super(t, {
125916
+ ...e,
125917
+ nocase: s
125918
+ });
125919
+ }
125920
+ };
125921
+ _.PathScurryDarwin = Zt;
125922
+ _.Path = process.platform === "win32" ? yt : St;
125923
+ _.PathScurry = process.platform === "win32" ? Et : process.platform === "darwin" ? Zt : _t;
125924
+ });
125925
+ var Re = R((te) => {
125926
+ "use strict";
125927
+ Object.defineProperty(te, "__esModule", { value: !0 });
125928
+ te.Pattern = void 0;
125929
+ var xr = H(), Tr = (n) => n.length >= 1, Cr = (n) => n.length >= 1, Rr = Symbol.for("nodejs.util.inspect.custom");
125930
+ te.Pattern = class n {
125931
+ #t;
125932
+ #s;
125933
+ #n;
125934
+ length;
125935
+ #r;
125936
+ #h;
125937
+ #S;
125938
+ #w;
125939
+ #c;
125940
+ #o;
125941
+ #f = !0;
125942
+ constructor(t, e, s, i) {
125943
+ if (!Tr(t)) throw new TypeError("empty pattern list");
125944
+ if (!Cr(e)) throw new TypeError("empty glob list");
125945
+ if (e.length !== t.length) throw new TypeError("mismatched pattern list and glob list lengths");
125946
+ if (this.length = t.length, s < 0 || s >= this.length) throw new TypeError("index out of range");
125947
+ if (this.#t = t, this.#s = e, this.#n = s, this.#r = i, this.#n === 0) {
125948
+ if (this.isUNC()) {
125949
+ let [r, h, o, a, ...l] = this.#t, [f, c, d, u, ...m] = this.#s;
125950
+ l[0] === "" && (l.shift(), m.shift());
125951
+ let p = [
125952
+ r,
125953
+ h,
125954
+ o,
125955
+ a,
125956
+ ""
125957
+ ].join("/"), b = [
125958
+ f,
125959
+ c,
125960
+ d,
125961
+ u,
125962
+ ""
125963
+ ].join("/");
125964
+ this.#t = [p, ...l], this.#s = [b, ...m], this.length = this.#t.length;
125965
+ } else if (this.isDrive() || this.isAbsolute()) {
125966
+ let [r, ...h] = this.#t, [o, ...a] = this.#s;
125967
+ h[0] === "" && (h.shift(), a.shift());
125968
+ let l = r + "/", f = o + "/";
125969
+ this.#t = [l, ...h], this.#s = [f, ...a], this.length = this.#t.length;
125970
+ }
125971
+ }
125972
+ }
125973
+ [Rr]() {
125974
+ return "Pattern <" + this.#s.slice(this.#n).join("/") + ">";
125975
+ }
125976
+ pattern() {
125977
+ return this.#t[this.#n];
125978
+ }
125979
+ isString() {
125980
+ return typeof this.#t[this.#n] == "string";
125981
+ }
125982
+ isGlobstar() {
125983
+ return this.#t[this.#n] === xr.GLOBSTAR;
125984
+ }
125985
+ isRegExp() {
125986
+ return this.#t[this.#n] instanceof RegExp;
125987
+ }
125988
+ globString() {
125989
+ return this.#S = this.#S || (this.#n === 0 ? this.isAbsolute() ? this.#s[0] + this.#s.slice(1).join("/") : this.#s.join("/") : this.#s.slice(this.#n).join("/"));
125990
+ }
125991
+ hasMore() {
125992
+ return this.length > this.#n + 1;
125993
+ }
125994
+ rest() {
125995
+ return this.#h !== void 0 ? this.#h : this.hasMore() ? (this.#h = new n(this.#t, this.#s, this.#n + 1, this.#r), this.#h.#o = this.#o, this.#h.#c = this.#c, this.#h.#w = this.#w, this.#h) : this.#h = null;
125996
+ }
125997
+ isUNC() {
125998
+ let t = this.#t;
125999
+ return this.#c !== void 0 ? this.#c : this.#c = this.#r === "win32" && this.#n === 0 && t[0] === "" && t[1] === "" && typeof t[2] == "string" && !!t[2] && typeof t[3] == "string" && !!t[3];
126000
+ }
126001
+ isDrive() {
126002
+ let t = this.#t;
126003
+ return this.#w !== void 0 ? this.#w : this.#w = this.#r === "win32" && this.#n === 0 && this.length > 1 && typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]);
126004
+ }
126005
+ isAbsolute() {
126006
+ let t = this.#t;
126007
+ return this.#o !== void 0 ? this.#o : this.#o = t[0] === "" && t.length > 1 || this.isDrive() || this.isUNC();
126008
+ }
126009
+ root() {
126010
+ let t = this.#t[0];
126011
+ return typeof t == "string" && this.isAbsolute() && this.#n === 0 ? t : "";
126012
+ }
126013
+ checkFollowGlobstar() {
126014
+ return !(this.#n === 0 || !this.isGlobstar() || !this.#f);
126015
+ }
126016
+ markFollowGlobstar() {
126017
+ return this.#n === 0 || !this.isGlobstar() || !this.#f ? !1 : (this.#f = !1, !0);
126018
+ }
126019
+ };
126020
+ });
126021
+ var ke = R((ee) => {
126022
+ "use strict";
126023
+ Object.defineProperty(ee, "__esModule", { value: !0 });
126024
+ ee.Ignore = void 0;
126025
+ var Ps = H(), Ar = Re(), kr = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux", Ae = class {
126026
+ relative;
126027
+ relativeChildren;
126028
+ absolute;
126029
+ absoluteChildren;
126030
+ platform;
126031
+ mmopts;
126032
+ constructor(t, { nobrace: e, nocase: s, noext: i, noglobstar: r, platform: h = kr }) {
126033
+ this.relative = [], this.absolute = [], this.relativeChildren = [], this.absoluteChildren = [], this.platform = h, this.mmopts = {
126034
+ dot: !0,
126035
+ nobrace: e,
126036
+ nocase: s,
126037
+ noext: i,
126038
+ noglobstar: r,
126039
+ optimizationLevel: 2,
126040
+ platform: h,
126041
+ nocomment: !0,
126042
+ nonegate: !0
126043
+ };
126044
+ for (let o of t) this.add(o);
126045
+ }
126046
+ add(t) {
126047
+ let e = new Ps.Minimatch(t, this.mmopts);
126048
+ for (let s = 0; s < e.set.length; s++) {
126049
+ let i = e.set[s], r = e.globParts[s];
126050
+ if (!i || !r) throw new Error("invalid pattern object");
126051
+ for (; i[0] === "." && r[0] === ".";) i.shift(), r.shift();
126052
+ let h = new Ar.Pattern(i, r, 0, this.platform), o = new Ps.Minimatch(h.globString(), this.mmopts), a = r[r.length - 1] === "**", l = h.isAbsolute();
126053
+ l ? this.absolute.push(o) : this.relative.push(o), a && (l ? this.absoluteChildren.push(o) : this.relativeChildren.push(o));
126054
+ }
126055
+ }
126056
+ ignored(t) {
126057
+ let e = t.fullpath(), s = `${e}/`, i = t.relative() || ".", r = `${i}/`;
126058
+ for (let h of this.relative) if (h.match(i) || h.match(r)) return !0;
126059
+ for (let h of this.absolute) if (h.match(e) || h.match(s)) return !0;
126060
+ return !1;
126061
+ }
126062
+ childrenIgnored(t) {
126063
+ let e = t.fullpath() + "/", s = (t.relative() || ".") + "/";
126064
+ for (let i of this.relativeChildren) if (i.match(s)) return !0;
126065
+ for (let i of this.absoluteChildren) if (i.match(e)) return !0;
126066
+ return !1;
126067
+ }
126068
+ };
126069
+ ee.Ignore = Ae;
126070
+ });
126071
+ var Fs = R((z) => {
126072
+ "use strict";
126073
+ Object.defineProperty(z, "__esModule", { value: !0 });
126074
+ z.Processor = z.SubWalks = z.MatchRecord = z.HasWalkedCache = void 0;
126075
+ var Ds = H(), se = class n {
126076
+ store;
126077
+ constructor(t = /* @__PURE__ */ new Map()) {
126078
+ this.store = t;
126079
+ }
126080
+ copy() {
126081
+ return new n(new Map(this.store));
126082
+ }
126083
+ hasWalked(t, e) {
126084
+ return this.store.get(t.fullpath())?.has(e.globString());
126085
+ }
126086
+ storeWalked(t, e) {
126087
+ let s = t.fullpath(), i = this.store.get(s);
126088
+ i ? i.add(e.globString()) : this.store.set(s, new Set([e.globString()]));
126089
+ }
126090
+ };
126091
+ z.HasWalkedCache = se;
126092
+ var ie = class {
126093
+ store = /* @__PURE__ */ new Map();
126094
+ add(t, e, s) {
126095
+ let i = (e ? 2 : 0) | (s ? 1 : 0), r = this.store.get(t);
126096
+ this.store.set(t, r === void 0 ? i : i & r);
126097
+ }
126098
+ entries() {
126099
+ return [...this.store.entries()].map(([t, e]) => [
126100
+ t,
126101
+ !!(e & 2),
126102
+ !!(e & 1)
126103
+ ]);
126104
+ }
126105
+ };
126106
+ z.MatchRecord = ie;
126107
+ var re = class {
126108
+ store = /* @__PURE__ */ new Map();
126109
+ add(t, e) {
126110
+ if (!t.canReaddir()) return;
126111
+ let s = this.store.get(t);
126112
+ s ? s.find((i) => i.globString() === e.globString()) || s.push(e) : this.store.set(t, [e]);
126113
+ }
126114
+ get(t) {
126115
+ let e = this.store.get(t);
126116
+ if (!e) throw new Error("attempting to walk unknown path");
126117
+ return e;
126118
+ }
126119
+ entries() {
126120
+ return this.keys().map((t) => [t, this.store.get(t)]);
126121
+ }
126122
+ keys() {
126123
+ return [...this.store.keys()].filter((t) => t.canReaddir());
126124
+ }
126125
+ };
126126
+ z.SubWalks = re;
126127
+ z.Processor = class n {
126128
+ hasWalkedCache;
126129
+ matches = new ie();
126130
+ subwalks = new re();
126131
+ patterns;
126132
+ follow;
126133
+ dot;
126134
+ opts;
126135
+ constructor(t, e) {
126136
+ this.opts = t, this.follow = !!t.follow, this.dot = !!t.dot, this.hasWalkedCache = e ? e.copy() : new se();
126137
+ }
126138
+ processPatterns(t, e) {
126139
+ this.patterns = e;
126140
+ let s = e.map((i) => [t, i]);
126141
+ for (let [i, r] of s) {
126142
+ this.hasWalkedCache.storeWalked(i, r);
126143
+ let h = r.root(), o = r.isAbsolute() && this.opts.absolute !== !1;
126144
+ if (h) {
126145
+ i = i.resolve(h === "/" && this.opts.root !== void 0 ? this.opts.root : h);
126146
+ let c = r.rest();
126147
+ if (c) r = c;
126148
+ else {
126149
+ this.matches.add(i, !0, !1);
126150
+ continue;
126151
+ }
126152
+ }
126153
+ if (i.isENOENT()) continue;
126154
+ let a, l, f = !1;
126155
+ for (; typeof (a = r.pattern()) == "string" && (l = r.rest());) i = i.resolve(a), r = l, f = !0;
126156
+ if (a = r.pattern(), l = r.rest(), f) {
126157
+ if (this.hasWalkedCache.hasWalked(i, r)) continue;
126158
+ this.hasWalkedCache.storeWalked(i, r);
126159
+ }
126160
+ if (typeof a == "string") {
126161
+ let c = a === ".." || a === "" || a === ".";
126162
+ this.matches.add(i.resolve(a), o, c);
126163
+ continue;
126164
+ } else if (a === Ds.GLOBSTAR) {
126165
+ (!i.isSymbolicLink() || this.follow || r.checkFollowGlobstar()) && this.subwalks.add(i, r);
126166
+ let c = l?.pattern(), d = l?.rest();
126167
+ if (!l || (c === "" || c === ".") && !d) this.matches.add(i, o, c === "" || c === ".");
126168
+ else if (c === "..") {
126169
+ let u = i.parent || i;
126170
+ d ? this.hasWalkedCache.hasWalked(u, d) || this.subwalks.add(u, d) : this.matches.add(u, o, !0);
126171
+ }
126172
+ } else a instanceof RegExp && this.subwalks.add(i, r);
126173
+ }
126174
+ return this;
126175
+ }
126176
+ subwalkTargets() {
126177
+ return this.subwalks.keys();
126178
+ }
126179
+ child() {
126180
+ return new n(this.opts, this.hasWalkedCache);
126181
+ }
126182
+ filterEntries(t, e) {
126183
+ let s = this.subwalks.get(t), i = this.child();
126184
+ for (let r of e) for (let h of s) {
126185
+ let o = h.isAbsolute(), a = h.pattern(), l = h.rest();
126186
+ a === Ds.GLOBSTAR ? i.testGlobstar(r, h, l, o) : a instanceof RegExp ? i.testRegExp(r, a, l, o) : i.testString(r, a, l, o);
126187
+ }
126188
+ return i;
126189
+ }
126190
+ testGlobstar(t, e, s, i) {
126191
+ if ((this.dot || !t.name.startsWith(".")) && (e.hasMore() || this.matches.add(t, i, !1), t.canReaddir() && (this.follow || !t.isSymbolicLink() ? this.subwalks.add(t, e) : t.isSymbolicLink() && (s && e.checkFollowGlobstar() ? this.subwalks.add(t, s) : e.markFollowGlobstar() && this.subwalks.add(t, e)))), s) {
126192
+ let r = s.pattern();
126193
+ if (typeof r == "string" && r !== ".." && r !== "" && r !== ".") this.testString(t, r, s.rest(), i);
126194
+ else if (r === "..") {
126195
+ let h = t.parent || t;
126196
+ this.subwalks.add(h, s);
126197
+ } else r instanceof RegExp && this.testRegExp(t, r, s.rest(), i);
126198
+ }
126199
+ }
126200
+ testRegExp(t, e, s, i) {
126201
+ e.test(t.name) && (s ? this.subwalks.add(t, s) : this.matches.add(t, i, !1));
126202
+ }
126203
+ testString(t, e, s, i) {
126204
+ t.isNamed(e) && (s ? this.subwalks.add(t, s) : this.matches.add(t, i, !1));
126205
+ }
126206
+ };
126207
+ });
126208
+ var Ls = R((X) => {
126209
+ "use strict";
126210
+ Object.defineProperty(X, "__esModule", { value: !0 });
126211
+ X.GlobStream = X.GlobWalker = X.GlobUtil = void 0;
126212
+ var Mr = Oe(), js = ke(), Ns = Fs(), Pr = (n, t) => typeof n == "string" ? new js.Ignore([n], t) : Array.isArray(n) ? new js.Ignore(n, t) : n, Ot = class {
126213
+ path;
126214
+ patterns;
126215
+ opts;
126216
+ seen = /* @__PURE__ */ new Set();
126217
+ paused = !1;
126218
+ aborted = !1;
126219
+ #t = [];
126220
+ #s;
126221
+ #n;
126222
+ signal;
126223
+ maxDepth;
126224
+ includeChildMatches;
126225
+ constructor(t, e, s) {
126226
+ if (this.patterns = t, this.path = e, this.opts = s, this.#n = !s.posix && s.platform === "win32" ? "\\" : "/", this.includeChildMatches = s.includeChildMatches !== !1, (s.ignore || !this.includeChildMatches) && (this.#s = Pr(s.ignore ?? [], s), !this.includeChildMatches && typeof this.#s.add != "function")) throw new Error("cannot ignore child matches, ignore lacks add() method.");
126227
+ this.maxDepth = s.maxDepth || Infinity, s.signal && (this.signal = s.signal, this.signal.addEventListener("abort", () => {
126228
+ this.#t.length = 0;
126229
+ }));
126230
+ }
126231
+ #r(t) {
126232
+ return this.seen.has(t) || !!this.#s?.ignored?.(t);
126233
+ }
126234
+ #h(t) {
126235
+ return !!this.#s?.childrenIgnored?.(t);
126236
+ }
126237
+ pause() {
126238
+ this.paused = !0;
126239
+ }
126240
+ resume() {
126241
+ if (this.signal?.aborted) return;
126242
+ this.paused = !1;
126243
+ let t;
126244
+ for (; !this.paused && (t = this.#t.shift());) t();
126245
+ }
126246
+ onResume(t) {
126247
+ this.signal?.aborted || (this.paused ? this.#t.push(t) : t());
126248
+ }
126249
+ async matchCheck(t, e) {
126250
+ if (e && this.opts.nodir) return;
126251
+ let s;
126252
+ if (this.opts.realpath) {
126253
+ if (s = t.realpathCached() || await t.realpath(), !s) return;
126254
+ t = s;
126255
+ }
126256
+ let r = t.isUnknown() || this.opts.stat ? await t.lstat() : t;
126257
+ if (this.opts.follow && this.opts.nodir && r?.isSymbolicLink()) {
126258
+ let h = await r.realpath();
126259
+ h && (h.isUnknown() || this.opts.stat) && await h.lstat();
126260
+ }
126261
+ return this.matchCheckTest(r, e);
126262
+ }
126263
+ matchCheckTest(t, e) {
126264
+ return t && (this.maxDepth === Infinity || t.depth() <= this.maxDepth) && (!e || t.canReaddir()) && (!this.opts.nodir || !t.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !t.isSymbolicLink() || !t.realpathCached()?.isDirectory()) && !this.#r(t) ? t : void 0;
126265
+ }
126266
+ matchCheckSync(t, e) {
126267
+ if (e && this.opts.nodir) return;
126268
+ let s;
126269
+ if (this.opts.realpath) {
126270
+ if (s = t.realpathCached() || t.realpathSync(), !s) return;
126271
+ t = s;
126272
+ }
126273
+ let r = t.isUnknown() || this.opts.stat ? t.lstatSync() : t;
126274
+ if (this.opts.follow && this.opts.nodir && r?.isSymbolicLink()) {
126275
+ let h = r.realpathSync();
126276
+ h && (h?.isUnknown() || this.opts.stat) && h.lstatSync();
126277
+ }
126278
+ return this.matchCheckTest(r, e);
126279
+ }
126280
+ matchFinish(t, e) {
126281
+ if (this.#r(t)) return;
126282
+ if (!this.includeChildMatches && this.#s?.add) {
126283
+ let r = `${t.relativePosix()}/**`;
126284
+ this.#s.add(r);
126285
+ }
126286
+ let s = this.opts.absolute === void 0 ? e : this.opts.absolute;
126287
+ this.seen.add(t);
126288
+ let i = this.opts.mark && t.isDirectory() ? this.#n : "";
126289
+ if (this.opts.withFileTypes) this.matchEmit(t);
126290
+ else if (s) {
126291
+ let r = this.opts.posix ? t.fullpathPosix() : t.fullpath();
126292
+ this.matchEmit(r + i);
126293
+ } else {
126294
+ let r = this.opts.posix ? t.relativePosix() : t.relative(), h = this.opts.dotRelative && !r.startsWith(".." + this.#n) ? "." + this.#n : "";
126295
+ this.matchEmit(r ? h + r + i : "." + i);
126296
+ }
126297
+ }
126298
+ async match(t, e, s) {
126299
+ let i = await this.matchCheck(t, s);
126300
+ i && this.matchFinish(i, e);
126301
+ }
126302
+ matchSync(t, e, s) {
126303
+ let i = this.matchCheckSync(t, s);
126304
+ i && this.matchFinish(i, e);
126305
+ }
126306
+ walkCB(t, e, s) {
126307
+ this.signal?.aborted && s(), this.walkCB2(t, e, new Ns.Processor(this.opts), s);
126308
+ }
126309
+ walkCB2(t, e, s, i) {
126310
+ if (this.#h(t)) return i();
126311
+ if (this.signal?.aborted && i(), this.paused) {
126312
+ this.onResume(() => this.walkCB2(t, e, s, i));
126313
+ return;
126314
+ }
126315
+ s.processPatterns(t, e);
126316
+ let r = 1, h = () => {
126317
+ --r === 0 && i();
126318
+ };
126319
+ for (let [o, a, l] of s.matches.entries()) this.#r(o) || (r++, this.match(o, a, l).then(() => h()));
126320
+ for (let o of s.subwalkTargets()) {
126321
+ if (this.maxDepth !== Infinity && o.depth() >= this.maxDepth) continue;
126322
+ r++;
126323
+ let a = o.readdirCached();
126324
+ o.calledReaddir() ? this.walkCB3(o, a, s, h) : o.readdirCB((l, f) => this.walkCB3(o, f, s, h), !0);
126325
+ }
126326
+ h();
126327
+ }
126328
+ walkCB3(t, e, s, i) {
126329
+ s = s.filterEntries(t, e);
126330
+ let r = 1, h = () => {
126331
+ --r === 0 && i();
126332
+ };
126333
+ for (let [o, a, l] of s.matches.entries()) this.#r(o) || (r++, this.match(o, a, l).then(() => h()));
126334
+ for (let [o, a] of s.subwalks.entries()) r++, this.walkCB2(o, a, s.child(), h);
126335
+ h();
126336
+ }
126337
+ walkCBSync(t, e, s) {
126338
+ this.signal?.aborted && s(), this.walkCB2Sync(t, e, new Ns.Processor(this.opts), s);
126339
+ }
126340
+ walkCB2Sync(t, e, s, i) {
126341
+ if (this.#h(t)) return i();
126342
+ if (this.signal?.aborted && i(), this.paused) {
126343
+ this.onResume(() => this.walkCB2Sync(t, e, s, i));
126344
+ return;
126345
+ }
126346
+ s.processPatterns(t, e);
126347
+ let r = 1, h = () => {
126348
+ --r === 0 && i();
126349
+ };
126350
+ for (let [o, a, l] of s.matches.entries()) this.#r(o) || this.matchSync(o, a, l);
126351
+ for (let o of s.subwalkTargets()) {
126352
+ if (this.maxDepth !== Infinity && o.depth() >= this.maxDepth) continue;
126353
+ r++;
126354
+ let a = o.readdirSync();
126355
+ this.walkCB3Sync(o, a, s, h);
126356
+ }
126357
+ h();
126358
+ }
126359
+ walkCB3Sync(t, e, s, i) {
126360
+ s = s.filterEntries(t, e);
126361
+ let r = 1, h = () => {
126362
+ --r === 0 && i();
126363
+ };
126364
+ for (let [o, a, l] of s.matches.entries()) this.#r(o) || this.matchSync(o, a, l);
126365
+ for (let [o, a] of s.subwalks.entries()) r++, this.walkCB2Sync(o, a, s.child(), h);
126366
+ h();
126367
+ }
126368
+ };
126369
+ X.GlobUtil = Ot;
126370
+ var Pe = class extends Ot {
126371
+ matches = /* @__PURE__ */ new Set();
126372
+ constructor(t, e, s) {
126373
+ super(t, e, s);
126374
+ }
126375
+ matchEmit(t) {
126376
+ this.matches.add(t);
126377
+ }
126378
+ async walk() {
126379
+ if (this.signal?.aborted) throw this.signal.reason;
126380
+ return this.path.isUnknown() && await this.path.lstat(), await new Promise((t, e) => {
126381
+ this.walkCB(this.path, this.patterns, () => {
126382
+ this.signal?.aborted ? e(this.signal.reason) : t(this.matches);
126383
+ });
126384
+ }), this.matches;
126385
+ }
126386
+ walkSync() {
126387
+ if (this.signal?.aborted) throw this.signal.reason;
126388
+ return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => {
126389
+ if (this.signal?.aborted) throw this.signal.reason;
126390
+ }), this.matches;
126391
+ }
126392
+ };
126393
+ X.GlobWalker = Pe;
126394
+ var De = class extends Ot {
126395
+ results;
126396
+ constructor(t, e, s) {
126397
+ super(t, e, s), this.results = new Mr.Minipass({
126398
+ signal: this.signal,
126399
+ objectMode: !0
126400
+ }), this.results.on("drain", () => this.resume()), this.results.on("resume", () => this.resume());
126401
+ }
126402
+ matchEmit(t) {
126403
+ this.results.write(t), this.results.flowing || this.pause();
126404
+ }
126405
+ stream() {
126406
+ let t = this.path;
126407
+ return t.isUnknown() ? t.lstat().then(() => {
126408
+ this.walkCB(t, this.patterns, () => this.results.end());
126409
+ }) : this.walkCB(t, this.patterns, () => this.results.end()), this.results;
126410
+ }
126411
+ streamSync() {
126412
+ return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => this.results.end()), this.results;
126413
+ }
126414
+ };
126415
+ X.GlobStream = De;
126416
+ });
126417
+ var je = R((oe) => {
126418
+ "use strict";
126419
+ Object.defineProperty(oe, "__esModule", { value: !0 });
126420
+ oe.Glob = void 0;
126421
+ var Dr = H(), Fr = require("node:url"), ne = Ms(), jr = Re(), he = Ls(), Nr = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux", Fe = class {
126422
+ absolute;
126423
+ cwd;
126424
+ root;
126425
+ dot;
126426
+ dotRelative;
126427
+ follow;
126428
+ ignore;
126429
+ magicalBraces;
126430
+ mark;
126431
+ matchBase;
126432
+ maxDepth;
126433
+ nobrace;
126434
+ nocase;
126435
+ nodir;
126436
+ noext;
126437
+ noglobstar;
126438
+ pattern;
126439
+ platform;
126440
+ realpath;
126441
+ scurry;
126442
+ stat;
126443
+ signal;
126444
+ windowsPathsNoEscape;
126445
+ withFileTypes;
126446
+ includeChildMatches;
126447
+ opts;
126448
+ patterns;
126449
+ constructor(t, e) {
126450
+ if (!e) throw new TypeError("glob options required");
126451
+ if (this.withFileTypes = !!e.withFileTypes, this.signal = e.signal, this.follow = !!e.follow, this.dot = !!e.dot, this.dotRelative = !!e.dotRelative, this.nodir = !!e.nodir, this.mark = !!e.mark, e.cwd ? (e.cwd instanceof URL || e.cwd.startsWith("file://")) && (e.cwd = (0, Fr.fileURLToPath)(e.cwd)) : this.cwd = "", this.cwd = e.cwd || "", this.root = e.root, this.magicalBraces = !!e.magicalBraces, this.nobrace = !!e.nobrace, this.noext = !!e.noext, this.realpath = !!e.realpath, this.absolute = e.absolute, this.includeChildMatches = e.includeChildMatches !== !1, this.noglobstar = !!e.noglobstar, this.matchBase = !!e.matchBase, this.maxDepth = typeof e.maxDepth == "number" ? e.maxDepth : Infinity, this.stat = !!e.stat, this.ignore = e.ignore, this.withFileTypes && this.absolute !== void 0) throw new Error("cannot set absolute and withFileTypes:true");
126452
+ if (typeof t == "string" && (t = [t]), this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || e.allowWindowsEscape === !1, this.windowsPathsNoEscape && (t = t.map((a) => a.replace(/\\/g, "/"))), this.matchBase) {
126453
+ if (e.noglobstar) throw new TypeError("base matching requires globstar");
126454
+ t = t.map((a) => a.includes("/") ? a : `./**/${a}`);
126455
+ }
126456
+ if (this.pattern = t, this.platform = e.platform || Nr, this.opts = {
126457
+ ...e,
126458
+ platform: this.platform
126459
+ }, e.scurry) {
126460
+ if (this.scurry = e.scurry, e.nocase !== void 0 && e.nocase !== e.scurry.nocase) throw new Error("nocase option contradicts provided scurry option");
126461
+ } else this.scurry = new (e.platform === "win32" ? ne.PathScurryWin32 : e.platform === "darwin" ? ne.PathScurryDarwin : e.platform ? ne.PathScurryPosix : ne.PathScurry)(this.cwd, {
126462
+ nocase: e.nocase,
126463
+ fs: e.fs
126464
+ });
126465
+ this.nocase = this.scurry.nocase;
126466
+ let s = this.platform === "darwin" || this.platform === "win32", i = {
126467
+ braceExpandMax: 1e4,
126468
+ ...e,
126469
+ dot: this.dot,
126470
+ matchBase: this.matchBase,
126471
+ nobrace: this.nobrace,
126472
+ nocase: this.nocase,
126473
+ nocaseMagicOnly: s,
126474
+ nocomment: !0,
126475
+ noext: this.noext,
126476
+ nonegate: !0,
126477
+ optimizationLevel: 2,
126478
+ platform: this.platform,
126479
+ windowsPathsNoEscape: this.windowsPathsNoEscape,
126480
+ debug: !!this.opts.debug
126481
+ }, [h, o] = this.pattern.map((a) => new Dr.Minimatch(a, i)).reduce((a, l) => (a[0].push(...l.set), a[1].push(...l.globParts), a), [[], []]);
126482
+ this.patterns = h.map((a, l) => {
126483
+ let f = o[l];
126484
+ if (!f) throw new Error("invalid pattern object");
126485
+ return new jr.Pattern(a, f, 0, this.platform);
126486
+ });
126487
+ }
126488
+ async walk() {
126489
+ return [...await new he.GlobWalker(this.patterns, this.scurry.cwd, {
126490
+ ...this.opts,
126491
+ maxDepth: this.maxDepth !== Infinity ? this.maxDepth + this.scurry.cwd.depth() : Infinity,
126492
+ platform: this.platform,
126493
+ nocase: this.nocase,
126494
+ includeChildMatches: this.includeChildMatches
126495
+ }).walk()];
126496
+ }
126497
+ walkSync() {
126498
+ return [...new he.GlobWalker(this.patterns, this.scurry.cwd, {
126499
+ ...this.opts,
126500
+ maxDepth: this.maxDepth !== Infinity ? this.maxDepth + this.scurry.cwd.depth() : Infinity,
126501
+ platform: this.platform,
126502
+ nocase: this.nocase,
126503
+ includeChildMatches: this.includeChildMatches
126504
+ }).walkSync()];
126505
+ }
126506
+ stream() {
126507
+ return new he.GlobStream(this.patterns, this.scurry.cwd, {
126508
+ ...this.opts,
126509
+ maxDepth: this.maxDepth !== Infinity ? this.maxDepth + this.scurry.cwd.depth() : Infinity,
126510
+ platform: this.platform,
126511
+ nocase: this.nocase,
126512
+ includeChildMatches: this.includeChildMatches
126513
+ }).stream();
126514
+ }
126515
+ streamSync() {
126516
+ return new he.GlobStream(this.patterns, this.scurry.cwd, {
126517
+ ...this.opts,
126518
+ maxDepth: this.maxDepth !== Infinity ? this.maxDepth + this.scurry.cwd.depth() : Infinity,
126519
+ platform: this.platform,
126520
+ nocase: this.nocase,
126521
+ includeChildMatches: this.includeChildMatches
126522
+ }).streamSync();
126523
+ }
126524
+ iterateSync() {
126525
+ return this.streamSync()[Symbol.iterator]();
126526
+ }
126527
+ [Symbol.iterator]() {
126528
+ return this.iterateSync();
126529
+ }
126530
+ iterate() {
126531
+ return this.stream()[Symbol.asyncIterator]();
126532
+ }
126533
+ [Symbol.asyncIterator]() {
126534
+ return this.iterate();
126535
+ }
126536
+ };
126537
+ oe.Glob = Fe;
126538
+ });
126539
+ var Ne = R((ae) => {
126540
+ "use strict";
126541
+ Object.defineProperty(ae, "__esModule", { value: !0 });
126542
+ ae.hasMagic = void 0;
126543
+ var Lr = H(), Wr = (n, t = {}) => {
126544
+ Array.isArray(n) || (n = [n]);
126545
+ for (let e of n) if (new Lr.Minimatch(e, t).hasMagic()) return !0;
126546
+ return !1;
126547
+ };
126548
+ ae.hasMagic = Wr;
126549
+ });
126550
+ Object.defineProperty(exports, "__esModule", { value: !0 });
126551
+ exports.glob = exports.sync = exports.iterate = exports.iterateSync = exports.stream = exports.streamSync = exports.Ignore = exports.hasMagic = exports.Glob = exports.unescape = exports.escape = void 0;
126552
+ exports.globStreamSync = xt;
126553
+ exports.globStream = Le;
126554
+ exports.globSync = We;
126555
+ exports.globIterateSync = Tt;
126556
+ exports.globIterate = Be;
126557
+ var Ws = H(), tt = je(), Br = Ne(), Is = H();
126558
+ Object.defineProperty(exports, "escape", {
126559
+ enumerable: !0,
126560
+ get: function() {
126561
+ return Is.escape;
126562
+ }
126563
+ });
126564
+ Object.defineProperty(exports, "unescape", {
126565
+ enumerable: !0,
126566
+ get: function() {
126567
+ return Is.unescape;
126568
+ }
126569
+ });
126570
+ var Ir = je();
126571
+ Object.defineProperty(exports, "Glob", {
126572
+ enumerable: !0,
126573
+ get: function() {
126574
+ return Ir.Glob;
126575
+ }
126576
+ });
126577
+ var Gr = Ne();
126578
+ Object.defineProperty(exports, "hasMagic", {
126579
+ enumerable: !0,
126580
+ get: function() {
126581
+ return Gr.hasMagic;
126582
+ }
126583
+ });
126584
+ var zr = ke();
126585
+ Object.defineProperty(exports, "Ignore", {
126586
+ enumerable: !0,
126587
+ get: function() {
126588
+ return zr.Ignore;
126589
+ }
126590
+ });
126591
+ function xt(n, t = {}) {
126592
+ return new tt.Glob(n, t).streamSync();
126593
+ }
126594
+ function Le(n, t = {}) {
126595
+ return new tt.Glob(n, t).stream();
126596
+ }
126597
+ function We(n, t = {}) {
126598
+ return new tt.Glob(n, t).walkSync();
126599
+ }
126600
+ async function Bs(n, t = {}) {
126601
+ return new tt.Glob(n, t).walk();
126602
+ }
126603
+ function Tt(n, t = {}) {
126604
+ return new tt.Glob(n, t).iterateSync();
126605
+ }
126606
+ function Be(n, t = {}) {
126607
+ return new tt.Glob(n, t).iterate();
126608
+ }
126609
+ exports.streamSync = xt;
126610
+ exports.stream = Object.assign(Le, { sync: xt });
126611
+ exports.iterateSync = Tt;
126612
+ exports.iterate = Object.assign(Be, { sync: Tt });
126613
+ exports.sync = Object.assign(We, {
126614
+ stream: xt,
126615
+ iterate: Tt
126616
+ });
126617
+ exports.glob = Object.assign(Bs, {
126618
+ glob: Bs,
126619
+ globSync: We,
126620
+ sync: exports.sync,
126621
+ globStream: Le,
126622
+ stream: exports.stream,
126623
+ globStreamSync: xt,
126624
+ streamSync: exports.streamSync,
126625
+ globIterate: Be,
126626
+ iterate: exports.iterate,
126627
+ globIterateSync: Tt,
126628
+ iterateSync: exports.iterateSync,
126629
+ Glob: tt.Glob,
126630
+ hasMagic: Br.hasMagic,
126631
+ escape: Ws.escape,
126632
+ unescape: Ws.unescape
126633
+ });
126634
+ exports.glob.glob = exports.glob;
126635
+ }));
126636
+ //#endregion
126637
+ //#region ../base/dist/helpers/glob.js
126638
+ var require_glob = /* @__PURE__ */ __commonJSMin(((exports) => {
126639
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
126640
+ if (k2 === void 0) k2 = k;
126641
+ var desc = Object.getOwnPropertyDescriptor(m, k);
126642
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
126643
+ enumerable: true,
126644
+ get: function() {
126645
+ return m[k];
126646
+ }
126647
+ };
126648
+ Object.defineProperty(o, k2, desc);
126649
+ }) : (function(o, m, k, k2) {
126650
+ if (k2 === void 0) k2 = k;
126651
+ o[k2] = m[k];
126652
+ }));
126653
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
126654
+ Object.defineProperty(o, "default", {
126655
+ enumerable: true,
126656
+ value: v
126657
+ });
126658
+ }) : function(o, v) {
126659
+ o["default"] = v;
126660
+ });
126661
+ var __importStar = exports && exports.__importStar || function(mod) {
126662
+ if (mod && mod.__esModule) return mod;
126663
+ var result = {};
126664
+ if (mod != null) {
126665
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
126666
+ }
126667
+ __setModuleDefault(result, mod);
126668
+ return result;
126669
+ };
126670
+ var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
126671
+ function adopt(value) {
126672
+ return value instanceof P ? value : new P(function(resolve) {
126673
+ resolve(value);
126674
+ });
126675
+ }
126676
+ return new (P || (P = Promise))(function(resolve, reject) {
126677
+ function fulfilled(value) {
126678
+ try {
126679
+ step(generator.next(value));
126680
+ } catch (e) {
126681
+ reject(e);
126682
+ }
126683
+ }
126684
+ function rejected(value) {
126685
+ try {
126686
+ step(generator["throw"](value));
126687
+ } catch (e) {
126688
+ reject(e);
126689
+ }
126690
+ }
126691
+ function step(result) {
126692
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
126693
+ }
126694
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
126695
+ });
126696
+ };
126697
+ var __importDefault = exports && exports.__importDefault || function(mod) {
126698
+ return mod && mod.__esModule ? mod : { "default": mod };
126699
+ };
126700
+ Object.defineProperty(exports, "__esModule", { value: true });
126701
+ exports.parsePathsList = exports.globAsync = exports.globSync = exports.hasMagic = void 0;
126702
+ const globModule = __importStar(require_index_min());
126703
+ const upath_1 = __importDefault(require_upath());
126704
+ const { hasMagic } = globModule;
126705
+ exports.hasMagic = hasMagic;
126706
+ /**
126707
+ * Synchronous form of `glob` which returns `upath`-normalized paths.
126708
+ */
126709
+ const globSync = (pattern, opts) => {
126710
+ return globModule.sync(pattern, Object.assign({}, opts)).map((path) => upath_1.default.normalizeSafe(path));
126711
+ };
126712
+ exports.globSync = globSync;
126713
+ /**
126714
+ * Asynchronous form of `glob` which returns `upath`-normalized paths.
126715
+ */
126716
+ const globAsync = (pattern, opts) => __awaiter(void 0, void 0, void 0, function* () {
126717
+ return (yield globModule.glob(pattern, Object.assign({}, opts))).map((path) => upath_1.default.normalizeSafe(path));
126718
+ });
126719
+ exports.globAsync = globAsync;
126720
+ const parsePathsList = (paths) => {
126721
+ if (!paths) return [];
126722
+ return paths.split(",").flatMap((path) => globModule.hasMagic(path) ? (0, exports.globSync)(path, { dotRelative: true }) : [path]).map((path) => path.endsWith("/") ? path.slice(0, -1) : path);
126723
+ };
126724
+ exports.parsePathsList = parsePathsList;
126725
+ }));
126726
+ //#endregion
123392
126727
  //#region ../base/dist/helpers/git/get-git-data.js
123393
126728
  var require_get_git_data = /* @__PURE__ */ __commonJSMin(((exports) => {
123394
126729
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
@@ -123866,10 +127201,11 @@ var require_ci = /* @__PURE__ */ __commonJSMin(((exports) => {
123866
127201
  return mod && mod.__esModule ? mod : { "default": mod };
123867
127202
  };
123868
127203
  Object.defineProperty(exports, "__esModule", { value: true });
123869
- exports.getGithubJobIDFromLogs = exports.getGithubStepInfoFromLogs = exports.enrichCIEnvFromGithubLogs = exports.getGithubJobNameFromLogs = exports.isGithubWindowsRunner = exports.shouldGetGithubJobID = exports.shouldGetGithubJobDisplayName = exports.isInteractive = exports.getCIProvider = exports.isCI = exports.getCIEnv = exports.getCIMetadata = exports.getCISpanTags = exports.githubWellKnownDiagnosticDirsWin = exports.githubWellKnownDiagnosticDirsUnix = exports.validateLevel = exports.LEVEL_TO_NUMBER = exports.VALID_LEVELS = exports.CI_LEVELS = exports.envDDGithubStepIndex = exports.envDDGithubJobName = exports.CI_ENGINES = void 0;
127204
+ exports.getGithubJobIDFromLogs = exports.getGithubStepInfoFromLogs = exports.enrichCIEnvFromGithubLogs = exports.getGithubJobNameFromLogs = exports.isGithubWindowsRunner = exports.shouldGetGithubJobID = exports.shouldGetGithubJobDisplayName = exports.isInteractive = exports.getCIProvider = exports.isCI = exports.getCIEnv = exports.getCIMetadata = exports.getCISpanTags = exports.githubWellKnownDiagnosticDirPatternsWin = exports.githubWellKnownDiagnosticDirPatternsUnix = exports.githubWellKnownDiagnosticDirsWin = exports.githubWellKnownDiagnosticDirsUnix = exports.validateLevel = exports.LEVEL_TO_NUMBER = exports.VALID_LEVELS = exports.CI_LEVELS = exports.envDDGithubStepIndex = exports.envDDGithubJobName = exports.CI_ENGINES = void 0;
123870
127205
  const fs_1$2 = __importDefault(require("fs"));
123871
127206
  const chalk_1 = __importDefault(require_source$1());
123872
127207
  const upath_1 = __importDefault(require_upath());
127208
+ const glob_1 = require_glob();
123873
127209
  const tags_1 = require_tags();
123874
127210
  const user_provided_git_1 = require_user_provided_git();
123875
127211
  const utils_1 = require_utils();
@@ -123923,12 +127259,10 @@ var require_ci = /* @__PURE__ */ __commonJSMin(((exports) => {
123923
127259
  if (level === exports.CI_LEVELS.STEP && provider !== exports.CI_ENGINES.GITHUB) return `Level '${exports.CI_LEVELS.STEP}' is only supported for provider [${exports.CI_ENGINES.GITHUB}]`;
123924
127260
  };
123925
127261
  exports.validateLevel = validateLevel;
123926
- exports.githubWellKnownDiagnosticDirsUnix = [
123927
- "/home/runner/actions-runner/cached/_diag",
123928
- "/home/runner/actions-runner/_diag",
123929
- "/opt/actions-runner/_diag"
123930
- ];
123931
- exports.githubWellKnownDiagnosticDirsWin = ["C:/actions-runner/cached/_diag", "C:/actions-runner/_diag"];
127262
+ exports.githubWellKnownDiagnosticDirsUnix = ["/home/runner/actions-runner/_diag", "/opt/actions-runner/_diag"];
127263
+ exports.githubWellKnownDiagnosticDirsWin = ["C:/actions-runner/_diag"];
127264
+ exports.githubWellKnownDiagnosticDirPatternsUnix = ["/home/runner/actions-runner/*/_diag", "/home/runner/actions-runner/*/*/_diag"];
127265
+ exports.githubWellKnownDiagnosticDirPatternsWin = ["C:/actions-runner/*/_diag", "C:/actions-runner/*/*/_diag"];
123932
127266
  const githubJobDisplayNameRegex = /"jobDisplayName":\s*"((?:[^"\\]|\\.)*)"/;
123933
127267
  const githubJodIDRegex = /"job":\s*{[\s\S]*?"v"\s*:\s*(\d+)(?:\.0)?/;
123934
127268
  /**
@@ -123959,13 +127293,27 @@ var require_ci = /* @__PURE__ */ __commonJSMin(((exports) => {
123959
127293
  const runnerTemp = process.env.RUNNER_TEMP;
123960
127294
  if (runnerTemp) {
123961
127295
  const runnerRoot = upath_1.default.resolve(runnerTemp, "..", "..");
123962
- dirs.push(upath_1.default.join(runnerRoot, "cached", "_diag"));
127296
+ dirs.push(`${runnerRoot}/*/_diag`);
127297
+ dirs.push(`${runnerRoot}/*/*/_diag`);
123963
127298
  dirs.push(upath_1.default.join(runnerRoot, "_diag"));
123964
- dirs.push(upath_1.default.join(runnerRoot, "actions-runner", "cached", "_diag"));
127299
+ dirs.push(`${runnerRoot}/actions-runner/*/_diag`);
127300
+ dirs.push(`${runnerRoot}/actions-runner/*/*/_diag`);
123965
127301
  dirs.push(upath_1.default.join(runnerRoot, "actions-runner", "_diag"));
123966
127302
  }
123967
127303
  return uniq(dirs.filter(Boolean));
123968
127304
  };
127305
+ /**
127306
+ * Expands a mixed list of literal directories and glob patterns into concrete
127307
+ * directories. Literals pass through unchanged (existence is checked later).
127308
+ */
127309
+ const expandDiagnosticDirCandidates = (candidates) => {
127310
+ const expanded = [];
127311
+ for (const candidate of candidates) if ((0, glob_1.hasMagic)(candidate)) try {
127312
+ expanded.push(...(0, glob_1.globSync)(candidate));
127313
+ } catch (_a) {}
127314
+ else expanded.push(candidate);
127315
+ return uniq(expanded);
127316
+ };
123969
127317
  const parseEmailAndName = (emailAndName) => {
123970
127318
  if (!emailAndName) return {
123971
127319
  name: "",
@@ -124557,8 +127905,16 @@ var require_ci = /* @__PURE__ */ __commonJSMin(((exports) => {
124557
127905
  const getGithubWorkerLogFiles = (context) => {
124558
127906
  let foundDiagDir = "";
124559
127907
  let workerLogFiles = [];
124560
- let wellKnownDirs = uniq([...getGithubDiagnosticDirsFromEnv(), ...exports.githubWellKnownDiagnosticDirsUnix]);
124561
- if ((0, exports.isGithubWindowsRunner)()) wellKnownDirs = uniq([...getGithubDiagnosticDirsFromEnv(), ...exports.githubWellKnownDiagnosticDirsWin]);
127908
+ let wellKnownDirs = expandDiagnosticDirCandidates([
127909
+ ...getGithubDiagnosticDirsFromEnv(),
127910
+ ...exports.githubWellKnownDiagnosticDirPatternsUnix,
127911
+ ...exports.githubWellKnownDiagnosticDirsUnix
127912
+ ]);
127913
+ if ((0, exports.isGithubWindowsRunner)()) wellKnownDirs = expandDiagnosticDirCandidates([
127914
+ ...getGithubDiagnosticDirsFromEnv(),
127915
+ ...exports.githubWellKnownDiagnosticDirPatternsWin,
127916
+ ...exports.githubWellKnownDiagnosticDirsWin
127917
+ ]);
124562
127918
  for (const currentDir of wellKnownDirs) try {
124563
127919
  const potentialLogs = fs_1$2.default.readdirSync(currentDir, { withFileTypes: true }).filter((file) => file.isFile() && file.name.startsWith("Worker_") && file.name.endsWith(".log")).map((file) => file.name);
124564
127920
  if (potentialLogs.length > 0) {
@@ -124581,38 +127937,43 @@ var require_ci = /* @__PURE__ */ __commonJSMin(((exports) => {
124581
127937
  return [foundDiagDir, workerLogFiles];
124582
127938
  };
124583
127939
  /**
124584
- * Narrows the list of Worker log files to check by using ACTIONS_ORCHESTRATION_ID
124585
- * to identify the correct log for the current job on non-ephemeral runners.
127940
+ * Narrows the list of Worker log files to the one belonging to the current job.
127941
+ *
127942
+ * Worker log filenames contain a timestamp (Worker_YYYYMMDD-HHMMSS-utc.log), so
127943
+ * alphabetical order equals chronological order. Logs are always returned
127944
+ * newest-first so that the caller's iteration naturally encounters the current
127945
+ * job's log before any earlier ones — correct on both ephemeral and non-ephemeral
127946
+ * (multi) runners regardless of the strategy used.
124586
127947
  *
124587
- * ACTIONS_ORCHESTRATION_ID format: <planId>.<jobId>.__default
127948
+ * Primary strategy (runner >= v2.331.0, feature-flag gated):
127949
+ * ACTIONS_ORCHESTRATION_ID is set by the runner from the system.orchestrationId
127950
+ * variable in the job request message. That variable is serialized into the Worker
127951
+ * log as part of the job message JSON. planId is a GUID shared by all jobs in the
127952
+ * same workflow run, so the full orchestration ID is needed for a unique match:
127953
+ * Non-matrix job: <planId>.<yaml-job-key>.__default
127954
+ * Single-dimension matrix: <planId>.<yaml-job-key>.<matrix-value>
127955
+ * Multi-dimension matrix: <planId>.<yaml-job-key>.<val1>.<val2>[...]
124588
127956
  *
124589
- * All jobs in the same GitHub Actions workflow run share the same planId.
124590
- * On multi-runners (non-ephemeral runners processing sequential jobs), multiple
124591
- * Worker log files can exist from different jobs of the same workflow run,
124592
- * all containing the same planId. Matching only on planId causes the first
124593
- * (chronologically oldest) log to be selected, which may belong to a previous
124594
- * job. The jobId (second segment of ACTIONS_ORCHESTRATION_ID) is unique per job
124595
- * and is serialized as "jobId" in the Worker log's job message JSON, allowing
124596
- * unambiguous identification of the current job's log.
127957
+ * Fallback (runner < v2.331.0 or ACTIONS_ORCHESTRATION_ID absent/unmatched):
127958
+ * Return all logs newest-first. The caller iterates until it finds a jobDisplayName,
127959
+ * which on a single-job runner is immediate, and on a multi-runner is the current
127960
+ * job's (most recent) log.
124597
127961
  */
124598
127962
  const getTargetWorkerLogFiles = (context, foundDiagDir, workerLogFiles) => {
127963
+ const sortedNewestFirst = [...workerLogFiles].sort().reverse();
124599
127964
  const orchestrationId = process.env.ACTIONS_ORCHESTRATION_ID;
124600
- if (!orchestrationId) return workerLogFiles;
124601
- const parts = orchestrationId.split(".");
124602
- const planId = parts[0];
124603
- const jobId = parts[1];
124604
- for (const logFile of workerLogFiles) {
124605
- const filePath = upath_1.default.join(foundDiagDir, logFile);
124606
- const content = fs_1$2.default.readFileSync(filePath, "utf-8");
124607
- const matchesPlanId = content.includes(`"planId": "${planId}"`);
124608
- const matchesJobId = !jobId || content.includes(`"jobId": "${jobId}"`);
124609
- if (matchesPlanId && matchesJobId) {
124610
- context.stdout.write(`Found Worker log for planId ${planId}, jobId ${jobId !== null && jobId !== void 0 ? jobId : "N/A"}: ${logFile}\n`);
124611
- return [logFile];
127965
+ if (orchestrationId) {
127966
+ for (const logFile of sortedNewestFirst) {
127967
+ const filePath = upath_1.default.join(foundDiagDir, logFile);
127968
+ const content = fs_1$2.default.readFileSync(filePath, "utf-8");
127969
+ if (content.includes("\"system.orchestrationId\":") && content.includes(`"${orchestrationId}"`)) {
127970
+ context.stdout.write(`Found Worker log via system.orchestrationId for ${orchestrationId}: ${logFile}\n`);
127971
+ return [logFile];
127972
+ }
124612
127973
  }
127974
+ context.stderr.write(`${chalk_1.default.yellow.bold("[WARNING]")} Could not find Worker log via system.orchestrationId for ${orchestrationId}, checking all logs\n`);
124613
127975
  }
124614
- context.stderr.write(`${chalk_1.default.yellow.bold("[WARNING]")} Could not find Worker log for planId ${planId}, jobId ${jobId !== null && jobId !== void 0 ? jobId : "N/A"}, checking all logs\n`);
124615
- return workerLogFiles;
127976
+ return sortedNewestFirst;
124616
127977
  };
124617
127978
  const getGithubJobAttributeFromLogFiles = (context, foundDiagDir, workerLogFiles, jobAttributeRegex) => {
124618
127979
  const logsToCheck = getTargetWorkerLogFiles(context, foundDiagDir, workerLogFiles);
@@ -152335,6 +155696,7 @@ var require_upload$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
152335
155696
  const fs_1$1 = __importDefault(require("fs"));
152336
155697
  const zlib_1 = require("zlib");
152337
155698
  const form_data_1 = __importDefault(require_form_data());
155699
+ const datadog_route_1 = require_datadog_route();
152338
155700
  const retry_1 = require_retry();
152339
155701
  var UploadStatus;
152340
155702
  (function(UploadStatus) {
@@ -152388,7 +155750,7 @@ var require_upload$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
152388
155750
  data,
152389
155751
  headers,
152390
155752
  method: "POST",
152391
- url: "v1/input"
155753
+ url: (0, datadog_route_1.datadogRoute)("/v1/input")
152392
155754
  });
152393
155755
  });
152394
155756
  }));
@@ -152446,6 +155808,7 @@ var require_gitdb = /* @__PURE__ */ __commonJSMin(((exports) => {
152446
155808
  const semver_1 = require_semver();
152447
155809
  const upath_1 = __importDefault(require_upath());
152448
155810
  const get_git_data_1 = require_get_git_data();
155811
+ const datadog_route_1 = require_datadog_route();
152449
155812
  const retry_1 = require_retry();
152450
155813
  const API_TIMEOUT = 15e3;
152451
155814
  const MAX_HISTORY = {
@@ -152599,7 +155962,7 @@ var require_gitdb = /* @__PURE__ */ __commonJSMin(((exports) => {
152599
155962
  }))
152600
155963
  });
152601
155964
  const response = yield runRequest(log, "search_commits", () => request({
152602
- url: "/api/v2/git/repository/search_commits",
155965
+ url: (0, datadog_route_1.datadogRoute)("/api/v2/git/repository/search_commits"),
152603
155966
  headers: { "Content-Type": "application/json" },
152604
155967
  data: localCommitData,
152605
155968
  method: "POST",
@@ -152676,7 +156039,7 @@ var require_gitdb = /* @__PURE__ */ __commonJSMin(((exports) => {
152676
156039
  contentType: "application/octet-stream"
152677
156040
  });
152678
156041
  return runRequest(log, "packfile", () => request({
152679
- url: "/api/v2/git/repository/packfile",
156042
+ url: (0, datadog_route_1.datadogRoute)("/api/v2/git/repository/packfile"),
152680
156043
  headers: Object.assign({}, form.getHeaders()),
152681
156044
  timeout: API_TIMEOUT,
152682
156045
  data: form,
@@ -152730,6 +156093,7 @@ var require_library = /* @__PURE__ */ __commonJSMin(((exports) => {
152730
156093
  exports.uploadRepository = exports.uploadGitCommitHash = exports.getGitCommitInfo = exports.isGitRepo = void 0;
152731
156094
  const apikey_1 = require_apikey();
152732
156095
  const logger_1 = require_logger();
156096
+ const datadog_route_1 = require_datadog_route();
152733
156097
  const upload_1 = require_upload$1();
152734
156098
  const utils_1 = require_utils();
152735
156099
  const version_1 = require_version();
@@ -152773,7 +156137,7 @@ var require_library = /* @__PURE__ */ __commonJSMin(((exports) => {
152773
156137
  apiKey,
152774
156138
  baseUrl: "https://sourcemap-intake." + datadogSite,
152775
156139
  headers: new Map([["DD-EVP-ORIGIN", "datadog-ci_sci"], ["DD-EVP-ORIGIN-VERSION", version_1.cliVersion]]),
152776
- overrideUrl: "api/v2/srcmap"
156140
+ overrideUrl: (0, datadog_route_1.datadogRoute)("/api/v2/srcmap")
152777
156141
  });
152778
156142
  if ((yield (0, exports.uploadRepository)(requestBuilder, version_1.cliVersion)(payload, {
152779
156143
  apiKeyValidator,
@@ -152863,6 +156227,7 @@ var require_upload = /* @__PURE__ */ __commonJSMin(((exports) => {
152863
156227
  const formatting_1 = require_formatting();
152864
156228
  const logger_1 = require_logger();
152865
156229
  const metrics_1 = require_metrics();
156230
+ const datadog_route_1 = require_datadog_route();
152866
156231
  const upload_1 = require_upload$1();
152867
156232
  const utils_1 = require_utils();
152868
156233
  const version_1 = require_version();
@@ -153000,7 +156365,7 @@ var require_upload = /* @__PURE__ */ __commonJSMin(((exports) => {
153000
156365
  apiKey,
153001
156366
  baseUrl: (0, api_1.getBaseIntakeUrl)(),
153002
156367
  headers: new Map([["DD-EVP-ORIGIN", "datadog-ci_git-metadata"], ["DD-EVP-ORIGIN-VERSION", this.cliVersion]]),
153003
- overrideUrl: "api/v2/srcmap"
156368
+ overrideUrl: (0, datadog_route_1.datadogRoute)("/api/v2/srcmap")
153004
156369
  });
153005
156370
  }
153006
156371
  getApiRequestBuilder(apiKey) {
@@ -153228,7 +156593,7 @@ var PluginCommand$1 = class extends import_instrument.ContainerAppInstrumentComm
153228
156593
  const envVarsByName = getEnvVarsByName(config, subscriptionId, resourceGroup);
153229
156594
  const baseSidecar = {
153230
156595
  name: config.sidecarName,
153231
- image: import_constants.SIDECAR_IMAGE,
156596
+ image: config.sidecarImage ?? import_constants.SIDECAR_IMAGE,
153232
156597
  resources: {
153233
156598
  cpu: config.sidecarCpu ?? import_instrument.DEFAULT_SIDECAR_CPU,
153234
156599
  memory: (config.sidecarMemory ?? import_instrument.DEFAULT_SIDECAR_MEMORY) + "Gi"