@scalar/workspace-store 0.68.2 → 0.68.4

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 (177) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +20 -0
  3. package/dist/channel-example/build-connection-url.d.ts.map +1 -1
  4. package/dist/channel-example/build-connection-url.js +6 -5
  5. package/dist/channel-example/get-all-channel-messages.js +2 -2
  6. package/dist/channel-example/get-async-api-protocols.d.ts +3 -1
  7. package/dist/channel-example/get-async-api-protocols.d.ts.map +1 -1
  8. package/dist/channel-example/get-async-api-protocols.js +9 -5
  9. package/dist/channel-example/get-asyncapi-security-requirements.d.ts +14 -2
  10. package/dist/channel-example/get-asyncapi-security-requirements.d.ts.map +1 -1
  11. package/dist/channel-example/get-asyncapi-security-requirements.js +93 -36
  12. package/dist/channel-example/get-channel-connection-context.d.ts.map +1 -1
  13. package/dist/channel-example/get-channel-connection-context.js +3 -4
  14. package/dist/channel-example/get-channel-connection-security.d.ts +3 -2
  15. package/dist/channel-example/get-channel-connection-security.d.ts.map +1 -1
  16. package/dist/channel-example/get-channel-connection-security.js +4 -6
  17. package/dist/channel-example/get-channel-operations.d.ts.map +1 -1
  18. package/dist/channel-example/get-channel-operations.js +4 -3
  19. package/dist/channel-example/get-channel-parameters.d.ts.map +1 -1
  20. package/dist/channel-example/get-channel-parameters.js +4 -3
  21. package/dist/channel-example/index.d.ts +2 -2
  22. package/dist/channel-example/index.d.ts.map +1 -1
  23. package/dist/channel-example/index.js +2 -2
  24. package/dist/channel-example/resolve-channel.d.ts.map +1 -1
  25. package/dist/channel-example/resolve-channel.js +4 -3
  26. package/dist/channel-example/resolve-operation-channel.d.ts.map +1 -1
  27. package/dist/channel-example/resolve-operation-channel.js +8 -6
  28. package/dist/channel-example/resolve-operation-with-traits.d.ts +1 -3
  29. package/dist/channel-example/resolve-operation-with-traits.d.ts.map +1 -1
  30. package/dist/channel-example/resolve-operation-with-traits.js +3 -41
  31. package/dist/channel-example/servers.d.ts.map +1 -1
  32. package/dist/channel-example/servers.js +4 -3
  33. package/dist/client.d.ts.map +1 -1
  34. package/dist/client.js +8 -4
  35. package/dist/entities/auth/schema.d.ts +25 -0
  36. package/dist/entities/auth/schema.d.ts.map +1 -1
  37. package/dist/entities/auth/schema.js +2 -0
  38. package/dist/events/definitions/operation.d.ts +7 -0
  39. package/dist/events/definitions/operation.d.ts.map +1 -1
  40. package/dist/helpers/asyncapi-chunk-groups.d.ts.map +1 -1
  41. package/dist/helpers/asyncapi-chunk-groups.js +8 -4
  42. package/dist/helpers/asyncapi-model-chunk-reference.d.ts.map +1 -1
  43. package/dist/helpers/asyncapi-model-chunk-reference.js +2 -1
  44. package/dist/helpers/auth-secret-fields.d.ts +11 -0
  45. package/dist/helpers/auth-secret-fields.d.ts.map +1 -1
  46. package/dist/helpers/auth-secret-fields.js +22 -0
  47. package/dist/helpers/encode-path-parameter.d.ts.map +1 -1
  48. package/dist/helpers/encode-path-parameter.js +11 -12
  49. package/dist/helpers/external-examples.d.ts.map +1 -1
  50. package/dist/helpers/external-examples.js +6 -3
  51. package/dist/helpers/get-async-api-schema-view.d.ts +8 -0
  52. package/dist/helpers/get-async-api-schema-view.d.ts.map +1 -0
  53. package/dist/helpers/get-async-api-schema-view.js +82 -0
  54. package/dist/helpers/get-boolean-schema.d.ts +7 -0
  55. package/dist/helpers/get-boolean-schema.d.ts.map +1 -0
  56. package/dist/helpers/get-boolean-schema.js +5 -0
  57. package/dist/helpers/get-resolved-async-api-ref.d.ts +10 -0
  58. package/dist/helpers/get-resolved-async-api-ref.d.ts.map +1 -0
  59. package/dist/helpers/get-resolved-async-api-ref.js +18 -0
  60. package/dist/helpers/get-resolved-ref-deep.d.ts.map +1 -1
  61. package/dist/helpers/normalize-boolean-schemas.d.ts.map +1 -1
  62. package/dist/helpers/normalize-boolean-schemas.js +6 -1
  63. package/dist/helpers/operation-examples.d.ts.map +1 -1
  64. package/dist/helpers/operation-examples.js +2 -1
  65. package/dist/helpers/querystring-parameter.d.ts.map +1 -1
  66. package/dist/helpers/querystring-parameter.js +6 -6
  67. package/dist/helpers/resolve-security-requirements.d.ts.map +1 -1
  68. package/dist/helpers/resolve-security-requirements.js +38 -19
  69. package/dist/helpers/resolve-traits.d.ts +3 -0
  70. package/dist/helpers/resolve-traits.d.ts.map +1 -0
  71. package/dist/helpers/resolve-traits.js +76 -0
  72. package/dist/helpers/serialize-stream-example.js +1 -1
  73. package/dist/helpers/snapshot-schema.d.ts +9 -0
  74. package/dist/helpers/snapshot-schema.d.ts.map +1 -0
  75. package/dist/helpers/snapshot-schema.js +38 -0
  76. package/dist/helpers/use-external-examples.d.ts.map +1 -1
  77. package/dist/helpers/use-external-examples.js +10 -5
  78. package/dist/mutators/auth.d.ts +2 -1
  79. package/dist/mutators/auth.d.ts.map +1 -1
  80. package/dist/mutators/auth.js +32 -2
  81. package/dist/mutators/index.d.ts +2 -2
  82. package/dist/mutators/operation/helpers/har-to-operation.d.ts.map +1 -1
  83. package/dist/mutators/operation/helpers/har-to-operation.js +4 -2
  84. package/dist/mutators/operation/operation.d.ts.map +1 -1
  85. package/dist/mutators/operation/operation.js +4 -2
  86. package/dist/mutators/operation/parameters.d.ts.map +1 -1
  87. package/dist/mutators/operation/parameters.js +23 -1
  88. package/dist/mutators/tag.d.ts.map +1 -1
  89. package/dist/mutators/tag.js +4 -2
  90. package/dist/navigation/get-navigation-options.d.ts.map +1 -1
  91. package/dist/navigation/get-navigation-options.js +9 -5
  92. package/dist/navigation/helpers/get-tag-external-docs.d.ts +4 -0
  93. package/dist/navigation/helpers/get-tag-external-docs.d.ts.map +1 -0
  94. package/dist/navigation/helpers/get-tag-external-docs.js +6 -0
  95. package/dist/navigation/helpers/traverse-asyncapi-document.d.ts.map +1 -1
  96. package/dist/navigation/helpers/traverse-asyncapi-document.js +75 -36
  97. package/dist/navigation/helpers/traverse-paths.js +1 -1
  98. package/dist/navigation/helpers/traverse-schemas.d.ts.map +1 -1
  99. package/dist/navigation/helpers/traverse-schemas.js +2 -1
  100. package/dist/navigation/helpers/traverse-tags.d.ts.map +1 -1
  101. package/dist/navigation/helpers/traverse-tags.js +3 -0
  102. package/dist/plugins/bundler/index.d.ts.map +1 -1
  103. package/dist/plugins/bundler/index.js +2 -1
  104. package/dist/plugins/bundler/openapi-document.d.ts.map +1 -1
  105. package/dist/plugins/bundler/openapi-document.js +2 -1
  106. package/dist/request-example/builder/body/build-multipart.d.ts.map +1 -1
  107. package/dist/request-example/builder/body/build-multipart.js +18 -16
  108. package/dist/request-example/builder/body/encode-multipart-body.d.ts.map +1 -1
  109. package/dist/request-example/builder/body/encode-multipart-body.js +2 -1
  110. package/dist/request-example/builder/body/get-request-body-example.d.ts +2 -2
  111. package/dist/request-example/builder/body/get-request-body-example.d.ts.map +1 -1
  112. package/dist/request-example/builder/body/get-request-body-example.js +8 -7
  113. package/dist/request-example/builder/body/schema-value-coercion.d.ts.map +1 -1
  114. package/dist/request-example/builder/body/schema-value-coercion.js +4 -1
  115. package/dist/request-example/builder/header/build-request-parameters.d.ts.map +1 -1
  116. package/dist/request-example/builder/header/build-request-parameters.js +12 -2
  117. package/dist/request-example/builder/header/filter-disabled-properties.d.ts +3 -0
  118. package/dist/request-example/builder/header/filter-disabled-properties.d.ts.map +1 -0
  119. package/dist/request-example/builder/header/filter-disabled-properties.js +18 -0
  120. package/dist/request-example/builder/header/filter-global-cookies.d.ts +1 -1
  121. package/dist/request-example/builder/header/filter-global-cookies.d.ts.map +1 -1
  122. package/dist/request-example/builder/header/filter-global-cookies.js +15 -3
  123. package/dist/request-example/builder/header/is-param-disabled.d.ts +1 -1
  124. package/dist/request-example/builder/header/is-param-disabled.d.ts.map +1 -1
  125. package/dist/request-example/builder/header/is-param-disabled.js +3 -2
  126. package/dist/request-example/builder/helpers/get-example-from-schema.d.ts.map +1 -1
  127. package/dist/request-example/builder/helpers/get-example-from-schema.js +27 -16
  128. package/dist/request-example/builder/helpers/get-example.d.ts +2 -0
  129. package/dist/request-example/builder/helpers/get-example.d.ts.map +1 -1
  130. package/dist/request-example/builder/helpers/get-example.js +15 -5
  131. package/dist/request-example/builder/index.d.ts +1 -0
  132. package/dist/request-example/builder/index.d.ts.map +1 -1
  133. package/dist/request-example/builder/index.js +1 -0
  134. package/dist/request-example/builder/resolve-request-factory-url.d.ts.map +1 -1
  135. package/dist/request-example/builder/resolve-request-factory-url.js +9 -8
  136. package/dist/request-example/builder/security/secret-types.d.ts +13 -3
  137. package/dist/request-example/builder/security/secret-types.d.ts.map +1 -1
  138. package/dist/request-example/context/headers.js +1 -1
  139. package/dist/request-example/context/security/extract-security-scheme-secrets.d.ts.map +1 -1
  140. package/dist/request-example/context/security/extract-security-scheme-secrets.js +65 -25
  141. package/dist/request-example/context/security/get-selected-security.js +1 -1
  142. package/dist/request-example/context/security/merge-security.d.ts.map +1 -1
  143. package/dist/request-example/context/security/merge-security.js +12 -2
  144. package/dist/request-example/context/security/uses-api-key-name-override.d.ts +9 -0
  145. package/dist/request-example/context/security/uses-api-key-name-override.d.ts.map +1 -0
  146. package/dist/request-example/context/security/uses-api-key-name-override.js +9 -0
  147. package/dist/request-example/index.d.ts +1 -1
  148. package/dist/request-example/index.d.ts.map +1 -1
  149. package/dist/request-example/index.js +1 -1
  150. package/dist/request-example/xml/get-xml-example.js +2 -1
  151. package/dist/request-example/xml/write-xml.d.ts.map +1 -1
  152. package/dist/request-example/xml/write-xml.js +7 -5
  153. package/dist/resolve.d.ts +1 -1
  154. package/dist/resolve.d.ts.map +1 -1
  155. package/dist/resolve.js +16 -1
  156. package/dist/schemas/extensions/example/x-disabled.d.ts +4 -0
  157. package/dist/schemas/extensions/example/x-disabled.d.ts.map +1 -1
  158. package/dist/schemas/extensions/example/x-disabled.js +3 -1
  159. package/dist/schemas/navigation.d.ts +5 -1
  160. package/dist/schemas/navigation.d.ts.map +1 -1
  161. package/dist/schemas/navigation.js +2 -1
  162. package/dist/schemas/reference-config/index.d.ts +3 -0
  163. package/dist/schemas/reference-config/index.d.ts.map +1 -1
  164. package/dist/schemas/reference-config/settings.d.ts +3 -0
  165. package/dist/schemas/reference-config/settings.d.ts.map +1 -1
  166. package/dist/schemas/v3.1/strict/example.d.ts +3 -0
  167. package/dist/schemas/v3.1/strict/example.d.ts.map +1 -1
  168. package/dist/schemas/v3.1/strict/openapi-document.d.ts +106 -6
  169. package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
  170. package/dist/schemas/v3.2/strict/example.d.ts +3 -0
  171. package/dist/schemas/v3.2/strict/example.d.ts.map +1 -1
  172. package/dist/schemas/v3.2/strict/openapi-document.d.ts +106 -6
  173. package/dist/schemas/v3.2/strict/openapi-document.d.ts.map +1 -1
  174. package/dist/server.d.ts +7 -0
  175. package/dist/server.d.ts.map +1 -1
  176. package/dist/server.js +16 -7
  177. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @scalar/workspace-store
