@scalar/api-reference 1.25.78 → 1.25.80

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.
@@ -1,18 +1,18 @@
1
- import { replaceVariables as b, REGEX as h } from "@scalar/oas-utils/helpers";
2
- function x(r, E) {
1
+ import { replaceVariables as h, REGEX as E } from "@scalar/oas-utils/helpers";
2
+ function y(n, U) {
3
3
  var l, p;
4
- const o = (l = r == null ? void 0 : r.servers) == null ? void 0 : l[r.selectedServer ?? 0];
4
+ const o = U ?? ((l = n == null ? void 0 : n.servers) == null ? void 0 : l[n.selectedServer ?? 0]);
5
5
  (p = o == null ? void 0 : o.url) != null && p.endsWith("/") && (o.url = o.url.slice(0, -1));
6
- const U = o == null ? void 0 : o.url, n = typeof (o == null ? void 0 : o.url) == "string" ? b(o == null ? void 0 : o.url, r.variables) : o == null ? void 0 : o.url, i = n == null ? void 0 : n.match(h.PATH), _ = (i == null ? void 0 : i.reduce((u, m) => {
6
+ const _ = o == null ? void 0 : o.url, r = typeof (o == null ? void 0 : o.url) == "string" ? h(o == null ? void 0 : o.url, n.variables) : o == null ? void 0 : o.url, i = r == null ? void 0 : r.match(E.PATH), b = (i == null ? void 0 : i.reduce((u, m) => {
7
7
  var g;
8
- const f = m.replace(/{|}/g, ""), a = (g = r.variables) == null ? void 0 : g[f];
8
+ const f = m.replace(/{|}/g, ""), a = (g = n.variables) == null ? void 0 : g[f];
9
9
  return u == null ? void 0 : u.replace(
10
10
  m,
11
11
  a || `__${f.toUpperCase()}__`
12
12
  );
13
- }, n)) ?? n;
14
- return { originalUrl: U, modifiedUrl: _ };
13
+ }, r)) ?? r;
14
+ return { originalUrl: _, modifiedUrl: b };
15
15
  }
16
16
  export {
17
- x as getUrlFromServerState
17
+ y as getUrlFromServerState
18
18
  };