@scalar/api-client 2.0.60 → 2.0.63

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  3. package/dist/components/CodeInput/CodeInput.vue2.js +16 -15
  4. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  5. package/dist/components/CodeInput/codeVariableWidget.js +35 -30
  6. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts +3 -0
  7. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -0
  8. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +114 -0
  9. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue2.js +4 -0
  10. package/dist/layouts/App/create-api-client-app.d.ts +879 -195
  11. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  12. package/dist/layouts/Modal/create-api-client-modal.d.ts +1758 -390
  13. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  14. package/dist/libs/create-client.d.ts +879 -195
  15. package/dist/libs/create-client.d.ts.map +1 -1
  16. package/dist/libs/event-busses/hot-keys-bus.d.ts +1 -1
  17. package/dist/libs/local-storage.js +1 -1
  18. package/dist/libs/normalizeHeaders.d.ts +1 -2
  19. package/dist/libs/normalizeHeaders.d.ts.map +1 -1
  20. package/dist/libs/sendRequest.d.ts +4 -5
  21. package/dist/libs/sendRequest.d.ts.map +1 -1
  22. package/dist/libs/sendRequest.js +104 -86
  23. package/dist/store/workspace.d.ts +1754 -389
  24. package/dist/store/workspace.d.ts.map +1 -1
  25. package/dist/store/workspace.js +219 -216
  26. package/dist/style.css +1 -1
  27. package/dist/views/Environment/Environment.vue2.js +12 -12
  28. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  29. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +54 -52
  30. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  31. package/dist/views/Request/Request.vue.js +4 -4
  32. package/dist/views/Request/Request.vue2.js +91 -89
  33. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  34. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  35. package/dist/views/Request/RequestSection/RequestTable.vue2.js +1 -1
  36. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  37. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  38. package/dist/views/Request/RequestSidebarItem.vue2.js +82 -80
  39. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts +2 -2
  40. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  41. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +20 -20
  42. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  43. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +47 -42
  44. package/package.json +8 -8
@@ -1,22 +1,22 @@
1
- import { defineComponent as _, computed as p, ref as h, openBlock as r, createBlock as n, withCtx as u, createVNode as c, unref as x, createElementVNode as d, createTextVNode as y, createCommentVNode as l, createElementBlock as C, Fragment as A } from "vue";
2
- import B from "../../../components/ContextBar.vue.js";
3
- import S from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import $ from "./ResponseBody.vue.js";
5
- import g from "./ResponseEmpty.vue.js";
6
- import E from "./ResponseLoadingOverlay.vue.js";
1
+ import { defineComponent as h, computed as u, ref as x, openBlock as r, createBlock as n, withCtx as d, createVNode as c, unref as y, createElementVNode as f, createTextVNode as C, createCommentVNode as i, createElementBlock as A, Fragment as B } from "vue";
2
+ import S from "../../../components/ContextBar.vue.js";
3
+ import $ from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import g from "./ResponseBody.vue.js";
5
+ import E from "./ResponseEmpty.vue.js";
6
+ import H from "./ResponseLoadingOverlay.vue.js";
7
7
  import N from "./ResponseMetaInformation.vue.js";
8
8
  import { ScalarIcon as R } from "@scalar/components";
9
9
  import V from "./ResponseCookies.vue.js";
10
- import H from "./ResponseHeaders.vue.js";
11
- const L = { class: "flex items-center flex-1" }, O = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-6 py-2.5" }, D = /* @__PURE__ */ _({
10
+ import L from "./ResponseHeaders.vue.js";
11
+ const q = { class: "flex items-center flex-1" }, I = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-6 py-2.5" }, X = /* @__PURE__ */ h({
12
12
  __name: "ResponseSection",
13
13
  props: {
14
14
  response: {}
15
15
  },
