@redocly/realm 0.134.0-next.2 → 0.134.0-next.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 (196) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/cli/eject/ejectComponent.d.ts +1 -1
  3. package/dist/cli/eject/ejectTheme.d.ts +1 -1
  4. package/dist/cli/eject/themeOperations.d.ts +2 -2
  5. package/dist/cli/telemetry/index.d.ts +1 -1
  6. package/dist/client/ErrorBoundary.d.ts +1 -1
  7. package/dist/client/TestProvider.d.ts +1 -1
  8. package/dist/client/app/CircularProgress.d.ts +1 -1
  9. package/dist/client/app/ConditionalLink.d.ts +2 -2
  10. package/dist/client/app/Link.js +1 -1
  11. package/dist/client/app/Sidebar/useSidebarItems.d.ts +2 -2
  12. package/dist/client/app/hooks/catalog/useCatalogFilter.d.ts +12 -12
  13. package/dist/client/app/hooks/catalog/useCatalogSort.d.ts +2 -2
  14. package/dist/client/app/hooks/catalog/useFetchCatalogEntities.d.ts +1 -1
  15. package/dist/client/app/hooks/catalog/useFetchCatalogEntitiesRelations.d.ts +2 -2
  16. package/dist/client/app/hooks/catalog/useFetchCatalogEntityRevisions.d.ts +1 -1
  17. package/dist/client/app/hooks/catalog/useSearchTracker.d.ts +1 -1
  18. package/dist/client/app/hooks/products/useProducts.d.ts +3 -3
  19. package/dist/client/app/l10n/index.d.ts +1 -1
  20. package/dist/client/app/markdoc/custom-components/openapi/get-operation/get-operation.d.ts +1 -1
  21. package/dist/client/app/markdoc/custom-components/styled.elements.d.ts +2 -4
  22. package/dist/client/app/pages/DevLogin/DevLoginForm.d.ts +1 -1
  23. package/dist/client/app/pages/DevLogin/styled.d.ts +3 -3
  24. package/dist/client/app/useGlobalData.d.ts +1 -1
  25. package/dist/client/app/utils/getBlocksHeight.d.ts +5 -14
  26. package/dist/client/app/utils/getBlocksHeight.js +1 -1
  27. package/dist/client/app/utils/loadAndNavigate.d.ts +1 -1
  28. package/dist/client/app/utils/syncScrollWithEditor.js +1 -1
  29. package/dist/client/browser-entry.d.ts +0 -1
  30. package/dist/client/browser-entry.js +3 -3
  31. package/dist/client/constants/ai-search.d.ts +7 -7
  32. package/dist/client/providers/page-data/hooks.d.ts +3 -3
  33. package/dist/client/templates/asyncapi-docs/helpers.d.ts +4 -181
  34. package/dist/client/templates/asyncapi-docs/helpers.js +1 -1
  35. package/dist/client/templates/openapi-docs/helpers.d.ts +1 -1
  36. package/dist/client/templates/openapi-docs/helpers.js +2 -2
  37. package/dist/client/templates/openapi-docs/mock-server-config.d.ts +3 -3
  38. package/dist/client/templates/openapi-docs/template.d.ts +1 -1
  39. package/dist/client/types/sidebar.d.ts +4 -4
  40. package/dist/constants/common.d.ts +66 -66
  41. package/dist/markdoc/helpers/normalize-custom-tags.d.ts +2 -0
  42. package/dist/markdoc/helpers/normalize-custom-tags.js +1 -0
  43. package/dist/markdoc/nodes/index.d.ts +6 -6
  44. package/dist/markdoc/tags/index.d.ts +2 -48
  45. package/dist/server/api-routes/helpers/read-stream-with-size-limit.d.ts +1 -1
  46. package/dist/server/api-routes/run-api-routes-worker.d.ts +1 -1
  47. package/dist/server/config/env-config.d.ts +17 -17
  48. package/dist/server/config/env-schema.d.ts +46 -46
  49. package/dist/server/config/env-schemas/auth.d.ts +4 -4
  50. package/dist/server/config/env-schemas/catalog.d.ts +2 -2
  51. package/dist/server/config/env-schemas/environment-detection.d.ts +8 -8
  52. package/dist/server/config/env-schemas/feature-flags.d.ts +10 -10
  53. package/dist/server/config/env-schemas/search.d.ts +3 -3
  54. package/dist/server/config/env-schemas/server-config.d.ts +2 -2
  55. package/dist/server/fs/content-fs.d.ts +1 -1
  56. package/dist/server/node-bundle-entry.js +1 -1
  57. package/dist/server/persistence/cache/mappers/create-cache-db-record.d.ts +1 -1
  58. package/dist/server/persistence/cache/repositories/cache-repository.js +1 -1
  59. package/dist/server/persistence/file-hashes/mappers/create-file-hash-db-record.d.ts +1 -1
  60. package/dist/server/persistence/file-hashes/repositories/file-hashes-repository.js +1 -1
  61. package/dist/server/persistence/kv/mappers/create-kv-db-record.d.ts +1 -1
  62. package/dist/server/persistence/kv/repositories/kv-repository.d.ts +1 -1
  63. package/dist/server/persistence/kv/repositories/kv-repository.js +2 -2
  64. package/dist/server/persistence/kv/services/kv-service.d.ts +3 -2
  65. package/dist/server/persistence/kv/services/kv-service.js +1 -1
  66. package/dist/server/plugins/catalog-entities/database/catalog-entities-service.d.ts +7 -6
  67. package/dist/server/plugins/catalog-entities/database/catalog-entities-service.js +1 -1
  68. package/dist/server/plugins/catalog-entities/database/mappers/create-entity-attributes-db-record.d.ts +1 -1
  69. package/dist/server/plugins/catalog-entities/database/mappers/create-entity-db-record.d.ts +1 -1
  70. package/dist/server/plugins/catalog-entities/database/mappers/create-entity-relation-db-record-from-file-schema.d.ts +1 -1
  71. package/dist/server/plugins/catalog-entities/database/mappers/field-transformations.d.ts +2 -2
  72. package/dist/server/plugins/catalog-entities/database/remote-publish-lock-service.d.ts +3 -3
  73. package/dist/server/plugins/catalog-entities/database/repositories/bffEntities/bff-entities-read-repository.d.ts +2 -2
  74. package/dist/server/plugins/catalog-entities/database/repositories/catalog-entities-repository.d.ts +1 -4
  75. package/dist/server/plugins/catalog-entities/database/repositories/catalog-entities-repository.js +1 -1
  76. package/dist/server/plugins/catalog-entities/database/repositories/common/filters-repository.d.ts +1 -1
  77. package/dist/server/plugins/catalog-entities/database/repositories/common/revision-repository.d.ts +1 -1
  78. package/dist/server/plugins/catalog-entities/database/repositories/entities/entities-read-repository.d.ts +1 -1
  79. package/dist/server/plugins/catalog-entities/database/repositories/entities/entities-read-repository.js +1 -1
  80. package/dist/server/plugins/catalog-entities/database/repositories/entities/entities-write-repository.d.ts +2 -2
  81. package/dist/server/plugins/catalog-entities/database/repositories/entities/entities-write-repository.js +1 -1
  82. package/dist/server/plugins/catalog-entities/database/repositories/entityAttributes/entity-attributes-write-repository.d.ts +1 -1
  83. package/dist/server/plugins/catalog-entities/database/repositories/relations/relations-read-repository.d.ts +2 -2
  84. package/dist/server/plugins/catalog-entities/database/repositories/utils.d.ts +4 -4
  85. package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/base.d.ts +2 -2
  86. package/dist/server/plugins/catalog-entities/extensions/extractors/fs-entities-extractor.d.ts +1 -1
  87. package/dist/server/plugins/catalog-entities/schemas/database-schemas.d.ts +78 -78
  88. package/dist/server/plugins/catalog-entities/schemas/dto-schemas.d.ts +28 -28
  89. package/dist/server/plugins/catalog-entities/utils/get-not-accessible-catalog-resources.d.ts +1 -1
  90. package/dist/server/plugins/catalog-entities/utils/is-predefined-catalog-type.d.ts +1 -1
  91. package/dist/server/plugins/catalog-entities/utils/openapi-component-content-extractor.d.ts +1 -1
  92. package/dist/server/plugins/config-parser/normalize-redirect-sources.d.ts +1 -1
  93. package/dist/server/plugins/default-theme/resolve-products-config.d.ts +1 -1
  94. package/dist/server/plugins/dev-onboarding/index.d.ts +1 -1
  95. package/dist/server/plugins/dev-onboarding/template/App.d.ts +1 -1
  96. package/dist/server/plugins/dev-onboarding/template/components/ApiKeyItem.d.ts +62 -4
  97. package/dist/server/plugins/dev-onboarding/template/components/ApiKeyProductStatus.js +2 -2
  98. package/dist/server/plugins/dev-onboarding/template/components/ApiKeySecret.js +2 -2
  99. package/dist/server/plugins/dev-onboarding/template/components/ApiKeys.d.ts +8 -2
  100. package/dist/server/plugins/dev-onboarding/template/components/ApiLogItem.js +1 -1
  101. package/dist/server/plugins/dev-onboarding/template/components/CharacterCounter.d.ts +1 -1
  102. package/dist/server/plugins/dev-onboarding/template/components/Container.d.ts +14 -2
  103. package/dist/server/plugins/dev-onboarding/template/components/DialogStyledComponents.d.ts +31 -11
  104. package/dist/server/plugins/dev-onboarding/template/components/MenuItemButton.d.ts +1 -1
  105. package/dist/server/plugins/dev-onboarding/template/components/Paper.d.ts +15 -3
  106. package/dist/server/plugins/dev-onboarding/template/components/PopupMenuUl.d.ts +1 -1
  107. package/dist/server/plugins/dev-onboarding/template/components/RevokeAPIKey.d.ts +2 -2
  108. package/dist/server/plugins/dev-onboarding/template/components/RevokeAPIKey.js +1 -1
  109. package/dist/server/plugins/dev-onboarding/template/components/RollAPIKey.d.ts +2 -2
  110. package/dist/server/plugins/dev-onboarding/template/components/RollAPIKey.js +1 -1
  111. package/dist/server/plugins/dev-onboarding/template/components/ShadowButton.d.ts +1 -1
  112. package/dist/server/plugins/dev-onboarding/template/components/ShadowButton.js +2 -2
  113. package/dist/server/plugins/dev-onboarding/template/components/StatusBadge.d.ts +1 -3
  114. package/dist/server/plugins/dev-onboarding/template/components/useSortableData.d.ts +2 -2
  115. package/dist/server/plugins/entitlements/utils/get-billed-catalog-build-pages-count.js +1 -1
  116. package/dist/server/plugins/graphql-docs/constants.d.ts +1 -1
  117. package/dist/server/plugins/graphql-docs/search/ai/utils.d.ts +1 -1
  118. package/dist/server/plugins/markdown/markdoc/markdoc-options.d.ts +36 -18
  119. package/dist/server/plugins/markdown/markdoc/markdoc-options.js +1 -1
  120. package/dist/server/plugins/markdown/search/get-ai-search-documents.d.ts +1 -1
  121. package/dist/server/plugins/markdown/search/nodes/tag-node.d.ts +1 -1
  122. package/dist/server/plugins/markdown/utils/resolve-markdown-template.d.ts +1 -1
  123. package/dist/server/plugins/mcp/constants.d.ts +1 -1
  124. package/dist/server/plugins/mcp/docs-mcp/tools/index.d.ts +8 -8
  125. package/dist/server/plugins/mcp/docs-mcp/tools/utils.d.ts +1 -1
  126. package/dist/server/plugins/mcp/docs-mcp/utils.d.ts +2 -2
  127. package/dist/server/plugins/mcp/servers/docs-server.d.ts +1 -1
  128. package/dist/server/plugins/scorecard-classic/compute-scorecard.d.ts +1 -1
  129. package/dist/server/plugins/scorecard-classic/get-scorecard-config.d.ts +63 -63
  130. package/dist/server/plugins/scorecard-classic/index.d.ts +1 -1
  131. package/dist/server/plugins/scorecard-classic/lint.d.ts +3 -3
  132. package/dist/server/plugins/scorecard-classic/template/Gauge.d.ts +1 -1
  133. package/dist/server/plugins/scorecard-classic/template/components.d.ts +1 -1
  134. package/dist/server/plugins/scorecard-classic/template/index.styles.d.ts +61 -33
  135. package/dist/server/plugins/scorecard-classic/template/useData.d.ts +58 -58
  136. package/dist/server/plugins/scorecard-classic/template/utils.d.ts +1 -1
  137. package/dist/server/plugins/scorecards/database/repositories/scorecards-config-repository.d.ts +4 -0
  138. package/dist/server/plugins/scorecards/database/repositories/scorecards-config-repository.js +1 -1
  139. package/dist/server/plugins/scorecards/database/scorecards-config-service.d.ts +4 -4
  140. package/dist/server/plugins/scorecards/database/scorecards-config-service.js +1 -1
  141. package/dist/server/plugins/search/ai-indexer/prepare-semantic-documents.d.ts +1 -1
  142. package/dist/server/plugins/search/engines/search-engine.d.ts +1 -1
  143. package/dist/server/plugins/search/llmstxt/index.d.ts +1 -1
  144. package/dist/server/plugins/sidebars/index.d.ts +1 -1
  145. package/dist/server/providers/database/base-service.d.ts +25 -0
  146. package/dist/server/providers/database/base-service.js +1 -0
  147. package/dist/server/providers/database/database-path-generator.d.ts +2 -2
  148. package/dist/server/providers/database/database-preconnect-service.js +1 -1
  149. package/dist/server/providers/database/databases/sqlite-db/schemas/cache-table.d.ts +1 -1
  150. package/dist/server/providers/database/databases/sqlite-db/schemas/entities-attributes-table.d.ts +1 -1
  151. package/dist/server/providers/database/databases/sqlite-db/schemas/entities-relations-table.d.ts +1 -1
  152. package/dist/server/providers/database/databases/sqlite-db/schemas/entities-table.d.ts +1 -1
  153. package/dist/server/providers/database/databases/sqlite-db/schemas/file-hashes-table.d.ts +1 -1
  154. package/dist/server/providers/database/databases/sqlite-db/schemas/kv-table.d.ts +1 -1
  155. package/dist/server/providers/database/databases/sqlite-db/schemas/scorecards-config-table.d.ts +1 -1
  156. package/dist/server/providers/database/databases/sqlite-db/schemas/scorecards-evaluation-runs-table.d.ts +1 -1
  157. package/dist/server/providers/database/databases/sqlite-db/schemas/scorecards-level-results-table.d.ts +1 -1
  158. package/dist/server/providers/database/databases/sqlite-db/schemas/scorecards-levels-rules-results-table.d.ts +1 -1
  159. package/dist/server/providers/database/databases/sqlite-db/schemas/scorecards-results-table.d.ts +1 -1
  160. package/dist/server/providers/database/databases/sqlite-db/schemas/scorecards-rule-results-table.d.ts +1 -1
  161. package/dist/server/providers/database/instance-cache-resolver.d.ts +19 -0
  162. package/dist/server/providers/database/instance-cache-resolver.js +1 -0
  163. package/dist/server/providers/database/pagination/constants.d.ts +2 -2
  164. package/dist/server/providers/database/utils/storage-limit-validator.d.ts +1 -1
  165. package/dist/server/ssr/render.js +1 -1
  166. package/dist/server/ssr/server-side-props/get-default-static-props.d.ts +9 -9
  167. package/dist/server/ssr/server-side-props/get-server-props-from-user-handler.d.ts +1 -1
  168. package/dist/server/ssr/server-side-props/prepare-context-variables.d.ts +1 -1
  169. package/dist/server/ssr/template.d.ts +1 -1
  170. package/dist/server/store.d.ts +2 -2
  171. package/dist/server/tools/notifiers/reporter.d.ts +12 -12
  172. package/dist/server/utils/envs/env-boolean-string.d.ts +3 -3
  173. package/dist/server/utils/is-realm-or-reef.d.ts +2 -0
  174. package/dist/server/utils/is-realm-or-reef.js +1 -0
  175. package/dist/server/utils/product.d.ts +1 -1
  176. package/dist/server/utils/rbac.d.ts +33 -33
  177. package/dist/server/web-server/auth.d.ts +2 -2
  178. package/dist/server/web-server/dev-server.js +1 -1
  179. package/dist/server/web-server/middleware/catalogAuthMiddleware.d.ts +1 -1
  180. package/dist/server/web-server/routes/catalog/helpers/create-entity-relation-update-schema.d.ts +12 -12
  181. package/dist/server/web-server/routes/catalog/helpers/create-entity-schema.d.ts +1967 -1967
  182. package/dist/server/web-server/routes/catalog/helpers/create-entity-update-schema.d.ts +357 -357
  183. package/dist/server/web-server/routes/catalog/helpers/has-access-to-entity.d.ts +1 -1
  184. package/dist/server/web-server/routes/catalog/helpers/upsert-pages-stats.d.ts +1 -1
  185. package/dist/server/web-server/routes/catalog/parsers/relations/parse-entities-relations.d.ts +7 -7
  186. package/dist/server/web-server/routes/catalog/parsers/relations/parse-entity-relation-update-data.d.ts +7 -7
  187. package/dist/server/web-server/routes/catalog/parsers/relations/parse-entity-relation.d.ts +7 -7
  188. package/dist/server/web-server/routes/feedback.d.ts +1 -1
  189. package/dist/server/web-server/routes/helpers/process-redirects.d.ts +1 -1
  190. package/dist/server/web-server/utils/prepare-list-response.d.ts +1 -1
  191. package/dist/server/web-server/utils.d.ts +2 -2
  192. package/dist/utils/should-forward-prop.d.ts +9 -0
  193. package/dist/utils/should-forward-prop.js +1 -0
  194. package/package.json +12 -11
  195. package/dist/server/plugins/catalog-entities/utils/has-options-changed.d.ts +0 -2
  196. package/dist/server/plugins/catalog-entities/utils/has-options-changed.js +0 -1
