@scalar/api-client 2.19.1 → 2.19.2

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 CHANGED
@@ -1,5 +1,30 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.19.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#7848](https://github.com/scalar/scalar/pull/7848): fix: allow multiple security requirements with different scopes
8
+ - [#7852](https://github.com/scalar/scalar/pull/7852): fix: enable form rows by default
9
+
10
+ #### Updated Dependencies
11
+
12
+ - **@scalar/snippetz@0.6.6**
13
+ - [#7859](https://github.com/scalar/scalar/pull/7859): fix the use of httpx.AsyncClient async context manager
14
+
15
+ - **@scalar/components@0.16.26**
16
+ - [#7846](https://github.com/scalar/scalar/pull/7846): Fix dev dep issue
17
+
18
+ - **@scalar/workspace-store@0.25.2**
19
+
20
+ - **@scalar/openapi-parser@0.24.3**
21
+
22
+ - **@scalar/sidebar@0.7.16**
23
+
24
+ - **@scalar/use-codemirror@0.13.20**
25
+
26
+ - **@scalar/oas-utils@0.6.23**
27
+
3
28
  ## 2.19.1
4
29
 
5
30
  ### Patch Changes
@@ -23,7 +23,7 @@ const D = /* @__PURE__ */ f({
23
23
  if (t >= e.value.length) {
24
24
  e.value = [
25
25
  ...e.value,
26
- { name: "", value: "", isDisabled: !1, ...o }
26
+ { name: "", value: "", ...o, isDisabled: !1 }
27
27
  ], u("update:formValue", e.value);
28
28
  return;
29
29
  }
@@ -1,7 +1,7 @@
1
1
  import { canMethodHaveBody as p } from "@scalar/helpers/http/can-method-have-body";
2
2
  import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
3
  import { isElectron as u } from "../../../../libs/electron.js";
4
- const i = "2.19.1", m = "application/json", h = "*/*", c = (r, t, a) => ({
4
+ const i = "2.19.2", m = "application/json", h = "*/*", c = (r, t, a) => ({
5
5
  name: r,
6
6
  defaultValue: t,
7
7
  isOverridden: a.has(r.toLowerCase())
@@ -6,8 +6,6 @@ import { type SecuritySchemeOption } from '../../../../v2/blocks/scalar-auth-sel
6
6
  type __VLS_Props = {
7
7
  environment: XScalarEnvironment;
8
8
  eventBus: WorkspaceEventBus;
9
- /** Whether we can add or delete auth schemes */
10
- isReadOnly?: boolean;
11
9
  /** Creates a static disclosure that cannot be collapsed */
12
10
  isStatic?: boolean;
13
11
  meta: AuthMeta;
@@ -1 +1 @@
1
- {"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAoTA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAKvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;;cA+BqC,IAAI;cAAQ,MAAM;;;;;AA6bzD,wBAOG"}
1
+ {"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAiTA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAKvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;;cA8BqC,IAAI;cAAQ,MAAM;;;;;AA6bzD,wBAOG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as U, useId as $, ref as x, computed as p, createBlock as S, openBlock as c, unref as s, withCtx as r, createVNode as m, createCommentVNode as b, createElementBlock as y, Fragment as g, createElementVNode as u, createTextVNode as k, toDisplayString as v, withModifiers as q, normalizeClass as M } from "vue";
1
+ import { defineComponent as U, useId as $, ref as p, computed as x, createBlock as S, openBlock as c, unref as s, withCtx as r, createVNode as m, createCommentVNode as b, createElementBlock as v, Fragment as g, createElementVNode as u, createTextVNode as k, toDisplayString as y, withModifiers as q, normalizeClass as M } from "vue";
2
2
  import { useModal as N, ScalarComboboxMultiselect as T, ScalarButton as j, ScalarListboxCheckbox as z, ScalarIconButton as E } from "@scalar/components";
3
3
  import { ScalarIconCaretDown as L, ScalarIconTrash as P } from "@scalar/icons";
4
4
  import { getResolvedRef as F } from "@scalar/workspace-store/helpers/get-resolved-ref";
@@ -13,7 +13,6 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
13
13
  props: {
14
14
  environment: {},
15
15
  eventBus: {},
16
- isReadOnly: { type: Boolean, default: !1 },
17
16
  isStatic: { type: Boolean, default: !1 },
18
17
  meta: {},
19
18
  proxyUrl: {},
@@ -24,7 +23,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
24
23
  title: {}
25
24
  },
26
25
  setup(e, { expose: I }) {
27
- const O = $(), C = x(null), B = x(!1), d = N(), o = x(null), h = p(() => {
26
+ const C = $(), B = p(null), O = p(!1), d = N(), o = p(null), h = x(() => {
28
27
  if (!e.securityRequirements?.length)
29
28
  return null;
30
29
  const l = J(e.securityRequirements);
@@ -32,13 +31,13 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
32
31
  icon: l ? "Unlock" : "Lock",
33
32
  text: l ? "Optional" : "Required"
34
33
  };
35
- }), R = p(
34
+ }), R = x(
36
35
  () => K(
37
36
  e.securityRequirements ?? [],
38
37
  e.securitySchemes ?? {},
39
- e.isReadOnly
38
+ e.selectedSecurity?.selectedSchemes ?? []
40
39
  )
41
- ), i = p(() => {
40
+ ), i = x(() => {
42
41
  const l = e.selectedSecurity?.selectedSchemes;
43
42
  return l?.length ? l.flatMap((t) => {
44
43
  const n = Object.keys(t);
@@ -57,7 +56,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
57
56
  }) : [];
58
57
  }) : [];
59
58
  }), w = (l) => {
60
- B.value && l.stopPropagation(), C.value?.$el.click();
59
+ O.value && l.stopPropagation(), B.value?.$el.click();
61
60
  }, A = (l) => {
62
61
  const t = l.filter((a) => a.payload === void 0).map((a) => G(a.value, { depth: 2 })), n = l.filter((a) => a.payload !== void 0).map((a) => ({
63
62
  name: a.label,
@@ -83,20 +82,20 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
83
82
  class: "group/params relative",
84
83
  isStatic: e.isStatic,
85
84
  itemCount: i.value.length,
86
- "onUpdate:modelValue": t[1] || (t[1] = (n) => B.value = n)
85
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => O.value = n)
87
86
  }, {
88
87
  title: r(() => [
89
88
  u("div", {
90
- id: s(O),
89
+ id: s(C),
91
90
  class: "inline-flex items-center gap-0.5 leading-[20px]"
92
91
  }, [
93
- u("span", null, v(e.title), 1),
94
- h.value ? (c(), y("span", {
92
+ u("span", null, y(e.title), 1),
93
+ h.value ? (c(), v("span", {
95
94
  key: 0,
96
95
  class: M(["text-c-3 hover:bg-b-3 hover:text-c-1 -mr-1 cursor-pointer rounded px-1 py-0.5 text-xs leading-[normal]", { "text-c-1": h.value.text === "Required" }]),
97
96
  "data-testid": "auth-indicator",
98
97
  onClick: w
99
- }, v(h.value.text), 3)) : b("", !0)
98
+ }, y(h.value.text), 3)) : b("", !0)
100
99
  ], 8, Z)
101
100
  ]),
102
101
  actions: r(() => [
@@ -115,8 +114,8 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
115
114
  multiselect: "",
116
115
  selected: a
117
116
  }, null, 8, ["selected"]),
118
- u("div", _, v(n.label), 1),
119
- n.isDeletable ?? !e.isReadOnly ? (c(), S(s(E), {
117
+ u("div", _, y(n.label), 1),
118
+ n.isDeletable ? (c(), S(s(E), {
120
119
  key: 0,
121
120
  class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
122
121
  icon: s(P),
@@ -128,19 +127,19 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
128
127
  default: r(() => [
129
128
  m(s(j), {
130
129
  ref_key: "comboboxButtonRef",
131
- ref: C,
132
- "aria-describedby": s(O),
130
+ ref: B,
131
+ "aria-describedby": s(C),
133
132
  class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit w-full items-center gap-1 px-0.75 py-0.25 text-base font-normal",
134
133
  variant: "ghost"
135
134
  }, {
136
135
  default: r(() => [
137
- i.value.length === 1 ? (c(), y(g, { key: 0 }, [
136
+ i.value.length === 1 ? (c(), v(g, { key: 0 }, [
138
137
  t[2] || (t[2] = u("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
139
- k(" " + v(i.value[0]?.label), 1)
140
- ], 64)) : i.value.length > 1 ? (c(), y(g, { key: 1 }, [
138
+ k(" " + y(i.value[0]?.label), 1)
139
+ ], 64)) : i.value.length > 1 ? (c(), v(g, { key: 1 }, [
141
140
  t[3] || (t[3] = k(" Multiple ", -1)),
142
141
  t[4] || (t[4] = u("span", { class: "sr-only" }, "Auth Types Selected", -1))
143
- ], 64)) : (c(), y(g, { key: 2 }, [
142
+ ], 64)) : (c(), v(g, { key: 2 }, [
144
143
  t[5] || (t[5] = u("span", { class: "sr-only" }, "Select", -1)),
145
144
  t[6] || (t[6] = k(" Auth Type ", -1))
146
145
  ], 64)),
@@ -1,5 +1,23 @@
1
1
  import type { ComponentsObject, OpenApiDocument, SecurityRequirementObject, SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
- /** Format a scheme object into a display object */
2
+ /** A single security scheme option used in the auth dropdown */
3
+ export type SecuritySchemeOption = {
4
+ id: string;
5
+ label: string;
6
+ value: SecurityRequirementObject;
7
+ isDeletable?: boolean;
8
+ payload?: SecuritySchemeObject;
9
+ };
10
+ /** A group of security scheme options used in the auth dropdown */
11
+ export type SecuritySchemeGroup = {
12
+ label: string;
13
+ options: SecuritySchemeOption[];
14
+ };
15
+ /**
16
+ * Format a scheme object into a display object
17
+ *
18
+ * We also add a hash to the id to ensure it is unique across
19
+ * multiple requirements of the same scheme with different scopes
20
+ */
3
21
  export declare const formatScheme: ({ name, type, value, }: {
4
22
  name: string;
5
23
  type: SecuritySchemeObject["type"] | "complex";
@@ -8,28 +26,21 @@ export declare const formatScheme: ({ name, type, value, }: {
8
26
  id: string;
9
27
  label: string;
10
28
  value: Partial<Record<string, string[]>>;
29
+ isDeletable: boolean;
11
30
  };
12
31
  /** Formats complex security schemes */
13
32
  export declare const formatComplexScheme: (scheme: NonNullable<OpenApiDocument["security"]>[number]) => {
14
33
  id: string;
15
34
  label: string;
16
35
  value: Partial<Record<string, string[]>>;
17
- };
18
- export type SecuritySchemeOption = {
19
- id: string;
20
- label: string;
21
- value: SecurityRequirementObject;
22
- isDeletable?: boolean;
23
- payload?: SecuritySchemeObject;
24
- };
25
- export type SecuritySchemeGroup = {
26
- label: string;
27
- options: SecuritySchemeOption[];
36
+ isDeletable: boolean;
28
37
  };
29
38
  /**
30
39
  * Generates the options for the security scheme combobox
31
40
  *
32
- * contains either a flat list, or different groups of required, available, and add new
41
+ * Contains either a flat list, or different groups of required, available, and add new
33
42
  */
34
- export declare const getSecuritySchemeOptions: (security: NonNullable<OpenApiDocument["security"]>, securitySchemes: NonNullable<ComponentsObject["securitySchemes"]>, isReadOnly?: boolean) => SecuritySchemeOption[] | SecuritySchemeGroup[];
43
+ export declare const getSecuritySchemeOptions: (security: NonNullable<OpenApiDocument["security"]>, securitySchemes: NonNullable<ComponentsObject["securitySchemes"]>,
44
+ /** We need to add the selected schemes if they do not already exist in the calculated options */
45
+ selectedSchemes: SecurityRequirementObject[]) => SecuritySchemeOption[] | SecuritySchemeGroup[];
35
46
  //# sourceMappingURL=security-scheme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAIrE,mDAAmD;AACnD,eAAO,MAAM,YAAY,GAAI,wBAI1B;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IAC9C,KAAK,EAAE,yBAAyB,CAAA;CACjC;;;;CAIC,CAAA;AAEF,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,GAAI,QAAQ,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;;;;CASzF,CAAA;AAEH,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,yBAAyB,CAAA;IAChC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAClD,iBAAiB,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,EACjE,aAAY,OAAe,KAC1B,oBAAoB,EAAE,GAAG,mBAAmB,EA6D9C,CAAA"}
1
+ {"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAIrE,gEAAgE;AAChE,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,yBAAyB,CAAA;IAChC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AAED,mEAAmE;AACnE,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,wBAI1B;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IAC9C,KAAK,EAAE,yBAAyB,CAAA;CACjC;;;;;CAKC,CAAA;AAEF,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,GAAI,QAAQ,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;CAKxF,CAAA;AA6BJ;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAClD,iBAAiB,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;AACjE,iGAAiG;AACjG,iBAAiB,yBAAyB,EAAE,KAC3C,oBAAoB,EAAE,GAAG,mBAAmB,EAsE9C,CAAA"}
@@ -1,52 +1,72 @@
1
- import { isDefined as u } from "@scalar/oas-utils/helpers";
2
- import { getResolvedRef as c } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
- import { authOptions as d } from "./auth-options.js";
4
- const l = ({
1
+ import { generateHash as h } from "@scalar/helpers/string/generate-hash";
2
+ import { getResolvedRef as p } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
+ import { authOptions as b } from "./auth-options.js";
4
+ const m = ({
5
5
  name: o,
6
- type: n,
7
- value: i
6
+ type: i,
7
+ value: n
8
8
  }) => ({
9
- id: o,
10
- label: n === "openIdConnect" ? `${o} (coming soon)` : o,
11
- value: i
12
- }), m = (o) => l(
13
- Object.keys(o).reduce(
14
- (n, i, r) => (n.name += `${r > 0 ? " & " : ""}${i}`, n),
15
- { type: "complex", name: "", value: o }
16
- )
17
- ), v = (o, n, i = !1) => {
18
- {
19
- const r = o.map((e) => {
20
- const t = Object.keys(e);
21
- if (t.length > 1)
22
- return m(e);
23
- if (t[0]) {
24
- const p = c(n[t[0]]);
25
- return p ? l({ name: t[0], type: p.type, value: e }) : void 0;
26
- }
27
- }).filter(u), s = Object.keys(n).filter((e) => !r.some((t) => t.id === e)).map((e) => {
28
- const t = c(n[e]);
29
- if (t)
30
- return l({ name: e, type: t.type, value: { [e]: [] } });
31
- }).filter(u), a = [
32
- { label: "Required authentication", options: r },
33
- { label: "Available authentication", options: s }
34
- ];
35
- return i ? r.length ? a : s : (a.push({
36
- label: "Add new authentication",
37
- options: Object.entries(d).map(([e, t]) => ({
38
- id: `@unique/${e}`,
39
- label: t.label,
40
- value: { [e]: [] },
41
- payload: t.payload,
42
- // Disable deleting built-in options
43
- isDeletable: !1
44
- }))
45
- }), a);
9
+ id: h(JSON.stringify(n)),
10
+ label: i === "openIdConnect" ? `${o} (coming soon)` : o,
11
+ value: n,
12
+ isDeletable: !0
13
+ }), y = (o) => m({
14
+ type: "complex",
15
+ name: Object.keys(o).join(" & "),
16
+ value: o
17
+ }), f = (o, i) => {
18
+ const n = Object.keys(o);
19
+ if (n.length > 1)
20
+ return y(o);
21
+ if (n[0]) {
22
+ const s = p(i[n[0]]);
23
+ return s ? m({ name: n[0], type: s.type, value: o }) : void 0;
46
24
  }
25
+ }, v = (o, i, n) => {
26
+ const { requiredFormatted: s, requiredSchemeNames: u, existingIds: d } = o.reduce(
27
+ (e, t) => {
28
+ const a = f(t, i);
29
+ a && (e.requiredFormatted.push(a), e.existingIds.add(a.id));
30
+ for (const r of Object.keys(t))
31
+ e.requiredSchemeNames.add(r);
32
+ return e;
33
+ },
34
+ {
35
+ requiredFormatted: [],
36
+ requiredSchemeNames: /* @__PURE__ */ new Set(),
37
+ existingIds: /* @__PURE__ */ new Set()
38
+ }
39
+ ), c = [];
40
+ for (const [e, t] of Object.entries(i)) {
41
+ if (u.has(e))
42
+ continue;
43
+ const a = p(t);
44
+ if (a) {
45
+ const r = m({ name: e, type: a.type, value: { [e]: [] } });
46
+ c.push(r), d.add(r.id);
47
+ }
48
+ }
49
+ for (const e of n) {
50
+ const t = f(e, i);
51
+ t && !d.has(t.id) && (c.push(t), d.add(t.id));
52
+ }
53
+ const l = [
54
+ { label: "Required authentication", options: s },
55
+ { label: "Available authentication", options: c }
56
+ ];
57
+ return l.push({
58
+ label: "Add new authentication",
59
+ options: Object.entries(b).map(([e, t]) => ({
60
+ id: e,
61
+ label: t.label,
62
+ value: { [e]: [] },
63
+ payload: t.payload,
64
+ isDeletable: !1
65
+ }))
66
+ }), l;
47
67
  };
48
68
  export {
49
- m as formatComplexScheme,
50
- l as formatScheme,
69
+ y as formatComplexScheme,
70
+ m as formatScheme,
51
71
  v as getSecuritySchemeOptions
52
72
  };
@@ -55,7 +55,7 @@ const B = {
55
55
  method: e.method ?? "get"
56
56
  } : {
57
57
  type: "document"
58
- }), d = "2.19.1";
58
+ }), d = "2.19.2";
59
59
  return (t, n) => e.path && e.method && e.exampleName && o.value ? (c(), y(u(g), {
60
60
  key: 0,
61
61
  appVersion: u(d),
@@ -33,7 +33,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
33
33
  }));
34
34
  }, f = (u) => {
35
35
  u?.createNew && g.name === "request" && p();
36
- }, v = "2.19.1";
36
+ }, v = "2.19.2";
37
37
  return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (u, e) => (l(), n("div", W, [
38
38
  s("div", {
39
39
  class: y(["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.19.1",
21
+ "version": "2.19.2",
22
22
  "engines": {
23
23
  "node": ">=20"
24
24
  },
@@ -317,8 +317,8 @@
317
317
  "js-base64": "^3.7.8",
318
318
  "microdiff": "^1.5.0",
319
319
  "nanoid": "^5.1.6",
320
- "pretty-bytes": "^6.1.1",
321
- "pretty-ms": "^8.0.0",
320
+ "pretty-bytes": "^7.1.0",
321
+ "pretty-ms": "^9.3.0",
322
322
  "shell-quote": "^1.8.1",
323
323
  "type-fest": "^5.3.1",
324
324
  "vue": "^3.5.26",
@@ -326,26 +326,26 @@
326
326
  "whatwg-mimetype": "^4.0.0",
327
327
  "yaml": "^2.8.0",
328
328
  "zod": "^4.3.5",
329
+ "@scalar/analytics-client": "1.0.1",
329
330
  "@scalar/draggable": "0.3.0",
330
- "@scalar/components": "0.16.25",
331
+ "@scalar/components": "0.16.26",
331
332
  "@scalar/helpers": "0.2.8",
332
- "@scalar/analytics-client": "1.0.1",
333
333
  "@scalar/icons": "0.5.2",
334
- "@scalar/import": "0.4.45",
335
334
  "@scalar/json-magic": "0.9.2",
335
+ "@scalar/oas-utils": "0.6.23",
336
336
  "@scalar/object-utils": "1.2.22",
337
- "@scalar/oas-utils": "0.6.22",
337
+ "@scalar/openapi-parser": "0.24.3",
338
338
  "@scalar/openapi-types": "0.5.3",
339
- "@scalar/openapi-parser": "0.24.2",
340
339
  "@scalar/postman-to-openapi": "0.4.0",
341
- "@scalar/sidebar": "0.7.15",
342
- "@scalar/snippetz": "0.6.5",
340
+ "@scalar/import": "0.4.45",
341
+ "@scalar/sidebar": "0.7.16",
342
+ "@scalar/use-codemirror": "0.13.20",
343
+ "@scalar/snippetz": "0.6.6",
343
344
  "@scalar/themes": "0.13.26",
344
- "@scalar/types": "0.5.8",
345
- "@scalar/use-codemirror": "0.13.19",
346
345
  "@scalar/use-toasts": "0.9.1",
347
346
  "@scalar/use-hooks": "0.3.6",
348
- "@scalar/workspace-store": "0.25.1"
347
+ "@scalar/workspace-store": "0.25.2",
348
+ "@scalar/types": "0.5.8"
349
349
  },
350
350
  "devDependencies": {
351
351
  "@tailwindcss/vite": "^4.1.18",