@scalar/api-client 2.18.4 → 2.19.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 +58 -0
- package/dist/components/AddressBar/AddressBar.vue2.js +5 -5
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +6 -6
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.js +26 -28
- package/dist/components/ImportCollection/utils/get-openapi-version.d.ts.map +1 -1
- package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
- package/dist/components/ImportCollection/utils/import-collection.d.ts.map +1 -1
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +16 -16
- package/dist/components/Server/index.d.ts +1 -1
- package/dist/components/Server/index.d.ts.map +1 -1
- package/dist/components/Server/index.js +6 -6
- package/dist/components/SideNav/SideNav.vue.js +3 -3
- package/dist/components/Sidebar/index.d.ts +1 -2
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useResponseBody.d.ts +1 -1
- package/dist/hooks/useResponseBody.d.ts.map +1 -1
- package/dist/hooks/useResponseBody.js +4 -4
- package/dist/hooks/useSidebar.d.ts +1 -1
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +5 -5
- package/dist/layouts/App/MainLayout.vue.js +4 -4
- package/dist/layouts/App/create-api-client-app.d.ts +12 -12
- package/dist/layouts/App/index.d.ts +1 -1
- package/dist/layouts/App/index.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +6 -6
- package/dist/layouts/Web/create-api-client-web.d.ts +12 -12
- package/dist/layouts/Web/index.d.ts +1 -1
- package/dist/layouts/Web/index.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +12 -12
- package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
- package/dist/libs/get-request-uid-by-path-method.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +2 -2
- package/dist/libs/hot-keys.d.ts.map +1 -1
- package/dist/libs/importers/curl.d.ts.map +1 -1
- package/dist/libs/index.d.ts +14 -15
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +33 -33
- package/dist/libs/parse-curl.js +4 -4
- package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
- package/dist/libs/send-request/create-fetch-body.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-body.js +1 -1
- package/dist/libs/send-request/create-fetch-headers.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-query-params.js +2 -1
- package/dist/libs/send-request/index.d.ts +1 -1
- package/dist/libs/send-request/index.d.ts.map +1 -1
- package/dist/libs/send-request/index.js +4 -4
- package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.js +4 -4
- package/dist/store/active-entities.d.ts +1 -1
- package/dist/store/collections.d.ts +1 -1
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +4 -4
- package/dist/store/environment.d.ts +1 -1
- package/dist/store/environment.d.ts.map +1 -1
- package/dist/store/environment.js +4 -4
- package/dist/store/import-spec.d.ts +2 -2
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +1 -1
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/request-example.js +6 -6
- package/dist/store/requests.d.ts +1 -1
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +8 -8
- package/dist/store/security-schemes.d.ts +1 -1
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +4 -4
- package/dist/store/servers.d.ts +1 -1
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/servers.js +4 -4
- package/dist/store/store.d.ts +12 -12
- package/dist/store/tags.d.ts +1 -1
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/tags.js +5 -5
- package/dist/store/workspace.d.ts +13 -13
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +7 -7
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +4 -5
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +17 -16
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +3 -3
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +22 -22
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +14 -13
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request.js +43 -41
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts +14 -0
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +14 -0
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +25 -0
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +17 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +10 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +29 -25
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +6 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +27 -23
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +12 -12
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +10 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +48 -39
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +49 -46
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +6 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +200 -115
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +44 -47
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +21 -17
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +8 -20
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +29 -40
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +11 -18
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +3 -3
- package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +30 -40
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +33 -18
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +106 -106
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +11 -14
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +43 -31
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +41 -0
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +25 -0
- package/dist/v2/blocks/request-block/helpers/group-by.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/group-by.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/group-by.js +6 -3
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts +13 -0
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +7 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +61 -63
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +1 -2
- 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/OAuth2.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +1 -2
- 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/RequestAuthTab.vue.d.ts +2 -2
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +2 -0
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
- package/dist/v2/components/code-input/CodeInput.vue2.js +57 -51
- package/dist/v2/features/app/App.vue.js +6 -6
- package/dist/v2/features/app/app-events.d.ts +5 -9
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +143 -120
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +69 -71
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue2.js +5 -5
- 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 +21 -22
- package/dist/v2/features/modal/index.d.ts +1 -1
- package/dist/v2/features/modal/index.d.ts.map +1 -1
- package/dist/v2/features/modal/index.js +4 -4
- package/dist/v2/features/modal/modal-events.d.ts +13 -0
- package/dist/v2/features/modal/modal-events.d.ts.map +1 -0
- package/dist/v2/features/modal/modal-events.js +31 -0
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +30 -43
- package/dist/v2/workspace-events.d.ts +25 -0
- package/dist/v2/workspace-events.d.ts.map +1 -0
- package/dist/v2/workspace-events.js +199 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +3 -3
- package/dist/views/Environment/handle-drag.d.ts +1 -1
- package/dist/views/Environment/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue2.js +9 -9
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +4 -4
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +4 -4
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +5 -5
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +6 -6
- package/dist/views/Request/RequestSidebarItem.vue2.js +6 -6
- package/dist/views/Request/RequestSubpageHeader.vue2.js +4 -4
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/index.d.ts +1 -1
- package/dist/views/Request/ResponseSection/index.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/index.js +4 -4
- package/dist/views/Request/consts/index.d.ts +2 -3
- package/dist/views/Request/consts/index.d.ts.map +1 -1
- package/dist/views/Request/consts/new-auth-options.d.ts +1 -1
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.d.ts +1 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +14 -14
- package/dist/views/Request/libs/auth.d.ts +1 -1
- package/dist/views/Request/libs/auth.d.ts.map +1 -1
- package/dist/views/Request/libs/index.d.ts +3 -3
- package/dist/views/Request/libs/index.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +1 -1
- package/dist/views/Request/libs/watch-mode.js +6 -6
- package/dist/views/Request/types/index.d.ts +1 -1
- package/dist/views/Request/types/index.d.ts.map +1 -1
- package/package.json +12 -12
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +0 -18
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +0 -1
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +0 -39
- package/dist/v2/features/operation/helpers/get-operation-header.js +0 -12
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { getResolvedRef as d } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
2
|
import { getExampleFromSchema as p } from "../get-example-from-schema.js";
|
|
3
3
|
import { getExample as h } from "../../../operation-block/helpers/get-example.js";
|
|
4
|
-
|
|
4
|
+
import { isParamDisabled as A } from "../../../request-block/helpers/is-param-disabled.js";
|
|
5
|
+
const g = (e) => (e ?? []).map((o) => d(o)), S = (e) => {
|
|
5
6
|
if (e.in === "header")
|
|
6
7
|
return { style: "simple", explode: "explode" in e && e.explode !== void 0 ? e.explode : !1 };
|
|
7
8
|
if (e.in === "cookie")
|
|
@@ -11,53 +12,55 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
|
|
|
11
12
|
query: "form",
|
|
12
13
|
header: "simple",
|
|
13
14
|
cookie: "form"
|
|
14
|
-
}[e.in], t = "style" in e && e.style ? e.style : o,
|
|
15
|
-
return { style: t, explode:
|
|
16
|
-
},
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
19
|
-
return
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
}[e.in], t = "style" in e && e.style ? e.style : o, y = "explode" in e && e.explode !== void 0 ? e.explode : t === "form";
|
|
16
|
+
return { style: t, explode: y };
|
|
17
|
+
}, k = (e, o, t) => {
|
|
18
|
+
const y = h(e, o, t);
|
|
19
|
+
if (A(e, y))
|
|
20
|
+
return;
|
|
21
|
+
if (y?.value !== void 0)
|
|
22
|
+
return y.value;
|
|
23
|
+
if (!("schema" in e) || !e.schema)
|
|
24
|
+
return;
|
|
25
|
+
const f = e.in === "path" ? { emptyString: `{${e.name}}` } : {};
|
|
26
|
+
return p(d(e.schema), f);
|
|
27
|
+
}, E = ({
|
|
25
28
|
harRequest: e,
|
|
26
29
|
parameters: o,
|
|
27
30
|
example: t,
|
|
28
|
-
contentType:
|
|
31
|
+
contentType: y
|
|
29
32
|
}) => {
|
|
30
33
|
const f = [...e.headers], i = [...e.queryString];
|
|
31
|
-
let
|
|
32
|
-
const u =
|
|
34
|
+
let c = e.url;
|
|
35
|
+
const u = g(o);
|
|
33
36
|
for (const s of u) {
|
|
34
37
|
if (!s.in || !s.name)
|
|
35
38
|
continue;
|
|
36
|
-
const n =
|
|
39
|
+
const n = k(s, t, y);
|
|
37
40
|
if (n === void 0)
|
|
38
41
|
continue;
|
|
39
|
-
const { style:
|
|
42
|
+
const { style: m, explode: v } = S(s);
|
|
40
43
|
switch (s.in) {
|
|
41
44
|
case "path": {
|
|
42
|
-
|
|
45
|
+
c = x(c, s, n, m, v);
|
|
43
46
|
break;
|
|
44
47
|
}
|
|
45
48
|
case "query": {
|
|
46
|
-
switch (
|
|
49
|
+
switch (m) {
|
|
47
50
|
case "form": {
|
|
48
51
|
if (v)
|
|
49
52
|
if (Array.isArray(n))
|
|
50
53
|
for (const l of n)
|
|
51
54
|
i.push({ name: s.name, value: String(l) });
|
|
52
55
|
else if (typeof n == "object" && n !== null)
|
|
53
|
-
for (const [l,
|
|
54
|
-
i.push({ name: l, value: String(
|
|
56
|
+
for (const [l, r] of Object.entries(n))
|
|
57
|
+
i.push({ name: l, value: String(r) });
|
|
55
58
|
else
|
|
56
59
|
i.push({ name: s.name, value: String(n) });
|
|
57
60
|
else if (Array.isArray(n))
|
|
58
61
|
i.push({ name: s.name, value: n.join(",") });
|
|
59
62
|
else if (typeof n == "object" && n !== null) {
|
|
60
|
-
const l = Object.entries(n).map(([
|
|
63
|
+
const l = Object.entries(n).map(([r, $]) => `${r},${$}`).join(",");
|
|
61
64
|
i.push({ name: s.name, value: l });
|
|
62
65
|
} else
|
|
63
66
|
i.push({ name: s.name, value: String(n) });
|
|
@@ -67,7 +70,7 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
|
|
|
67
70
|
if (Array.isArray(n))
|
|
68
71
|
i.push({ name: s.name, value: n.join(" ") });
|
|
69
72
|
else if (typeof n == "object" && n !== null) {
|
|
70
|
-
const l = Object.entries(n).map(([
|
|
73
|
+
const l = Object.entries(n).map(([r, $]) => `${r} ${$}`).join(" ");
|
|
71
74
|
i.push({ name: s.name, value: l });
|
|
72
75
|
}
|
|
73
76
|
break;
|
|
@@ -83,8 +86,8 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
|
|
|
83
86
|
}
|
|
84
87
|
case "deepObject": {
|
|
85
88
|
if (v && typeof n == "object" && n !== null)
|
|
86
|
-
for (const [l,
|
|
87
|
-
i.push({ name: `${s.name}[${l}]`, value: String(
|
|
89
|
+
for (const [l, r] of Object.entries(n))
|
|
90
|
+
i.push({ name: `${s.name}[${l}]`, value: String(r) });
|
|
88
91
|
break;
|
|
89
92
|
}
|
|
90
93
|
// Default to form style
|
|
@@ -99,14 +102,14 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
|
|
|
99
102
|
for (const l of n)
|
|
100
103
|
f.push({ name: s.name, value: String(l) });
|
|
101
104
|
else if (typeof n == "object" && n !== null) {
|
|
102
|
-
const l = Object.entries(n).map(([
|
|
105
|
+
const l = Object.entries(n).map(([r, $]) => `${r}=${$}`).join(",");
|
|
103
106
|
f.push({ name: s.name, value: l });
|
|
104
107
|
} else
|
|
105
108
|
f.push({ name: s.name, value: String(n) });
|
|
106
109
|
else if (Array.isArray(n))
|
|
107
110
|
f.push({ name: s.name, value: n.join(",") });
|
|
108
111
|
else if (typeof n == "object" && n !== null) {
|
|
109
|
-
const l = Object.entries(n).map(([
|
|
112
|
+
const l = Object.entries(n).map(([r, $]) => `${r},${$}`).join(",");
|
|
110
113
|
f.push({ name: s.name, value: l });
|
|
111
114
|
} else
|
|
112
115
|
f.push({ name: s.name, value: String(n) });
|
|
@@ -117,42 +120,42 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
|
|
|
117
120
|
for (const l of n)
|
|
118
121
|
e.cookies.push({ name: s.name, value: l === null ? "null" : String(l) });
|
|
119
122
|
else if (typeof n == "object" && n !== null)
|
|
120
|
-
for (const [l,
|
|
121
|
-
e.cookies.push({ name: l, value:
|
|
123
|
+
for (const [l, r] of Object.entries(n))
|
|
124
|
+
e.cookies.push({ name: l, value: r === null ? "null" : String(r) });
|
|
122
125
|
else
|
|
123
126
|
e.cookies.push({ name: s.name, value: n === null ? "null" : String(n) });
|
|
124
127
|
else if (Array.isArray(n)) {
|
|
125
|
-
const l = n.map((
|
|
128
|
+
const l = n.map((r) => r === null ? "null" : String(r)).join(",");
|
|
126
129
|
e.cookies.push({ name: s.name, value: l });
|
|
127
130
|
} else if (typeof n == "object" && n !== null) {
|
|
128
|
-
const l = (
|
|
131
|
+
const l = ($) => {
|
|
129
132
|
const a = [];
|
|
130
|
-
for (const [
|
|
131
|
-
typeof j == "object" && j !== null && !Array.isArray(j) ? a.push(
|
|
133
|
+
for (const [b, j] of Object.entries($))
|
|
134
|
+
typeof j == "object" && j !== null && !Array.isArray(j) ? a.push(b, ...l(j)) : a.push(b, j === null ? "null" : String(j));
|
|
132
135
|
return a;
|
|
133
|
-
},
|
|
134
|
-
e.cookies.push({ name: s.name, value:
|
|
136
|
+
}, r = l(n).join(",");
|
|
137
|
+
e.cookies.push({ name: s.name, value: r });
|
|
135
138
|
} else
|
|
136
139
|
e.cookies.push({ name: s.name, value: n === null ? "null" : String(n) });
|
|
137
140
|
break;
|
|
138
141
|
}
|
|
139
142
|
}
|
|
140
143
|
return {
|
|
141
|
-
url:
|
|
144
|
+
url: c,
|
|
142
145
|
headers: f,
|
|
143
146
|
queryString: i,
|
|
144
147
|
cookies: e.cookies
|
|
145
148
|
};
|
|
146
|
-
},
|
|
147
|
-
switch (
|
|
149
|
+
}, x = (e, o, t, y, f) => {
|
|
150
|
+
switch (y) {
|
|
148
151
|
case "matrix": {
|
|
149
152
|
if (f) {
|
|
150
153
|
if (Array.isArray(t)) {
|
|
151
|
-
const i = t.map((
|
|
154
|
+
const i = t.map((c) => `${o.name}=${c}`).join(";");
|
|
152
155
|
return e.replace(`{;${o.name}}`, `;${i}`);
|
|
153
156
|
}
|
|
154
157
|
if (typeof t == "object" && t !== null) {
|
|
155
|
-
const i = Object.entries(t).map(([
|
|
158
|
+
const i = Object.entries(t).map(([c, u]) => `${c}=${u}`).join(";");
|
|
156
159
|
return e.replace(`{;${o.name}}`, `;${i}`);
|
|
157
160
|
}
|
|
158
161
|
return e.replace(`{;${o.name}}`, `;${o.name}=${t}`);
|
|
@@ -160,7 +163,7 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
|
|
|
160
163
|
if (Array.isArray(t))
|
|
161
164
|
return e.replace(`{;${o.name}}`, `;${o.name}=${t.join(",")}`);
|
|
162
165
|
if (typeof t == "object" && t !== null) {
|
|
163
|
-
const i = Object.entries(t).map(([
|
|
166
|
+
const i = Object.entries(t).map(([c, u]) => `${c},${u}`).join(",");
|
|
164
167
|
return e.replace(`{;${o.name}}`, `;${o.name}=${i}`);
|
|
165
168
|
}
|
|
166
169
|
return e.replace(`{;${o.name}}`, `;${o.name}=${t}`);
|
|
@@ -170,7 +173,7 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
|
|
|
170
173
|
if (Array.isArray(t))
|
|
171
174
|
return e.replace(`{.${o.name}}`, `.${t.join(".")}`);
|
|
172
175
|
if (typeof t == "object" && t !== null) {
|
|
173
|
-
const i = Object.entries(t).map(([
|
|
176
|
+
const i = Object.entries(t).map(([c, u]) => `${c}=${u}`).join(".");
|
|
174
177
|
return e.replace(`{.${o.name}}`, `.${i}`);
|
|
175
178
|
}
|
|
176
179
|
return e.replace(`{.${o.name}}`, `.${t}`);
|
|
@@ -178,7 +181,7 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
|
|
|
178
181
|
if (Array.isArray(t))
|
|
179
182
|
return e.replace(`{.${o.name}}`, `.${t.join(",")}`);
|
|
180
183
|
if (typeof t == "object" && t !== null) {
|
|
181
|
-
const i = Object.entries(t).map(([
|
|
184
|
+
const i = Object.entries(t).map(([c, u]) => `${c},${u}`).join(",");
|
|
182
185
|
return e.replace(`{.${o.name}}`, `.${i}`);
|
|
183
186
|
}
|
|
184
187
|
return e.replace(`{.${o.name}}`, `.${t}`);
|
|
@@ -188,7 +191,7 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
|
|
|
188
191
|
if (Array.isArray(t))
|
|
189
192
|
return e.replace(`{${o.name}}`, t.join(","));
|
|
190
193
|
if (typeof t == "object" && t !== null) {
|
|
191
|
-
const i = Object.entries(t).map(([
|
|
194
|
+
const i = Object.entries(t).map(([c, u]) => `${c}=${u}`).join(",");
|
|
192
195
|
return e.replace(`{${o.name}}`, i);
|
|
193
196
|
}
|
|
194
197
|
return e.replace(`{${o.name}}`, String(t));
|
|
@@ -196,7 +199,7 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
|
|
|
196
199
|
if (Array.isArray(t))
|
|
197
200
|
return e.replace(`{${o.name}}`, t.join(","));
|
|
198
201
|
if (typeof t == "object" && t !== null) {
|
|
199
|
-
const i = Object.entries(t).map(([
|
|
202
|
+
const i = Object.entries(t).map(([c, u]) => `${c},${u}`).join(",");
|
|
200
203
|
return e.replace(`{${o.name}}`, i);
|
|
201
204
|
}
|
|
202
205
|
return e.replace(`{${o.name}}`, String(t));
|
|
@@ -207,5 +210,5 @@ const A = (e) => (e ?? []).map((o) => d(o)), g = (e) => {
|
|
|
207
210
|
}
|
|
208
211
|
};
|
|
209
212
|
export {
|
|
210
|
-
|
|
213
|
+
E as processParameters
|
|
211
214
|
};
|
package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/o
|
|
|
2
2
|
/**
|
|
3
3
|
* Processes a server URL by replacing variables with their default values and merging with the path
|
|
4
4
|
*/
|
|
5
|
-
export declare const processServerUrl: (server: ServerObject, path: string) => string;
|
|
5
|
+
export declare const processServerUrl: (server: ServerObject | null, path: string) => string;
|
|
6
6
|
//# sourceMappingURL=process-server-url.d.ts.map
|
package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-server-url.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,YAAY,EAAE,MAAM,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"process-server-url.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,YAAY,GAAG,IAAI,EAAE,MAAM,MAAM,KAAG,MA4B5E,CAAA"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
2
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
3
|
-
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
4
|
-
import type { AuthMeta } from '@scalar/workspace-store/mutators';
|
|
3
|
+
import type { AuthMeta, WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
5
4
|
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
5
|
+
import type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
|
|
6
6
|
import type { OpenApiDocument, OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
7
7
|
import type { ClientLayout } from '../../../hooks/index.js';
|
|
8
8
|
import type { ClientOptionGroup } from '../../../v2/blocks/operation-code-sample/index.js';
|
|
9
9
|
import type { ClientPlugin } from '../../../v2/helpers/plugins.js';
|
|
10
|
+
export type ExtendedScalarCookie = XScalarCookie & {
|
|
11
|
+
location: 'document' | 'workspace';
|
|
12
|
+
};
|
|
10
13
|
type __VLS_Props = {
|
|
11
14
|
selectedSecurity: OpenApiDocument['x-scalar-selected-security'];
|
|
12
15
|
authMeta: AuthMeta;
|
|
@@ -25,6 +28,7 @@ type __VLS_Props = {
|
|
|
25
28
|
selectedClient: WorkspaceStore['workspace']['x-scalar-default-client'];
|
|
26
29
|
selectedSecuritySchemes: SecuritySchemeObject[];
|
|
27
30
|
server: ServerObject | null;
|
|
31
|
+
globalCookies: ExtendedScalarCookie[];
|
|
28
32
|
};
|
|
29
33
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
34
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/request-block/RequestBlock.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/request-block/RequestBlock.vue"],"names":[],"mappings":"AAsiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAEV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAW1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAWxD,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG;IACjD,QAAQ,EAAE,UAAU,GAAG,WAAW,CAAA;CACnC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,QAAQ,EAAE,QAAQ,CAAA;IAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,cAAc,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACtE,uBAAuB,EAAE,oBAAoB,EAAE,CAAA;IAC/C,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,aAAa,EAAE,oBAAoB,EAAE,CAAA;CACtC,CAAC;;AAkqBF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestBlock.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-175541a7"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|