@scalar/api-client 2.23.0 → 2.23.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 +43 -0
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +13 -3
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +68 -68
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +5 -3
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +3 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/index.d.ts +2 -1
- package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/index.js +7 -4
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +3 -2
- 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 +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +3 -2
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +3 -2
- 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/process-security-schemes.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +8 -5
- 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 +4 -4
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +49 -45
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +4 -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 +18 -181
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +118 -107
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -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/RequestAuthDataTable.vue.js +30 -33
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +11 -178
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -110
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +5 -29
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts +6 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +85 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +9 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +15 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +23 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.js +4 -6
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +51 -42
- package/dist/v2/features/app/app-state.d.ts +1 -1
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +40 -38
- package/dist/v2/features/app/helpers/routes.d.ts +1 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
- package/dist/v2/features/collection/components/Authentication.vue2.js +14 -11
- package/dist/v2/features/import-listener/helpers/import-document-to-workspace.d.ts.map +1 -1
- package/dist/v2/features/import-listener/helpers/import-document-to-workspace.js +3 -1
- 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 +14 -12
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +44 -35
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts +3 -5
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +116 -109
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +14 -14
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts +0 -8
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.js +0 -33
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts +0 -7
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.js +0 -13
|
@@ -1,203 +1,210 @@
|
|
|
1
|
-
import { generateClientMutators as
|
|
2
|
-
import { computed as
|
|
3
|
-
const r = (
|
|
4
|
-
const n = await t
|
|
5
|
-
return await
|
|
1
|
+
import { generateClientMutators as i } from "@scalar/workspace-store/mutators";
|
|
2
|
+
import { computed as p } from "vue";
|
|
3
|
+
const r = (t, c, a) => async (o) => {
|
|
4
|
+
const n = await a[t]?.onBeforeExecute?.(o) ?? o;
|
|
5
|
+
return await c(n), await a[t]?.onAfterExecute?.(n), n;
|
|
6
6
|
};
|
|
7
7
|
function l({
|
|
8
|
-
eventBus:
|
|
9
|
-
store:
|
|
10
|
-
hooks:
|
|
8
|
+
eventBus: t,
|
|
9
|
+
store: c,
|
|
10
|
+
hooks: a
|
|
11
11
|
}) {
|
|
12
|
-
const o =
|
|
13
|
-
|
|
12
|
+
const o = p(() => i(c.value)), n = ({ collectionType: e }) => e === "document" ? o.value.active() : o.value.workspace();
|
|
13
|
+
t.on(
|
|
14
14
|
"workspace:update:active-proxy",
|
|
15
|
-
(e) => r("workspace:update:active-proxy", o.value.workspace().workspace.updateActiveProxy,
|
|
16
|
-
),
|
|
15
|
+
(e) => r("workspace:update:active-proxy", o.value.workspace().workspace.updateActiveProxy, a)(e)
|
|
16
|
+
), t.on(
|
|
17
17
|
"workspace:update:color-mode",
|
|
18
|
-
(e) => r("workspace:update:color-mode", o.value.workspace().workspace.updateColorMode,
|
|
19
|
-
),
|
|
18
|
+
(e) => r("workspace:update:color-mode", o.value.workspace().workspace.updateColorMode, a)(e)
|
|
19
|
+
), t.on(
|
|
20
20
|
"workspace:update:theme",
|
|
21
|
-
(e) => r("workspace:update:theme", o.value.workspace().workspace.updateTheme,
|
|
22
|
-
),
|
|
21
|
+
(e) => r("workspace:update:theme", o.value.workspace().workspace.updateTheme, a)(e)
|
|
22
|
+
), t.on(
|
|
23
23
|
"workspace:update:selected-client",
|
|
24
24
|
(e) => r(
|
|
25
25
|
"workspace:update:selected-client",
|
|
26
26
|
o.value.workspace().workspace.updateSelectedClient,
|
|
27
|
-
|
|
27
|
+
a
|
|
28
28
|
)(e)
|
|
29
|
-
),
|
|
29
|
+
), t.on(
|
|
30
30
|
"document:update:icon",
|
|
31
|
-
(e) => r("document:update:icon", o.value.active().document.updateDocumentIcon,
|
|
32
|
-
),
|
|
31
|
+
(e) => r("document:update:icon", o.value.active().document.updateDocumentIcon, a)(e)
|
|
32
|
+
), t.on(
|
|
33
33
|
"document:update:info",
|
|
34
|
-
(e) => r("document:update:info", o.value.active().document.updateDocumentInfo,
|
|
35
|
-
),
|
|
34
|
+
(e) => r("document:update:info", o.value.active().document.updateDocumentInfo, a)(e)
|
|
35
|
+
), t.on(
|
|
36
36
|
"document:toggle:security",
|
|
37
|
-
(e) => r("document:toggle:security", o.value.active().document.toggleSecurity,
|
|
38
|
-
),
|
|
37
|
+
(e) => r("document:toggle:security", o.value.active().document.toggleSecurity, a)(e)
|
|
38
|
+
), t.on(
|
|
39
39
|
"document:update:watch-mode",
|
|
40
|
-
(e) => r("document:update:watch-mode", o.value.active().document.updateWatchMode,
|
|
41
|
-
),
|
|
40
|
+
(e) => r("document:update:watch-mode", o.value.active().document.updateWatchMode, a)(e)
|
|
41
|
+
), t.on(
|
|
42
42
|
"document:create:empty-document",
|
|
43
|
-
(e) => r("document:create:empty-document", o.value.active().document.createEmptyDocument,
|
|
44
|
-
),
|
|
43
|
+
(e) => r("document:create:empty-document", o.value.active().document.createEmptyDocument, a)(e)
|
|
44
|
+
), t.on(
|
|
45
45
|
"document:delete:document",
|
|
46
|
-
(e) => r("document:delete:document", o.value.active().document.deleteDocument,
|
|
47
|
-
),
|
|
46
|
+
(e) => r("document:delete:document", o.value.active().document.deleteDocument, a)(e)
|
|
47
|
+
), t.on(
|
|
48
48
|
"environment:upsert:environment",
|
|
49
|
-
(e) => r("environment:upsert:environment", n(e).environment.upsertEnvironment,
|
|
50
|
-
),
|
|
49
|
+
(e) => r("environment:upsert:environment", n(e).environment.upsertEnvironment, a)(e)
|
|
50
|
+
), t.on(
|
|
51
51
|
"environment:delete:environment",
|
|
52
|
-
(e) => r("environment:delete:environment", n(e).environment.deleteEnvironment,
|
|
53
|
-
),
|
|
52
|
+
(e) => r("environment:delete:environment", n(e).environment.deleteEnvironment, a)(e)
|
|
53
|
+
), t.on(
|
|
54
54
|
"environment:upsert:environment-variable",
|
|
55
55
|
(e) => r(
|
|
56
56
|
"environment:upsert:environment-variable",
|
|
57
57
|
n(e).environment.upsertEnvironmentVariable,
|
|
58
|
-
|
|
58
|
+
a
|
|
59
59
|
)(e)
|
|
60
|
-
),
|
|
60
|
+
), t.on(
|
|
61
61
|
"environment:delete:environment-variable",
|
|
62
62
|
(e) => r(
|
|
63
63
|
"environment:delete:environment-variable",
|
|
64
64
|
n(e).environment.deleteEnvironmentVariable,
|
|
65
|
-
|
|
65
|
+
a
|
|
66
66
|
)(e)
|
|
67
|
-
),
|
|
68
|
-
await r("cookie:upsert:cookie", n(e).cookie.upsertCookie,
|
|
69
|
-
}),
|
|
70
|
-
await r("cookie:delete:cookie", n(e).cookie.deleteCookie,
|
|
71
|
-
}),
|
|
67
|
+
), t.on("cookie:upsert:cookie", async (e) => {
|
|
68
|
+
await r("cookie:upsert:cookie", n(e).cookie.upsertCookie, a)(e);
|
|
69
|
+
}), t.on("cookie:delete:cookie", async (e) => {
|
|
70
|
+
await r("cookie:delete:cookie", n(e).cookie.deleteCookie, a)(e);
|
|
71
|
+
}), t.on(
|
|
72
72
|
"auth:delete:security-scheme",
|
|
73
|
-
(e) => r("auth:delete:security-scheme", o.value.active().auth.deleteSecurityScheme,
|
|
74
|
-
),
|
|
73
|
+
(e) => r("auth:delete:security-scheme", o.value.active().auth.deleteSecurityScheme, a)(e)
|
|
74
|
+
), t.on(
|
|
75
75
|
"auth:update:active-index",
|
|
76
|
-
(e) => r("auth:update:active-index", o.value.active().auth.updateSelectedAuthTab,
|
|
77
|
-
),
|
|
76
|
+
(e) => r("auth:update:active-index", o.value.active().auth.updateSelectedAuthTab, a)(e)
|
|
77
|
+
), t.on(
|
|
78
78
|
"auth:update:security-scheme",
|
|
79
|
-
(e) => r("auth:update:security-scheme", o.value.active().auth.updateSecurityScheme,
|
|
80
|
-
),
|
|
79
|
+
(e) => r("auth:update:security-scheme", o.value.active().auth.updateSecurityScheme, a)(e)
|
|
80
|
+
), t.on(
|
|
81
81
|
"auth:update:selected-scopes",
|
|
82
|
-
(e) => r("auth:update:selected-scopes", o.value.active().auth.updateSelectedScopes,
|
|
83
|
-
),
|
|
82
|
+
(e) => r("auth:update:selected-scopes", o.value.active().auth.updateSelectedScopes, a)(e)
|
|
83
|
+
), t.on(
|
|
84
84
|
"auth:update:selected-security-schemes",
|
|
85
85
|
(e) => r(
|
|
86
86
|
"auth:update:selected-security-schemes",
|
|
87
87
|
o.value.active().auth.updateSelectedSecuritySchemes,
|
|
88
|
-
|
|
88
|
+
a
|
|
89
89
|
)(e)
|
|
90
|
-
),
|
|
90
|
+
), t.on(
|
|
91
|
+
"auth:update:security-scheme-secrets",
|
|
92
|
+
(e) => r(
|
|
93
|
+
"auth:update:security-scheme-secrets",
|
|
94
|
+
o.value.active().auth.updateSecuritySchemeSecrets,
|
|
95
|
+
a
|
|
96
|
+
)(e)
|
|
97
|
+
), t.on(
|
|
91
98
|
"server:add:server",
|
|
92
|
-
(e) => r("server:add:server", o.value.active().server.addServer,
|
|
93
|
-
),
|
|
99
|
+
(e) => r("server:add:server", o.value.active().server.addServer, a)(e)
|
|
100
|
+
), t.on(
|
|
94
101
|
"server:update:server",
|
|
95
|
-
(e) => r("server:update:server", o.value.active().server.updateServer,
|
|
96
|
-
),
|
|
102
|
+
(e) => r("server:update:server", o.value.active().server.updateServer, a)(e)
|
|
103
|
+
), t.on(
|
|
97
104
|
"server:delete:server",
|
|
98
|
-
(e) => r("server:delete:server", o.value.active().server.deleteServer,
|
|
99
|
-
),
|
|
105
|
+
(e) => r("server:delete:server", o.value.active().server.deleteServer, a)(e)
|
|
106
|
+
), t.on(
|
|
100
107
|
"server:update:variables",
|
|
101
|
-
(e) => r("server:update:variables", o.value.active().server.updateServerVariables,
|
|
102
|
-
),
|
|
108
|
+
(e) => r("server:update:variables", o.value.active().server.updateServerVariables, a)(e)
|
|
109
|
+
), t.on(
|
|
103
110
|
"server:update:selected",
|
|
104
|
-
(e) => r("server:update:selected", o.value.active().server.updateSelectedServer,
|
|
105
|
-
),
|
|
111
|
+
(e) => r("server:update:selected", o.value.active().server.updateSelectedServer, a)(e)
|
|
112
|
+
), t.on(
|
|
106
113
|
"operation:create:operation",
|
|
107
|
-
(e) => r("operation:create:operation", o.value.active().operation.createOperation,
|
|
108
|
-
),
|
|
114
|
+
(e) => r("operation:create:operation", o.value.active().operation.createOperation, a)(e)
|
|
115
|
+
), t.on(
|
|
109
116
|
"operation:update:pathMethod",
|
|
110
117
|
(e) => r(
|
|
111
118
|
"operation:update:pathMethod",
|
|
112
119
|
o.value.active().operation.updateOperationPathMethod,
|
|
113
|
-
|
|
120
|
+
a
|
|
114
121
|
)(e)
|
|
115
|
-
),
|
|
122
|
+
), t.on(
|
|
116
123
|
"operation:update:summary",
|
|
117
|
-
(e) => r("operation:update:summary", o.value.active().operation.updateOperationSummary,
|
|
118
|
-
),
|
|
124
|
+
(e) => r("operation:update:summary", o.value.active().operation.updateOperationSummary, a)(e)
|
|
125
|
+
), t.on(
|
|
119
126
|
"operation:delete:operation",
|
|
120
|
-
(e) => r("operation:delete:operation", o.value.active().operation.deleteOperation,
|
|
121
|
-
),
|
|
127
|
+
(e) => r("operation:delete:operation", o.value.active().operation.deleteOperation, a)(e)
|
|
128
|
+
), t.on(
|
|
122
129
|
"operation:delete:example",
|
|
123
|
-
(e) => r("operation:delete:example", o.value.active().operation.deleteOperationExample,
|
|
124
|
-
),
|
|
130
|
+
(e) => r("operation:delete:example", o.value.active().operation.deleteOperationExample, a)(e)
|
|
131
|
+
), t.on(
|
|
125
132
|
"operation:upsert:parameter",
|
|
126
|
-
(e) => r("operation:upsert:parameter", o.value.active().operation.upsertOperationParameter,
|
|
127
|
-
),
|
|
133
|
+
(e) => r("operation:upsert:parameter", o.value.active().operation.upsertOperationParameter, a)(e)
|
|
134
|
+
), t.on(
|
|
128
135
|
"operation:update:extra-parameters",
|
|
129
136
|
(e) => r(
|
|
130
137
|
"operation:update:extra-parameters",
|
|
131
138
|
o.value.active().operation.updateOperationExtraParameters,
|
|
132
|
-
|
|
139
|
+
a
|
|
133
140
|
)(e)
|
|
134
|
-
),
|
|
141
|
+
), t.on(
|
|
135
142
|
"operation:delete:parameter",
|
|
136
|
-
(e) => r("operation:delete:parameter", o.value.active().operation.deleteOperationParameter,
|
|
137
|
-
),
|
|
143
|
+
(e) => r("operation:delete:parameter", o.value.active().operation.deleteOperationParameter, a)(e)
|
|
144
|
+
), t.on(
|
|
138
145
|
"operation:delete-all:parameters",
|
|
139
146
|
(e) => r(
|
|
140
147
|
"operation:delete-all:parameters",
|
|
141
148
|
o.value.active().operation.deleteAllOperationParameters,
|
|
142
|
-
|
|
149
|
+
a
|
|
143
150
|
)(e)
|
|
144
|
-
),
|
|
151
|
+
), t.on(
|
|
145
152
|
"operation:update:requestBody:contentType",
|
|
146
153
|
(e) => r(
|
|
147
154
|
"operation:update:requestBody:contentType",
|
|
148
155
|
o.value.active().operation.updateOperationRequestBodyContentType,
|
|
149
|
-
|
|
156
|
+
a
|
|
150
157
|
)(e)
|
|
151
|
-
),
|
|
158
|
+
), t.on(
|
|
152
159
|
"operation:update:requestBody:value",
|
|
153
160
|
(e) => r(
|
|
154
161
|
"operation:update:requestBody:value",
|
|
155
162
|
o.value.active().operation.updateOperationRequestBodyExample,
|
|
156
|
-
|
|
163
|
+
a
|
|
157
164
|
)(e)
|
|
158
|
-
),
|
|
165
|
+
), t.on(
|
|
159
166
|
"operation:update:requestBody:formValue",
|
|
160
167
|
(e) => r(
|
|
161
168
|
"operation:update:requestBody:formValue",
|
|
162
169
|
o.value.active().operation.updateOperationRequestBodyFormValue,
|
|
163
|
-
|
|
170
|
+
a
|
|
164
171
|
)(e)
|
|
165
|
-
),
|
|
172
|
+
), t.on(
|
|
166
173
|
"operation:reload:history",
|
|
167
|
-
(e) => r("operation:reload:history", o.value.active().operation.reloadOperationHistory,
|
|
168
|
-
),
|
|
174
|
+
(e) => r("operation:reload:history", o.value.active().operation.reloadOperationHistory, a)(e)
|
|
175
|
+
), t.on(
|
|
169
176
|
"tag:create:tag",
|
|
170
|
-
(e) => r("tag:create:tag", o.value.active().tag.createTag,
|
|
171
|
-
),
|
|
177
|
+
(e) => r("tag:create:tag", o.value.active().tag.createTag, a)(e)
|
|
178
|
+
), t.on(
|
|
172
179
|
"tag:delete:tag",
|
|
173
|
-
(e) => r("tag:delete:tag", o.value.active().tag.deleteTag,
|
|
174
|
-
),
|
|
180
|
+
(e) => r("tag:delete:tag", o.value.active().tag.deleteTag, a)(e)
|
|
181
|
+
), t.on(
|
|
175
182
|
"tabs:add:tab",
|
|
176
|
-
(e) => r("tabs:add:tab", o.value.workspace().tabs.addTab,
|
|
177
|
-
),
|
|
183
|
+
(e) => r("tabs:add:tab", o.value.workspace().tabs.addTab, a)(e)
|
|
184
|
+
), t.on(
|
|
178
185
|
"tabs:close:tab",
|
|
179
|
-
(e) => r("tabs:close:tab", o.value.workspace().tabs.closeTab,
|
|
180
|
-
),
|
|
186
|
+
(e) => r("tabs:close:tab", o.value.workspace().tabs.closeTab, a)(e)
|
|
187
|
+
), t.on(
|
|
181
188
|
"tabs:close:other-tabs",
|
|
182
|
-
(e) => r("tabs:close:other-tabs", o.value.workspace().tabs.closeOtherTabs,
|
|
183
|
-
),
|
|
189
|
+
(e) => r("tabs:close:other-tabs", o.value.workspace().tabs.closeOtherTabs, a)(e)
|
|
190
|
+
), t.on(
|
|
184
191
|
"tabs:focus:tab",
|
|
185
|
-
(e) => r("tabs:focus:tab", o.value.workspace().tabs.focusTab,
|
|
186
|
-
),
|
|
192
|
+
(e) => r("tabs:focus:tab", o.value.workspace().tabs.focusTab, a)(e)
|
|
193
|
+
), t.on(
|
|
187
194
|
"tabs:focus:tab-last",
|
|
188
|
-
(e) => r("tabs:focus:tab-last", o.value.workspace().tabs.focusLastTab,
|
|
189
|
-
),
|
|
195
|
+
(e) => r("tabs:focus:tab-last", o.value.workspace().tabs.focusLastTab, a)(e)
|
|
196
|
+
), t.on(
|
|
190
197
|
"tabs:navigate:previous",
|
|
191
|
-
(e) => r("tabs:navigate:previous", o.value.workspace().tabs.navigatePreviousTab,
|
|
192
|
-
),
|
|
198
|
+
(e) => r("tabs:navigate:previous", o.value.workspace().tabs.navigatePreviousTab, a)(e)
|
|
199
|
+
), t.on(
|
|
193
200
|
"tabs:navigate:next",
|
|
194
|
-
(e) => r("tabs:navigate:next", o.value.workspace().tabs.navigateNextTab,
|
|
195
|
-
),
|
|
201
|
+
(e) => r("tabs:navigate:next", o.value.workspace().tabs.navigateNextTab, a)(e)
|
|
202
|
+
), t.on(
|
|
196
203
|
"tabs:update:tabs",
|
|
197
|
-
(e) => r("tabs:update:tabs", o.value.workspace().tabs.updateTabs,
|
|
198
|
-
),
|
|
204
|
+
(e) => r("tabs:update:tabs", o.value.workspace().tabs.updateTabs, a)(e)
|
|
205
|
+
), t.on(
|
|
199
206
|
"hooks:on:request:complete",
|
|
200
|
-
(e) => r("hooks:on:request:complete", o.value.active().operation.addResponseToHistory,
|
|
207
|
+
(e) => r("hooks:on:request:complete", o.value.active().operation.addResponseToHistory, a)(e)
|
|
201
208
|
);
|
|
202
209
|
}
|
|
203
210
|
export {
|
|
@@ -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.23.
|
|
36
|
+
}, v = "2.23.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.23.
|
|
21
|
+
"version": "2.23.2",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=20"
|
|
24
24
|
},
|
|
@@ -327,25 +327,25 @@
|
|
|
327
327
|
"yaml": "^2.8.0",
|
|
328
328
|
"zod": "^4.3.5",
|
|
329
329
|
"@scalar/analytics-client": "1.0.1",
|
|
330
|
+
"@scalar/components": "0.17.3",
|
|
330
331
|
"@scalar/draggable": "0.3.0",
|
|
331
|
-
"@scalar/
|
|
332
|
-
"@scalar/helpers": "0.2.10",
|
|
332
|
+
"@scalar/helpers": "0.2.11",
|
|
333
333
|
"@scalar/icons": "0.5.2",
|
|
334
|
-
"@scalar/
|
|
335
|
-
"@scalar/
|
|
336
|
-
"@scalar/
|
|
337
|
-
"@scalar/
|
|
338
|
-
"@scalar/openapi
|
|
334
|
+
"@scalar/import": "0.4.48",
|
|
335
|
+
"@scalar/json-magic": "0.9.6",
|
|
336
|
+
"@scalar/oas-utils": "0.6.33",
|
|
337
|
+
"@scalar/openapi-parser": "0.24.7",
|
|
338
|
+
"@scalar/postman-to-openapi": "0.4.3",
|
|
339
339
|
"@scalar/openapi-types": "0.5.3",
|
|
340
|
-
"@scalar/
|
|
341
|
-
"@scalar/
|
|
340
|
+
"@scalar/object-utils": "1.2.25",
|
|
341
|
+
"@scalar/sidebar": "0.7.26",
|
|
342
|
+
"@scalar/snippetz": "0.6.11",
|
|
342
343
|
"@scalar/themes": "0.14.0",
|
|
343
|
-
"@scalar/types": "0.6.
|
|
344
|
-
"@scalar/
|
|
345
|
-
"@scalar/use-codemirror": "0.13.29",
|
|
344
|
+
"@scalar/types": "0.6.2",
|
|
345
|
+
"@scalar/use-codemirror": "0.13.30",
|
|
346
346
|
"@scalar/use-hooks": "0.3.7",
|
|
347
347
|
"@scalar/use-toasts": "0.9.1",
|
|
348
|
-
"@scalar/workspace-store": "0.28.
|
|
348
|
+
"@scalar/workspace-store": "0.28.2"
|
|
349
349
|
},
|
|
350
350
|
"devDependencies": {
|
|
351
351
|
"@tailwindcss/vite": "^4.1.18",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operation-to-har.bench.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.ts"],"names":[],"mappings":""}
|
package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SecurityScheme } from '@scalar/oas-utils/entities/spec';
|
|
2
|
-
import { type SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
-
import type { PartialDeep } from 'type-fest';
|
|
4
|
-
/**
|
|
5
|
-
* Convert the old security scheme to the new one with secret extensions
|
|
6
|
-
*/
|
|
7
|
-
export declare const convertSecuritySchemeSecrets: (scheme: PartialDeep<SecurityScheme & SecuritySchemeObject>) => SecuritySchemeObject;
|
|
8
|
-
//# sourceMappingURL=convert-security-scheme-secrets.d.ts.map
|
package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert-security-scheme-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAErE,OAAO,EAEL,KAAK,oBAAoB,EAE1B,MAAM,8DAA8D,CAAA;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAiC5C;;GAEG;AACH,eAAO,MAAM,4BAA4B,GACvC,QAAQ,WAAW,CAAC,cAAc,GAAG,oBAAoB,CAAC,KACzD,oBA+BF,CAAA"}
|
package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { objectEntries as l } from "@scalar/helpers/object/object-entries";
|
|
2
|
-
import { coerceValue as a } from "@scalar/workspace-store/schemas/typebox-coerce";
|
|
3
|
-
import { SecuritySchemeObjectSchema as n } from "@scalar/workspace-store/schemas/v3.1/strict/openapi-document";
|
|
4
|
-
const S = {
|
|
5
|
-
clientSecret: "x-scalar-secret-client-secret",
|
|
6
|
-
password: "x-scalar-secret-password",
|
|
7
|
-
token: "x-scalar-secret-token",
|
|
8
|
-
username: "x-scalar-secret-username",
|
|
9
|
-
value: "x-scalar-secret-token",
|
|
10
|
-
"x-scalar-client-id": "x-scalar-secret-client-id",
|
|
11
|
-
"x-scalar-redirect-uri": "x-scalar-secret-redirect-uri"
|
|
12
|
-
}, i = (e) => {
|
|
13
|
-
const r = { ...e };
|
|
14
|
-
for (const [t, s] of l(S))
|
|
15
|
-
e[t] && (r[s] ||= e[t]);
|
|
16
|
-
return r;
|
|
17
|
-
}, E = (e) => {
|
|
18
|
-
if (e.type === "oauth2") {
|
|
19
|
-
const r = /* @__PURE__ */ new Set(), t = l(e.flows ?? {}).reduce(
|
|
20
|
-
(o, [d, c]) => (o[d] = c && i(c), c?.selectedScopes?.forEach((u) => r.add(u)), o),
|
|
21
|
-
{}
|
|
22
|
-
), s = r.size > 0 && !e["x-default-scopes"]?.length ? { "x-default-scopes": Array.from(r) } : {};
|
|
23
|
-
return a(n, {
|
|
24
|
-
...e,
|
|
25
|
-
flows: t,
|
|
26
|
-
...s
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
return a(n, i(e));
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
E as convertSecuritySchemeSecrets
|
|
33
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { AuthenticationConfiguration } from '@scalar/types/api-reference';
|
|
2
|
-
import type { ComponentsObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
-
/** Document security merged with the config security schemes */
|
|
4
|
-
export type MergedSecuritySchemes = NonNullable<ComponentsObject['securitySchemes']>;
|
|
5
|
-
/** Merge the authentication config with the document security schemes */
|
|
6
|
-
export declare const mergeAuthConfig: (documentSecuritySchemes?: ComponentsObject["securitySchemes"], configSecuritySchemes?: AuthenticationConfiguration["securitySchemes"]) => MergedSecuritySchemes;
|
|
7
|
-
//# sourceMappingURL=merge-auth-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge-auth-config.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAE9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAA;AAMpG,gEAAgE;AAChE,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAA;AAEpF,yEAAyE;AACzE,eAAO,MAAM,eAAe,GAC1B,0BAAyB,gBAAgB,CAAC,iBAAiB,CAAM,EACjE,wBAAuB,2BAA2B,CAAC,iBAAiB,CAAM,KACzE,qBAcF,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { objectEntries as s } from "@scalar/helpers/object/object-entries";
|
|
2
|
-
import { mergeObjects as n } from "@scalar/workspace-store/helpers/merge-object";
|
|
3
|
-
import { convertSecuritySchemeSecrets as i } from "./convert-security-scheme-secrets.js";
|
|
4
|
-
import { getResolvedRefDeep as S } from "../../operation-code-sample/helpers/get-resolved-ref-deep.js";
|
|
5
|
-
const u = (e = {}, r = {}) => {
|
|
6
|
-
const t = S(e), o = n(t, r) ?? {};
|
|
7
|
-
return Object.fromEntries(
|
|
8
|
-
s(o).map(([c, m]) => [c, i(m)])
|
|
9
|
-
);
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
u as mergeAuthConfig
|
|
13
|
-
};
|