@scalar/api-client 2.1.52 → 2.2.0

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 (190) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue2.js +35 -42
  5. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  7. package/dist/components/AddressBar/AddressBarHistory.vue2.js +25 -24
  8. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  9. package/dist/components/AddressBar/AddressBarServer.vue.js +32 -39
  10. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
  11. package/dist/components/AddressBar/AddressBarServerItem.vue.js +10 -15
  12. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  13. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  14. package/dist/components/CodeInput/CodeInput.vue2.js +48 -47
  15. package/dist/components/CodeInput/codeVariableWidget.d.ts +3 -2
  16. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  17. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  18. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +15 -14
  19. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  20. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +18 -23
  21. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  22. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +27 -26
  23. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  24. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +19 -20
  25. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
  26. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +19 -24
  27. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
  28. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +23 -22
  29. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  30. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  31. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +47 -46
  32. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  33. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  34. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  35. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +23 -28
  36. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  37. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  38. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +127 -96
  39. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  40. package/dist/components/ImportCollection/ImportNowButton.vue.js +28 -27
  41. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +1 -1
  42. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
  43. package/dist/components/ImportCollection/IntegrationLogo.vue.js +14 -18
  44. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  45. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -14
  46. package/dist/components/Search/useSearch.d.ts.map +1 -1
  47. package/dist/components/Search/useSearch.js +20 -19
  48. package/dist/components/SideNav/SideNavRouterLink.vue.js +9 -9
  49. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  50. package/dist/components/TopNav/TopNav.vue.js +1 -1
  51. package/dist/components/TopNav/TopNav.vue2.js +20 -19
  52. package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
  53. package/dist/hooks/index.js +3 -2
  54. package/dist/hooks/useLayout.d.ts +2 -0
  55. package/dist/hooks/useLayout.d.ts.map +1 -1
  56. package/dist/hooks/useLayout.js +4 -3
  57. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  58. package/dist/layouts/App/ApiClientApp.vue.js +38 -37
  59. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
  60. package/dist/layouts/App/MainLayout.vue.js +3 -3
  61. package/dist/layouts/App/create-api-client-app.d.ts +669 -1232
  62. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  63. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  64. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  65. package/dist/layouts/Modal/ApiClientModal.vue2.js +24 -23
  66. package/dist/layouts/Modal/create-api-client-modal.d.ts +1382 -2508
  67. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  68. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  69. package/dist/layouts/Web/ApiClientWeb.vue.js +34 -33
  70. package/dist/layouts/Web/create-api-client-web.d.ts +669 -1232
  71. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  72. package/dist/libs/create-client.d.ts +673 -1236
  73. package/dist/libs/create-client.d.ts.map +1 -1
  74. package/dist/libs/create-client.js +91 -102
  75. package/dist/libs/hot-keys.d.ts +1 -1
  76. package/dist/libs/send-request.d.ts +2 -3
  77. package/dist/libs/send-request.d.ts.map +1 -1
  78. package/dist/libs/send-request.js +127 -123
  79. package/dist/store/active-entities.d.ts +333 -0
  80. package/dist/store/active-entities.d.ts.map +1 -0
  81. package/dist/store/active-entities.js +97 -0
  82. package/dist/store/collections.d.ts +4 -274
  83. package/dist/store/collections.d.ts.map +1 -1
  84. package/dist/store/cookies.d.ts +4 -4
  85. package/dist/store/environment.d.ts +4 -4
  86. package/dist/store/import-spec.d.ts +0 -54
  87. package/dist/store/import-spec.d.ts.map +1 -1
  88. package/dist/store/index.js +4 -3
  89. package/dist/store/request-example.d.ts +4 -4
  90. package/dist/store/requests.d.ts +15 -15
  91. package/dist/store/security-schemes.d.ts +527 -317
  92. package/dist/store/security-schemes.d.ts.map +1 -1
  93. package/dist/store/security-schemes.js +33 -41
  94. package/dist/store/servers.d.ts +4 -4
  95. package/dist/store/store-context.d.ts +0 -3
  96. package/dist/store/store-context.d.ts.map +1 -1
  97. package/dist/store/store.d.ts +640 -5297
  98. package/dist/store/store.d.ts.map +1 -1
  99. package/dist/store/store.js +111 -189
  100. package/dist/store/tags.d.ts +4 -4
  101. package/dist/store/workspace.d.ts +14 -24
  102. package/dist/store/workspace.d.ts.map +1 -1
  103. package/dist/style.css +1 -1
  104. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  105. package/dist/views/Cookies/CookieForm.vue.js +14 -13
  106. package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
  107. package/dist/views/Cookies/CookieRaw.vue.js +14 -13
  108. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +3 -3
  109. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  110. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  111. package/dist/views/Request/Request.vue.js +2 -2
  112. package/dist/views/Request/Request.vue2.js +92 -92
  113. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +2 -2
  114. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  115. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +96 -99
  116. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +2 -2
  117. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  118. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +49 -46
  119. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  120. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  121. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +94 -100
  122. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  123. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +60 -67
  124. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
  125. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  126. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  127. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  128. package/dist/views/Request/RequestSection/RequestBody.vue2.js +29 -28
  129. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  130. package/dist/views/Request/RequestSection/RequestParams.vue.js +11 -10
  131. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  132. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +24 -28
  133. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  134. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  135. package/dist/views/Request/RequestSection/RequestSection.vue2.js +19 -18
  136. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
  137. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  138. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  139. package/dist/views/Request/RequestSidebar.vue2.js +72 -73
  140. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  141. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  142. package/dist/views/Request/RequestSidebarItem.vue2.js +111 -109
  143. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  144. package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
  145. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +15 -16
  146. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  147. package/dist/views/Request/RequestSubpageHeader.vue2.js +14 -14
  148. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  149. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  150. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +23 -22
  151. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  152. package/dist/views/Request/components/WorkspaceDropdown.vue.js +32 -31
  153. package/dist/views/Request/consts/new-auth-options.d.ts +16 -8
  154. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
  155. package/dist/views/Request/consts/new-auth-options.js +16 -8
  156. package/dist/views/Request/handle-drag.d.ts +2 -1
  157. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  158. package/dist/views/Request/handle-drag.js +23 -25
  159. package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
  160. package/dist/views/Request/hooks/useOpenApiWatcher.js +40 -39
  161. package/dist/views/Request/libs/auth.d.ts +1 -29
  162. package/dist/views/Request/libs/auth.d.ts.map +1 -1
  163. package/dist/views/Request/libs/auth.js +2 -9
  164. package/dist/views/Request/libs/index.js +6 -8
  165. package/dist/views/Request/libs/live-sync.d.ts +6 -5
  166. package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
  167. package/dist/views/Request/libs/live-sync.js +164 -185
  168. package/dist/views/Request/libs/oauth2.d.ts +6 -10
  169. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  170. package/dist/views/Request/libs/oauth2.js +54 -69
  171. package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
  172. package/dist/views/Servers/ServerForm.vue.js +14 -13
  173. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  174. package/dist/views/Servers/Servers.vue2.js +18 -17
  175. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  176. package/dist/views/Settings/SettingsGeneral.vue.js +218 -126
  177. package/dist/views/Settings/{SettingsGeneralMode.vue.d.ts → components/SettingsAppearance.vue.d.ts} +2 -2
  178. package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -0
  179. package/dist/views/Settings/components/SettingsAppearance.vue.js +74 -0
  180. package/dist/views/Settings/components/SettingsAppearance.vue2.js +4 -0
  181. package/dist/views/Settings/components/SettingsSection.vue.d.ts +24 -0
  182. package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +1 -0
  183. package/dist/views/Settings/components/SettingsSection.vue.js +24 -0
  184. package/dist/views/Settings/components/SettingsSection.vue2.js +4 -0
  185. package/package.json +8 -8
  186. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +0 -16
  187. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +0 -1
  188. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +0 -1
  189. package/dist/views/Settings/SettingsGeneralMode.vue.js +0 -78
  190. package/dist/views/Settings/SettingsGeneralMode.vue2.js +0 -4
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseEmpty.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fb4e4b9a"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3c233eb3"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -1,29 +1,30 @@
1
- import { defineComponent as R, onMounted as b, onBeforeUnmount as C, openBlock as l, createElementBlock as n, createElementVNode as o, normalizeClass as k, unref as t, createTextVNode as c, toDisplayString as N, createCommentVNode as m, createVNode as s } from "vue";
1
+ import { defineComponent as b, onMounted as R, onBeforeUnmount as C, openBlock as l, createElementBlock as n, createElementVNode as o, normalizeClass as k, unref as t, createTextVNode as c, toDisplayString as N, createCommentVNode as m, createVNode as s } from "vue";
2
2
  import q from "../../../assets/computer.ascii.js";
