@scalar/api-client 2.17.6 → 2.17.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.17.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#7675](https://github.com/scalar/scalar/pull/7675): fix: ensure patch is uppercased
8
+
9
+ #### Updated Dependencies
10
+
11
+ - **@scalar/components@0.16.17**
12
+ - [#7680](https://github.com/scalar/scalar/pull/7680): feat(components): simplify nested sidebar items styles
13
+
14
+ - **@scalar/sidebar@0.7.7**
15
+
16
+ - **@scalar/use-codemirror@0.13.11**
17
+
3
18
  ## 2.17.6
4
19
 
5
20
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"build-request.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAKnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AACtH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAI5F,OAAO,EAAU,KAAK,aAAa,EAAkB,MAAM,eAAe,CAAA;AAO1E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,GAAI,iHAU1B;IACD,8CAA8C;IAC9C,WAAW,EAAE,kBAAkB,CAAA;IAC/B,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,mCAAmC;IACnC,aAAa,EAAE,aAAa,EAAE,CAAA;IAC9B,uCAAuC;IACvC,MAAM,EAAE,UAAU,CAAA;IAClB,2BAA2B;IAC3B,SAAS,EAAE,eAAe,CAAA;IAC1B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAA;IAChB,wBAAwB;IACxB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,8DAA8D;IAC9D,uBAAuB,EAAE,oBAAoB,EAAE,CAAA;CAChD,KAAG,aAAa,CAAC;IAChB,UAAU,EAAE,eAAe,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,OAAO,CAAA;CACtB,CAwFA,CAAA"}
1
+ {"version":3,"file":"build-request.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAKnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AACtH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAI5F,OAAO,EAAU,KAAK,aAAa,EAAkB,MAAM,eAAe,CAAA;AAO1E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,GAAI,iHAU1B;IACD,8CAA8C;IAC9C,WAAW,EAAE,kBAAkB,CAAA;IAC/B,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,mCAAmC;IACnC,aAAa,EAAE,aAAa,EAAE,CAAA;IAC9B,uCAAuC;IACvC,MAAM,EAAE,UAAU,CAAA;IAClB,2BAA2B;IAC3B,SAAS,EAAE,eAAe,CAAA;IAC1B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAA;IAChB,wBAAwB;IACxB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,8DAA8D;IAC9D,uBAAuB,EAAE,oBAAoB,EAAE,CAAA;CAChD,KAAG,aAAa,CAAC;IAChB,UAAU,EAAE,eAAe,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,OAAO,CAAA;CACtB,CA6FA,CAAA"}
@@ -1,49 +1,54 @@
1
- import { replaceVariables as U } from "@scalar/helpers/regex/replace-variables";
1
+ import { replaceVariables as P } from "@scalar/helpers/regex/replace-variables";
2
2
  import { mergeUrls as L } from "@scalar/helpers/url/merge-urls";
3
3
  import { shouldUseProxy as x, redirectToProxy as I } from "@scalar/oas-utils/helpers";
4
4
  import { getResolvedRef as T } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
5
  import { objectEntries as V } from "@vueuse/core";
6
- import { isElectron as k } from "../../../../libs/electron.js";
7
- import { ERRORS as q, normalizeError as _ } from "../../../../libs/errors.js";
6
+ import { isElectron as h } from "../../../../libs/electron.js";
7
+ import { ERRORS as k, normalizeError as _ } from "../../../../libs/errors.js";
8
8
  import { buildRequestBody as D } from "./build-request-body.js";
9
9
  import { buildRequestCookieHeader as j } from "./build-request-cookie-header.js";
10
10
  import { buildRequestParameters as z } from "./build-request-parameters.js";
11
11
  import { buildRequestSecurity as F } from "./build-request-security.js";