@@ -40,7 +40,7 @@ export declare function useData(props: {
40
40
  title: string;
41
41
  items: CatalogItem[];
42
42
  }[];
43
- filters: import("@redocly/theme").ResolvedFilter[];
43
+ filters: import("@redocly/theme/core/types").ResolvedFilter[];
44
44
  scorecardInfo: {
45
45
  levelNames: string[];
46
46
  rulesPerLevel: Record<string, string[]>;
@@ -48,93 +48,93 @@ export declare function useData(props: {
48
48
  };
49
49
  catalogConfig: {
50
50
  filters: {
51
- type?: "select" | "checkboxes" | "date-range" | undefined;
51
+ missingCategoryName?: string | undefined;
52
+ missingCategoryNameTranslationKey?: string | undefined;
52
53
  options?: string[] | undefined;
53
- titleTranslationKey?: string | undefined;
54
54
  parentFilter?: string | undefined;
55
+ property: string;
56
+ title: string;
57
+ titleTranslationKey?: string | undefined;
58
+ type?: "checkboxes" | "date-range" | "select" | undefined;
55
59
  valuesMapping?: {
56
60
  [x: string]: string;
57
61
  } | undefined;
58
- missingCategoryName?: string | undefined;
59
- missingCategoryNameTranslationKey?: string | undefined;
60
- title: string;
61
- property: string;
62
62
  }[];
63
- title?: string | undefined;
64
63
  description?: string | undefined;
65
- show?: boolean | undefined;
66
- groupByFirstFilter?: boolean | undefined;
67
- filterValuesCasing?: "sentence" | "original" | "lowercase" | "uppercase" | undefined;
68
- requiredPermission?: string | undefined;
69
- separateVersions?: boolean | undefined;
70
- titleTranslationKey?: string | undefined;
71
64
  descriptionTranslationKey?: string | undefined;
65
+ filterValuesCasing?: "lowercase" | "original" | "sentence" | "uppercase" | undefined;
66
+ groupByFirstFilter?: boolean | undefined;
72
67
  items: {
73
68
  [x: string]: unknown;
69
+ additionalProps?: {
70
+ [x: string]: unknown;
71
+ } | undefined;
72
+ directory?: string | undefined;
73
+ disconnect?: boolean | undefined;
74
+ expanded?: "always" | undefined;
75
+ external?: boolean | undefined;
76
+ flatten?: boolean | undefined;
77
+ group?: string | undefined;
78
+ groupTranslationKey?: string | undefined;
79
+ href?: string | undefined;
80
+ icon?: string | {
81
+ [x: string]: unknown;
82
+ srcSet: string;
83
+ } | undefined;
74
84
  items?: {
75
85
  [x: string]: unknown;
76
- items?: {
86
+ additionalProps?: {
77
87
  [x: string]: unknown;
78
- }[] | undefined;
79
- rbac?: {
80
- [x: string]: string;
81
88
  } | undefined;
82
- separatorLine?: boolean | undefined;
83
- linePosition?: "top" | "bottom" | undefined;
89
+ directory?: string | undefined;
90
+ disconnect?: boolean | undefined;
91
+ expanded?: "always" | undefined;
92
+ external?: boolean | undefined;
93
+ flatten?: boolean | undefined;
94
+ group?: string | undefined;
95
+ groupTranslationKey?: string | undefined;
84
96
  href?: string | undefined;
85
- label?: string | undefined;
86
- page?: string | undefined;
87
97
  icon?: string | {
88
98
  [x: string]: unknown;
89
99
  srcSet: string;
90
100
  } | undefined;
91
- version?: string | undefined;
92
- directory?: string | undefined;
93
- disconnect?: boolean | undefined;
94
- group?: string | undefined;
95
- external?: boolean | undefined;
101
+ items?: {
102
+ [x: string]: unknown;
103
+ }[] | undefined;
104
+ label?: string | undefined;
96
105
  labelTranslationKey?: string | undefined;
97
- groupTranslationKey?: string | undefined;
98
- separator?: string | undefined;
99
- menuStyle?: "drilldown" | undefined;
100
- expanded?: "always" | undefined;
101
- selectFirstItemOnExpand?: boolean | undefined;
102
- flatten?: boolean | undefined;
106
+ linePosition?: "bottom" | "top" | undefined;
103
107
  linkedSidebars?: string[] | undefined;
104
- additionalProps?: {
105
- [x: string]: unknown;
108
+ menuStyle?: "drilldown" | undefined;
109
+ page?: string | undefined;
110
+ rbac?: {
111
+ [x: string]: string;
106
112
  } | undefined;
113
+ selectFirstItemOnExpand?: boolean | undefined;
114
+ separator?: string | undefined;
115
+ separatorLine?: boolean | undefined;
116
+ version?: string | undefined;
107
117
  }[] | undefined;
118
+ label?: string | undefined;
119
+ labelTranslationKey?: string | undefined;
120
+ linePosition?: "bottom" | "top" | undefined;
121
+ linkedSidebars?: string[] | undefined;
122
+ menuStyle?: "drilldown" | undefined;
123
+ page?: string | undefined;
108
124
  rbac?: {
109
125
  [x: string]: string;
110
126
  } | undefined;
127
+ selectFirstItemOnExpand?: boolean | undefined;
128
+ separator?: string | undefined;
111
129
  separatorLine?: boolean | undefined;
112
- linePosition?: "top" | "bottom" | undefined;
113
- href?: string | undefined;
114
- label?: string | undefined;
115
- page?: string | undefined;
116
- icon?: string | {
117
- [x: string]: unknown;
118
- srcSet: string;
119
- } | undefined;
120
130
  version?: string | undefined;
121
- directory?: string | undefined;
122
- disconnect?: boolean | undefined;
123
- group?: string | undefined;
124
- external?: boolean | undefined;
125
- labelTranslationKey?: string | undefined;
126
- groupTranslationKey?: string | undefined;
127
- separator?: string | undefined;
128
- menuStyle?: "drilldown" | undefined;
129
- expanded?: "always" | undefined;
130
- selectFirstItemOnExpand?: boolean | undefined;
131
- flatten?: boolean | undefined;
132
- linkedSidebars?: string[] | undefined;
133
- additionalProps?: {
134
- [x: string]: unknown;
135
- } | undefined;
136
131
  }[];
132
+ requiredPermission?: string | undefined;
133
+ separateVersions?: boolean | undefined;
134
+ show?: boolean | undefined;
137
135
  slug: string;
136
+ title?: string | undefined;
137
+ titleTranslationKey?: string | undefined;
138
138
  };
139
139
  hasTeam: boolean;
140
140
  hasPublishedAt: boolean;
@@ -9,7 +9,7 @@ export declare const SEVERITY_TO_COLOR: {
9
9
  Pass: string;
10
10
  };
11
11
  export declare function useSearchParams(location: Location): URLSearchParams;
12
- export declare function severityIcon(severity: string): "" | "⚠️" | "ℹ️";
12
+ export declare function severityIcon(severity: string): "ℹ️" | "⚠️" | "";
13
13
  export declare function severityColor(severity: string): "blue" | "orange" | "red";
14
14
  export declare function getProblemsByRule(scorecard: DetailedScorecardData, ruleId: string): ProblemWithCodeframe[];
15
15
  //# sourceMappingURL=utils.d.ts.map
@@ -1,8 +1,12 @@
1
1
  import type { DatabaseClient } from '../../../../providers/database/client.js';
2
2
  import type { DatabaseScorecardsConfig, DatabaseScorecardsConfigDto } from '../../../../providers/database/databases/sqlite-db/schemas/scorecards-config-table.js';
3
+ import type { RepositoryInstanceOptions } from '../../../../providers/database/types.js';
3
4
  export declare class ScorecardsConfigRepository {
4
5
  #private;
5
6
  constructor(db: DatabaseClient);
7
+ static create(options: RepositoryInstanceOptions): Promise<ScorecardsConfigRepository>;
8
+ sync(): Promise<void>;
9
+ close(): Promise<void>;
6
10
  findActiveConfigByKey(key: string): Promise<DatabaseScorecardsConfig | null>;
7
11
  findAllActiveConfigs(): Promise<DatabaseScorecardsConfig[]>;
8
12
  insertConfig(config: DatabaseScorecardsConfigDto): Promise<DatabaseScorecardsConfig>;
@@ -1 +1 @@
1
- import{and as o,eq as n,isNull as s}from"drizzle-orm";import{scorecardsConfigTable as r}from"../../../../providers/database/databases/sqlite-db/schemas/scorecards-config-table.js";class d{#e;constructor(e){this.#e=e}async findActiveConfigByKey(e){return(await this.#e.client.select().from(r).where(o(n(r.key,e),s(r.archivedAt))).limit(1))[0]??null}async findAllActiveConfigs(){return await this.#e.client.select().from(r).where(s(r.archivedAt))}async insertConfig(e){const t=await this.#e.client.insert(r).values(e).returning();if(!t[0])throw new Error(`Failed to insert scorecard config with key: ${e.key}`);return t[0]}async updateConfigById(e,t){const i=await this.#e.client.update(r).set(t).where(n(r.id,e)).returning();if(!i[0])throw new Error(`Failed to update scorecard config with id: ${e}`);return i[0]}async archiveConfigById(e,t){const i=await this.#e.client.update(r).set({archivedAt:t}).where(n(r.id,e)).returning();if(!i[0])throw new Error(`Failed to archive scorecard config with id: ${e}`);return i[0]}}export{d as ScorecardsConfigRepository};
1
+ import{and as a,eq as n,isNull as c}from"drizzle-orm";import{scorecardsConfigTable as r}from"../../../../providers/database/databases/sqlite-db/schemas/scorecards-config-table.js";import{DatabaseConnectionFactory as s}from"../../../../providers/database/database-connection-factory.js";class o{#t;constructor(t){this.#t=t}static async create(t){const e=await s.create(t);if(!e)throw new Error("Failed to create db connection for scorecards config repository");return new o(e.client)}async sync(){await this.#t.sync()}async close(){await this.#t.close()}async findActiveConfigByKey(t){return(await this.#t.client.select().from(r).where(a(n(r.key,t),c(r.archivedAt))).limit(1))[0]??null}async findAllActiveConfigs(){return await this.#t.client.select().from(r).where(c(r.archivedAt))}async insertConfig(t){const e=await this.#t.client.insert(r).values(t).returning();if(!e[0])throw new Error(`Failed to insert scorecard config with key: ${t.key}`);return e[0]}async updateConfigById(t,e){const i=await this.#t.client.update(r).set(e).where(n(r.id,t)).returning();if(!i[0])throw new Error(`Failed to update scorecard config with id: ${t}`);return i[0]}async archiveConfigById(t,e){const i=await this.#t.client.update(r).set({archivedAt:e}).where(n(r.id,t)).returning();if(!i[0])throw new Error(`Failed to archive scorecard config with id: ${t}`);return i[0]}}export{o as ScorecardsConfigRepository};
@@ -1,10 +1,10 @@
1
1
  import type { ScorecardsConfig } from '@redocly/config';
2
2
  import type { ServiceInstanceOptions } from '../../../providers/database/types.js';
3
- import { DatabaseConnectionFactory } from '../../../providers/database/database-connection-factory.js';
4
- import { BaseRepository } from '../../../providers/database/base-repository.js';
5
- export declare class ScorecardsConfigService extends BaseRepository {
3
+ import { BaseService } from '../../../providers/database/base-service.js';
4
+ import { ScorecardsConfigRepository } from './repositories/scorecards-config-repository.js';
5
+ export declare class ScorecardsConfigService extends BaseService<ScorecardsConfigRepository> {
6
6
  #private;
7
- constructor(dbConnection: Awaited<ReturnType<typeof DatabaseConnectionFactory.create>>);
7
+ constructor(repository: ScorecardsConfigRepository, options?: ServiceInstanceOptions);
8
8
  static getInstance(options: ServiceInstanceOptions): Promise<ScorecardsConfigService>;
9
9
  syncConfig(scorecardsConfig: ScorecardsConfig, onConfigChange?: (key: string) => Promise<void>): Promise<void>;
10
10
  }
@@ -1 +1 @@
1
- import{ulid as g}from"ulid";import{logger as r}from"../../../tools/notifiers/logger.js";import{DatabaseConnectionFactory as d}from"../../../providers/database/database-connection-factory.js";import{BaseRepository as h}from"../../../providers/database/base-repository.js";import{shaHex as l}from"../../../utils/crypto/sha-hex.js";import{hasOptionsChanged as m}from"../../../plugins/catalog-entities/utils/has-options-changed.js";import{slug as y}from"../../../../utils/slugger.js";import{withTimestamp as f}from"../../../utils/time/with-timestamp.js";import{ScorecardsConfigRepository as p}from"./repositories/scorecards-config-repository.js";class o extends h{static#i;static#e;#t;constructor(t){if(!t)throw new Error("Database connection is required for ScorecardsConfigService");super(t),this.#t=new p(this.databaseClient)}static async getInstance(t){const i=m(o.#e,t);if(!o.#i||i){const n=await d.create(t);if(!n)throw new Error("Failed to create db connection for scorecards config service");o.#i=new o(n),o.#e=t}return o.#i}async syncConfig(t,i){const n=new Set;(!Array.isArray(t)||t.length===0)&&r.verbose("No scorecard configs to sync"),r.verbose(`Starting scorecard config sync for ${t.length} config(s)`);for(const s of t)try{const e=s.key;if(!/^[a-z0-9-]+$/i.test(e)){r.error(`Skipping invalid scorecard config item: key "${e}" does not match kebab-case format (letters, numbers, and dashes only)`,{scorecard:s});continue}n.add(e);const a=this.#s(s),c=await this.#t.findActiveConfigByKey(e);if(c){if(c.configHash===a){r.verbose(`Config "${e}" unchanged, skipping update`);continue}r.verbose(`Updating config "${e}"`),await this.#r(c.id,s,a)}else r.verbose(`Inserting new config "${e}"`),await this.#n(e,s,a);i&&await i(e)}catch(e){r.error("Error processing scorecard config item:",{error:e.message??e,scorecard:s})}await this.#o(n),r.verbose("Sync scorecard configuration: success")}#s(t){const i=JSON.stringify({entities:t.entities,levels:t.levels});return l(i)}async#n(t,i,n){await this.#t.insertConfig(f({id:`sc_${g()}`,key:t,slug:y(t),name:i.name,description:i.description??null,entitiesFilter:JSON.stringify(i.entities),levels:JSON.stringify(i.levels),configHash:n,archivedAt:null}))}async#r(t,i,n){const s=f({entitiesFilter:JSON.stringify(i.entities),levels:JSON.stringify(i.levels),configHash:n,archivedAt:null},{fields:["updatedAt"]});await this.#t.updateConfigById(t,s)}async#o(t){const i=await this.#t.findAllActiveConfigs(),n=new Date().toISOString();for(const s of i)if(!t.has(s.key)){r.verbose(`Archiving removed config "${s.key}"`);try{await this.#t.archiveConfigById(s.id,n)}catch(e){r.error(`Error archiving config item "${s.key}":`,e.message??e)}}}}export{o as ScorecardsConfigService};
1
+ import{ulid as l}from"ulid";import{logger as s}from"../../../tools/notifiers/logger.js";import{BaseService as h}from"../../../providers/database/base-service.js";import{InstanceCacheResolver as y}from"../../../providers/database/instance-cache-resolver.js";import{shaHex as m}from"../../../utils/crypto/sha-hex.js";import{slug as v}from"../../../../utils/slugger.js";import{withTimestamp as f}from"../../../utils/time/with-timestamp.js";import{ScorecardsConfigRepository as g}from"./repositories/scorecards-config-repository.js";class c extends h{static#e=new y(async e=>new c(await g.create(e),e));constructor(e,r){super(r,{repository:e,createRepository:g.create})}static async getInstance(e){return c.#e.get(e)}async syncConfig(e,r){const n=new Set;(!Array.isArray(e)||e.length===0)&&s.verbose("No scorecard configs to sync"),s.verbose(`Starting scorecard config sync for ${e.length} config(s)`);for(const t of e)try{const i=t.key;if(!/^[a-z0-9-]+$/i.test(i)){s.error(`Skipping invalid scorecard config item: key "${i}" does not match kebab-case format (letters, numbers, and dashes only)`,{scorecard:t});continue}n.add(i);const o=this.#i(t),a=await this.runRead(d=>d.findActiveConfigByKey(i));if(a){if(a.configHash===o){s.verbose(`Config "${i}" unchanged, skipping update`);continue}s.verbose(`Updating config "${i}"`),await this.#r(a.id,t,o)}else s.verbose(`Inserting new config "${i}"`),await this.#t(i,t,o);r&&await r(i)}catch(i){s.error("Error processing scorecard config item:",{error:i.message??i,scorecard:t})}await this.#s(n),s.verbose("Sync scorecard configuration: success")}#i(e){const r=JSON.stringify({entities:e.entities,levels:e.levels});return m(r)}async#t(e,r,n){await this.runWrite(t=>t.insertConfig(f({id:`sc_${l()}`,key:e,slug:v(e),name:r.name,description:r.description??null,entitiesFilter:JSON.stringify(r.entities),levels:JSON.stringify(r.levels),configHash:n,archivedAt:null})))}async#r(e,r,n){const t=f({entitiesFilter:JSON.stringify(r.entities),levels:JSON.stringify(r.levels),configHash:n,archivedAt:null},{fields:["updatedAt"]});await this.runWrite(i=>i.updateConfigById(e,t))}async#s(e){const r=await this.runRead(t=>t.findAllActiveConfigs()),n=new Date().toISOString();for(const t of r)if(!e.has(t.key)){s.verbose(`Archiving removed config "${t.key}"`);try{await this.runWrite(i=>i.archiveConfigById(t.id,n))}catch(i){s.error(`Error archiving config item "${t.key}":`,i.message??i)}}}}export{c as ScorecardsConfigService};
@@ -4,7 +4,7 @@ import type { AfterRoutesCreatedActions, AfterRoutesCreatedLifecycleContext } fr
4
4
  * Chunking runs when any of these is enabled: AI search, llms.txt, or Docs MCP.
5
5
  * embeddingsEnabled is true when AI search or Docs MCP is enabled (shared embedding index).
6
6
  */
7
- export declare function prepareSemanticDocuments(actions: AfterRoutesCreatedActions, context: AfterRoutesCreatedLifecycleContext, { embeddingsEnabled, llmstxtEnabled, }: {
7
+ export declare function prepareSemanticDocuments(actions: AfterRoutesCreatedActions, context: AfterRoutesCreatedLifecycleContext, { embeddingsEnabled, llmstxtEnabled }: {
8
8
  embeddingsEnabled: boolean;
9
9
  llmstxtEnabled: boolean;
10
10
  }): Promise<void>;
@@ -9,7 +9,7 @@ export declare class SearchEngine {
9
9
  initIndexSchema(searchFacets: Map<string, SearchFacet>): Promise<void>;
10
10
  addDocuments(documents: SearchDocument[], params: AddDocumentsParams): Promise<void>;
11
11
  search(params: SearchRequestParams, facets?: Map<string, SearchFacet>): Promise<SearchResponse>;
12
- countFacets(params: FacetCountsRequestParams, facets: Map<string, SearchFacet>): Promise<Record<string, import("@redocly/theme").SearchFacetCount[]>>;
12
+ countFacets(params: FacetCountsRequestParams, facets: Map<string, SearchFacet>): Promise<Record<string, import("@redocly/theme/core/types").SearchFacetCount[]>>;
13
13
  export(outDir: string): Promise<void>;
14
14
  import(sourceDir: string): Promise<void>;
15
15
  cleanupFacetValues(actions: AfterRoutesCreatedActions): void;
@@ -5,7 +5,7 @@ export declare function generateLLMsTxt(llmstxts: LLMsTxt[], llmstxtConfig: SeoC
5
5
  title?: string;
6
6
  description?: string;
7
7
  } | undefined, context: AfterRoutesCreatedLifecycleContext): Promise<string>;
8
- export declare function llmsTxtLink({ title, description, slug, }: {
8
+ export declare function llmsTxtLink({ title, description, slug }: {
9
9
  title: LLMsTxt['title'];
10
10
  description: LLMsTxt['description'];
11
11
  slug: LLMsTxt['slug'];
@@ -1,7 +1,7 @@
1
1
  import type { LifecyclePluginInstance, PluginOptions } from '../../types';
2
2
  import type { ResolvedNavItem } from '@redocly/config';
3
3
  import type { ContentFs } from '../../fs/content-fs.js';
4
- export declare function sidebarsPlugin({ contentDir, }: PluginOptions): Promise<LifecyclePluginInstance>;
4
+ export declare function sidebarsPlugin({ contentDir }: PluginOptions): Promise<LifecyclePluginInstance>;
5
5
  export declare function stripMarkdocFromDescriptions(items: ResolvedNavItem[]): void;
6
6
  export declare function resolveSidebarId(relativePath: string, sidebarPath: string, fs: ContentFs): Promise<string | null>;
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,25 @@
1
+ import type { ServiceInstanceOptions } from './types.js';
2
+ type SyncableRepository = {
3
+ sync: () => Promise<void>;
4
+ };
5
+ type RunOptions<T> = {
6
+ onRepositoryMissing?: () => Promise<T> | T;
7
+ skipSync?: boolean;
8
+ };
9
+ type BaseServiceConfig<R extends SyncableRepository | null> = {
10
+ repository: NonNullable<R>;
11
+ createRepository?: (options: ServiceInstanceOptions) => Promise<NonNullable<R>>;
12
+ };
13
+ export declare abstract class BaseService<R extends SyncableRepository | null> {
14
+ #private;
15
+ protected constructor(options: ServiceInstanceOptions | undefined, config: BaseServiceConfig<R>);
16
+ protected get isLocalDbMode(): boolean;
17
+ protected getRepository(): R;
18
+ protected setRepository(repository: NonNullable<R>): void;
19
+ protected recreateRepository(): Promise<NonNullable<R> | null>;
20
+ protected syncRepositoryIfNeeded(): Promise<void>;
21
+ protected runRead<T>(run: (repo: NonNullable<R>) => Promise<T>, options?: RunOptions<T>): Promise<T>;
22
+ protected runWrite<T>(run: (repo: NonNullable<R>) => Promise<T>, options?: RunOptions<T>): Promise<T>;
23
+ }
24
+ export {};
25
+ //# sourceMappingURL=base-service.d.ts.map
@@ -0,0 +1 @@
1
+ import{envConfig as a}from"../../config/env-config.js";import{logger as n}from"../../tools/notifiers/logger.js";import{SQLD_REMOTE_DATABASE_URL_NO_DEPLOYMENT_YET_VAR as p}from"../../constants/plugins/catalog-entities.js";import{HTTP_TRANSIENT_RETRY as o,describeTransientError as c,isTransientSqldError as R,withTransientErrorRetry as s}from"./transient-sqld-error.js";class w{#i;#r;#o=null;#s;constructor(t,r){this.#i=t,this.#r=l(t)==="local",this.#o=r.repository,this.#s=r.createRepository}get isLocalDbMode(){return this.#r}getRepository(){return this.#o}setRepository(t){this.#o=t}async recreateRepository(){return!this.#s||!this.#i?null:this.#s(this.#i)}async syncRepositoryIfNeeded(){if(this.#r)return;const t=this.getRepository();t&&await s(()=>t.sync(),o)}async runRead(t,r){if(r?.skipSync||await this.syncRepositoryIfNeeded(),this.#r)try{return await this.#t(t,r)}catch(e){throw this.#e("read",e),e}try{return await s(()=>this.#t(t,r),o)}catch(e){throw this.#e("read",e),e}}async runWrite(t,r){if(this.#r)try{return await this.#t(t,r)}catch(e){throw this.#e("write",e),e}try{return await s(async()=>{try{return await this.#t(t,r)}catch(e){throw await this.#a(e),e}},o)}catch(e){throw this.#e("write",e),e}}async#t(t,r){const e=this.getRepository();if(!e){if(r?.onRepositoryMissing)return await r.onRepositoryMissing();throw new Error("Database repository is not initialized")}return t(e)}async#a(t){if(R(t))try{const r=await this.recreateRepository();r&&this.setRepository(r)}catch(r){n.warn(`Reconnect attempt failed, letting original error propagate: ${c(r)}`)}}#e(t,r){const e=this.constructor.name,h=r instanceof Error?c(r):String(r),y=this.#r?"local-no-retry":"remote-retry-enabled";n.error(`[${e}] ${t} operation failed (${y}): ${h}`,r)}}function l(i){if(i?.databaseType)return i.databaseType;const t=a.SQLD_REMOTE_DATABASE_URL||i?.sqldRemoteDatabaseUrl,r=a.SQLD_REMOTE_DATABASE_AUTH_TOKEN||i?.sqldRemoteDatabaseAuthToken;return t&&t!==p&&r?"remote":"local"}export{w as BaseService};
@@ -9,12 +9,12 @@ export declare class DatabasePathGenerator {
9
9
  * Generate database path without any file system operations
10
10
  * This is a pure function that can be used synchronously
11
11
  */
12
- static generateDatabasePath({ baseDir, databaseName, additionalFolder, }: DatabasePathOptions): string;
12
+ static generateDatabasePath({ baseDir, databaseName, additionalFolder }: DatabasePathOptions): string;
13
13
  /**
14
14
  * Prepare database path with file system operations
15
15
  * This handles directory creation and cleanup
16
16
  */
17
- static prepareDatabasePath({ baseDir, databaseName, additionalFolder, removeExisting, }: DatabasePathOptions & {
17
+ static prepareDatabasePath({ baseDir, databaseName, additionalFolder, removeExisting }: DatabasePathOptions & {
18
18
  removeExisting?: boolean;
19
19
  }): Promise<{
20
20
  databasePath: string;
@@ -1 +1 @@
1
- import{logger as o}from"../../tools/notifiers/logger.js";import{envConfig as a}from"../../config/env-config.js";import{DatabaseConnectionFactory as i}from"./database-connection-factory.js";class t{static#t=!1;static async init(e){if(!(a.REDOCLY_INTERNAL_DEV||a.CI)&&!t.#t)try{await t.#e(e)==="PRECONNECTED"&&(t.#t=!0)}catch(r){o.error("Failed to preconnect to sqld remote database",r)}}static#e=async e=>await i.create({baseDbDir:e,databaseType:"remote"})?(o.info("Sqld remote database preconnected"),"PRECONNECTED"):(o.warn("Sqld remote database preconnect failed"),"NOT_PRECONNECTED")}export{t as DatabasePreconnectService};
1
+ import{logger as o}from"../../tools/notifiers/logger.js";import{envConfig as r}from"../../config/env-config.js";import{DatabaseConnectionFactory as i}from"./database-connection-factory.js";class e{static#e=!1;static async init(t){if(!(r.REDOCLY_INTERNAL_DEV||r.CI||r.isDevelopMode)&&!e.#e)try{await e.#t(t)==="PRECONNECTED"&&(e.#e=!0)}catch(a){o.error("Failed to preconnect to sqld remote database",a)}}static#t=async t=>await i.create({baseDbDir:t,databaseType:"remote"})?(o.info("Sqld remote database preconnected"),"PRECONNECTED"):(o.warn("Sqld remote database preconnect failed"),"NOT_PRECONNECTED")}export{e as DatabasePreconnectService};
@@ -115,7 +115,7 @@ export declare const cacheTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
115
115
  length: number | undefined;
116
116
  }>;
117
117
  };
118
- dialect: "sqlite";
118
+ dialect: 'sqlite';
119
119
  }>;
120
120
  export type DatabaseCache = typeof cacheTable.$inferSelect;
121
121
  export type DatabaseCacheDto = typeof cacheTable.$inferInsert;
@@ -136,7 +136,7 @@ export declare const entitiesAttributesTable: import("drizzle-orm/sqlite-core").
136
136
  length: number | undefined;
137
137
  }>;
138
138
  };
139
- dialect: "sqlite";
139
+ dialect: 'sqlite';
140
140
  }>;
141
141
  export type DatabaseEntityAttributes = typeof entitiesAttributesTable.$inferSelect;
142
142
  export type DatabaseEntityAttributesDto = typeof entitiesAttributesTable.$inferInsert;
@@ -324,7 +324,7 @@ export declare const entitiesRelationsTable: import("drizzle-orm/sqlite-core").S
324
324
  length: number | undefined;
325
325
  }>;
326
326
  };
327
- dialect: "sqlite";
327
+ dialect: 'sqlite';
328
328
  }>;
329
329
  export type DatabaseEntityRelation = typeof entitiesRelationsTable.$inferSelect;
330
330
  export type DatabaseEntityRelationDto = typeof entitiesRelationsTable.$inferInsert;
@@ -472,7 +472,7 @@ export declare const entitiesTable: import("drizzle-orm/sqlite-core").SQLiteTabl
472
472
  length: number | undefined;
473
473
  }>;
474
474
  };
475
- dialect: "sqlite";
475
+ dialect: 'sqlite';
476
476
  }>;
477
477
  export type DatabaseEntity = typeof entitiesTable.$inferSelect;
478
478
  export type DatabaseEntityDto = typeof entitiesTable.$inferInsert;
@@ -136,7 +136,7 @@ export declare const fileHashesTable: import("drizzle-orm/sqlite-core").SQLiteTa
136
136
  length: number | undefined;
137
137
  }>;
138
138
  };
139
- dialect: "sqlite";
139
+ dialect: 'sqlite';
140
140
  }>;
141
141
  export type DatabaseFileHash = typeof fileHashesTable.$inferSelect;
142
142
  export type DatabaseFileHashDto = typeof fileHashesTable.$inferInsert;
@@ -98,7 +98,7 @@ export declare const kvTable: import("drizzle-orm/sqlite-core").SQLiteTableWithC
98
98
  length: number | undefined;
99
99
  }>;
100
100
  };
101
- dialect: "sqlite";
101
+ dialect: 'sqlite';
102
102
  }>;
103
103
  export type DatabaseKvDbSchema = typeof kvTable.$inferSelect;
104
104
  export type DatabaseKvDbInsertSchema = typeof kvTable.$inferInsert;
@@ -212,7 +212,7 @@ export declare const scorecardsConfigTable: import("drizzle-orm/sqlite-core").SQ
212
212
  length: number | undefined;
213
213
  }>;
214
214
  };
215
- dialect: "sqlite";
215
+ dialect: 'sqlite';
216
216
  }>;
217
217
  export type DatabaseScorecardsConfig = typeof scorecardsConfigTable.$inferSelect;
218
218
  export type DatabaseScorecardsConfigDto = typeof scorecardsConfigTable.$inferInsert;
@@ -166,7 +166,7 @@ export declare const scorecardsEvaluationRunsTable: import("drizzle-orm/sqlite-c
166
166
  length: number | undefined;
167
167
  }>;
168
168
  };
169
- dialect: "sqlite";
169
+ dialect: 'sqlite';
170
170
  }>;
171
171
  export type DatabaseScorecardsEvaluationRun = typeof scorecardsEvaluationRunsTable.$inferSelect;
172
172
  export type DatabaseScorecardsEvaluationRunInsert = typeof scorecardsEvaluationRunsTable.$inferInsert;
@@ -147,7 +147,7 @@ export declare const scorecardsLevelResultsTable: import("drizzle-orm/sqlite-cor
147
147
  length: number | undefined;
148
148
  }>;
149
149
  };