3
3
  import x from "../../../assets/keycap.ascii.js";
4
- import d from "../../../components/ScalarAsciiArt.vue.js";
4
+ import u from "../../../components/ScalarAsciiArt.vue.js";
5
5
  import p from "../../../components/ScalarHotkey.vue.js";
6
- import { useRoute as V } from "vue-router";
7
- import { useWorkspace as K } from "../../../store/store.js";
8
- import { useLayout as S } from "../../../hooks/useLayout.js";
9
- const B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, w = {
6
+ import { useActiveEntities as V } from "../../../store/active-entities.js";
7
+ import { useRoute as K } from "vue-router";
8
+ import { useWorkspace as S } from "../../../store/store.js";
9
+ import { useLayout as A } from "../../../hooks/useLayout.js";
10
+ const B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, E = {
10
11
  key: 0,
11
12
  class: "scalar-version-number"
12
- }, A = { class: "scale-75 flex" }, E = { class: "relative" }, P = { class: "relative -ml-12" }, W = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, U = /* @__PURE__ */ R({
13
+ }, w = { class: "scale-75 flex" }, P = { class: "relative" }, $ = { class: "relative -ml-12" }, j = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, F = /* @__PURE__ */ b({
13
14
  __name: "ResponseEmpty",
14
- setup($) {
15
- const { isReadOnly: j, activeWorkspace: g, events: a, activeWorkspaceRequests: u } = K(), v = V(), { layout: r } = S(), f = () => {
15
+ setup(z) {
16
+ const { activeWorkspaceRequests: d } = V(), { isReadOnly: g, events: a } = S(), v = K(), { layout: r } = A(), f = () => {
16
17
  a.commandPalette.emit({ commandName: "Create Request" });
17
18
  }, y = (i) => {
18
19
  i != null && i.createNew && v.name === "request" && f();
19
- }, h = "2.1.52";
20
- return b(() => a.hotKeys.on(y)), C(() => a.hotKeys.off(y)), (i, e) => (l(), n("div", B, [
20
+ }, h = "2.2.0";
21
+ return R(() => a.hotKeys.on(y)), C(() => a.hotKeys.off(y)), (i, e) => (l(), n("div", B, [
21
22
  o("div", {
22
23
  class: k(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
23
- "hidden opacity-0": t(u).length <= 1 && t(r) !== "modal"
24
+ "hidden opacity-0": t(d).length <= 1 && t(r) !== "modal"
24
25
  }])
25
26
  }, [
26
- t(g).isReadOnly ? m("", !0) : (l(), n("div", w, [
27
+ t(g) ? m("", !0) : (l(), n("div", E, [
27
28
  c(" Scalar App V" + N(t(h)) + " Beta ", 1),
28
29
  e[2] || (e[2] = o("div", { class: "mt-2" }, [
29
30
  o("a", {
@@ -32,7 +33,7 @@ const B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, w = {
32
33
  }, " Roadmap ")
33
34
  ], -1))
34
35
  ])),
35
- s(d, {
36
+ s(u, {
36
37
  art: t(q),
37
38
  class: "text-c-3"
38
39
  }, null, 8, ["art"])
@@ -40,30 +41,30 @@ const B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, w = {
40
41
  t(r) !== "modal" ? (l(), n("div", {
41
42
  key: 0,
42
43
  class: k(["h-[calc(100%_-_50px)] items-center justify-center hidden pb-5", {
43
- "!flex opacity-100": t(u).length == 1
44
+ "!flex opacity-100": t(d).length == 1
44
45
  }])
45
46
  }, [
46
- o("div", A, [
47
- o("div", E, [
47
+ o("div", w, [
48
+ o("div", P, [
48
49
  s(p, {
49
50
  class: "keycap-hotkey",
50
51
  hotkey: ""
51
52
  }),
52
- s(d, {
53
+ s(u, {
53
54
  art: t(x),
54
55
  class: "!leading-[6px] text-c-3"
55
56
  }, null, 8, ["art"])
56
57
  ]),
57
- o("div", P, [
58
+ o("div", $, [
58
59
  e[3] || (e[3] = o("div", { class: "keycap-hotkey !right-[60px]" }, "K", -1)),
59
- s(d, {
60
+ s(u, {
60
61
  art: t(x),
61
62
  class: "!leading-[6px] keycap-n"
62
63
  }, null, 8, ["art"])
63
64
  ])
64
65
  ])
65
66
  ], 2)) : m("", !0),
66
- o("div", W, [
67
+ o("div", j, [
67
68
  t(r) !== "modal" ? (l(), n("button", {
68
69
  key: 0,
69
70
  class: "flex items-center gap-1.5",
@@ -95,5 +96,5 @@ const B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, w = {
95
96
  }
96
97
  });
97
98
  export {
98
- U as default
99
+ F as default
99
100
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AA8zBA,wBAMG"}
1
+ {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AAg0BA,wBAMG"}
@@ -1,29 +1,30 @@
1
- import { defineComponent as O, computed as A, ref as M, openBlock as m, createElementBlock as W, createElementVNode as a, createVNode as s, unref as e, withCtx as n, Fragment as I, renderList as L, createBlock as h, withModifiers as c, normalizeClass as U, toDisplayString as z } from "vue";
1
+ import { defineComponent as A, computed as O, ref as M, openBlock as m, createElementBlock as W, createElementVNode as a, createVNode as s, unref as e, withCtx as n, Fragment as I, renderList as L, createBlock as h, withModifiers as c, normalizeClass as U, toDisplayString as z } from "vue";
2
2
  import V from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
3
  import q from "../../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
4
- import { useModal as C, ScalarDropdown as S, ScalarDropdownItem as u, ScalarIcon as r, ScalarTooltip as F, ScalarButton as $, ScalarDropdownDivider as P, ScalarModal as N } from "@scalar/components";
5
- import { useRouter as Y } from "vue-router";
6
- import { useWorkspace as G } from "../../../store/store.js";
7
- const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font-medium m-0 flex gap-1.5 items-center" }, K = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, Q = { class: "text-ellipsis overflow-hidden" }, X = { class: "flex items-center justify-center h-4 w-4" }, le = /* @__PURE__ */ O({
4
+ import { useActiveEntities as F } from "../../../store/active-entities.js";
5
+ import { useModal as C, ScalarDropdown as S, ScalarDropdownItem as u, ScalarIcon as i, ScalarTooltip as P, ScalarButton as $, ScalarDropdownDivider as Y, ScalarModal as E } from "@scalar/components";
6
+ import { useRouter as G } from "vue-router";
7
+ import { useWorkspace as H } from "../../../store/store.js";
8
+ const J = { class: "flex items-center text-sm w-[inherit]" }, K = { class: "font-medium m-0 flex gap-1.5 items-center" }, Q = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, X = { class: "text-ellipsis overflow-hidden" }, Z = { class: "flex items-center justify-center h-4 w-4" }, re = /* @__PURE__ */ A({
8
9
  __name: "WorkspaceDropdown",
9
- setup(Z) {
10
- const { activeWorkspace: f, workspaces: d, workspaceMutators: g, events: T } = G(), { push: b } = Y(), E = (o) => {
10
+ setup(ee) {
11
+ const { activeWorkspace: f } = F(), { workspaces: d, workspaceMutators: g, events: N } = H(), { push: b } = G(), T = (o) => {
11
12
  o !== f.value.uid && b({
12
13
  name: "workspace",
13
14
  params: {
14
15
  workspace: o
15
16
  }
16
17
  });
17
- }, _ = A(() => Object.keys(d).length === 1), j = () => T.commandPalette.emit({ commandName: "Create Workspace" }), v = M(""), i = M(""), w = C(), k = C(), y = (o) => {
18
- v.value = d[o].name, i.value = o, w.show();
18
+ }, _ = O(() => Object.keys(d).length === 1), j = () => N.commandPalette.emit({ commandName: "Create Workspace" }), v = M(""), r = M(""), w = C(), k = C(), y = (o) => {
19
+ v.value = d[o].name, r.value = o, w.show();
19
20
  }, B = (o) => {
20
- o.trim() && (g.edit(i.value, "name", o.trim()), w.hide());
21
+ o.trim() && (g.edit(r.value, "name", o.trim()), w.hide());
21
22
  }, D = (o) => {
22
- v.value = d[o].name, i.value = o, k.show();
23
+ v.value = d[o].name, r.value = o, k.show();
23
24
  }, R = async () => {
24
25
  if (!_.value) {
25
- const o = f.value.uid === i.value, t = { ...d };
26
- if (delete t[i.value], g.delete(i.value), o) {
26
+ const o = f.value.uid === r.value, t = { ...d };
27
+ if (delete t[r.value], g.delete(r.value), o) {
27
28
  const p = Object.keys(t)[0];
28
29
  await b({
29
30
  name: "workspace",
@@ -36,13 +37,13 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
36
37
  k.hide();
37
38
  };
38
39
  return (o, t) => (m(), W("div", null, [
39
- a("div", H, [
40
+ a("div", J, [
40
41
  s(e(S), null, {
41
42
  items: n(() => [
42
43
  (m(!0), W(I, null, L(e(d), (p, l) => (m(), h(e(u), {
43
44
  key: l,
44
45
  class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
45
- onClick: c((x) => E(l), ["stop"])
46
+ onClick: c((x) => T(l), ["stop"])
46
47
  }, {
47
48
  default: n(() => [
48
49
  a("div", {
@@ -51,13 +52,13 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
51
52
  e(f).uid === l ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
52
53
  ])
53
54
  }, [
54
- s(e(r), {
55
+ s(e(i), {
55
56
  class: "size-2.5",
56
57
  icon: "Checkmark",
57
58
  thickness: "3.5"
58
59
  })
59
60
  ], 2),
60
- a("span", Q, z(p.name), 1),
61
+ a("span", X, z(p.name), 1),
61
62
  s(e(S), { teleport: ".scalar-client" }, {
62
63
  items: n(() => [
63
64
  s(e(u), {
@@ -66,7 +67,7 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
66
67
  onTouchend: c((x) => y(l), ["prevent"])
67
68
  }, {
68
69
  default: n(() => [
69
- s(e(r), {
70
+ s(e(i), {
70
71
  class: "inline-flex",
71
72
  icon: "Edit",
72
73
  size: "md",
@@ -76,7 +77,7 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
76
77
  ]),
77
78
  _: 2
78
79
  }, 1032, ["onMousedown", "onTouchend"]),
79
- _.value ? (m(), h(e(F), {
80
+ _.value ? (m(), h(e(P), {
80
81
  key: 0,
81
82
  class: "z-10",
82
83
  side: "bottom"
@@ -91,7 +92,7 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
91
92
  }, ["prevent"]))
92
93
  }, {
93
94
  default: n(() => [
94
- s(e(r), {
95
+ s(e(i), {
95
96
  class: "inline-flex",
96
97
  icon: "Delete",
97
98
  size: "md",
@@ -117,7 +118,7 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
117
118
  onTouchend: c((x) => D(l), ["prevent"])
118
119
  }, {
119
120
  default: n(() => [
120
- s(e(r), {
121
+ s(e(i), {
121
122
  class: "inline-flex",
122
123
  icon: "Delete",
123
124
  size: "sm",
@@ -136,7 +137,7 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
136
137
  variant: "ghost"
137
138
  }, {
138
139
  default: n(() => [
139
- s(e(r), {
140
+ s(e(i), {
140
141
  icon: "Ellipses",
141
142
  size: "sm"
142
143
  })
@@ -149,14 +150,14 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
149
150
  ]),
150
151
  _: 2
151
152
  }, 1032, ["onClick"]))), 128)),
152
- s(e(P)),
153
+ s(e(Y)),
153
154
  s(e(u), {
154
155
  class: "flex items-center gap-1.5",
155
156
  onClick: j
156
157
  }, {
157
158
  default: n(() => [
158
- a("div", X, [
159
- s(e(r), {
159
+ a("div", Z, [
160
+ s(e(i), {
160
161
  class: "h-2.5",
161
162
  icon: "Add",
162
163
  thickness: "3"
@@ -174,9 +175,9 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
174
175
  variant: "ghost"
175
176
  }, {
176
177
  default: n(() => [
177
- a("div", J, [
178
- a("h2", K, z(e(f).name), 1),
179
- s(e(r), {
178
+ a("div", K, [
179
+ a("h2", Q, z(e(f).name), 1),
180
+ s(e(i), {
180
181
  class: "size-3",
181
182
  icon: "ChevronDown",
182
183
  thickness: "3"
@@ -189,7 +190,7 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
189
190
  _: 1
190
191
  })
191
192
  ]),
192
- s(e(N), {
193
+ s(e(E), {
193
194
  size: "xxs",
194
195
  state: e(k),
195
196
  title: "Delete workspace"
@@ -204,7 +205,7 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
204
205
  ]),
205
206
  _: 1
206
207
  }, 8, ["state"]),
207
- s(e(N), {
208
+ s(e(E), {
208
209
  size: "xxs",
209
210
  state: e(w),
210
211
  title: "Rename Workspace"
@@ -222,5 +223,5 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
222
223
  }
223
224
  });
224
225
  export {
225
- le as default
226
+ re as default
226
227
  };
@@ -60,8 +60,10 @@ export declare const ADD_AUTH_DICT: {
60
60
  readonly payload: {
61
61
  readonly type: "oauth2";
62
62
  readonly nameKey: "oauth2Implicit";
63
- readonly flow: {
64
- readonly type: "implicit";
63
+ readonly flows: {
64
+ readonly implicit: {
65
+ readonly type: "implicit";
66
+ };
65
67
  };
66
68
  };
67
69
  };
@@ -70,8 +72,10 @@ export declare const ADD_AUTH_DICT: {
70
72
  readonly payload: {
71
73
  readonly type: "oauth2";
72
74
  readonly nameKey: "oauth2Password";
73
- readonly flow: {
74
- readonly type: "password";
75
+ readonly flows: {
76
+ readonly password: {
77
+ readonly type: "password";
78
+ };
75
79
  };
76
80
  };
77
81
  };
@@ -80,8 +84,10 @@ export declare const ADD_AUTH_DICT: {
80
84
  readonly payload: {
81
85
  readonly type: "oauth2";
82
86
  readonly nameKey: "oauth2ClientCredentials";
83
- readonly flow: {
84
- readonly type: "clientCredentials";
87
+ readonly flows: {
88
+ readonly clientCredentials: {
89
+ readonly type: "clientCredentials";
90
+ };
85
91
  };
86
92
  };
87
93
  };
@@ -90,8 +96,10 @@ export declare const ADD_AUTH_DICT: {
90
96
  readonly payload: {
91
97
  readonly type: "oauth2";
92
98
  readonly nameKey: "oauth2AuthorizationFlow";
93
- readonly flow: {
94
- readonly type: "authorizationCode";
99
+ readonly flows: {
100
+ readonly authorizationCode: {
101
+ readonly type: "authorizationCode";
102
+ };
95
103
  };
96
104
  };
97
105
  };
@@ -1 +1 @@
1
- {"version":3,"file":"new-auth-options.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/new-auth-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAG5E,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,qBAAqB,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFhB,CAAA;AAIV,+CAA+C;AAC/C,eAAO,MAAM,gBAAgB,EAAE,oBAAoB,EAOlD,CAAA"}
1
+ {"version":3,"file":"new-auth-options.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/new-auth-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAG5E,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,qBAAqB,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFhB,CAAA;AAIV,+CAA+C;AAC/C,eAAO,MAAM,gBAAgB,EAAE,oBAAoB,EAOlD,CAAA"}
@@ -44,8 +44,10 @@ const t = {
44
44
  payload: {
45
45
  type: "oauth2",
46
46
  nameKey: "oauth2Implicit",
47
- flow: {
48
- type: "implicit"
47
+ flows: {
48
+ implicit: {
49
+ type: "implicit"
50
+ }
49
51
  }
50
52
  }
51
53
  },
@@ -54,8 +56,10 @@ const t = {
54
56
  payload: {
55
57
  type: "oauth2",
56
58
  nameKey: "oauth2Password",
57
- flow: {
58
- type: "password"
59
+ flows: {
60
+ password: {
61
+ type: "password"
62
+ }
59
63
  }
60
64
  }
61
65
  },
@@ -64,8 +68,10 @@ const t = {
64
68
  payload: {
65
69
  type: "oauth2",
66
70
  nameKey: "oauth2ClientCredentials",
67
- flow: {
68
- type: "clientCredentials"
71
+ flows: {
72
+ clientCredentials: {
73
+ type: "clientCredentials"
74
+ }
69
75
  }
70
76
  }
71
77
  },
@@ -74,8 +80,10 @@ const t = {
74
80
  payload: {
75
81
  type: "oauth2",
76
82
  nameKey: "oauth2AuthorizationFlow",
77
- flow: {
78
- type: "authorizationCode"
83
+ flows: {
84
+ authorizationCode: {
85
+ type: "authorizationCode"
86
+ }
79
87
  }
80
88
  }
81
89
  }
@@ -1,7 +1,8 @@
1
1
  import type { WorkspaceStore } from '../../store/index.js';
2
+ import type { ActiveEntitiesStore } from '../../store/active-entities.js';
2
3
  import type { DraggingItem, HoveredItem } from '@scalar/draggable';
3
4
  /** Create DnD handlers */
4
- export declare function dragHandlerFactory({ collections, collectionMutators, tags, tagMutators, requests, requestHistory, workspaceMutators, activeWorkspace, }: WorkspaceStore): {
5
+ export declare function dragHandlerFactory(activeWorkspace: ActiveEntitiesStore['activeWorkspace'], { collections, collectionMutators, isReadOnly, tags, tagMutators, workspaceMutators, }: WorkspaceStore): {
5
6
  handleDragEnd: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => void;
6
7
  isDroppable: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => boolean;
7
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"handle-drag.d.ts","sourceRoot":"","sources":["../../../src/views/Request/handle-drag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAElE,0BAA0B;AAC1B,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EACX,kBAAkB,EAClB,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,eAAe,GAChB,EAAE,cAAc;kCAQsB,YAAY,eAAe,WAAW;gCAmE3D,YAAY,eACb,WAAW;EAoB3B"}
1
+ {"version":3,"file":"handle-drag.d.ts","sourceRoot":"","sources":["../../../src/views/Request/handle-drag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAElE,0BAA0B;AAC1B,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,EACvD,EACE,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,IAAI,EACJ,WAAW,EACX,iBAAiB,GAClB,EAAE,cAAc;kCASoB,YAAY,eAAe,WAAW;gCAmE3D,YAAY,eACb,WAAW;EAoB3B"}
@@ -1,56 +1,54 @@
1
- function q({
1
+ function I(s, {
2
2
  collections: r,
3
- collectionMutators: p,
3
+ collectionMutators: o,
4
+ isReadOnly: D,
4
5
  tags: l,
5
- tagMutators: c,
6
- requests: y,
7
- requestHistory: C,
8
- workspaceMutators: x,
9
- activeWorkspace: t
6
+ tagMutators: p,
7
+ workspaceMutators: x
10
8
  }) {
11
9
  function U(n, f) {
12
- r[n] ? p.edit(n, "children", f) : l[n] && c.edit(n, "children", f);
10
+ r[n] ? o.edit(n, "children", f) : l[n] && p.edit(n, "children", f);
13
11
  }
14
- function D(n, f) {
12
+ function v(n, f) {
15
13
  if (!n || !f) return;
16
- const { id: d, parentId: i } = n, { id: s, parentId: h, offset: a } = f;
17
- if (i ? r[i] ? p.edit(
14
+ const { id: d, parentId: i } = n, { id: t, parentId: u, offset: a } = f;
15
+ if (i ? r[i] ? o.edit(
18
16
  i,
19
17
  "children",
20
18
  r[i].children.filter(
21
19
  (e) => e !== d
22
20
  )
23
- ) : l[i] && c.edit(
21
+ ) : l[i] && p.edit(
24
22
  i,
25
23
  "children",
26
24
  l[i].children.filter((e) => e !== d)
27
25
  ) : x.edit(
28
- t.value.uid,
26
+ s.value.uid,
29
27
  "collections",
30
- t.value.collections.filter((e) => e !== d)
28
+ s.value.collections.filter((e) => e !== d)
31
29
  ), a === 2) {
32
- const e = r[s] || l[s];
33
- U(s, [...e.children, d]);
34
- } else if (h) {
35
- const u = [...(r[h] || l[h]).children], o = u.findIndex((v) => s === v) ?? 0;
36
- u.splice(o + a, 0, d), U(h, u);
30
+ const e = r[t] || l[t];
31
+ U(t, [...e.children, d]);
32
+ } else if (u) {
33
+ const h = [...(r[u] || l[u]).children], c = h.findIndex((C) => t === C) ?? 0;
34
+ h.splice(c + a, 0, d), U(u, h);
37
35
  } else {
38
- const e = [...t.value.collections], u = e.findIndex((o) => s === o) ?? 0;
39
- e.splice(u + a, 0, d), x.edit(
40
- t.value.uid,
36
+ const e = [...s.value.collections], h = e.findIndex((c) => t === c) ?? 0;
37
+ e.splice(h + a, 0, d), x.edit(
38
+ s.value.uid,
41
39
  "collections",
42
40
  e
43
41
  );
44
42
  }
45
43
  }
46
44
  return {
47
- handleDragEnd: D,
45
+ handleDragEnd: v,
48
46
  isDroppable: (n, f) => {
49
47
  var d, i;
50
- return !(t.value.isReadOnly || !r[n.id] && f.offset !== 2 || r[n.id] && ((i = (d = r[f.id]) == null ? void 0 : d.info) == null ? void 0 : i.title) === "Drafts");
48
+ return !(D || !r[n.id] && f.offset !== 2 || r[n.id] && ((i = (d = r[f.id]) == null ? void 0 : d.info) == null ? void 0 : i.title) === "Drafts");
51
49
  }
52
50
  };
53
51
  }
54
52
  export {
55
- q as dragHandlerFactory
53
+ I as dragHandlerFactory
56
54
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useOpenApiWatcher.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/hooks/useOpenApiWatcher.ts"],"names":[],"mappings":"AAuBA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,YAyI7B,CAAA"}
1
+ {"version":3,"file":"useOpenApiWatcher.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/hooks/useOpenApiWatcher.ts"],"names":[],"mappings":"AAwBA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,YA2I7B,CAAA"}
@@ -1,66 +1,67 @@
1
- import { specDictionary as u } from "../../../store/import-spec.js";
2
- import { combineRenameDiffs as A, mutateCollectionDiff as R, mutateSecuritySchemeDiff as S, mutateServerDiff as d, mutateTagDiff as g, mutateRequestDiff as D } from "../libs/live-sync.js";
3
- import { fetchSpecFromUrl as E, createHash as T } from "@scalar/oas-utils/helpers";
4
- import { parseSchema as l } from "@scalar/oas-utils/transforms";
5
- import { useToasts as M } from "@scalar/use-toasts";
6
- import { useTimeoutPoll as I } from "@vueuse/core";
7
- import U from "microdiff";
8
- import { watch as C } from "vue";
9
- import { useWorkspace as L } from "../../../store/store.js";
10
- const N = 5 * 1e3, b = 60 * 1e3, V = () => {
11
- const { toast: f } = M(), c = L(), { activeCollection: t, activeWorkspace: v, collectionMutators: i } = c, o = (e) => f(
1
+ import { useActiveEntities as E } from "../../../store/active-entities.js";
2
+ import { specDictionary as f } from "../../../store/import-spec.js";
3
+ import { combineRenameDiffs as R, mutateCollectionDiff as S, mutateSecuritySchemeDiff as d, mutateServerDiff as g, mutateTagDiff as D, mutateRequestDiff as T } from "../libs/live-sync.js";
4
+ import { fetchSpecFromUrl as M, createHash as I } from "@scalar/oas-utils/helpers";
5
+ import { parseSchema as v } from "@scalar/oas-utils/transforms";
6
+ import { useToasts as U } from "@scalar/use-toasts";
7
+ import { useTimeoutPoll as C } from "@vueuse/core";
8
+ import L from "microdiff";
9
+ import { watch as N } from "vue";
10
+ import { useWorkspace as b } from "../../../store/store.js";
11
+ const P = 5 * 1e3, k = 60 * 1e3, B = () => {
12
+ const { toast: h } = U(), c = E(), o = b(), { activeCollection: t, activeWorkspace: O } = c, { collectionMutators: n } = o, r = (e) => h(
12
13
  `[useOpenApiWatcher] Changes to the ${e} were not applied`,
13
14
  "error"
14
- ), O = (e) => {
15
- e.path[0] === "info" || e.path[0] === "security" ? R(e, c) || o("collection") : e.path[0] === "components" && e.path[1] === "securitySchemes" ? S(e, c) || o("securitySchemes") : e.path[0] === "servers" ? d(e, c) || o("servers") : e.path[0] === "tags" ? g(e, c) || o("tags") : e.path[0] === "paths" && (D(e, c) || o("requests"));
16
- }, { pause: h, resume: p } = I(async () => {
17
- var m;
18
- const e = (m = t.value) == null ? void 0 : m.documentUrl;
15
+ ), W = (e) => {
16
+ e.path[0] === "info" || e.path[0] === "security" ? S(e, c, o) || r("collection") : e.path[0] === "components" && e.path[1] === "securitySchemes" ? d(e, c, o) || r("securitySchemes") : e.path[0] === "servers" ? g(e, c, o) || r("servers") : e.path[0] === "tags" ? D(e, c, o) || r("tags") : e.path[0] === "paths" && (T(e, c, o) || r("requests"));
17
+ }, { pause: p, resume: m } = C(async () => {
18
+ var l;
19
+ const e = (l = t.value) == null ? void 0 : l.documentUrl;
19
20
  if (!e) return;
20
- const s = u[e];
21
+ const s = f[e];
21
22
  try {
22
- const r = await E(
23
+ const a = await M(
23
24
  e,
24
- v.value.proxyUrl,
25
+ O.value.proxyUrl,
25
26
  !1
26
- ), n = T(r);
27
- if (i.edit(
27
+ ), u = I(a);
28
+ if (n.edit(
28
29
  t.value.uid,
29
30
  "watchModeStatus",
30
31
  "WATCHING"
31
32
  ), s != null && s.hash)
32
- if (s.hash && s.hash !== n) {
33
- const { schema: a } = await l(r), W = U(s.schema, a), w = A(W);
33
+ if (s.hash && s.hash !== u) {
34
+ const { schema: i } = await v(a), w = L(s.schema, i), A = R(w);
34
35
  try {
35
- w.forEach(O), u[e] = {
36
- hash: n,
37
- schema: a
36
+ A.forEach(W), f[e] = {
37
+ hash: u,
38
+ schema: i
38
39
  };
39
40
  } catch (y) {
40
41
  console.error("[useOpenApiWatcher] Error:", y);
41
42
  }
42
43
  } else console.log("[useOpenApiWatcher] No changes detected yet…");
43
44
  else {
44
- const { schema: a } = await l(r);
45
- a && (u[e] = {
46
- hash: n,
47
- schema: a
45
+ const { schema: i } = await v(a);
46
+ i && (f[e] = {
47
+ hash: u,
48
+ schema: i
48
49
  });
49
50
  }
50
- } catch (r) {
51
- console.error("[useOpenApiWatcher] Error:", r), console.info("[useOpenApiWatcher] Pausing watcher for 60 seconds"), h(), i.edit(
51
+ } catch (a) {
52
+ console.error("[useOpenApiWatcher] Error:", a), console.info("[useOpenApiWatcher] Pausing watcher for 60 seconds"), p(), n.edit(
52
53
  t.value.uid,
53
54
  "watchModeStatus",
54
55
  "ERROR"
55
- ), f(
56
+ ), h(
56
57
  "[useOpenApiWatcher] Unable to fetch the spec file, paused the watcher for 60 seconds",
57
58
  "error"
58
59
  ), setTimeout(() => {
59
- console.info("[useOpenApiWatcher] Resuming watcher"), p();
60
- }, b);
60
+ console.info("[useOpenApiWatcher] Resuming watcher"), m();
61
+ }, k);
61
62
  }
62
- }, N);
63
- C(
63
+ }, P);
64
+ N(
64
65
  [
65
66
  () => {
66
67
  var e;
@@ -72,7 +73,7 @@ const N = 5 * 1e3, b = 60 * 1e3, V = () => {
72
73
  }
73
74
  ],
74
75
  ([e, s]) => {
75
- e && s ? (console.info(`[useOpenApiWatcher] Watching ${e} …`), p()) : t.value && (h(), i.edit(
76
+ e && s ? (console.info(`[useOpenApiWatcher] Watching ${e} …`), m()) : t.value && (p(), n.edit(
76
77
  t.value.uid,
77
78
  "watchModeStatus",
78
79
  "IDLE"
@@ -82,5 +83,5 @@ const N = 5 * 1e3, b = 60 * 1e3, V = () => {
82
83
  );
83
84
  };
84
85
  export {
85
- V as useOpenApiWatcher
86
+ B as useOpenApiWatcher
86
87
  };