12
12
  const K = ({
13
- environment: y,
13
+ environment: q,
14
14
  exampleKey: u = "default",
15
- globalCookies: h,
15
+ globalCookies: y,
16
16
  method: v,
17
17
  operation: m,
18
18
  path: a,
19
19
  proxyUrl: c,
20
20
  server: d,
21
- selectedSecuritySchemes: E
21
+ selectedSecuritySchemes: C
22
22
  }) => {
23
23
  try {
24
- const e = y.variables.reduce(
24
+ const e = q.variables.reduce(
25
25
  (t, o) => (t[o.name] = typeof o.value == "string" ? o.value : o.value.default, t),
26
26
  {}
27
- ), C = V(d?.variables ?? {}).reduce(
28
- (t, [o, P]) => (P.default && (t[o] = P.default), t),
27
+ ), E = V(d?.variables ?? {}).reduce(
28
+ (t, [o, U]) => (U.default && (t[o] = U.default), t),
29
29
  {}
30
- ), i = U(d?.url ?? "", { ...e, ...C }), A = T(m.requestBody);
30
+ ), i = P(d?.url ?? "", { ...e, ...E }), A = T(m.requestBody);
31
31
  if (!i && !a)
32
- throw q.URL_EMPTY;
33
- const s = z(m.parameters ?? [], e, u), H = D(A, e, u), n = F(E, e), r = { ...s.headers, ...n.headers }, S = new URLSearchParams([...s.urlParams, ...n.urlParams]), f = U(a, { ...e, ...s.pathVariables }), p = L(i, f, S), R = x(c, p), w = I(c, p), b = r["User-Agent"] || r["user-agent"];
34
- k() && b && (r["X-Scalar-User-Agent"] = b);
32
+ throw k.URL_EMPTY;
33
+ const s = z(m.parameters ?? [], e, u), H = D(A, e, u), n = F(C, e), r = { ...s.headers, ...n.headers }, S = new URLSearchParams([...s.urlParams, ...n.urlParams]), f = P(a, { ...e, ...s.pathVariables }), p = L(i, f, S), R = x(c, p), w = I(c, p), b = r["User-Agent"] || r["user-agent"];
34
+ h() && b && (r["X-Scalar-User-Agent"] = b);
35
35
  const l = j({
36
36
  paramCookies: [...s.cookies, ...n.cookies],
37
- globalCookies: h,
37
+ globalCookies: y,
38
38
  env: e,
39
39
  path: f,
40
40
  originalCookieHeader: r.Cookie || r.cookie,
41
41
  url: i || a,
42
- useCustomCookieHeader: k() || R
42
+ useCustomCookieHeader: h() || R
43
43
  });
44
44
  l && (r[l.name] = l.value);
45
45
  const g = new AbortController(), B = new Request(w, {
46
- method: v,
46
+ /**
47
+ * Ensure that all methods are uppercased (though only needed for patch)
48
+ *
49
+ * @see https://github.com/whatwg/fetch/issues/50
50
+ */
51
+ method: v.toUpperCase(),
47
52
  headers: r,
48
53
  signal: g.signal,
49
54
  body: H
@@ -57,7 +62,7 @@ const K = ({
57
62
  }
58
63
  ];
59
64
  } catch (e) {
60
- return [_(e, q.BUILDING_REQUEST_FAILED), null];
65
+ return [_(e, k.BUILDING_REQUEST_FAILED), null];
61
66
  }
62
67
  };
63
68
  export {
@@ -57,7 +57,7 @@ const w = {
57
57
  method: t.method ?? "get"
58
58
  } : {
59
59
  type: "document"
60
- }), c = "2.17.6";
60
+ }), c = "2.17.7";
61
61
  return (e, a) => e.path && e.method && e.exampleName && r.value ? (n(), h(l(g), {
62
62
  key: 0,
63
63
  appVersion: l(c),
@@ -33,7 +33,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
33
33
  }));
34
34
  }, f = (o) => {
35
35
  o?.createNew && g.name === "request" && d();
36
- }, v = "2.17.6";
36
+ }, v = "2.17.7";
37
37
  return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (o, e) => (i(), l("div", W, [
38
38
  s("div", {
39
39
  class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.17.6",
21
+ "version": "2.17.7",
22
22
  "engines": {
23
23
  "node": ">=20"
24
24
  },
@@ -326,26 +326,26 @@
326
326
  "whatwg-mimetype": "^4.0.0",
327
327
  "yaml": "^2.8.0",
328
328
  "zod": "^4.1.11",
329
- "@scalar/analytics-client": "1.0.1",
330
- "@scalar/components": "0.16.16",
329
+ "@scalar/components": "0.16.17",
331
330
  "@scalar/draggable": "0.3.0",
332
331
  "@scalar/helpers": "0.2.6",
333
- "@scalar/icons": "0.5.2",
334
- "@scalar/json-magic": "0.8.10",
335
332
  "@scalar/import": "0.4.43",
333
+ "@scalar/icons": "0.5.2",
334
+ "@scalar/analytics-client": "1.0.1",
336
335
  "@scalar/oas-utils": "0.6.14",
336
+ "@scalar/json-magic": "0.8.10",
337
337
  "@scalar/object-utils": "1.2.20",
338
338
  "@scalar/openapi-parser": "0.23.11",
339
339
  "@scalar/postman-to-openapi": "0.3.55",
340
340
  "@scalar/openapi-types": "0.5.3",
341
- "@scalar/sidebar": "0.7.6",
342
- "@scalar/snippetz": "0.6.3",
341
+ "@scalar/sidebar": "0.7.7",
343
342
  "@scalar/themes": "0.13.26",
344
343
  "@scalar/types": "0.5.6",
345
- "@scalar/use-codemirror": "0.13.10",
346
- "@scalar/use-toasts": "0.9.1",
344
+ "@scalar/use-codemirror": "0.13.11",
345
+ "@scalar/snippetz": "0.6.3",
347
346
  "@scalar/use-hooks": "0.3.5",
348
- "@scalar/workspace-store": "0.24.4"
347
+ "@scalar/workspace-store": "0.24.4",
348
+ "@scalar/use-toasts": "0.9.1"
349
349
  },
350
350
  "devDependencies": {
351
351
  "@tailwindcss/vite": "^4.1.7",
@@ -360,8 +360,8 @@
360
360
  "vite": "7.1.11",
361
361
  "vite-svg-loader": "5.1.0",
362
362
  "vitest": "3.2.4",
363
- "@scalar/galaxy": "0.5.12",
364
- "@scalar/build-tooling": "0.4.1"
363
+ "@scalar/build-tooling": "0.4.1",
364
+ "@scalar/galaxy": "0.5.12"
365
365
  },
366
366
  "scripts": {
367
367
  "build": "scalar-build-vite",