@scalar/api-client 2.3.16 → 2.3.17
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 +13 -0
- package/dist/hooks/useResponseBody.d.ts +4 -3
- package/dist/hooks/useResponseBody.d.ts.map +1 -1
- package/dist/hooks/useResponseBody.js +15 -15
- package/dist/style.css +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +31 -31
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +20 -20
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +115 -115
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.3.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [8720ae7]
|
|
8
|
+
- @scalar/themes@0.9.85
|
|
9
|
+
- @scalar/components@0.13.46
|
|
10
|
+
- @scalar/oas-utils@0.2.129
|
|
11
|
+
- @scalar/use-codemirror@0.11.91
|
|
12
|
+
- @scalar/use-hooks@0.1.39
|
|
13
|
+
- @scalar/import@0.3.12
|
|
14
|
+
- @scalar/postman-to-openapi@0.2.2
|
|
15
|
+
|
|
3
16
|
## 2.3.16
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import MimeType from 'whatwg-mimetype';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
2
3
|
/**
|
|
3
4
|
* Processes the response body of an HTTP request.
|
|
4
5
|
* Extracts MIME type, attachment filename, and generates a data URL.
|
|
5
6
|
*/
|
|
6
7
|
export declare function useResponseBody(props: {
|
|
7
|
-
data: unknown
|
|
8
|
-
headers: {
|
|
8
|
+
data: Ref<unknown>;
|
|
9
|
+
headers: Ref<{
|
|
9
10
|
name: string;
|
|
10
11
|
value: string;
|
|
11
12
|
required: boolean;
|
|
12
|
-
}[]
|
|
13
|
+
}[]>;
|
|
13
14
|
}): {
|
|
14
15
|
mimeType: import("vue").ComputedRef<MimeType>;
|
|
15
16
|
attachmentFilename: import("vue").ComputedRef<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResponseBody.d.ts","sourceRoot":"","sources":["../../src/hooks/useResponseBody.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"useResponseBody.d.ts","sourceRoot":"","sources":["../../src/hooks/useResponseBody.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,iBAAiB,CAAA;AACtC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAClB,OAAO,EAAE,GAAG,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC,CAAA;CACnE;;;;EAmCA"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { extractFilename as
|
|
2
|
-
import { computed as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
const
|
|
1
|
+
import { extractFilename as v } from "../libs/extractAttachmentFilename.js";
|
|
2
|
+
import { computed as r, isRef as i } from "vue";
|
|
3
|
+
import m from "whatwg-mimetype";
|
|
4
|
+
function b(t) {
|
|
5
|
+
const l = (a) => a instanceof Blob, e = r(() => i(t.data) ? t.data.value : t.data), c = r(() => i(t.headers) ? t.headers.value : t.headers), o = r(() => {
|
|
6
6
|
var n;
|
|
7
|
-
const
|
|
8
|
-
return new
|
|
9
|
-
}),
|
|
7
|
+
const a = ((n = c.value.find((u) => u.name.toLowerCase() === "content-type")) == null ? void 0 : n.value) ?? "";
|
|
8
|
+
return new m(a);
|
|
9
|
+
}), s = r(() => {
|
|
10
10
|
var n;
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
}),
|
|
14
|
-
new Blob([JSON.stringify(e.
|
|
15
|
-
type:
|
|
11
|
+
const a = ((n = c.value.find((u) => u.name.toLowerCase() === "content-disposition")) == null ? void 0 : n.value) ?? "";
|
|
12
|
+
return v(a);
|
|
13
|
+
}), f = r(() => l(e.value) ? URL.createObjectURL(e.value) : typeof e.value == "string" ? URL.createObjectURL(new Blob([e.value], { type: o.value.toString() })) : e.value instanceof Object && Object.keys(e.value).length ? URL.createObjectURL(
|
|
14
|
+
new Blob([JSON.stringify(e.value)], {
|
|
15
|
+
type: o.value.toString()
|
|
16
16
|
})
|
|
17
17
|
) : "");
|
|
18
|
-
return { mimeType:
|
|
18
|
+
return { mimeType: o, attachmentFilename: s, dataUrl: f };
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
b as useResponseBody
|
|
22
22
|
};
|