@scalar/api-reference 1.25.68 → 1.25.69

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":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAyYA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;;cAJW,OAAO;WAFV,MAAM;aAGJ,OAAO;;AA0WrB,0BAQG"}
1
+ {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AA0YA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;;cAJW,OAAO;WAFV,MAAM;aAGJ,OAAO;;AA0WrB,0BAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaProperty.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-555aa6ba"]]);
3
+ import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7ebbc3d9"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Section.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/Section.vue"],"names":[],"mappings":"AAkFA,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAkCF,iBAAS,cAAc;WAkET,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAOnB,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,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Section.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/Section.vue"],"names":[],"mappings":"AAqFA,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAkCF,iBAAS,cAAc;WAoET,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAOnB,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,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Section.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-fc324287"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8687f476"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SectionContainer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/SectionContainer.vue"],"names":[],"mappings":"AA6BA,iBAAS,cAAc;WAwCT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAOD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SectionContainer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/SectionContainer.vue"],"names":[],"mappings":"AA6BA,iBAAS,cAAc;WAyCT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAOD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,12 +2,12 @@ import { openBlock as t, createElementBlock as o, renderSlot as n } from "vue";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const c = {}, s = { class: "section-container" };
5
- function i(e, a) {
5
+ function a(e, i) {
6
6
  return t(), o("div", s, [
7
7
  n(e.$slots, "default", {}, void 0, !0)
8
8
  ]);
9
9
  }
10
- const l = /* @__PURE__ */ r(c, [["render", i], ["__scopeId", "data-v-823b8471"]]);
10
+ const l = /* @__PURE__ */ r(c, [["render", a], ["__scopeId", "data-v-1913755a"]]);
11
11
  export {
12
12
  l as default
13
13
  };
@@ -1,7 +1,7 @@
1
1
  import r from "./ServerUrlSelect.vue2.js";
2
2
  /* empty css */
3
- import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ o(r, [["__scopeId", "data-v-03ffc8a3"]]);
3
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const c = /* @__PURE__ */ e(r, [["__scopeId", "data-v-6a8c344e"]]);
5
5
  export {
6
- a as default
6
+ c as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAMhD,eAAO,MAAM,KAAK,kBACD,GAAG,eAGf;IACD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,KACA,OAAO,CAAC,IAAI,CAmDd,CAAA"}
1
+ {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAMhD,eAAO,MAAM,KAAK,kBACD,GAAG,eAGf;IACD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,KACA,OAAO,CAAC,IAAI,CAyDd,CAAA"}
@@ -1,11 +1,11 @@
1
- import { redirectToProxy as b } from "@scalar/oas-utils/helpers";
1
+ import { redirectToProxy as R } from "@scalar/oas-utils/helpers";
2
2
  import { load as j, dereference as M } from "@scalar/openapi-parser";
3
3
  import { fetchUrls as q } from "@scalar/openapi-parser/plugins/fetch-urls";
4
4
  import { createEmptySpecification as m } from "./createEmptySpecification.js";
5
5
  import { normalizeRequestMethod as E } from "../legacy/helpers/normalizeRequestMethod.js";
6
- import { validRequestMethods as k } from "../legacy/fixtures/httpRequestMethods.js";
7
- const D = (p, {
8
- proxy: t
6
+ import { validRequestMethods as A } from "../legacy/fixtures/httpRequestMethods.js";
7
+ const z = (p, {
8
+ proxy: e
9
9
  } = {}) => new Promise(async (a, h) => {
10
10
  var s;
11
11
  try {
@@ -13,102 +13,105 @@ const D = (p, {
13
13
  return a(
14
14
  u(m())
15
15
  );
16
- const i = performance.now(), { filesystem: n } = await j(p, {
16
+ const o = performance.now(), { filesystem: n } = await j(p, {
17
17
  plugins: [
18
18
  q({
19
- fetch: (o) => fetch(t ? b(t, o) : o)
19
+ fetch: (i) => fetch(e ? R(e, i) : i)
20
20
  })
21
21
  ]
22
- }), { schema: e, errors: r } = await M(n), f = performance.now();
23
- return console.log(`dereference: ${Math.round(f - i)} ms`), r != null && r.length && console.warn(
22
+ }), { schema: t, errors: r } = await M(n), c = performance.now();
23
+ return console.log(`dereference: ${Math.round(c - o)} ms`), r != null && r.length && console.warn(
24
24
  `Please open an issue on https://github.com/scalar/scalar
25
25
  `,
26
26
  `Scalar OpenAPI Parser Warning:
27
27
  `,
28
28
  r
29
- ), e === void 0 ? (h(((s = r == null ? void 0 : r[0]) == null ? void 0 : s.message) ?? "Failed to parse the OpenAPI file."), a(
29
+ ), t === void 0 ? (h(((s = r == null ? void 0 : r[0]) == null ? void 0 : s.message) ?? "Failed to parse the OpenAPI file."), a(
30
30
  u(m())
31
- )) : a(u(e));
32
- } catch (i) {
33
- h(i);
31
+ )) : a(u(t));
32
+ } catch (o) {
33
+ console.error(
34
+ "[@scalar/api-reference]",
35
+ "Failed to parse the OpenAPI document. It might be invalid?"
36
+ ), console.error(o), h(o);
34
37
  }
35
38
  return a(
36
39
  u(m())
37
40
  );
38
41
  }), u = (p) => {
39
- let t = {};
40
- p && typeof p == "object" ? t = structuredClone(p) : t = m(), t.tags || (t.tags = []), t.paths || (t.paths = {});
42
+ let e = {};
43
+ p && typeof p == "object" ? e = structuredClone(p) : e = m(), e.tags || (e.tags = []), e.paths || (e.paths = {});
41
44
  const a = {};
42
- return Object.keys(t.webhooks ?? {}).forEach((s) => {
43
- var i;
44
- Object.keys(((i = t.webhooks) == null ? void 0 : i[s]) ?? {}).forEach((n) => {
45
- var r, f, o;
46
- const e = (r = t.webhooks) == null ? void 0 : r[s][n];
47
- (e == null ? void 0 : e["x-internal"]) !== !0 && (a[s] === void 0 && (a[s] = {}), a[s][n] = {
45
+ return Object.keys(e.webhooks ?? {}).forEach((s) => {
46
+ var o;
47
+ Object.keys(((o = e.webhooks) == null ? void 0 : o[s]) ?? {}).forEach((n) => {
48
+ var r, c, i;
49
+ const t = (r = e.webhooks) == null ? void 0 : r[s][n];
50
+ (t == null ? void 0 : t["x-internal"]) !== !0 && (a[s] === void 0 && (a[s] = {}), a[s][n] = {
48
51
  // Transformed data
49
52
  httpVerb: E(n),
50
53
  path: s,
51
- operationId: (e == null ? void 0 : e.operationId) || s,
52
- name: (e == null ? void 0 : e.summary) || s || "",
53
- description: (e == null ? void 0 : e.description) || "",
54
- pathParameters: (o = (f = t.paths) == null ? void 0 : f[s]) == null ? void 0 : o.parameters,
54
+ operationId: (t == null ? void 0 : t.operationId) || s,
55
+ name: (t == null ? void 0 : t.summary) || s || "",
56
+ description: (t == null ? void 0 : t.description) || "",
57
+ pathParameters: (i = (c = e.paths) == null ? void 0 : c[s]) == null ? void 0 : i.parameters,
55
58
  // Original webhook
56
59
  information: {
57
- ...e
60
+ ...t
58
61
  }
59
62
  });
60
63
  });
61
- }), Object.keys(t.paths).forEach((s) => {
62
- Object.keys(t.paths[s]).filter(
63
- (n) => k.includes(n.toUpperCase())
64
+ }), Object.keys(e.paths).forEach((s) => {
65
+ Object.keys(e.paths[s]).filter(
66
+ (n) => A.includes(n.toUpperCase())
64
67
  ).forEach((n) => {
65
- var f, o, g, w, y, x;
66
- const e = t.paths[s][n];
67
- if (e === void 0 || e["x-internal"] === !0)
68
+ var c, i, g, w, y, I;
69
+ const t = e.paths[s][n];
70
+ if (t === void 0 || t["x-internal"] === !0)
68
71
  return;
69
72
  const r = {
70
73
  httpVerb: E(n),
71
74
  path: s,
72
- operationId: e.operationId || s,
73
- name: e.summary || s || "",
74
- description: e.description || "",
75
+ operationId: t.operationId || s,
76
+ name: t.summary || s || "",
77
+ description: t.description || "",
75
78
  information: {
76
- ...e
79
+ ...t
77
80
  },
78
- pathParameters: (o = (f = t.paths) == null ? void 0 : f[s]) == null ? void 0 : o.parameters
81
+ pathParameters: (i = (c = e.paths) == null ? void 0 : c[s]) == null ? void 0 : i.parameters
79
82
  };
80
- if (!e.tags || e.tags.length === 0) {
81
- (g = t.tags) != null && g.find(
82
- (c) => c.name === "default"
83
- ) || (w = t.tags) == null || w.push({
83
+ if (!t.tags || t.tags.length === 0) {
84
+ (g = e.tags) != null && g.find(
85
+ (f) => f.name === "default"
86
+ ) || (w = e.tags) == null || w.push({
84
87
  name: "default",
85
88
  description: "",
86
89
  operations: []
87
90
  });
88
- const d = (y = t.tags) == null ? void 0 : y.findIndex(
89
- (c) => c.name === "default"
91
+ const d = (y = e.tags) == null ? void 0 : y.findIndex(
92
+ (f) => f.name === "default"
90
93
  );
91
- d >= 0 && ((x = t.tags[d]) == null || x.operations.push(r));
94
+ d >= 0 && ((I = e.tags[d]) == null || I.operations.push(r));
92
95
  } else
93
- e.tags.forEach((d) => {
94
- var I, O, P;
95
- const c = (I = t.tags) == null ? void 0 : I.findIndex(
96
+ t.tags.forEach((d) => {
97
+ var O, x, P;
98
+ const f = (O = e.tags) == null ? void 0 : O.findIndex(
96
99
  // @ts-expect-error TODO: The types are just screwed, needs refactoring
97
- (R) => R.name === d
100
+ (b) => b.name === d
98
101
  );
99
- c === -1 && ((O = t.tags) == null || O.push({
102
+ f === -1 && ((x = e.tags) == null || x.push({
100
103
  name: d,
101
104
  description: ""
102
105
  }));
103
- const l = c !== -1 ? c : t.tags.length - 1;
104
- typeof ((P = t.tags[l]) == null ? void 0 : P.operations) > "u" && (t.tags[l].operations = []), t.tags[l].operations.push(r);
106
+ const l = f !== -1 ? f : e.tags.length - 1;
107
+ typeof ((P = e.tags[l]) == null ? void 0 : P.operations) > "u" && (e.tags[l].operations = []), e.tags[l].operations.push(r);
105
108
  });
106
109
  });
107
110
  }), {
108
- ...t,
111
+ ...e,
109
112
  webhooks: a
110
113
  };
111
114
  };
112
115
  export {
113
- D as parse
116
+ z as parse
114
117
  };