@scalar/api-client 2.8.0 → 2.8.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 +32 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +4 -4
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/hooks/useClientConfig.d.ts +6 -6
- package/dist/layouts/App/create-api-client-app.d.ts +20 -20
- package/dist/layouts/Modal/create-api-client-modal.d.ts +40 -40
- package/dist/layouts/Web/create-api-client-web.d.ts +20 -20
- package/dist/libs/create-client.d.ts +23 -23
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +23 -23
- package/dist/libs/find-request.d.ts +2 -2
- package/dist/libs/send-request/create-request-operation.js +8 -8
- package/dist/libs/send-request/create-request-operation.test.d.ts +2 -2
- package/dist/plugins/plugin-manager.d.ts +1 -1
- package/dist/store/active-entities.d.ts +2 -2
- package/dist/store/requests.d.ts +22 -22
- package/dist/store/store.d.ts +20 -20
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +2 -2
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +1 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts +1 -0
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/index.js +8 -6
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +37 -17
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { type ClientLayout } from '../hooks/useLayout.js';
|
|
2
|
-
import { type WorkspaceStore } from '../store/store.js';
|
|
3
1
|
import type { SecurityScheme } from '@scalar/oas-utils/entities/spec';
|
|
4
2
|
import { type Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
5
3
|
import type { Path, PathValue } from '@scalar/object-utils/nested';
|
|
@@ -7,9 +5,11 @@ import { type ApiClientConfiguration } from '@scalar/types/api-reference';
|
|
|
7
5
|
import type { OpenAPI } from '@scalar/types/legacy';
|
|
8
6
|
import { type Component } from 'vue';
|
|
9
7
|
import type { Router } from 'vue-router';
|
|
8
|
+
import { type ClientLayout } from '../hooks/useLayout.js';
|
|
9
|
+
import { type WorkspaceStore } from '../store/store.js';
|
|
10
10
|
export type OpenClientPayload = ({
|
|
11
11
|
path: string;
|
|
12
|
-
method: OpenAPI.HttpMethod |
|
|
12
|
+
method: OpenAPI.HttpMethod | Uppercase<OpenAPI.HttpMethod>;
|
|
13
13
|
requestUid?: never;
|
|
14
14
|
} | {
|
|
15
15
|
path?: never;
|
|
@@ -319,7 +319,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
319
319
|
type: "request";
|
|
320
320
|
uid: string & import("zod").$brand<"operation">;
|
|
321
321
|
path: string;
|
|
322
|
-
method: "delete" | "get" | "
|
|
322
|
+
method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
|
|
323
323
|
servers: (string & import("zod").$brand<"server">)[];
|
|
324
324
|
selectedServerUid: (string & import("zod").$brand<"server">) | null;
|
|
325
325
|
examples: (string & import("zod").$brand<"example">)[];
|
|
@@ -345,7 +345,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
345
345
|
description?: string | undefined;
|
|
346
346
|
schema?: unknown;
|
|
347
347
|
content?: unknown;
|
|
348
|
-
style?: "matrix" | "
|
|
348
|
+
style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
349
349
|
explode?: boolean | undefined;
|
|
350
350
|
example?: unknown;
|
|
351
351
|
examples?: Record<string, {
|
|
@@ -1391,7 +1391,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1391
1391
|
type: "request";
|
|
1392
1392
|
uid: string & import("zod").$brand<"operation">;
|
|
1393
1393
|
path: string;
|
|
1394
|
-
method: "delete" | "get" | "
|
|
1394
|
+
method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
|
|
1395
1395
|
servers: (string & import("zod").$brand<"server">)[];
|
|
1396
1396
|
selectedServerUid: (string & import("zod").$brand<"server">) | null;
|
|
1397
1397
|
examples: (string & import("zod").$brand<"example">)[];
|
|
@@ -1417,7 +1417,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1417
1417
|
description?: string | undefined;
|
|
1418
1418
|
schema?: unknown;
|
|
1419
1419
|
content?: unknown;
|
|
1420
|
-
style?: "matrix" | "
|
|
1420
|
+
style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
1421
1421
|
explode?: boolean | undefined;
|
|
1422
1422
|
example?: unknown;
|
|
1423
1423
|
examples?: Record<string, {
|
|
@@ -1450,7 +1450,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1450
1450
|
type: "request";
|
|
1451
1451
|
uid: string & import("zod").$brand<"operation">;
|
|
1452
1452
|
path: string;
|
|
1453
|
-
method: "delete" | "get" | "
|
|
1453
|
+
method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
|
|
1454
1454
|
servers: (string & import("zod").$brand<"server">)[];
|
|
1455
1455
|
selectedServerUid: (string & import("zod").$brand<"server">) | null;
|
|
1456
1456
|
examples: (string & import("zod").$brand<"example">)[];
|
|
@@ -1476,7 +1476,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1476
1476
|
description?: string | undefined;
|
|
1477
1477
|
schema?: unknown;
|
|
1478
1478
|
content?: unknown;
|
|
1479
|
-
style?: "matrix" | "
|
|
1479
|
+
style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
1480
1480
|
explode?: boolean | undefined;
|
|
1481
1481
|
example?: unknown;
|
|
1482
1482
|
examples?: Record<string, {
|
|
@@ -1510,7 +1510,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1510
1510
|
type: "request";
|
|
1511
1511
|
uid: string & import("zod").$brand<"operation">;
|
|
1512
1512
|
path: string;
|
|
1513
|
-
method: "delete" | "get" | "
|
|
1513
|
+
method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
|
|
1514
1514
|
servers: (string & import("zod").$brand<"server">)[];
|
|
1515
1515
|
selectedServerUid: (string & import("zod").$brand<"server">) | null;
|
|
1516
1516
|
examples: (string & import("zod").$brand<"example">)[];
|
|
@@ -1536,7 +1536,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1536
1536
|
description?: string | undefined;
|
|
1537
1537
|
schema?: unknown;
|
|
1538
1538
|
content?: unknown;
|
|
1539
|
-
style?: "matrix" | "
|
|
1539
|
+
style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
1540
1540
|
explode?: boolean | undefined;
|
|
1541
1541
|
example?: unknown;
|
|
1542
1542
|
examples?: Record<string, {
|
|
@@ -1569,7 +1569,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1569
1569
|
type: "request";
|
|
1570
1570
|
uid: string & import("zod").$brand<"operation">;
|
|
1571
1571
|
path: string;
|
|
1572
|
-
method: "delete" | "get" | "
|
|
1572
|
+
method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
|
|
1573
1573
|
servers: (string & import("zod").$brand<"server">)[];
|
|
1574
1574
|
selectedServerUid: (string & import("zod").$brand<"server">) | null;
|
|
1575
1575
|
examples: (string & import("zod").$brand<"example">)[];
|
|
@@ -1595,7 +1595,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1595
1595
|
description?: string | undefined;
|
|
1596
1596
|
schema?: unknown;
|
|
1597
1597
|
content?: unknown;
|
|
1598
|
-
style?: "matrix" | "
|
|
1598
|
+
style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
1599
1599
|
explode?: boolean | undefined;
|
|
1600
1600
|
example?: unknown;
|
|
1601
1601
|
examples?: Record<string, {
|
|
@@ -1627,7 +1627,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1627
1627
|
type: "request";
|
|
1628
1628
|
uid: string & import("zod").$brand<"operation">;
|
|
1629
1629
|
path: string;
|
|
1630
|
-
method: "delete" | "get" | "
|
|
1630
|
+
method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
|
|
1631
1631
|
servers: (string & import("zod").$brand<"server">)[];
|
|
1632
1632
|
selectedServerUid: (string & import("zod").$brand<"server">) | null;
|
|
1633
1633
|
examples: (string & import("zod").$brand<"example">)[];
|
|
@@ -1653,7 +1653,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1653
1653
|
description?: string | undefined;
|
|
1654
1654
|
schema?: unknown;
|
|
1655
1655
|
content?: unknown;
|
|
1656
|
-
style?: "matrix" | "
|
|
1656
|
+
style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
1657
1657
|
explode?: boolean | undefined;
|
|
1658
1658
|
example?: unknown;
|
|
1659
1659
|
examples?: Record<string, {
|
|
@@ -1685,7 +1685,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1685
1685
|
type: "request";
|
|
1686
1686
|
uid: string & import("zod").$brand<"operation">;
|
|
1687
1687
|
path: string;
|
|
1688
|
-
method: "delete" | "get" | "
|
|
1688
|
+
method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
|
|
1689
1689
|
servers: (string & import("zod").$brand<"server">)[];
|
|
1690
1690
|
selectedServerUid: (string & import("zod").$brand<"server">) | null;
|
|
1691
1691
|
examples: (string & import("zod").$brand<"example">)[];
|
|
@@ -1711,7 +1711,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1711
1711
|
description?: string | undefined;
|
|
1712
1712
|
schema?: unknown;
|
|
1713
1713
|
content?: unknown;
|
|
1714
|
-
style?: "matrix" | "
|
|
1714
|
+
style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
1715
1715
|
explode?: boolean | undefined;
|
|
1716
1716
|
example?: unknown;
|
|
1717
1717
|
examples?: Record<string, {
|
|
@@ -1744,7 +1744,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1744
1744
|
type: "request";
|
|
1745
1745
|
uid: string & import("zod").$brand<"operation">;
|
|
1746
1746
|
path: string;
|
|
1747
|
-
method: "delete" | "get" | "
|
|
1747
|
+
method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
|
|
1748
1748
|
servers: (string & import("zod").$brand<"server">)[];
|
|
1749
1749
|
selectedServerUid: (string & import("zod").$brand<"server">) | null;
|
|
1750
1750
|
examples: (string & import("zod").$brand<"example">)[];
|
|
@@ -1770,7 +1770,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1770
1770
|
description?: string | undefined;
|
|
1771
1771
|
schema?: unknown;
|
|
1772
1772
|
content?: unknown;
|
|
1773
|
-
style?: "matrix" | "
|
|
1773
|
+
style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
1774
1774
|
explode?: boolean | undefined;
|
|
1775
1775
|
example?: unknown;
|
|
1776
1776
|
examples?: Record<string, {
|
|
@@ -1802,7 +1802,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1802
1802
|
type: "request";
|
|
1803
1803
|
uid: string & import("zod").$brand<"operation">;
|
|
1804
1804
|
path: string;
|
|
1805
|
-
method: "delete" | "get" | "
|
|
1805
|
+
method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
|
|
1806
1806
|
servers: (string & import("zod").$brand<"server">)[];
|
|
1807
1807
|
selectedServerUid: (string & import("zod").$brand<"server">) | null;
|
|
1808
1808
|
examples: (string & import("zod").$brand<"example">)[];
|
|
@@ -1828,7 +1828,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1828
1828
|
description?: string | undefined;
|
|
1829
1829
|
schema?: unknown;
|
|
1830
1830
|
content?: unknown;
|
|
1831
|
-
style?: "matrix" | "
|
|
1831
|
+
style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
1832
1832
|
explode?: boolean | undefined;
|
|
1833
1833
|
example?: unknown;
|
|
1834
1834
|
examples?: Record<string, {
|
|
@@ -1860,7 +1860,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1860
1860
|
type: "request";
|
|
1861
1861
|
uid: string & import("zod").$brand<"operation">;
|
|
1862
1862
|
path: string;
|
|
1863
|
-
method: "delete" | "get" | "
|
|
1863
|
+
method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
|
|
1864
1864
|
servers: (string & import("zod").$brand<"server">)[];
|
|
1865
1865
|
selectedServerUid: (string & import("zod").$brand<"server">) | null;
|
|
1866
1866
|
examples: (string & import("zod").$brand<"example">)[];
|
|
@@ -1886,7 +1886,7 @@ export declare const createApiClient: ({ el, appComponent, configuration: _confi
|
|
|
1886
1886
|
description?: string | undefined;
|
|
1887
1887
|
schema?: unknown;
|
|
1888
1888
|
content?: unknown;
|
|
1889
|
-
style?: "matrix" | "
|
|
1889
|
+
style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
1890
1890
|
explode?: boolean | undefined;
|
|
1891
1891
|
example?: unknown;
|
|
1892
1892
|
examples?: Record<string, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-client.d.ts","sourceRoot":"","sources":["../../src/libs/create-client.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"create-client.d.ts","sourceRoot":"","sources":["../../src/libs/create-client.ts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uDAAiE,CAAC;;;;;;;;;;4BAA17E,CAAC;;;;;;;;;iDAAiV,CAAC;gDAA0E,CAAC;qCAA+D,CAAC;;4BAA6D,CAAC;;;;;;;;;;;iDAA0X,CAAC;gDAA0E,CAAC;qCAA+D,CAAC;uDAAiE,CAAC;;qCAAiF,CAAC;;;;;;;;;iDAAuU,CAAC;gDAA0E,CAAC;qCAA+D,CAAC;uDAAiE,CAAC;;qCAAiF,CAAC;;;;;;;;;;;;iDAA+c,CAAC;gDAA0E,CAAC;qCAA+D,CAAC;uDAAiE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAvBnsU,4CAA4C;gCAChB,MAAM,eAAe,MAAM;CAqB1D,CAAA"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { loadAllResources as D } from "./local-storage.js";
|
|
6
|
-
import { createActiveEntitiesStore as G, ACTIVE_ENTITIES_SYMBOL as V } from "../store/active-entities.js";
|
|
7
|
-
import { createWorkspaceStore as z, WORKSPACE_SYMBOL as H } from "../store/store.js";
|
|
8
|
-
import { workspaceSchema as J } from "@scalar/oas-utils/entities/workspace";
|
|
9
|
-
import { prettyPrintJson as Q } from "@scalar/oas-utils/helpers";
|
|
10
|
-
import { LS_KEYS as X } from "@scalar/helpers/object/local-storage";
|
|
11
|
-
import { DATA_VERSION_LS_LEY as Z, DATA_VERSION as $ } from "@scalar/oas-utils/migrations";
|
|
1
|
+
import { LS_KEYS as N } from "@scalar/helpers/object/local-storage";
|
|
2
|
+
import { workspaceSchema as F } from "@scalar/oas-utils/entities/workspace";
|
|
3
|
+
import { prettyPrintJson as j } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { DATA_VERSION_LS_LEY as W, DATA_VERSION as K } from "@scalar/oas-utils/migrations";
|
|
12
5
|
import { apiClientConfigurationSchema as _ } from "@scalar/types/api-reference";
|
|
13
|
-
import { ref as
|
|
6
|
+
import { ref as D, createApp as G, watch as V } from "vue";
|
|
7
|
+
import { CLIENT_CONFIGURATION_SYMBOL as z } from "../hooks/useClientConfig.js";
|
|
8
|
+
import { LAYOUT_SYMBOL as H } from "../hooks/useLayout.js";
|
|
9
|
+
import { createSidebarState as J, SIDEBAR_SYMBOL as Q } from "../hooks/useSidebar.js";
|
|
10
|
+
import { getRequestUidByPathMethod as X } from "./get-request-uid-by-path-method.js";
|
|
11
|
+
import { loadAllResources as Z } from "./local-storage.js";
|
|
12
|
+
import { createActiveEntitiesStore as $, ACTIVE_ENTITIES_SYMBOL as ee } from "../store/active-entities.js";
|
|
13
|
+
import { createWorkspaceStore as te, WORKSPACE_SYMBOL as re } from "../store/store.js";
|
|
14
14
|
import { createPluginManager as oe } from "../plugins/plugin-manager.js";
|
|
15
15
|
import { PLUGIN_MANAGER_SYMBOL as ae } from "../plugins/hooks/usePluginManager.js";
|
|
16
16
|
const Me = ({
|
|
@@ -24,14 +24,14 @@ const Me = ({
|
|
|
24
24
|
layout: m = "desktop",
|
|
25
25
|
router: n
|
|
26
26
|
}) => {
|
|
27
|
-
const a =
|
|
27
|
+
const a = D(_.parse(U)), o = x || te({
|
|
28
28
|
proxyUrl: a.value.proxyUrl,
|
|
29
29
|
theme: a.value.theme,
|
|
30
30
|
showSidebar: a.value.showSidebar ?? !0,
|
|
31
31
|
hideClientButton: a.value.hideClientButton ?? !1,
|
|
32
32
|
_integration: a.value._integration,
|
|
33
33
|
useLocalStorage: C
|
|
34
|
-
}), f =
|
|
34
|
+
}), f = $({ ...o, router: n }), b = J({ layout: m }), E = oe({
|
|
35
35
|
plugins: a.value.plugins ?? []
|
|
36
36
|
}), v = () => {
|
|
37
37
|
try {
|
|
@@ -40,13 +40,13 @@ const Me = ({
|
|
|
40
40
|
return !1;
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
if (v() && localStorage.getItem(
|
|
43
|
+
if (v() && localStorage.getItem(N.WORKSPACE) && !l)
|
|
44
44
|
try {
|
|
45
45
|
const t = {};
|
|
46
46
|
let e = 0, r = 0, s = "";
|
|
47
47
|
for (s in localStorage)
|
|
48
48
|
Object.hasOwn(localStorage, s) && (r = (localStorage[s].length + s.length) * 2, e += r, t[s] = (r / 1024).toFixed(2) + " KB");
|
|
49
|
-
t.Total = (e / 1024).toFixed(2) + " KB", console.table(t),
|
|
49
|
+
t.Total = (e / 1024).toFixed(2) + " KB", console.table(t), Z(o);
|
|
50
50
|
} catch (t) {
|
|
51
51
|
console.warn("Failed to load from localStorage:", t);
|
|
52
52
|
}
|
|
@@ -57,20 +57,20 @@ const Me = ({
|
|
|
57
57
|
proxyUrl: a.value.proxyUrl
|
|
58
58
|
}), v())
|
|
59
59
|
try {
|
|
60
|
-
localStorage.setItem(
|
|
60
|
+
localStorage.setItem(W, K);
|
|
61
61
|
} catch (t) {
|
|
62
62
|
console.warn("Failed to set localStorage version:", t);
|
|
63
63
|
}
|
|
64
64
|
} else {
|
|
65
|
-
const t =
|
|
65
|
+
const t = F.parse({
|
|
66
66
|
uid: "default",
|
|
67
67
|
name: "Workspace",
|
|
68
68
|
proxyUrl: a.value.proxyUrl
|
|
69
69
|
});
|
|
70
70
|
o.workspaceMutators.rawAdd(t);
|
|
71
71
|
}
|
|
72
|
-
const i =
|
|
73
|
-
i.use(n), i.provide(
|
|
72
|
+
const i = G(y);
|
|
73
|
+
i.use(n), i.provide(re, o), i.provide(H, m), i.provide(ee, f), i.provide(Q, b), i.provide(z, a), i.provide(ae, E), i.config.idPrefix = "scalar-client";
|
|
74
74
|
const {
|
|
75
75
|
collectionMutators: k,
|
|
76
76
|
importSpecFile: I,
|
|
@@ -95,7 +95,7 @@ const Me = ({
|
|
|
95
95
|
};
|
|
96
96
|
L && w();
|
|
97
97
|
const M = (t) => {
|
|
98
|
-
const e =
|
|
98
|
+
const e = X(h, t);
|
|
99
99
|
e ? n.push({
|
|
100
100
|
name: "request",
|
|
101
101
|
query: t?._source ? { source: t._source } : {},
|
|
@@ -138,7 +138,7 @@ const Me = ({
|
|
|
138
138
|
},
|
|
139
139
|
/** Update the currently selected server via URL */
|
|
140
140
|
onUpdateServer: (t) => {
|
|
141
|
-
|
|
141
|
+
V(
|
|
142
142
|
() => u.value?.selectedServerUid,
|
|
143
143
|
(e) => {
|
|
144
144
|
const r = Object.values(g).find((s) => s.uid === e);
|
|
@@ -180,7 +180,7 @@ const Me = ({
|
|
|
180
180
|
if (!r)
|
|
181
181
|
return;
|
|
182
182
|
const s = Object.keys(r.requestBody?.content || {})[0] || "", c = r.requestBody?.content?.[s]?.examples?.[t];
|
|
183
|
-
c && R.edit(r.examples[0], "body.raw.value",
|
|
183
|
+
c && R.edit(r.examples[0], "body.raw.value", j(c.value));
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
186
|
};
|
|
@@ -12,7 +12,7 @@ export declare const findRequestByPathMethod: (path: string, method: string, req
|
|
|
12
12
|
type: "request";
|
|
13
13
|
uid: string & import("zod").$brand<"operation">;
|
|
14
14
|
path: string;
|
|
15
|
-
method: "delete" | "get" | "
|
|
15
|
+
method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
|
|
16
16
|
servers: (string & import("zod").$brand<"server">)[];
|
|
17
17
|
selectedServerUid: (string & import("zod").$brand<"server">) | null;
|
|
18
18
|
examples: (string & import("zod").$brand<"example">)[];
|
|
@@ -38,7 +38,7 @@ export declare const findRequestByPathMethod: (path: string, method: string, req
|
|
|
38
38
|
description?: string | undefined;
|
|
39
39
|
schema?: unknown;
|
|
40
40
|
content?: unknown;
|
|
41
|
-
style?: "matrix" | "
|
|
41
|
+
style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
42
42
|
explode?: boolean | undefined;
|
|
43
43
|
example?: unknown;
|
|
44
44
|
examples?: Record<string, {
|
|
@@ -9,7 +9,7 @@ import { decodeBuffer as te } from "./decode-buffer.js";
|
|
|
9
9
|
import { setRequestCookies as oe, getCookieHeader as re } from "./set-request-cookies.js";
|
|
10
10
|
import { replaceTemplateVariables as c } from "../string-template.js";
|
|
11
11
|
import { buildRequestSecurity as se } from "./build-request-security.js";
|
|
12
|
-
const
|
|
12
|
+
const we = ({
|
|
13
13
|
environment: q,
|
|
14
14
|
example: s,
|
|
15
15
|
globalCookies: v,
|
|
@@ -22,13 +22,13 @@ const be = ({
|
|
|
22
22
|
pluginManager: h
|
|
23
23
|
}) => {
|
|
24
24
|
try {
|
|
25
|
-
const o = q ?? {},
|
|
25
|
+
const o = q ?? {}, w = new AbortController(), b = s.parameters.path.reduce((t, e) => (e.enabled && (t[e.key] = c(e.value, o)), t), {}), L = c(k?.url ?? "", o), l = c(c(a.path, o), b);
|
|
26
26
|
let r = L || l;
|
|
27
27
|
if (!r)
|
|
28
28
|
throw P.URL_EMPTY;
|
|
29
29
|
Object.entries(k?.variables ?? {}).forEach(([t, e]) => {
|
|
30
30
|
r = c(r, {
|
|
31
|
-
[t]:
|
|
31
|
+
[t]: b[t] || e.default
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
34
|
const z = ee(s, o, a), B = M(s, o), { body: F } = $(a.method, s, o), { cookieParams: _ } = oe({
|
|
@@ -62,11 +62,11 @@ const be = ({
|
|
|
62
62
|
{
|
|
63
63
|
request: y,
|
|
64
64
|
sendRequest: async () => {
|
|
65
|
-
m?.emit("start"), h && h.executeHook("onBeforeRequest", { request: y });
|
|
65
|
+
m?.emit("start"), h && await h.executeHook("onBeforeRequest", { request: y });
|
|
66
66
|
const t = Date.now();
|
|
67
67
|
try {
|
|
68
68
|
const e = await fetch(y, {
|
|
69
|
-
signal:
|
|
69
|
+
signal: w.signal
|
|
70
70
|
}), S = e.headers.get("content-type")?.startsWith("text/event-stream");
|
|
71
71
|
m?.emit("stop");
|
|
72
72
|
const X = Date.now() - t, j = e.clone(), R = Z(e.headers, T(u, r)), I = e.headers.get("content-type") ?? "text/plain;charset=UTF-8", C = await j.arrayBuffer(), Q = te(C, I), i = e.clone(), V = i.statusText || N[i.status]?.name || "", K = [204, 205, 304].includes(i.status), d = new Response(K ? null : i.body, {
|
|
@@ -74,7 +74,7 @@ const be = ({
|
|
|
74
74
|
statusText: V,
|
|
75
75
|
headers: i.headers
|
|
76
76
|
});
|
|
77
|
-
h && h.executeHook("onResponseReceived", { response: d, operation: a });
|
|
77
|
+
h && await h.executeHook("onResponseReceived", { response: d, operation: a });
|
|
78
78
|
const g = "getSetCookie" in d.headers && typeof d.headers.getSetCookie == "function" ? d.headers.getSetCookie() : [];
|
|
79
79
|
return S && e.body ? [
|
|
80
80
|
null,
|
|
@@ -113,7 +113,7 @@ const be = ({
|
|
|
113
113
|
return m?.emit("abort"), [U(e, P.REQUEST_FAILED), null];
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
|
-
controller:
|
|
116
|
+
controller: w
|
|
117
117
|
}
|
|
118
118
|
];
|
|
119
119
|
} catch (o) {
|
|
@@ -121,5 +121,5 @@ const be = ({
|
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
export {
|
|
124
|
-
|
|
124
|
+
we as createRequestOperation
|
|
125
125
|
};
|
|
@@ -15,7 +15,7 @@ export declare const createRequestPayload: (metaRequestPayload?: MetaRequestPayl
|
|
|
15
15
|
type: "request";
|
|
16
16
|
uid: string & z.core.$brand<"operation">;
|
|
17
17
|
path: string;
|
|
18
|
-
method: "delete" | "get" | "
|
|
18
|
+
method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
|
|
19
19
|
servers: (string & z.core.$brand<"server">)[];
|
|
20
20
|
selectedServerUid: (string & z.core.$brand<"server">) | null;
|
|
21
21
|
examples: (string & z.core.$brand<"example">)[];
|
|
@@ -41,7 +41,7 @@ export declare const createRequestPayload: (metaRequestPayload?: MetaRequestPayl
|
|
|
41
41
|
description?: string | undefined;
|
|
42
42
|
schema?: unknown;
|
|
43
43
|
content?: unknown;
|
|
44
|
-
style?: "matrix" | "
|
|
44
|
+
style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
45
45
|
explode?: boolean | undefined;
|
|
46
46
|
example?: unknown;
|
|
47
47
|
examples?: Record<string, {
|
|
@@ -23,7 +23,7 @@ export declare const createPluginManager: ({ plugins }: CreatePluginManagerParam
|
|
|
23
23
|
/**
|
|
24
24
|
* Execute a hook for a specific event
|
|
25
25
|
*/
|
|
26
|
-
executeHook: <E extends keyof HookFunctions>(event: E, ...args: HookFunctions[E] extends z.ZodFunction<infer Args, any> ? z.infer<Args> : any) => Promise<
|
|
26
|
+
executeHook: <E extends keyof HookFunctions>(event: E, ...args: HookFunctions[E] extends z.ZodFunction<infer Args, any> ? z.infer<Args> : any) => Promise<unknown[]>;
|
|
27
27
|
};
|
|
28
28
|
export type PluginManager = ReturnType<typeof createPluginManager>;
|
|
29
29
|
export declare const PLUGIN_MANAGER_SYMBOL: InjectionKey<PluginManager>;
|
|
@@ -191,7 +191,7 @@ export declare const createActiveEntitiesStore: ({ collections, requestExamples,
|
|
|
191
191
|
type: "request";
|
|
192
192
|
uid: string & import("zod").$brand<"operation">;
|
|
193
193
|
path: string;
|
|
194
|
-
method: "delete" | "get" | "
|
|
194
|
+
method: "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
|
|
195
195
|
servers: (string & import("zod").$brand<"server">)[];
|
|
196
196
|
selectedServerUid: (string & import("zod").$brand<"server">) | null;
|
|
197
197
|
examples: (string & import("zod").$brand<"example">)[];
|
|
@@ -217,7 +217,7 @@ export declare const createActiveEntitiesStore: ({ collections, requestExamples,
|
|
|
217
217
|
description?: string | undefined;
|
|
218
218
|
schema?: unknown;
|
|
219
219
|
content?: unknown;
|
|
220
|
-
style?: "matrix" | "
|
|
220
|
+
style?: "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
221
221
|
explode?: boolean | undefined;
|
|
222
222
|
example?: unknown;
|
|
223
223
|
examples?: Record<string, {
|