@scalar/api-client 2.29.1 → 2.29.2
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 +20 -0
- package/dist/style.css +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/features/app/app-state.d.ts +4 -2
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +117 -109
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +20 -16
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +18 -14
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +19 -15
- package/dist/v2/helpers/get-active-proxy-url.d.ts +18 -0
- package/dist/v2/helpers/get-active-proxy-url.d.ts.map +1 -0
- package/dist/v2/helpers/get-active-proxy-url.js +5 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +11 -11
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as f, computed as n, toValue as o, createBlock as k, createElementBlock as g, openBlock as
|
|
1
|
+
import { defineComponent as f, computed as n, toValue as o, createBlock as k, createElementBlock as g, openBlock as l, unref as u, createElementVNode as x } from "vue";
|
|
2
2
|
import { getResolvedRef as m } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
3
|
import { mapHiddenClientsConfig as w } from "../modal/helpers/map-hidden-clients-config.js";
|
|
4
4
|
import { combineParams as C } from "./helpers/combine-params.js";
|
|
5
5
|
import { getSelectedServer as B } from "./helpers/get-selected-server.js";
|
|
6
|
-
import {
|
|
7
|
-
import b from "../../
|
|
8
|
-
|
|
6
|
+
import { getActiveProxyUrl as U } from "../../helpers/get-active-proxy-url.js";
|
|
7
|
+
import { getServers as b } from "../../helpers/get-servers.js";
|
|
8
|
+
import N from "../../blocks/operation-block/OperationBlock.vue.js";
|
|
9
|
+
const A = {
|
|
9
10
|
key: 1,
|
|
10
11
|
class: "flex h-full w-full items-center justify-center"
|
|
11
|
-
}, E = {},
|
|
12
|
+
}, E = {}, $ = /* @__PURE__ */ f({
|
|
12
13
|
...E,
|
|
13
14
|
__name: "Operation",
|
|
14
15
|
props: {
|
|
@@ -50,14 +51,14 @@ const N = {
|
|
|
50
51
|
...t,
|
|
51
52
|
location: "document"
|
|
52
53
|
}))
|
|
53
|
-
]),
|
|
54
|
+
]), i = n(() => {
|
|
54
55
|
const t = o(e.options)?.servers ?? c.value?.servers ?? r.value?.servers ?? e.document?.servers;
|
|
55
|
-
return
|
|
56
|
+
return b(t, {
|
|
56
57
|
baseServerUrl: o(e.options)?.baseServerURL,
|
|
57
58
|
documentUrl: e.document?.["x-scalar-original-source-url"]
|
|
58
59
|
});
|
|
59
60
|
}), d = n(
|
|
60
|
-
() => B(e.document,
|
|
61
|
+
() => B(e.document, i.value)
|
|
61
62
|
), v = n(() => e.document?.["x-scalar-set-operation-security"] ? {
|
|
62
63
|
type: "operation",
|
|
63
64
|
path: e.path ?? "",
|
|
@@ -73,11 +74,11 @@ const N = {
|
|
|
73
74
|
)
|
|
74
75
|
)), S = n(
|
|
75
76
|
() => w(o(e.options)?.hiddenClients)
|
|
76
|
-
), y = "2.29.
|
|
77
|
-
return (t, a) => e.path && e.method && e.exampleName && c.value ? (
|
|
77
|
+
), y = "2.29.2";
|
|
78
|
+
return (t, a) => e.path && e.method && e.exampleName && c.value ? (l(), k(u(N), {
|
|
78
79
|
key: 0,
|
|
79
80
|
activeEnvironment: e.workspaceStore.workspace["x-scalar-active-environment"],
|
|
80
|
-
appVersion:
|
|
81
|
+
appVersion: u(y),
|
|
81
82
|
authMeta: v.value,
|
|
82
83
|
documentSecurity: e.document?.security ?? [],
|
|
83
84
|
documentSelectedSecurity: e.workspaceStore.auth.getAuthSelectedSchemas({
|
|
@@ -104,18 +105,21 @@ const N = {
|
|
|
104
105
|
}),
|
|
105
106
|
path: e.path,
|
|
106
107
|
plugins: e.plugins,
|
|
107
|
-
proxyUrl:
|
|
108
|
+
proxyUrl: u(U)(
|
|
109
|
+
e.workspaceStore.workspace["x-scalar-active-proxy"],
|
|
110
|
+
e.layout
|
|
111
|
+
) ?? "",
|
|
108
112
|
securitySchemes: e.securitySchemes,
|
|
109
113
|
selectedClient: e.workspaceStore.workspace["x-scalar-default-client"],
|
|
110
114
|
server: d.value,
|
|
111
|
-
servers:
|
|
115
|
+
servers: i.value,
|
|
112
116
|
setOperationSecurity: e.document?.["x-scalar-set-operation-security"] ?? !1,
|
|
113
117
|
"onUpdate:servers": a[0] || (a[0] = (O) => e.eventBus.emit("ui:navigate", { page: "document", path: "servers" }))
|
|
114
|
-
}, null, 8, ["activeEnvironment", "appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "environments", "eventBus", "exampleKey", "globalCookies", "hideClientButton", "history", "httpClients", "layout", "method", "operation", "operationSelectedSecurity", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (
|
|
118
|
+
}, null, 8, ["activeEnvironment", "appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "environments", "eventBus", "exampleKey", "globalCookies", "hideClientButton", "history", "httpClients", "layout", "method", "operation", "operationSelectedSecurity", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (l(), g("div", A, [...a[1] || (a[1] = [
|
|
115
119
|
x("span", { class: "text-c-3" }, "Select an operation to view details", -1)
|
|
116
120
|
])]));
|
|
117
121
|
}
|
|
118
122
|
});
|
|
119
123
|
export {
|
|
120
|
-
|
|
124
|
+
$ as default
|
|
121
125
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Workspace } from '@scalar/workspace-store/schemas';
|
|
2
|
+
import type { ClientLayout } from '../../v2/types/layout';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the default proxy URL for web layout.
|
|
5
|
+
* For the 'web' layout, this ensures requests use Scalar's hosted proxy unless overridden,
|
|
6
|
+
* which is important for browser environments with CORS or network restrictions.
|
|
7
|
+
* For 'desktop' or 'modal' layouts, returns null to indicate no proxy by default.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getDefaultProxyUrl: (layout: ClientLayout) => "https://proxy.scalar.com" | null;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the active proxy URL for the workspace.
|
|
12
|
+
*
|
|
13
|
+
* Logic:
|
|
14
|
+
* - If the active proxy url is not set, use the default proxy url.
|
|
15
|
+
* - Otherwise, use the active proxy url.
|
|
16
|
+
*/
|
|
17
|
+
export declare const getActiveProxyUrl: (activeProxyUrl: Workspace["x-scalar-active-proxy"], layout: ClientLayout) => string | null;
|
|
18
|
+
//# sourceMappingURL=get-active-proxy-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-active-proxy-url.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/get-active-proxy-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,YAAY,sCAKtD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,gBAAgB,SAAS,CAAC,uBAAuB,CAAC,EAAE,QAAQ,YAAY,kBAMzG,CAAA"}
|
|
@@ -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 = (u) => {
|
|
35
35
|
u?.createNew && g.name === "request" && p();
|
|
36
|
-
}, v = "2.29.
|
|
36
|
+
}, v = "2.29.2";
|
|
37
37
|
return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (u, e) => (l(), n("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.29.
|
|
21
|
+
"version": "2.29.2",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=20"
|
|
24
24
|
},
|
|
@@ -329,24 +329,24 @@
|
|
|
329
329
|
"zod": "^4.3.5",
|
|
330
330
|
"@scalar/analytics-client": "1.0.1",
|
|
331
331
|
"@scalar/draggable": "0.3.0",
|
|
332
|
-
"@scalar/components": "0.19.7",
|
|
333
332
|
"@scalar/helpers": "0.2.15",
|
|
334
333
|
"@scalar/icons": "0.5.3",
|
|
335
|
-
"@scalar/
|
|
334
|
+
"@scalar/components": "0.19.8",
|
|
335
|
+
"@scalar/json-magic": "0.11.4",
|
|
336
336
|
"@scalar/import": "0.4.52",
|
|
337
337
|
"@scalar/object-utils": "1.2.29",
|
|
338
|
-
"@scalar/
|
|
339
|
-
"@scalar/openapi-parser": "0.24.13",
|
|
338
|
+
"@scalar/oas-utils": "0.6.46",
|
|
340
339
|
"@scalar/openapi-types": "0.5.3",
|
|
341
|
-
"@scalar/
|
|
340
|
+
"@scalar/openapi-parser": "0.24.13",
|
|
342
341
|
"@scalar/snippetz": "0.6.15",
|
|
342
|
+
"@scalar/postman-to-openapi": "0.4.7",
|
|
343
|
+
"@scalar/sidebar": "0.7.39",
|
|
343
344
|
"@scalar/themes": "0.14.0",
|
|
345
|
+
"@scalar/use-codemirror": "0.13.43",
|
|
344
346
|
"@scalar/types": "0.6.6",
|
|
345
|
-
"@scalar/sidebar": "0.7.38",
|
|
346
|
-
"@scalar/use-hooks": "0.3.7",
|
|
347
|
-
"@scalar/use-codemirror": "0.13.42",
|
|
348
347
|
"@scalar/use-toasts": "0.9.1",
|
|
349
|
-
"@scalar/
|
|
348
|
+
"@scalar/use-hooks": "0.3.7",
|
|
349
|
+
"@scalar/workspace-store": "0.34.2"
|
|
350
350
|
},
|
|
351
351
|
"devDependencies": {
|
|
352
352
|
"@tailwindcss/vite": "^4.1.18",
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
"vitest": "4.0.16",
|
|
364
364
|
"@scalar/build-tooling": "0.4.1",
|
|
365
365
|
"@scalar/galaxy": "0.5.16",
|
|
366
|
-
"@scalar/pre-post-request-scripts": "0.2.
|
|
366
|
+
"@scalar/pre-post-request-scripts": "0.2.2"
|
|
367
367
|
},
|
|
368
368
|
"scripts": {
|
|
369
369
|
"build": "scalar-build-vite",
|