@scalar/api-client 2.3.31 → 2.3.32
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 +12 -0
- package/dist/style.css +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +15 -13
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +3 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +74 -31
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +3 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +8 -6
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +54 -59
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +17 -16
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
- package/dist/views/Request/consts/mediaTypes.js +1 -0
- package/package.json +10 -10
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as H, computed as p, useId as A, ref as N, watch as I, createBlock as
|
|
1
|
+
import { defineComponent as H, computed as p, useId as A, ref as N, watch as I, createBlock as v, openBlock as i, withCtx as d, createElementVNode as c, withDirectives as s, createCommentVNode as f, createVNode as t, unref as n, vShow as m, createElementBlock as y, toDisplayString as U } from "vue";
|
|
2
2
|
import { ScalarErrorBoundary as D } from "@scalar/components";
|
|
3
|
-
import { canMethodHaveBody as
|
|
3
|
+
import { canMethodHaveBody as b, isDefined as K, REGEX as q } from "@scalar/oas-utils/helpers";
|
|
4
4
|
import Q from "../../../components/SectionFilter.vue.js";
|
|
5
5
|
import $ from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
6
6
|
import { matchesDomain as L } from "../../../libs/send-request/set-request-cookies.js";
|
|
7
7
|
import j from "./RequestBody.vue.js";
|
|
8
|
-
import
|
|
8
|
+
import h from "./RequestParams.vue.js";
|
|
9
9
|
import F from "./RequestPathParams.vue.js";
|
|
10
10
|
import M from "./RequestAuth/RequestAuth.vue.js";
|
|
11
11
|
import T from "./RequestCodeExample.vue.js";
|
|
@@ -37,7 +37,7 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
37
37
|
"Body"
|
|
38
38
|
], { requestMutators: S, cookies: g, securitySchemes: B } = W(), { layout: u } = z(), k = p(() => {
|
|
39
39
|
const e = /* @__PURE__ */ new Set(["All", ...P]);
|
|
40
|
-
return l.example.parameters.path.length || e.delete("Variables"),
|
|
40
|
+
return l.example.parameters.path.length || e.delete("Variables"), b(l.operation.method ?? "get") || e.delete("Body"), w.value && e.delete("Auth"), [...e];
|
|
41
41
|
}), r = p(
|
|
42
42
|
() => Object.fromEntries(
|
|
43
43
|
k.value.map((e) => [e, A()])
|
|
@@ -51,7 +51,7 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
51
51
|
I(
|
|
52
52
|
() => l.operation,
|
|
53
53
|
(e) => {
|
|
54
|
-
a.value === "Body" && e && !
|
|
54
|
+
a.value === "Body" && e && !b(e.method) && (a.value = "All");
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
const C = (e) => {
|
|
@@ -75,10 +75,10 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
75
75
|
enabled: !0
|
|
76
76
|
}))
|
|
77
77
|
), E = () => l.operation.summary ? l.operation.summary : l.operation.path.replace(q.PROTOCOL, "") ? l.operation.path.replace(q.PROTOCOL, "") : "Request Name", V = A();
|
|
78
|
-
return (e, o) => (i(),
|
|
78
|
+
return (e, o) => (i(), v($, {
|
|
79
79
|
"aria-label": `Request: ${e.operation.summary}`
|
|
80
80
|
}, {
|
|
81
|
-
title:
|
|
81
|
+
title: d(() => [
|
|
82
82
|
c("div", G, [
|
|
83
83
|
n(u) !== "modal" ? (i(), y("label", {
|
|
84
84
|
key: 0,
|
|
@@ -101,13 +101,13 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
101
101
|
filters: k.value
|
|
102
102
|
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
103
103
|
]),
|
|
104
|
-
default:
|
|
104
|
+
default: d(() => [
|
|
105
105
|
c("div", {
|
|
106
106
|
id: r.value.All,
|
|
107
107
|
class: "request-section-content custom-scroll relative flex flex-1 flex-col divide-y",
|
|
108
108
|
role: a.value === "All" ? "tabpanel" : "none"
|
|
109
109
|
}, [
|
|
110
|
-
e.collection && e.workspace && (n(u) !== "modal" || Object.keys(n(B) ?? {}).length) ? s((i(),
|
|
110
|
+
e.collection && e.workspace && (n(u) !== "modal" || Object.keys(n(B) ?? {}).length) ? s((i(), v(M, {
|
|
111
111
|
key: 0,
|
|
112
112
|
id: r.value.Auth,
|
|
113
113
|
class: "request-section-content-auth border-b-0",
|
|
@@ -145,7 +145,7 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
145
145
|
(a.value === "All" || a.value === "Variables") && e.example.parameters.path.length
|
|
146
146
|
]
|
|
147
147
|
]),
|
|
148
|
-
s(t(
|
|
148
|
+
s(t(h, {
|
|
149
149
|
id: r.value.Cookies,
|
|
150
150
|
class: "request-section-content-cookies",
|
|
151
151
|
envVariables: e.envVariables,
|
|
@@ -162,7 +162,7 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
162
162
|
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "readOnlyEntries", "role", "workspace"]), [
|
|
163
163
|
[m, a.value === "All" || a.value === "Cookies"]
|
|
164
164
|
]),
|
|
165
|
-
s(t(
|
|
165
|
+
s(t(h, {
|
|
166
166
|
id: r.value.Headers,
|
|
167
167
|
class: "request-section-content-headers",
|
|
168
168
|
envVariables: e.envVariables,
|
|
@@ -178,7 +178,7 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
178
178
|
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
|
|
179
179
|
[m, a.value === "All" || a.value === "Headers"]
|
|
180
180
|
]),
|
|
181
|
-
s(t(
|
|
181
|
+
s(t(h, {
|
|
182
182
|
id: r.value.Query,
|
|
183
183
|
class: "request-section-content-query",
|
|
184
184
|
envVariables: e.envVariables,
|
|
@@ -194,7 +194,7 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
194
194
|
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
|
|
195
195
|
[m, a.value === "All" || a.value === "Query"]
|
|
196
196
|
]),
|
|
197
|
-
e.operation.method && (a.value === "All" || a.value === "Body") && n(
|
|
197
|
+
e.operation.method && (a.value === "All" || a.value === "Body") && n(b)(e.operation.method) ? (i(), v(j, {
|
|
198
198
|
key: 1,
|
|
199
199
|
id: r.value.Body,
|
|
200
200
|
class: "request-section-content-body",
|
|
@@ -208,15 +208,16 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
208
208
|
}, null, 8, ["id", "envVariables", "environment", "example", "operation", "role", "workspace"])) : f("", !0),
|
|
209
209
|
o[1] || (o[1] = c("div", { class: "-my-0.25 flex flex-grow" }, null, -1)),
|
|
210
210
|
t(n(D), null, {
|
|
211
|
-
default:
|
|
211
|
+
default: d(() => [
|
|
212
212
|
t(T, {
|
|
213
213
|
class: "request-section-content-code-example",
|
|
214
214
|
collection: e.collection,
|
|
215
215
|
example: e.example,
|
|
216
216
|
operation: e.operation,
|
|
217
217
|
server: e.server,
|
|
218
|
-
workspace: e.workspace
|
|
219
|
-
|
|
218
|
+
workspace: e.workspace,
|
|
219
|
+
environment: e.envVariables
|
|
220
|
+
}, null, 8, ["collection", "example", "operation", "server", "workspace", "environment"])
|
|
220
221
|
]),
|
|
221
222
|
_: 1
|
|
222
223
|
})
|
|
@@ -34,7 +34,7 @@ const W = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, $ = {
|
|
|
34
34
|
}));
|
|
35
35
|
}, k = (o) => {
|
|
36
36
|
o != null && o.createNew && x.name === "request" && f();
|
|
37
|
-
}, w = "2.3.
|
|
37
|
+
}, w = "2.3.32";
|
|
38
38
|
return R(() => a.hotKeys.on(k)), v(() => a.hotKeys.off(k)), (o, e) => (u(), l("div", W, [
|
|
39
39
|
s("div", {
|
|
40
40
|
class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;CA8GjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA"}
|
|
@@ -11,6 +11,7 @@ const n = {
|
|
|
11
11
|
language: "json"
|
|
12
12
|
},
|
|
13
13
|
"application/vnd.api+json": { extension: ".json", raw: !0, language: "json" },
|
|
14
|
+
"application/dns-json": { extension: ".json", raw: !0, language: "json" },
|
|
14
15
|
"application/msword": { extension: ".doc" },
|
|
15
16
|
"application/octet-stream": { extension: ".bin" },
|
|
16
17
|
"application/ogg": { extension: ".ogx" },
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.3.
|
|
21
|
+
"version": "2.3.32",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -201,20 +201,20 @@
|
|
|
201
201
|
"zod": "3.24.1",
|
|
202
202
|
"@scalar/components": "0.13.57",
|
|
203
203
|
"@scalar/icons": "0.3.5",
|
|
204
|
-
"@scalar/import": "0.3.24",
|
|
205
|
-
"@scalar/oas-utils": "0.2.141",
|
|
206
204
|
"@scalar/draggable": "0.1.11",
|
|
205
|
+
"@scalar/import": "0.3.25",
|
|
206
|
+
"@scalar/oas-utils": "0.2.142",
|
|
207
207
|
"@scalar/object-utils": "1.1.14",
|
|
208
208
|
"@scalar/openapi-parser": "0.10.17",
|
|
209
209
|
"@scalar/openapi-types": "0.2.2",
|
|
210
|
-
"@scalar/postman-to-openapi": "0.2.
|
|
210
|
+
"@scalar/postman-to-openapi": "0.2.15",
|
|
211
|
+
"@scalar/snippetz": "0.2.20",
|
|
211
212
|
"@scalar/themes": "0.11.1",
|
|
212
213
|
"@scalar/types": "0.1.14",
|
|
213
214
|
"@scalar/use-codemirror": "0.11.102",
|
|
214
|
-
"@scalar/snippetz": "0.2.20",
|
|
215
215
|
"@scalar/use-hooks": "0.1.48",
|
|
216
|
-
"@scalar/use-
|
|
217
|
-
"@scalar/use-
|
|
216
|
+
"@scalar/use-tooltip": "1.0.7",
|
|
217
|
+
"@scalar/use-toasts": "0.7.10"
|
|
218
218
|
},
|
|
219
219
|
"devDependencies": {
|
|
220
220
|
"@types/shell-quote": "^1.7.5",
|
|
@@ -226,11 +226,11 @@
|
|
|
226
226
|
"postcss": "^8.4.38",
|
|
227
227
|
"tailwindcss": "^3.4.4",
|
|
228
228
|
"tailwindcss-color-mix": "^0.0.8",
|
|
229
|
-
"vite": "
|
|
229
|
+
"vite": "5.4.19",
|
|
230
230
|
"vite-svg-loader": "^5.1.0",
|
|
231
231
|
"vitest": "^1.6.0",
|
|
232
|
-
"@scalar/
|
|
233
|
-
"@scalar/
|
|
232
|
+
"@scalar/build-tooling": "0.1.19",
|
|
233
|
+
"@scalar/galaxy": "0.3.2"
|
|
234
234
|
},
|
|
235
235
|
"scripts": {
|
|
236
236
|
"build": "scalar-build-vite",
|