@scalar/api-reference 1.34.0 → 1.34.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/api-client-modal/ApiClientModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/api-client-modal/ApiClientModal.vue"],"names":[],"mappings":"AA+KA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EACV,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,6BAA6B,CAAA;AAYpC,KAAK,WAAW,GAAG;IAEjB,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,GAC7D,IAAI,CAAC,yBAAyB,EAAE,iBAAiB,CAAC,CAAA;IACpD,oBAAoB,EAAE,WAAW,CAAC,QAAQ,CAAA;CAC3C,CAAC;;AAsMF,wBAOG"}
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import { defineComponent as S, ref as g, onMounted as E, watch as B, onBeforeUnmount as b, createElementBlock as
|
|
2
|
-
import { useActiveEntities as
|
|
3
|
-
import { mutateSecuritySchemeDiff as
|
|
4
|
-
import { getServersFromOpenApiDocument as
|
|
1
|
+
import { defineComponent as S, ref as g, onMounted as E, watch as B, onBeforeUnmount as b, createElementBlock as R, openBlock as k } from "vue";
|
|
2
|
+
import { useActiveEntities as q, useWorkspace as x } from "@scalar/api-client/store";
|
|
3
|
+
import { mutateSecuritySchemeDiff as y } from "@scalar/api-client/views/Request/libs";
|
|
4
|
+
import { getServersFromOpenApiDocument as D } from "@scalar/oas-utils/transforms";
|
|
5
5
|
import { watchDebounced as d } from "@vueuse/core";
|
|
6
|
-
import
|
|
7
|
-
import { useNavState as
|
|
8
|
-
import { useApiClient as
|
|
9
|
-
import { useExampleStore as
|
|
10
|
-
const
|
|
6
|
+
import M from "microdiff";
|
|
7
|
+
import { useNavState as U } from "../../hooks/useNavState.js";
|
|
8
|
+
import { useApiClient as A } from "./useApiClient.js";
|
|
9
|
+
import { useExampleStore as C } from "../../legacy/stores/useExampleStore.js";
|
|
10
|
+
const j = /* @__PURE__ */ S({
|
|
11
11
|
__name: "ApiClientModal",
|
|
12
12
|
props: {
|
|
13
13
|
configuration: {},
|
|
14
14
|
dereferencedDocument: {}
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
16
|
+
setup(r) {
|
|
17
|
+
const s = g(null), { client: c, init: v } = A(), { selectedExampleKey: p, operationId: f } = C(), a = q(), n = x(), { isIntersectionEnabled: m } = U(), h = () => ({
|
|
18
18
|
name: "on-before-request",
|
|
19
19
|
hooks: {
|
|
20
|
-
onBeforeRequest:
|
|
20
|
+
onBeforeRequest: r.configuration.onBeforeRequest
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
return E(() => {
|
|
24
|
-
|
|
25
|
-
el:
|
|
24
|
+
s.value && v({
|
|
25
|
+
el: s.value,
|
|
26
26
|
configuration: {
|
|
27
|
-
...
|
|
27
|
+
...r.configuration,
|
|
28
28
|
// If the onBeforeRequest hook is configured, we add the plugin to the API client.
|
|
29
|
-
plugins:
|
|
29
|
+
plugins: r.configuration.onBeforeRequest ? [h] : []
|
|
30
30
|
},
|
|
31
|
-
store:
|
|
31
|
+
store: n
|
|
32
32
|
});
|
|
33
33
|
}), d(
|
|
34
|
-
() =>
|
|
35
|
-
(e) => {
|
|
36
|
-
var
|
|
37
|
-
e && (
|
|
34
|
+
() => r.dereferencedDocument,
|
|
35
|
+
(e, i) => {
|
|
36
|
+
var o, u;
|
|
37
|
+
e && JSON.stringify(e) !== JSON.stringify(i || {}) && (a.activeCollection.value && ((o = c.value) == null || o.resetStore()), n.importSpecFile(void 0, "default", {
|
|
38
38
|
dereferencedDocument: e,
|
|
39
39
|
shouldLoad: !1,
|
|
40
|
-
documentUrl: (
|
|
40
|
+
documentUrl: (u = r.configuration) == null ? void 0 : u.url,
|
|
41
41
|
useCollectionSecurity: !0,
|
|
42
|
-
...
|
|
42
|
+
...r.configuration
|
|
43
43
|
}));
|
|
44
44
|
}
|
|
45
45
|
), d(
|
|
46
|
-
() =>
|
|
47
|
-
(e,
|
|
48
|
-
if (!
|
|
46
|
+
() => r.configuration,
|
|
47
|
+
(e, i) => {
|
|
48
|
+
if (!i || !a.activeCollection.value)
|
|
49
49
|
return;
|
|
50
|
-
const
|
|
51
|
-
if (!
|
|
50
|
+
const o = a.activeCollection.value, u = M(i, e);
|
|
51
|
+
if (!u.some(
|
|
52
52
|
(t) => t.path[0] === "url" || t.path[0] === "content" || t.path[1] === "url" || t.path[1] === "content"
|
|
53
53
|
)) {
|
|
54
|
-
if (
|
|
55
|
-
t.path[0] === "authentication" &&
|
|
56
|
-
}), e.servers ||
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
if (u.forEach((t) => {
|
|
55
|
+
t.path[0] === "authentication" && y(t, a, n);
|
|
56
|
+
}), e.servers || i.servers) {
|
|
57
|
+
o.servers.forEach((l) => {
|
|
58
|
+
n.serverMutators.delete(l, o.uid);
|
|
59
59
|
});
|
|
60
|
-
const t =
|
|
61
|
-
e.servers ??
|
|
60
|
+
const t = D(
|
|
61
|
+
e.servers ?? r.dereferencedDocument.servers,
|
|
62
62
|
{
|
|
63
63
|
baseServerURL: e.baseServerURL
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
66
|
t.forEach((l) => {
|
|
67
|
-
|
|
68
|
-
}), t.length &&
|
|
69
|
-
|
|
67
|
+
n.serverMutators.add(l, o.uid);
|
|
68
|
+
}), t.length && n.collectionMutators.edit(
|
|
69
|
+
o.uid,
|
|
70
70
|
"selectedServerUid",
|
|
71
71
|
t[t.length - 1].uid
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
m.value = !1, setTimeout(() => {
|
|
76
|
+
m.value = !0;
|
|
77
77
|
}, 1e3);
|
|
78
78
|
},
|
|
79
79
|
{ deep: !0, debounce: 300 }
|
|
80
80
|
), B(p, (e) => {
|
|
81
|
-
|
|
81
|
+
c.value && e && f.value && c.value.updateExample(e, f.value);
|
|
82
82
|
}), b(() => {
|
|
83
83
|
var e;
|
|
84
|
-
return (e =
|
|
85
|
-
}), (e,
|
|
84
|
+
return (e = c.value) == null ? void 0 : e.app.unmount();
|
|
85
|
+
}), (e, i) => (k(), R("div", {
|
|
86
86
|
ref_key: "el",
|
|
87
|
-
ref:
|
|
87
|
+
ref: s
|
|
88
88
|
}, null, 512));
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
export {
|
|
92
|
-
|
|
92
|
+
j as default
|
|
93
93
|
};
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vue",
|
|
21
21
|
"vue3"
|
|
22
22
|
],
|
|
23
|
-
"version": "1.34.
|
|
23
|
+
"version": "1.34.1",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20"
|
|
26
26
|
},
|
|
@@ -54,21 +54,21 @@
|
|
|
54
54
|
"nanoid": "5.1.5",
|
|
55
55
|
"vue": "^3.5.17",
|
|
56
56
|
"zod": "3.24.1",
|
|
57
|
-
"@scalar/components": "0.14.22",
|
|
58
|
-
"@scalar/api-client": "2.5.21",
|
|
59
57
|
"@scalar/code-highlight": "0.1.9",
|
|
60
58
|
"@scalar/helpers": "0.0.7",
|
|
59
|
+
"@scalar/api-client": "2.5.22",
|
|
61
60
|
"@scalar/icons": "0.4.6",
|
|
61
|
+
"@scalar/components": "0.14.23",
|
|
62
62
|
"@scalar/object-utils": "1.2.3",
|
|
63
63
|
"@scalar/openapi-parser": "0.19.0",
|
|
64
64
|
"@scalar/openapi-types": "0.3.7",
|
|
65
|
-
"@scalar/oas-utils": "0.4.
|
|
66
|
-
"@scalar/snippetz": "0.4.4",
|
|
67
|
-
"@scalar/themes": "0.13.12",
|
|
65
|
+
"@scalar/oas-utils": "0.4.18",
|
|
68
66
|
"@scalar/types": "0.2.11",
|
|
69
|
-
"@scalar/
|
|
67
|
+
"@scalar/snippetz": "0.4.4",
|
|
70
68
|
"@scalar/use-toasts": "0.8.0",
|
|
71
|
-
"@scalar/
|
|
69
|
+
"@scalar/use-hooks": "0.2.4",
|
|
70
|
+
"@scalar/workspace-store": "0.12.0",
|
|
71
|
+
"@scalar/themes": "0.13.12"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@tailwindcss/vite": "^4.1.7",
|
|
@@ -88,10 +88,10 @@
|
|
|
88
88
|
"@hono/node-server": "^1.11.0",
|
|
89
89
|
"@playwright/test": "^1.49.1",
|
|
90
90
|
"hono": "^4.6.5",
|
|
91
|
-
"@scalar/
|
|
91
|
+
"@scalar/build-tooling": "0.2.4",
|
|
92
92
|
"@scalar/react-renderer": "0.2.1",
|
|
93
|
-
"@scalar/
|
|
94
|
-
"@scalar/
|
|
93
|
+
"@scalar/galaxy": "0.5.5",
|
|
94
|
+
"@scalar/core": "0.3.11"
|
|
95
95
|
},
|
|
96
96
|
"scripts": {
|
|
97
97
|
"build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
|