2
2
 
3
+ ## 0.68.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#10530](https://github.com/scalar/scalar/pull/10530): Render AsyncAPI external documentation on servers, channels, operations, messages, tags, and schemas, with referenced objects and descriptions, using the existing OpenAPI link presentation.
8
+
9
+ Keep AsyncAPI messages searchable when navigation renders them beneath operations.
10
+
11
+ - [#10599](https://github.com/scalar/scalar/pull/10599): Preserve recursive schemas when generating request bodies, code samples, and response examples instead of replacing recursion points with null or empty arrays.
12
+ - [#10607](https://github.com/scalar/scalar/pull/10607): Block private-network document requests by default and require an explicit documentLoading.basePath for local files. Apply the same permissions to external references, with an opt-in for trusted private-network inputs.
13
+ - [#10365](https://github.com/scalar/scalar/pull/10365): Preserve document-backed API key name edits for export, allow clearing configured names, and release configured overrides when their default name is restored.
14
+ - [#10588](https://github.com/scalar/scalar/pull/10588): Ignore sibling properties on AsyncAPI Reference Objects when rendering content, navigation, search, and schemas.
15
+ - [#10614](https://github.com/scalar/scalar/pull/10614): Clean up lint warnings while preserving runtime behavior, and document intentional schema and type syntax.
16
+ - [#10638](https://github.com/scalar/scalar/pull/10638): Give the untagged webhooks sidebar section the id `{document}/webhooks` instead of `{document}/webhook/undefined/`.
17
+
18
+ ## 0.68.3
19
+
20
+ ### Patch Changes
21
+
22
+ - [#10554](https://github.com/scalar/scalar/pull/10554): Render AsyncAPI boolean schemas with explanations in message payloads, headers, and reusable models.
23
+ - [#10551](https://github.com/scalar/scalar/pull/10551): Show **Reset to default** on authentication fields only when the field has a default that differs from its current value (the document or configured value, or the current page URL for the OAuth2 redirect URL). A cleared OAuth2 access token keeps the action so you can get back to the Authorize form. The show password toggle only appears once a field has a value, and an emptied field goes back to masked.
24
+ - [#10527](https://github.com/scalar/scalar/pull/10527): Document every visible AsyncAPI channel message in a channel catalog while preserving operation-specific message subsets, links, and server/protocol filtering.
25
+ - [#10565](https://github.com/scalar/scalar/pull/10565): Inherit AsyncAPI operation metadata and replies from traits using recursive merge rules, and use inherited titles in navigation.
26
+ - [#10559](https://github.com/scalar/scalar/pull/10559): Clean up Biome warnings in package code and tests. Handle rejected debounced callbacks and await streaming writes.
27
+ - [#10544](https://github.com/scalar/scalar/pull/10544): Match cookie paths with the RFC 6265 path-match algorithm so a cookie restricted to `/api` is not sent with requests to `/apiv2`.
28
+ - [#10505](https://github.com/scalar/scalar/pull/10505): Apply formatting and lint compatibility changes for Biome 2.5.15.
29
+ - [#10555](https://github.com/scalar/scalar/pull/10555): Keep expanded query parameter checkboxes independent and preserve disabled field values while excluding them from requests.
30
+ - [#10529](https://github.com/scalar/scalar/pull/10529): Align import and export ordering with the Biome checks.
31
+ - [#10524](https://github.com/scalar/scalar/pull/10524): Keep optional enum parameters disabled until explicitly enabled when no default or example is declared. Prefer declared schema examples over enum suggestions.
32
+ - [#10562](https://github.com/scalar/scalar/pull/10562): Resolve escaped channel and message identifiers in AsyncAPI navigation.
33
+ - [#10520](https://github.com/scalar/scalar/pull/10520): Sort imports and exports to satisfy the Biome checks.
34
+ - [#10566](https://github.com/scalar/scalar/pull/10566): Render inline AsyncAPI security schemes and scopes, keeping server authentication separate from operation security.
35
+ - [#10528](https://github.com/scalar/scalar/pull/10528): Render AsyncAPI channels and their messages when no operations reference them, including server and protocol filtering.
36
+ - [#10561](https://github.com/scalar/scalar/pull/10561): Clarify AsyncAPI operation and message sections, align message card spacing, and keep schema controls inside lighter expanded cards.
37
+
38
+ Show channel messages only when they are not used by an operation, and keep the sidebar in sync.
39
+
40
+ - [#10526](https://github.com/scalar/scalar/pull/10526): Align import and export ordering with the repository CI checks.
41
+
3
42
  ## 0.68.2
4
43
 
5
44
  ### Patch Changes
package/README.md CHANGED
@@ -19,6 +19,26 @@ Scalar is an open-source API platform for teams who want beautiful developer int
19
19
 
20
20
  Server side data store which enables document chunking to reduce initial loading time specially when working with large openapi documents
21
21
 
22
+ ### Document loading permissions
23
+
24
+ Server document URLs and external references block private, loopback, and link-local addresses
25
+ by default. Protected requests also reject redirects. File access requires an explicit
26
+ `documentLoading.basePath`, which confines both direct reads and external references, including
27
+ symlinks, to an approved directory. These permissions apply to initial documents and `addDocument`.
28
+
29
+ ```ts
30
+ const store = await createServerWorkspaceStore({
31
+ mode: 'ssr',
32
+ baseUrl: '/docs',
33
+ documents: [{ name: 'api', path: './descriptions/openapi.yaml' }],
34
+ documentLoading: { basePath: './descriptions' },
35
+ })
36
+ ```
37
+
38
+ For trusted local development inputs, `documentLoading.allowPrivateNetworks: true` permits private
39
+ network URLs and redirects. Configure these permissions in the application, never from untrusted
40
+ request parameters. The approved directory also applies to references in remote documents.
41
+
22
42
  #### Usage
23
43
 
24
44
  Create a new store in SSR mode
@@ -1 +1 @@
1
- {"version":3,"file":"build-connection-url.d.ts","sourceRoot":"","sources":["../../src/channel-example/build-connection-url.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,4BAA4B,CAAA;AAInC,2FAA2F;AAC3F,eAAO,MAAM,4BAA4B,wBAAyB,CAA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kBAAkB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACvC,eAoBF,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,GAAI,wFAOhC,uBAAuB,KAAG,MAkB5B,CAAA"}
1
+ {"version":3,"file":"build-connection-url.d.ts","sourceRoot":"","sources":["../../src/channel-example/build-connection-url.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,4BAA4B,CAAA;AAInC,2FAA2F;AAC3F,eAAO,MAAM,4BAA4B,wBAAyB,CAAA;AAElE,MAAM,MAAM,yBAAyB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAA;AAErF,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,oBAAoB,CAAA;IAC5B,OAAO,EAAE,qBAAqB,CAAA;IAC9B,SAAS,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAA;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxC,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC,CAAA;CACjF,CAAA;AAQD;;GAEG;AACH,eAAO,MAAM,0BAA0B,GAAI,QAAQ,oBAAoB,GAAG,IAAI,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAYrG,CAAA;AAoBD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAGzE,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,GAAI,UAAU,MAAM,KAAG,MAAuC,CAAA;AAEnG,eAAO,MAAM,mBAAmB,GAAI,UAAU,MAAM,KAAG,QAAQ,IAAI,yBACsB,CAAA;AAEzF;;GAEG;AACH,eAAO,MAAM,0BAA0B,GACrC,QAAQ,oBAAoB,EAC5B,uBAAuB,uBAAuB,CAAC,sBAAsB,CAAC,KACrE,MAYF,CAAA;AAaD,0FAA0F;AAC1F,eAAO,MAAM,eAAe,GAC1B,SAAS,qBAAqB,EAC9B,YAAY,uBAAuB,GAAG,IAAI,KACzC,uBAAuB,GAAG,SAa5B,CAAA;AA2FD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAC7B,WAAW,uBAAuB,GAAG,SAAS,EAC9C,kBAAkB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACvC,eAoBF,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,GAAI,wFAOhC,uBAAuB,KAAG,MAkB5B,CAAA"}
@@ -2,7 +2,7 @@ import { isObject } from '@scalar/helpers/object/is-object';
2
2
  import { objectEntries } from '@scalar/helpers/object/object-entries';
3
3
  import { replaceEnvVariables, replacePathVariables } from '@scalar/helpers/regex/replace-variables';
4
4
  import { combineUrlAndPath, mergeUrls } from '@scalar/helpers/url/merge-urls';
5
- import { getResolvedRef } from '../helpers/get-resolved-ref.js';
5
+ import { getResolvedAsyncApiRef } from '../helpers/get-resolved-async-api-ref.js';
6
6
  /** AsyncAPI server protocols supported for WebSocket connections in the API client MVP. */
7
7
  export const ASYNCAPI_WEBSOCKET_PROTOCOLS = ['ws', 'wss'];
8
8
  /**
@@ -13,7 +13,7 @@ export const getAsyncApiServerVariables = (server) => {
13
13
  return {};
14
14
  }
15
15
  return objectEntries(server.variables).reduce((acc, [name, variable]) => {
16
- const resolved = getResolvedRef(variable);
16
+ const resolved = getResolvedAsyncApiRef(variable);
17
17
  if (resolved?.default != null) {
18
18
  acc[String(name)] = String(resolved.default);
19
19
  }
@@ -64,7 +64,7 @@ const resolveWsBinding = (bindings) => {
64
64
  if (!bindings) {
65
65
  return undefined;
66
66
  }
67
- const resolved = getResolvedRef(bindings);
67
+ const resolved = getResolvedAsyncApiRef(bindings);
68
68
  return resolved?.ws;
69
69
  };
70
70
  /** Merges channel and operation WebSocket bindings; operation fields override channel. */
@@ -84,7 +84,7 @@ const resolveWsQuerySchema = (query) => {
84
84
  if (!query) {
85
85
  return undefined;
86
86
  }
87
- const resolved = getResolvedRef(query);
87
+ const resolved = getResolvedAsyncApiRef(query);
88
88
  if (resolved === true || resolved === false || !isObject(resolved)) {
89
89
  return undefined;
90
90
  }
@@ -115,7 +115,8 @@ const mergeWsQuerySchemas = (channelQuery, operationQuery) => {
115
115
  },
116
116
  });
117
117
  };
118
- const getDefaultValueFromPropertySchema = (propertySchema) => {
118
+ const getDefaultValueFromPropertySchema = (source) => {
119
+ const propertySchema = getResolvedAsyncApiRef(source);
119
120
  if (propertySchema === true || propertySchema === false || !isObject(propertySchema)) {
120
121
  return undefined;
121
122
  }
@@ -1,5 +1,5 @@
1
1
  import { objectEntries } from '@scalar/helpers/object/object-entries';
2
- import { getResolvedRef } from '../helpers/get-resolved-ref.js';
2
+ import { getResolvedAsyncApiRef } from '../helpers/get-resolved-async-api-ref.js';
3
3
  /**
4
4
  * Resolves every message defined on a channel (AsyncAPI data store for payloads).
5
5
  */
@@ -9,7 +9,7 @@ export const getAllChannelMessages = (_document, channel) => {
9
9
  }
10
10
  return objectEntries(channel.messages)
11
11
  .map(([name, messageRef]) => {
12
- const message = getResolvedRef(messageRef);
12
+ const message = getResolvedAsyncApiRef(messageRef);
13
13
  return { name, message };
14
14
  })
15
15
  .filter((entry) => entry.message != null);
@@ -1,4 +1,4 @@
1
- import type { AsyncApiDocument, AsyncApiOperationObject } from '@scalar/types/asyncapi/3.1';
1
+ import type { AsyncApiChannelObject, AsyncApiDocument, AsyncApiOperationObject } from '@scalar/types/asyncapi/3.1';
2
2
  /** Sentinel used by the protocol and server pickers to mean "don't filter". */
3
3
  export declare const ALL: "all";
4
4
  /** A single protocol option for the picker (e.g. `{ id: 'mqtt', label: 'MQTT' }`). */
@@ -61,6 +61,8 @@ export type OperationReachability = {
61
61
  * one is created when called standalone.
62
62
  */
63
63
  export declare const getOperationReachability: (document: AsyncApiDocument, operation: AsyncApiOperationObject, context?: AsyncApiReachabilityContext) => OperationReachability;
64
+ /** Returns the servers and protocols available to a channel without requiring an operation. */
65
+ export declare const getChannelReachability: (document: AsyncApiDocument, channel: AsyncApiChannelObject | null, context?: AsyncApiReachabilityContext) => OperationReachability;
64
66
  /**
65
67
  * Returns the set of protocols an operation is reachable over.
66
68
  */
@@ -1 +1 @@
1
- {"version":3,"file":"get-async-api-protocols.d.ts","sourceRoot":"","sources":["../../src/channel-example/get-async-api-protocols.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AAQ3F,+EAA+E;AAC/E,eAAO,MAAM,GAAG,EAAG,KAAc,CAAA;AAEjC,sFAAsF;AACtF,MAAM,MAAM,sBAAsB,GAAG;IACnC,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAA;IACV,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAmBD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,UAAU,gBAAgB,KAAG,sBAAsB,EAQvF,CAAA;AAED,qGAAqG;AACrG,MAAM,MAAM,oBAAoB,GAAG;IACjC,uEAAuE;IACvE,EAAE,EAAE,MAAM,CAAA;IACV,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GAAI,UAAU,gBAAgB,KAAG,oBAAoB,EAOzF,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,uEAAuE;IACvE,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpC,kDAAkD;IAClD,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC5B,CAAA;AAED,0FAA0F;AAC1F,eAAO,MAAM,yBAAyB,GAAI,UAAU,gBAAgB,KAAG,2BAGrE,CAAA;AAEF,0FAA0F;AAC1F,MAAM,MAAM,qBAAqB,GAAG;IAClC,mEAAmE;IACnE,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACxB,mCAAmC;IACnC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACvB,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,gBAAgB,EAC1B,WAAW,uBAAuB,EAClC,UAAS,2BAAiE,KACzE,qBAiBF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,UAAU,gBAAgB,EAC1B,WAAW,uBAAuB,EAClC,UAAU,2BAA2B,KACpC,GAAG,CAAC,MAAM,CAAqE,CAAA;AAElF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,UAAU,gBAAgB,EAC1B,WAAW,uBAAuB,EAClC,UAAU,2BAA2B,KACpC,GAAG,CAAC,MAAM,CAAuE,CAAA;AAEpF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,gBAAgB,EAC1B,WAAW,uBAAuB,EAClC,UAAU,MAAM,GAAG,SAAS,EAC5B,UAAU,2BAA2B,KACpC,OAMF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GACjC,UAAU,gBAAgB,EAC1B,WAAW,uBAAuB,EAClC,YAAY,MAAM,GAAG,SAAS,EAC9B,UAAU,2BAA2B,KACpC,OAMF,CAAA"}
1
+ {"version":3,"file":"get-async-api-protocols.d.ts","sourceRoot":"","sources":["../../src/channel-example/get-async-api-protocols.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AAQlH,+EAA+E;AAC/E,eAAO,MAAM,GAAG,EAAG,KAA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AAM,qBAAqB,GAChC,UAAU,gBAAgB,EAC1B,WAAW,uBAAuB,EAClC,UAAU,2BAA2B,KACpC,GAAG,CAAC,MAAM,CAAqE,CAAA;AAElF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,UAAU,gBAAgB,EAC1B,WAAW,uBAAuB,EAClC,UAAU,2BAA2B,KACpC,GAAG,CAAC,MAAM,CAAuE,CAAA;AAEpF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,gBAAgB,EAC1B,WAAW,uBAAuB,EAClC,UAAU,MAAM,GAAG,SAAS,EAC5B,UAAU,2BAA2B,KACpC,OAMF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GACjC,UAAU,gBAAgB,EAC1B,WAAW,uBAAuB,EAClC,YAAY,MAAM,GAAG,SAAS,EAC9B,UAAU,2BAA2B,KACpC,OAMF,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { objectEntries } from '@scalar/helpers/object/object-entries';
2
2
  import { objectKeys } from '@scalar/helpers/object/object-keys';
3
- import { getResolvedRef } from '../helpers/get-resolved-ref.js';
3
+ import { getResolvedAsyncApiRef } from '../helpers/get-resolved-async-api-ref.js';
4
4
  import { normalizeProtocol } from './build-connection-url.js';
5
5
  import { resolveOperationChannel } from './resolve-operation-channel.js';
6
6
  import { getChannelServerNames } from './servers.js';
@@ -13,7 +13,7 @@ export const ALL = 'all';
13
13
  const getServerProtocols = (document) => {
14
14
  const protocols = new Map();
15
15
  for (const [name, serverNode] of objectEntries(document.servers ?? {})) {
16
- const protocol = normalizeProtocol(getResolvedRef(serverNode)?.protocol);
16
+ const protocol = normalizeProtocol(getResolvedAsyncApiRef(serverNode)?.protocol);
17
17
  if (protocol) {
18
18
  protocols.set(name, protocol);
19
19
  }
@@ -43,7 +43,7 @@ export const getAsyncApiProtocols = (document) => {
43
43
  */
44
44
  export const getAsyncApiServerOptions = (document) => {
45
45
  const options = objectEntries(document.servers ?? {}).map(([name, serverNode]) => {
46
- const protocol = normalizeProtocol(getResolvedRef(serverNode)?.protocol);
46
+ const protocol = normalizeProtocol(getResolvedAsyncApiRef(serverNode)?.protocol);
47
47
  return { id: name, label: protocol ? `${name} (${protocol})` : name };
48
48
  });
49
49
  return [{ id: ALL, label: 'All servers' }, ...options];
@@ -63,8 +63,12 @@ export const createReachabilityContext = (document) => ({
63
63
  */
64
64
  export const getOperationReachability = (document, operation, context = createReachabilityContext(document)) => {
65
65
  const channel = resolveOperationChannel(document, operation)?.channel ?? null;
66
- const channelServerNames = getChannelServerNames(document, channel);
67
- // A channel without declared servers is reachable on every server.
66
+ return getChannelReachability(document, channel, context);
67
+ };
68
+ /** Returns the servers and protocols available to a channel without requiring an operation. */
69
+ export const getChannelReachability = (document, channel, context = createReachabilityContext(document)) => {
70
+ // AsyncAPI makes channels with absent or empty server lists available on every server.
71
+ const channelServerNames = channel?.servers?.length ? getChannelServerNames(document, channel) : undefined;
68
72
  const serverNames = channelServerNames
69
73
  ? new Set([...channelServerNames].filter((name) => context.allServerNames.has(name)))
70
74
  : new Set(context.allServerNames);
@@ -1,9 +1,21 @@
1
- import type { AsyncApiDocument, AsyncApiOperationObject, AsyncApiServerObject } from '@scalar/types/asyncapi/3.1';
1
+ import type { AsyncApiDocument, AsyncApiOperationObject, AsyncApiSecuritySchemeObject, AsyncApiServerObject } from '@scalar/types/asyncapi/3.1';
2
2
  import type { SecurityRequirementObject } from '../schemas/v3.2/strict/security-requirement.js';
3
+ /**
4
+ * Collect inline definitions without changing the API description. Location-based names keep
5
+ * credentials for unrelated declarations separate, even when their definitions are identical.
6
+ * Component names remain unchanged for existing auth configuration and persisted credentials.
7
+ */
8
+ export declare const getAsyncApiSecuritySchemes: (document: AsyncApiDocument, owners?: {
9
+ servers?: Record<string, AsyncApiServerObject>;
10
+ operations?: Record<string, AsyncApiOperationObject>;
11
+ }) => Record<string, AsyncApiSecuritySchemeObject>;
3
12
  /**
4
13
  * Converts AsyncAPI security arrays (operation, traits, server) into OpenAPI-style requirement objects.
5
14
  */
6
- export declare const getAsyncApiSecurityRequirements: (document: AsyncApiDocument, operation?: AsyncApiOperationObject | null, server?: AsyncApiServerObject | null) => SecurityRequirementObject[];
15
+ export declare const getAsyncApiSecurityRequirements: (document: AsyncApiDocument, operation?: AsyncApiOperationObject | null, server?: AsyncApiServerObject | null, locations?: {
16
+ operationName?: string;
17
+ serverName?: string;
18
+ }) => SecurityRequirementObject[];
7
19
  /**
8
20
  * Document-wide security requirements for an AsyncAPI document.
9
21
  *
@@ -1 +1 @@
1
- {"version":3,"file":"get-asyncapi-security-requirements.d.ts","sourceRoot":"","sources":["../../src/channel-example/get-asyncapi-security-requirements.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EAEvB,oBAAoB,EACrB,MAAM,4BAA4B,CAAA;AAInC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAA;AA+E3F;;GAEG;AACH,eAAO,MAAM,+BAA+B,GAC1C,UAAU,gBAAgB,EAC1B,YAAY,uBAAuB,GAAG,IAAI,EAC1C,SAAS,oBAAoB,GAAG,IAAI,KACnC,yBAAyB,EAY3B,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,uCAAuC,GAAI,UAAU,gBAAgB,KAAG,yBAAyB,EAwB7G,CAAA"}
1
+ {"version":3,"file":"get-asyncapi-security-requirements.d.ts","sourceRoot":"","sources":["../../src/channel-example/get-asyncapi-security-requirements.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,4BAA4B,EAC5B,oBAAoB,EACrB,MAAM,4BAA4B,CAAA;AAInC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAA;AAyB3F;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GACrC,UAAU,gBAAgB,EAC1B,SAAQ;IACN,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAA;CAChD,KACL,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAsC7C,CAAA;AAwED;;GAEG;AACH,eAAO,MAAM,+BAA+B,GAC1C,UAAU,gBAAgB,EAC1B,YAAY,uBAAuB,GAAG,IAAI,EAC1C,SAAS,oBAAoB,GAAG,IAAI,EACpC,YAAW;IAAE,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAO,KAC9D,yBAAyB,EAoC3B,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,uCAAuC,GAAI,UAAU,gBAAgB,KAAG,yBAAyB,EA6B7G,CAAA"}
@@ -1,11 +1,12 @@
1
1
  import { isObjectEqual } from '@scalar/helpers/object/is-object-equal';
2
2
  import { getNameFromRef } from '../helpers/get-name-from-ref.js';
3
- import { getResolvedRef } from '../helpers/get-resolved-ref.js';
3
+ import { getResolvedAsyncApiRef } from '../helpers/get-resolved-async-api-ref.js';
4
4
  import { dedupeRequirements } from './dedupe-requirements.js';
5
+ import { resolveOperationWithTraits } from './resolve-operation-with-traits.js';
5
6
  const getSecuritySchemeNameFromRef = (ref) => getNameFromRef(ref, ['components', 'securitySchemes']);
6
7
  /** Strips requirement-only `scopes` so inline entries can match component scheme definitions. */
7
8
  const getSecuritySchemeDefinition = (entry) => {
8
- const resolved = getResolvedRef(entry);
9
+ const resolved = getResolvedAsyncApiRef(entry);
9
10
  if (resolved == null) {
10
11
  return undefined;
11
12
  }
@@ -15,56 +16,109 @@ const getSecuritySchemeDefinition = (entry) => {
15
16
  const { scopes: _scopes, ...scheme } = resolved;
16
17
  return scheme;
17
18
  };
18
- const getSecuritySchemeName = (document, entry) => {
19
- if ('$ref' in entry) {
20
- const nameFromRef = getSecuritySchemeNameFromRef(entry.$ref);
21
- if (nameFromRef) {
22
- return nameFromRef;
19
+ /**
20
+ * Collect inline definitions without changing the API description. Location-based names keep
21
+ * credentials for unrelated declarations separate, even when their definitions are identical.
22
+ * Component names remain unchanged for existing auth configuration and persisted credentials.
23
+ */
24
+ export const getAsyncApiSecuritySchemes = (document, owners = {}) => {
25
+ const components = document.components ? getResolvedAsyncApiRef(document.components) : undefined;
26
+ const schemes = {};
27
+ for (const [name, reference] of Object.entries(components?.securitySchemes ?? {})) {
28
+ const scheme = getResolvedAsyncApiRef(reference);
29
+ if (scheme) {
30
+ schemes[name] = scheme;
23
31
  }
24
32
  }
25
- const resolvedDefinition = getSecuritySchemeDefinition(entry);
26
- if (resolvedDefinition == null) {
27
- return undefined;
28
- }
29
- const components = document.components ? getResolvedRef(document.components) : undefined;
30
- if (components?.securitySchemes) {
31
- for (const [name, schemeRef] of Object.entries(components.securitySchemes)) {
32
- const scheme = getResolvedRef(schemeRef);
33
- if (scheme === resolvedDefinition || isObjectEqual(scheme, resolvedDefinition)) {
34
- return name;
33
+ const register = (security, location) => {
34
+ for (const [index, entry] of (security ?? []).entries()) {
35
+ const scheme = getResolvedAsyncApiRef(entry);
36
+ if (!scheme || !('type' in scheme)) {
37
+ continue;
35
38
  }
39
+ const componentName = getComponentSecuritySchemeName(document, entry);
40
+ if (componentName !== undefined) {
41
+ continue;
42
+ }
43
+ schemes[getInlineSecuritySchemeName(document, scheme, location, index)] = scheme;
44
+ }
45
+ };
46
+ const servers = owners.servers ?? (document.servers ? getResolvedAsyncApiRef(document.servers) : undefined);
47
+ for (const [name, reference] of Object.entries(servers ?? {})) {
48
+ register(getResolvedAsyncApiRef(reference)?.security, `Server ${name}`);
49
+ }
50
+ const operations = owners.operations ?? (document.operations ? getResolvedAsyncApiRef(document.operations) : undefined);
51
+ for (const [name, reference] of Object.entries(operations ?? {})) {
52
+ const operation = getResolvedAsyncApiRef(reference);
53
+ if (operation) {
54
+ register(resolveOperationWithTraits(operation).security, `Operation ${name}`);
55
+ }
56
+ }
57
+ return schemes;
58
+ };
59
+ const getComponentSecuritySchemeName = (document, entry) => {
60
+ if ('$ref' in entry) {
61
+ const name = getSecuritySchemeNameFromRef(entry.$ref);
62
+ if (name !== undefined) {
63
+ return name;
36
64
  }
37
65
  }
38
- return undefined;
66
+ const definition = getSecuritySchemeDefinition(entry);
67
+ if (!definition) {
68
+ return undefined;
69
+ }
70
+ const components = document.components ? getResolvedAsyncApiRef(document.components) : undefined;
71
+ return Object.entries(components?.securitySchemes ?? {}).find(([, scheme]) => isObjectEqual(getSecuritySchemeDefinition(scheme), definition))?.[0];
39
72
  };
40
- const securityEntryToRequirement = (document, entry) => {
41
- const schemeName = getSecuritySchemeName(document, entry);
42
- if (!schemeName) {
73
+ /** Use declaration locations rather than object identity: traits can share the same object. */
74
+ const getInlineSecuritySchemeName = (document, scheme, location, index) => {
75
+ const components = document.components ? getResolvedAsyncApiRef(document.components) : undefined;
76
+ const availableName = (name) => Object.hasOwn(components?.securitySchemes ?? {}, name) ? availableName(`${name} (inline)`) : name;
77
+ return availableName(`${location} · ${scheme.type} ${index + 1}`);
78
+ };
79
+ const securityEntryToRequirement = (document, entry, index, location, schemes) => {
80
+ const resolved = getResolvedAsyncApiRef(entry);
81
+ const schemeName = getComponentSecuritySchemeName(document, entry) ??
82
+ (resolved && 'type' in resolved && location !== undefined
83
+ ? getInlineSecuritySchemeName(document, resolved, location, index)
84
+ : Object.entries(schemes).find(([, scheme]) => scheme === resolved)?.[0]);
85
+ if (schemeName === undefined) {
43
86
  return undefined;
44
87
  }
45
- const resolved = getResolvedRef(entry);
46
88
  const scopes = resolved != null && 'scopes' in resolved && Array.isArray(resolved.scopes) ? [...resolved.scopes] : [];
47
89
  return { [schemeName]: scopes };
48
90
  };
49
- const collectSecurityRequirements = (document, security) => {
91
+ const collectSecurityRequirements = (document, security, location, schemes) => {
50
92
  if (!security?.length) {
51
93
  return [];
52
94
  }
53
95
  return security
54
- .map((entry) => securityEntryToRequirement(document, entry))
96
+ .map((entry, index) => securityEntryToRequirement(document, entry, index, location, schemes))
55
97
  .filter((requirement) => requirement != null);
56
98
  };
57
99
  /**
58
100
  * Converts AsyncAPI security arrays (operation, traits, server) into OpenAPI-style requirement objects.
59
101
  */
60
- export const getAsyncApiSecurityRequirements = (document, operation, server) => {
61
- const operationRequirements = collectSecurityRequirements(document, operation?.security);
62
- const serverRequirements = collectSecurityRequirements(document, server?.security);
63
- const combined = operationRequirements.length === 0
64
- ? serverRequirements
65
- : serverRequirements.length === 0
66
- ? operationRequirements
67
- : [...operationRequirements, ...serverRequirements];
102
+ export const getAsyncApiSecurityRequirements = (document, operation, server, locations = {}) => {
103
+ // Existing callers can omit locations. Build their fallback registry once, not once per entry.
104
+ const needsRegistry = (operation?.security?.length && locations.operationName === undefined) ||
105
+ (server?.security?.length && locations.serverName === undefined);
106
+ const schemes = needsRegistry ? getAsyncApiSecuritySchemes(document) : {};
107
+ const operationRequirements = collectSecurityRequirements(document, operation?.security, locations.operationName === undefined ? undefined : `Operation ${locations.operationName}`, schemes);
108
+ const serverRequirements = collectSecurityRequirements(document, server?.security, locations.serverName === undefined ? undefined : `Server ${locations.serverName}`, schemes);
109
+ if (operationRequirements.length === 0) {
110
+ return dedupeRequirements(serverRequirements);
111
+ }
112
+ if (serverRequirements.length === 0) {
113
+ return dedupeRequirements(operationRequirements);
114
+ }
115
+ const combined = operationRequirements.flatMap((operationRequirement) => serverRequirements.map((serverRequirement) => {
116
+ const combined = { ...serverRequirement };
117
+ for (const [name, scopes] of Object.entries(operationRequirement)) {
118
+ combined[name] = [...new Set([...(combined[name] ?? []), ...(scopes ?? [])])];
119
+ }
120
+ return combined;
121
+ }));
68
122
  return dedupeRequirements(combined);
69
123
  };
70
124
  /**
@@ -75,12 +129,15 @@ export const getAsyncApiSecurityRequirements = (document, operation, server) =>
75
129
  * intentionally excluded here — that is per-channel and handled separately.
76
130
  */
77
131
  export const getAsyncApiDocumentSecurityRequirements = (document) => {
78
- const servers = document.servers ? getResolvedRef(document.servers) : undefined;
132
+ const servers = document.servers ? getResolvedAsyncApiRef(document.servers) : undefined;
79
133
  if (!servers) {
80
134
  return [];
81
135
  }
82
- const resolvedServers = Object.values(servers).map((serverRef) => getResolvedRef(serverRef));
83
- const perServerRequirements = resolvedServers.map((server) => getAsyncApiSecurityRequirements(document, null, server));
136
+ const resolvedServers = Object.entries(servers).map(([name, serverRef]) => ({
137
+ name,
138
+ server: getResolvedAsyncApiRef(serverRef),
139
+ }));
140
+ const perServerRequirements = resolvedServers.map(({ name, server }) => getAsyncApiSecurityRequirements(document, null, server, { serverName: name }));
84
141
  const combined = perServerRequirements.flat();
85
142
  // When some servers require auth while others accept unauthenticated connections, surface the
86
143
  // no-auth path as an optional `{}` requirement so those servers stay selectable. "No auth" is
@@ -88,7 +145,7 @@ export const getAsyncApiDocumentSecurityRequirements = (document) => {
88
145
  // security failed to resolve to a scheme — that server still requires auth. If no server
89
146
  // requires auth at all, we return `[]` and let the selector treat every scheme as optional.
90
147
  const someRequireAuth = perServerRequirements.some((requirements) => requirements.length > 0);
91
- const someDeclareNoAuth = resolvedServers.some((server) => !server?.security?.length);
148
+ const someDeclareNoAuth = resolvedServers.some(({ server }) => !server?.security?.length);
92
149
  if (someRequireAuth && someDeclareNoAuth) {
93
150
  combined.push({});
94
151
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get-channel-connection-context.d.ts","sourceRoot":"","sources":["../../src/channel-example/get-channel-connection-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAS9E,OAAO,KAAK,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AACnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAQ9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAK5D;;;GAGG;AACH,eAAO,MAAM,2BAA2B,GACtC,gBAAgB,cAAc,EAC9B,cAAc,MAAM,EACpB,uBAAuB,qBAAqB,EAC5C,UAAS,OAAO,CAAC;IACf,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC,cAAc,EAAE,2BAA2B,CAAA;IAC3C,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAA;CAC3C,CAAM,KACN,MAAM,CAAC,6BAA6B,CAwItC,CAAA"}
1
+ {"version":3,"file":"get-channel-connection-context.d.ts","sourceRoot":"","sources":["../../src/channel-example/get-channel-connection-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAU9E,OAAO,KAAK,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AACnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAO9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAK5D;;;GAGG;AACH,eAAO,MAAM,2BAA2B,GACtC,gBAAgB,cAAc,EAC9B,cAAc,MAAM,EACpB,uBAAuB,qBAAqB,EAC5C,UAAS,OAAO,CAAC;IACf,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC,cAAc,EAAE,2BAA2B,CAAA;IAC3C,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAA;CAC3C,CAAM,KACN,MAAM,CAAC,6BAA6B,CAuItC,CAAA"}
@@ -1,11 +1,11 @@
1
1
  import { buildConnectionUrl } from '../channel-example/build-connection-url.js';
2
2
  import { getAllChannelMessages } from '../channel-example/get-all-channel-messages.js';
3
+ import { getAsyncApiSecuritySchemes } from '../channel-example/get-asyncapi-security-requirements.js';
3
4
  import { getChannelConnectionSecurityRequirements } from '../channel-example/get-channel-connection-security.js';
4
5
  import { getChannelOperations } from '../channel-example/get-channel-operations.js';
5
6
  import { getChannelParameters } from '../channel-example/get-channel-parameters.js';
6
7
  import { resolveChannel } from '../channel-example/resolve-channel.js';
7
8
  import { getAsyncApiServers, getSelectedAsyncApiServer } from '../channel-example/servers.js';
8
- import { getResolvedRef } from '../helpers/get-resolved-ref.js';
9
9
  import { getEnvironmentVariables } from '../request-example/builder/helpers/get-environment-variables.js';
10
10
  import { getActiveEnvironment } from '../request-example/context/environment.js';
11
11
  import { getSecuritySchemes } from '../request-example/context/security/get-security-schemes.js';
@@ -84,9 +84,8 @@ export const getChannelConnectionContext = (workspaceStore, documentName, channe
84
84
  path: channelName,
85
85
  method: ASYNCAPI_CHANNEL_AUTH_METHOD,
86
86
  });
87
- const components = document.components ? getResolvedRef(document.components) : undefined;
88
- const securitySchemes = mergeSecurity(components?.securitySchemes ?? {}, options.authentication?.securitySchemes ?? {}, workspaceStore.auth, documentName);
89
- const securityRequirements = getChannelConnectionSecurityRequirements(document, channel, selectedServer?.server ?? null, channelOperations);
87
+ const securitySchemes = mergeSecurity(getAsyncApiSecuritySchemes(document, { operations: {} }), options.authentication?.securitySchemes ?? {}, workspaceStore.auth, documentName);
88
+ const securityRequirements = getChannelConnectionSecurityRequirements(document, channel, selectedServer?.server ?? null, channelOperations, selectedServer?.name);
90
89
  const selectedSecurity = getSelectedSecurity(documentSelectedSecurity, channelSelectedSecurity, securityRequirements, securitySchemes, options.authentication?.preferredSecurityScheme);
91
90
  const selectedSecuritySchemes = getSecuritySchemes(securitySchemes, selectedSecurity.selectedSchemes[selectedSecurity.selectedIndex] ?? {});
92
91
  const authMeta = channelSelectedSecurity
@@ -2,7 +2,8 @@ import type { AsyncApiChannelObject, AsyncApiDocument, AsyncApiServerObject } fr
2
2
  import type { SecurityRequirementObject } from '../schemas/v3.2/strict/security-requirement.js';
3
3
  import type { ChannelOperationSummary } from './get-channel-operations.js';
4
4
  /**
5
- * Merges security requirements from the selected server and all operations on a channel.
5
+ * Connection authentication belongs to the selected server; operation security is documented separately.
6
+ * Keep the channel arguments for compatibility with existing consumers of this public helper.
6
7
  */
7
- export declare const getChannelConnectionSecurityRequirements: (document: AsyncApiDocument, _channel: AsyncApiChannelObject, server: AsyncApiServerObject | null, channelOperations: ChannelOperationSummary[]) => SecurityRequirementObject[];
8
+ export declare const getChannelConnectionSecurityRequirements: (document: AsyncApiDocument, _channel: AsyncApiChannelObject, server: AsyncApiServerObject | null, _channelOperations: ChannelOperationSummary[], serverName?: string) => SecurityRequirementObject[];
8
9
  //# sourceMappingURL=get-channel-connection-security.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-channel-connection-security.d.ts","sourceRoot":"","sources":["../../src/channel-example/get-channel-connection-security.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAG/G,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAA;AAG3F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAEvE;;GAEG;AACH,eAAO,MAAM,wCAAwC,GACnD,UAAU,gBAAgB,EAC1B,UAAU,qBAAqB,EAC/B,QAAQ,oBAAoB,GAAG,IAAI,EACnC,mBAAmB,uBAAuB,EAAE,KAC3C,yBAAyB,EAQ3B,CAAA"}
1
+ {"version":3,"file":"get-channel-connection-security.d.ts","sourceRoot":"","sources":["../../src/channel-example/get-channel-connection-security.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAG/G,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAA;AAE3F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAEvE;;;GAGG;AACH,eAAO,MAAM,wCAAwC,GACnD,UAAU,gBAAgB,EAC1B,UAAU,qBAAqB,EAC/B,QAAQ,oBAAoB,GAAG,IAAI,EACnC,oBAAoB,uBAAuB,EAAE,EAC7C,aAAa,MAAM,KAClB,yBAAyB,EAE3B,CAAA"}
@@ -1,10 +1,8 @@
1
1
  import { getAsyncApiSecurityRequirements } from '../channel-example/get-asyncapi-security-requirements.js';
2
- import { dedupeRequirements } from './dedupe-requirements.js';
3
2
  /**
4
- * Merges security requirements from the selected server and all operations on a channel.
3
+ * Connection authentication belongs to the selected server; operation security is documented separately.
4
+ * Keep the channel arguments for compatibility with existing consumers of this public helper.
5
5
  */
6
- export const getChannelConnectionSecurityRequirements = (document, _channel, server, channelOperations) => {
7
- const serverRequirements = getAsyncApiSecurityRequirements(document, null, server);
8
- const operationRequirements = channelOperations.flatMap(({ operation }) => getAsyncApiSecurityRequirements(document, operation, null));
9
- return dedupeRequirements([...serverRequirements, ...operationRequirements]);
6
+ export const getChannelConnectionSecurityRequirements = (document, _channel, server, _channelOperations, serverName) => {
7
+ return getAsyncApiSecurityRequirements(document, null, server, { serverName });
10
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"get-channel-operations.d.ts","sourceRoot":"","sources":["../../src/channel-example/get-channel-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AAO3F,MAAM,MAAM,uBAAuB,GAAG;IACpC,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,uBAAuB,CAAA;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,UAAU,gBAAgB,EAAE,aAAa,MAAM,KAAG,uBAAuB,EAkB7G,CAAA"}
1
+ {"version":3,"file":"get-channel-operations.d.ts","sourceRoot":"","sources":["../../src/channel-example/get-channel-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AAO3F,MAAM,MAAM,uBAAuB,GAAG;IACpC,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,uBAAuB,CAAA;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,UAAU,gBAAgB,EAAE,aAAa,MAAM,KAAG,uBAAuB,EAoB7G,CAAA"}
@@ -1,4 +1,4 @@
1
- import { getResolvedRef } from '../helpers/get-resolved-ref.js';
1
+ import { getResolvedAsyncApiRef } from '../helpers/get-resolved-async-api-ref.js';
2
2
  import { resolveOperationChannel } from './resolve-operation-channel.js';
3
3
  import { resolveOperationWithTraits } from './resolve-operation-with-traits.js';
4
4
  /**
@@ -8,9 +8,10 @@ export const getChannelOperations = (document, channelName) => {
8
8
  const operations = document.operations ?? {};
9
9
  return Object.entries(operations)
10
10
  .map(([operationName, operationRef]) => {
11
- const resolvedOperation = getResolvedRef(operationRef);
12
- if (!resolvedOperation)
11
+ const resolvedOperation = getResolvedAsyncApiRef(operationRef);
12
+ if (!resolvedOperation) {
13
13
  return undefined;
14
+ }
14
15
  const operation = resolveOperationWithTraits(resolvedOperation);
15
16
  const resolved = resolveOperationChannel(document, operation);
16
17
  if (resolved?.channelName !== channelName) {
@@ -1 +1 @@
1
- {"version":3,"file":"get-channel-parameters.d.ts","sourceRoot":"","sources":["../../src/channel-example/get-channel-parameters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,4BAA4B,CAAA;AAKnC,MAAM,MAAM,wBAAwB,GAAG;IACrC,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAA;IACpD,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC9B,CAAA;AA+BD;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,qBAAqB,EAC9B,YAAY,uBAAuB,GAAG,IAAI,EAC1C,YAAW,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,MAAM,GAAG,OAAO,CAAC,CAAM,KACxE,wBAiCF,CAAA"}
1
+ {"version":3,"file":"get-channel-parameters.d.ts","sourceRoot":"","sources":["../../src/channel-example/get-channel-parameters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,4BAA4B,CAAA;AAKnC,MAAM,MAAM,wBAAwB,GAAG;IACrC,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAA;IACpD,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC9B,CAAA;AA+BD;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,qBAAqB,EAC9B,YAAY,uBAAuB,GAAG,IAAI,EAC1C,YAAW,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,MAAM,GAAG,OAAO,CAAC,CAAM,KACxE,wBAmCF,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { objectEntries } from '@scalar/helpers/object/object-entries';
2
2
  import { findVariables } from '@scalar/helpers/regex/find-variables';
3
3
  import { buildWsQueryParams, mergeWsBindings } from '../channel-example/build-connection-url.js';
4
- import { getResolvedRef } from '../helpers/get-resolved-ref.js';
4
+ import { getResolvedAsyncApiRef } from '../helpers/get-resolved-async-api-ref.js';
5
5
  const getPathParameterNames = (address) => {
6
6
  if (address == null || address === '') {
7
7
  return [];
@@ -33,9 +33,10 @@ export const getChannelParameters = (channel, operation, overrides = {}) => {
33
33
  const definitions = {};
34
34
  if (channel.parameters) {
35
35
  for (const [name, parameterRef] of objectEntries(channel.parameters)) {
36
- const parameter = getResolvedRef(parameterRef);
37
- if (parameter)
36
+ const parameter = getResolvedAsyncApiRef(parameterRef);
37
+ if (parameter) {
38
38
  definitions[name] = parameter;
39
+ }
39
40
  }
40
41
  }
41
42
  const path = { ...overrides.path };
@@ -3,8 +3,8 @@ export { ASYNCAPI_WEBSOCKET_PROTOCOLS, buildAsyncApiServerBaseUrl, buildConnecti
3
3
  export type { ChannelMessageEntry } from './get-all-channel-messages.js';
4
4
  export { getAllChannelMessages } from './get-all-channel-messages.js';
5
5
  export type { AsyncApiProtocolOption, AsyncApiReachabilityContext, AsyncApiServerOption, OperationReachability, } from './get-async-api-protocols.js';
6
- export { ALL, createReachabilityContext, getAsyncApiProtocols, getAsyncApiServerOptions, getOperationProtocols, getOperationReachability, getOperationServerNames, operationMatchesProtocol, operationMatchesServer, } from './get-async-api-protocols.js';
7
- export { getAsyncApiDocumentSecurityRequirements, getAsyncApiSecurityRequirements, } from './get-asyncapi-security-requirements.js';
6
+ export { ALL, createReachabilityContext, getAsyncApiProtocols, getAsyncApiServerOptions, getChannelReachability, getOperationProtocols, getOperationReachability, getOperationServerNames, operationMatchesProtocol, operationMatchesServer, } from './get-async-api-protocols.js';
7
+ export { getAsyncApiDocumentSecurityRequirements, getAsyncApiSecurityRequirements, getAsyncApiSecuritySchemes, } from './get-asyncapi-security-requirements.js';
8
8
  export { getChannelConnectionContext } from './get-channel-connection-context.js';
9
9
  export { getChannelConnectionSecurityRequirements } from './get-channel-connection-security.js';
10
10
  export type { ChannelOperationSummary } from './get-channel-operations.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/channel-example/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,yBAAyB,EAA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AAE,MAAM,0BAA0B,CAAA;AAC/D,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,YAAY,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AAC5E,YAAY,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAA;AAC/E,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAA;AACzE,YAAY,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA"}
@@ -1,7 +1,7 @@
1
1
  export { ASYNCAPI_WEBSOCKET_PROTOCOLS, buildAsyncApiServerBaseUrl, buildConnectionUrl, buildWsQueryParams, getAsyncApiServerVariables, getUrlSchemeFromProtocol, isWebSocketProtocol, mergeWsBindings, } from './build-connection-url.js';
2
2
  export { getAllChannelMessages } from './get-all-channel-messages.js';
3
- export { ALL, createReachabilityContext, getAsyncApiProtocols, getAsyncApiServerOptions, getOperationProtocols, getOperationReachability, getOperationServerNames, operationMatchesProtocol, operationMatchesServer, } from './get-async-api-protocols.js';
4
- export { getAsyncApiDocumentSecurityRequirements, getAsyncApiSecurityRequirements, } from './get-asyncapi-security-requirements.js';
3
+ export { ALL, createReachabilityContext, getAsyncApiProtocols, getAsyncApiServerOptions, getChannelReachability, getOperationProtocols, getOperationReachability, getOperationServerNames, operationMatchesProtocol, operationMatchesServer, } from './get-async-api-protocols.js';
4
+ export { getAsyncApiDocumentSecurityRequirements, getAsyncApiSecurityRequirements, getAsyncApiSecuritySchemes, } from './get-asyncapi-security-requirements.js';
5
5
  export { getChannelConnectionContext } from './get-channel-connection-context.js';
6
6
  export { getChannelConnectionSecurityRequirements } from './get-channel-connection-security.js';
7
7
  export { getChannelOperations } from './get-channel-operations.js';
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-channel.d.ts","sourceRoot":"","sources":["../../src/channel-example/resolve-channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAIzF,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,qBAAqB,CAAA;IAC9B,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU,gBAAgB,EAAE,aAAa,MAAM,KAAG,eAAe,GAAG,SAYlG,CAAA"}
1
+ {"version":3,"file":"resolve-channel.d.ts","sourceRoot":"","sources":["../../src/channel-example/resolve-channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAIzF,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,qBAAqB,CAAA;IAC9B,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU,gBAAgB,EAAE,aAAa,MAAM,KAAG,eAAe,GAAG,SAclG,CAAA"}