@malloy-publisher/server 0.12.6 → 0.13.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.
Files changed (34) hide show
  1. package/README.md +1 -1
  2. package/dist/admin-api-doc.yaml +23 -3
  3. package/dist/app/api-doc.yaml +674 -19
  4. package/dist/app/assets/{EnvironmentPage-DFozqUjF.js → EnvironmentPage-B74sWMJb.js} +1 -1
  5. package/dist/app/assets/{HomePage-Bad32fax.js → HomePage-BOb2eaod.js} +1 -1
  6. package/dist/app/assets/{MainPage-BAwxr_X1.js → MainPage-D6QvMDBc.js} +1 -1
  7. package/dist/app/assets/{ModelPage-CuW71DWw.js → ModelPage-DOac8VF3.js} +2 -2
  8. package/dist/app/assets/{PackagePage-DtP6BtnP.js → PackagePage-CpahRMLt.js} +1 -1
  9. package/dist/app/assets/{PackageSplatRoute-EsC7l_nR.js → PackageSplatRoute-BBPH3864.js} +2 -2
  10. package/dist/app/assets/{RenderedResult-DAW_Cfc-.es-BYEbDD8i.js → RenderedResult-D5HJr2Xo.es-CFweT1ny.js} +3 -3
  11. package/dist/app/assets/{RouteError--h2XhIM0.js → RouteError-r7ydeLAE.js} +1 -1
  12. package/dist/app/assets/{ThemeEditorPage-B1e_-WV5.js → ThemeEditorPage-dxaIYM0S.js} +1 -1
  13. package/dist/app/assets/{ToggleButtonGroup-CuyU-wPN.js → ToggleButtonGroup-B8CQst36.js} +1 -1
  14. package/dist/app/assets/{documentRoutes-BUqz3gK5.js → documentRoutes-Dn5OclPv.js} +1 -1
  15. package/dist/app/assets/{editPageMounted-mt7xJomn.js → editPageMounted-BXWQAQvv.js} +2 -2
  16. package/dist/app/assets/{index-CRAwrhYM.js → index-B0BUzE-t.js} +8 -2
  17. package/dist/app/assets/index-BiZnC_i6.js +1318 -0
  18. package/dist/app/assets/{index-YeH6QPnQ.js → index-C2rpVa58.js} +1 -1
  19. package/dist/app/assets/index-Co7C9Gew.js +2724 -0
  20. package/dist/app/assets/{index-oAv7JJIj.js → index-D3PvzI_V.js} +16 -16
  21. package/dist/app/assets/{index-DzSE-Kxp.js → index-jw6yCO3t.js} +1 -1
  22. package/dist/app/assets/{index.es-DdMQ3KvM.js → index.es-BfpodLFo.js} +1 -1
  23. package/dist/app/assets/usePackageLinkNavigate-CpjXFkgK.js +1 -0
  24. package/dist/app/assets/{usePackageRoute-lzkkk2Fh.js → usePackageRoute-CwvWFoYD.js} +1 -1
  25. package/dist/app/index.html +1 -1
  26. package/dist/app/mcp-app/report.css +1 -0
  27. package/dist/app/mcp-app/report.js +3422 -0
  28. package/dist/instrumentation.mjs +300 -181
  29. package/dist/package_load_worker.mjs +19302 -6881
  30. package/dist/server.mjs +42465 -18587
  31. package/package.json +19 -17
  32. package/dist/app/assets/index-DZD8qhzO.js +0 -1314
  33. package/dist/app/assets/index-DgBiwYeC.js +0 -2714
  34. package/dist/app/assets/usePackageLinkNavigate-Y0cmkFp3.js +0 -1
@@ -55,7 +55,7 @@ function installRecordPath(environmentPath, packageName) {
55
55
  function normalizeModelPath(p) {
56
56
  return p.replace(/\\/g, "/").replace(/^\.\//, "");
57
57
  }
58
- var API_PREFIX = "/api/v0", README_NAME = "README.md", PUBLISHER_CONFIG_NAME = "publisher.config.json", PACKAGE_MANIFEST_NAME = "publisher.json", PACKAGE_INSTALL_RECORDS_DIR = ".install-records", MODEL_FILE_SUFFIX = ".malloy", NOTEBOOK_FILE_SUFFIX = ".malloynb", GIVENS_DOCS_URL = "https://github.com/malloydata/publisher/blob/main/docs/givens.md", INDEX_MODEL_NAME = "index.malloy", DEFAULT_QUERY_ROW_LIMIT = 1000, DEFAULT_MAX_QUERY_ROWS = 1e5, DEFAULT_MAX_RESPONSE_BYTES = 50000000, MAX_OVERLAY_FILES = 500, MAX_OVERLAY_BYTES, MAX_CONCURRENT_DRY_RUNS = 2, DEFAULT_QUERY_TIMEOUT_MS = 300000, DEFAULT_MAX_CONCURRENT_QUERIES = 32, DEFAULT_POSTGRES_POOL_MAX = 5, DEFAULT_CALLER_HEADER = "x-publisher-caller", TEMP_DIR_PATH, PUBLISHER_DATA_DIR = "publisher_data", DEFAULT_EMBEDDING_MIN_SIMILARITY = 0.2, DEFAULT_PACKAGE_LOAD_SCHEMA_CACHE_BYTES;
58
+ var API_PREFIX = "/api/v0", README_NAME = "README.md", PUBLISHER_CONFIG_NAME = "publisher.config.json", PACKAGE_MANIFEST_NAME = "publisher.json", PACKAGE_INSTALL_RECORDS_DIR = ".install-records", MODEL_FILE_SUFFIX = ".malloy", NOTEBOOK_FILE_SUFFIX = ".malloynb", GIVENS_DOCS_URL = "https://github.com/malloydata/publisher/blob/main/docs/givens.md", MATERIALIZATION_MIGRATION_DOCS_URL = "https://github.com/malloydata/publisher/blob/main/docs/materialization-migration.md", INDEX_MODEL_NAME = "index.malloy", DEFAULT_QUERY_ROW_LIMIT = 1000, DEFAULT_MAX_QUERY_ROWS = 1e5, DEFAULT_MAX_RESPONSE_BYTES = 50000000, MAX_OVERLAY_FILES = 500, MAX_OVERLAY_BYTES, MAX_CONCURRENT_DRY_RUNS = 2, DEFAULT_QUERY_TIMEOUT_MS = 300000, DEFAULT_MAX_CONCURRENT_QUERIES = 32, DEFAULT_POSTGRES_POOL_MAX = 5, DEFAULT_CALLER_HEADER = "x-publisher-caller", TEMP_DIR_PATH, PUBLISHER_DATA_DIR = "publisher_data", DEFAULT_EMBEDDING_MIN_SIMILARITY = 0.2, DEFAULT_PACKAGE_LOAD_SCHEMA_CACHE_BYTES;
59
59
  var init_constants = __esm(() => {
60
60
  MAX_OVERLAY_BYTES = 8 * 1024 * 1024;
61
61
  TEMP_DIR_PATH = os.tmpdir();
@@ -359,6 +359,30 @@ var init_access = __esm(() => {
359
359
  env: ["SHUTDOWN_GRACEFUL_CLOSE_TIMEOUT_SECONDS"],
360
360
  flags: ["--shutdown_graceful_close_timeout_seconds"]
361
361
  }
362
+ }),
363
+ setting({
364
+ key: "workloadLog.store",
365
+ type: oneOf(["off", "on"]),
366
+ default: "off",
367
+ description: "on keeps every access record, with its workload shape, in publisher.db's workload_log table; off only logs it.",
368
+ notes: "`on` or `off`: whether the workload log (materialization v2, T1) is also kept locally, in the `workload_log` table of Publisher's own metadata database (`publisher.db`), beside the log line every query already writes. Off by default: the access record goes to the log either way. Each row is one access record with its workload shape, without the values of `#(secure)` givens. Bounded by `PUBLISHER_WORKLOAD_LOG_RETENTION_DAYS` and `PUBLISHER_WORKLOAD_LOG_MAX_ROWS`, flushed every two seconds, so a process that exits loses at most that interval's records; a failed write drops its batch and never fails a query. See [access-record.md](access-record.md#the-workload-log). Any other value fails startup.",
369
+ aliases: { env: ["PUBLISHER_WORKLOAD_LOG_STORE"] }
370
+ }),
371
+ setting({
372
+ key: "workloadLog.retentionDays",
373
+ type: integer({ min: 1 }),
374
+ default: 30,
375
+ description: "Days the workload log's local store keeps a record.",
376
+ notes: "How many days a row stays in the workload log's local store (`PUBLISHER_WORKLOAD_LOG_STORE=on`); older rows are deleted on each flush. Read only when the store is on.",
377
+ aliases: { env: ["PUBLISHER_WORKLOAD_LOG_RETENTION_DAYS"] }
378
+ }),
379
+ setting({
380
+ key: "workloadLog.maxRows",
381
+ type: integer({ min: 1 }),
382
+ default: 1e6,
383
+ description: "Rows the workload log's local store holds; the oldest go first.",
384
+ notes: "The most rows the workload log's local store (`PUBLISHER_WORKLOAD_LOG_STORE=on`) keeps, whatever their age; past it the oldest are deleted on each flush. Read only when the store is on.",
385
+ aliases: { env: ["PUBLISHER_WORKLOAD_LOG_MAX_ROWS"] }
362
386
  })
363
387
  ];
364
388
  });
