@scalar/api-client 2.3.6 → 2.3.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,21 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.3.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 46b40ca: fix: ensure we only send the authorization header when we have a secret
|
|
8
|
+
- Updated dependencies [427c325]
|
|
9
|
+
- Updated dependencies [9a2d008]
|
|
10
|
+
- Updated dependencies [4a42197]
|
|
11
|
+
- Updated dependencies [cbc1d08]
|
|
12
|
+
- @scalar/components@0.13.39
|
|
13
|
+
- @scalar/snippetz@0.2.17
|
|
14
|
+
- @scalar/openapi-parser@0.10.12
|
|
15
|
+
- @scalar/use-codemirror@0.11.84
|
|
16
|
+
- @scalar/import@0.3.4
|
|
17
|
+
- @scalar/oas-utils@0.2.121
|
|
18
|
+
|
|
3
19
|
## 2.3.6
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -37,7 +37,7 @@ const P = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, T = {
|
|
|
37
37
|
}));
|
|
38
38
|
}, y = (s) => {
|
|
39
39
|
s != null && s.createNew && w.name === "request" && k();
|
|
40
|
-
}, N = "2.3.
|
|
40
|
+
}, N = "2.3.7";
|
|
41
41
|
return B(() => r.hotKeys.on(y)), E(() => r.hotKeys.off(y)), (s, e) => (u(), i("div", P, [
|
|
42
42
|
o("div", {
|
|
43
43
|
class: q(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/oauth2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAA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5B,CAAA;AAmBD;;GAEG;AACH,eAAO,MAAM,qBAAqB,aAAoB,MAAM,YAAY,SAAS,GAAG,OAAO,KAAG,OAAO,CAAC,MAAM,CAe3G,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,SACpB,UAAU,gBAEF,MAAM,aAET,MAAM,KAChB,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAwI/B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,SACrB,eAAe,UACb,MAAM,8BAKX;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC9B,KACA,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAmE/B,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { shouldUseProxy as
|
|
2
|
-
const
|
|
1
|
+
import { shouldUseProxy as y } from "@scalar/oas-utils/helpers";
|
|
2
|
+
const w = () => {
|
|
3
3
|
const e = new Uint8Array(32);
|
|
4
4
|
return crypto.getRandomValues(e), btoa(String.fromCharCode(...e)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
5
5
|
}, P = async (e, i) => {
|
|
@@ -21,7 +21,7 @@ const y = () => {
|
|
|
21
21
|
if (e.type === "implicit")
|
|
22
22
|
t.searchParams.set("response_type", "token");
|
|
23
23
|
else if (e.type === "authorizationCode" && (t.searchParams.set("response_type", "code"), e["x-usePkce"] !== "no")) {
|
|
24
|
-
const r =
|
|
24
|
+
const r = w(), c = await P(r, e["x-usePkce"]);
|
|
25
25
|
l = {
|
|
26
26
|
codeVerifier: r,
|
|
27
27
|
codeChallenge: c,
|
|
@@ -73,8 +73,8 @@ const y = () => {
|
|
|
73
73
|
const l = {
|
|
74
74
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
75
75
|
};
|
|
76
|
-
l.Authorization = `Basic ${btoa(`${e["x-scalar-client-id"]}:${e.clientSecret}`)}
|
|
77
|
-
const p =
|
|
76
|
+
e.clientSecret && (l.Authorization = `Basic ${btoa(`${e["x-scalar-client-id"]}:${e.clientSecret}`)}`);
|
|
77
|
+
const p = y(s, e.tokenUrl) ? `${s}?${new URLSearchParams([["scalar_url", e.tokenUrl]]).toString()}` : e.tokenUrl, n = await fetch(p, {
|
|
78
78
|
method: "POST",
|
|
79
79
|
headers: l,
|
|
80
80
|
body: t
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.3.
|
|
21
|
+
"version": "2.3.7",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -188,22 +188,22 @@
|
|
|
188
188
|
"whatwg-mimetype": "^4.0.0",
|
|
189
189
|
"yaml": "^2.4.5",
|
|
190
190
|
"zod": "^3.23.8",
|
|
191
|
-
"@scalar/components": "0.13.
|
|
191
|
+
"@scalar/components": "0.13.39",
|
|
192
|
+
"@scalar/draggable": "0.1.11",
|
|
192
193
|
"@scalar/icons": "0.1.3",
|
|
193
|
-
"@scalar/import": "0.3.
|
|
194
|
+
"@scalar/import": "0.3.4",
|
|
194
195
|
"@scalar/object-utils": "1.1.13",
|
|
195
|
-
"@scalar/openapi-parser": "0.10.11",
|
|
196
196
|
"@scalar/oas-utils": "0.2.121",
|
|
197
|
-
"@scalar/postman-to-openapi": "0.1.44",
|
|
198
|
-
"@scalar/snippetz": "0.2.16",
|
|
199
197
|
"@scalar/openapi-types": "0.1.9",
|
|
198
|
+
"@scalar/openapi-parser": "0.10.12",
|
|
199
|
+
"@scalar/postman-to-openapi": "0.1.44",
|
|
200
|
+
"@scalar/snippetz": "0.2.17",
|
|
200
201
|
"@scalar/themes": "0.9.80",
|
|
201
|
-
"@scalar/use-codemirror": "0.11.83",
|
|
202
202
|
"@scalar/types": "0.1.2",
|
|
203
|
-
"@scalar/use-
|
|
204
|
-
"@scalar/draggable": "0.1.11",
|
|
203
|
+
"@scalar/use-codemirror": "0.11.84",
|
|
205
204
|
"@scalar/use-toasts": "0.7.9",
|
|
206
|
-
"@scalar/use-tooltip": "1.0.6"
|
|
205
|
+
"@scalar/use-tooltip": "1.0.6",
|
|
206
|
+
"@scalar/use-hooks": "0.1.34"
|
|
207
207
|
},
|
|
208
208
|
"devDependencies": {
|
|
209
209
|
"@types/shell-quote": "^1.7.5",
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"vite-svg-loader": "^5.1.0",
|
|
221
221
|
"vitest": "^1.6.0",
|
|
222
222
|
"@scalar/build-tooling": "0.1.17",
|
|
223
|
-
"@scalar/galaxy": "0.
|
|
223
|
+
"@scalar/galaxy": "0.3.0"
|
|
224
224
|
},
|
|
225
225
|
"scripts": {
|
|
226
226
|
"build": "scalar-build-vite",
|