150
- dialect: "sqlite";
150
+ dialect: 'sqlite';
151
151
  }>;
152
152
  export type DatabaseScorecardsLevelResult = typeof scorecardsLevelResultsTable.$inferSelect;
153
153
  export type DatabaseScorecardsLevelResultInsert = typeof scorecardsLevelResultsTable.$inferInsert;
@@ -60,7 +60,7 @@ export declare const scorecardsLevelsRulesResultsTable: import("drizzle-orm/sqli
60
60
  length: number | undefined;
61
61
  }>;
62
62
  };
63
- dialect: "sqlite";
63
+ dialect: 'sqlite';
64
64
  }>;
65
65
  export type DatabaseScorecardsLevelsRulesResult = typeof scorecardsLevelsRulesResultsTable.$inferSelect;
66
66
  export type DatabaseScorecardsLevelsRulesResultInsert = typeof scorecardsLevelsRulesResultsTable.$inferInsert;
@@ -206,7 +206,7 @@ export declare const scorecardsResultsTable: import("drizzle-orm/sqlite-core").S
206
206
  length: number | undefined;
207
207
  }>;
208
208
  };
209
- dialect: "sqlite";
209
+ dialect: 'sqlite';
210
210
  }>;
211
211
  export type DatabaseScorecardsResult = typeof scorecardsResultsTable.$inferSelect;
