@scalar/api-reference 1.25.93 → 1.25.95

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":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AAioBA,OAAO,EACL,KAAK,OAAO,EAGb,MAAM,gBAAgB,CAAA;AA4BvB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,UAAU,CAAA;AAOjB,KAAK,WAAW,GAAG,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;AAuRxD,iBAAS,cAAc;WAoPT,OAAO,IAA6B;;wBAtfZ,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;;;;;EA2f/D;AAuBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;YApiBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFA2iB9D,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,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out.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../_virtual/_plugin-vue_export-helper.js";
5
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4fe5c650"]]);
5
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2bc622ac"]]);
6
6
  export {
7
- m as default
7
+ c as default
8
8
  };
@@ -125,13 +125,14 @@ const Ge = ["innerHTML"], Ke = { class: "references-header" }, Qe = {
125
125
  () => o.rawSpec,
126
126
  (e) => {
127
127
  var t;
128
- return T.importSpecFile(e, "default", {
128
+ return e && T.importSpecFile(e, "default", {
129
129
  shouldLoad: !1,
130
130
  documentUrl: (t = o.configuration.spec) == null ? void 0 : t.url,
131
131
  setCollectionSecurity: !0,
132
132
  ...o.configuration
133
133
  });
134
- }
134
+ },
135
+ { immediate: !0 }
135
136
  ), p(ye, T);
136
137
  const oe = Te(T);
137
138
  p(we, oe), p(
@@ -9,7 +9,7 @@ export declare const useRequestExample: ({ operation, collection, requests, requ
9
9
  requests: WorkspaceStore["requests"];
10
10
  requestExamples: WorkspaceStore["requestExamples"];
11
11
  securitySchemes: WorkspaceStore["securitySchemes"];
12
- server: ComputedRef<Server>;
12
+ server: ComputedRef<Server | undefined>;
13
13
  }) => {
14
14
  request: ComputedRef<Request | null>;
15
15
  secretCredentials: ComputedRef<string[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"useRequestExample.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/hooks/useRequestExample.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,KAAK,WAAW,EAAY,MAAM,KAAK,CAAA;AAKhD,qGAAqG;AACrG,eAAO,MAAM,iBAAiB,mFAO3B;IACD,SAAS,EAAE,oBAAoB,CAAA;IAC/B,UAAU,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAC/C,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;IACpC,eAAe,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAA;IAClD,eAAe,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAA;IAClD,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAC5B;;;CAsGA,CAAA"}
1
+ {"version":3,"file":"useRequestExample.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/hooks/useRequestExample.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,KAAK,WAAW,EAAY,MAAM,KAAK,CAAA;AAMhD,qGAAqG;AACrG,eAAO,MAAM,iBAAiB,mFAO3B;IACD,SAAS,EAAE,oBAAoB,CAAA;IAC/B,UAAU,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAC/C,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;IACpC,eAAe,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAA;IAClD,eAAe,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAA;IAClD,MAAM,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CACxC;;;CA4GA,CAAA"}
@@ -1,46 +1,50 @@
1
- import { getRequest as j } from "../../../helpers/get-request.js";
2
- import { createRequestOperation as k } from "@scalar/api-client/libs";
3
- import { computed as a } from "vue";
4
- import { getUrlFromServerState as x } from "../../../legacy/helpers/getUrlFromServerState.js";
5
- import { useServerStore as R } from "../../../legacy/stores/useServerStore.js";
6
- const { server: w } = R(), T = ({
7
- operation: p,
1
+ import { getRequest as k } from "../../../helpers/get-request.js";
2
+ import { createRequestOperation as x } from "@scalar/api-client/libs";
3
+ import { computed as u } from "vue";
4
+ import { getUrlFromServerState as R } from "../../../legacy/helpers/getUrlFromServerState.js";
5
+ import { useServerStore as w } from "../../../legacy/stores/useServerStore.js";
6
+ const { server: K } = w(), V = ({
7
+ operation: i,
8
8
  collection: d,
9
9
  requests: y,
10
10
  requestExamples: q,
11
11
  securitySchemes: m,
12
- server: b
12
+ server: S
13
13
  }) => {
14
- const i = a(
15
- () => j(y, p.path, p.httpVerb)
16
- ), v = a(() => {
17
- var u, n, o, l;
18
- const t = ((u = i.value) == null ? void 0 : u.security) ?? ((n = d.value) == null ? void 0 : n.security) ?? [], r = t.filter(
19
- (s) => Object.keys(s).length
20
- ), e = r.map((s) => Object.keys(s)[0]);
21
- if (r.length < t.length)
22
- return ((o = d.value) == null ? void 0 : o.selectedSecuritySchemeUids) ?? [];
14
+ const c = u(
15
+ () => k(y, i.path, i.httpVerb)
16
+ ), v = u(() => {
17
+ var r, o, l, a;
18
+ const t = ((r = c.value) == null ? void 0 : r.security) ?? ((o = d.value) == null ? void 0 : o.security) ?? [], s = t.filter(
19
+ (n) => Object.keys(n).length
20
+ ), e = s.map((n) => Object.keys(n)[0]);
21
+ if (s.length < t.length)
22
+ return ((l = d.value) == null ? void 0 : l.selectedSecuritySchemeUids) ?? [];
23
23
  {
24
- const s = Object.values(m), O = e.map((f) => {
25
- var c;
26
- return (c = s.find((U) => U.nameKey === f)) == null ? void 0 : c.uid;
24
+ const n = Object.values(m), O = e.map((f) => {
25
+ var p;
26
+ return (p = n.find((j) => j.nameKey === f)) == null ? void 0 : p.uid;
27
27
  }).filter(Boolean);
28
- return (l = d.value) == null ? void 0 : l.selectedSecuritySchemeUids.filter(
29
- (f) => O.find((c) => c === f)
28
+ return (a = d.value) == null ? void 0 : a.selectedSecuritySchemeUids.filter(
29
+ (f) => O.find((p) => p === f)
30
30
  );
31
31
  }
32
- }), h = a(() => {
33
- const t = b.value, { modifiedUrl: r } = x(w, t);
32
+ }), b = u(() => {
33
+ var e, r;
34
+ const t = (r = (e = i.information) == null ? void 0 : e.servers) == null ? void 0 : r[0], { modifiedUrl: s } = R(K, t);
35
+ return s;
36
+ }), h = u(() => {
37
+ const t = S.value;
34
38
  return {
35
39
  uid: (t == null ? void 0 : t.uid) || "",
36
- url: r || ""
40
+ url: b.value || ""
37
41
  };
38
- }), S = a(() => {
39
- var n, o, l, s;
40
- const t = q[((o = (n = i.value) == null ? void 0 : n.examples) == null ? void 0 : o[0]) ?? ""];
41
- if (!i.value || !t) return null;
42
- const [r, e] = k({
43
- request: i.value,
42
+ }), U = u(() => {
43
+ var o, l, a, n;
44
+ const t = q[((l = (o = c.value) == null ? void 0 : o.examples) == null ? void 0 : l[0]) ?? ""];
45
+ if (!c.value || !t) return null;
46
+ const [s, e] = x({
47
+ request: c.value,
44
48
  example: t,
45
49
  server: h.value,
46
50
  securitySchemes: m,
@@ -50,27 +54,27 @@ const { server: w } = R(), T = ({
50
54
  // TODO: cookies if we want em
51
55
  globalCookies: []
52
56
  });
53
- if (r)
54
- return console.error("[useRequestExample]", r), null;
55
- const u = Object.keys(
56
- ((s = (l = p.information) == null ? void 0 : l.requestBody) == null ? void 0 : s.content) ?? {}
57
+ if (s)
58
+ return console.error("[useRequestExample]", s), null;
59
+ const r = Object.keys(
60
+ ((n = (a = i.information) == null ? void 0 : a.requestBody) == null ? void 0 : n.content) ?? {}
57
61
  );
58
- return e.request.headers.get("content-type") === "text/plain;charset=UTF-8" && u.length && e.request.headers.set("content-type", u[0]), e.request;
59
- }), g = a(
62
+ return e.request.headers.get("content-type") === "text/plain;charset=UTF-8" && r.length && e.request.headers.set("content-type", r[0]), e.request;
63
+ }), g = u(
60
64
  () => {
61
65
  var t;
62
- return ((t = v.value) == null ? void 0 : t.flatMap((r) => {
63
- const e = m[r];
66
+ return ((t = v.value) == null ? void 0 : t.flatMap((s) => {
67
+ const e = m[s];
64
68
  return (e == null ? void 0 : e.type) === "apiKey" ? e.value : (e == null ? void 0 : e.type) === "http" ? [
65
69
  e.token,
66
70
  e.password,
67
71
  btoa(`${e.username}:${e.password}`)
68
- ] : (e == null ? void 0 : e.type) === "oauth2" ? Object.values(e.flows).map((u) => u.token) : [];
72
+ ] : (e == null ? void 0 : e.type) === "oauth2" ? Object.values(e.flows).map((r) => r.token) : [];
69
73
  })) ?? [];
70
74
  }
71
75
  );
72
- return { request: S, secretCredentials: g };
76
+ return { request: U, secretCredentials: g };
73
77
  };
74
78
  export {
75
- T as useRequestExample
79
+ V as useRequestExample
76
80
  };