@@ -507,7 +531,7 @@ var init_mcp = __esm(() => {
507
531
  type: integer({ min: 0, max: 65535 }),
508
532
  default: 4040,
509
533
  description: "MCP HTTP port.",
510
- notes: "MCP HTTP port. Serves the ten MCP tools (`list_packages`, `get_context`, `execute_query`, `compile_model`, `reload_package`, `get_status`, `search_malloy_docs`, `search_database_schema`, `get_skill`, `get_agent`) and the agent skills as MCP prompts. `list_packages` is listed first because it is where an agent starts: `get_context` requires an environment and package in its `scopes`, and those names come from there.",
534
+ notes: "MCP HTTP port. Serves the MCP tools (`list_packages`, `get_context`, `execute_query`, `compile_model`, `reload_package`, `get_status`, `search_malloy_docs`, `search_database_schema`, `get_skill`, `get_agent`, `list_reports`, `show_report`, and the panel-only `report_api`) and the agent skills as MCP prompts. `list_packages` is listed first because it is where an agent starts: `get_context` requires an environment and package in its `scopes`, and those names come from there.",
511
535
  aliases: {
512
536
  env: ["MCP_PORT"],
513
537
  flags: ["--mcp_port"]
@@ -552,6 +576,14 @@ var init_mcp = __esm(() => {
552
576
  today: { file: "json-boolean", invalid: "warn" }
553
577
  }
554
578
  }),
579
+ setting({
580
+ key: "mcp.appOrigin",
581
+ type: string(),
582
+ description: "The REST server's address as an MCP host's browser reaches it; the show_report panel loads its script from there.",
583
+ notes: "The origin (`scheme://host[:port]`, no path) the `show_report` panel, an MCP App that hosts such as Claude Desktop draw inside the conversation, loads `/mcp-app/report.js` and `/mcp-app/report.css` from, and the address the tool's \"Open in Publisher\" link points at. It is declared as the panel's only resource domain. The panel's data never comes from here: every request it makes goes back through the MCP host as a `report_api` tool call. Set it when the REST server is reached at another address, such as behind a gateway (`https://publisher.example.com`). The host's browser fetches those two files with no credentials, so behind a gateway that authenticates everything the panel stays blank: expose only `/mcp-app/*` without authentication, and keep every other path on that origin behind the gateway, because the rest of the REST API is unauthenticated and includes writes.",
584
+ defaultText: "http://localhost:{port}",
585
+ aliases: { env: ["MCP_APP_ORIGIN"] }
586
+ }),
555
587
  setting({
556
588
  key: "mcp.trace",
557
589
  type: oneOf(["retrieval"]),
@@ -868,7 +900,7 @@ var init_server = __esm(() => {
868
900
  setting({
869
901
  key: "packageVersioning",
870
902
  type: oneOf(["off", "on"]),
871
- default: "off",
903
+ default: "on",
872
904
  description: "on publishes a package from a location as the version its publisher.json declares; off installs it in place. A transition setting #1381 removes.",
873
905
  notes: "`on` or `off`: whether a publish from a location publishes an immutable [package version](package-versions.md) numbered by its `publisher.json` `version` (a missing or non-semver `version` is then a 400), or installs the package in place as before versions. A transition setting: a future release removes it and requires a `version` ([#1381](https://github.com/malloydata/publisher/issues/1381)). Versions published while it was on keep serving when it is off. Any other value fails startup.",
874
906
  aliases: { env: ["PUBLISHER_PACKAGE_VERSIONING"] }
@@ -918,6 +950,35 @@ var init_server = __esm(() => {
918
950
  });
919
951
 
920
952
  // src/settings/registry/storage.ts
953
+ import fs from "fs";
954
+ import os2 from "os";
955
+ function cgroupCpuLimit(quota, period) {
956
+ const limit = Math.ceil(Number(quota) / Number(period));
957
+ return Number.isFinite(limit) && limit >= 1 ? limit : undefined;
958
+ }
959
+ function cgroupQuota() {
960
+ const reads = [
961
+ () => {
962
+ const [quota, period] = fs.readFileSync("/sys/fs/cgroup/cpu.max", "utf8").trim().split(/\s+/);
963
+ return [quota, period];
964
+ },
965
+ () => [
966
+ fs.readFileSync("/sys/fs/cgroup/cpu/cpu.cfs_quota_us", "utf8").trim(),
967
+ fs.readFileSync("/sys/fs/cgroup/cpu/cpu.cfs_period_us", "utf8").trim()
968
+ ]
969
+ ];
970
+ for (const read of reads) {
971
+ try {
972
+ return cgroupCpuLimit(...read());
973
+ } catch {}
974
+ }
975
+ return;
976
+ }
977
+ function availableCpus() {
978
+ const cpus = os2.availableParallelism();
979
+ const quota = cgroupQuota();
980
+ return quota === undefined ? cpus : Math.min(cpus, quota);
981
+ }
921
982
  var storage;
922
983
  var init_storage = __esm(() => {
923
984
  init_types();
@@ -937,6 +998,15 @@ var init_storage = __esm(() => {
937
998
  notes: "DuckDB `memory_limit` applied to **every** DuckDB session and instance Publisher owns, as a flat value (`1GB`, `512MB`) passed to DuckDB verbatim. `off` or unset leaves DuckDB's own default, which is roughly 80% of the container's memory computed **per instance** — so N instances in one process commit N times that share, and the kernel kills the process while each of them still believes it is inside its budget. Measured in a 3 GiB container: three instances each reported a 2.3 GiB limit, 6.9 GiB of committed budget against 3 GiB of real memory. **Sizing:** the divisor is not a number of builds. Count 1 metadata store + 1 serve-shape gate session + 1 environment lookup funnel + one sandbox per loaded package × `PACKAGE_LOAD_WORKERS` (package loads run in `worker_threads`, so same address space and same cgroup) + one per in-flight materialization build, and nothing bounds concurrent builds. Budget roughly (container memory − resident baseline) ÷ that count. DuckDB does not reserve the limit up front, so an idle instance costs far less than its budget — the limit caps what it may reach, and it is the sum of the caps that has to fit. Too low fails a query with a DuckDB out-of-memory error and leaves the process up, which is the intended trade against losing the pod and every package on it. Validated at startup.",
938
999
  aliases: { env: ["PUBLISHER_DUCKDB_MEMORY_LIMIT"] }
939
1000
  }),
1001
+ setting({
1002
+ key: "duckdb.threads",
1003
+ type: string(),
1004
+ default: () => String(Math.min(4, availableCpus())),
1005
+ defaultText: "`4`, or the CPUs available when fewer",
1006
+ description: "Threads each DuckDB instance starts with, unless its connection sets threads, or off.",
1007
+ notes: "The size of the thread pool each DuckDB instance Publisher opens starts with, unless the connection sets its own `threads`. DuckDB's own default is one thread per core **per instance**, and Publisher opens many instances in one process: one sandbox per loaded package (and per version), one per file-backed DuckDB, DuckLake or Azure connection, one per in-flight materialization build, plus the metadata store. Measured on an 18-core host: about 15 threads per loaded package. The pools are fixed when each instance opens, so they add up, and the process fails when they reach the thread limit (`kern.num_taskthreads`, 12,288 per process on macOS; on Linux the cgroup `pids.max`, which Kubernetes and `docker run --pids-limit` often set to a few thousand): DuckDB reports `thread constructor failed: Resource temporarily unavailable`, and under Bun the process aborts with `panic: A C++ exception occurred`, taking every package with it. **Sizing:** count the instances as for `PUBLISHER_DUCKDB_MEMORY_LIMIT` and keep (instances × this) well under the limit. A higher value buys parallelism within one large local query (a scan of package-local Parquet or CSV); a dashboard's small queries rarely use more than a few threads. The default is `4`, or the CPUs the process may use when fewer (the host's, bounded by a cgroup v1 or v2 CPU quota), so it never starts a larger pool than DuckDB itself would. `off` restores DuckDB's one-per-core default, the behaviour before this setting existed. Applies at instance open, so a change takes effect for instances opened after a restart. A materialization build that lowers threads for a partitioned write (`PUBLISHER_PARTITIONED_WRITE_FLUSH_THRESHOLD`) still does so. Validated at startup.",
1008
+ aliases: { env: ["PUBLISHER_DUCKDB_THREADS"] }
1009
+ }),
940
1010
  setting({
941
1011
  key: "duckdb.tempDirectory",
942
1012
  type: string(),
@@ -975,11 +1045,35 @@ var init_storage = __esm(() => {
975
1045
  aliases: { env: ["PERSIST_STORAGE_MODE"] }
976
1046
  }),
977
1047
  setting({
978
- key: "persist.collisionEnforcementEnabled",
1048
+ key: "persist.addressIncludesDestination",
979
1049
  type: boolean(),
980
1050
  default: false,
1051
+ description: "Fold a storage= source's destination into its content address (re-addresses every storage= table once).",
1052
+ notes: "Materialization v2's P12: a `storage=` source's content address (its `sourceEntityId`) also covers the storage destination it builds into, so moving a source between colocated and `storage=`, or between destinations, gives it a new table instead of reusing or resolving the old one (#7087). The destination is folded in only when the source declares `storage=` and `PERSIST_STORAGE_MODE` is not `off`, so colocated addresses never move. **Turning it on re-addresses every `storage=` table once**: reuse misses, an incremental source re-seeds, each table rebuilds under its new address on its next run, and a `storage=` source serves live until it has. A table Publisher names itself (`name=` or the source's name) is rebuilt in place; a table a host instructed under a generational name is the host's to reclaim. Read once at startup: set it the same on every worker serving an environment and restart them together, or workers compute different addresses for the same source. Off by default; turn it on per deployment as a scheduled rollout, after checking the rebuild cost, and make the first run after it a full one so chained sources find their parents under the new address.",
1053
+ aliases: { env: ["PUBLISHER_PERSIST_ADDRESS_INCLUDES_DESTINATION"] }
1054
+ }),
1055
+ setting({
1056
+ key: "materialize.enabled",
1057
+ type: boolean(),
1058
+ default: false,
1059
+ description: "Read #(materialize) and build its generated #@ persist sources (materialization v2, in development).",
1060
+ notes: "Materialization v2's `#(materialize)` front end, still being built (phase 3). On, a source annotated `#(materialize)` gets a generated build source, a query-shaped `#@ persist` over the source in a companion model the package never shows, and the build plan builds it under the author's source name: the plan, a name-scoped run (`sourceNames` takes the author's name), the manifest, warnings and the path report never name the generated source. With `PERSIST_STORAGE_MODE=on`, a built `storage=` source is also served from its **served copy**: the author's own files, held in memory, with the source re-rooted on its stored table and each computed dimension read as the stored column of its own name (its `#(doc)` and other annotations kept on the field), so extensions, views, joins and importing files are the author's text unchanged; a query the served copy cannot answer answers live. The served copy also re-roots a query-shaped `#@ persist storage=` source. A served copy that does not compile is a `served-copy-not-served` package warning. A reader that opts out with `#@ -persist` (Malloy core's opt-out, still supported) recomputes live, and the served copy declines it. On, a measure that declares v1's `#@ preaggregate` gets a `deprecated-preaggregate-annotation` warning naming its v2 spelling, `#(preaggregate)` ([materialization-migration.md](materialization-migration.md)); it still works as before. Off, `#(materialize)` is ignored and the build plan is exactly what it was. Read at startup. Leave it off outside development.",
1061
+ aliases: { env: ["PUBLISHER_MATERIALIZE"] }
1062
+ }),
1063
+ setting({
1064
+ key: "materialize.gatedSources",
1065
+ type: boolean(),
1066
+ default: false,
1067
+ description: "Let the served copy, persisted views and colocated rollups answer a query through a row-level gate, with the gate grafted on them (materialization v2's R3, in development).",
1068
+ notes: "Materialization v2's R3, contracts at read, off by default until the security review that question 14 of the plan asks for. Today a query whose entry point carries a row-level gate (`#(authorize)` with a row filter, `#(access_filter)`) is never answered from a `storage=` table. On, the served copy may answer it: the served copy is the author's own text, gates included, so the row filter is grafted and proven on the served compile exactly as on live. A persisted view and a colocated `#(preaggregate)` rollup are let through the same way, each redeclaring the queried source with its gates; a rollup only when every gate reads its grain dimensions. A v1 `#@ preaggregate` rollup is the rollup leg's and is let through as a `#(preaggregate)` one is. A `storage=` rollup over a gated source is neither built nor read until the review. A gate that cannot be grafted on the served copy denies, as it does live. It also decides what is stored: on, a `#(materialize) storage=` source whose gate is its own row filter or lock is built and bound, as is a colocated `#(preaggregate)` rollup over a gated source; off, the first is refused as every gated `storage=` source is, and the second is not planned. Storing a gated source puts its columns in the managed tier, which is why this waits for the review. Read at startup.",
1069
+ aliases: { env: ["PUBLISHER_MATERIALIZE_GATED_SOURCES"] }
1070
+ }),
1071
+ setting({
1072
+ key: "persist.collisionEnforcementEnabled",
1073
+ type: boolean(),
1074
+ default: true,
981
1075
  description: "Refuse a publish where two persist sources resolve to the same table.",
982
- notes: "Set to `true` to refuse a publish in which two persist sources of one package resolve to the same table in the same destination. Off, a collision is a warning; loading a package only ever warns.",
1076
+ notes: "On by default: a publish in which two different persist sources of one package resolve to the same table in the same destination is refused, as is a build of such a package, before anything is written. Give each source a distinct `name=` to fix it. Set to `false` to opt out, which turns the refusal into a warning; loading a package only ever warns. Either way neither source is served from the shared table, which holds whichever build ran last: queries on both are answered live until each has its own `name=`. A `#(materialize)` source on another source's table is never built, whatever this says (`materialize-not-built`).",
983
1077
  aliases: { env: ["PERSIST_COLLISION_ENFORCE"] }
984
1078
  }),
985
1079
  setting({
@@ -1036,7 +1130,7 @@ var init_registry = __esm(() => {
1036
1130
  });
1037
1131
 
1038
1132
  // src/settings/settings.ts
1039
- import fs from "fs";
1133
+ import fs2 from "fs";
1040
1134
  import path2 from "path";
1041
1135
  import { isMainThread, workerData } from "worker_threads";
1042
1136
 
@@ -1225,11 +1319,11 @@ class Loader {
1225
1319
  }
1226
1320
  readFile(root, config) {
1227
1321
  const file = config ? path2.resolve(this.cwd, config) : path2.join(path2.resolve(this.cwd, root), PUBLISHER_CONFIG_NAME);
1228
- if (!fs.existsSync(file))
1322
+ if (!fs2.existsSync(file))
1229
1323
  return;
1230
1324
  this.configPath = file;
1231
1325
  try {
1232
- const parsed = JSON.parse(fs.readFileSync(file, "utf8"));
1326
+ const parsed = JSON.parse(fs2.readFileSync(file, "utf8"));
1233
1327
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
1234
1328
  this.file = parsed;
1235
1329
  }
@@ -7244,7 +7338,7 @@ var require_has_flag = __commonJS((exports, module) => {
7244
7338
 
7245
7339
  // ../../node_modules/supports-color/index.js
7246
7340
  var require_supports_color = __commonJS((exports, module) => {
7247
- var os2 = __require("os");
7341
+ var os3 = __require("os");
7248
7342
  var tty = __require("tty");
7249
7343
  var hasFlag = require_has_flag();
7250
7344
  var { env } = process;
@@ -7292,7 +7386,7 @@ var require_supports_color = __commonJS((exports, module) => {
7292
7386
  return min;
7293
7387
  }
7294
7388
  if (process.platform === "win32") {
7295
- const osRelease = os2.release().split(".");
7389
+ const osRelease = os3.release().split(".");
7296
7390
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
7297
7391
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
7298
7392
  }
@@ -12568,7 +12662,7 @@ var require_instrumentation3 = __commonJS((exports) => {
12568
12662
  Object.defineProperty(exports, "__esModule", { value: true });
12569
12663
  exports.AwsLambdaInstrumentation = exports.AWS_HANDLER_STREAMING_RESPONSE = exports.AWS_HANDLER_STREAMING_SYMBOL = exports.lambdaMaxInitInMilliseconds = exports.sqsContextGetter = undefined;
12570
12664
  var path3 = __require("path");
12571
- var fs2 = __require("fs");
12665
+ var fs3 = __require("fs");
12572
12666
  var instrumentation_1 = require_src6();
12573
12667
  var api_1 = require_src();
12574
12668
  var propagator_aws_xray_1 = require_src9();
@@ -12627,15 +12721,15 @@ var require_instrumentation3 = __commonJS((exports) => {
12627
12721
  let filename = path3.resolve(taskRoot, moduleRoot, module2);
12628
12722
  if (!filename.endsWith(".js")) {
12629
12723
  try {
12630
- fs2.statSync(`${filename}.js`);
12724
+ fs3.statSync(`${filename}.js`);
12631
12725
  filename += ".js";
12632
12726
  } catch (e) {
12633
12727
  try {
12634
- fs2.statSync(`${filename}.mjs`);
12728
+ fs3.statSync(`${filename}.mjs`);
12635
12729
  filename += ".mjs";
12636
12730
  } catch (e2) {
12637
12731
  try {
12638
- fs2.statSync(`${filename}.cjs`);
12732
+ fs3.statSync(`${filename}.cjs`);
12639
12733
  filename += ".cjs";
12640
12734
  } catch (e3) {
12641
12735
  this._diag.warn("No handler file was able to resolved with one of the known extensions for the file", filename);
@@ -24875,19 +24969,19 @@ var require_utils18 = __commonJS((exports) => {
24875
24969
  }
24876
24970
  }
24877
24971
  exports.splitTwoLevels = splitTwoLevels;
24878
- function indexFs(fs2, member) {
24972
+ function indexFs(fs3, member) {
24879
24973
  if (!member)
24880
24974
  throw new Error(JSON.stringify({ member }));
24881
24975
  const splitResult = splitTwoLevels(member);
24882
24976
  const [functionName1, functionName2] = splitResult;
24883
24977
  if (functionName2) {
24884
24978
  return {
24885
- objectToPatch: fs2[functionName1],
24979
+ objectToPatch: fs3[functionName1],
24886
24980
  functionNameToPatch: functionName2
24887
24981
  };
24888
24982
  } else {
24889
24983
  return {
24890
- objectToPatch: fs2,
24984
+ objectToPatch: fs3,
24891
24985
  functionNameToPatch: functionName1
24892
24986
  };
24893
24987
  }
@@ -24916,16 +25010,16 @@ var require_instrumentation11 = __commonJS((exports) => {
24916
25010
  }
24917
25011
  init() {
24918
25012
  return [
24919
- new instrumentation_1.InstrumentationNodeModuleDefinition("fs", ["*"], (fs2) => {
25013
+ new instrumentation_1.InstrumentationNodeModuleDefinition("fs", ["*"], (fs3) => {
24920
25014
  for (const fName of constants_1.SYNC_FUNCTIONS) {
24921
- const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs2, fName);
25015
+ const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs3, fName);
24922
25016
  if ((0, instrumentation_1.isWrapped)(objectToPatch[functionNameToPatch])) {
24923
25017
  this._unwrap(objectToPatch, functionNameToPatch);
24924
25018
  }
24925
25019
  this._wrap(objectToPatch, functionNameToPatch, this._patchSyncFunction.bind(this, fName));
24926
25020
  }
24927
25021
  for (const fName of constants_1.CALLBACK_FUNCTIONS) {
24928
- const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs2, fName);
25022
+ const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs3, fName);
24929
25023
  if ((0, instrumentation_1.isWrapped)(objectToPatch[functionNameToPatch])) {
24930
25024
  this._unwrap(objectToPatch, functionNameToPatch);
24931
25025
  }
@@ -24936,30 +25030,30 @@ var require_instrumentation11 = __commonJS((exports) => {
24936
25030
  this._wrap(objectToPatch, functionNameToPatch, this._patchCallbackFunction.bind(this, fName));
24937
25031
  }
24938
25032
  for (const fName of constants_1.PROMISE_FUNCTIONS) {
24939
- if ((0, instrumentation_1.isWrapped)(fs2.promises[fName])) {
24940
- this._unwrap(fs2.promises, fName);
25033
+ if ((0, instrumentation_1.isWrapped)(fs3.promises[fName])) {
25034
+ this._unwrap(fs3.promises, fName);
24941
25035
  }
24942
- this._wrap(fs2.promises, fName, this._patchPromiseFunction.bind(this, fName));
25036
+ this._wrap(fs3.promises, fName, this._patchPromiseFunction.bind(this, fName));
24943
25037
  }
24944
- return fs2;
24945
- }, (fs2) => {
24946
- if (fs2 === undefined)
25038
+ return fs3;
25039
+ }, (fs3) => {
25040
+ if (fs3 === undefined)
24947
25041
  return;
24948
25042
  for (const fName of constants_1.SYNC_FUNCTIONS) {
24949
- const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs2, fName);
25043
+ const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs3, fName);
24950
25044
  if ((0, instrumentation_1.isWrapped)(objectToPatch[functionNameToPatch])) {
24951
25045
  this._unwrap(objectToPatch, functionNameToPatch);
24952
25046
  }
24953
25047
  }
24954
25048
  for (const fName of constants_1.CALLBACK_FUNCTIONS) {
24955
- const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs2, fName);
25049
+ const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs3, fName);
24956
25050
  if ((0, instrumentation_1.isWrapped)(objectToPatch[functionNameToPatch])) {
24957
25051
  this._unwrap(objectToPatch, functionNameToPatch);
24958
25052
  }
24959
25053
  }
24960
25054
  for (const fName of constants_1.PROMISE_FUNCTIONS) {
24961
- if ((0, instrumentation_1.isWrapped)(fs2.promises[fName])) {
24962
- this._unwrap(fs2.promises, fName);
25055
+ if ((0, instrumentation_1.isWrapped)(fs3.promises[fName])) {
25056
+ this._unwrap(fs3.promises, fName);
24963
25057
  }
24964
25058
  }
24965
25059
  }),
@@ -30288,8 +30382,8 @@ var require_common2 = __commonJS((exports) => {
30288
30382
 
30289
30383
  // ../../node_modules/systeminformation/lib/util.js
30290
30384
  var require_util = __commonJS((exports) => {
30291
- var os2 = __require("os");
30292
- var fs2 = __require("fs");
30385
+ var os3 = __require("os");
30386
+ var fs3 = __require("fs");
30293
30387
  var path3 = __require("path");
30294
30388
  var spawn = __require("child_process").spawn;
30295
30389
  var exec = __require("child_process").exec;
@@ -30395,7 +30489,7 @@ var require_util = __commonJS((exports) => {
30395
30489
  }
30396
30490
  function cores() {
30397
30491
  if (_cores === 0) {
30398
- _cores = os2.cpus().length;
30492
+ _cores = os3.cpus().length;
30399
30493
  }
30400
30494
  return _cores;
30401
30495
  }
@@ -30587,7 +30681,7 @@ var require_util = __commonJS((exports) => {
30587
30681
  _powerShell = "powershell.exe";
30588
30682
  if (_windows) {
30589
30683
  const defaultPath = `${WINDIR}\\system32\\WindowsPowerShell\\v1.0\\powershell.exe`;
30590
- if (fs2.existsSync(defaultPath)) {
30684
+ if (fs3.existsSync(defaultPath)) {
30591
30685
  _powerShell = defaultPath;
30592
30686
  }
30593
30687
  }
@@ -30661,7 +30755,7 @@ var require_util = __commonJS((exports) => {
30661
30755
  function powerShellRelease() {
30662
30756
  try {
30663
30757
  if (_psChild) {
30664
- _psChild.stdin.write("exit" + os2.EOL);
30758
+ _psChild.stdin.write("exit" + os3.EOL);
30665
30759
  _psChild.stdin.end();
30666
30760
  }
30667
30761
  } catch {
@@ -30688,7 +30782,7 @@ var require_util = __commonJS((exports) => {
30688
30782
  });
30689
30783
  try {
30690
30784
  if (_psChild && _psChild.pid) {
30691
- _psChild.stdin.write(_psToUTF8 + "echo " + _psCmdStart + id + _psIdSeperator + "; " + os2.EOL + cmd + os2.EOL + "echo " + _psCmdSeperator + os2.EOL);
30785
+ _psChild.stdin.write(_psToUTF8 + "echo " + _psCmdStart + id + _psIdSeperator + "; " + os3.EOL + cmd + os3.EOL + "echo " + _psCmdSeperator + os3.EOL);
30692
30786
  }
30693
30787
  } catch {
30694
30788
  resolve("");
@@ -30700,7 +30794,7 @@ var require_util = __commonJS((exports) => {
30700
30794
  return new Promise((resolve) => {
30701
30795
  process.nextTick(() => {
30702
30796
  try {
30703
- const osVersion = os2.release().split(".").map(Number);
30797
+ const osVersion = os3.release().split(".").map(Number);
30704
30798
  const spanOptions = osVersion[0] < 10 ? ["-NoProfile", "-NoLogo", "-InputFormat", "Text", "-NoExit", "-ExecutionPolicy", "Unrestricted", "-Command", "-"] : ["-NoProfile", "-NoLogo", "-InputFormat", "Text", "-ExecutionPolicy", "Unrestricted", "-Command", _psToUTF8 + cmd];
30705
30799
  const child = spawn(_powerShell, spanOptions, {
30706
30800
  stdio: "pipe",
@@ -30732,8 +30826,8 @@ var require_util = __commonJS((exports) => {
30732
30826
  });
30733
30827
  if (osVersion[0] < 10) {
30734
30828
  try {
30735
- child.stdin.write(_psToUTF8 + cmd + os2.EOL);
30736
- child.stdin.write("exit" + os2.EOL);
30829
+ child.stdin.write(_psToUTF8 + cmd + os3.EOL);
30830
+ child.stdin.write("exit" + os3.EOL);
30737
30831
  child.stdin.end();
30738
30832
  } catch {
30739
30833
  child.kill();
@@ -30851,7 +30945,7 @@ var require_util = __commonJS((exports) => {
30851
30945
  cpuinfo = _rpi_cpuinfo;
30852
30946
  } else if (cpuinfo === undefined) {
30853
30947
  try {
30854
- cpuinfo = fs2.readFileSync("/proc/cpuinfo", { encoding: "utf8" }).toString().split(`
30948
+ cpuinfo = fs3.readFileSync("/proc/cpuinfo", { encoding: "utf8" }).toString().split(`
30855
30949
  `);
30856
30950
  _rpi_cpuinfo = cpuinfo;
30857
30951
  } catch {
@@ -30865,7 +30959,7 @@ var require_util = __commonJS((exports) => {
30865
30959
  function isRaspbian() {
30866
30960
  let osrelease = [];
30867
30961
  try {
30868
- osrelease = fs2.readFileSync("/etc/os-release", { encoding: "utf8" }).toString().split(`
30962
+ osrelease = fs3.readFileSync("/etc/os-release", { encoding: "utf8" }).toString().split(`
30869
30963
  `);
30870
30964
  } catch {
30871
30965
  return false;
@@ -30884,9 +30978,9 @@ var require_util = __commonJS((exports) => {
30884
30978
  });
30885
30979
  }
30886
30980
  function darwinXcodeExists() {
30887
- const cmdLineToolsExists = fs2.existsSync("/Library/Developer/CommandLineTools/usr/bin/");
30888
- const xcodeAppExists = fs2.existsSync("/Applications/Xcode.app/Contents/Developer/Tools");
30889
- const xcodeExists = fs2.existsSync("/Library/Developer/Xcode/");
30981
+ const cmdLineToolsExists = fs3.existsSync("/Library/Developer/CommandLineTools/usr/bin/");
30982
+ const xcodeAppExists = fs3.existsSync("/Applications/Xcode.app/Contents/Developer/Tools");
30983
+ const xcodeExists = fs3.existsSync("/Library/Developer/Xcode/");
30890
30984
  return cmdLineToolsExists || xcodeExists || xcodeAppExists;
30891
30985
  }
30892
30986
  function nanoSeconds() {
@@ -31031,8 +31125,8 @@ var require_util = __commonJS((exports) => {
31031
31125
  return ("00000000" + parseInt(hex, 16).toString(2)).substr(-8);
31032
31126
  }
31033
31127
  function getFilesInPath(source) {
31034
- const lstatSync = fs2.lstatSync;
31035
- const readdirSync = fs2.readdirSync;
31128
+ const lstatSync = fs3.lstatSync;
31129
+ const readdirSync = fs3.readdirSync;
31036
31130
  const join = path3.join;
31037
31131
  function isDirectory(source2) {
31038
31132
  return lstatSync(source2).isDirectory();
@@ -31063,7 +31157,7 @@ var require_util = __commonJS((exports) => {
31063
31157
  return [];
31064
31158
  }
31065
31159
  }
31066
- if (fs2.existsSync(source)) {
31160
+ if (fs3.existsSync(source)) {
31067
31161
  return getFilesRecursively(source);
31068
31162
  } else {
31069
31163
  return [];
@@ -31266,7 +31360,7 @@ var require_util = __commonJS((exports) => {
31266
31360
  cpuinfo = _rpi_cpuinfo;
31267
31361
  } else {
31268
31362
  try {
31269
- cpuinfo = fs2.readFileSync("/proc/cpuinfo", { encoding: "utf8" }).toString().split(`
31363
+ cpuinfo = fs3.readFileSync("/proc/cpuinfo", { encoding: "utf8" }).toString().split(`
31270
31364
  `);
31271
31365
  _rpi_cpuinfo = cpuinfo;
31272
31366
  } catch {
@@ -32939,12 +33033,12 @@ var require_util = __commonJS((exports) => {
32939
33033
 
32940
33034
  // ../../node_modules/systeminformation/lib/network.js
32941
33035
  var require_network = __commonJS((exports) => {
32942
- var os2 = __require("os");
33036
+ var os3 = __require("os");
32943
33037
  var exec = __require("child_process").exec;
32944
33038
  var execSync = __require("child_process").execSync;
32945
33039
  var execFileSync = __require("child_process").execFileSync;
32946
33040
  var readFileSync = __require("fs").readFileSync;
32947
- var fs2 = __require("fs");
33041
+ var fs3 = __require("fs");
32948
33042
  var util = require_util();
32949
33043
  var _platform = process.platform;
32950
33044
  var _linux = _platform === "linux" || _platform === "android";
@@ -32965,7 +33059,7 @@ var require_network = __commonJS((exports) => {
32965
33059
  let ifacename = "";
32966
33060
  let ifacenameFirst = "";
32967
33061
  try {
32968
- const ifaces = os2.networkInterfaces();
33062
+ const ifaces = os3.networkInterfaces();
32969
33063
  let scopeid = 9999;
32970
33064
  for (let dev in ifaces) {
32971
33065
  if ({}.hasOwnProperty.call(ifaces, dev)) {
@@ -32985,7 +33079,7 @@ var require_network = __commonJS((exports) => {
32985
33079
  let defaultIp = "";
32986
33080
  const cmd = "netstat -r";
32987
33081
  const result = execSync(cmd, util.execOptsWin);
32988
- const lines = result.toString().split(os2.EOL);
33082
+ const lines = result.toString().split(os3.EOL);
32989
33083
  lines.forEach((line) => {
32990
33084
  line = line.replace(/\s+/g, " ").trim();
32991
33085
  if (line.indexOf("0.0.0.0 0.0.0.0") > -1 && !/[a-zA-Z]/.test(line)) {
@@ -33636,7 +33730,7 @@ Profile on interface`);
33636
33730
  defaultString = "" + defaultString;
33637
33731
  return new Promise((resolve) => {
33638
33732
  process.nextTick(() => {
33639
- const ifaces = os2.networkInterfaces();
33733
+ const ifaces = os3.networkInterfaces();
33640
33734
  let result = [];
33641
33735
  let nics = [];
33642
33736
  let dnsSuffixes = [];
@@ -34192,7 +34286,7 @@ Profile on interface`);
34192
34286
  if (!_network[ifaceSanitized] || _network[ifaceSanitized] && !_network[ifaceSanitized].ms || _network[ifaceSanitized] && _network[ifaceSanitized].ms && Date.now() - _network[ifaceSanitized].ms >= 500) {
34193
34287
  if (_linux) {
34194
34288
  const ifaceIsSegment = ifaceSanitized !== "" && ifaceSanitized !== "." && ifaceSanitized !== ".." && ifaceSanitized.split("").every((c) => c !== "/");
34195
- if (ifaceIsSegment && fs2.existsSync("/sys/class/net/" + ifaceSanitized)) {
34289
+ if (ifaceIsSegment && fs3.existsSync("/sys/class/net/" + ifaceSanitized)) {
34196
34290
  cmd = "cat /sys/class/net/" + ifaceSanitized + "/operstate; " + "cat /sys/class/net/" + ifaceSanitized + "/statistics/rx_bytes; " + "cat /sys/class/net/" + ifaceSanitized + "/statistics/tx_bytes; " + "cat /sys/class/net/" + ifaceSanitized + "/statistics/rx_dropped; " + "cat /sys/class/net/" + ifaceSanitized + "/statistics/rx_errors; " + "cat /sys/class/net/" + ifaceSanitized + "/statistics/tx_dropped; " + "cat /sys/class/net/" + ifaceSanitized + "/statistics/tx_errors; ";
34197
34291
  exec(cmd, (error, stdout) => {
34198
34292
  if (!error) {
@@ -34705,7 +34799,7 @@ Profile on interface`);
34705
34799
  if (_windows) {
34706
34800
  try {
34707
34801
  exec("netstat -r", util.execOptsWin, (error, stdout) => {
34708
- const lines = stdout.toString().split(os2.EOL);
34802
+ const lines = stdout.toString().split(os3.EOL);
34709
34803
  lines.forEach((line) => {
34710
34804
  line = line.replace(/\s+/g, " ").trim();
34711
34805
  if (line.indexOf("0.0.0.0 0.0.0.0") > -1 && !/[a-zA-Z]/.test(line)) {
@@ -75074,15 +75168,15 @@ var require_AwsBeanstalkDetector = __commonJS((exports) => {
75074
75168
  var core_1 = require_src3();
75075
75169
  var semantic_conventions_1 = require_src78();
75076
75170
  var semconv_1 = require_semconv24();
75077
- var fs2 = __require("fs");
75171
+ var fs3 = __require("fs");
75078
75172
  var util = __require("util");
75079
75173
  var DEFAULT_BEANSTALK_CONF_PATH = "/var/elasticbeanstalk/xray/environment.conf";
75080
75174
  var WIN_OS_BEANSTALK_CONF_PATH = "C:\\Program Files\\Amazon\\XRay\\environment.conf";
75081
75175
 
75082
75176
  class AwsBeanstalkDetector {
75083
75177
  BEANSTALK_CONF_PATH;
75084
- static readFileAsync = util.promisify(fs2.readFile);
75085
- static fileAccessAsync = util.promisify(fs2.access);
75178
+ static readFileAsync = util.promisify(fs3.readFile);
75179
+ static fileAccessAsync = util.promisify(fs3.access);
75086
75180
  constructor() {
75087
75181
  if (process.platform === "win32") {
75088
75182
  this.BEANSTALK_CONF_PATH = WIN_OS_BEANSTALK_CONF_PATH;
@@ -75108,7 +75202,7 @@ var require_AwsBeanstalkDetector = __commonJS((exports) => {
75108
75202
  }
75109
75203
  async _gatherData() {
75110
75204
  try {
75111
- await AwsBeanstalkDetector.fileAccessAsync(this.BEANSTALK_CONF_PATH, fs2.constants.R_OK);
75205
+ await AwsBeanstalkDetector.fileAccessAsync(this.BEANSTALK_CONF_PATH, fs3.constants.R_OK);
75112
75206
  const rawData = await AwsBeanstalkDetector.readFileAsync(this.BEANSTALK_CONF_PATH, "utf8");
75113
75207
  const parsedData = JSON.parse(rawData);
75114
75208
  return {
@@ -75264,15 +75358,15 @@ var require_AwsEcsDetector = __commonJS((exports) => {
75264
75358
  var semconv_1 = require_semconv24();
75265
75359
  var http = __require("http");
75266
75360
  var util = __require("util");
75267
- var fs2 = __require("fs");
75268
- var os2 = __require("os");
75361
+ var fs3 = __require("fs");
75362
+ var os3 = __require("os");
75269
75363
  var HTTP_TIMEOUT_IN_MS = 1000;
75270
75364
 
75271
75365
  class AwsEcsDetector {
75272
75366
  static CONTAINER_ID_LENGTH = 64;
75273
75367
  static CONTAINER_ID_LENGTH_MIN = 32;
75274
75368
  static DEFAULT_CGROUP_PATH = "/proc/self/cgroup";
75275
- static readFileAsync = util.promisify(fs2.readFile);
75369
+ static readFileAsync = util.promisify(fs3.readFile);
75276
75370
  detect() {
75277
75371
  const attributes = api_1.context.with((0, core_1.suppressTracing)(api_1.context.active()), () => this._getAttributes());
75278
75372
  return { attributes };
@@ -75314,7 +75408,7 @@ var require_AwsEcsDetector = __commonJS((exports) => {
75314
75408
  const data = {
75315
75409
  [semconv_1.ATTR_CLOUD_PROVIDER]: semconv_1.CLOUD_PROVIDER_VALUE_AWS,
75316
75410
  [semconv_1.ATTR_CLOUD_PLATFORM]: semconv_1.CLOUD_PLATFORM_VALUE_AWS_ECS,
75317
- [semconv_1.ATTR_CONTAINER_NAME]: os2.hostname(),
75411
+ [semconv_1.ATTR_CONTAINER_NAME]: os3.hostname(),
75318
75412
  [semconv_1.ATTR_CONTAINER_ID]: await this._getContainerId()
75319
75413
  };
75320
75414
  const metadataUrl = process.env.ECS_CONTAINER_METADATA_URI_V4;
@@ -75459,7 +75553,7 @@ var require_AwsEksDetector = __commonJS((exports) => {
75459
75553
  var core_1 = require_src3();
75460
75554
  var semconv_1 = require_semconv24();
75461
75555
  var https = __require("https");
75462
- var fs2 = __require("fs");
75556
+ var fs3 = __require("fs");
75463
75557
  var util = __require("util");
75464
75558
  var api_2 = require_src();
75465
75559
 
@@ -75473,8 +75567,8 @@ var require_AwsEksDetector = __commonJS((exports) => {
75473
75567
  DEFAULT_CGROUP_PATH = "/proc/self/cgroup";
75474
75568
  TIMEOUT_MS = 2000;
75475
75569
  UTF8_UNICODE = "utf8";
75476
- static readFileAsync = util.promisify(fs2.readFile);
75477
- static fileAccessAsync = util.promisify(fs2.access);
75570
+ static readFileAsync = util.promisify(fs3.readFile);
75571
+ static fileAccessAsync = util.promisify(fs3.access);
75478
75572
  detect() {
75479
75573
  const dataPromise = api_1.context.with((0, core_1.suppressTracing)(api_1.context.active()), () => this._gatherData());
75480
75574
  const attrNames = [
@@ -75748,7 +75842,7 @@ var require_semconv25 = __commonJS((exports) => {
75748
75842
  var require_ContainerDetector = __commonJS((exports) => {
75749
75843
  Object.defineProperty(exports, "__esModule", { value: true });
75750
75844
  exports.containerDetector = exports.ContainerDetector = undefined;
75751
- var fs2 = __require("fs");
75845
+ var fs3 = __require("fs");
75752
75846
  var util = __require("util");
75753
75847
  var api_1 = require_src();
75754
75848
  var core_1 = require_src3();
@@ -75762,7 +75856,7 @@ var require_ContainerDetector = __commonJS((exports) => {
75762
75856
  UTF8_UNICODE = "utf8";
75763
75857
  HOSTNAME = "hostname";
75764
75858
  MARKING_PREFIX = ["containers", "overlay-containers"];
75765
- static readFileAsync = util.promisify(fs2.readFile);
75859
+ static readFileAsync = util.promisify(fs3.readFile);
75766
75860
  detect() {
75767
75861
  const attributes = {
75768
75862
  [semconv_1.ATTR_CONTAINER_ID]: this._getContainerIdWithSuppressedTracing()
@@ -78021,7 +78115,7 @@ var require_ProcessDetector = __commonJS((exports) => {
78021
78115
  exports.processDetector = undefined;
78022
78116
  var api_1 = require_src();
78023
78117
  var semconv_1 = require_semconv27();
78024
- var os2 = __require("os");
78118
+ var os3 = __require("os");
78025
78119
 
78026
78120
  class ProcessDetector {
78027
78121
  detect(_config) {
@@ -78042,7 +78136,7 @@ var require_ProcessDetector = __commonJS((exports) => {
78042
78136
  attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
78043
78137
  }
78044
78138
  try {
78045
- const userInfo = os2.userInfo();
78139
+ const userInfo = os3.userInfo();
78046
78140
  attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo.username;
78047
78141
  } catch (e) {
78048
78142
  api_1.diag.debug(`error obtaining process owner: ${e}`);
@@ -83658,7 +83752,7 @@ var require_node_domexception = __commonJS((exports, module) => {
83658
83752
  });
83659
83753
 
83660
83754
  // ../../node_modules/fetch-blob/from.js
83661
- import { statSync, createReadStream, promises as fs2 } from "node:fs";
83755
+ import { statSync, createReadStream, promises as fs3 } from "node:fs";
83662
83756
  import { basename } from "node:path";
83663
83757
  var import_node_domexception, stat, blobFromSync = (path3, type) => fromBlob(statSync(path3), path3, type), blobFrom = (path3, type) => stat(path3).then((stat2) => fromBlob(stat2, path3, type)), fileFrom = (path3, type) => stat(path3).then((stat2) => fromFile(stat2, path3, type)), fileFromSync = (path3, type) => fromFile(statSync(path3), path3, type), fromBlob = (stat2, path3, type = "") => new fetch_blob_default([new BlobDataItem({
83664
83758
  path: path3,
@@ -83675,7 +83769,7 @@ var init_from = __esm(() => {
83675
83769
  init_file();
83676
83770
  init_fetch_blob();
83677
83771
  import_node_domexception = __toESM(require_node_domexception(), 1);
83678
- ({ stat } = fs2);
83772
+ ({ stat } = fs3);
83679
83773
  BlobDataItem = class BlobDataItem {
83680
83774
  #path;
83681
83775
  #start;
@@ -90305,7 +90399,7 @@ var require_ProcessDetector2 = __commonJS((exports) => {
90305
90399
  exports.processDetector = undefined;
90306
90400
  var api_1 = require_src();
90307
90401
  var semconv_1 = require_semconv29();
90308
- var os2 = __require("os");
90402
+ var os3 = __require("os");
90309
90403
 
90310
90404
  class ProcessDetector {
90311
90405
  detect(_config) {
@@ -90326,7 +90420,7 @@ var require_ProcessDetector2 = __commonJS((exports) => {
90326
90420
  attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
90327
90421
  }
90328
90422
  try {
90329
- const userInfo = os2.userInfo();
90423
+ const userInfo = os3.userInfo();
90330
90424
  attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo.username;
90331
90425
  } catch (e2) {
90332
90426
  api_1.diag.debug(`error obtaining process owner: ${e2}`);
@@ -90556,7 +90650,7 @@ var require_types9 = __commonJS((exports) => {
90556
90650
  var require_AzureAksDetector = __commonJS((exports) => {
90557
90651
  Object.defineProperty(exports, "__esModule", { value: true });
90558
90652
  exports.azureAksDetector = undefined;
90559
- var fs3 = __require("fs");
90653
+ var fs4 = __require("fs");
90560
90654
  var path3 = __require("path");
90561
90655
  var api_1 = require_src();
90562
90656
  var semconv_1 = require_semconv30();
@@ -90613,7 +90707,7 @@ var require_AzureAksDetector = __commonJS((exports) => {
90613
90707
  return;
90614
90708
  }
90615
90709
  readAksMetadataContent() {
90616
- const stats = fs3.statSync(types_1.AKS_METADATA_FILE_PATH, {
90710
+ const stats = fs4.statSync(types_1.AKS_METADATA_FILE_PATH, {
90617
90711
  throwIfNoEntry: false
90618
90712
  });
90619
90713
  if (!stats) {
@@ -90621,12 +90715,12 @@ var require_AzureAksDetector = __commonJS((exports) => {
90621
90715
  }
90622
90716
  if (stats.isDirectory()) {
90623
90717
  const keyPath = path3.join(types_1.AKS_METADATA_FILE_PATH, types_1.AKS_CLUSTER_RESOURCE_ID_KEY);
90624
- if (!fs3.existsSync(keyPath)) {
90718
+ if (!fs4.existsSync(keyPath)) {
90625
90719
  return;
90626
90720
  }
90627
- return fs3.readFileSync(keyPath, "utf8");
90721
+ return fs4.readFileSync(keyPath, "utf8");
90628
90722
  }
90629
- return fs3.readFileSync(types_1.AKS_METADATA_FILE_PATH, "utf8");
90723
+ return fs4.readFileSync(types_1.AKS_METADATA_FILE_PATH, "utf8");
90630
90724
  }
90631
90725
  parseAksMetadata(content) {
90632
90726
  const metadata = {};
@@ -98003,7 +98097,7 @@ var require_ProcessDetector3 = __commonJS((exports) => {
98003
98097
  exports.processDetector = undefined;
98004
98098
  var api_1 = require_src();
98005
98099
  var semconv_1 = require_semconv33();
98006
- var os2 = __require("os");
98100
+ var os3 = __require("os");
98007
98101
 
98008
98102
  class ProcessDetector {
98009
98103
  detect(_config) {
@@ -98024,7 +98118,7 @@ var require_ProcessDetector3 = __commonJS((exports) => {
98024
98118
  attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
98025
98119
  }
98026
98120
  try {
98027
- const userInfo = os2.userInfo();
98121
+ const userInfo = os3.userInfo();
98028
98122
  attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo.username;
98029
98123
  } catch (e2) {
98030
98124
  api_1.diag.debug(`error obtaining process owner: ${e2}`);
@@ -101356,7 +101450,7 @@ var require_shared_env_configuration = __commonJS((exports) => {
101356
101450
  var require_otlp_node_http_env_configuration = __commonJS((exports) => {
101357
101451
  Object.defineProperty(exports, "__esModule", { value: true });
101358
101452
  exports.getNodeHttpConfigurationFromEnvironment = undefined;
101359
- var fs3 = __require("fs");
101453
+ var fs4 = __require("fs");
101360
101454
  var path3 = __require("path");
101361
101455
  var core_1 = require_src3();
101362
101456
  var api_1 = require_src();
@@ -101421,7 +101515,7 @@ var require_otlp_node_http_env_configuration = __commonJS((exports) => {
101421
101515
  const filePath = signalSpecificPath ?? nonSignalSpecificPath;
101422
101516
  if (filePath != null) {
101423
101517
  try {
101424
- return fs3.readFileSync(path3.resolve(process.cwd(), filePath));
101518
+ return fs4.readFileSync(path3.resolve(process.cwd(), filePath));
101425
101519
  } catch {
101426
101520
  api_1.diag.warn(warningMessage);
101427
101521
  return;
@@ -104193,7 +104287,7 @@ var require_ProcessDetector4 = __commonJS((exports) => {
104193
104287
  exports.processDetector = undefined;
104194
104288
  var api_1 = require_src();
104195
104289
  var semconv_1 = require_semconv37();
104196
- var os2 = __require("os");
104290
+ var os3 = __require("os");
104197
104291
 
104198
104292
  class ProcessDetector {
104199
104293
  detect(_config) {
@@ -104214,7 +104308,7 @@ var require_ProcessDetector4 = __commonJS((exports) => {
104214
104308
  attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
104215
104309
  }
104216
104310
  try {
104217
- const userInfo = os2.userInfo();
104311
+ const userInfo = os3.userInfo();
104218
104312
  attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo.username;
104219
104313
  } catch (e2) {
104220
104314
  api_1.diag.debug(`error obtaining process owner: ${e2}`);
@@ -107733,7 +107827,7 @@ var require_ProcessDetector5 = __commonJS((exports) => {
107733
107827
  exports.processDetector = undefined;
107734
107828
  var api_1 = require_src();
107735
107829
  var semconv_1 = require_semconv39();
107736
- var os2 = __require("os");
107830
+ var os3 = __require("os");
107737
107831
 
107738
107832
  class ProcessDetector {
107739
107833
  detect(_config) {
@@ -107754,7 +107848,7 @@ var require_ProcessDetector5 = __commonJS((exports) => {
107754
107848
  attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
107755
107849
  }
107756
107850
  try {
107757
- const userInfo = os2.userInfo();
107851
+ const userInfo = os3.userInfo();
107758
107852
  attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo.username;
107759
107853
  } catch (e2) {
107760
107854
  api_1.diag.debug(`error obtaining process owner: ${e2}`);
@@ -110334,7 +110428,7 @@ var require_ProcessDetector6 = __commonJS((exports) => {
110334
110428
  exports.processDetector = undefined;
110335
110429
  var api_1 = require_src();
110336
110430
  var semconv_1 = require_semconv40();
110337
- var os2 = __require("os");
110431
+ var os3 = __require("os");
110338
110432
 
110339
110433
  class ProcessDetector {
110340
110434
  detect(_config) {
@@ -110355,7 +110449,7 @@ var require_ProcessDetector6 = __commonJS((exports) => {
110355
110449
  attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
110356
110450
  }
110357
110451
  try {
110358
- const userInfo = os2.userInfo();
110452
+ const userInfo = os3.userInfo();
110359
110453
  attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo.username;
110360
110454
  } catch (e2) {
110361
110455
  api_1.diag.debug(`error obtaining process owner: ${e2}`);
@@ -112932,14 +113026,14 @@ var require_tls_helpers = __commonJS((exports) => {
112932
113026
  Object.defineProperty(exports, "__esModule", { value: true });
112933
113027
  exports.CIPHER_SUITES = undefined;
112934
113028
  exports.getDefaultRootsData = getDefaultRootsData;
112935
- var fs3 = __require("fs");
113029
+ var fs4 = __require("fs");
112936
113030
  exports.CIPHER_SUITES = process.env.GRPC_SSL_CIPHER_SUITES;
112937
113031
  var DEFAULT_ROOTS_FILE_PATH = process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH;
112938
113032
  var defaultRootsData = null;
112939
113033
  function getDefaultRootsData() {
112940
113034
  if (DEFAULT_ROOTS_FILE_PATH) {
112941
113035
  if (defaultRootsData === null) {
112942
- defaultRootsData = fs3.readFileSync(DEFAULT_ROOTS_FILE_PATH);
113036
+ defaultRootsData = fs4.readFileSync(DEFAULT_ROOTS_FILE_PATH);
112943
113037
  }
112944
113038
  return defaultRootsData;
112945
113039
  }
@@ -113550,7 +113644,7 @@ var require_service_config = __commonJS((exports) => {
113550
113644
  exports.validateRetryThrottling = validateRetryThrottling;
113551
113645
  exports.validateServiceConfig = validateServiceConfig;
113552
113646
  exports.extractAndSelectServiceConfig = extractAndSelectServiceConfig;
113553
- var os2 = __require("os");
113647
+ var os3 = __require("os");
113554
113648
  var constants_1 = require_constants8();
113555
113649
  var DURATION_REGEX = /^\d+(\.\d{1,9})?s$/;
113556
113650
  var CLIENT_LANGUAGE_STRING = "node";
@@ -113849,7 +113943,7 @@ var require_service_config = __commonJS((exports) => {
113849
113943
  if (Array.isArray(validatedConfig.clientHostname)) {
113850
113944
  let hostnameMatched = false;
113851
113945
  for (const hostname of validatedConfig.clientHostname) {
113852
- if (hostname === os2.hostname()) {
113946
+ if (hostname === os3.hostname()) {
113853
113947
  hostnameMatched = true;
113854
113948
  }
113855
113949
  }
@@ -119240,20 +119334,20 @@ var require_codegen = __commonJS((exports, module) => {
119240
119334
 
119241
119335
  // ../../node_modules/@protobufjs/fetch/util/fs.js
119242
119336
  var require_fs = __commonJS((exports, module) => {
119243
- var fs3 = null;
119337
+ var fs4 = null;
119244
119338
  try {
119245
- fs3 = __require("fs");
119246
- if (!fs3 || !fs3.readFile || !fs3.readFileSync)
119247
- fs3 = null;
119339
+ fs4 = __require("fs");
119340
+ if (!fs4 || !fs4.readFile || !fs4.readFileSync)
119341
+ fs4 = null;
119248
119342
  } catch (e2) {}
119249
- module.exports = fs3;
119343
+ module.exports = fs4;
119250
119344
  });
119251
119345
 
119252
119346
  // ../../node_modules/@protobufjs/fetch/index.js
119253
119347
  var require_fetch = __commonJS((exports, module) => {
119254
119348
  module.exports = fetch3;
119255
119349
  var asPromise = require_aspromise();
119256
- var fs3 = require_fs();
119350
+ var fs4 = require_fs();
119257
119351
  function fetch3(filename, options, callback) {
119258
119352
  if (typeof options === "function") {
119259
119353
  callback = options;
@@ -119262,8 +119356,8 @@ var require_fetch = __commonJS((exports, module) => {
119262
119356
  options = {};
119263
119357
  if (!callback)
119264
119358
  return asPromise(fetch3, this, filename, options);
119265
- if (!options.xhr && fs3 && fs3.readFile)
119266
- return fs3.readFile(filename, function fetchReadFileCallback(err, contents) {
119359
+ if (!options.xhr && fs4 && fs4.readFile)
119360
+ return fs4.readFile(filename, function fetchReadFileCallback(err, contents) {
119267
119361
  return err && typeof XMLHttpRequest !== "undefined" ? fetch3.xhr(filename, options, callback) : err ? callback(err) : callback(null, options.binary ? contents : contents.toString("utf8"));
119268
119362
  });
119269
119363
  return fetch3.xhr(filename, options, callback);
@@ -119343,13 +119437,13 @@ var require_patterns = __commonJS((exports) => {
119343
119437
 
119344
119438
  // ../../node_modules/protobufjs/src/util/fs.js
119345
119439
  var require_fs2 = __commonJS((exports, module) => {
119346
- var fs3 = null;
119440
+ var fs4 = null;
119347
119441
  try {
119348
- fs3 = __require("fs");
119349
- if (!fs3 || !fs3.readFile || !fs3.readFileSync)
119350
- fs3 = null;
119442
+ fs4 = __require("fs");
119443
+ if (!fs4 || !fs4.readFile || !fs4.readFileSync)
119444
+ fs4 = null;
119351
119445
  } catch (e2) {}
119352
- module.exports = fs3;
119446
+ module.exports = fs4;
119353
119447
  });
119354
119448
 
119355
119449
  // ../../node_modules/protobufjs/src/namespace.js
@@ -125244,7 +125338,7 @@ var require_type2 = __commonJS((exports, module) => {
125244
125338
  var require_util6 = __commonJS((exports) => {
125245
125339
  Object.defineProperty(exports, "__esModule", { value: true });
125246
125340
  exports.addCommonProtos = exports.loadProtosWithOptionsSync = exports.loadProtosWithOptions = undefined;
125247
- var fs3 = __require("fs");
125341
+ var fs4 = __require("fs");
125248
125342
  var path3 = __require("path");
125249
125343
  var Protobuf = require_src111();
125250
125344
  function addIncludePathResolver(root, includePaths) {
@@ -125256,7 +125350,7 @@ var require_util6 = __commonJS((exports) => {
125256
125350
  for (const directory of includePaths) {
125257
125351
  const fullPath = path3.join(directory, target);
125258
125352
  try {
125259
- fs3.accessSync(fullPath, fs3.constants.R_OK);
125353
+ fs4.accessSync(fullPath, fs4.constants.R_OK);
125260
125354
  return fullPath;
125261
125355
  } catch (err) {
125262
125356
  continue;
@@ -127594,7 +127688,7 @@ var require_subchannel_call = __commonJS((exports) => {
127594
127688
  Object.defineProperty(exports, "__esModule", { value: true });
127595
127689
  exports.Http2SubchannelCall = undefined;
127596
127690
  var http22 = __require("http2");
127597
- var os2 = __require("os");
127691
+ var os3 = __require("os");
127598
127692
  var constants_1 = require_constants8();
127599
127693
  var metadata_1 = require_metadata();
127600
127694
  var stream_decoder_1 = require_stream_decoder();
@@ -127602,7 +127696,7 @@ var require_subchannel_call = __commonJS((exports) => {
127602
127696
  var constants_2 = require_constants8();
127603
127697
  var TRACER_NAME = "subchannel_call";
127604
127698
  function getSystemErrorName(errno) {
127605
- for (const [name, num] of Object.entries(os2.constants.errno)) {
127699
+ for (const [name, num] of Object.entries(os3.constants.errno)) {
127606
127700
  if (num === errno) {
127607
127701
  return name;
127608
127702
  }
@@ -134001,7 +134095,7 @@ var require_load_balancer_pick_first = __commonJS((exports) => {
134001
134095
  var require_certificate_provider = __commonJS((exports) => {
134002
134096
  Object.defineProperty(exports, "__esModule", { value: true });
134003
134097
  exports.FileWatcherCertificateProvider = undefined;
134004
- var fs3 = __require("fs");
134098
+ var fs4 = __require("fs");
134005
134099
  var logging = require_logging();
134006
134100
  var constants_1 = require_constants8();
134007
134101
  var util_1 = __require("util");
@@ -134009,7 +134103,7 @@ var require_certificate_provider = __commonJS((exports) => {
134009
134103
  function trace(text) {
134010
134104
  logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);
134011
134105
  }
134012
- var readFilePromise = (0, util_1.promisify)(fs3.readFile);
134106
+ var readFilePromise = (0, util_1.promisify)(fs4.readFile);
134013
134107
 
134014
134108
  class FileWatcherCertificateProvider {
134015
134109
  constructor(config) {
@@ -135847,7 +135941,7 @@ var require_otlp_grpc_env_configuration = __commonJS((exports) => {
135847
135941
  var core_1 = require_src3();
135848
135942
  var grpc_exporter_transport_1 = require_grpc_exporter_transport();
135849
135943
  var node_http_1 = require_index_node_http();
135850
- var fs3 = __require("fs");
135944
+ var fs4 = __require("fs");
135851
135945
  var path3 = __require("path");
135852
135946
  var api_1 = require_src();
135853
135947
  function fallbackIfNullishOrBlank(signalSpecific, nonSignalSpecific) {
@@ -135897,7 +135991,7 @@ var require_otlp_grpc_env_configuration = __commonJS((exports) => {
135897
135991
  const filePath = fallbackIfNullishOrBlank(signalSpecificPath, nonSignalSpecificPath);
135898
135992
  if (filePath != null) {
135899
135993
  try {
135900
- return fs3.readFileSync(path3.resolve(process.cwd(), filePath));
135994
+ return fs4.readFileSync(path3.resolve(process.cwd(), filePath));
135901
135995
  } catch {
135902
135996
  api_1.diag.warn(warningMessage);
135903
135997
  return;
@@ -145891,14 +145985,14 @@ var require_parser = __commonJS((exports) => {
145891
145985
  case "scalar":
145892
145986
  case "single-quoted-scalar":
145893
145987
  case "double-quoted-scalar": {
145894
- const fs3 = this.flowScalar(this.type);
145988
+ const fs4 = this.flowScalar(this.type);
145895
145989
  if (atNextItem || it.value) {
145896
- map.items.push({ start, key: fs3, sep: [] });
145990
+ map.items.push({ start, key: fs4, sep: [] });
145897
145991
  this.onKeyLine = true;
145898
145992
  } else if (it.sep) {
145899
- this.stack.push(fs3);
145993
+ this.stack.push(fs4);
145900
145994
  } else {
145901
- Object.assign(it, { key: fs3, sep: [] });
145995
+ Object.assign(it, { key: fs4, sep: [] });
145902
145996
  this.onKeyLine = true;
145903
145997
  }
145904
145998
  return;
@@ -146026,13 +146120,13 @@ var require_parser = __commonJS((exports) => {
146026
146120
  case "scalar":
146027
146121
  case "single-quoted-scalar":
146028
146122
  case "double-quoted-scalar": {
146029
- const fs3 = this.flowScalar(this.type);
146123
+ const fs4 = this.flowScalar(this.type);
146030
146124
  if (!it || it.value)
146031
- fc.items.push({ start: [], key: fs3, sep: [] });
146125
+ fc.items.push({ start: [], key: fs4, sep: [] });
146032
146126
  else if (it.sep)
146033
- this.stack.push(fs3);
146127
+ this.stack.push(fs4);
146034
146128
  else
146035
- Object.assign(it, { key: fs3, sep: [] });
146129
+ Object.assign(it, { key: fs4, sep: [] });
146036
146130
  return;
146037
146131
  }
146038
146132
  case "flow-map-end":
@@ -156928,7 +157022,7 @@ var require_FileConfigFactory = __commonJS((exports) => {
156928
157022
  exports.mergePropagatorCompositeConfig = exports.mergeHeadersConfig = exports.mergeResourceAttributesConfig = exports.parseConfigFile = exports.FileConfigFactory = undefined;
156929
157023
  var api_1 = require_src();
156930
157024
  var core_1 = require_src3();
156931
- var fs3 = __require("fs");
157025
+ var fs4 = __require("fs");
156932
157026
  var yaml = require_dist3();
156933
157027
  var utils_1 = require_utils88();
156934
157028
  var validateConfig = require_validator();
@@ -156964,7 +157058,7 @@ var require_FileConfigFactory = __commonJS((exports) => {
156964
157058
  }
156965
157059
  function parseConfigFile() {
156966
157060
  const configFile = (0, core_1.getStringFromEnv)("OTEL_CONFIG_FILE") || "";
156967
- const file = fs3.readFileSync(configFile, "utf8");
157061
+ const file = fs4.readFileSync(configFile, "utf8");
156968
157062
  const doc = yaml.parseDocument(file, { version: "1.2" });
156969
157063
  (0, utils_1.substituteEnvVars)(doc);
156970
157064
  const processed = doc.toJS();
@@ -158231,7 +158325,7 @@ var require_has_flag2 = __commonJS((exports, module) => {
158231
158325
 
158232
158326
  // ../../node_modules/@colors/colors/lib/system/supports-colors.js
158233
158327
  var require_supports_colors = __commonJS((exports, module) => {
158234
- var os2 = __require("os");
158328
+ var os3 = __require("os");
158235
158329
  var hasFlag = require_has_flag2();
158236
158330
  var env = process.env;
158237
158331
  var forceColor = undefined;
@@ -158269,7 +158363,7 @@ var require_supports_colors = __commonJS((exports, module) => {
158269
158363
  }
158270
158364
  var min = forceColor ? 1 : 0;
158271
158365
  if (process.platform === "win32") {
158272
- var osRelease = os2.release().split(".");
158366
+ var osRelease = os3.release().split(".");
158273
158367
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
158274
158368
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
158275
158369
  }
@@ -163274,7 +163368,7 @@ var require_winston_transport = __commonJS((exports, module) => {
163274
163368
 
163275
163369
  // ../../node_modules/winston/lib/winston/transports/console.js
163276
163370
  var require_console = __commonJS((exports, module) => {
163277
- var os2 = __require("os");
163371
+ var os3 = __require("os");
163278
163372
  var { LEVEL, MESSAGE } = require_triple_beam();
163279
163373
  var TransportStream = require_winston_transport();
163280
163374
  module.exports = class Console extends TransportStream {
@@ -163283,7 +163377,7 @@ var require_console = __commonJS((exports, module) => {
163283
163377
  this.name = options.name || "console";
163284
163378
  this.stderrLevels = this._stringArrayToSet(options.stderrLevels);
163285
163379
  this.consoleWarnLevels = this._stringArrayToSet(options.consoleWarnLevels);
163286
- this.eol = typeof options.eol === "string" ? options.eol : os2.EOL;
163380
+ this.eol = typeof options.eol === "string" ? options.eol : os3.EOL;
163287
163381
  this.forceConsole = options.forceConsole || false;
163288
163382
  this._consoleLog = console.log.bind(console);
163289
163383
  this._consoleWarn = console.warn.bind(console);
@@ -164207,7 +164301,7 @@ var require_node22 = __commonJS((exports, module) => {
164207
164301
 
164208
164302
  // ../../node_modules/winston/lib/winston/tail-file.js
164209
164303
  var require_tail_file = __commonJS((exports, module) => {
164210
- var fs3 = __require("fs");
164304
+ var fs4 = __require("fs");
164211
164305
  var { StringDecoder } = __require("string_decoder");
164212
164306
  var { Stream: Stream3 } = require_readable();
164213
164307
  function noop2() {}
@@ -164227,7 +164321,7 @@ var require_tail_file = __commonJS((exports, module) => {
164227
164321
  stream.emit("end");
164228
164322
  stream.emit("close");
164229
164323
  };
164230
- fs3.open(options.file, "a+", "0644", (err, fd) => {
164324
+ fs4.open(options.file, "a+", "0644", (err, fd) => {
164231
164325
  if (err) {
164232
164326
  if (!iter) {
164233
164327
  stream.emit("error", err);
@@ -164239,10 +164333,10 @@ var require_tail_file = __commonJS((exports, module) => {
164239
164333
  }
164240
164334
  (function read() {
164241
164335
  if (stream.destroyed) {
164242
- fs3.close(fd, noop2);
164336
+ fs4.close(fd, noop2);
164243
164337
  return;
164244
164338
  }
164245
- return fs3.read(fd, buffer, 0, buffer.length, pos, (error, bytes) => {
164339
+ return fs4.read(fd, buffer, 0, buffer.length, pos, (error, bytes) => {
164246
164340
  if (error) {
164247
164341
  if (!iter) {
164248
164342
  stream.emit("error", error);
@@ -164298,7 +164392,7 @@ var require_tail_file = __commonJS((exports, module) => {
164298
164392
 
164299
164393
  // ../../node_modules/winston/lib/winston/transports/file.js
164300
164394
  var require_file = __commonJS((exports, module) => {
164301
- var fs3 = __require("fs");
164395
+ var fs4 = __require("fs");
164302
164396
  var path3 = __require("path");
164303
164397
  var asyncSeries = require_series();
164304
164398
  var zlib2 = __require("zlib");
@@ -164306,7 +164400,7 @@ var require_file = __commonJS((exports, module) => {
164306
164400
  var { Stream: Stream3, PassThrough: PassThrough3 } = require_readable();
164307
164401
  var TransportStream = require_winston_transport();
164308
164402
  var debug = require_node22()("winston:file");
164309
- var os2 = __require("os");
164403
+ var os3 = __require("os");
164310
164404
  var tailFile = require_tail_file();
164311
164405
  module.exports = class File4 extends TransportStream {
164312
164406
  constructor(options = {}) {
@@ -164339,7 +164433,7 @@ var require_file = __commonJS((exports, module) => {
164339
164433
  this.rotationFormat = options.rotationFormat || false;
164340
164434
  this.zippedArchive = options.zippedArchive || false;
164341
164435
  this.maxFiles = options.maxFiles || null;
164342
- this.eol = typeof options.eol === "string" ? options.eol : os2.EOL;
164436
+ this.eol = typeof options.eol === "string" ? options.eol : os3.EOL;
164343
164437
  this.tailable = options.tailable || false;
164344
164438
  this.lazy = options.lazy || false;
164345
164439
  this._size = 0;
@@ -164465,7 +164559,7 @@ var require_file = __commonJS((exports, module) => {
164465
164559
  let buff = "";
164466
164560
  let results = [];
164467
164561
  let row = 0;
164468
- const stream = fs3.createReadStream(file, {
164562
+ const stream = fs4.createReadStream(file, {
164469
164563
  encoding: "utf8"
164470
164564
  });
164471
164565
  stream.on("error", (err) => {
@@ -164605,7 +164699,7 @@ var require_file = __commonJS((exports, module) => {
164605
164699
  stat(callback) {
164606
164700
  const target = this._getFile();
164607
164701
  const fullpath = path3.join(this.dirname, target);
164608
- fs3.stat(fullpath, (err, stat2) => {
164702
+ fs4.stat(fullpath, (err, stat2) => {
164609
164703
  if (err && err.code === "ENOENT") {
164610
164704
  debug("ENOENT ok", fullpath);
164611
164705
  this.filename = target;
@@ -164667,7 +164761,7 @@ var require_file = __commonJS((exports, module) => {
164667
164761
  _createStream(source) {
164668
164762
  const fullpath = path3.join(this.dirname, this.filename);
164669
164763
  debug("create stream start", fullpath, this.options);
164670
- const dest = fs3.createWriteStream(fullpath, this.options).on("error", (err) => debug(err)).on("close", () => debug("close", dest.path, dest.bytesWritten)).on("open", () => {
164764
+ const dest = fs4.createWriteStream(fullpath, this.options).on("error", (err) => debug(err)).on("close", () => debug("close", dest.path, dest.bytesWritten)).on("open", () => {
164671
164765
  debug("file open ok", fullpath);
164672
164766
  this.emit("open", fullpath);
164673
164767
  source.pipe(dest);
@@ -164719,7 +164813,7 @@ var require_file = __commonJS((exports, module) => {
164719
164813
  const isZipped = this.zippedArchive ? ".gz" : "";
164720
164814
  const filePath = `${basename2}${isOldest}${ext}${isZipped}`;
164721
164815
  const target = path3.join(this.dirname, filePath);
164722
- fs3.unlink(target, callback);
164816
+ fs4.unlink(target, callback);
164723
164817
  }
164724
164818
  _checkMaxFilesTailable(ext, basename2, callback) {
164725
164819
  const tasks = [];
@@ -164731,36 +164825,36 @@ var require_file = __commonJS((exports, module) => {
164731
164825
  tasks.push(function(i2, cb) {
164732
164826
  let fileName = `${basename2}${i2 - 1}${ext}${isZipped}`;
164733
164827
  const tmppath = path3.join(this.dirname, fileName);
164734
- fs3.exists(tmppath, (exists) => {
164828
+ fs4.exists(tmppath, (exists) => {
164735
164829
  if (!exists) {
164736
164830
  return cb(null);
164737
164831
  }
164738
164832
  fileName = `${basename2}${i2}${ext}${isZipped}`;
164739
- fs3.rename(tmppath, path3.join(this.dirname, fileName), cb);
164833
+ fs4.rename(tmppath, path3.join(this.dirname, fileName), cb);
164740
164834
  });
164741
164835
  }.bind(this, x2));
164742
164836
  }
164743
164837
  asyncSeries(tasks, () => {
164744
- fs3.rename(path3.join(this.dirname, `${basename2}${ext}${isZipped}`), path3.join(this.dirname, `${basename2}1${ext}${isZipped}`), callback);
164838
+ fs4.rename(path3.join(this.dirname, `${basename2}${ext}${isZipped}`), path3.join(this.dirname, `${basename2}1${ext}${isZipped}`), callback);
164745
164839
  });
164746
164840
  }
164747
164841
  _compressFile(src, dest, callback) {
164748
- fs3.access(src, fs3.F_OK, (err) => {
164842
+ fs4.access(src, fs4.F_OK, (err) => {
164749
164843
  if (err) {
164750
164844
  return callback();
164751
164845
  }
164752
164846
  var gzip = zlib2.createGzip();
164753
- var inp = fs3.createReadStream(src);
164754
- var out = fs3.createWriteStream(dest);
164847
+ var inp = fs4.createReadStream(src);
164848
+ var out = fs4.createWriteStream(dest);
164755
164849
  out.on("finish", () => {
164756
- fs3.unlink(src, callback);
164850
+ fs4.unlink(src, callback);
164757
164851
  });
164758
164852
  inp.pipe(gzip).pipe(out);
164759
164853
  });
164760
164854
  }
164761
164855
  _createLogDirIfNotExist(dirPath) {
164762
- if (!fs3.existsSync(dirPath)) {
164763
- fs3.mkdirSync(dirPath, { recursive: true });
164856
+ if (!fs4.existsSync(dirPath)) {
164857
+ fs4.mkdirSync(dirPath, { recursive: true });
164764
164858
  }
164765
164859
  }
164766
164860
  };
@@ -164943,7 +165037,7 @@ var require_is_stream = __commonJS((exports, module) => {
164943
165037
  var require_stream = __commonJS((exports, module) => {
164944
165038
  var isStream = require_is_stream();
164945
165039
  var { MESSAGE } = require_triple_beam();
164946
- var os2 = __require("os");
165040
+ var os3 = __require("os");
164947
165041
  var TransportStream = require_winston_transport();
164948
165042
  module.exports = class Stream3 extends TransportStream {
164949
165043
  constructor(options = {}) {
@@ -164954,7 +165048,7 @@ var require_stream = __commonJS((exports, module) => {
164954
165048
  this._stream = options.stream;
164955
165049
  this._stream.setMaxListeners(Infinity);
164956
165050
  this.isObjectMode = options.stream._writableState.objectMode;
164957
- this.eol = typeof options.eol === "string" ? options.eol : os2.EOL;
165051
+ this.eol = typeof options.eol === "string" ? options.eol : os3.EOL;
164958
165052
  }
164959
165053
  log(info, callback) {
164960
165054
  setImmediate(() => this.emit("logged", info));
@@ -165291,7 +165385,7 @@ var require_exception_stream = __commonJS((exports, module) => {
165291
165385
 
165292
165386
  // ../../node_modules/winston/lib/winston/exception-handler.js
165293
165387
  var require_exception_handler = __commonJS((exports, module) => {
165294
- var os2 = __require("os");
165388
+ var os3 = __require("os");
165295
165389
  var asyncForEach = require_forEach();
165296
165390
  var debug = require_node22()("winston:exception");
165297
165391
  var once = require_one_time();
@@ -165359,8 +165453,8 @@ var require_exception_handler = __commonJS((exports, module) => {
165359
165453
  }
165360
165454
  getOsInfo() {
165361
165455
  return {
165362
- loadavg: os2.loadavg(),
165363
- uptime: os2.uptime()
165456
+ loadavg: os3.loadavg(),
165457
+ uptime: os3.uptime()
165364
165458
  };
165365
165459
  }
165366
165460
  getTrace(err) {
@@ -165458,7 +165552,7 @@ var require_rejection_stream = __commonJS((exports, module) => {
165458
165552
 
165459
165553
  // ../../node_modules/winston/lib/winston/rejection-handler.js
165460
165554
  var require_rejection_handler = __commonJS((exports, module) => {
165461
- var os2 = __require("os");
165555
+ var os3 = __require("os");
165462
165556
  var asyncForEach = require_forEach();
165463
165557
  var debug = require_node22()("winston:rejection");
165464
165558
  var once = require_one_time();
@@ -165526,8 +165620,8 @@ var require_rejection_handler = __commonJS((exports, module) => {
165526
165620
  }
165527
165621
  getOsInfo() {
165528
165622
  return {
165529
- loadavg: os2.loadavg(),
165530
- uptime: os2.uptime()
165623
+ loadavg: os3.loadavg(),
165624
+ uptime: os3.uptime()
165531
165625
  };
165532
165626
  }
165533
165627
  getTrace(err) {
@@ -166354,6 +166448,7 @@ var init_logger = __esm(() => {
166354
166448
  });
166355
166449
 
166356
166450
  // src/telemetry.ts
166451
+ import { AsyncLocalStorage } from "async_hooks";
166357
166452
  function publisherMeter() {
166358
166453
  return import_api2.metrics.getMeter(METER_NAME);
166359
166454
  }
@@ -166362,18 +166457,41 @@ function lazyInstrument(create) {
166362
166457
  instrumentResets.push(() => instrument = null);
166363
166458
  return () => instrument ??= create();
166364
166459
  }
166460
+ function metricsAreSuppressed() {
166461
+ return metricsSuppressed.getStore() === true;
166462
+ }
166463
+ function suppressibleCounter(inner) {
166464
+ return {
166465
+ add: (value, attributes, context) => {
166466
+ if (!metricsAreSuppressed())
166467
+ inner.add(value, attributes, context);
166468
+ }
166469
+ };
166470
+ }
166471
+ function suppressibleHistogram(inner) {
166472
+ return {
166473
+ record: (value, attributes, context) => {
166474
+ if (!metricsAreSuppressed())
166475
+ inner.record(value, attributes, context);
166476
+ }
166477
+ };
166478
+ }
166365
166479
  function lazyCounter(name, description, unit) {
166366
- return lazyInstrument(() => publisherMeter().createCounter(name, {
166480
+ return lazyInstrument(() => suppressibleCounter(publisherMeter().createCounter(name, {
166367
166481
  description,
166368
166482
  ...unit ? { unit } : {}
166369
- }));
166483
+ })));
166370
166484
  }
166371
166485
  function lazyHistogram(name, description, { unit = "ms", buckets } = {}) {
166372
- return lazyInstrument(() => publisherMeter().createHistogram(name, {
166486
+ return lazyInstrument(() => suppressibleHistogram(publisherMeter().createHistogram(name, {
166373
166487
  description,
166374
166488
  ...unit ? { unit } : {},
166375
166489
  ...buckets ? { advice: { explicitBucketBoundaries: buckets } } : {}
166376
- }));
166490
+ })));
166491
+ }
166492
+ function resetInstrumentsForTesting() {
166493
+ for (const reset of instrumentResets)
166494
+ reset();
166377
166495
  }
166378
166496
  async function withSpan(name, attributes, fn, spanTracer = tracer()) {
166379
166497
  return spanTracer.startActiveSpan(name, { attributes }, async (span) => {
@@ -166391,7 +166509,7 @@ async function withSpan(name, attributes, fn, spanTracer = tracer()) {
166391
166509
  }
166392
166510
  });
166393
166511
  }
166394
- var import_api2, METER_NAME = "publisher", REQUEST_DURATION_BUCKETS_MS, instrumentResets, tracer = () => import_api2.trace.getTracer(METER_NAME);
166512
+ var import_api2, METER_NAME = "publisher", REQUEST_DURATION_BUCKETS_MS, instrumentResets, metricsSuppressed, tracer = () => import_api2.trace.getTracer(METER_NAME);
166395
166513
  var init_telemetry = __esm(() => {
166396
166514
  import_api2 = __toESM(require_src(), 1);
166397
166515
  REQUEST_DURATION_BUCKETS_MS = [
@@ -166409,10 +166527,11 @@ var init_telemetry = __esm(() => {
166409
166527
  60000
166410
166528
  ];
166411
166529
  instrumentResets = [];
166530
+ metricsSuppressed = new AsyncLocalStorage;
166412
166531
  });
166413
166532
 
166414
166533
  // package.json
166415
- var version = "0.12.6";
166534
+ var version = "0.13.0";
166416
166535
  var init_package = () => {};
166417
166536
 
166418
166537
  // src/version.ts
@@ -177467,7 +177586,7 @@ var require_form_data = __commonJS((exports, module) => {
177467
177586
  var http3 = __require("http");
177468
177587
  var https2 = __require("https");
177469
177588
  var parseUrl = __require("url").parse;
177470
- var fs3 = __require("fs");
177589
+ var fs4 = __require("fs");
177471
177590
  var Stream3 = __require("stream").Stream;
177472
177591
  var crypto2 = __require("crypto");
177473
177592
  var mime = require_mime_types();
@@ -177538,7 +177657,7 @@ var require_form_data = __commonJS((exports, module) => {
177538
177657
  if (value.end != null && value.end != Infinity && value.start != null) {
177539
177658
  callback(null, value.end + 1 - (value.start ? value.start : 0));
177540
177659
  } else {
177541
- fs3.stat(value.path, function(err, stat2) {
177660
+ fs4.stat(value.path, function(err, stat2) {
177542
177661
  if (err) {
177543
177662
  callback(err);
177544
177663
  return;
@@ -184199,8 +184318,8 @@ var require_node23 = __commonJS((exports, module) => {
184199
184318
  }
184200
184319
  break;
184201
184320
  case "FILE":
184202
- var fs3 = __require("fs");
184203
- stream5 = new fs3.SyncWriteStream(fd2, { autoClose: false });
184321
+ var fs4 = __require("fs");
184322
+ stream5 = new fs4.SyncWriteStream(fd2, { autoClose: false });
184204
184323
  stream5._type = "fs";
184205
184324
  break;
184206
184325
  case "PIPE":
@@ -199629,8 +199748,8 @@ var require_node24 = __commonJS((exports, module) => {
199629
199748
  }
199630
199749
  break;
199631
199750
  case "FILE":
199632
- var fs3 = __require("fs");
199633
- stream5 = new fs3.SyncWriteStream(fd2, { autoClose: false });
199751
+ var fs4 = __require("fs");
199752
+ stream5 = new fs4.SyncWriteStream(fd2, { autoClose: false });
199634
199753
  stream5._type = "fs";
199635
199754
  break;
199636
199755
  case "PIPE":
@@ -200498,8 +200617,8 @@ var require_node25 = __commonJS((exports, module) => {
200498
200617
  }
200499
200618
  break;
200500
200619
  case "FILE":
200501
- var fs3 = __require("fs");
200502
- stream5 = new fs3.SyncWriteStream(fd2, { autoClose: false });
200620
+ var fs4 = __require("fs");
200621
+ stream5 = new fs4.SyncWriteStream(fd2, { autoClose: false });
200503
200622
  stream5._type = "fs";
200504
200623
  break;
200505
200624
  case "PIPE":
@@ -201413,7 +201532,7 @@ var require_view = __commonJS((exports, module) => {
201413
201532
  */
201414
201533
  var debug = require_src130()("express:view");
201415
201534
  var path3 = __require("path");
201416
- var fs3 = __require("fs");
201535
+ var fs4 = __require("fs");
201417
201536
  var dirname = path3.dirname;
201418
201537
  var basename2 = path3.basename;
201419
201538
  var extname = path3.extname;
@@ -201479,7 +201598,7 @@ var require_view = __commonJS((exports, module) => {
201479
201598
  function tryStat(path4) {
201480
201599
  debug('stat "%s"', path4);
201481
201600
  try {
201482
- return fs3.statSync(path4);
201601
+ return fs4.statSync(path4);
201483
201602
  } catch (e2) {
201484
201603
  return;
201485
201604
  }
@@ -202189,8 +202308,8 @@ var require_node26 = __commonJS((exports, module) => {
202189
202308
  }
202190
202309
  break;
202191
202310
  case "FILE":
202192
- var fs3 = __require("fs");
202193
- stream5 = new fs3.SyncWriteStream(fd2, { autoClose: false });
202311
+ var fs4 = __require("fs");
202312
+ stream5 = new fs4.SyncWriteStream(fd2, { autoClose: false });
202194
202313
  stream5._type = "fs";
202195
202314
  break;
202196
202315
  case "PIPE":
@@ -202378,7 +202497,7 @@ var require_types16 = __commonJS((exports, module) => {
202378
202497
  // ../../node_modules/send/node_modules/mime/mime.js
202379
202498
  var require_mime = __commonJS((exports, module) => {
202380
202499
  var path3 = __require("path");
202381
- var fs3 = __require("fs");
202500
+ var fs4 = __require("fs");
202382
202501
  function Mime() {
202383
202502
  this.types = Object.create(null);
202384
202503
  this.extensions = Object.create(null);
@@ -202399,7 +202518,7 @@ var require_mime = __commonJS((exports, module) => {
202399
202518
  };
202400
202519
  Mime.prototype.load = function(file) {
202401
202520
  this._loading = file;
202402
- var map = {}, content = fs3.readFileSync(file, "ascii"), lines = content.split(/[\r\n]+/);
202521
+ var map = {}, content = fs4.readFileSync(file, "ascii"), lines = content.split(/[\r\n]+/);
202403
202522
  lines.forEach(function(line) {
202404
202523
  var fields = line.replace(/\s*#.*|^\s*|\s*$/g, "").split(/\s+/);
202405
202524
  map[fields.shift()] = fields;
@@ -202527,7 +202646,7 @@ var require_send = __commonJS((exports, module) => {
202527
202646
  var escapeHtml = require_escape_html();
202528
202647
  var etag = require_etag();
202529
202648
  var fresh = require_fresh();
202530
- var fs3 = __require("fs");
202649
+ var fs4 = __require("fs");
202531
202650
  var mime = require_mime();
202532
202651
  var ms = require_ms();
202533
202652
  var onFinished = require_on_finished();
@@ -202855,7 +202974,7 @@ var require_send = __commonJS((exports, module) => {
202855
202974
  var i2 = 0;
202856
202975
  var self2 = this;
202857
202976
  debug('stat "%s"', path4);
202858
- fs3.stat(path4, function onstat(err, stat2) {
202977
+ fs4.stat(path4, function onstat(err, stat2) {
202859
202978
  if (err && err.code === "ENOENT" && !extname(path4) && path4[path4.length - 1] !== sep) {
202860
202979
  return next(err);
202861
202980
  }
@@ -202872,7 +202991,7 @@ var require_send = __commonJS((exports, module) => {
202872
202991
  }
202873
202992
  var p = path4 + "." + self2._extensions[i2++];
202874
202993
  debug('stat "%s"', p);
202875
- fs3.stat(p, function(err2, stat2) {
202994
+ fs4.stat(p, function(err2, stat2) {
202876
202995
  if (err2)
202877
202996
  return next(err2);
202878
202997
  if (stat2.isDirectory())
@@ -202893,7 +203012,7 @@ var require_send = __commonJS((exports, module) => {
202893
203012
  }
202894
203013
  var p = join(path4, self2._index[i2]);
202895
203014
  debug('stat "%s"', p);
202896
- fs3.stat(p, function(err2, stat2) {
203015
+ fs4.stat(p, function(err2, stat2) {
202897
203016
  if (err2)
202898
203017
  return next(err2);
202899
203018
  if (stat2.isDirectory())
@@ -202907,7 +203026,7 @@ var require_send = __commonJS((exports, module) => {
202907
203026
  SendStream.prototype.stream = function stream4(path4, options) {
202908
203027
  var self2 = this;
202909
203028
  var res = this.res;
202910
- var stream5 = fs3.createReadStream(path4, options);
203029
+ var stream5 = fs4.createReadStream(path4, options);
202911
203030
  this.emit("stream", stream5);
202912
203031
  stream5.pipe(res);
202913
203032
  function cleanup() {