212
212
  export type DatabaseScorecardsResultInsert = typeof scorecardsResultsTable.$inferInsert;
@@ -115,7 +115,7 @@ export declare const scorecardsRuleResultsTable: import("drizzle-orm/sqlite-core
115
115
  generated: undefined;
116
116
  }, {}, {}>;
117
117
  };
118
- dialect: "sqlite";
118
+ dialect: 'sqlite';
119
119
  }>;
120
120
  export type DatabaseScorecardsRuleResult = typeof scorecardsRuleResultsTable.$inferSelect;
121
121
  export type DatabaseScorecardsRuleResultInsert = typeof scorecardsRuleResultsTable.$inferInsert;
@@ -0,0 +1,19 @@
1
+ import type { DatabaseConnection, RepositoryInstanceOptions } from './types.js';
2
+ type WithRemoveExisting = {
3
+ removeExisting?: boolean;
4
+ };
5
+ /**
6
+ * Caches a single async-created instance (a database repository, or a service that
7
+ * wraps one) and reuses it across calls.
8
+ *
9
+ * A new instance is created only when none exists yet, or when the creation options
10
+ * change.
11
+ */
12
+ export declare class InstanceCacheResolver<TInstance, TOptions extends WithRemoveExisting> {
13
+ #private;
14
+ constructor(create: (options: TOptions) => Promise<TInstance>);
15
+ get(options: TOptions): Promise<TInstance>;
16
+ }
17
+ export declare function createDatabaseRepositoryInstance<TRepository>(options: RepositoryInstanceOptions, repositoryName: string, repositoryClass: new (dbConnection: DatabaseConnection) => TRepository): Promise<TRepository>;
18
+ export {};
19
+ //# sourceMappingURL=instance-cache-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ import{deepStrictEqual as o}from"node:assert";import{DatabaseConnectionFactory as i}from"./database-connection-factory.js";class h{#t;#e;#n;constructor(e){this.#n=e}async get(e){const n=a(e);return this.#t&&!s(this.#e,n)?this.#t:(this.#t=await this.#n(n),this.#e=n,this.#t)}}async function u(t,e,n){const r=await i.create(t);if(!r)throw new Error(`Failed to create db connection for ${e} repository`);return new n(r)}function a(t){return{...t,removeExisting:t.removeExisting??!1}}function s(t,e){if(!t)return!1;try{return o(t,e),!1}catch{return!0}}export{h as InstanceCacheResolver,u as createDatabaseRepositoryInstance};
@@ -1,5 +1,5 @@
1
1
  export declare const OPERATORS: {
2
- readonly AND: "AND";
3
- readonly OR: "OR";
2
+ readonly AND: 'AND';
3
+ readonly OR: 'OR';
4
4
  };
