@scalar/api-client 2.1.52 → 2.2.1

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 (205) hide show
  1. package/CHANGELOG.md +41 -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 +36 -43
  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/SideNav.vue.js +4 -4
  49. package/dist/components/SideNav/SideNavRouterLink.vue.js +9 -9
  50. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  51. package/dist/components/TopNav/TopNav.vue.js +165 -5
  52. package/dist/components/TopNav/TopNav.vue2.js +2 -164
  53. package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
  54. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  55. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  56. package/dist/components/TopNav/TopNavItem.vue2.js +5 -5
  57. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  58. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
  59. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +2 -2
  60. package/dist/hooks/index.js +3 -2
  61. package/dist/hooks/useLayout.d.ts +2 -0
  62. package/dist/hooks/useLayout.d.ts.map +1 -1
  63. package/dist/hooks/useLayout.js +4 -3
  64. package/dist/layouts/App/ApiClientApp.vue.d.ts +1 -1
  65. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  66. package/dist/layouts/App/ApiClientApp.vue.js +35 -31
  67. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
  68. package/dist/layouts/App/MainLayout.vue.js +3 -3
  69. package/dist/layouts/App/create-api-client-app.d.ts +669 -1232
  70. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  71. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  72. package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
  73. package/dist/layouts/Modal/ApiClientModal.vue2.js +24 -23
  74. package/dist/layouts/Modal/create-api-client-modal.d.ts +1382 -2508
  75. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  76. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  77. package/dist/layouts/Web/ApiClientWeb.vue.js +34 -33
  78. package/dist/layouts/Web/create-api-client-web.d.ts +669 -1232
  79. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  80. package/dist/libs/create-client.d.ts +673 -1236
  81. package/dist/libs/create-client.d.ts.map +1 -1
  82. package/dist/libs/create-client.js +91 -102
  83. package/dist/libs/hot-keys.d.ts +1 -1
  84. package/dist/libs/send-request.d.ts +2 -3
  85. package/dist/libs/send-request.d.ts.map +1 -1
  86. package/dist/libs/send-request.js +127 -123
  87. package/dist/store/active-entities.d.ts +333 -0
  88. package/dist/store/active-entities.d.ts.map +1 -0
  89. package/dist/store/active-entities.js +97 -0
  90. package/dist/store/collections.d.ts +4 -274
  91. package/dist/store/collections.d.ts.map +1 -1
  92. package/dist/store/cookies.d.ts +4 -4
  93. package/dist/store/environment.d.ts +4 -4
  94. package/dist/store/import-spec.d.ts +0 -54
  95. package/dist/store/import-spec.d.ts.map +1 -1
  96. package/dist/store/index.js +4 -3
  97. package/dist/store/request-example.d.ts +4 -4
  98. package/dist/store/requests.d.ts +15 -15
  99. package/dist/store/security-schemes.d.ts +527 -317
  100. package/dist/store/security-schemes.d.ts.map +1 -1
  101. package/dist/store/security-schemes.js +33 -41
  102. package/dist/store/servers.d.ts +4 -4
  103. package/dist/store/store-context.d.ts +0 -3
  104. package/dist/store/store-context.d.ts.map +1 -1
  105. package/dist/store/store.d.ts +640 -5297
  106. package/dist/store/store.d.ts.map +1 -1
  107. package/dist/store/store.js +111 -189
  108. package/dist/store/tags.d.ts +4 -4
  109. package/dist/store/workspace.d.ts +14 -24
  110. package/dist/store/workspace.d.ts.map +1 -1
  111. package/dist/style.css +1 -1
  112. package/dist/tailwind/desktop-variants.d.ts +18 -0
  113. package/dist/tailwind/desktop-variants.d.ts.map +1 -0
  114. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  115. package/dist/views/Cookies/CookieForm.vue.js +14 -13
  116. package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
  117. package/dist/views/Cookies/CookieRaw.vue.js +14 -13
  118. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +3 -3
  119. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  120. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  121. package/dist/views/Request/Request.vue.js +1 -1
  122. package/dist/views/Request/Request.vue2.js +92 -92
  123. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +2 -2
  124. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  125. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +96 -99
  126. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +2 -2
  127. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  128. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +49 -46
  129. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  130. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  131. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +94 -100
  132. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  133. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +60 -67
  134. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
  135. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  136. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  137. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  138. package/dist/views/Request/RequestSection/RequestBody.vue2.js +29 -28
  139. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  140. package/dist/views/Request/RequestSection/RequestParams.vue.js +11 -10
  141. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  142. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +24 -28
  143. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  144. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  145. package/dist/views/Request/RequestSection/RequestSection.vue2.js +17 -16
  146. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
  147. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  148. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  149. package/dist/views/Request/RequestSidebar.vue2.js +72 -73
  150. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  151. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  152. package/dist/views/Request/RequestSidebarItem.vue2.js +111 -109
  153. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  154. package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
  155. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +15 -16
  156. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  157. package/dist/views/Request/RequestSubpageHeader.vue2.js +14 -14
  158. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  159. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
  160. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +25 -21
  161. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  162. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  163. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +26 -25
  164. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  165. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +7 -7
  166. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  167. package/dist/views/Request/components/WorkspaceDropdown.vue.js +32 -31
  168. package/dist/views/Request/consts/new-auth-options.d.ts +16 -8
  169. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
  170. package/dist/views/Request/consts/new-auth-options.js +16 -8
  171. package/dist/views/Request/handle-drag.d.ts +2 -1
  172. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  173. package/dist/views/Request/handle-drag.js +23 -25
  174. package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
  175. package/dist/views/Request/hooks/useOpenApiWatcher.js +40 -39
  176. package/dist/views/Request/libs/auth.d.ts +1 -29
  177. package/dist/views/Request/libs/auth.d.ts.map +1 -1
  178. package/dist/views/Request/libs/auth.js +2 -9
  179. package/dist/views/Request/libs/index.js +6 -8
  180. package/dist/views/Request/libs/live-sync.d.ts +6 -5
  181. package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
  182. package/dist/views/Request/libs/live-sync.js +164 -185
  183. package/dist/views/Request/libs/oauth2.d.ts +6 -10
  184. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  185. package/dist/views/Request/libs/oauth2.js +54 -69
  186. package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
  187. package/dist/views/Servers/ServerForm.vue.js +14 -13
  188. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  189. package/dist/views/Servers/Servers.vue2.js +18 -17
  190. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  191. package/dist/views/Settings/SettingsGeneral.vue.js +218 -126
  192. package/dist/views/Settings/{SettingsGeneralMode.vue.d.ts → components/SettingsAppearance.vue.d.ts} +2 -2
  193. package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -0
  194. package/dist/views/Settings/components/SettingsAppearance.vue.js +74 -0
  195. package/dist/views/Settings/components/SettingsAppearance.vue2.js +4 -0
  196. package/dist/views/Settings/components/SettingsSection.vue.d.ts +24 -0
  197. package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +1 -0
  198. package/dist/views/Settings/components/SettingsSection.vue.js +24 -0
  199. package/dist/views/Settings/components/SettingsSection.vue2.js +4 -0
  200. package/package.json +9 -9
  201. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +0 -16
  202. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +0 -1
  203. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +0 -1
  204. package/dist/views/Settings/SettingsGeneralMode.vue.js +0 -78
  205. package/dist/views/Settings/SettingsGeneralMode.vue2.js +0 -4
