@scalar/api-client 0.8.2 → 0.8.4
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 +17 -0
- package/dist/components/ApiClient/Request/RequestCookies.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestHeaders.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestQuery.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestVariables.vue.d.ts.map +1 -1
- package/dist/helpers/prepareClientRequestConfig.d.ts +8 -0
- package/dist/helpers/prepareClientRequestConfig.d.ts.map +1 -1
- package/dist/helpers/sendRequest.d.ts.map +1 -1
- package/dist/index.js +82 -41
- package/dist/stores/requestStore.d.ts +5 -5
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 0.8.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0f9791b7: fix: add null check to cookies and proper withCredentials set on cookie addition
|
|
8
|
+
|
|
9
|
+
## 0.8.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 5d6b539b: feat: toggle parameters to include/exclude them in/from the request
|
|
14
|
+
- a1319e8b: Switched internal component library to use ScalarComponents instead
|
|
15
|
+
- Updated dependencies [a1319e8b]
|
|
16
|
+
- @scalar/use-codemirror@0.7.16
|
|
17
|
+
- @scalar/use-modal@0.2.1
|
|
18
|
+
- @scalar/themes@0.5.1
|
|
19
|
+
|
|
3
20
|
## 0.8.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestCookies.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestCookies.vue.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"RequestCookies.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestCookies.vue.ts"],"names":[],"mappings":";;;;;AA4IA,wBAMG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestHeaders.vue.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"RequestHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestHeaders.vue.ts"],"names":[],"mappings":";;;;;AA4IA,wBAMG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestQuery.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestQuery.vue.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"RequestQuery.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestQuery.vue.ts"],"names":[],"mappings":";;;;;AA6IA,wBAMG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestVariables.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestVariables.vue.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;;;;;;
|
|
1
|
+
{"version":3,"file":"RequestVariables.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestVariables.vue.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;;;;;;AA0InD,wBAMG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import type { AuthState, ClientRequestConfig } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Before a request is sent to the server, we’ll do some final preparation.
|
|
4
|
+
*
|
|
5
|
+
* - Add authentication headers
|
|
6
|
+
* - Add Content-Type header if request.body is JSON
|
|
7
|
+
* - Parse request.body if it’s JSON
|
|
8
|
+
* - Remove duplicate headers
|
|
9
|
+
*/
|
|
2
10
|
export declare const prepareClientRequestConfig: (configuration: {
|
|
3
11
|
request: ClientRequestConfig;
|
|
4
12
|
authState: AuthState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareClientRequestConfig.d.ts","sourceRoot":"","sources":["../../src/helpers/prepareClientRequestConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAG9D,eAAO,MAAM,0BAA0B,kBAAmB;IACxD,OAAO,EAAE,mBAAmB,CAAA;IAC5B,SAAS,EAAE,SAAS,CAAA;CACrB;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"prepareClientRequestConfig.d.ts","sourceRoot":"","sources":["../../src/helpers/prepareClientRequestConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAG9D;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,kBAAmB;IACxD,OAAO,EAAE,mBAAmB,CAAA;IAC5B,SAAS,EAAE,SAAS,CAAA;CACrB;;;;;;;;;;;;CAkDA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendRequest.d.ts","sourceRoot":"","sources":["../../src/helpers/sendRequest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,aAAa,EACb,iBAAiB,EAClB,MAAM,UAAU,CAAA;AAUjB;;GAEG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"sendRequest.d.ts","sourceRoot":"","sources":["../../src/helpers/sendRequest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,aAAa,EACb,iBAAiB,EAClB,MAAM,UAAU,CAAA;AAUjB;;GAEG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAyJ/B"}
|
package/dist/index.js
CHANGED
|
@@ -26414,6 +26414,7 @@ const normalizeUrl = (url) => {
|
|
|
26414
26414
|
return normalizedUrl;
|
|
26415
26415
|
};
|
|
26416
26416
|
const prepareClientRequestConfig = (configuration) => {
|
|
26417
|
+
var _a2;
|
|
26417
26418
|
const { authState: authState2, request } = configuration;
|
|
26418
26419
|
if (authState2.type === "basic" && authState2.basic.active) {
|
|
26419
26420
|
request.headers = [
|
|
@@ -26422,7 +26423,8 @@ const prepareClientRequestConfig = (configuration) => {
|
|
|
26422
26423
|
name: "Authorization",
|
|
26423
26424
|
value: `Basic ${btoa(
|
|
26424
26425
|
`${authState2.basic.username}:${authState2.basic.password}`
|
|
26425
|
-
)}
|
|
26426
|
+
)}`,
|
|
26427
|
+
enabled: true
|
|
26426
26428
|
}
|
|
26427
26429
|
];
|
|
26428
26430
|
} else if (authState2.type === "bearer" && authState2.bearer.active) {
|
|
@@ -26430,18 +26432,25 @@ const prepareClientRequestConfig = (configuration) => {
|
|
|
26430
26432
|
...request.headers ?? [],
|
|
26431
26433
|
{
|
|
26432
26434
|
name: "Authorization",
|
|
26433
|
-
value: `Bearer ${authState2.bearer.token}
|
|
26435
|
+
value: `Bearer ${authState2.bearer.token}`,
|
|
26436
|
+
enabled: true
|
|
26434
26437
|
}
|
|
26435
26438
|
];
|
|
26436
26439
|
}
|
|
26437
26440
|
if (request.body && isJsonString(request.body)) {
|
|
26438
|
-
request.headers
|
|
26439
|
-
|
|
26440
|
-
|
|
26441
|
-
|
|
26442
|
-
|
|
26443
|
-
|
|
26444
|
-
|
|
26441
|
+
const hasContentTypeHeader = (_a2 = request.headers) == null ? void 0 : _a2.some(
|
|
26442
|
+
(header2) => header2.name.toLowerCase() === "content-type"
|
|
26443
|
+
);
|
|
26444
|
+
if (!hasContentTypeHeader) {
|
|
26445
|
+
request.headers = [
|
|
26446
|
+
...request.headers ?? [],
|
|
26447
|
+
{
|
|
26448
|
+
name: "Content-Type",
|
|
26449
|
+
value: `application/json; charset=utf-8`,
|
|
26450
|
+
enabled: true
|
|
26451
|
+
}
|
|
26452
|
+
];
|
|
26453
|
+
}
|
|
26445
26454
|
request.body = JSON.parse(request.body);
|
|
26446
26455
|
}
|
|
26447
26456
|
return {
|
|
@@ -26454,9 +26463,10 @@ const replaceVariables = (url, variables2) => {
|
|
|
26454
26463
|
}, url);
|
|
26455
26464
|
};
|
|
26456
26465
|
async function sendRequest(request, proxyUrl) {
|
|
26466
|
+
var _a2;
|
|
26457
26467
|
const method = normalizeRequestMethod(request.type);
|
|
26458
26468
|
const headers = mapFromArray(
|
|
26459
|
-
request.headers ?? [],
|
|
26469
|
+
(request.headers ?? []).filter((header2) => header2.enabled),
|
|
26460
26470
|
"name",
|
|
26461
26471
|
"value"
|
|
26462
26472
|
);
|
|
@@ -26468,21 +26478,29 @@ async function sendRequest(request, proxyUrl) {
|
|
|
26468
26478
|
).split("?");
|
|
26469
26479
|
const renderedUrl = replaceVariables(
|
|
26470
26480
|
urlWithPath,
|
|
26471
|
-
mapFromArray(
|
|
26481
|
+
mapFromArray(
|
|
26482
|
+
(request.variables ?? []).filter((variable2) => variable2.enabled),
|
|
26483
|
+
"name",
|
|
26484
|
+
"value"
|
|
26485
|
+
)
|
|
26472
26486
|
);
|
|
26473
26487
|
const queryStringsFromUrl = [];
|
|
26474
26488
|
urlQueryString.forEach((queryString2) => {
|
|
26475
26489
|
new URLSearchParams(queryString2 ?? "").forEach((value, name2) => {
|
|
26476
26490
|
queryStringsFromUrl.push({
|
|
26477
26491
|
name: name2,
|
|
26478
|
-
value
|
|
26492
|
+
value,
|
|
26493
|
+
enabled: true
|
|
26479
26494
|
});
|
|
26480
26495
|
});
|
|
26481
26496
|
});
|
|
26482
26497
|
const queryString = new URLSearchParams(
|
|
26483
26498
|
// TODO: No type-casting
|
|
26484
26499
|
mapFromArray(
|
|
26485
|
-
[
|
|
26500
|
+
[
|
|
26501
|
+
...(request.query ?? []).filter((query) => query.enabled),
|
|
26502
|
+
...queryStringsFromUrl
|
|
26503
|
+
],
|
|
26486
26504
|
"name",
|
|
26487
26505
|
"value"
|
|
26488
26506
|
)
|
|
@@ -26492,8 +26510,12 @@ async function sendRequest(request, proxyUrl) {
|
|
|
26492
26510
|
type: "none"
|
|
26493
26511
|
};
|
|
26494
26512
|
const startTime = Date.now();
|
|
26495
|
-
if (request.cookies) {
|
|
26496
|
-
const cookies = mapFromArray(
|
|
26513
|
+
if (request.cookies && ((_a2 = request.cookies) == null ? void 0 : _a2.length) > 0) {
|
|
26514
|
+
const cookies = mapFromArray(
|
|
26515
|
+
(request.cookies ?? []).filter((cookie) => cookie.enabled),
|
|
26516
|
+
"name",
|
|
26517
|
+
"value"
|
|
26518
|
+
);
|
|
26497
26519
|
headers.Cookie = Object.keys(cookies).map((key) => `${key}=${cookies[key]}`).join("; ");
|
|
26498
26520
|
}
|
|
26499
26521
|
const requestConfig = {
|
|
@@ -26513,6 +26535,9 @@ async function sendRequest(request, proxyUrl) {
|
|
|
26513
26535
|
headers: requestConfig.headers,
|
|
26514
26536
|
data: requestConfig.data
|
|
26515
26537
|
};
|
|
26538
|
+
if (headers.cookies) {
|
|
26539
|
+
axiosRequestConfig.withCredentials = true;
|
|
26540
|
+
}
|
|
26516
26541
|
if (proxyUrl) {
|
|
26517
26542
|
console.info(`${requestConfig.method} ${proxyUrl} → ${requestConfig.url}`);
|
|
26518
26543
|
} else {
|
|
@@ -26535,7 +26560,7 @@ async function sendRequest(request, proxyUrl) {
|
|
|
26535
26560
|
const { response: errorResponse } = error;
|
|
26536
26561
|
return {
|
|
26537
26562
|
headers: {
|
|
26538
|
-
"content-type": "application/json"
|
|
26563
|
+
"content-type": "application/json; charset=utf-8"
|
|
26539
26564
|
},
|
|
26540
26565
|
...errorResponse,
|
|
26541
26566
|
statusCode: (errorResponse == null ? void 0 : errorResponse.status) ?? 0,
|
|
@@ -26977,8 +27002,8 @@ const _hoisted_18$1 = /* @__PURE__ */ createElementVNode("p", null, "Enabled", -
|
|
|
26977
27002
|
const _hoisted_19$1 = { class: "input" };
|
|
26978
27003
|
const _hoisted_20$1 = /* @__PURE__ */ createElementVNode("label", { for: "generatedtoken" }, "Generated Token", -1);
|
|
26979
27004
|
const _hoisted_21$1 = { class: "input" };
|
|
26980
|
-
const _hoisted_22 = /* @__PURE__ */ createElementVNode("label", { for: "discoveryurl" }, "OIDC Discovery URL", -1);
|
|
26981
|
-
const _hoisted_23 = { class: "input" };
|
|
27005
|
+
const _hoisted_22$1 = /* @__PURE__ */ createElementVNode("label", { for: "discoveryurl" }, "OIDC Discovery URL", -1);
|
|
27006
|
+
const _hoisted_23$1 = { class: "input" };
|
|
26982
27007
|
const _hoisted_24 = /* @__PURE__ */ createElementVNode("label", { for: "authurl" }, "Auth URL", -1);
|
|
26983
27008
|
const _hoisted_25 = { class: "input" };
|
|
26984
27009
|
const _hoisted_26 = /* @__PURE__ */ createElementVNode("label", { for: "accesstoken" }, "Access Token URL", -1);
|
|
@@ -27150,7 +27175,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
27150
27175
|
])
|
|
27151
27176
|
]),
|
|
27152
27177
|
createElementVNode("div", _hoisted_21$1, [
|
|
27153
|
-
_hoisted_22,
|
|
27178
|
+
_hoisted_22$1,
|
|
27154
27179
|
withDirectives(createElementVNode("input", {
|
|
27155
27180
|
id: "discoveryurl",
|
|
27156
27181
|
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(authState2).oauthTwo.discoveryURL = $event),
|
|
@@ -27162,7 +27187,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
27162
27187
|
[vModelText, unref(authState2).oauthTwo.discoveryURL]
|
|
27163
27188
|
])
|
|
27164
27189
|
]),
|
|
27165
|
-
createElementVNode("div", _hoisted_23, [
|
|
27190
|
+
createElementVNode("div", _hoisted_23$1, [
|
|
27166
27191
|
_hoisted_24,
|
|
27167
27192
|
withDirectives(createElementVNode("input", {
|
|
27168
27193
|
id: "authurl",
|
|
@@ -27294,15 +27319,11 @@ const _hoisted_13 = ["onUpdate:modelValue"];
|
|
|
27294
27319
|
const _hoisted_14 = { class: "table-row-item" };
|
|
27295
27320
|
const _hoisted_15 = ["onUpdate:modelValue"];
|
|
27296
27321
|
const _hoisted_16 = { class: "table-row-meta" };
|
|
27297
|
-
const _hoisted_17 =
|
|
27298
|
-
|
|
27299
|
-
|
|
27300
|
-
|
|
27301
|
-
|
|
27302
|
-
/* @__PURE__ */ createElementVNode("span", { class: "meta-checkmark" })
|
|
27303
|
-
], -1);
|
|
27304
|
-
const _hoisted_18 = ["onClick"];
|
|
27305
|
-
const _hoisted_19 = /* @__PURE__ */ createElementVNode("svg", {
|
|
27322
|
+
const _hoisted_17 = { class: "meta-check" };
|
|
27323
|
+
const _hoisted_18 = ["onUpdate:modelValue"];
|
|
27324
|
+
const _hoisted_19 = /* @__PURE__ */ createElementVNode("span", { class: "meta-checkmark" }, null, -1);
|
|
27325
|
+
const _hoisted_20 = ["onClick"];
|
|
27326
|
+
const _hoisted_21 = /* @__PURE__ */ createElementVNode("svg", {
|
|
27306
27327
|
fill: "none",
|
|
27307
27328
|
height: "10",
|
|
27308
27329
|
viewBox: "-0.5 -0.5 10 10",
|
|
@@ -27324,10 +27345,10 @@ const _hoisted_19 = /* @__PURE__ */ createElementVNode("svg", {
|
|
|
27324
27345
|
"stroke-width": "1.5"
|
|
27325
27346
|
})
|
|
27326
27347
|
], -1);
|
|
27327
|
-
const
|
|
27328
|
-
|
|
27348
|
+
const _hoisted_22 = [
|
|
27349
|
+
_hoisted_21
|
|
27329
27350
|
];
|
|
27330
|
-
const
|
|
27351
|
+
const _hoisted_23 = /* @__PURE__ */ createElementVNode("svg", {
|
|
27331
27352
|
class: "flow-icon",
|
|
27332
27353
|
"data-v-aa4fbd2d": "",
|
|
27333
27354
|
height: "100%",
|
|
@@ -27370,8 +27391,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
27370
27391
|
return openBlock(), createElementBlock("div", {
|
|
27371
27392
|
key: item.id,
|
|
27372
27393
|
class: normalizeClass(["table-row", {
|
|
27373
|
-
"required-parameter": item.required
|
|
27374
|
-
[item.customClass]: !!item.customClass
|
|
27394
|
+
"required-parameter": item.required
|
|
27375
27395
|
}])
|
|
27376
27396
|
}, [
|
|
27377
27397
|
createElementVNode("div", _hoisted_10, [
|
|
@@ -27401,12 +27421,21 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
27401
27421
|
[vShow, showDescription.value]
|
|
27402
27422
|
]),
|
|
27403
27423
|
createElementVNode("div", _hoisted_16, [
|
|
27404
|
-
_hoisted_17,
|
|
27424
|
+
createElementVNode("label", _hoisted_17, [
|
|
27425
|
+
withDirectives(createElementVNode("input", {
|
|
27426
|
+
"onUpdate:modelValue": ($event) => item.enabled = $event,
|
|
27427
|
+
checked: "",
|
|
27428
|
+
type: "checkbox"
|
|
27429
|
+
}, null, 8, _hoisted_18), [
|
|
27430
|
+
[vModelCheckbox, item.enabled]
|
|
27431
|
+
]),
|
|
27432
|
+
_hoisted_19
|
|
27433
|
+
]),
|
|
27405
27434
|
createElementVNode("button", {
|
|
27406
27435
|
class: "meta-delete",
|
|
27407
27436
|
type: "button",
|
|
27408
27437
|
onClick: ($event) => _ctx.$emit("deleteIndex", index)
|
|
27409
|
-
},
|
|
27438
|
+
}, _hoisted_22, 8, _hoisted_20)
|
|
27410
27439
|
])
|
|
27411
27440
|
], 2);
|
|
27412
27441
|
}), 128)),
|
|
@@ -27416,7 +27445,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
27416
27445
|
type: "button",
|
|
27417
27446
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("addAnother"))
|
|
27418
27447
|
}, [
|
|
27419
|
-
|
|
27448
|
+
_hoisted_23,
|
|
27420
27449
|
createTextVNode(" " + toDisplayString(_ctx.addLabel), 1)
|
|
27421
27450
|
])) : createCommentVNode("", true)
|
|
27422
27451
|
]);
|
|
@@ -27528,7 +27557,10 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
27528
27557
|
}
|
|
27529
27558
|
function addAnotherHandler() {
|
|
27530
27559
|
var _a2;
|
|
27531
|
-
(
|
|
27560
|
+
if (activeRequest2.cookies === void 0) {
|
|
27561
|
+
activeRequest2.cookies = [];
|
|
27562
|
+
}
|
|
27563
|
+
(_a2 = activeRequest2.cookies) == null ? void 0 : _a2.push({ name: "", value: "", enabled: true });
|
|
27532
27564
|
}
|
|
27533
27565
|
return (_ctx, _cache) => {
|
|
27534
27566
|
return openBlock(), createBlock(unref(_sfc_main$j), { title: "Cookies" }, {
|
|
@@ -27590,7 +27622,10 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
27590
27622
|
}
|
|
27591
27623
|
function addAnotherHandler() {
|
|
27592
27624
|
var _a2;
|
|
27593
|
-
(
|
|
27625
|
+
if (activeRequest2.headers === void 0) {
|
|
27626
|
+
activeRequest2.headers = [];
|
|
27627
|
+
}
|
|
27628
|
+
(_a2 = activeRequest2.headers) == null ? void 0 : _a2.push({ name: "", value: "", enabled: true });
|
|
27594
27629
|
}
|
|
27595
27630
|
return (_ctx, _cache) => {
|
|
27596
27631
|
return openBlock(), createBlock(unref(_sfc_main$j), { title: "Headers" }, {
|
|
@@ -27652,7 +27687,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
27652
27687
|
}
|
|
27653
27688
|
function addAnotherHandler() {
|
|
27654
27689
|
var _a2;
|
|
27655
|
-
(
|
|
27690
|
+
if (activeRequest2.query === void 0) {
|
|
27691
|
+
activeRequest2.query = [];
|
|
27692
|
+
}
|
|
27693
|
+
(_a2 = activeRequest2.query) == null ? void 0 : _a2.push({ name: "", value: "", enabled: true });
|
|
27656
27694
|
}
|
|
27657
27695
|
return (_ctx, _cache) => {
|
|
27658
27696
|
return openBlock(), createBlock(unref(_sfc_main$j), { title: "Query Parameters" }, {
|
|
@@ -27713,7 +27751,10 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
27713
27751
|
}
|
|
27714
27752
|
function addAnotherHandler() {
|
|
27715
27753
|
var _a2;
|
|
27716
|
-
(
|
|
27754
|
+
if (activeRequest2.variables === void 0) {
|
|
27755
|
+
activeRequest2.variables = [];
|
|
27756
|
+
}
|
|
27757
|
+
(_a2 = activeRequest2.variables) == null ? void 0 : _a2.push({ name: "", value: "", enabled: true });
|
|
27717
27758
|
}
|
|
27718
27759
|
return (_ctx, _cache) => {
|
|
27719
27760
|
return openBlock(), createBlock(unref(_sfc_main$j), { title: "Variables" }, {
|
|
@@ -40,37 +40,37 @@ export declare const useRequestStore: () => {
|
|
|
40
40
|
name: string;
|
|
41
41
|
description?: string | null | undefined;
|
|
42
42
|
value: string | number;
|
|
43
|
-
customClass?: string | undefined;
|
|
44
43
|
required?: boolean | undefined;
|
|
44
|
+
enabled: boolean;
|
|
45
45
|
}[] | undefined;
|
|
46
46
|
query?: {
|
|
47
47
|
name: string;
|
|
48
48
|
description?: string | null | undefined;
|
|
49
49
|
value: string | number;
|
|
50
|
-
customClass?: string | undefined;
|
|
51
50
|
required?: boolean | undefined;
|
|
51
|
+
enabled: boolean;
|
|
52
52
|
}[] | undefined;
|
|
53
53
|
cookies?: {
|
|
54
54
|
name: string;
|
|
55
55
|
description?: string | null | undefined;
|
|
56
56
|
value: string | number;
|
|
57
|
-
customClass?: string | undefined;
|
|
58
57
|
required?: boolean | undefined;
|
|
58
|
+
enabled: boolean;
|
|
59
59
|
}[] | undefined;
|
|
60
60
|
headers?: {
|
|
61
61
|
name: string;
|
|
62
62
|
description?: string | null | undefined;
|
|
63
63
|
value: string | number;
|
|
64
|
-
customClass?: string | undefined;
|
|
65
64
|
required?: boolean | undefined;
|
|
65
|
+
enabled: boolean;
|
|
66
66
|
}[] | undefined;
|
|
67
67
|
body?: string | undefined;
|
|
68
68
|
formData?: {
|
|
69
69
|
name: string;
|
|
70
70
|
description?: string | null | undefined;
|
|
71
71
|
value: string | number;
|
|
72
|
-
customClass?: string | undefined;
|
|
73
72
|
required?: boolean | undefined;
|
|
73
|
+
enabled: boolean;
|
|
74
74
|
}[] | undefined;
|
|
75
75
|
};
|
|
76
76
|
activeResponse: import("vue").ComputedRef<import("../types").ClientResponse | null>;
|
package/dist/types.d.ts
CHANGED
|
@@ -34,8 +34,8 @@ export type BaseParameter = {
|
|
|
34
34
|
name: string;
|
|
35
35
|
description?: string | null;
|
|
36
36
|
value: string | number;
|
|
37
|
-
customClass?: string;
|
|
38
37
|
required?: boolean;
|
|
38
|
+
enabled: boolean;
|
|
39
39
|
};
|
|
40
40
|
export type Header = BaseParameter;
|
|
41
41
|
export type Query = BaseParameter;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,MAAM,GAAG;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE1E,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,QAAQ,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,GAAG,I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,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,WAAW,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,YAAY,GACZ,WAAW,GACX,mCAAmC,GACnC,qBAAqB,CAAA;AAEzB,MAAM,MAAM,OAAO,GAAG;KACnB,GAAG,IAAI,WAAW,GAAG,aAAa;CACpC,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,GAAG,CAAA;CACb,CAAA"}
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"rest",
|
|
14
14
|
"testing"
|
|
15
15
|
],
|
|
16
|
-
"version": "0.8.
|
|
16
|
+
"version": "0.8.4",
|
|
17
17
|
"engines": {
|
|
18
18
|
"node": ">=20"
|
|
19
19
|
},
|
|
@@ -43,23 +43,23 @@
|
|
|
43
43
|
"pretty-bytes": "^6.1.1",
|
|
44
44
|
"pretty-ms": "^8.0.0",
|
|
45
45
|
"vue": "^3.3.0",
|
|
46
|
-
"@scalar/themes": "0.5.
|
|
47
|
-
"@scalar/use-codemirror": "0.7.
|
|
46
|
+
"@scalar/themes": "0.5.1",
|
|
47
|
+
"@scalar/use-codemirror": "0.7.16",
|
|
48
48
|
"@scalar/use-keyboard-event": "0.5.6",
|
|
49
|
-
"@scalar/use-modal": "0.2.
|
|
49
|
+
"@scalar/use-modal": "0.2.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@scalar/use-codemirror": "^0.7.
|
|
52
|
+
"@scalar/use-codemirror": "^0.7.16",
|
|
53
53
|
"@types/content-type": "^1.1.6",
|
|
54
54
|
"@vitejs/plugin-vue": "^4.4.0",
|
|
55
55
|
"@vitest/coverage-v8": "^0.34.4",
|
|
56
56
|
"tsc-alias": "^1.8.8",
|
|
57
|
-
"vite": "^4.4.
|
|
57
|
+
"vite": "^4.4.12",
|
|
58
58
|
"vite-plugin-css-injected-by-js": "^3.3.0",
|
|
59
59
|
"vitest": "^0.34.4",
|
|
60
60
|
"vue-tsc": "^1.8.19",
|
|
61
|
-
"@scalar/api-client-proxy": "0.5.
|
|
62
|
-
"@scalar/echo-server": "0.5.
|
|
61
|
+
"@scalar/api-client-proxy": "0.5.12",
|
|
62
|
+
"@scalar/echo-server": "0.5.6"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"vue": "^3.3.0"
|