@scalar/api-client 2.3.10 → 2.3.12
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 +49 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +45 -51
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +3 -3
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +25 -26
- package/dist/layouts/App/create-api-client-app.d.ts +18 -160
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +36 -320
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +18 -160
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +18 -160
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +40 -37
- package/dist/libs/send-request/create-request-operation.d.ts +1 -0
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +41 -41
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts +2 -154
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +12 -12
- package/dist/store/security-schemes.d.ts +16 -6
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts +18 -160
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue.js +2 -2
- package/dist/views/Request/Request.vue.d.ts +2 -0
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +35 -33
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.js +1 -1
- package/dist/views/Request/RequestRoot.vue2.js +80 -69
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +32 -32
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts +11 -0
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +81 -0
- package/dist/views/Request/ResponseSection/RequestHeaders.vue2.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +6 -6
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +2 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +73 -60
- package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
- package/dist/views/Request/consts/mediaTypes.js +1 -0
- package/dist/views/Request/hooks/useOpenApiWatcher.js +25 -25
- package/package.json +12 -12
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { ERRORS as k, normalizeError as
|
|
2
|
-
import { normalizeHeaders as
|
|
3
|
-
import { createFetchBody as
|
|
4
|
-
import { createFetchHeaders as
|
|
5
|
-
import { createFetchQueryParams as
|
|
6
|
-
import { decodeBuffer as
|
|
7
|
-
import { setRequestCookies as
|
|
8
|
-
import { replaceTemplateVariables as
|
|
9
|
-
import { isDefined as M, mergeUrls as Y, shouldUseProxy as
|
|
10
|
-
import { buildRequestSecurity as
|
|
1
|
+
import { ERRORS as k, normalizeError as w } from "../errors.js";
|
|
2
|
+
import { normalizeHeaders as j } from "../normalize-headers.js";
|
|
3
|
+
import { createFetchBody as A } from "./create-fetch-body.js";
|
|
4
|
+
import { createFetchHeaders as I } from "./create-fetch-headers.js";
|
|
5
|
+
import { createFetchQueryParams as Q } from "./create-fetch-query-params.js";
|
|
6
|
+
import { decodeBuffer as V } from "./decode-buffer.js";
|
|
7
|
+
import { setRequestCookies as X, getCookieHeader as K } from "./set-request-cookies.js";
|
|
8
|
+
import { replaceTemplateVariables as s } from "../string-template.js";
|
|
9
|
+
import { isDefined as M, mergeUrls as Y, shouldUseProxy as g, redirectToProxy as G } from "@scalar/oas-utils/helpers";
|
|
10
|
+
import { buildRequestSecurity as J } from "./build-request-security.js";
|
|
11
11
|
const ce = ({
|
|
12
|
-
environment:
|
|
13
|
-
example:
|
|
14
|
-
globalCookies:
|
|
15
|
-
proxyUrl:
|
|
12
|
+
environment: C,
|
|
13
|
+
example: i,
|
|
14
|
+
globalCookies: R,
|
|
15
|
+
proxyUrl: c,
|
|
16
16
|
request: d,
|
|
17
17
|
securitySchemes: P,
|
|
18
18
|
selectedSecuritySchemeUids: T = [],
|
|
19
|
-
server:
|
|
19
|
+
server: a,
|
|
20
20
|
status: o
|
|
21
21
|
}) => {
|
|
22
22
|
try {
|
|
23
|
-
const t =
|
|
23
|
+
const t = C ?? {}, p = new AbortController(), y = i.parameters.path.reduce((r, e) => (e.enabled && (r[e.key] = s(e.value, t)), r), {}), q = s((a == null ? void 0 : a.url) ?? "", t), h = s(d.path, y);
|
|
24
24
|
let n = q || h;
|
|
25
25
|
if (!n)
|
|
26
26
|
throw k.URL_EMPTY;
|
|
27
|
-
Object.entries((
|
|
28
|
-
n =
|
|
29
|
-
[r]:
|
|
27
|
+
Object.entries((a == null ? void 0 : a.variables) ?? {}).forEach(([r, e]) => {
|
|
28
|
+
n = s(n, {
|
|
29
|
+
[r]: y[r] || e.default
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
|
-
const H =
|
|
33
|
-
example:
|
|
32
|
+
const H = Q(i, t), U = I(i, t), { body: E } = A(d.method, i, t), { cookieParams: L } = X({
|
|
33
|
+
example: i,
|
|
34
34
|
env: t,
|
|
35
|
-
globalCookies:
|
|
35
|
+
globalCookies: R,
|
|
36
36
|
serverUrl: n,
|
|
37
|
-
proxyUrl:
|
|
38
|
-
}), D = T.flat().map((r) => P[r]).filter(M), l =
|
|
37
|
+
proxyUrl: c
|
|
38
|
+
}), D = T.flat().map((r) => P[r]).filter(M), l = J(D, t), m = { ...Object.entries(l.headers).reduce(
|
|
39
39
|
(r, [e, u]) => (r[e.toLowerCase()] = u, r),
|
|
40
40
|
{}
|
|
41
|
-
), ...U },
|
|
42
|
-
n = Y(n, h,
|
|
43
|
-
const f =
|
|
44
|
-
f && (
|
|
41
|
+
), ...U }, z = [...L, ...l.cookies], F = new URLSearchParams([...H, ...l.urlParams]);
|
|
42
|
+
n = Y(n, h, F);
|
|
43
|
+
const f = s(K(z, m.Cookie), t);
|
|
44
|
+
f && (g(c, n) ? (console.warn(
|
|
45
45
|
"We’re using a `X-Scalar-Cookie` custom header to the request. The proxy will forward this as a `Cookie` header. We do this to avoid the browser omitting the `Cookie` header for cross-origin requests for security reasons."
|
|
46
46
|
), m["X-Scalar-Cookie"] = f) : (console.warn(
|
|
47
47
|
`We’re trying to add a Cookie header, but browsers often omit them for cross-origin requests for various security reasons. If it’s not working, that’s probably why. Here are the requirements for it to work:
|
|
@@ -50,35 +50,35 @@ const ce = ({
|
|
|
50
50
|
- The connection must be made over HTTPS.
|
|
51
51
|
`
|
|
52
52
|
), m.Cookie = f));
|
|
53
|
-
const
|
|
53
|
+
const _ = G(c, n), S = new Request(_, {
|
|
54
54
|
method: d.method.toUpperCase(),
|
|
55
|
-
body:
|
|
55
|
+
body: E ?? null,
|
|
56
56
|
headers: m
|
|
57
57
|
});
|
|
58
58
|
return [
|
|
59
59
|
null,
|
|
60
60
|
{
|
|
61
|
-
request:
|
|
61
|
+
request: S,
|
|
62
62
|
sendRequest: async () => {
|
|
63
63
|
o == null || o.emit("start");
|
|
64
64
|
const r = Date.now();
|
|
65
65
|
try {
|
|
66
|
-
const e = await fetch(
|
|
67
|
-
signal:
|
|
66
|
+
const e = await fetch(S, {
|
|
67
|
+
signal: p.signal
|
|
68
68
|
});
|
|
69
69
|
o == null || o.emit("stop");
|
|
70
|
-
const u =
|
|
70
|
+
const u = j(e.headers, g(c, n)), B = e.headers.get("content-type") ?? "text/plain;charset=UTF-8", b = await e.arrayBuffer(), O = V(b, B), W = "getSetCookie" in e.headers && typeof e.headers.getSetCookie == "function" ? e.headers.getSetCookie() : [];
|
|
71
71
|
return [
|
|
72
72
|
null,
|
|
73
73
|
{
|
|
74
74
|
timestamp: Date.now(),
|
|
75
|
-
request:
|
|
75
|
+
request: i,
|
|
76
76
|
response: {
|
|
77
77
|
...e,
|
|
78
78
|
headers: u,
|
|
79
|
-
cookieHeaderKeys:
|
|
80
|
-
data:
|
|
81
|
-
size:
|
|
79
|
+
cookieHeaderKeys: W,
|
|
80
|
+
data: O,
|
|
81
|
+
size: b.byteLength,
|
|
82
82
|
duration: Date.now() - r,
|
|
83
83
|
method: d.method,
|
|
84
84
|
status: e.status,
|
|
@@ -87,14 +87,14 @@ const ce = ({
|
|
|
87
87
|
}
|
|
88
88
|
];
|
|
89
89
|
} catch (e) {
|
|
90
|
-
return o == null || o.emit("abort"), [
|
|
90
|
+
return o == null || o.emit("abort"), [w(e, k.REQUEST_FAILED), null];
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
|
-
controller:
|
|
93
|
+
controller: p
|
|
94
94
|
}
|
|
95
95
|
];
|
|
96
96
|
} catch (t) {
|
|
97
|
-
return console.error(t), o == null || o.emit("abort"), [
|
|
97
|
+
return console.error(t), o == null || o.emit("abort"), [w(t), null];
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-request-operation.test.d.ts","sourceRoot":"","sources":["../../../src/libs/send-request/create-request-operation.test.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,oBAAoB,EAIrB,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQ5B,eAAO,MAAM,QAAQ,0BAAkC,CAAA;AAEvD,KAAK,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,KAAK,kBAAkB,GAAG;IACxB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,qDAAqD;AACrD,eAAO,MAAM,oBAAoB,wBAAwB,kBAAkB;;;
|
|
1
|
+
{"version":3,"file":"create-request-operation.test.d.ts","sourceRoot":"","sources":["../../../src/libs/send-request/create-request-operation.test.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,oBAAoB,EAIrB,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA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;;;;uBAA4J,CAAC;oBAAsC,CAAC;uBAAoD,CAAC;2BAA6C,CAAC;uBAAyC,CAAC;wBAA2B,CAAC;wBAA2C,CAAC;sBAA0C,CAAC;oBAAsC,CAAC;oBAAwC,CAAC;wBAA2B,CAAC;;;;;;uBAA4J,CAAC;oBAAsC,CAAC;uBAAoD,CAAC;2BAA6C,CAAC;uBAAyC,CAAC;wBAA2B,CAAC;wBAA2C,CAAC;sBAA0C,CAAC;oBAAsC,CAAC;oBAAwC,CAAC;wBAA2B,CAAC;;;+BAAqE,EAAG,KAAK;;;;sBA7rB1ziB,EAAA,KAAR;;;;iBAMF,CAAD;uBAGQ,CAAC;mBAGY,CAAC;gBAAkC,CAAC;;;;;CAtO7D,CAAA"}
|
|
@@ -19,83 +19,7 @@ export declare function importSpecFileFactory({ requestMutators, collectionMutat
|
|
|
19
19
|
examples: import("@scalar/oas-utils/entities/spec").RequestExample[];
|
|
20
20
|
servers: import("@scalar/oas-utils/entities/spec").Server[];
|
|
21
21
|
tags: import("@scalar/oas-utils/entities/spec").Tag[];
|
|
22
|
-
securitySchemes: (
|
|
23
|
-
uid: string & import("zod").BRAND<"securityScheme">;
|
|
24
|
-
name: string;
|
|
25
|
-
value: string;
|
|
26
|
-
type: "apiKey";
|
|
27
|
-
in: "cookie" | "query" | "header";
|
|
28
|
-
nameKey: string;
|
|
29
|
-
description?: string | undefined;
|
|
30
|
-
} | {
|
|
31
|
-
uid: string & import("zod").BRAND<"securityScheme">;
|
|
32
|
-
type: "http";
|
|
33
|
-
password: string;
|
|
34
|
-
nameKey: string;
|
|
35
|
-
scheme: "basic" | "bearer";
|
|
36
|
-
bearerFormat: string;
|
|
37
|
-
username: string;
|
|
38
|
-
token: string;
|
|
39
|
-
description?: string | undefined;
|
|
40
|
-
} | {
|
|
41
|
-
uid: string & import("zod").BRAND<"securityScheme">;
|
|
42
|
-
type: "openIdConnect";
|
|
43
|
-
nameKey: string;
|
|
44
|
-
openIdConnectUrl: string;
|
|
45
|
-
description?: string | undefined;
|
|
46
|
-
} | {
|
|
47
|
-
uid: string & import("zod").BRAND<"securityScheme">;
|
|
48
|
-
type: "oauth2";
|
|
49
|
-
nameKey: string;
|
|
50
|
-
flows: {
|
|
51
|
-
password?: {
|
|
52
|
-
type: "password";
|
|
53
|
-
password: string;
|
|
54
|
-
username: string;
|
|
55
|
-
token: string;
|
|
56
|
-
refreshUrl: string;
|
|
57
|
-
scopes: Record<string, string>;
|
|
58
|
-
selectedScopes: string[];
|
|
59
|
-
"x-scalar-client-id": string;
|
|
60
|
-
tokenUrl: string;
|
|
61
|
-
clientSecret: string;
|
|
62
|
-
} | undefined;
|
|
63
|
-
implicit?: {
|
|
64
|
-
type: "implicit";
|
|
65
|
-
token: string;
|
|
66
|
-
refreshUrl: string;
|
|
67
|
-
scopes: Record<string, string>;
|
|
68
|
-
selectedScopes: string[];
|
|
69
|
-
"x-scalar-client-id": string;
|
|
70
|
-
authorizationUrl: string;
|
|
71
|
-
"x-scalar-redirect-uri": string;
|
|
72
|
-
} | undefined;
|
|
73
|
-
clientCredentials?: {
|
|
74
|
-
type: "clientCredentials";
|
|
75
|
-
token: string;
|
|
76
|
-
refreshUrl: string;
|
|
77
|
-
scopes: Record<string, string>;
|
|
78
|
-
selectedScopes: string[];
|
|
79
|
-
"x-scalar-client-id": string;
|
|
80
|
-
tokenUrl: string;
|
|
81
|
-
clientSecret: string;
|
|
82
|
-
} | undefined;
|
|
83
|
-
authorizationCode?: {
|
|
84
|
-
type: "authorizationCode";
|
|
85
|
-
token: string;
|
|
86
|
-
refreshUrl: string;
|
|
87
|
-
scopes: Record<string, string>;
|
|
88
|
-
selectedScopes: string[];
|
|
89
|
-
"x-scalar-client-id": string;
|
|
90
|
-
authorizationUrl: string;
|
|
91
|
-
"x-scalar-redirect-uri": string;
|
|
92
|
-
tokenUrl: string;
|
|
93
|
-
clientSecret: string;
|
|
94
|
-
"x-usePkce": "SHA-256" | "plain" | "no";
|
|
95
|
-
} | undefined;
|
|
96
|
-
};
|
|
97
|
-
description?: string | undefined;
|
|
98
|
-
})[];
|
|
22
|
+
securitySchemes: import("@scalar/types/entities").SecurityScheme[];
|
|
99
23
|
} | undefined>;
|
|
100
24
|
importSpecFromUrl: (url: string, workspaceUid: string, { proxyUrl, ...options }?: Omit<ImportSpecFileArgs, "documentUrl"> & Pick<ApiReferenceConfiguration, "proxyUrl">) => Promise<ErrorResponse<Awaited<ReturnType<(_spec: string | Record<string, any>, workspaceUid: string, options?: ImportSpecFileArgs) => Promise<{
|
|
101
25
|
error: false;
|
|
@@ -105,83 +29,7 @@ export declare function importSpecFileFactory({ requestMutators, collectionMutat
|
|
|
105
29
|
examples: import("@scalar/oas-utils/entities/spec").RequestExample[];
|
|
106
30
|
servers: import("@scalar/oas-utils/entities/spec").Server[];
|
|
107
31
|
tags: import("@scalar/oas-utils/entities/spec").Tag[];
|
|
108
|
-
securitySchemes: (
|
|
109
|
-
uid: string & import("zod").BRAND<"securityScheme">;
|
|
110
|
-
name: string;
|
|
111
|
-
value: string;
|
|
112
|
-
type: "apiKey";
|
|
113
|
-
in: "cookie" | "query" | "header";
|
|
114
|
-
nameKey: string;
|
|
115
|
-
description?: string | undefined;
|
|
116
|
-
} | {
|
|
117
|
-
uid: string & import("zod").BRAND<"securityScheme">;
|
|
118
|
-
type: "http";
|
|
119
|
-
password: string;
|
|
120
|
-
nameKey: string;
|
|
121
|
-
scheme: "basic" | "bearer";
|
|
122
|
-
bearerFormat: string;
|
|
123
|
-
username: string;
|
|
124
|
-
token: string;
|
|
125
|
-
description?: string | undefined;
|
|
126
|
-
} | {
|
|
127
|
-
uid: string & import("zod").BRAND<"securityScheme">;
|
|
128
|
-
type: "openIdConnect";
|
|
129
|
-
nameKey: string;
|
|
130
|
-
openIdConnectUrl: string;
|
|
131
|
-
description?: string | undefined;
|
|
132
|
-
} | {
|
|
133
|
-
uid: string & import("zod").BRAND<"securityScheme">;
|
|
134
|
-
type: "oauth2";
|
|
135
|
-
nameKey: string;
|
|
136
|
-
flows: {
|
|
137
|
-
password?: {
|
|
138
|
-
type: "password";
|
|
139
|
-
password: string;
|
|
140
|
-
username: string;
|
|
141
|
-
token: string;
|
|
142
|
-
refreshUrl: string;
|
|
143
|
-
scopes: Record<string, string>;
|
|
144
|
-
selectedScopes: string[];
|
|
145
|
-
"x-scalar-client-id": string;
|
|
146
|
-
tokenUrl: string;
|
|
147
|
-
clientSecret: string;
|
|
148
|
-
} | undefined;
|
|
149
|
-
implicit?: {
|
|
150
|
-
type: "implicit";
|
|
151
|
-
token: string;
|
|
152
|
-
refreshUrl: string;
|
|
153
|
-
scopes: Record<string, string>;
|
|
154
|
-
selectedScopes: string[];
|
|
155
|
-
"x-scalar-client-id": string;
|
|
156
|
-
authorizationUrl: string;
|
|
157
|
-
"x-scalar-redirect-uri": string;
|
|
158
|
-
} | undefined;
|
|
159
|
-
clientCredentials?: {
|
|
160
|
-
type: "clientCredentials";
|
|
161
|
-
token: string;
|
|
162
|
-
refreshUrl: string;
|
|
163
|
-
scopes: Record<string, string>;
|
|
164
|
-
selectedScopes: string[];
|
|
165
|
-
"x-scalar-client-id": string;
|
|
166
|
-
tokenUrl: string;
|
|
167
|
-
clientSecret: string;
|
|
168
|
-
} | undefined;
|
|
169
|
-
authorizationCode?: {
|
|
170
|
-
type: "authorizationCode";
|
|
171
|
-
token: string;
|
|
172
|
-
refreshUrl: string;
|
|
173
|
-
scopes: Record<string, string>;
|
|
174
|
-
selectedScopes: string[];
|
|
175
|
-
"x-scalar-client-id": string;
|
|
176
|
-
authorizationUrl: string;
|
|
177
|
-
"x-scalar-redirect-uri": string;
|
|
178
|
-
tokenUrl: string;
|
|
179
|
-
clientSecret: string;
|
|
180
|
-
"x-usePkce": "SHA-256" | "plain" | "no";
|
|
181
|
-
} | undefined;
|
|
182
|
-
};
|
|
183
|
-
description?: string | undefined;
|
|
184
|
-
})[];
|
|
32
|
+
securitySchemes: import("@scalar/types/entities").SecurityScheme[];
|
|
185
33
|
} | undefined>>>>>;
|
|
186
34
|
};
|
|
187
35
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-spec.d.ts","sourceRoot":"","sources":["../../src/store/import-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAkB,MAAM,QAAQ,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGzD,OAAO,EAAE,KAAK,yBAAyB,EAAyB,MAAM,8BAA8B,CAAA;AACpG,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E,4BAA4B;AAC5B,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAA;CAAE,CAAM,CAAA;AAErH,KAAK,kBAAkB,GAAG,yBAAyB,GAAG,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAA;AAEhG,yDAAyD;AACzD,wBAAgB,qBAAqB,CAAC,EACpC,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,GACX,EAAE,YAAY;4BAEJ,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBACrB,MAAM,YACX,kBAAkB;;;;
|
|
1
|
+
{"version":3,"file":"import-spec.d.ts","sourceRoot":"","sources":["../../src/store/import-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAkB,MAAM,QAAQ,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGzD,OAAO,EAAE,KAAK,yBAAyB,EAAyB,MAAM,8BAA8B,CAAA;AACpG,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E,4BAA4B;AAC5B,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAA;CAAE,CAAM,CAAA;AAErH,KAAK,kBAAkB,GAAG,yBAAyB,GAAG,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAA;AAEhG,yDAAyD;AACzD,wBAAgB,qBAAqB,CAAC,EACpC,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,GACX,EAAE,YAAY;4BAEJ,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBACrB,MAAM,YACX,kBAAkB;;;;gBAmD4B,YAAa,QAClE;;;;;;6BAPG,MAAM,gBACG,MAAM,6BAIjB,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,GAAG,IAAI,CAAC,yBAAyB,EAAE,UAAU,CAAC,KACvF,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,SArDlC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBACrB,MAAM,YACX,kBAAkB;;;;gBAmD4B,YAAa,QAClE;;;;;mBAD8D,CAAC,CAAC,CAAC;EAqBtE"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createHash as y,
|
|
2
|
-
import { importSpecToWorkspace as
|
|
3
|
-
import { toRaw as
|
|
4
|
-
import { normalizeError as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
1
|
+
import { createHash as y, fetchDocument as R } from "@scalar/oas-utils/helpers";
|
|
2
|
+
import { importSpecToWorkspace as S } from "@scalar/oas-utils/transforms";
|
|
3
|
+
import { toRaw as g } from "vue";
|
|
4
|
+
import { normalizeError as w } from "../libs/errors.js";
|
|
5
|
+
const F = {};
|
|
6
|
+
function O({
|
|
7
7
|
requestMutators: s,
|
|
8
8
|
collectionMutators: l,
|
|
9
9
|
serverMutators: m,
|
|
@@ -15,12 +15,12 @@ function T({
|
|
|
15
15
|
}) {
|
|
16
16
|
const n = async (t, a, e = {}) => {
|
|
17
17
|
var i;
|
|
18
|
-
const c =
|
|
18
|
+
const c = g(t), r = await S(c, e);
|
|
19
19
|
if (r.error) {
|
|
20
20
|
console.group("IMPORT ERRORS"), r.importWarnings.forEach((o) => console.warn(o)), console.groupEnd();
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
-
return e.documentUrl && typeof c == "string" && (
|
|
23
|
+
return e.documentUrl && typeof c == "string" && (F[e.documentUrl] = {
|
|
24
24
|
hash: y(c),
|
|
25
25
|
schema: r.schema
|
|
26
26
|
}), r.examples.forEach((o) => f.add(o)), r.requests.forEach((o) => s.add(o)), r.tags.forEach((o) => p.add(o)), r.servers.forEach((o) => m.add(o)), r.securitySchemes.forEach((o) => d.add(o)), l.add(r.collection), u.edit(a, "collections", [
|
|
@@ -33,7 +33,7 @@ function T({
|
|
|
33
33
|
...c
|
|
34
34
|
} = {}) {
|
|
35
35
|
try {
|
|
36
|
-
const r = await
|
|
36
|
+
const r = await R(t, e);
|
|
37
37
|
return [
|
|
38
38
|
null,
|
|
39
39
|
await n(r, a, {
|
|
@@ -42,7 +42,7 @@ function T({
|
|
|
42
42
|
})
|
|
43
43
|
];
|
|
44
44
|
} catch (r) {
|
|
45
|
-
return console.error("Failed to fetch spec from URL:", r), [
|
|
45
|
+
return console.error("Failed to fetch spec from URL:", r), [w(r), null];
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
return {
|
|
@@ -51,6 +51,6 @@ function T({
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
O as importSpecFileFactory,
|
|
55
|
+
F as specDictionary
|
|
56
56
|
};
|
|
@@ -78,6 +78,7 @@ export declare function createStoreSecuritySchemes(useLocalStorage: boolean): {
|
|
|
78
78
|
} | undefined;
|
|
79
79
|
};
|
|
80
80
|
description?: string | undefined;
|
|
81
|
+
'x-default-scopes'?: string | string[] | undefined;
|
|
81
82
|
}>;
|
|
82
83
|
securitySchemeMutators: {
|
|
83
84
|
add: (item: {
|
|
@@ -156,6 +157,7 @@ export declare function createStoreSecuritySchemes(useLocalStorage: boolean): {
|
|
|
156
157
|
} | undefined;
|
|
157
158
|
};
|
|
158
159
|
description?: string | undefined;
|
|
160
|
+
'x-default-scopes'?: string | string[] | undefined;
|
|
159
161
|
}) => void;
|
|
160
162
|
delete: (uid: (string & import("zod").BRAND<"securityScheme">) | null | undefined) => void;
|
|
161
163
|
set: (item: {
|
|
@@ -234,8 +236,9 @@ export declare function createStoreSecuritySchemes(useLocalStorage: boolean): {
|
|
|
234
236
|
} | undefined;
|
|
235
237
|
};
|
|
236
238
|
description?: string | undefined;
|
|
239
|
+
'x-default-scopes'?: string | string[] | undefined;
|
|
237
240
|
}) => void;
|
|
238
|
-
edit: <P extends "value" | "description" | "type" | "name" | "in" | "uid" | "nameKey" | "scheme" | "bearerFormat" | "openIdConnectUrl" | "flows" | "password" | "username" | "token" | "flows.password" | "flows.implicit" | "flows.clientCredentials" | "flows.authorizationCode" | "flows.password.type" | "flows.password.password" | "flows.password.username" | "flows.password.token" | "flows.password.refreshUrl" | "flows.password.scopes" | "flows.password.selectedScopes" | "flows.password.x-scalar-client-id" | "flows.password.tokenUrl" | "flows.password.clientSecret" | `flows.password.scopes.${string}` | `flows.password.selectedScopes.${number}` | "flows.implicit.type" | "flows.implicit.token" | "flows.implicit.refreshUrl" | "flows.implicit.scopes" | "flows.implicit.selectedScopes" | "flows.implicit.x-scalar-client-id" | `flows.implicit.scopes.${string}` | `flows.implicit.selectedScopes.${number}` | "flows.implicit.authorizationUrl" | "flows.implicit.x-scalar-redirect-uri" | "flows.clientCredentials.type" | "flows.clientCredentials.token" | "flows.clientCredentials.refreshUrl" | "flows.clientCredentials.scopes" | "flows.clientCredentials.selectedScopes" | "flows.clientCredentials.x-scalar-client-id" | "flows.clientCredentials.tokenUrl" | "flows.clientCredentials.clientSecret" | `flows.clientCredentials.scopes.${string}` | `flows.clientCredentials.selectedScopes.${number}` | "flows.authorizationCode.type" | "flows.authorizationCode.token" | "flows.authorizationCode.refreshUrl" | "flows.authorizationCode.scopes" | "flows.authorizationCode.selectedScopes" | "flows.authorizationCode.x-scalar-client-id" | "flows.authorizationCode.tokenUrl" | "flows.authorizationCode.clientSecret" | `flows.authorizationCode.scopes.${string}` | `flows.authorizationCode.selectedScopes.${number}` | "flows.authorizationCode.authorizationUrl" | "flows.authorizationCode.x-scalar-redirect-uri" | "flows.authorizationCode.x-usePkce">(uid: (string & import("zod").BRAND<"securityScheme">) | null | undefined, path: P, value: (P extends "value" | "description" | "type" | "name" | "in" | "uid" | "nameKey" ? {
|
|
241
|
+
edit: <P extends "value" | "description" | "type" | "name" | "in" | "uid" | "nameKey" | "scheme" | "bearerFormat" | "openIdConnectUrl" | "x-default-scopes" | "flows" | "password" | "username" | "token" | `x-default-scopes.${number}` | "flows.password" | "flows.implicit" | "flows.clientCredentials" | "flows.authorizationCode" | "flows.password.type" | "flows.password.password" | "flows.password.username" | "flows.password.token" | "flows.password.refreshUrl" | "flows.password.scopes" | "flows.password.selectedScopes" | "flows.password.x-scalar-client-id" | "flows.password.tokenUrl" | "flows.password.clientSecret" | `flows.password.scopes.${string}` | `flows.password.selectedScopes.${number}` | "flows.implicit.type" | "flows.implicit.token" | "flows.implicit.refreshUrl" | "flows.implicit.scopes" | "flows.implicit.selectedScopes" | "flows.implicit.x-scalar-client-id" | `flows.implicit.scopes.${string}` | `flows.implicit.selectedScopes.${number}` | "flows.implicit.authorizationUrl" | "flows.implicit.x-scalar-redirect-uri" | "flows.clientCredentials.type" | "flows.clientCredentials.token" | "flows.clientCredentials.refreshUrl" | "flows.clientCredentials.scopes" | "flows.clientCredentials.selectedScopes" | "flows.clientCredentials.x-scalar-client-id" | "flows.clientCredentials.tokenUrl" | "flows.clientCredentials.clientSecret" | `flows.clientCredentials.scopes.${string}` | `flows.clientCredentials.selectedScopes.${number}` | "flows.authorizationCode.type" | "flows.authorizationCode.token" | "flows.authorizationCode.refreshUrl" | "flows.authorizationCode.scopes" | "flows.authorizationCode.selectedScopes" | "flows.authorizationCode.x-scalar-client-id" | "flows.authorizationCode.tokenUrl" | "flows.authorizationCode.clientSecret" | `flows.authorizationCode.scopes.${string}` | `flows.authorizationCode.selectedScopes.${number}` | "flows.authorizationCode.authorizationUrl" | "flows.authorizationCode.x-scalar-redirect-uri" | "flows.authorizationCode.x-usePkce">(uid: (string & import("zod").BRAND<"securityScheme">) | null | undefined, path: P, value: (P extends "value" | "description" | "type" | "name" | "in" | "uid" | "nameKey" ? {
|
|
239
242
|
type: "apiKey";
|
|
240
243
|
value: string;
|
|
241
244
|
uid: string & import("zod").BRAND<"securityScheme">;
|
|
@@ -307,7 +310,7 @@ export declare function createStoreSecuritySchemes(useLocalStorage: boolean): {
|
|
|
307
310
|
nameKey: string;
|
|
308
311
|
openIdConnectUrl: string;
|
|
309
312
|
description?: string | undefined;
|
|
310
|
-
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) | (P extends "description" | "type" | "uid" | "nameKey" | "flows" ? {
|
|
313
|
+
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) | (P extends "description" | "type" | "uid" | "nameKey" | "x-default-scopes" | "flows" ? {
|
|
311
314
|
type: "oauth2";
|
|
312
315
|
uid: string & import("zod").BRAND<"securityScheme">;
|
|
313
316
|
nameKey: string;
|
|
@@ -359,7 +362,8 @@ export declare function createStoreSecuritySchemes(useLocalStorage: boolean): {
|
|
|
359
362
|
} | undefined;
|
|
360
363
|
};
|
|
361
364
|
description?: string | undefined;
|
|
362
|
-
|
|
365
|
+
'x-default-scopes'?: string | string[] | undefined;
|
|
366
|
+
}[P] : P extends `${infer K}.${infer R}` ? K extends "description" | "type" | "uid" | "nameKey" | "x-default-scopes" | "flows" ? R extends import("@scalar/object-utils/nested").Path<{
|
|
363
367
|
type: "oauth2";
|
|
364
368
|
uid: string & import("zod").BRAND<"securityScheme">;
|
|
365
369
|
nameKey: string;
|
|
@@ -411,6 +415,7 @@ export declare function createStoreSecuritySchemes(useLocalStorage: boolean): {
|
|
|
411
415
|
} | undefined;
|
|
412
416
|
};
|
|
413
417
|
description?: string | undefined;
|
|
418
|
+
'x-default-scopes'?: string | string[] | undefined;
|
|
414
419
|
}[K]> ? import("@scalar/object-utils/nested").PathValue<{
|
|
415
420
|
type: "oauth2";
|
|
416
421
|
uid: string & import("zod").BRAND<"securityScheme">;
|
|
@@ -463,8 +468,9 @@ export declare function createStoreSecuritySchemes(useLocalStorage: boolean): {
|
|
|
463
468
|
} | undefined;
|
|
464
469
|
};
|
|
465
470
|
description?: string | undefined;
|
|
471
|
+
'x-default-scopes'?: string | string[] | undefined;
|
|
466
472
|
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never)) => void;
|
|
467
|
-
untrackedEdit: <P extends "value" | "description" | "type" | "name" | "in" | "uid" | "nameKey" | "scheme" | "bearerFormat" | "openIdConnectUrl" | "flows" | "password" | "username" | "token" | "flows.password" | "flows.implicit" | "flows.clientCredentials" | "flows.authorizationCode" | "flows.password.type" | "flows.password.password" | "flows.password.username" | "flows.password.token" | "flows.password.refreshUrl" | "flows.password.scopes" | "flows.password.selectedScopes" | "flows.password.x-scalar-client-id" | "flows.password.tokenUrl" | "flows.password.clientSecret" | `flows.password.scopes.${string}` | `flows.password.selectedScopes.${number}` | "flows.implicit.type" | "flows.implicit.token" | "flows.implicit.refreshUrl" | "flows.implicit.scopes" | "flows.implicit.selectedScopes" | "flows.implicit.x-scalar-client-id" | `flows.implicit.scopes.${string}` | `flows.implicit.selectedScopes.${number}` | "flows.implicit.authorizationUrl" | "flows.implicit.x-scalar-redirect-uri" | "flows.clientCredentials.type" | "flows.clientCredentials.token" | "flows.clientCredentials.refreshUrl" | "flows.clientCredentials.scopes" | "flows.clientCredentials.selectedScopes" | "flows.clientCredentials.x-scalar-client-id" | "flows.clientCredentials.tokenUrl" | "flows.clientCredentials.clientSecret" | `flows.clientCredentials.scopes.${string}` | `flows.clientCredentials.selectedScopes.${number}` | "flows.authorizationCode.type" | "flows.authorizationCode.token" | "flows.authorizationCode.refreshUrl" | "flows.authorizationCode.scopes" | "flows.authorizationCode.selectedScopes" | "flows.authorizationCode.x-scalar-client-id" | "flows.authorizationCode.tokenUrl" | "flows.authorizationCode.clientSecret" | `flows.authorizationCode.scopes.${string}` | `flows.authorizationCode.selectedScopes.${number}` | "flows.authorizationCode.authorizationUrl" | "flows.authorizationCode.x-scalar-redirect-uri" | "flows.authorizationCode.x-usePkce">(uid: string & import("zod").BRAND<"securityScheme">, path: P, value: (P extends "value" | "description" | "type" | "name" | "in" | "uid" | "nameKey" ? {
|
|
473
|
+
untrackedEdit: <P extends "value" | "description" | "type" | "name" | "in" | "uid" | "nameKey" | "scheme" | "bearerFormat" | "openIdConnectUrl" | "x-default-scopes" | "flows" | "password" | "username" | "token" | `x-default-scopes.${number}` | "flows.password" | "flows.implicit" | "flows.clientCredentials" | "flows.authorizationCode" | "flows.password.type" | "flows.password.password" | "flows.password.username" | "flows.password.token" | "flows.password.refreshUrl" | "flows.password.scopes" | "flows.password.selectedScopes" | "flows.password.x-scalar-client-id" | "flows.password.tokenUrl" | "flows.password.clientSecret" | `flows.password.scopes.${string}` | `flows.password.selectedScopes.${number}` | "flows.implicit.type" | "flows.implicit.token" | "flows.implicit.refreshUrl" | "flows.implicit.scopes" | "flows.implicit.selectedScopes" | "flows.implicit.x-scalar-client-id" | `flows.implicit.scopes.${string}` | `flows.implicit.selectedScopes.${number}` | "flows.implicit.authorizationUrl" | "flows.implicit.x-scalar-redirect-uri" | "flows.clientCredentials.type" | "flows.clientCredentials.token" | "flows.clientCredentials.refreshUrl" | "flows.clientCredentials.scopes" | "flows.clientCredentials.selectedScopes" | "flows.clientCredentials.x-scalar-client-id" | "flows.clientCredentials.tokenUrl" | "flows.clientCredentials.clientSecret" | `flows.clientCredentials.scopes.${string}` | `flows.clientCredentials.selectedScopes.${number}` | "flows.authorizationCode.type" | "flows.authorizationCode.token" | "flows.authorizationCode.refreshUrl" | "flows.authorizationCode.scopes" | "flows.authorizationCode.selectedScopes" | "flows.authorizationCode.x-scalar-client-id" | "flows.authorizationCode.tokenUrl" | "flows.authorizationCode.clientSecret" | `flows.authorizationCode.scopes.${string}` | `flows.authorizationCode.selectedScopes.${number}` | "flows.authorizationCode.authorizationUrl" | "flows.authorizationCode.x-scalar-redirect-uri" | "flows.authorizationCode.x-usePkce">(uid: string & import("zod").BRAND<"securityScheme">, path: P, value: (P extends "value" | "description" | "type" | "name" | "in" | "uid" | "nameKey" ? {
|
|
468
474
|
type: "apiKey";
|
|
469
475
|
value: string;
|
|
470
476
|
uid: string & import("zod").BRAND<"securityScheme">;
|
|
@@ -536,7 +542,7 @@ export declare function createStoreSecuritySchemes(useLocalStorage: boolean): {
|
|
|
536
542
|
nameKey: string;
|
|
537
543
|
openIdConnectUrl: string;
|
|
538
544
|
description?: string | undefined;
|
|
539
|
-
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) | (P extends "description" | "type" | "uid" | "nameKey" | "flows" ? {
|
|
545
|
+
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) | (P extends "description" | "type" | "uid" | "nameKey" | "x-default-scopes" | "flows" ? {
|
|
540
546
|
type: "oauth2";
|
|
541
547
|
uid: string & import("zod").BRAND<"securityScheme">;
|
|
542
548
|
nameKey: string;
|
|
@@ -588,7 +594,8 @@ export declare function createStoreSecuritySchemes(useLocalStorage: boolean): {
|
|
|
588
594
|
} | undefined;
|
|
589
595
|
};
|
|
590
596
|
description?: string | undefined;
|
|
591
|
-
|
|
597
|
+
'x-default-scopes'?: string | string[] | undefined;
|
|
598
|
+
}[P] : P extends `${infer K}.${infer R}` ? K extends "description" | "type" | "uid" | "nameKey" | "x-default-scopes" | "flows" ? R extends import("@scalar/object-utils/nested").Path<{
|
|
592
599
|
type: "oauth2";
|
|
593
600
|
uid: string & import("zod").BRAND<"securityScheme">;
|
|
594
601
|
nameKey: string;
|
|
@@ -640,6 +647,7 @@ export declare function createStoreSecuritySchemes(useLocalStorage: boolean): {
|
|
|
640
647
|
} | undefined;
|
|
641
648
|
};
|
|
642
649
|
description?: string | undefined;
|
|
650
|
+
'x-default-scopes'?: string | string[] | undefined;
|
|
643
651
|
}[K]> ? import("@scalar/object-utils/nested").PathValue<{
|
|
644
652
|
type: "oauth2";
|
|
645
653
|
uid: string & import("zod").BRAND<"securityScheme">;
|
|
@@ -692,6 +700,7 @@ export declare function createStoreSecuritySchemes(useLocalStorage: boolean): {
|
|
|
692
700
|
} | undefined;
|
|
693
701
|
};
|
|
694
702
|
description?: string | undefined;
|
|
703
|
+
'x-default-scopes'?: string | string[] | undefined;
|
|
695
704
|
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never)) => void;
|
|
696
705
|
undo: (uid: string & import("zod").BRAND<"securityScheme">) => void;
|
|
697
706
|
redo: (uid: string & import("zod").BRAND<"securityScheme">) => void;
|
|
@@ -776,6 +785,7 @@ export declare function extendedSecurityDataFactory({ securitySchemeMutators, co
|
|
|
776
785
|
} | undefined;
|
|
777
786
|
};
|
|
778
787
|
description?: string | undefined;
|
|
788
|
+
'x-default-scopes'?: string | string[] | undefined;
|
|
779
789
|
};
|
|
780
790
|
deleteSecurityScheme: (schemeUid: SecurityScheme["uid"]) => void;
|
|
781
791
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security-schemes.d.ts","sourceRoot":"","sources":["../../src/store/security-schemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,u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