@@ -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
  };
@@ -1,32 +1,4 @@
1
- import { type SecurityScheme } from '@scalar/oas-utils/entities/spec';
2
- /** Create a new value set for a given scheme type */
3
- export declare const createSchemeValueSet: (scheme: SecurityScheme) => {
4
- type: "apiKey";
5
- value: string;
6
- name: string;
7
- } | {
8
- type: "http";
9
- username: string;
10
- password: string;
11
- token: string;
12
- } | {
13
- type: "oauth-implicit";
14
- token: string;
15
- } | {
16
- type: "oauth-password";
17
- username: string;
18
- password: string;
19
- token: string;
20
- clientSecret: string;
21
- } | {
22
- type: "oauth-clientCredentials";
23
- token: string;
24
- clientSecret: string;
25
- } | {
26
- type: "oauth-authorizationCode";
27
- token: string;
28
- clientSecret: string;
29
- };
1
+ import type { SecurityScheme } from '@scalar/oas-utils/entities/spec';
30
2
  /** Format a scheme object into a display object */
31
3
  export declare const displaySchemeFormatter: (s: SecurityScheme) => {
32
4
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAA;AAExC,qDAAqD;AACrD,eAAO,MAAM,oBAAoB,WAAY,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ1D,CAAA;AAED,mDAAmD;AACnD,eAAO,MAAM,sBAAsB,MAAO,cAAc;;;CAKvD,CAAA"}
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAErE,mDAAmD;AACnD,eAAO,MAAM,sBAAsB,MAAO,cAAc;;;CAKvD,CAAA"}
@@ -1,14 +1,7 @@
1
- import { securitySchemeExampleValueSchema as a } from "@scalar/oas-utils/entities/spec";
2
- const o = (e) => {
3
- const t = e.type === "oauth2" ? `oauth-${e.flow.type}` : e.type;
4
- return a.parse({
5
- type: t
6
- });
7
- }, p = (e) => ({
1
+ const r = (e) => ({
8
2
  id: e.uid,
9
3
  label: e.nameKey
10
4
  });
11
5
  export {
12
- o as createSchemeValueSet,
13
- p as displaySchemeFormatter
6
+ r as displaySchemeFormatter
14
7
  };
@@ -1,10 +1,8 @@
1
- import { createSchemeValueSet as a, displaySchemeFormatter as t } from "./auth.js";
2
- import { authorizeOauth2 as h, authorizeServers as m, generateCodeChallenge as l, isOauth2Example as u } from "./oauth2.js";
1
+ import { displaySchemeFormatter as o } from "./auth.js";
2
+ import { authorizeOauth2 as a, authorizeServers as h, generateCodeChallenge as m } from "./oauth2.js";
3
3
  export {
4
- h as authorizeOauth2,
5
- m as authorizeServers,
6
- a as createSchemeValueSet,
7
- t as displaySchemeFormatter,
8
- l as generateCodeChallenge,
9
- u as isOauth2Example
4
+ a as authorizeOauth2,
5
+ h as authorizeServers,
6
+ o as displaySchemeFormatter,
7
+ m as generateCodeChallenge
10
8
  };
@@ -1,4 +1,5 @@
1
1
  import type { WorkspaceStore } from '../../../store/index.js';
2
+ import type { ActiveEntitiesStore } from '../../../store/active-entities.js';
2
3
  import { type Path, type PathValue } from '@scalar/object-utils/nested';
3
4
  import { type Difference } from 'microdiff';
4
5
  import { type ZodSchema, type ZodTypeDef } from 'zod';
@@ -37,15 +38,15 @@ export declare const parseDiff: <T>(schema: ZodSchema<T, ZodTypeDef, any>, diff:
37
38
  *
38
39
  * @returns true if it succeeds, and false for a failure
39
40
  */
40
- export declare const mutateCollectionDiff: (diff: Difference, { activeCollection, collectionMutators }: WorkspaceStore) => boolean;
41
+ export declare const mutateCollectionDiff: (diff: Difference, { activeCollection }: ActiveEntitiesStore, { collectionMutators }: WorkspaceStore) => boolean;
41
42
  /**
42
43
  * Generates an array of payloads for the request mutator from the request diff, also executes the mutation
43
44
  */
44
- export declare const mutateRequestDiff: (diff: Difference, store: WorkspaceStore) => boolean;
45
+ export declare const mutateRequestDiff: (diff: Difference, { activeCollection }: ActiveEntitiesStore, store: WorkspaceStore) => boolean;
45
46
  /** Generates a payload for the server mutator from the server diff including the mutator method */
46
- export declare const mutateServerDiff: (diff: Difference, { activeCollection, servers, serverMutators }: WorkspaceStore) => boolean;
47
+ export declare const mutateServerDiff: (diff: Difference, { activeCollection }: ActiveEntitiesStore, { servers, serverMutators }: WorkspaceStore) => boolean;
47
48
  /** Generates a payload for the tag mutator from the tag diff */
48
- export declare const mutateTagDiff: (diff: Difference, { activeCollection, tags, tagMutators }: WorkspaceStore) => boolean;
49
+ export declare const mutateTagDiff: (diff: Difference, { activeCollection }: ActiveEntitiesStore, { tags, tagMutators }: WorkspaceStore) => boolean;
49
50
  /** Narrows down a zod union schema */
50
51
  export declare const narrowUnionSchema: (schema: ZodSchema, key: string, value: string) => ZodSchema | null;
51
52
  /**
@@ -55,5 +56,5 @@ export declare const narrowUnionSchema: (schema: ZodSchema, key: string, value:
55
56
  *
56
57
  * @returns true if it succeeds, and false for a failure
57
58
  */
58
- export declare const mutateSecuritySchemeDiff: (diff: Difference, { activeCollection, securitySchemes, securitySchemeMutators }: WorkspaceStore) => boolean;
59
+ export declare const mutateSecuritySchemeDiff: (diff: Difference, { activeCollection }: ActiveEntitiesStore, { securitySchemes, securitySchemeMutators }: WorkspaceStore) => boolean;
59
60
  //# sourceMappingURL=live-sync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"live-sync.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/live-sync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAgB7C,OAAO,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EAEf,MAAM,6BAA6B,CAAA;AAEpC,OAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAK,MAAM,KAAK,CAAA;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,SACvB,UAAU,EAAE,eACN,MAAM,EAAE,KACnB,UAAU,EAqFZ,CAAA;AAED,kEAAkE;AAClE,eAAO,MAAM,YAAY,GAAI,CAAC,OACvB,MAAM,EAAE,aACF,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,aACjB,CAAC,QAAQ,EAAE,CAAC,KAAK,OAAO,KAClC,CAAC,GAAG,IAMN,CAAA;AASD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,WACpB,SAAS,QACX,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KACxB,SAAS,GAAG,IAqDd,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,UACjB,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,CAAC,QAC/B,UAAU,KACf;IACD,0DAA0D;IAC1D,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACb,mGAAmG;IACnG,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACrB,2DAA2D;IAC3D,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;CACzC,GAAG,IAwBH,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,SACzB,UAAU,4CAC0B,cAAc,KACvD,OA0CF,CAAA;AAwBD;;GAEG;AACH,eAAO,MAAM,iBAAiB,SACtB,UAAU,SACT,cAAc,KACpB,OAwIF,CAAA;AAED,mGAAmG;AACnG,eAAO,MAAM,gBAAgB,SACrB,UAAU,iDAC+B,cAAc,KAC5D,OAoCF,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,aAAa,SAClB,UAAU,2CACyB,cAAc,KACtD,OA+BF,CAAA;AAED,sCAAsC;AACtC,eAAO,MAAM,iBAAiB,WACpB,SAAS,OACZ,MAAM,SACJ,MAAM,KACZ,SAAS,GAAG,IAmBd,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,SAC7B,UAAU,iEAC+C,cAAc,KAC5E,OA+EF,CAAA"}
1
+ {"version":3,"file":"live-sync.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/live-sync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAelE,OAAO,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EAEf,MAAM,6BAA6B,CAAA;AAEpC,OAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAK,MAAM,KAAK,CAAA;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,SACvB,UAAU,EAAE,eACN,MAAM,EAAE,KACnB,UAAU,EAqFZ,CAAA;AAED,kEAAkE;AAClE,eAAO,MAAM,YAAY,GAAI,CAAC,OACvB,MAAM,EAAE,aACF,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,aACjB,CAAC,QAAQ,EAAE,CAAC,KAAK,OAAO,KAClC,CAAC,GAAG,IAMN,CAAA;AASD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,WACpB,SAAS,QACX,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KACxB,SAAS,GAAG,IAqDd,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,UACjB,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,CAAC,QAC/B,UAAU,KACf;IACD,0DAA0D;IAC1D,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACb,mGAAmG;IACnG,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACrB,2DAA2D;IAC3D,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;CACzC,GAAG,IAwBH,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,SACzB,UAAU,wBACM,mBAAmB,0BACjB,cAAc,KACrC,OA0CF,CAAA;AAwBD;;GAEG;AACH,eAAO,MAAM,iBAAiB,SACtB,UAAU,wBACM,mBAAmB,SAClC,cAAc,KACpB,OAwIF,CAAA;AAED,mGAAmG;AACnG,eAAO,MAAM,gBAAgB,SACrB,UAAU,wBACM,mBAAmB,+BACZ,cAAc,KAC1C,OAoCF,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,aAAa,SAClB,UAAU,wBACM,mBAAmB,yBAClB,cAAc,KACpC,OA+BF,CAAA;AAED,sCAAsC;AACtC,eAAO,MAAM,iBAAiB,WACpB,SAAS,OACZ,MAAM,SACJ,MAAM,KACZ,SAAS,GAAG,IAmBd,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,SAC7B,UAAU,wBACM,mBAAmB,+CACI,cAAc,KAC1D,OA0CF,CAAA"}