16
- setup(f) {
17
- const i = f, m = p(() => {
16
+ setup(v) {
17
+ const a = v, m = u(() => {
18
18
  var s;
19
- const e = (s = i.response) == null ? void 0 : s.headers;
19
+ const e = (s = a.response) == null ? void 0 : s.headers;
20
20
  return e ? Object.keys(e).map((o) => ({
21
21
  name: o,
22
22
  value: e[o],
@@ -27,58 +27,63 @@ const L = { class: "flex items-center flex-1" }, O = { class: "custom-scroll rel
27
27
  "X-API-Client-Content-Length"
28
28
  ].includes(o.name)
29
29
  ) : [];
30
- }), v = p(() => {
31
- var s, o;
32
- const e = (o = (s = i.response) == null ? void 0 : s.headers) == null ? void 0 : o.cookies;
33
- return e ? Object.keys(e).map((a) => ({
34
- name: a,
35
- value: e[a],
36
- required: !1
37
- })) : [];
38
- }), k = ["All", "Body", "Headers", "Cookies"], t = h("All");
39
- return (e, s) => (r(), n(S, null, {
40
- title: u(() => [
41
- c(x(R), {
30
+ }), k = u(
31
+ () => {
32
+ var e;
33
+ return ((e = a.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((s) => {
34
+ var l, p;
35
+ const o = (p = (l = a.response) == null ? void 0 : l.headers) == null ? void 0 : p[s];
36
+ return o ? {
37
+ name: s,
38
+ value: o,
39
+ required: !1
40
+ } : [];
41
+ })) ?? [];
42
+ }
43
+ ), _ = ["All", "Body", "Headers", "Cookies"], t = x("All");
44
+ return (e, s) => (r(), n($, null, {
45
+ title: d(() => [
46
+ c(y(R), {
42
47
  class: "text-c-3 mr-2 rotate-180",
43
48
  icon: "ExternalLink",
44
49
  size: "sm",
45
50
  thickness: "2.5"
46
51
  }),
47
- d("div", L, [
48
- y(" Response "),
52
+ f("div", q, [
53
+ C(" Response "),
49
54
  e.response ? (r(), n(N, {
50
55
  key: 0,
51
56
  response: e.response
52
- }, null, 8, ["response"])) : l("", !0)
57
+ }, null, 8, ["response"])) : i("", !0)
53
58
  ])
54
59
  ]),
55
- default: u(() => {
60
+ default: d(() => {
56
61
  var o;
57
62
  return [
58
- d("div", O, [
59
- e.response ? (r(), C(A, { key: 1 }, [
60
- c(B, {
63
+ f("div", I, [
64
+ e.response ? (r(), A(B, { key: 1 }, [
65
+ c(S, {
61
66
  activeSection: t.value,
62
- sections: k,
63
- onSetActiveSection: s[0] || (s[0] = (a) => t.value = a)
67
+ sections: _,
68
+ onSetActiveSection: s[0] || (s[0] = (l) => t.value = l)
64
69
  }, null, 8, ["activeSection"]),
65
70
  t.value === "All" || t.value === "Cookies" ? (r(), n(V, {
66
71
  key: 0,
67
- cookies: v.value
68
- }, null, 8, ["cookies"])) : l("", !0),
69
- t.value === "All" || t.value === "Headers" ? (r(), n(H, {
72
+ cookies: k.value
73
+ }, null, 8, ["cookies"])) : i("", !0),
74
+ t.value === "All" || t.value === "Headers" ? (r(), n(L, {
70
75
  key: 1,
71
76
  headers: m.value
72
- }, null, 8, ["headers"])) : l("", !0),
73
- t.value === "All" || t.value === "Body" ? (r(), n($, {
77
+ }, null, 8, ["headers"])) : i("", !0),
78
+ t.value === "All" || t.value === "Body" ? (r(), n(g, {
74
79
  key: 2,
75
80
  active: !0,
76
- data: (o = i.response) == null ? void 0 : o.data,
81
+ data: (o = a.response) == null ? void 0 : o.data,
77
82
  headers: m.value,
78
83
  title: "Body"
79
- }, null, 8, ["data", "headers"])) : l("", !0)
80
- ], 64)) : (r(), n(g, { key: 0 })),
81
- c(E)
84
+ }, null, 8, ["data", "headers"])) : i("", !0)
85
+ ], 64)) : (r(), n(E, { key: 0 })),
86
+ c(H)
82
87
  ])
83
88
  ];
84
89
  }),
@@ -87,5 +92,5 @@ const L = { class: "flex items-center flex-1" }, O = { class: "custom-scroll rel
87
92
  }
88
93
  });
89
94
  export {
90
- D as default
95
+ X as default
91
96
  };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.0.60",
21
+ "version": "2.0.63",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -114,9 +114,7 @@
114
114
  "dependencies": {
115
115
  "@headlessui/tailwindcss": "^0.2.0",
116
116
  "@headlessui/vue": "^1.7.20",
117
- "@scalar/openapi-parser": "^0.7.2",
118
117
  "@vueuse/core": "^10.10.0",
119
- "axios": "^1.6.8",
120
118
  "cva": "1.0.0-beta.1",
121
119
  "fuse.js": "^7.0.0",
122
120
  "js-cookie": "^3.0.5",
@@ -127,15 +125,17 @@
127
125
  "vue-router": "^4.3.0",
128
126
  "whatwg-mimetype": "^4.0.0",
129
127
  "zod": "^3.22.4",
130
- "@scalar/components": "0.12.41",
128
+ "@scalar/components": "0.12.43",
129
+ "@scalar/oas-utils": "0.2.42",
131
130
  "@scalar/draggable": "0.1.4",
132
- "@scalar/oas-utils": "0.2.39",
131
+ "@scalar/openapi-parser": "0.8.1",
133
132
  "@scalar/object-utils": "1.1.7",
133
+ "@scalar/openapi-types": "0.1.0",
134
134
  "@scalar/themes": "0.9.28",
135
- "@scalar/types": "0.0.5",
136
135
  "@scalar/use-codemirror": "0.11.10",
137
- "@scalar/use-tooltip": "1.0.2",
138
- "@scalar/use-toasts": "0.7.5"
136
+ "@scalar/types": "0.0.7",
137
+ "@scalar/use-toasts": "0.7.6",
138
+ "@scalar/use-tooltip": "1.0.2"
139
139
  },
140
140
  "devDependencies": {
141
141
  "@types/content-type": "^1.1.8",