5
5
  //# sourceMappingURL=constants.d.ts.map
@@ -7,7 +7,7 @@ type StorageLimitValidationParams = {
7
7
  };
8
8
  export declare class StorageLimitValidator {
9
9
  #private;
10
- validate({ storageLimitGb, currentTotalBytes, existingEntryBytes, incomingEntryBytes, errorMessagePrefix, }: StorageLimitValidationParams): void;
10
+ validate({ storageLimitGb, currentTotalBytes, existingEntryBytes, incomingEntryBytes, errorMessagePrefix }: StorageLimitValidationParams): void;
11
11
  }
12
12
  export {};
13
13
  //# sourceMappingURL=storage-limit-validator.d.ts.map
@@ -1 +1 @@
1
- import{pathToFileURL as I}from"url";import{HelmetProvider as z}from"@dr.pogodin/react-helmet";import{renderToString as m}from"react-dom/server";import{StaticRouterProvider as G,createStaticHandler as J,createStaticRouter as K}from"react-router-dom/server.js";import r from"react";import{readFile as Q}from"fs/promises";import{join as V}from"path";import{withPathPrefix as l,getLocaleFromPathname as W,withoutPathPrefix as X,removeTrailingSlash as Y}from"@redocly/theme/core/utils";import{RUNTIME_RESOURCES_DIR as T}from"../constants/common.js";import{slash as Z}from"../../utils/path/slash.js";import{reporter as tt}from"../tools/notifiers/reporter.js";import{envConfig as p}from"../config/env-config.js";import{slug as et}from"../../utils/slugger.js";import{htmlTemplate as rt}from"./template.js";import{detectColorSchemaScript as ot,generatePreloadPageData as st}from"./utils.js";import"./hijack-console.js";import{getSitemapLinkTag as nt}from"./get-sitemap-link-tag.js";let g="";async function at(t){return p.isRuntimeMode?await import("../../client/server-entry.js"):await import(I(`${Z(t)}/server-entry.js`)+"?"+new Date)}async function vt(t){if(!p.isRuntimeMode){const e=tt.getCompilationProblems();if(e.length>0){const{renderCompilationError:n}=await import("./render-compilation-error.js");return n(e)}}const{Loader:u,App:R,routes:E,ServerStyleSheet:w,StyleSheetManager:C,ErrorDetails:y,initL10n:P}=await at(t.serverOutDir),{page:h,store:{globalData:S,hasSitemap:D},sharedData:v,ssrHref:b}=t,f=S?.l10n,i=W(X(h.slug),f?.defaultLocale,f?.locales),d=t.page.request?.url||"http://localhost/";await u.prepare({...h,slug:Y(new URL(d).pathname)},v,S,i),await P(i);const c=new w,{query:M,dataRoutes:x}=J([{Component:R,path:l("*"),children:E}]),s=await M(new Request(d));if(s instanceof Response)throw s;const B=K(x,s);try{globalThis.SSR_HOSTNAME=b,globalThis.SSR_USER_AGENT=t.userAgent,globalThis.SSR_OMIT_SUSPENSE=t.omitSuspense;const e={},n=m(r.createElement(z,{context:e},r.createElement(C,{sheet:c.instance},r.createElement(G,{router:B,context:s})))),L=D?nt():"",a=e.helmet,k=a?.title.toString()||"",_=t.store.globalData?.logo?.favicon,o=t.store.config,j=`<link rel="preload" as="fetch" crossorigin="anonymous" href="${l("/app-data.json")}" />`,H=st(t.page.slug),U=ot(o),A=t.page.product?.name?`product-${et(t.page.product.name)}`:"",$=t.store.ssr.headTags.join(""),F=t.store.ssr.postBodyTags.join(""),N=t.store.ssr.preBodyTags.join(""),O=`<link rel="stylesheet" href="${l(T)}/browser-entry.css" />`;!p.isDevelopMode&&!g&&(g=`<style>${await Q(V(t.outdir,T,"browser-entry.css"),"utf-8")}</style>`);const q={bodyHtml:n,linkTags:o.linkTags+c.getStyleTags()+(a?.link.toString()||""),title:k,favicon:_,headScriptTags:L+U+o.headScriptTags+$+(a?.script.toString()||"")+(a?.meta.toString()||""),preload:[j,H],postBodyScriptTags:o.postBodyScriptTags+F,preBodyScriptTags:o.preBodyScriptTags||""+N,lang:i,productClass:A,runtimeCss:g||O};return{html:rt(q),statusCode:200}}catch(e){return t.telemetry.sendSsrErrorCaughtMessage({message:e.message}),{html:m(r.createElement(y,{error:e})),statusCode:500,error:e}}finally{c.seal(),u.clear()}}function bt(t){return m(r.createElement(r.Fragment,null,...t))}export{vt as render,bt as renderComponents};
1
+ import{pathToFileURL as I}from"url";import{HelmetProvider as z}from"@dr.pogodin/react-helmet";import{renderToString as m}from"react-dom/server";import{StaticRouterProvider as G,createStaticHandler as J,createStaticRouter as K}from"react-router-dom/server.js";import r from"react";import{readFile as Q}from"fs/promises";import{join as V}from"path";import{withPathPrefix as l,getLocaleFromPathname as W,withoutPathPrefix as X,removeTrailingSlash as Y}from"@redocly/theme/core/utils";import{RUNTIME_RESOURCES_DIR as T}from"../constants/common.js";import{slash as Z}from"../../utils/path/slash.js";import{reporter as tt}from"../tools/notifiers/reporter.js";import{envConfig as p}from"../config/env-config.js";import{slug as et}from"../../utils/slugger.js";import{shouldForwardProp as rt}from"../../utils/should-forward-prop.js";import{htmlTemplate as ot}from"./template.js";import{detectColorSchemaScript as st,generatePreloadPageData as nt}from"./utils.js";import"./hijack-console.js";import{getSitemapLinkTag as at}from"./get-sitemap-link-tag.js";let g="";async function it(t){return p.isRuntimeMode?await import("../../client/server-entry.js"):await import(I(`${Z(t)}/server-entry.js`)+"?"+new Date)}async function Mt(t){if(!p.isRuntimeMode){const e=tt.getCompilationProblems();if(e.length>0){const{renderCompilationError:n}=await import("./render-compilation-error.js");return n(e)}}const{Loader:u,App:R,routes:w,ServerStyleSheet:E,StyleSheetManager:C,ErrorDetails:P,initL10n:y}=await it(t.serverOutDir),{page:h,store:{globalData:S,hasSitemap:D},sharedData:v,ssrHref:b}=t,f=S?.l10n,i=W(X(h.slug),f?.defaultLocale,f?.locales),d=t.page.request?.url||"http://localhost/";await u.prepare({...h,slug:Y(new URL(d).pathname)},v,S,i),await y(i);const c=new E,{query:M,dataRoutes:x}=J([{Component:R,path:l("*"),children:w}]),s=await M(new Request(d));if(s instanceof Response)throw s;const B=K(x,s);try{globalThis.SSR_HOSTNAME=b,globalThis.SSR_USER_AGENT=t.userAgent,globalThis.SSR_OMIT_SUSPENSE=t.omitSuspense;const e={},n=m(r.createElement(z,{context:e},r.createElement(C,{sheet:c.instance,shouldForwardProp:rt},r.createElement(G,{router:B,context:s})))),L=D?at():"",a=e.helmet,k=a?.title.toString()||"",_=t.store.globalData?.logo?.favicon,o=t.store.config,j=`<link rel="preload" as="fetch" crossorigin="anonymous" href="${l("/app-data.json")}" />`,F=nt(t.page.slug),H=st(o),U=t.page.product?.name?`product-${et(t.page.product.name)}`:"",A=t.store.ssr.headTags.join(""),$=t.store.ssr.postBodyTags.join(""),N=t.store.ssr.preBodyTags.join(""),O=`<link rel="stylesheet" href="${l(T)}/browser-entry.css" />`;!p.isDevelopMode&&!g&&(g=`<style>${await Q(V(t.outdir,T,"browser-entry.css"),"utf-8")}</style>`);const q={bodyHtml:n,linkTags:o.linkTags+c.getStyleTags()+(a?.link.toString()||""),title:k,favicon:_,headScriptTags:L+H+o.headScriptTags+A+(a?.script.toString()||"")+(a?.meta.toString()||""),preload:[j,F],postBodyScriptTags:o.postBodyScriptTags+$,preBodyScriptTags:o.preBodyScriptTags||""+N,lang:i,productClass:U,runtimeCss:g||O};return{html:ot(q),statusCode:200}}catch(e){return t.telemetry.sendSsrErrorCaughtMessage({message:e.message}),{html:m(r.createElement(P,{error:e})),statusCode:500,error:e}}finally{c.seal(),u.clear()}}function xt(t){return m(r.createElement(r.Fragment,null,...t))}export{Mt as render,xt as renderComponents};
@@ -1,21 +1,15 @@
1
1
  import type { PageStaticData } from '@redocly/config';
