@scalar/api-client 2.2.23 → 2.2.24

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cAyS8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAqajD,wBAMG"}
1
+ {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cA+S8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA2ajD,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Request.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-32033bf8"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-90ff0226"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as se, ref as R, computed as L, watch as ue, onMounted as le, onBeforeUnmount as ae, openBlock as b, createElementBlock as ie, Fragment as ne, createElementVNode as E, normalizeClass as H, unref as u, createBlock as O, createCommentVNode as V, createVNode as h, withCtx as W } from "vue";
1
+ import { defineComponent as se, ref as h, computed as H, watch as ue, onMounted as le, onBeforeUnmount as ae, openBlock as x, createElementBlock as ie, Fragment as ne, createElementVNode as V, normalizeClass as W, unref as l, createBlock as C, createCommentVNode as N, createVNode as U, withCtx as _ } from "vue";
2
2
  import ce from "../../components/ImportCurl/ImportCurlModal.vue.js";
3
3
  import me from "../../components/ViewLayout/ViewLayout.vue.js";
4
4
  import de from "../../components/ViewLayout/ViewLayoutContent.vue.js";
@@ -22,164 +22,164 @@ const Ce = { class: "flex h-full" }, Ne = { class: "flex flex-1 flex-col h-full"
22
22
  __name: "Request",
23
23
  emits: ["newTab"],
24
24
  setup(Be) {
25
- const _ = Oe(), { toast: C } = xe(), { layout: $ } = Ve(), {
26
- activeCollection: x,
27
- activeExample: v,
28
- activeEnvironment: N,
29
- activeRequest: U,
30
- activeWorkspace: f,
31
- activeServer: j,
32
- activeWorkspaceCollections: z
25
+ const $ = Oe(), { toast: B } = xe(), { layout: j } = Ve(), {
26
+ activeCollection: p,
27
+ activeExample: S,
28
+ activeEnvironment: g,
29
+ activeRequest: k,
30
+ activeWorkspace: y,
31
+ activeServer: z,
32
+ activeWorkspaceCollections: F
33
33
  } = fe(), {
34
- cookies: F,
35
- isReadOnly: k,
36
- modalState: a,
37
- requestHistory: B,
38
- showSidebar: Q,
39
- securitySchemes: J,
40
- requestMutators: G,
41
- serverMutators: K,
42
- servers: P,
43
- events: p
44
- } = _, l = R(!k), g = R(), e = R(), w = R(""), X = Ue(), Y = L(
45
- () => B.findLast((o) => {
34
+ cookies: Q,
35
+ isReadOnly: w,
36
+ modalState: i,
37
+ requestHistory: I,
38
+ showSidebar: J,
39
+ securitySchemes: G,
40
+ requestMutators: K,
41
+ serverMutators: P,
42
+ servers: X,
43
+ events: q
44
+ } = $, a = h(!w), T = h(), e = h(), E = h(""), Y = Ue(), Z = H(
45
+ () => I.findLast((o) => {
46
46
  var t;
47
- return o.request.uid === ((t = v.value) == null ? void 0 : t.uid);
47
+ return o.request.uid === ((t = S.value) == null ? void 0 : t.uid);
48
48
  })
49
- ), { mediaQueries: Z } = he();
50
- ue(Z.xl, (o) => l.value = o, {
51
- immediate: $ !== "modal"
49
+ ), { mediaQueries: ee } = he();
50
+ ue(ee.xl, (o) => a.value = o, {
51
+ immediate: j !== "modal"
52
52
  });
53
- const I = L(
53
+ const D = H(
54
54
  () => {
55
55
  var o, t;
56
- return (k ? (o = x.value) == null ? void 0 : o.selectedSecuritySchemeUids : (t = U.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
56
+ return (w ? (o = p.value) == null ? void 0 : o.selectedSecuritySchemeUids : (t = k.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
57
57
  }
58
- ), T = async () => {
59
- var m, d;
60
- if (!U.value || !v.value || !x.value)
58
+ ), M = async () => {
59
+ var d, v, f, u;
60
+ if (!k.value || !S.value || !p.value)
61
61
  return;
62
- const o = typeof N.value == "object" ? N.value.value : "{}", t = be.parse(o);
62
+ const o = typeof g.value == "object" ? g.value.value : "{}", t = be.parse(o);
63
63
  t.error && console.error("INVALID ENVIRONMENT!");
64
- const s = t.error || typeof t.data != "object" ? {} : t.data ?? {}, r = ((m = f.value) == null ? void 0 : m.cookies.map((y) => F[y]).filter(Re)) ?? [], [i, n] = we({
65
- request: U.value,
66
- example: v.value,
67
- selectedSecuritySchemeUids: I.value,
68
- proxyUrl: ((d = f.value) == null ? void 0 : d.proxyUrl) ?? "",
64
+ const s = t.error || typeof t.data != "object" ? {} : t.data ?? {}, r = ((d = y.value) == null ? void 0 : d.cookies.map((O) => Q[O]).filter(Re)) ?? [], R = ((f = (v = p.value) == null ? void 0 : v.info) == null ? void 0 : f.title) === "Drafts" ? void 0 : z.value, [n, c] = we({
65
+ request: k.value,
66
+ example: S.value,
67
+ selectedSecuritySchemeUids: D.value,
68
+ proxyUrl: ((u = y.value) == null ? void 0 : u.proxyUrl) ?? "",
69
69
  environment: s,
70
70
  globalCookies: r,
71
- status: p.requestStatus,
72
- securitySchemes: J,
73
- server: j.value
71
+ status: q.requestStatus,
72
+ securitySchemes: G,
73
+ server: R
74
74
  });
75
- if (i) {
76
- C(i.message, "error");
75
+ if (n) {
76
+ B(n.message, "error");
77
77
  return;
78
78
  }
79
- g.value = n.controller;
80
- const [c, S] = await n.sendRequest();
81
- c ? C(c.message, "error") : B.push(S);
82
- }, ee = async () => {
79
+ T.value = c.controller;
80
+ const [m, b] = await c.sendRequest();
81
+ m ? B(m.message, "error") : I.push(b);
82
+ }, te = async () => {
83
83
  var o;
84
- return (o = g.value) == null ? void 0 : o.abort(Ee.REQUEST_ABORTED);
84
+ return (o = T.value) == null ? void 0 : o.abort(Ee.REQUEST_ABORTED);
85
85
  };
86
86
  le(() => {
87
- p.executeRequest.on(T), p.cancelRequest.on(ee);
88
- }), qe(), ae(() => p.executeRequest.off(T));
89
- function te({
87
+ q.executeRequest.on(M), q.cancelRequest.on(te);
88
+ }), qe(), ae(() => q.executeRequest.off(M));
89
+ function oe({
90
90
  requestName: o,
91
91
  collectionUid: t
92
92
  }) {
93
- var n, c, S, m, d, y, M;
93
+ var n, c, m, b, d, v, f;
94
94
  if (!e.value) return;
95
- const s = z.value.find(
96
- (q) => q.uid === t
95
+ const s = F.value.find(
96
+ (u) => u.uid === t
97
97
  );
98
98
  if (!s) return;
99
99
  const r = ((n = s == null ? void 0 : s.info) == null ? void 0 : n.title) === "Drafts";
100
100
  if (!r && e.value.servers) {
101
- const q = Object.values(P).find(
102
- (re) => {
103
- var A, D;
104
- return re.url === ((D = (A = e == null ? void 0 : e.value) == null ? void 0 : A.servers) == null ? void 0 : D[0]);
101
+ const u = Object.values(X).find(
102
+ (O) => {
103
+ var A, L;
104
+ return O.url === ((L = (A = e == null ? void 0 : e.value) == null ? void 0 : A.servers) == null ? void 0 : L[0]);
105
105
  }
106
106
  );
107
- q ? w.value = q.uid : w.value = K.add(
107
+ u ? E.value = u.uid : E.value = P.add(
108
108
  { url: e.value.servers[0] },
109
109
  s.uid
110
110
  ).uid;
111
111
  }
112
- const i = G.add(
112
+ const R = K.add(
113
113
  {
114
114
  summary: o,
115
- path: r ? (c = e == null ? void 0 : e.value) == null ? void 0 : c.url : (S = e == null ? void 0 : e.value) == null ? void 0 : S.path,
116
- method: (m = e == null ? void 0 : e.value) == null ? void 0 : m.method,
115
+ path: r ? (c = e == null ? void 0 : e.value) == null ? void 0 : c.url : (m = e == null ? void 0 : e.value) == null ? void 0 : m.path,
116
+ method: (b = e == null ? void 0 : e.value) == null ? void 0 : b.method,
117
117
  parameters: (d = e == null ? void 0 : e.value) == null ? void 0 : d.parameters,
118
- selectedServerUid: r ? void 0 : w.value,
119
- requestBody: (y = e == null ? void 0 : e.value) == null ? void 0 : y.requestBody
118
+ selectedServerUid: r ? void 0 : E.value,
119
+ requestBody: (v = e == null ? void 0 : e.value) == null ? void 0 : v.requestBody
120
120
  },
121
121
  s.uid
122
122
  );
123
- i && ((M = f.value) != null && M.uid) && X.push(
124
- `/workspace/${f.value.uid}/request/${i.uid}`
125
- ), a.hide();
123
+ R && ((f = y.value) != null && f.uid) && Y.push(
124
+ `/workspace/${y.value.uid}/request/${R.uid}`
125
+ ), i.hide();
126
126
  }
127
- function oe(o) {
128
- e.value = ve(o), a.show();
127
+ function re(o) {
128
+ e.value = ve(o), i.show();
129
129
  }
130
130
  return (o, t) => {
131
131
  var s;
132
- return b(), ie(ne, null, [
133
- E("div", {
134
- class: H(["flex flex-1 flex-col pt-0 h-full bg-b-1 relative z-0 overflow-hidden", {
135
- "!mr-0 !mb-0 !border-0": u(k)
132
+ return x(), ie(ne, null, [
133
+ V("div", {
134
+ class: W(["flex flex-1 flex-col pt-0 h-full bg-b-1 relative z-0 overflow-hidden", {
135
+ "!mr-0 !mb-0 !border-0": l(w)
136
136
  }])
137
137
  }, [
138
- E("div", Ce, [
139
- u(Q) ? (b(), O(ke, {
138
+ V("div", Ce, [
139
+ l(J) ? (x(), C(ke, {
140
140
  key: 0,
141
- isSidebarOpen: l.value,
141
+ isSidebarOpen: a.value,
142
142
  onNewTab: t[0] || (t[0] = (r) => o.$emit("newTab", r)),
143
- "onUpdate:isSidebarOpen": t[1] || (t[1] = (r) => l.value = r)
144
- }, null, 8, ["isSidebarOpen"])) : V("", !0),
145
- E("div", Ne, [
146
- h(Se, {
147
- modelValue: l.value,
148
- "onUpdate:modelValue": t[2] || (t[2] = (r) => l.value = r),
149
- onHideModal: t[3] || (t[3] = () => u(a).hide()),
150
- onImportCurl: oe
143
+ "onUpdate:isSidebarOpen": t[1] || (t[1] = (r) => a.value = r)
144
+ }, null, 8, ["isSidebarOpen"])) : N("", !0),
145
+ V("div", Ne, [
146
+ U(Se, {
147
+ modelValue: a.value,
148
+ "onUpdate:modelValue": t[2] || (t[2] = (r) => a.value = r),
149
+ onHideModal: t[3] || (t[3] = () => l(i).hide()),
150
+ onImportCurl: re
151
151
  }, null, 8, ["modelValue"]),
152
- h(me, null, {
153
- default: W(() => [
154
- u(v) ? (b(), O(de, {
152
+ U(me, null, {
153
+ default: _(() => [
154
+ l(S) ? (x(), C(de, {
155
155
  key: 0,
156
- class: H(["flex-1", [l.value ? "sidebar-active-hide-layout" : ""]])
156
+ class: W(["flex-1", [a.value ? "sidebar-active-hide-layout" : ""]])
157
157
  }, {
158
- default: W(() => {
158
+ default: _(() => {
159
159
  var r;
160
160
  return [
161
- h(pe, { selectedSecuritySchemeUids: I.value }, null, 8, ["selectedSecuritySchemeUids"]),
162
- h(ye, {
163
- response: (r = Y.value) == null ? void 0 : r.response
161
+ U(pe, { selectedSecuritySchemeUids: D.value }, null, 8, ["selectedSecuritySchemeUids"]),
162
+ U(ye, {
163
+ response: (r = Z.value) == null ? void 0 : r.response
164
164
  }, null, 8, ["response"])
165
165
  ];
166
166
  }),
167
167
  _: 1
168
- }, 8, ["class"])) : V("", !0)
168
+ }, 8, ["class"])) : N("", !0)
169
169
  ]),
170
170
  _: 1
171
171
  })
172
172
  ])
173
173
  ])
174
174
  ], 2),
175
- e.value ? (b(), O(ce, {
175
+ e.value ? (x(), C(ce, {
176
176
  key: 0,
177
- collectionUid: ((s = u(x)) == null ? void 0 : s.uid) ?? "",
177
+ collectionUid: ((s = l(p)) == null ? void 0 : s.uid) ?? "",
178
178
  parsedCurl: e.value,
179
- state: u(a),
180
- onClose: t[4] || (t[4] = (r) => u(a).hide()),
181
- onImportCurl: te
182
- }, null, 8, ["collectionUid", "parsedCurl", "state"])) : V("", !0)
179
+ state: l(i),
180
+ onClose: t[4] || (t[4] = (r) => l(i).hide()),
181
+ onImportCurl: oe
182
+ }, null, 8, ["collectionUid", "parsedCurl", "state"])) : N("", !0)
183
183
  ], 64);
184
184
  };
185
185
  }
@@ -17,7 +17,7 @@ const K = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, A = {
17
17
  a.commandPalette.emit({ commandName: "Create Request" });
18
18
  }, y = (i) => {
19
19
  i != null && i.createNew && v.name === "request" && f();
20
- }, h = "2.2.23";
20
+ }, h = "2.2.24";
21
21
  return R(() => a.hotKeys.on(y)), C(() => a.hotKeys.off(y)), (i, e) => (r(), l("div", K, [
22
22
  o("div", {
23
23
  class: k(["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.2.23",
21
+ "version": "2.2.24",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -171,19 +171,19 @@
171
171
  "zod": "^3.23.8",
172
172
  "@scalar/components": "0.13.10",
173
173
  "@scalar/draggable": "0.1.8",
174
- "@scalar/import": "0.2.12",
175
174
  "@scalar/icons": "0.1.2",
176
- "@scalar/oas-utils": "0.2.92",
175
+ "@scalar/import": "0.2.13",
176
+ "@scalar/oas-utils": "0.2.93",
177
177
  "@scalar/openapi-parser": "0.10.2",
178
- "@scalar/openapi-types": "0.1.5",
179
178
  "@scalar/object-utils": "1.1.12",
179
+ "@scalar/openapi-types": "0.1.5",
180
180
  "@scalar/themes": "0.9.58",
181
- "@scalar/postman-to-openapi": "0.1.15",
182
- "@scalar/use-codemirror": "0.11.54",
183
- "@scalar/use-hooks": "0.1.11",
181
+ "@scalar/postman-to-openapi": "0.1.16",
184
182
  "@scalar/types": "0.0.25",
183
+ "@scalar/use-codemirror": "0.11.54",
185
184
  "@scalar/use-tooltip": "1.0.4",
186
- "@scalar/use-toasts": "0.7.7"
185
+ "@scalar/use-toasts": "0.7.7",
186
+ "@scalar/use-hooks": "0.1.11"
187
187
  },
188
188
  "devDependencies": {
189
189
  "@types/js-cookie": "^3.0.6",