@scalar/api-client 2.18.0 → 2.18.1
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 +24 -0
- package/dist/hooks/useClientConfig.js +1 -1
- package/dist/hooks/useLayout.js +1 -1
- package/dist/hooks/useSidebar.js +1 -1
- package/dist/plugins/hooks/usePluginManager.js +1 -1
- package/dist/store/active-entities.js +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -2
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +36 -35
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +17 -17
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +130 -122
- package/dist/v2/features/app/helpers/routes.d.ts +5 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +1 -1
- package/dist/v2/features/modal/Modal.vue2.js +26 -25
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +3 -3
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts +5 -1
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +22 -20
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +13 -13
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as h, computed as o, onMounted as p, watch as v, createBlock as y, createElementBlock as f, openBlock as u, unref as s, createElementVNode as S } from "vue";
|
|
2
2
|
import { getResolvedRef as l } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
3
|
import { combineParams as k } from "./helpers/combine-params.js";
|
|
4
4
|
import { getOperationHeader as g } from "./helpers/get-operation-header.js";
|
|
5
|
-
import { getSelectedServer as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
5
|
+
import { getSelectedServer as B } from "./helpers/get-selected-server.js";
|
|
6
|
+
import C from "../../blocks/operation-block/OperationBlock.vue.js";
|
|
7
|
+
const w = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "flex h-full w-full items-center justify-center"
|
|
10
|
-
}, N = {},
|
|
10
|
+
}, N = {}, V = /* @__PURE__ */ h({
|
|
11
11
|
...N,
|
|
12
12
|
__name: "Operation",
|
|
13
13
|
props: {
|
|
@@ -22,10 +22,11 @@ const C = {
|
|
|
22
22
|
securitySchemes: {},
|
|
23
23
|
workspaceStore: {},
|
|
24
24
|
activeWorkspace: {},
|
|
25
|
-
plugins: {}
|
|
25
|
+
plugins: {},
|
|
26
|
+
hideClientButton: { type: Boolean }
|
|
26
27
|
},
|
|
27
28
|
setup(t) {
|
|
28
|
-
const
|
|
29
|
+
const r = o(() => {
|
|
29
30
|
if (!t.path || !t.method)
|
|
30
31
|
return null;
|
|
31
32
|
const e = l(t.document?.paths?.[t.path]?.[t.method]);
|
|
@@ -36,14 +37,14 @@ const C = {
|
|
|
36
37
|
return e;
|
|
37
38
|
const n = k(a.parameters, e.parameters);
|
|
38
39
|
return { ...e, parameters: n };
|
|
39
|
-
}),
|
|
40
|
+
}), i = o(() => [
|
|
40
41
|
...t.workspaceStore.workspace?.["x-scalar-cookies"] ?? [],
|
|
41
42
|
...t.document?.["x-scalar-cookies"] ?? []
|
|
42
|
-
]),
|
|
43
|
-
|
|
43
|
+
]), m = o(() => B(t.document));
|
|
44
|
+
p(() => {
|
|
44
45
|
typeof t.document?.["x-scalar-selected-server"] > "u" && t.document?.servers?.[0]?.url && t.eventBus.emit("server:update:selected", { url: t.document.servers[0].url });
|
|
45
46
|
}), v(
|
|
46
|
-
|
|
47
|
+
r,
|
|
47
48
|
(e) => {
|
|
48
49
|
e && t.path && t.method && !g({
|
|
49
50
|
operation: e,
|
|
@@ -61,16 +62,16 @@ const C = {
|
|
|
61
62
|
},
|
|
62
63
|
{ immediate: !0 }
|
|
63
64
|
);
|
|
64
|
-
const c =
|
|
65
|
+
const c = o(() => t.document?.["x-scalar-set-operation-security"] ? {
|
|
65
66
|
type: "operation",
|
|
66
67
|
path: t.path ?? "",
|
|
67
68
|
method: t.method ?? "get"
|
|
68
69
|
} : {
|
|
69
70
|
type: "document"
|
|
70
|
-
}), d = "2.18.
|
|
71
|
-
return (e, a) => e.path && e.method && e.exampleName &&
|
|
71
|
+
}), d = "2.18.1";
|
|
72
|
+
return (e, a) => e.path && e.method && e.exampleName && r.value ? (u(), y(s(C), {
|
|
72
73
|
key: 0,
|
|
73
|
-
appVersion:
|
|
74
|
+
appVersion: s(d),
|
|
74
75
|
authMeta: c.value,
|
|
75
76
|
documentSecurity: e.document?.security ?? [],
|
|
76
77
|
documentSelectedSecurity: e.document?.["x-scalar-selected-security"],
|
|
@@ -78,27 +79,28 @@ const C = {
|
|
|
78
79
|
environment: e.environment,
|
|
79
80
|
eventBus: e.eventBus,
|
|
80
81
|
exampleKey: e.exampleName,
|
|
81
|
-
globalCookies:
|
|
82
|
+
globalCookies: i.value,
|
|
83
|
+
hideClientButton: e.hideClientButton,
|
|
82
84
|
history: [],
|
|
83
85
|
httpClients: e.workspaceStore.config["x-scalar-reference-config"]?.httpClients,
|
|
84
86
|
layout: e.layout,
|
|
85
87
|
method: e.method,
|
|
86
|
-
operation:
|
|
88
|
+
operation: r.value,
|
|
87
89
|
path: e.path,
|
|
88
90
|
plugins: e.plugins,
|
|
89
91
|
proxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"] ?? "",
|
|
90
92
|
securitySchemes: e.securitySchemes,
|
|
91
93
|
selectedClient: e.workspaceStore.workspace["x-scalar-default-client"],
|
|
92
|
-
server:
|
|
94
|
+
server: m.value,
|
|
93
95
|
servers: e.document?.servers ?? [],
|
|
94
96
|
setOperationSecurity: e.document?.["x-scalar-set-operation-security"] ?? !1,
|
|
95
97
|
totalPerformedRequests: 0,
|
|
96
98
|
"onUpdate:servers": a[0] || (a[0] = (n) => e.eventBus.emit("ui:route:page", { name: "document.servers" }))
|
|
97
|
-
}, null, 8, ["appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "eventBus", "exampleKey", "globalCookies", "httpClients", "layout", "method", "operation", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (
|
|
99
|
+
}, null, 8, ["appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "eventBus", "exampleKey", "globalCookies", "hideClientButton", "httpClients", "layout", "method", "operation", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (u(), f("div", w, [...a[1] || (a[1] = [
|
|
98
100
|
S("span", { class: "text-c-3" }, "Select an operation to view details", -1)
|
|
99
101
|
])]));
|
|
100
102
|
}
|
|
101
103
|
});
|
|
102
104
|
export {
|
|
103
|
-
|
|
105
|
+
V as default
|
|
104
106
|
};
|
|
@@ -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.18.
|
|
36
|
+
}, v = "2.18.1";
|
|
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.18.
|
|
21
|
+
"version": "2.18.1",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=20"
|
|
24
24
|
},
|
|
@@ -327,28 +327,28 @@
|
|
|
327
327
|
"yaml": "^2.8.0",
|
|
328
328
|
"zod": "^4.1.11",
|
|
329
329
|
"@scalar/analytics-client": "1.0.1",
|
|
330
|
-
"@scalar/components": "0.16.19",
|
|
331
|
-
"@scalar/draggable": "0.3.0",
|
|
332
330
|
"@scalar/helpers": "0.2.7",
|
|
331
|
+
"@scalar/draggable": "0.3.0",
|
|
333
332
|
"@scalar/icons": "0.5.2",
|
|
334
333
|
"@scalar/import": "0.4.44",
|
|
335
|
-
"@scalar/oas-utils": "0.6.16",
|
|
336
334
|
"@scalar/json-magic": "0.9.0",
|
|
337
335
|
"@scalar/object-utils": "1.2.21",
|
|
336
|
+
"@scalar/components": "0.16.20",
|
|
337
|
+
"@scalar/oas-utils": "0.6.17",
|
|
338
338
|
"@scalar/openapi-parser": "0.23.13",
|
|
339
|
+
"@scalar/sidebar": "0.7.10",
|
|
340
|
+
"@scalar/postman-to-openapi": "0.3.58",
|
|
339
341
|
"@scalar/openapi-types": "0.5.3",
|
|
340
|
-
"@scalar/postman-to-openapi": "0.3.57",
|
|
341
342
|
"@scalar/snippetz": "0.6.4",
|
|
342
|
-
"@scalar/types": "0.5.7",
|
|
343
|
-
"@scalar/sidebar": "0.7.9",
|
|
344
|
-
"@scalar/use-codemirror": "0.13.13",
|
|
345
343
|
"@scalar/themes": "0.13.26",
|
|
346
|
-
"@scalar/
|
|
344
|
+
"@scalar/types": "0.5.7",
|
|
345
|
+
"@scalar/use-codemirror": "0.13.14",
|
|
347
346
|
"@scalar/use-toasts": "0.9.1",
|
|
348
|
-
"@scalar/
|
|
347
|
+
"@scalar/use-hooks": "0.3.6",
|
|
348
|
+
"@scalar/workspace-store": "0.24.7"
|
|
349
349
|
},
|
|
350
350
|
"devDependencies": {
|
|
351
|
-
"@tailwindcss/vite": "^4.1.
|
|
351
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
352
352
|
"@types/shell-quote": "^1.7.5",
|
|
353
353
|
"@types/whatwg-mimetype": "^3.0.2",
|
|
354
354
|
"@vitejs/plugin-vue": "6.0.1",
|
|
@@ -356,8 +356,8 @@
|
|
|
356
356
|
"fake-indexeddb": "6.2.3",
|
|
357
357
|
"fastify": "^5.3.3",
|
|
358
358
|
"jsdom": "26.1.0",
|
|
359
|
-
"tailwindcss": "^4.1.
|
|
360
|
-
"vite": "7.
|
|
359
|
+
"tailwindcss": "^4.1.18",
|
|
360
|
+
"vite": "7.3.0",
|
|
361
361
|
"vite-svg-loader": "5.1.0",
|
|
362
362
|
"vitest": "3.2.4",
|
|
363
363
|
"@scalar/build-tooling": "0.4.1",
|