2
- export declare function getDefaultStaticProps({ staticData, variables, }: {
2
+ export declare function getDefaultStaticProps({ staticData, variables }: {
3
3
  staticData: PageStaticData;
4
4
  variables: Record<string, unknown>;
5
5
  }): {
6
- variables: {
7
- lang?: string;
8
- rbac?: {
9
- teams: string[];
10
- };
11
- };
12
6
  metadata?: Record<string, unknown>;
13
7
  seo?: import("@redocly/config").SeoConfig;
14
8
  sharedDataIds?: Record<string, string>;
15
- frontmatter?: Omit<import("@redocly/config").PageProps, "frontmatter"> & {
9
+ frontmatter?: Omit<import("@redocly/config").PageProps, 'frontmatter'> & {
16
10
  settings?: any;
17
11
  } & Partial<import("@redocly/config").UiAccessibleConfig> & {
18
- navigation?: Partial<import("@redocly/config").UiAccessibleConfig["navigation"]> & {
12
+ navigation?: Partial<import("@redocly/config").UiAccessibleConfig['navigation']> & {
19
13
  nextButton?: {
20
14
  link?: string;
21
15
  label?: string;
@@ -38,5 +32,11 @@ export declare function getDefaultStaticProps({ staticData, variables, }: {
38
32
  markdown?: import("@redocly/config").MdOptions;
39
33
  apiOptions?: import("@redocly/config").APIOptions;
40
34
  definitionId?: string;
35
+ variables: {
36
+ lang?: string;
37
+ rbac?: {
38
+ teams: string[];
39
+ };
40
+ };
41
41
  };
42
42
  //# sourceMappingURL=get-default-static-props.d.ts.map
@@ -9,7 +9,7 @@ export type ServerPropsResult = PageProps | {
9
9
  stack?: string;
10
10
  };
11
11
  };
12
- export declare function getServerPropsFromUserHandler({ route, ctx, staticData, serverPropsGetters, serverPropsUser, actions, }: {
12
+ export declare function getServerPropsFromUserHandler({ route, ctx, staticData, serverPropsGetters, serverPropsUser, actions }: {
13
13
  route: PageRouteDetails;
14
14
  ctx: Context | null;
15
15
  staticData: PageStaticData;
@@ -1,7 +1,7 @@
1
1
  import type { Context } from 'hono';
2
2
  import type { GlobalData } from '../../../types/index.js';
3
3
  import type { PageRouteDetails } from '../../types';
4
- export declare const prepareContextVariables: (route: PageRouteDetails, ctx: Context | null, localization: GlobalData["l10n"]) => {
4
+ export declare const prepareContextVariables: (route: PageRouteDetails, ctx: Context | null, localization: GlobalData['l10n']) => {
5
5
  variables: {
6
6
  rbac: {
7
7
  teams: string[];
@@ -1,5 +1,5 @@
1
1
  import type { RenderTemplateInput } from '../../types/index.js';
2
- export declare function htmlTemplate({ bodyHtml, linkTags, title, favicon, preload, headScriptTags, postBodyScriptTags, preBodyScriptTags, lang, productClass, fonts, runtimeCss, }: RenderTemplateInput & {
2
+ export declare function htmlTemplate({ bodyHtml, linkTags, title, favicon, preload, headScriptTags, postBodyScriptTags, preBodyScriptTags, lang, productClass, fonts, runtimeCss }: RenderTemplateInput & {
3
3
  fonts?: string;
4
4
  }): string;
5
5
  //# sourceMappingURL=template.d.ts.map
@@ -113,7 +113,7 @@ export declare class Store {
113
113
  getGlobalConfig: <T = unknown>(key: string) => T;
114
114
  getSearchFacets: () => Map<string, SearchFacet>;
115
115
  addRedirect: (from: string, to: RedirectConfig, options?: RedirectOptions) => void;
116
- getRedirect: (from: string) => WithRequired<RedirectConfig, "to"> | null;
116
+ getRedirect: (from: string) => WithRequired<RedirectConfig, 'to'> | null;
117
117
  createSharedData: (id: string, data: unknown, hash?: string) => Promise<string>;
118
118
  addRouteSharedData: (routeSlug: string, dataKey: string, dataId: string) => void;
119
119
  getRouteSharedDataByFsPath: (fsPath: string) => Record<string, string>;
@@ -124,7 +124,7 @@ export declare class Store {
124
124
  addMcpTools: (importPath: string, tools: McpToolSchema[]) => void;
125
125
  getMcpTools: () => McpToolRegistration[];
126
126
  addMiddleware: (middleware: MiddlewareDetails) => void;
127
- setResourceResponseHeaders: (resourcePath: string, headers: NonNullable<RedoclyConfig["responseHeaders"]>[string]) => void;
127
+ setResourceResponseHeaders: (resourcePath: string, headers: NonNullable<RedoclyConfig['responseHeaders']>[string]) => void;
128
128
  getRouteByFsPath: (relativePath: string) => PageRouteDetails | undefined;
129
129
  getRouteBySlug: (slug: string, opts?: {
130
130
  followRedirect?: boolean;