@scalar/workspace-store 0.15.8 → 0.16.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.
Files changed (285) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/client.d.ts +1 -1
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +2 -2
  5. package/dist/client.js.map +2 -2
  6. package/dist/mutators/index.d.ts +6 -24
  7. package/dist/mutators/index.d.ts.map +1 -1
  8. package/dist/mutators/index.js +0 -2
  9. package/dist/mutators/index.js.map +2 -2
  10. package/dist/navigation/helpers/traverse-description.d.ts +1 -1
  11. package/dist/navigation/helpers/traverse-description.d.ts.map +1 -1
  12. package/dist/navigation/helpers/traverse-description.js.map +1 -1
  13. package/dist/navigation/helpers/traverse-document.d.ts +2 -182
  14. package/dist/navigation/helpers/traverse-document.d.ts.map +1 -1
  15. package/dist/navigation/helpers/traverse-document.js.map +2 -2
  16. package/dist/navigation/helpers/traverse-paths.d.ts.map +1 -1
  17. package/dist/navigation/helpers/traverse-paths.js +1 -1
  18. package/dist/navigation/helpers/traverse-paths.js.map +2 -2
  19. package/dist/navigation/helpers/traverse-schemas.d.ts +2 -1
  20. package/dist/navigation/helpers/traverse-schemas.d.ts.map +1 -1
  21. package/dist/navigation/helpers/traverse-schemas.js.map +2 -2
  22. package/dist/navigation/helpers/traverse-tags.d.ts +2 -1
  23. package/dist/navigation/helpers/traverse-tags.d.ts.map +1 -1
  24. package/dist/navigation/helpers/traverse-tags.js +1 -0
  25. package/dist/navigation/helpers/traverse-tags.js.map +2 -2
  26. package/dist/navigation/helpers/traverse-webhooks.d.ts +2 -1
  27. package/dist/navigation/helpers/traverse-webhooks.d.ts.map +1 -1
  28. package/dist/navigation/helpers/traverse-webhooks.js +1 -1
  29. package/dist/navigation/helpers/traverse-webhooks.js.map +2 -2
  30. package/dist/navigation/types.d.ts +2 -1
  31. package/dist/navigation/types.d.ts.map +1 -1
  32. package/dist/schemas/extensions/document/x-internal.d.ts +4 -0
  33. package/dist/schemas/extensions/document/x-internal.d.ts.map +1 -1
  34. package/dist/schemas/extensions/document/x-internal.js.map +1 -1
  35. package/dist/schemas/extensions/document/x-scalar-icon.d.ts +4 -0
  36. package/dist/schemas/extensions/document/x-scalar-icon.d.ts.map +1 -1
  37. package/dist/schemas/extensions/document/x-scalar-icon.js.map +1 -1
  38. package/dist/schemas/extensions/document/x-scalar-ignore.d.ts +4 -0
  39. package/dist/schemas/extensions/document/x-scalar-ignore.d.ts.map +1 -1
  40. package/dist/schemas/extensions/document/x-scalar-ignore.js.map +1 -1
  41. package/dist/schemas/extensions/document/x-scalar-sdk-installation.d.ts +8 -2
  42. package/dist/schemas/extensions/document/x-scalar-sdk-installation.d.ts.map +1 -1
  43. package/dist/schemas/extensions/document/x-scalar-sdk-installation.js.map +2 -2
  44. package/dist/schemas/extensions/document/x-tags.d.ts +3 -0
  45. package/dist/schemas/extensions/document/x-tags.d.ts.map +1 -1
  46. package/dist/schemas/extensions/document/x-tags.js.map +1 -1
  47. package/dist/schemas/extensions/operation/index.d.ts +2 -0
  48. package/dist/schemas/extensions/operation/index.d.ts.map +1 -0
  49. package/dist/schemas/extensions/operation/index.js +1 -0
  50. package/dist/schemas/extensions/operation/x-badge.d.ts +62 -22
  51. package/dist/schemas/extensions/operation/x-badge.d.ts.map +1 -1
  52. package/dist/schemas/extensions/operation/x-badge.js +24 -3
  53. package/dist/schemas/extensions/operation/x-badge.js.map +2 -2
  54. package/dist/schemas/extensions/operation/x-code-samples.d.ts +10 -0
  55. package/dist/schemas/extensions/operation/x-code-samples.d.ts.map +1 -1
  56. package/dist/schemas/extensions/operation/x-code-samples.js.map +1 -1
  57. package/dist/schemas/extensions/operation/x-post-response.d.ts +18 -0
  58. package/dist/schemas/extensions/operation/x-post-response.d.ts.map +1 -1
  59. package/dist/schemas/extensions/operation/x-post-response.js.map +1 -1
  60. package/dist/schemas/extensions/operation/x-scalar-stability.d.ts +11 -0
  61. package/dist/schemas/extensions/operation/x-scalar-stability.d.ts.map +1 -1
  62. package/dist/schemas/extensions/operation/x-scalar-stability.js.map +1 -1
  63. package/dist/schemas/extensions/schema/x-additional-properties-name.d.ts +10 -0
  64. package/dist/schemas/extensions/schema/x-additional-properties-name.d.ts.map +1 -1
  65. package/dist/schemas/extensions/schema/x-additional-properties-name.js.map +1 -1
  66. package/dist/schemas/extensions/schema/x-enum-descriptions.d.ts +30 -0
  67. package/dist/schemas/extensions/schema/x-enum-descriptions.d.ts.map +1 -1
  68. package/dist/schemas/extensions/schema/x-enum-descriptions.js.map +1 -1
  69. package/dist/schemas/extensions/schema/x-enum-varnames.d.ts +38 -0
  70. package/dist/schemas/extensions/schema/x-enum-varnames.d.ts.map +1 -1
  71. package/dist/schemas/extensions/schema/x-enum-varnames.js.map +1 -1
  72. package/dist/schemas/extensions/schema/x-variable.d.ts +3 -0
  73. package/dist/schemas/extensions/schema/x-variable.d.ts.map +1 -1
  74. package/dist/schemas/extensions/schema/x-variable.js.map +1 -1
  75. package/dist/schemas/extensions/security/x-default-scopes.d.ts +33 -0
  76. package/dist/schemas/extensions/security/x-default-scopes.d.ts.map +1 -0
  77. package/dist/schemas/extensions/security/x-default-scopes.js +8 -0
  78. package/dist/schemas/extensions/security/x-default-scopes.js.map +7 -0
  79. package/dist/schemas/extensions/security/x-scalar-credentials-location.d.ts +16 -0
  80. package/dist/schemas/extensions/security/x-scalar-credentials-location.d.ts.map +1 -1
  81. package/dist/schemas/extensions/security/x-scalar-credentials-location.js.map +1 -1
  82. package/dist/schemas/extensions/security/x-scalar-security-body.d.ts +15 -1
  83. package/dist/schemas/extensions/security/x-scalar-security-body.d.ts.map +1 -1
  84. package/dist/schemas/extensions/security/x-scalar-security-body.js +2 -2
  85. package/dist/schemas/extensions/security/x-scalar-security-body.js.map +2 -2
  86. package/dist/schemas/extensions/security/x-scalar-security-query.d.ts +15 -1
  87. package/dist/schemas/extensions/security/x-scalar-security-query.d.ts.map +1 -1
  88. package/dist/schemas/extensions/security/x-scalar-security-query.js +2 -2
  89. package/dist/schemas/extensions/security/x-scalar-security-query.js.map +2 -2
  90. package/dist/schemas/extensions/security/x-scalar-security-secrets.d.ts +68 -3
  91. package/dist/schemas/extensions/security/x-scalar-security-secrets.d.ts.map +1 -1
  92. package/dist/schemas/extensions/security/x-scalar-security-secrets.js +15 -3
  93. package/dist/schemas/extensions/security/x-scalar-security-secrets.js.map +2 -2
  94. package/dist/schemas/extensions/security/x-tokenName.d.ts +12 -1
  95. package/dist/schemas/extensions/security/x-tokenName.d.ts.map +1 -1
  96. package/dist/schemas/extensions/security/x-tokenName.js +2 -2
  97. package/dist/schemas/extensions/security/x-tokenName.js.map +2 -2
  98. package/dist/schemas/extensions/security/x-use-pkce.d.ts +7 -1
  99. package/dist/schemas/extensions/security/x-use-pkce.d.ts.map +1 -1
  100. package/dist/schemas/extensions/security/x-use-pkce.js +1 -3
  101. package/dist/schemas/extensions/security/x-use-pkce.js.map +2 -2
  102. package/dist/schemas/extensions/tag/x-display-name.d.ts +11 -0
  103. package/dist/schemas/extensions/tag/x-display-name.d.ts.map +1 -1
  104. package/dist/schemas/extensions/tag/x-display-name.js.map +1 -1
  105. package/dist/schemas/extensions/tag/x-tag-groups.d.ts +18 -0
  106. package/dist/schemas/extensions/tag/x-tag-groups.d.ts.map +1 -1
  107. package/dist/schemas/extensions/tag/x-tag-groups.js.map +2 -2
  108. package/dist/schemas/inmemory-workspace.d.ts +207 -86
  109. package/dist/schemas/inmemory-workspace.d.ts.map +1 -1
  110. package/dist/schemas/inmemory-workspace.js +4 -1
  111. package/dist/schemas/inmemory-workspace.js.map +2 -2
  112. package/dist/schemas/navigation.d.ts +50 -1
  113. package/dist/schemas/navigation.d.ts.map +1 -1
  114. package/dist/schemas/navigation.js +5 -9
  115. package/dist/schemas/navigation.js.map +2 -2
  116. package/dist/schemas/reference-config/appearance.d.ts +9 -2
  117. package/dist/schemas/reference-config/appearance.d.ts.map +1 -1
  118. package/dist/schemas/reference-config/appearance.js.map +2 -2
  119. package/dist/schemas/reference-config/features.d.ts +11 -2
  120. package/dist/schemas/reference-config/features.d.ts.map +1 -1
  121. package/dist/schemas/reference-config/features.js.map +2 -2
  122. package/dist/schemas/reference-config/index.d.ts +114 -45
  123. package/dist/schemas/reference-config/index.d.ts.map +1 -1
  124. package/dist/schemas/reference-config/index.js +5 -5
  125. package/dist/schemas/reference-config/index.js.map +2 -2
  126. package/dist/schemas/reference-config/meta.d.ts +8 -2
  127. package/dist/schemas/reference-config/meta.d.ts.map +1 -1
  128. package/dist/schemas/reference-config/meta.js.map +2 -2
  129. package/dist/schemas/reference-config/routing.d.ts +4 -2
  130. package/dist/schemas/reference-config/routing.d.ts.map +1 -1
  131. package/dist/schemas/reference-config/routing.js.map +2 -2
  132. package/dist/schemas/reference-config/settings.d.ts +105 -45
  133. package/dist/schemas/reference-config/settings.d.ts.map +1 -1
  134. package/dist/schemas/reference-config/settings.js.map +2 -2
  135. package/dist/schemas/v3.1/strict/callback.d.ts +4 -0
  136. package/dist/schemas/v3.1/strict/callback.d.ts.map +1 -1
  137. package/dist/schemas/v3.1/strict/callback.js +2 -2
  138. package/dist/schemas/v3.1/strict/callback.js.map +2 -2
  139. package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-cookies.d.ts +19 -3
  140. package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-cookies.d.ts.map +1 -1
  141. package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-cookies.js.map +2 -2
  142. package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.d.ts +10 -4
  143. package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.d.ts.map +1 -1
  144. package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.js.map +2 -2
  145. package/dist/schemas/v3.1/strict/components.d.ts +34 -0
  146. package/dist/schemas/v3.1/strict/components.d.ts.map +1 -1
  147. package/dist/schemas/v3.1/strict/components.js +1 -1
  148. package/dist/schemas/v3.1/strict/components.js.map +2 -2
  149. package/dist/schemas/v3.1/strict/contact.d.ts +9 -0
  150. package/dist/schemas/v3.1/strict/contact.d.ts.map +1 -1
  151. package/dist/schemas/v3.1/strict/contact.js.map +1 -1
  152. package/dist/schemas/v3.1/strict/discriminator.d.ts +11 -0
  153. package/dist/schemas/v3.1/strict/discriminator.d.ts.map +1 -1
  154. package/dist/schemas/v3.1/strict/discriminator.js.map +1 -1
  155. package/dist/schemas/v3.1/strict/encoding.d.ts +15 -0
  156. package/dist/schemas/v3.1/strict/encoding.d.ts.map +1 -1
  157. package/dist/schemas/v3.1/strict/encoding.js +1 -1
  158. package/dist/schemas/v3.1/strict/encoding.js.map +2 -2
  159. package/dist/schemas/v3.1/strict/example.d.ts +15 -0
  160. package/dist/schemas/v3.1/strict/example.d.ts.map +1 -1
  161. package/dist/schemas/v3.1/strict/example.js.map +1 -1
  162. package/dist/schemas/v3.1/strict/external-documentation.d.ts +9 -2
  163. package/dist/schemas/v3.1/strict/external-documentation.d.ts.map +1 -1
  164. package/dist/schemas/v3.1/strict/external-documentation.js +3 -3
  165. package/dist/schemas/v3.1/strict/external-documentation.js.map +2 -2
  166. package/dist/schemas/v3.1/strict/header.d.ts +41 -0
  167. package/dist/schemas/v3.1/strict/header.d.ts.map +1 -1
  168. package/dist/schemas/v3.1/strict/header.js +2 -2
  169. package/dist/schemas/v3.1/strict/header.js.map +2 -2
  170. package/dist/schemas/v3.1/strict/info.d.ts +24 -2
  171. package/dist/schemas/v3.1/strict/info.d.ts.map +1 -1
  172. package/dist/schemas/v3.1/strict/info.js +7 -5
  173. package/dist/schemas/v3.1/strict/info.js.map +2 -2
  174. package/dist/schemas/v3.1/strict/license.d.ts +9 -0
  175. package/dist/schemas/v3.1/strict/license.d.ts.map +1 -1
  176. package/dist/schemas/v3.1/strict/license.js.map +1 -1
  177. package/dist/schemas/v3.1/strict/link.d.ts +22 -0
  178. package/dist/schemas/v3.1/strict/link.d.ts.map +1 -1
  179. package/dist/schemas/v3.1/strict/link.js.map +2 -2
  180. package/dist/schemas/v3.1/strict/media-type.d.ts +19 -0
  181. package/dist/schemas/v3.1/strict/media-type.d.ts.map +1 -1
  182. package/dist/schemas/v3.1/strict/media-type.js +2 -2
  183. package/dist/schemas/v3.1/strict/media-type.js.map +2 -2
  184. package/dist/schemas/v3.1/strict/oauth-flow.d.ts +171 -29
  185. package/dist/schemas/v3.1/strict/oauth-flow.d.ts.map +1 -1
  186. package/dist/schemas/v3.1/strict/oauth-flow.js +43 -15
  187. package/dist/schemas/v3.1/strict/oauth-flow.js.map +2 -2
  188. package/dist/schemas/v3.1/strict/oauthflows.d.ts +78 -12
  189. package/dist/schemas/v3.1/strict/oauthflows.d.ts.map +1 -1
  190. package/dist/schemas/v3.1/strict/oauthflows.js.map +2 -2
  191. package/dist/schemas/v3.1/strict/openapi-document.d.ts +3369 -1476
  192. package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
  193. package/dist/schemas/v3.1/strict/openapi-document.js +45 -44
  194. package/dist/schemas/v3.1/strict/openapi-document.js.map +2 -2
  195. package/dist/schemas/v3.1/strict/operation.d.ts +44 -17
  196. package/dist/schemas/v3.1/strict/operation.d.ts.map +1 -1
  197. package/dist/schemas/v3.1/strict/operation.js +2 -3
  198. package/dist/schemas/v3.1/strict/operation.js.map +2 -2
  199. package/dist/schemas/v3.1/strict/parameter.d.ts +45 -0
  200. package/dist/schemas/v3.1/strict/parameter.d.ts.map +1 -1
  201. package/dist/schemas/v3.1/strict/parameter.js.map +2 -2
  202. package/dist/schemas/v3.1/strict/path-item.d.ts +38 -0
  203. package/dist/schemas/v3.1/strict/path-item.d.ts.map +1 -1
  204. package/dist/schemas/v3.1/strict/path-item.js +1 -1
  205. package/dist/schemas/v3.1/strict/path-item.js.map +2 -2
  206. package/dist/schemas/v3.1/strict/paths.d.ts +5 -0
  207. package/dist/schemas/v3.1/strict/paths.d.ts.map +1 -1
  208. package/dist/schemas/v3.1/strict/paths.js +1 -1
  209. package/dist/schemas/v3.1/strict/paths.js.map +2 -2
  210. package/dist/schemas/v3.1/strict/reference.d.ts +21 -4
  211. package/dist/schemas/v3.1/strict/reference.d.ts.map +1 -1
  212. package/dist/schemas/v3.1/strict/reference.js.map +2 -2
  213. package/dist/schemas/v3.1/strict/request-body.d.ts +10 -0
  214. package/dist/schemas/v3.1/strict/request-body.d.ts.map +1 -1
  215. package/dist/schemas/v3.1/strict/request-body.js +1 -1
  216. package/dist/schemas/v3.1/strict/request-body.js.map +2 -2
  217. package/dist/schemas/v3.1/strict/response.d.ts +17 -0
  218. package/dist/schemas/v3.1/strict/response.d.ts.map +1 -1
  219. package/dist/schemas/v3.1/strict/response.js +1 -1
  220. package/dist/schemas/v3.1/strict/response.js.map +2 -2
  221. package/dist/schemas/v3.1/strict/responses.d.ts +12 -0
  222. package/dist/schemas/v3.1/strict/responses.d.ts.map +1 -1
  223. package/dist/schemas/v3.1/strict/responses.js +1 -1
  224. package/dist/schemas/v3.1/strict/responses.js.map +2 -2
  225. package/dist/schemas/v3.1/strict/schema.d.ts +144 -1
  226. package/dist/schemas/v3.1/strict/schema.d.ts.map +1 -1
  227. package/dist/schemas/v3.1/strict/schema.js +40 -60
  228. package/dist/schemas/v3.1/strict/schema.js.map +2 -2
  229. package/dist/schemas/v3.1/strict/security-requirement.d.ts +12 -0
  230. package/dist/schemas/v3.1/strict/security-requirement.d.ts.map +1 -1
  231. package/dist/schemas/v3.1/strict/security-requirement.js.map +1 -1
  232. package/dist/schemas/v3.1/strict/security-scheme.d.ts +49 -8
  233. package/dist/schemas/v3.1/strict/security-scheme.d.ts.map +1 -1
  234. package/dist/schemas/v3.1/strict/security-scheme.js +3 -1
  235. package/dist/schemas/v3.1/strict/security-scheme.js.map +2 -2
  236. package/dist/schemas/v3.1/strict/server-variable.d.ts +9 -0
  237. package/dist/schemas/v3.1/strict/server-variable.d.ts.map +1 -1
  238. package/dist/schemas/v3.1/strict/server-variable.js.map +1 -1
  239. package/dist/schemas/v3.1/strict/server.d.ts +10 -0
  240. package/dist/schemas/v3.1/strict/server.d.ts.map +1 -1
  241. package/dist/schemas/v3.1/strict/server.js +1 -1
  242. package/dist/schemas/v3.1/strict/server.js.map +2 -2
  243. package/dist/schemas/v3.1/strict/tag.d.ts +13 -0
  244. package/dist/schemas/v3.1/strict/tag.d.ts.map +1 -1
  245. package/dist/schemas/v3.1/strict/tag.js +1 -1
  246. package/dist/schemas/v3.1/strict/tag.js.map +2 -2
  247. package/dist/schemas/v3.1/strict/type-guards.d.ts +1 -1
  248. package/dist/schemas/v3.1/strict/type-guards.d.ts.map +1 -1
  249. package/dist/schemas/v3.1/strict/type-guards.js.map +1 -1
  250. package/dist/schemas/v3.1/strict/xml.d.ts +17 -0
  251. package/dist/schemas/v3.1/strict/xml.d.ts.map +1 -1
  252. package/dist/schemas/v3.1/strict/xml.js.map +1 -1
  253. package/dist/schemas/workspace-specification/config.d.ts +101 -44
  254. package/dist/schemas/workspace-specification/config.d.ts.map +1 -1
  255. package/dist/schemas/workspace-specification/config.js.map +2 -2
  256. package/dist/schemas/workspace-specification/index.d.ts +110 -44
  257. package/dist/schemas/workspace-specification/index.d.ts.map +1 -1
  258. package/dist/schemas/workspace-specification/index.js.map +2 -2
  259. package/dist/schemas/workspace-specification/info.d.ts +4 -0
  260. package/dist/schemas/workspace-specification/info.d.ts.map +1 -1
  261. package/dist/schemas/workspace-specification/info.js.map +1 -1
  262. package/dist/schemas/workspace.d.ts +707 -300
  263. package/dist/schemas/workspace.d.ts.map +1 -1
  264. package/dist/schemas/workspace.js +11 -3
  265. package/dist/schemas/workspace.js.map +2 -2
  266. package/dist/server.d.ts +6 -5
  267. package/dist/server.d.ts.map +1 -1
  268. package/dist/server.js.map +2 -2
  269. package/package.json +9 -14
  270. package/dist/mutators/request-example.d.ts +0 -21
  271. package/dist/mutators/request-example.d.ts.map +0 -1
  272. package/dist/mutators/request-example.js +0 -55
  273. package/dist/mutators/request-example.js.map +0 -7
  274. package/dist/schemas/extensions/security/x-scalar-redirect-uri.d.ts +0 -4
  275. package/dist/schemas/extensions/security/x-scalar-redirect-uri.d.ts.map +0 -1
  276. package/dist/schemas/extensions/security/x-scalar-redirect-uri.js +0 -8
  277. package/dist/schemas/extensions/security/x-scalar-redirect-uri.js.map +0 -7
  278. package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-request-example.d.ts +0 -38
  279. package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-request-example.d.ts.map +0 -1
  280. package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-request-example.js +0 -45
  281. package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-request-example.js.map +0 -7
  282. package/dist/types.d.ts +0 -18
  283. package/dist/types.d.ts.map +0 -1
  284. package/dist/types.js +0 -1
  285. /package/dist/{types.js.map → schemas/extensions/operation/index.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/schemas/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,iBAAiB,CAAA;AAUnD,eAAO,MAAM,2BAA2B;;;EAKvC,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAG9E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAI3F,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG;IACtC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IAC5C,cAAc,EAAE,iBAAiB,GAAG,SAAS,CAAA;CAC9C,GAAG,mBAAmB,CAAA"}
@@ -2,9 +2,17 @@ import { Type } from "@scalar/typebox";
2
2
  import { AVAILABLE_CLIENTS } from "@scalar/types/snippetz";
3
3
  import { compose } from "../schemas/compose.js";
4
4
  import { extensions } from "../schemas/extensions.js";
5
- import { xScalarClientConfigCookiesSchema } from "../schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-cookies.js";
6
- import { xScalarClientConfigEnvironmentsSchema } from "../schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.js";
7
- import { OpenAPIDocumentSchema, SecuritySchemeObjectSchema, ServerObjectSchema } from "./v3.1/strict/openapi-document.js";
5
+ import {
6
+ xScalarClientConfigCookiesSchema
7
+ } from "../schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-cookies.js";
8
+ import {
9
+ xScalarClientConfigEnvironmentsSchema
10
+ } from "../schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.js";
11
+ import {
12
+ OpenAPIDocumentSchema,
13
+ SecuritySchemeObjectSchema,
14
+ ServerObjectSchema
15
+ } from "./v3.1/strict/openapi-document.js";
8
16
  const WorkspaceDocumentMetaSchema = Type.Partial(
9
17
  Type.Object({
10
18
  [extensions.document.activeAuth]: Type.String(),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/schemas/workspace.ts"],
4
- "sourcesContent": ["import { type Static, Type } from '@scalar/typebox'\nimport { AVAILABLE_CLIENTS } from '@scalar/types/snippetz'\n\nimport { compose } from '@/schemas/compose'\nimport { extensions } from '@/schemas/extensions'\nimport { xScalarClientConfigCookiesSchema } from '@/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-cookies'\nimport { xScalarClientConfigEnvironmentsSchema } from '@/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments'\n\nimport { OpenAPIDocumentSchema, SecuritySchemeObjectSchema, ServerObjectSchema } from './v3.1/strict/openapi-document'\n\nexport const WorkspaceDocumentMetaSchema = Type.Partial(\n Type.Object({\n [extensions.document.activeAuth]: Type.String(),\n [extensions.document.activeServer]: Type.String(),\n }),\n)\n\nexport type WorkspaceDocumentMeta = Static<typeof WorkspaceDocumentMetaSchema>\n\n// Note: use Type.Intersect to combine schemas here because Type.Compose does not work as expected with Modules\nexport const WorkspaceDocumentSchema = Type.Intersect([WorkspaceDocumentMetaSchema, OpenAPIDocumentSchema])\n\nexport type WorkspaceDocument = Static<typeof WorkspaceDocumentSchema>\n\nexport const WorkspaceMetaSchema = Type.Partial(\n Type.Object({\n [extensions.workspace.darkMode]: Type.Boolean(),\n [extensions.workspace.defaultClient]: Type.Union(AVAILABLE_CLIENTS.map((client) => Type.Literal(client))),\n [extensions.workspace.activeDocument]: Type.String(),\n [extensions.workspace.theme]: Type.String(),\n }),\n)\n\nexport type WorkspaceMeta = Static<typeof WorkspaceMetaSchema>\n\nexport const WorkspaceExtensionsSchema = Type.Partial(\n Type.Object({\n 'x-scalar-client-config-environments': xScalarClientConfigEnvironmentsSchema,\n 'x-scalar-client-config-cookies': xScalarClientConfigCookiesSchema,\n 'x-scalar-client-config-servers': Type.Array(ServerObjectSchema),\n 'x-scalar-client-config-security-schemes': Type.Record(Type.String(), SecuritySchemeObjectSchema),\n }),\n)\n\nexport type WorkspaceExtensions = Static<typeof WorkspaceExtensionsSchema>\n\nexport const WorkspaceSchema = compose(\n WorkspaceMetaSchema,\n Type.Object({\n documents: Type.Record(Type.String(), WorkspaceDocumentSchema),\n /** Active document is possibly undefined if we attempt to lookup with an invalid key */\n activeDocument: Type.Union([Type.Undefined(), WorkspaceDocumentSchema]),\n }),\n WorkspaceExtensionsSchema,\n)\n\nexport type Workspace = Static<typeof WorkspaceSchema>\n"],
5
- "mappings": "AAAA,SAAsB,YAAY;AAClC,SAAS,yBAAyB;AAElC,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAC3B,SAAS,wCAAwC;AACjD,SAAS,6CAA6C;AAEtD,SAAS,uBAAuB,4BAA4B,0BAA0B;AAE/E,MAAM,8BAA8B,KAAK;AAAA,EAC9C,KAAK,OAAO;AAAA,IACV,CAAC,WAAW,SAAS,UAAU,GAAG,KAAK,OAAO;AAAA,IAC9C,CAAC,WAAW,SAAS,YAAY,GAAG,KAAK,OAAO;AAAA,EAClD,CAAC;AACH;AAKO,MAAM,0BAA0B,KAAK,UAAU,CAAC,6BAA6B,qBAAqB,CAAC;AAInG,MAAM,sBAAsB,KAAK;AAAA,EACtC,KAAK,OAAO;AAAA,IACV,CAAC,WAAW,UAAU,QAAQ,GAAG,KAAK,QAAQ;AAAA,IAC9C,CAAC,WAAW,UAAU,aAAa,GAAG,KAAK,MAAM,kBAAkB,IAAI,CAAC,WAAW,KAAK,QAAQ,MAAM,CAAC,CAAC;AAAA,IACxG,CAAC,WAAW,UAAU,cAAc,GAAG,KAAK,OAAO;AAAA,IACnD,CAAC,WAAW,UAAU,KAAK,GAAG,KAAK,OAAO;AAAA,EAC5C,CAAC;AACH;AAIO,MAAM,4BAA4B,KAAK;AAAA,EAC5C,KAAK,OAAO;AAAA,IACV,uCAAuC;AAAA,IACvC,kCAAkC;AAAA,IAClC,kCAAkC,KAAK,MAAM,kBAAkB;AAAA,IAC/D,2CAA2C,KAAK,OAAO,KAAK,OAAO,GAAG,0BAA0B;AAAA,EAClG,CAAC;AACH;AAIO,MAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA,KAAK,OAAO;AAAA,IACV,WAAW,KAAK,OAAO,KAAK,OAAO,GAAG,uBAAuB;AAAA;AAAA,IAE7D,gBAAgB,KAAK,MAAM,CAAC,KAAK,UAAU,GAAG,uBAAuB,CAAC;AAAA,EACxE,CAAC;AAAA,EACD;AACF;",
4
+ "sourcesContent": ["import { Type } from '@scalar/typebox'\nimport { AVAILABLE_CLIENTS, type AvailableClients } from '@scalar/types/snippetz'\n\nimport { compose } from '@/schemas/compose'\nimport { extensions } from '@/schemas/extensions'\nimport {\n type XScalarClientConfigCookies,\n xScalarClientConfigCookiesSchema,\n} from '@/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-cookies'\nimport {\n type XScalarClientConfigEnvironments,\n xScalarClientConfigEnvironmentsSchema,\n} from '@/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments'\nimport type { SecuritySchemeObject } from '@/schemas/v3.1/strict/security-scheme'\nimport type { ServerObject } from '@/schemas/v3.1/strict/server'\n\nimport {\n OpenAPIDocumentSchema,\n type OpenApiDocument,\n SecuritySchemeObjectSchema,\n ServerObjectSchema,\n} from './v3.1/strict/openapi-document'\n\nexport const WorkspaceDocumentMetaSchema = Type.Partial(\n Type.Object({\n [extensions.document.activeAuth]: Type.String(),\n [extensions.document.activeServer]: Type.String(),\n }),\n)\n\nexport type WorkspaceDocumentMeta = {\n [extensions.document.activeAuth]?: string\n [extensions.document.activeServer]?: string\n}\n\n// Note: use Type.Intersect to combine schemas here because Type.Compose does not work as expected with Modules\nexport const WorkspaceDocumentSchema = Type.Intersect([WorkspaceDocumentMetaSchema, OpenAPIDocumentSchema])\n\nexport type WorkspaceDocument = WorkspaceDocumentMeta & OpenApiDocument\n\nexport const WorkspaceMetaSchema = Type.Partial(\n Type.Object({\n [extensions.workspace.darkMode]: Type.Boolean(),\n [extensions.workspace.defaultClient]: Type.Union(AVAILABLE_CLIENTS.map((client) => Type.Literal(client))),\n [extensions.workspace.activeDocument]: Type.String(),\n [extensions.workspace.theme]: Type.String(),\n }),\n)\n\nexport type WorkspaceMeta = {\n [extensions.workspace.darkMode]?: boolean\n [extensions.workspace.defaultClient]?: AvailableClients[number]\n [extensions.workspace.activeDocument]?: string\n [extensions.workspace.theme]?: string\n}\n\nexport const WorkspaceExtensionsSchema = Type.Partial(\n Type.Object({\n 'x-scalar-client-config-environments': xScalarClientConfigEnvironmentsSchema,\n 'x-scalar-client-config-cookies': xScalarClientConfigCookiesSchema,\n 'x-scalar-client-config-servers': Type.Array(ServerObjectSchema),\n 'x-scalar-client-config-security-schemes': Type.Record(Type.String(), SecuritySchemeObjectSchema),\n }),\n)\n\nexport type WorkspaceExtensions = {\n 'x-scalar-client-config-environments'?: XScalarClientConfigEnvironments\n 'x-scalar-client-config-cookies'?: XScalarClientConfigCookies\n 'x-scalar-client-config-servers'?: ServerObject[]\n 'x-scalar-client-config-security-schemes'?: Record<string, SecuritySchemeObject>\n}\n\nexport const WorkspaceSchema = compose(\n WorkspaceMetaSchema,\n Type.Object({\n documents: Type.Record(Type.String(), WorkspaceDocumentSchema),\n /** Active document is possibly undefined if we attempt to lookup with an invalid key */\n activeDocument: Type.Union([Type.Undefined(), WorkspaceDocumentSchema]),\n }),\n WorkspaceExtensionsSchema,\n)\n\nexport type Workspace = WorkspaceMeta & {\n documents: Record<string, WorkspaceDocument>\n activeDocument: WorkspaceDocument | undefined\n} & WorkspaceExtensions\n"],
5
+ "mappings": "AAAA,SAAS,YAAY;AACrB,SAAS,yBAAgD;AAEzD,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAC3B;AAAA,EAEE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,OACK;AAIP;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AAEA,MAAM,8BAA8B,KAAK;AAAA,EAC9C,KAAK,OAAO;AAAA,IACV,CAAC,WAAW,SAAS,UAAU,GAAG,KAAK,OAAO;AAAA,IAC9C,CAAC,WAAW,SAAS,YAAY,GAAG,KAAK,OAAO;AAAA,EAClD,CAAC;AACH;AAQO,MAAM,0BAA0B,KAAK,UAAU,CAAC,6BAA6B,qBAAqB,CAAC;AAInG,MAAM,sBAAsB,KAAK;AAAA,EACtC,KAAK,OAAO;AAAA,IACV,CAAC,WAAW,UAAU,QAAQ,GAAG,KAAK,QAAQ;AAAA,IAC9C,CAAC,WAAW,UAAU,aAAa,GAAG,KAAK,MAAM,kBAAkB,IAAI,CAAC,WAAW,KAAK,QAAQ,MAAM,CAAC,CAAC;AAAA,IACxG,CAAC,WAAW,UAAU,cAAc,GAAG,KAAK,OAAO;AAAA,IACnD,CAAC,WAAW,UAAU,KAAK,GAAG,KAAK,OAAO;AAAA,EAC5C,CAAC;AACH;AASO,MAAM,4BAA4B,KAAK;AAAA,EAC5C,KAAK,OAAO;AAAA,IACV,uCAAuC;AAAA,IACvC,kCAAkC;AAAA,IAClC,kCAAkC,KAAK,MAAM,kBAAkB;AAAA,IAC/D,2CAA2C,KAAK,OAAO,KAAK,OAAO,GAAG,0BAA0B;AAAA,EAClG,CAAC;AACH;AASO,MAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA,KAAK,OAAO;AAAA,IACV,WAAW,KAAK,OAAO,KAAK,OAAO,GAAG,uBAAuB;AAAA;AAAA,IAE7D,gBAAgB,KAAK,MAAM,CAAC,KAAK,UAAU,GAAG,uBAAuB,CAAC;AAAA,EACxE,CAAC;AAAA,EACD;AACF;",
6
6
  "names": []
7
7
  }
package/dist/server.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { extensions } from './schemas/extensions.js';
2
- import { type OpenApiDocument, type OperationObject, type PathsObject, type TraversedEntry } from './schemas/v3.1/strict/openapi-document.js';
2
+ import type { TraversedEntry } from './schemas/navigation.js';
3
+ import { type OpenApiDocument, type OperationObject, type PathsObject } from './schemas/v3.1/strict/openapi-document.js';
3
4
  import type { DocumentConfiguration } from './schemas/workspace-specification/config.js';
4
5
  import type { WorkspaceDocumentMeta, WorkspaceMeta } from './schemas/workspace.js';
5
6
  export declare const WORKSPACE_FILE_NAME = "scalar-workspace.json";
@@ -118,10 +119,10 @@ export declare function createServerWorkspaceStore(workspaceProps: CreateServerW
118
119
  documents: Record<string, OpenApiDocument & {
119
120
  [extensions.document.navigation]: TraversedEntry[];
120
121
  }>;
121
- "x-scalar-dark-mode"?: boolean | undefined;
122
- "x-scalar-default-client"?: "c/libcurl" | "clojure/clj_http" | "csharp/httpclient" | "csharp/restsharp" | "dart/http" | "go/native" | "http/http1.1" | "java/asynchttp" | "java/nethttp" | "java/okhttp" | "java/unirest" | "js/axios" | "js/fetch" | "js/jquery" | "js/ofetch" | "js/xhr" | "kotlin/okhttp" | "node/axios" | "node/fetch" | "node/ofetch" | "node/undici" | "objc/nsurlsession" | "ocaml/cohttp" | "php/curl" | "php/guzzle" | "powershell/restmethod" | "powershell/webrequest" | "python/python3" | "python/requests" | "python/httpx_sync" | "python/httpx_async" | "r/httr" | "ruby/native" | "rust/reqwest" | "shell/curl" | "shell/httpie" | "shell/wget" | "swift/nsurlsession" | undefined;
123
- "x-scalar-active-document"?: string | undefined;
124
- "x-scalar-theme"?: string | undefined;
122
+ "x-scalar-dark-mode"?: boolean;
123
+ "x-scalar-default-client"?: import("@scalar/snippetz").AvailableClients[number];
124
+ "x-scalar-active-document"?: string;
125
+ "x-scalar-theme"?: string;
125
126
  };
126
127
  /**
127
128
  * Retrieves a chunk of data from the workspace using a JSON Pointer
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MA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import { fetchUrls, readFiles } from '@scalar/json-magic/bundle/plugins/node'\nimport { escapeJsonPointer } from '@scalar/json-magic/helpers/escape-json-pointer'\nimport { upgrade } from '@scalar/openapi-upgrader'\n\nimport { keyOf } from '@/helpers/general'\nimport { createNavigation } from '@/navigation'\nimport { extensions } from '@/schemas/extensions'\nimport { coerceValue } from '@/schemas/typebox-coerce'\nimport {\n type ComponentsObject,\n OpenAPIDocumentSchema,\n type OpenApiDocument,\n type OperationObject,\n type PathsObject,\n type TraversedEntry,\n} from '@/schemas/v3.1/strict/openapi-document'\nimport type { DocumentConfiguration } from '@/schemas/workspace-specification/config'\n\nimport { getValueByPath, parseJsonPointer } from './helpers/json-path-utils'\nimport type { WorkspaceDocumentMeta, WorkspaceMeta } from './schemas/workspace'\n\nconst DEFAULT_ASSETS_FOLDER = 'assets'\nexport const WORKSPACE_FILE_NAME = 'scalar-workspace.json'\n\ntype WorkspaceDocumentMetaInput = {\n name: string\n meta?: WorkspaceDocumentMeta\n}\n\ntype UrlDoc = { url: string } & WorkspaceDocumentMetaInput\ntype FileDoc = { path: string } & WorkspaceDocumentMetaInput\ntype ObjectDoc = { document: Record<string, unknown> } & WorkspaceDocumentMetaInput\n\ntype WorkspaceDocumentInput = UrlDoc | ObjectDoc | FileDoc\n\ntype CreateServerWorkspaceStoreBase = {\n documents: WorkspaceDocumentInput[]\n meta?: WorkspaceMeta\n config?: DocumentConfiguration\n}\ntype CreateServerWorkspaceStore =\n | ({\n directory?: string\n mode: 'static'\n } & CreateServerWorkspaceStoreBase)\n | ({\n baseUrl: string\n mode: 'ssr'\n } & CreateServerWorkspaceStoreBase)\n\nconst httpMethods = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'])\n\n/**\n * Filters an OpenAPI PathsObject to only include standard HTTP methods.\n * Removes any vendor extensions or other non-HTTP properties.\n *\n * @param paths - The OpenAPI PathsObject to filter\n * @returns A new PathsObject containing only standard HTTP methods\n *\n * @example\n * Input: {\n * \"/users\": {\n * \"get\": {...},\n * \"x-custom\": {...},\n * \"post\": {...}\n * }\n * }\n * Output: {\n * \"/users\": {\n * \"get\": {...},\n * \"post\": {...}\n * }\n * }\n */\nexport function filterHttpMethodsOnly(paths: PathsObject): Record<string, Record<string, OperationObject>> {\n const result: Record<string, Record<string, OperationObject>> = {}\n\n // Todo: skip extension properties\n for (const [path, methods] of Object.entries(paths)) {\n if (!methods) {\n continue\n }\n\n const filteredMethods: Record<string, any> = {}\n\n for (const [method, operation] of Object.entries(methods)) {\n if (httpMethods.has(method.toLowerCase())) {\n filteredMethods[method] = operation\n }\n }\n\n if (Object.keys(filteredMethods).length > 0) {\n result[path] = filteredMethods\n }\n }\n\n return result\n}\n\n/**\n * Escapes path keys in an OpenAPI PathsObject to be JSON Pointer compatible.\n * This is necessary because OpenAPI paths can contain characters that need to be escaped\n * when used as JSON Pointer references (like '/' and '~').\n *\n * @example\n * Input: { \"/users/{id}\": { ... } }\n * Output: { \"/users~1{id}\": { ... } }\n */\nexport function escapePaths(\n paths: Record<string, Record<string, OperationObject>>,\n): Record<string, Record<string, OperationObject>> {\n const result: Record<string, Record<string, OperationObject>> = {}\n\n Object.keys(paths).forEach((path) => {\n if (paths[path]) {\n result[escapeJsonPointer(path)] = paths[path]\n }\n })\n\n return result\n}\n\n/**\n * Externalizes components by turning them into refs.\n */\nexport function externalizeComponentReferences(\n document: OpenApiDocument,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.components) {\n return result\n }\n\n Object.entries(document.components).forEach(([type, component]) => {\n if (!component || typeof component !== 'object') {\n return\n }\n\n result[type] = {}\n Object.keys(component).forEach((name) => {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/components/${type}/${name}#`\n : `./chunks/${meta.name}/components/${type}/${name}.json#`\n\n result[type][name] = { '$ref': ref, $global: true }\n })\n })\n\n return result\n}\n\n/**\n * Externalizes paths operations by turning them into refs.\n */\nexport function externalizePathReferences(\n document: OpenApiDocument,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.paths) {\n return result\n }\n\n Object.entries(document.paths).forEach(([path, pathItem]) => {\n if (!pathItem || typeof pathItem !== 'object') {\n return\n }\n\n const pathItemRecord = pathItem as Record<string, unknown>\n\n result[path] = {}\n\n const escapedPath = escapeJsonPointer(path)\n\n keyOf(pathItemRecord).forEach((type) => {\n if (httpMethods.has(type)) {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/operations/${escapedPath}/${type}#`\n : `./chunks/${meta.name}/operations/${escapedPath}/${type}.json#`\n\n result[path][type] = { '$ref': ref, $global: true }\n } else {\n result[path][type] = pathItemRecord[type]\n }\n })\n })\n\n return result\n}\n\n/**\n * Resolves a workspace document from various input sources (URL, local file, or direct document object).\n *\n * @param workspaceDocument - The document input to resolve, which can be:\n * - A URL to fetch the document from\n * - A local file path to read the document from\n * - A direct document object\n * @returns A promise that resolves to an object containing:\n * - ok: boolean indicating if the resolution was successful\n * - data: The resolved document data\n *\n * @example\n * // Resolve from URL\n * const urlDoc = await loadDocument({ name: 'api', url: 'https://api.example.com/openapi.json' })\n *\n * // Resolve direct document\n * const directDoc = await loadDocument({\n * name: 'inline',\n * document: { openapi: '3.0.0', paths: {} }\n * })\n */\nasync function loadDocument(workspaceDocument: WorkspaceDocumentInput) {\n if ('url' in workspaceDocument) {\n return fetchUrls().exec(workspaceDocument.url)\n }\n\n if ('path' in workspaceDocument) {\n return readFiles().exec(workspaceDocument.path)\n }\n\n return {\n ok: true as const,\n data: workspaceDocument.document,\n }\n}\n\n/**\n * Create server state workspace store\n */\nexport async function createServerWorkspaceStore(workspaceProps: CreateServerWorkspaceStore) {\n /**\n * Base workspace document containing essential metadata and document references.\n *\n * This workspace document provides the minimal information needed for initial rendering.\n * All components and path operations are replaced with references to enable lazy loading.\n *\n * In SSR mode, references point to API endpoints.\n * In static mode, references point to filesystem chunks.\n */\n const workspace = {\n ...workspaceProps.meta,\n documents: {} as Record<string, OpenApiDocument & { [extensions.document.navigation]: TraversedEntry[] }>,\n }\n\n /**\n * A map of document chunks that can be loaded asynchronously by the client.\n * Each document is split into components and operations to enable lazy loading.\n * The keys are document names and values contain the components and operations\n * for that document.\n */\n const assets = {} as Record<\n string,\n { components?: ComponentsObject; operations?: Record<string, Record<string, OperationObject>> }\n >\n\n /**\n * Adds a new document to the workspace.\n *\n * This function processes an OpenAPI document by:\n * 1. Converting it to OpenAPI 3.1 format if needed\n * 2. Separating it into reusable components and path operations\n * 3. Externalizing references based on the workspace mode (SSR or static)\n * 4. Adding the processed document to the workspace with its metadata\n *\n * The resulting document contains minimal information with externalized references\n * that will be resolved on-demand through the workspace's get() method.\n *\n * @param document - The OpenAPI document to process and add\n * @param meta - Document metadata containing the required name and optional settings\n */\n const addDocumentSync = (document: Record<string, unknown>, meta: { name: string } & WorkspaceDocumentMeta) => {\n const { name, ...documentMeta } = meta\n\n const documentV3 = coerceValue(OpenAPIDocumentSchema, upgrade(document, '3.1'))\n\n // add the assets\n assets[meta.name] = {\n components: documentV3.components,\n operations: documentV3.paths && escapePaths(filterHttpMethodsOnly(documentV3.paths)),\n }\n\n const options =\n workspaceProps.mode === 'ssr'\n ? { mode: workspaceProps.mode, name, baseUrl: workspaceProps.baseUrl }\n : { mode: workspaceProps.mode, name, directory: workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER }\n\n const components = externalizeComponentReferences(documentV3, options)\n const paths = externalizePathReferences(documentV3, options)\n\n // Build the sidebar entries\n const { entries } = createNavigation(documentV3, workspaceProps.config ?? {})\n\n // The document is now a minimal version with externalized references to components and operations.\n // These references will be resolved asynchronously when needed through the workspace's get() method.\n workspace.documents[meta.name] = {\n ...documentMeta,\n ...documentV3,\n components,\n paths,\n [extensions.document.navigation]: entries,\n }\n }\n\n /**\n * Adds a new document to the workspace asynchronously.\n *\n * This function:\n * 1. Loads the document using the provided input\n * 2. Checks if the document loaded successfully\n * 3. If successful, adds the document to the workspace using addDocumentSync\n *\n * @param input - The document input containing the document source and metadata\n */\n const addDocument = async (input: WorkspaceDocumentInput) => {\n const document = await loadDocument(input)\n\n if (!document.ok) {\n console.warn(`Failed to load document \"${input.name}`)\n return\n }\n\n addDocumentSync(document.data as Record<string, unknown>, { name: input.name, ...input.meta })\n }\n\n // Load and process all initial documents in parallel\n await Promise.all(workspaceProps.documents.map(addDocument))\n\n return {\n /**\n * Generates workspace chunks by writing components and operations to the filesystem.\n *\n * This method is only available in static mode. It creates a directory structure containing:\n * - A workspace file with metadata and document references\n * - Component chunks split by type (schemas, parameters, etc)\n * - Operation chunks split by path and HTTP method\n *\n * The generated workspace references will be relative file paths pointing to these chunks.\n *\n * @throws {Error} If called when mode is not 'static'\n */\n generateWorkspaceChunks: async () => {\n if (workspaceProps.mode !== 'static') {\n throw 'Mode has to be set to `static` to generate filesystem workspace chunks'\n }\n\n // Write the workspace document\n const basePath = `${cwd()}/${workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER}`\n await fs.mkdir(basePath, { recursive: true })\n\n // Write the workspace contents on the file system\n await fs.writeFile(`${basePath}/${WORKSPACE_FILE_NAME}`, JSON.stringify(workspace))\n\n // Write the chunks\n for (const [name, { components, operations }] of Object.entries(assets)) {\n // Write the components chunks\n if (components) {\n for (const [type, component] of Object.entries(components as Record<string, Record<string, unknown>>)) {\n const componentPath = `${basePath}/chunks/${name}/components/${type}`\n await fs.mkdir(componentPath, { recursive: true })\n\n for (const [key, value] of Object.entries(component)) {\n await fs.writeFile(`${componentPath}/${key}.json`, JSON.stringify(value))\n }\n }\n }\n\n // Write the operations chunks\n if (operations) {\n for (const [path, methods] of Object.entries(operations)) {\n const operationPath = `${basePath}/chunks/${name}/operations/${path}`\n await fs.mkdir(operationPath, { recursive: true })\n\n for (const [method, operation] of Object.entries(methods)) {\n await fs.writeFile(`${operationPath}/${method}.json`, JSON.stringify(operation))\n }\n }\n }\n }\n },\n /**\n * Returns the workspace document containing metadata and all sparse documents.\n *\n * The workspace document includes:\n * - Global workspace metadata (theme, active document, etc)\n * - Document metadata and sparse document\n * - In SSR mode: References point to in-memory chunks\n * - In static mode: References point to filesystem chunks\n *\n * @returns The complete workspace document\n */\n getWorkspace: () => {\n return workspace\n },\n /**\n * Retrieves a chunk of data from the workspace using a JSON Pointer\n *\n * A JSON Pointer is a string that references a specific location in a JSON document.\n * Only components and operations chunks can be retrieved.\n *\n * @example\n * ```ts\n * // Get a component\n * get('#/document-name/components/schemas/User')\n *\n * // Get an operation\n * get('#/document-name/operations/pets/get')\n * ```\n *\n * @param pointer - The JSON Pointer string to locate the chunk\n * @returns The chunk data if found, undefined otherwise\n */\n get: (pointer: string) => {\n return getValueByPath(assets, parseJsonPointer(pointer))\n },\n /**\n * Adds a new document to the workspace asynchronously.\n *\n * This function:\n * 1. Loads the document using the provided input\n * 2. Checks if the document loaded successfully\n * 3. If successful, adds the document to the workspace using addDocumentSync\n *\n * @param input - The document input containing the document source and metadata\n */\n addDocument,\n }\n}\n"],
5
- "mappings": "AAAA,OAAO,QAAQ;AACf,SAAS,WAAW;AAEpB,SAAS,WAAW,iBAAiB;AACrC,SAAS,yBAAyB;AAClC,SAAS,eAAe;AAExB,SAAS,aAAa;AACtB,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B;AAAA,EAEE;AAAA,OAKK;AAGP,SAAS,gBAAgB,wBAAwB;AAGjD,MAAM,wBAAwB;AACvB,MAAM,sBAAsB;AA4BnC,MAAM,cAAc,oBAAI,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,WAAW,QAAQ,SAAS,OAAO,CAAC;AAwB1F,SAAS,sBAAsB,OAAqE;AACzG,QAAM,SAA0D,CAAC;AAGjE,aAAW,CAAC,MAAM,OAAO,KAAK,OAAO,QAAQ,KAAK,GAAG;AACnD,QAAI,CAAC,SAAS;AACZ;AAAA,IACF;AA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import fs from 'node:fs/promises'\nimport { cwd } from 'node:process'\n\nimport { fetchUrls, readFiles } from '@scalar/json-magic/bundle/plugins/node'\nimport { escapeJsonPointer } from '@scalar/json-magic/helpers/escape-json-pointer'\nimport { upgrade } from '@scalar/openapi-upgrader'\n\nimport { keyOf } from '@/helpers/general'\nimport { createNavigation } from '@/navigation'\nimport { extensions } from '@/schemas/extensions'\nimport type { TraversedEntry } from '@/schemas/navigation'\nimport { coerceValue } from '@/schemas/typebox-coerce'\nimport {\n type ComponentsObject,\n OpenAPIDocumentSchema,\n type OpenApiDocument,\n type OperationObject,\n type PathsObject,\n} from '@/schemas/v3.1/strict/openapi-document'\nimport type { DocumentConfiguration } from '@/schemas/workspace-specification/config'\n\nimport { getValueByPath, parseJsonPointer } from './helpers/json-path-utils'\nimport type { WorkspaceDocumentMeta, WorkspaceMeta } from './schemas/workspace'\n\nconst DEFAULT_ASSETS_FOLDER = 'assets'\nexport const WORKSPACE_FILE_NAME = 'scalar-workspace.json'\n\ntype WorkspaceDocumentMetaInput = {\n name: string\n meta?: WorkspaceDocumentMeta\n}\n\ntype UrlDoc = { url: string } & WorkspaceDocumentMetaInput\ntype FileDoc = { path: string } & WorkspaceDocumentMetaInput\ntype ObjectDoc = { document: Record<string, unknown> } & WorkspaceDocumentMetaInput\n\ntype WorkspaceDocumentInput = UrlDoc | ObjectDoc | FileDoc\n\ntype CreateServerWorkspaceStoreBase = {\n documents: WorkspaceDocumentInput[]\n meta?: WorkspaceMeta\n config?: DocumentConfiguration\n}\ntype CreateServerWorkspaceStore =\n | ({\n directory?: string\n mode: 'static'\n } & CreateServerWorkspaceStoreBase)\n | ({\n baseUrl: string\n mode: 'ssr'\n } & CreateServerWorkspaceStoreBase)\n\nconst httpMethods = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'])\n\n/**\n * Filters an OpenAPI PathsObject to only include standard HTTP methods.\n * Removes any vendor extensions or other non-HTTP properties.\n *\n * @param paths - The OpenAPI PathsObject to filter\n * @returns A new PathsObject containing only standard HTTP methods\n *\n * @example\n * Input: {\n * \"/users\": {\n * \"get\": {...},\n * \"x-custom\": {...},\n * \"post\": {...}\n * }\n * }\n * Output: {\n * \"/users\": {\n * \"get\": {...},\n * \"post\": {...}\n * }\n * }\n */\nexport function filterHttpMethodsOnly(paths: PathsObject): Record<string, Record<string, OperationObject>> {\n const result: Record<string, Record<string, OperationObject>> = {}\n\n // Todo: skip extension properties\n for (const [path, methods] of Object.entries(paths)) {\n if (!methods) {\n continue\n }\n\n const filteredMethods: Record<string, any> = {}\n\n for (const [method, operation] of Object.entries(methods)) {\n if (httpMethods.has(method.toLowerCase())) {\n filteredMethods[method] = operation\n }\n }\n\n if (Object.keys(filteredMethods).length > 0) {\n result[path] = filteredMethods\n }\n }\n\n return result\n}\n\n/**\n * Escapes path keys in an OpenAPI PathsObject to be JSON Pointer compatible.\n * This is necessary because OpenAPI paths can contain characters that need to be escaped\n * when used as JSON Pointer references (like '/' and '~').\n *\n * @example\n * Input: { \"/users/{id}\": { ... } }\n * Output: { \"/users~1{id}\": { ... } }\n */\nexport function escapePaths(\n paths: Record<string, Record<string, OperationObject>>,\n): Record<string, Record<string, OperationObject>> {\n const result: Record<string, Record<string, OperationObject>> = {}\n\n Object.keys(paths).forEach((path) => {\n if (paths[path]) {\n result[escapeJsonPointer(path)] = paths[path]\n }\n })\n\n return result\n}\n\n/**\n * Externalizes components by turning them into refs.\n */\nexport function externalizeComponentReferences(\n document: OpenApiDocument,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.components) {\n return result\n }\n\n Object.entries(document.components).forEach(([type, component]) => {\n if (!component || typeof component !== 'object') {\n return\n }\n\n result[type] = {}\n Object.keys(component).forEach((name) => {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/components/${type}/${name}#`\n : `./chunks/${meta.name}/components/${type}/${name}.json#`\n\n result[type][name] = { '$ref': ref, $global: true }\n })\n })\n\n return result\n}\n\n/**\n * Externalizes paths operations by turning them into refs.\n */\nexport function externalizePathReferences(\n document: OpenApiDocument,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.paths) {\n return result\n }\n\n Object.entries(document.paths).forEach(([path, pathItem]) => {\n if (!pathItem || typeof pathItem !== 'object') {\n return\n }\n\n const pathItemRecord = pathItem as Record<string, unknown>\n\n result[path] = {}\n\n const escapedPath = escapeJsonPointer(path)\n\n keyOf(pathItemRecord).forEach((type) => {\n if (httpMethods.has(type)) {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/operations/${escapedPath}/${type}#`\n : `./chunks/${meta.name}/operations/${escapedPath}/${type}.json#`\n\n result[path][type] = { '$ref': ref, $global: true }\n } else {\n result[path][type] = pathItemRecord[type]\n }\n })\n })\n\n return result\n}\n\n/**\n * Resolves a workspace document from various input sources (URL, local file, or direct document object).\n *\n * @param workspaceDocument - The document input to resolve, which can be:\n * - A URL to fetch the document from\n * - A local file path to read the document from\n * - A direct document object\n * @returns A promise that resolves to an object containing:\n * - ok: boolean indicating if the resolution was successful\n * - data: The resolved document data\n *\n * @example\n * // Resolve from URL\n * const urlDoc = await loadDocument({ name: 'api', url: 'https://api.example.com/openapi.json' })\n *\n * // Resolve direct document\n * const directDoc = await loadDocument({\n * name: 'inline',\n * document: { openapi: '3.0.0', paths: {} }\n * })\n */\nasync function loadDocument(workspaceDocument: WorkspaceDocumentInput) {\n if ('url' in workspaceDocument) {\n return fetchUrls().exec(workspaceDocument.url)\n }\n\n if ('path' in workspaceDocument) {\n return readFiles().exec(workspaceDocument.path)\n }\n\n return {\n ok: true as const,\n data: workspaceDocument.document,\n }\n}\n\n/**\n * Create server state workspace store\n */\nexport async function createServerWorkspaceStore(workspaceProps: CreateServerWorkspaceStore) {\n /**\n * Base workspace document containing essential metadata and document references.\n *\n * This workspace document provides the minimal information needed for initial rendering.\n * All components and path operations are replaced with references to enable lazy loading.\n *\n * In SSR mode, references point to API endpoints.\n * In static mode, references point to filesystem chunks.\n */\n const workspace = {\n ...workspaceProps.meta,\n documents: {} as Record<string, OpenApiDocument & { [extensions.document.navigation]: TraversedEntry[] }>,\n }\n\n /**\n * A map of document chunks that can be loaded asynchronously by the client.\n * Each document is split into components and operations to enable lazy loading.\n * The keys are document names and values contain the components and operations\n * for that document.\n */\n const assets = {} as Record<\n string,\n { components?: ComponentsObject; operations?: Record<string, Record<string, OperationObject>> }\n >\n\n /**\n * Adds a new document to the workspace.\n *\n * This function processes an OpenAPI document by:\n * 1. Converting it to OpenAPI 3.1 format if needed\n * 2. Separating it into reusable components and path operations\n * 3. Externalizing references based on the workspace mode (SSR or static)\n * 4. Adding the processed document to the workspace with its metadata\n *\n * The resulting document contains minimal information with externalized references\n * that will be resolved on-demand through the workspace's get() method.\n *\n * @param document - The OpenAPI document to process and add\n * @param meta - Document metadata containing the required name and optional settings\n */\n const addDocumentSync = (document: Record<string, unknown>, meta: { name: string } & WorkspaceDocumentMeta) => {\n const { name, ...documentMeta } = meta\n\n const documentV3 = coerceValue(OpenAPIDocumentSchema, upgrade(document, '3.1'))\n\n // add the assets\n assets[meta.name] = {\n components: documentV3.components,\n operations: documentV3.paths && escapePaths(filterHttpMethodsOnly(documentV3.paths)),\n }\n\n const options =\n workspaceProps.mode === 'ssr'\n ? { mode: workspaceProps.mode, name, baseUrl: workspaceProps.baseUrl }\n : { mode: workspaceProps.mode, name, directory: workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER }\n\n const components = externalizeComponentReferences(documentV3, options)\n const paths = externalizePathReferences(documentV3, options)\n\n // Build the sidebar entries\n const { entries } = createNavigation(documentV3, workspaceProps.config ?? {})\n\n // The document is now a minimal version with externalized references to components and operations.\n // These references will be resolved asynchronously when needed through the workspace's get() method.\n workspace.documents[meta.name] = {\n ...documentMeta,\n ...documentV3,\n components,\n paths,\n [extensions.document.navigation]: entries,\n }\n }\n\n /**\n * Adds a new document to the workspace asynchronously.\n *\n * This function:\n * 1. Loads the document using the provided input\n * 2. Checks if the document loaded successfully\n * 3. If successful, adds the document to the workspace using addDocumentSync\n *\n * @param input - The document input containing the document source and metadata\n */\n const addDocument = async (input: WorkspaceDocumentInput) => {\n const document = await loadDocument(input)\n\n if (!document.ok) {\n console.warn(`Failed to load document \"${input.name}`)\n return\n }\n\n addDocumentSync(document.data as Record<string, unknown>, { name: input.name, ...input.meta })\n }\n\n // Load and process all initial documents in parallel\n await Promise.all(workspaceProps.documents.map(addDocument))\n\n return {\n /**\n * Generates workspace chunks by writing components and operations to the filesystem.\n *\n * This method is only available in static mode. It creates a directory structure containing:\n * - A workspace file with metadata and document references\n * - Component chunks split by type (schemas, parameters, etc)\n * - Operation chunks split by path and HTTP method\n *\n * The generated workspace references will be relative file paths pointing to these chunks.\n *\n * @throws {Error} If called when mode is not 'static'\n */\n generateWorkspaceChunks: async () => {\n if (workspaceProps.mode !== 'static') {\n throw 'Mode has to be set to `static` to generate filesystem workspace chunks'\n }\n\n // Write the workspace document\n const basePath = `${cwd()}/${workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER}`\n await fs.mkdir(basePath, { recursive: true })\n\n // Write the workspace contents on the file system\n await fs.writeFile(`${basePath}/${WORKSPACE_FILE_NAME}`, JSON.stringify(workspace))\n\n // Write the chunks\n for (const [name, { components, operations }] of Object.entries(assets)) {\n // Write the components chunks\n if (components) {\n for (const [type, component] of Object.entries(components as Record<string, Record<string, unknown>>)) {\n const componentPath = `${basePath}/chunks/${name}/components/${type}`\n await fs.mkdir(componentPath, { recursive: true })\n\n for (const [key, value] of Object.entries(component)) {\n await fs.writeFile(`${componentPath}/${key}.json`, JSON.stringify(value))\n }\n }\n }\n\n // Write the operations chunks\n if (operations) {\n for (const [path, methods] of Object.entries(operations)) {\n const operationPath = `${basePath}/chunks/${name}/operations/${path}`\n await fs.mkdir(operationPath, { recursive: true })\n\n for (const [method, operation] of Object.entries(methods)) {\n await fs.writeFile(`${operationPath}/${method}.json`, JSON.stringify(operation))\n }\n }\n }\n }\n },\n /**\n * Returns the workspace document containing metadata and all sparse documents.\n *\n * The workspace document includes:\n * - Global workspace metadata (theme, active document, etc)\n * - Document metadata and sparse document\n * - In SSR mode: References point to in-memory chunks\n * - In static mode: References point to filesystem chunks\n *\n * @returns The complete workspace document\n */\n getWorkspace: () => {\n return workspace\n },\n /**\n * Retrieves a chunk of data from the workspace using a JSON Pointer\n *\n * A JSON Pointer is a string that references a specific location in a JSON document.\n * Only components and operations chunks can be retrieved.\n *\n * @example\n * ```ts\n * // Get a component\n * get('#/document-name/components/schemas/User')\n *\n * // Get an operation\n * get('#/document-name/operations/pets/get')\n * ```\n *\n * @param pointer - The JSON Pointer string to locate the chunk\n * @returns The chunk data if found, undefined otherwise\n */\n get: (pointer: string) => {\n return getValueByPath(assets, parseJsonPointer(pointer))\n },\n /**\n * Adds a new document to the workspace asynchronously.\n *\n * This function:\n * 1. Loads the document using the provided input\n * 2. Checks if the document loaded successfully\n * 3. If successful, adds the document to the workspace using addDocumentSync\n *\n * @param input - The document input containing the document source and metadata\n */\n addDocument,\n }\n}\n"],
5
+ "mappings": "AAAA,OAAO,QAAQ;AACf,SAAS,WAAW;AAEpB,SAAS,WAAW,iBAAiB;AACrC,SAAS,yBAAyB;AAClC,SAAS,eAAe;AAExB,SAAS,aAAa;AACtB,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAE3B,SAAS,mBAAmB;AAC5B;AAAA,EAEE;AAAA,OAIK;AAGP,SAAS,gBAAgB,wBAAwB;AAGjD,MAAM,wBAAwB;AACvB,MAAM,sBAAsB;AA4BnC,MAAM,cAAc,oBAAI,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,WAAW,QAAQ,SAAS,OAAO,CAAC;AAwB1F,SAAS,sBAAsB,OAAqE;AACzG,QAAM,SAA0D,CAAC;AAGjE,aAAW,CAAC,MAAM,OAAO,KAAK,OAAO,QA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;AAAA;AAAA;AAAA,IAWA;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "openapi",
17
17
  "scalar"
18
18
  ],
19
- "version": "0.15.8",
19
+ "version": "0.16.2",
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
@@ -47,21 +47,16 @@
47
47
  "types": "./dist/helpers/*.d.ts",
48
48
  "default": "./dist/helpers/*.js"
49
49
  },
50
- "./schemas/extensions/*": {
51
- "import": "./dist/schemas/extensions/*.js",
52
- "types": "./dist/schemas/extensions/*.d.ts",
53
- "default": "./dist/schemas/extensions/*.js"
50
+ "./schemas/extensions/operation": {
51
+ "import": "./dist/schemas/extensions/operation/index.js",
52
+ "types": "./dist/schemas/extensions/operation/index.d.ts",
53
+ "default": "./dist/schemas/extensions/operation/index.js"
54
54
  },
55
55
  "./schemas/v3.1/*": {
56
56
  "import": "./dist/schemas/v3.1/*.js",
57
57
  "types": "./dist/schemas/v3.1/*.d.ts",
58
58
  "default": "./dist/schemas/v3.1/*.js"
59
59
  },
60
- "./schemas/v3.1/strict/*": {
61
- "import": "./dist/schemas/v3.1/strict/*.js",
62
- "types": "./dist/schemas/v3.1/strict/*.d.ts",
63
- "default": "./dist/schemas/v3.1/strict/*.js"
64
- },
65
60
  "./server": {
66
61
  "import": "./dist/server.js",
67
62
  "types": "./dist/server.d.ts",
@@ -85,10 +80,10 @@
85
80
  "yaml": "2.8.0",
86
81
  "@scalar/code-highlight": "0.2.0",
87
82
  "@scalar/helpers": "0.0.11",
88
- "@scalar/json-magic": "0.5.1",
89
- "@scalar/openapi-upgrader": "0.1.0",
90
- "@scalar/snippetz": "0.4.10",
91
- "@scalar/types": "0.2.16"
83
+ "@scalar/json-magic": "0.6.0",
84
+ "@scalar/openapi-upgrader": "0.1.1",
85
+ "@scalar/types": "0.3.0",
86
+ "@scalar/snippetz": "0.4.11"
92
87
  },
93
88
  "devDependencies": {
94
89
  "@google-cloud/storage": "7.16.0",
@@ -1,21 +0,0 @@
1
- import type { OperationIdentifier } from '../mutators/request.js';
2
- import type { WorkspaceDocument } from '../schemas.js';
3
- import type { XScalarClientConfigRequestExample } from '../schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-request-example.js';
4
- /**
5
- * Provides mutator functions for managing request examples within OpenAPI operations.
6
- * This module contains utilities for adding and deleting request examples that are
7
- * stored as custom extensions on OpenAPI operations.
8
- *
9
- * @param document - The workspace document to operate on
10
- * @returns Object containing mutator functions for request example operations
11
- */
12
- export declare const requestExampleMutators: (document?: WorkspaceDocument) => {
13
- addRequestExample: ({ path, method, slug, request, }: OperationIdentifier & {
14
- slug: string;
15
- request: XScalarClientConfigRequestExample;
16
- }) => boolean;
17
- deleteRequestExample: ({ path, method, slug }: OperationIdentifier & {
18
- slug: string;
19
- }) => boolean;
20
- };
21
- //# sourceMappingURL=request-example.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"request-example.d.ts","sourceRoot":"","sources":["../../src/mutators/request-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAClD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,uFAAuF,CAAA;AAE9I;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GAAI,WAAW,iBAAiB;0DA4B9D,mBAAmB,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,iCAAiC,CAAA;KAAE;mDA6C/B,mBAAmB,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;CA8B7F,CAAA"}
@@ -1,55 +0,0 @@
1
- import { getResolvedRef } from "../helpers/get-resolved-ref.js";
2
- const requestExampleMutators = (document) => {
3
- const addRequestExample = ({
4
- path,
5
- method,
6
- slug,
7
- request
8
- }) => {
9
- if (!document || !document.paths) {
10
- return false;
11
- }
12
- if (!document.paths[path]) {
13
- document.paths[path] = {};
14
- }
15
- if (!document.paths[path][method]) {
16
- document.paths[path][method] = {};
17
- }
18
- const operation = getResolvedRef(document.paths[path][method]);
19
- if (!operation["x-scalar-client-config-request-example"]) {
20
- operation["x-scalar-client-config-request-example"] = {};
21
- }
22
- if (operation["x-scalar-client-config-request-example"][slug]) {
23
- console.warn(`Request example with slug "${slug}" already exists for ${method.toUpperCase()} ${path}.`);
24
- return false;
25
- }
26
- operation["x-scalar-client-config-request-example"][slug] = request;
27
- return true;
28
- };
29
- const deleteRequestExample = ({ path, method, slug }) => {
30
- if (!document) {
31
- return false;
32
- }
33
- const pathObject = document?.paths?.[path];
34
- if (!pathObject) {
35
- return false;
36
- }
37
- const operation = getResolvedRef(pathObject[method]);
38
- if (!operation) {
39
- return false;
40
- }
41
- if (!operation["x-scalar-client-config-request-example"]) {
42
- return false;
43
- }
44
- delete operation["x-scalar-client-config-request-example"][slug];
45
- return true;
46
- };
47
- return {
48
- addRequestExample,
49
- deleteRequestExample
50
- };
51
- };
52
- export {
53
- requestExampleMutators
54
- };
55
- //# sourceMappingURL=request-example.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/mutators/request-example.ts"],
4
- "sourcesContent": ["import { getResolvedRef } from '@/helpers/get-resolved-ref'\nimport type { OperationIdentifier } from '@/mutators/request'\nimport type { WorkspaceDocument } from '@/schemas'\nimport type { XScalarClientConfigRequestExample } from '@/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-request-example'\n\n/**\n * Provides mutator functions for managing request examples within OpenAPI operations.\n * This module contains utilities for adding and deleting request examples that are\n * stored as custom extensions on OpenAPI operations.\n *\n * @param document - The workspace document to operate on\n * @returns Object containing mutator functions for request example operations\n */\nexport const requestExampleMutators = (document?: WorkspaceDocument) => {\n /**\n * Adds a new request example to an OpenAPI operation.\n * Request examples are stored as custom extensions under the 'x-scalar-client-config-request-example' key.\n *\n * @param path - The path of the operation to add the example to\n * @param method - The HTTP method of the operation\n * @param slug - A unique identifier for the request example\n * @param request - The request example configuration to add\n * @returns true if the example was successfully added, false otherwise\n *\n * @example\n * // Add a request example for a POST operation\n * addRequestExample({\n * path: '/users',\n * method: 'post',\n * slug: 'create-user',\n * request: {\n * body: { name: 'John Doe', email: 'john@example.com' },\n * headers: { 'Content-Type': 'application/json' }\n * }\n * })\n */\n const addRequestExample = ({\n path,\n method,\n slug,\n request,\n }: OperationIdentifier & { slug: string; request: XScalarClientConfigRequestExample }) => {\n if (!document || !document.paths) {\n return false\n }\n\n if (!document.paths[path]) {\n document.paths[path] = {}\n }\n\n if (!document.paths[path][method]) {\n document.paths[path][method] = {}\n }\n\n const operation = getResolvedRef(document.paths[path][method])\n\n // Create a new request example if it doesn't exist\n if (!operation['x-scalar-client-config-request-example']) {\n operation['x-scalar-client-config-request-example'] = {}\n }\n\n if (operation['x-scalar-client-config-request-example'][slug]) {\n console.warn(`Request example with slug \"${slug}\" already exists for ${method.toUpperCase()} ${path}.`)\n return false\n }\n\n operation['x-scalar-client-config-request-example'][slug] = request\n return true\n }\n\n /**\n * Deletes a request example from an OpenAPI operation by its slug.\n *\n * @param path - The path of the operation containing the example\n * @param method - The HTTP method of the operation\n * @param slug - The unique identifier of the request example to delete\n * @returns true if the example was successfully deleted, false otherwise\n *\n * @example\n * // Delete a request example from a POST operation\n * deleteRequestExample({\n * path: '/users',\n * method: 'post',\n * slug: 'create-user'\n * })\n */\n const deleteRequestExample = ({ path, method, slug }: OperationIdentifier & { slug: string }) => {\n if (!document) {\n return false\n }\n\n const pathObject = document?.paths?.[path]\n\n if (!pathObject) {\n return false\n }\n\n const operation = getResolvedRef(pathObject[method])\n\n if (!operation) {\n return false\n }\n\n if (!operation['x-scalar-client-config-request-example']) {\n return false\n }\n\n // Delete the request example by slug\n delete operation['x-scalar-client-config-request-example'][slug]\n return true\n }\n\n return {\n addRequestExample,\n deleteRequestExample,\n }\n}\n"],
5
- "mappings": "AAAA,SAAS,sBAAsB;AAaxB,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@@
1
- export declare const XScalarRedirectUriSchema: import("@scalar/typebox").TObject<{
2
- 'x-scalar-redirect-uri': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
3
- }>;
4
- //# sourceMappingURL=x-scalar-redirect-uri.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-scalar-redirect-uri.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/security/x-scalar-redirect-uri.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB;;EAEnC,CAAA"}
@@ -1,8 +0,0 @@
1
- import { Type } from "@scalar/typebox";
2
- const XScalarRedirectUriSchema = Type.Object({
3
- "x-scalar-redirect-uri": Type.Optional(Type.String())
4
- });
5
- export {
6
- XScalarRedirectUriSchema
7
- };
8
- //# sourceMappingURL=x-scalar-redirect-uri.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/schemas/extensions/security/x-scalar-redirect-uri.ts"],
4
- "sourcesContent": ["import { Type } from '@scalar/typebox'\n\nexport const XScalarRedirectUriSchema = Type.Object({\n 'x-scalar-redirect-uri': Type.Optional(Type.String()),\n})\n"],
5
- "mappings": "AAAA,SAAS,YAAY;AAEd,MAAM,2BAA2B,KAAK,OAAO;AAAA,EAClD,yBAAyB,KAAK,SAAS,KAAK,OAAO,CAAC;AACtD,CAAC;",
6
- "names": []
7
- }
@@ -1,38 +0,0 @@
1
- import { type Static, type TLiteral } from '@scalar/typebox';
2
- export declare const exampleBodyMime: readonly ["application/json", "text/plain", "text/html", "application/javascript", "application/xml", "application/yaml", "application/edn", "application/octet-stream", "application/x-www-form-urlencoded", "multipart/form-data", "binary"];
3
- declare const xScalarFileValueSchema: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TObject<{
4
- url: import("@scalar/typebox").TString;
5
- base64: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
6
- }>, import("@scalar/typebox").TNull]>;
7
- export type XScalarFileValue = Static<typeof xScalarFileValueSchema>;
8
- declare const xScalarExampleBodySchema: import("@scalar/typebox").TObject<{
9
- encoding: TLiteral<(typeof exampleBodyMime)[number]>;
10
- content: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TAny>, import("@scalar/typebox").TString]>;
11
- file: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TObject<{
12
- url: import("@scalar/typebox").TString;
13
- base64: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
14
- }>, import("@scalar/typebox").TNull]>>;
15
- }>;
16
- export type XScalarExampleBody = Static<typeof xScalarExampleBodySchema>;
17
- declare const xScalarExampleParameterSchema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>>;
18
- export type XScalarExampleParameter = Static<typeof xScalarExampleParameterSchema>;
19
- export declare const xScalarClientConfigRequestExampleSchema: import("@scalar/typebox").TObject<{
20
- name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
21
- body: import("@scalar/typebox").TOptional<import("@scalar/typebox").TObject<{
22
- encoding: TLiteral<(typeof exampleBodyMime)[number]>;
23
- content: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TAny>, import("@scalar/typebox").TString]>;
24
- file: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TObject<{
25
- url: import("@scalar/typebox").TString;
26
- base64: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
27
- }>, import("@scalar/typebox").TNull]>>;
28
- }>>;
29
- parameters: import("@scalar/typebox").TOptional<import("@scalar/typebox").TObject<{
30
- path: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>>;
31
- query: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>>;
32
- header: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>>;
33
- cookie: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>>;
34
- }>>;
35
- }>;
36
- export type XScalarClientConfigRequestExample = Static<typeof xScalarClientConfigRequestExampleSchema>;
37
- export {};
38
- //# sourceMappingURL=x-scalar-client-config-request-example.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-scalar-client-config-request-example.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-request-example.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAQ,MAAM,iBAAiB,CAAA;AAElE,eAAO,MAAM,eAAe,gPAalB,CAAA;AAEV,QAAA,MAAM,sBAAsB;;;qCAM1B,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAEpE,QAAA,MAAM,wBAAwB;cACsD,QAAQ,CACxF,CAAC,OAAO,eAAe,EAAE,MAAM,CAAC,CACjC;;;;;;EAGD,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAExE,QAAA,MAAM,6BAA6B,8IAA2D,CAAA;AAE9F,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAElF,eAAO,MAAM,uCAAuC;;;kBAbgC,QAAQ,CACxF,CAAC,OAAO,eAAe,EAAE,MAAM,CAAC,CACjC;;;;;;;;;;;;;EAsBF,CAAA;AAED,MAAM,MAAM,iCAAiC,GAAG,MAAM,CAAC,OAAO,uCAAuC,CAAC,CAAA"}
@@ -1,45 +0,0 @@
1
- import { Type } from "@scalar/typebox";
2
- const exampleBodyMime = [
3
- "application/json",
4
- "text/plain",
5
- "text/html",
6
- "application/javascript",
7
- "application/xml",
8
- "application/yaml",
9
- "application/edn",
10
- "application/octet-stream",
11
- "application/x-www-form-urlencoded",
12
- "multipart/form-data",
13
- /** Used for direct files */
14
- "binary"
15
- ];
16
- const xScalarFileValueSchema = Type.Union([
17
- Type.Object({
18
- url: Type.String(),
19
- base64: Type.Optional(Type.String())
20
- }),
21
- Type.Null()
22
- ]);
23
- const xScalarExampleBodySchema = Type.Object({
24
- encoding: Type.Union(exampleBodyMime.map((it) => Type.Literal(it))),
25
- content: Type.Union([Type.Record(Type.String(), Type.Any()), Type.String()]),
26
- file: Type.Optional(xScalarFileValueSchema)
27
- });
28
- const xScalarExampleParameterSchema = Type.Optional(Type.Record(Type.String(), Type.String()));
29
- const xScalarClientConfigRequestExampleSchema = Type.Partial(
30
- Type.Object({
31
- name: Type.String(),
32
- body: xScalarExampleBodySchema,
33
- parameters: Type.Object({
34
- path: xScalarExampleParameterSchema,
35
- query: xScalarExampleParameterSchema,
36
- header: xScalarExampleParameterSchema,
37
- cookie: xScalarExampleParameterSchema
38
- })
39
- })
40
- );
41
- export {
42
- exampleBodyMime,
43
- xScalarClientConfigRequestExampleSchema
44
- };
45
- //# sourceMappingURL=x-scalar-client-config-request-example.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-request-example.ts"],
4
- "sourcesContent": ["import { type Static, type TLiteral, Type } from '@scalar/typebox'\n\nexport const exampleBodyMime = [\n 'application/json',\n 'text/plain',\n 'text/html',\n 'application/javascript',\n 'application/xml',\n 'application/yaml',\n 'application/edn',\n 'application/octet-stream',\n 'application/x-www-form-urlencoded',\n 'multipart/form-data',\n /** Used for direct files */\n 'binary',\n] as const\n\nconst xScalarFileValueSchema = Type.Union([\n Type.Object({\n url: Type.String(),\n base64: Type.Optional(Type.String()),\n }),\n Type.Null(),\n])\n\nexport type XScalarFileValue = Static<typeof xScalarFileValueSchema>\n\nconst xScalarExampleBodySchema = Type.Object({\n encoding: Type.Union(exampleBodyMime.map((it) => Type.Literal(it))) as unknown as TLiteral<\n (typeof exampleBodyMime)[number]\n >,\n content: Type.Union([Type.Record(Type.String(), Type.Any()), Type.String()]),\n file: Type.Optional(xScalarFileValueSchema),\n})\n\nexport type XScalarExampleBody = Static<typeof xScalarExampleBodySchema>\n\nconst xScalarExampleParameterSchema = Type.Optional(Type.Record(Type.String(), Type.String()))\n\nexport type XScalarExampleParameter = Static<typeof xScalarExampleParameterSchema>\n\nexport const xScalarClientConfigRequestExampleSchema = Type.Partial(\n Type.Object({\n name: Type.String(),\n body: xScalarExampleBodySchema,\n parameters: Type.Object({\n path: xScalarExampleParameterSchema,\n query: xScalarExampleParameterSchema,\n header: xScalarExampleParameterSchema,\n cookie: xScalarExampleParameterSchema,\n }),\n }),\n)\n\nexport type XScalarClientConfigRequestExample = Static<typeof xScalarClientConfigRequestExampleSchema>\n"],
5
- "mappings": "AAAA,SAAqC,YAAY;AAE1C,MAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AACF;AAEA,MAAM,yBAAyB,KAAK,MAAM;AAAA,EACxC,KAAK,OAAO;AAAA,IACV,KAAK,KAAK,OAAO;AAAA,IACjB,QAAQ,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA,EACrC,CAAC;AAAA,EACD,KAAK,KAAK;AACZ,CAAC;AAID,MAAM,2BAA2B,KAAK,OAAO;AAAA,EAC3C,UAAU,KAAK,MAAM,gBAAgB,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC,CAAC;AAAA,EAGlE,SAAS,KAAK,MAAM,CAAC,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,IAAI,CAAC,GAAG,KAAK,OAAO,CAAC,CAAC;AAAA,EAC3E,MAAM,KAAK,SAAS,sBAAsB;AAC5C,CAAC;AAID,MAAM,gCAAgC,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,OAAO,CAAC,CAAC;AAItF,MAAM,0CAA0C,KAAK;AAAA,EAC1D,KAAK,OAAO;AAAA,IACV,MAAM,KAAK,OAAO;AAAA,IAClB,MAAM;AAAA,IACN,YAAY,KAAK,OAAO;AAAA,MACtB,MAAM;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV,CAAC;AAAA,EACH,CAAC;AACH;",
6
- "names": []
7
- }
package/dist/types.d.ts DELETED
@@ -1,18 +0,0 @@
1
- /**
2
- * Converts a readonly array type to a mutable array type.
3
- *
4
- * This utility type removes the readonly modifier from all elements in an array type,
5
- * allowing the array to be modified. It's useful when you need to work with mutable
6
- * versions of readonly arrays in TypeScript.
7
- *
8
- * @template T - The readonly array type to convert to mutable
9
- * @example
10
- * // Convert a readonly array to mutable
11
- * type ReadonlyNumbers = readonly number[]
12
- * type MutableNumbers = MutableArray<ReadonlyNumbers>
13
- * // Result: number[]
14
- */
15
- export type MutableArray<T extends readonly any[]> = {
16
- -readonly [k in keyof T]: T[k];
17
- };
18
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,GAAG,EAAE,IAAI;IACnD,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAC/B,CAAA"}
package/dist/types.js DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map