jumbo-cli 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/dist/application/context/search/ISearchDocumentProjector.d.ts +10 -0
  2. package/dist/application/context/search/ISearchDocumentProjector.d.ts.map +1 -0
  3. package/dist/application/context/search/ISearchDocumentProjector.js +2 -0
  4. package/dist/application/context/search/ISearchDocumentProjector.js.map +1 -0
  5. package/dist/application/context/search/ISearchGateway.d.ts +6 -0
  6. package/dist/application/context/search/ISearchGateway.d.ts.map +1 -0
  7. package/dist/application/context/search/ISearchGateway.js +2 -0
  8. package/dist/application/context/search/ISearchGateway.js.map +1 -0
  9. package/dist/application/context/search/ISearchIndexReader.d.ts +9 -0
  10. package/dist/application/context/search/ISearchIndexReader.d.ts.map +1 -0
  11. package/dist/application/context/search/ISearchIndexReader.js +2 -0
  12. package/dist/application/context/search/ISearchIndexReader.js.map +1 -0
  13. package/dist/application/context/search/ISearchIndexRebuildGateway.d.ts +6 -0
  14. package/dist/application/context/search/ISearchIndexRebuildGateway.d.ts.map +1 -0
  15. package/dist/application/context/search/ISearchIndexRebuildGateway.js +2 -0
  16. package/dist/application/context/search/ISearchIndexRebuildGateway.js.map +1 -0
  17. package/dist/application/context/search/ISearchIndexRebuildStore.d.ts +6 -0
  18. package/dist/application/context/search/ISearchIndexRebuildStore.d.ts.map +1 -0
  19. package/dist/application/context/search/ISearchIndexRebuildStore.js +2 -0
  20. package/dist/application/context/search/ISearchIndexRebuildStore.js.map +1 -0
  21. package/dist/application/context/search/ISearchIndexWriter.d.ts +7 -0
  22. package/dist/application/context/search/ISearchIndexWriter.d.ts.map +1 -0
  23. package/dist/application/context/search/ISearchIndexWriter.js +2 -0
  24. package/dist/application/context/search/ISearchIndexWriter.js.map +1 -0
  25. package/dist/application/context/search/ISearchProvider.d.ts +6 -0
  26. package/dist/application/context/search/ISearchProvider.d.ts.map +1 -0
  27. package/dist/application/context/search/ISearchProvider.js +2 -0
  28. package/dist/application/context/search/ISearchProvider.js.map +1 -0
  29. package/dist/application/context/search/LocalSearchGateway.d.ts +14 -0
  30. package/dist/application/context/search/LocalSearchGateway.d.ts.map +1 -0
  31. package/dist/application/context/search/LocalSearchGateway.js +40 -0
  32. package/dist/application/context/search/LocalSearchGateway.js.map +1 -0
  33. package/dist/application/context/search/SearchCategory.d.ts +10 -0
  34. package/dist/application/context/search/SearchCategory.d.ts.map +1 -0
  35. package/dist/application/context/search/SearchCategory.js +8 -0
  36. package/dist/application/context/search/SearchCategory.js.map +1 -0
  37. package/dist/application/context/search/SearchController.d.ts +9 -0
  38. package/dist/application/context/search/SearchController.d.ts.map +1 -0
  39. package/dist/application/context/search/SearchController.js +9 -0
  40. package/dist/application/context/search/SearchController.js.map +1 -0
  41. package/dist/application/context/search/SearchCriteria.d.ts +8 -0
  42. package/dist/application/context/search/SearchCriteria.d.ts.map +1 -0
  43. package/dist/application/context/search/SearchCriteria.js +2 -0
  44. package/dist/application/context/search/SearchCriteria.js.map +1 -0
  45. package/dist/application/context/search/SearchDocument.d.ts +16 -0
  46. package/dist/application/context/search/SearchDocument.d.ts.map +1 -0
  47. package/dist/application/context/search/SearchDocument.js +2 -0
  48. package/dist/application/context/search/SearchDocument.js.map +1 -0
  49. package/dist/application/context/search/SearchDocumentChange.d.ts +10 -0
  50. package/dist/application/context/search/SearchDocumentChange.d.ts.map +1 -0
  51. package/dist/application/context/search/SearchDocumentChange.js +2 -0
  52. package/dist/application/context/search/SearchDocumentChange.js.map +1 -0
  53. package/dist/application/context/search/SearchDocumentProjectorRegistry.d.ts +9 -0
  54. package/dist/application/context/search/SearchDocumentProjectorRegistry.d.ts.map +1 -0
  55. package/dist/application/context/search/SearchDocumentProjectorRegistry.js +17 -0
  56. package/dist/application/context/search/SearchDocumentProjectorRegistry.js.map +1 -0
  57. package/dist/application/context/search/SearchDocumentSource.d.ts +5 -0
  58. package/dist/application/context/search/SearchDocumentSource.d.ts.map +1 -0
  59. package/dist/application/context/search/SearchDocumentSource.js +2 -0
  60. package/dist/application/context/search/SearchDocumentSource.js.map +1 -0
  61. package/dist/application/context/search/SearchFacetValue.d.ts +2 -0
  62. package/dist/application/context/search/SearchFacetValue.d.ts.map +1 -0
  63. package/dist/application/context/search/SearchFacetValue.js +2 -0
  64. package/dist/application/context/search/SearchFacetValue.js.map +1 -0
  65. package/dist/application/context/search/SearchHit.d.ts +13 -0
  66. package/dist/application/context/search/SearchHit.d.ts.map +1 -0
  67. package/dist/application/context/search/SearchHit.js +2 -0
  68. package/dist/application/context/search/SearchHit.js.map +1 -0
  69. package/dist/application/context/search/SearchHitGroup.d.ts +7 -0
  70. package/dist/application/context/search/SearchHitGroup.d.ts.map +1 -0
  71. package/dist/application/context/search/SearchHitGroup.js +2 -0
  72. package/dist/application/context/search/SearchHitGroup.js.map +1 -0
  73. package/dist/application/context/search/SearchIndexEventHandler.d.ts +14 -0
  74. package/dist/application/context/search/SearchIndexEventHandler.d.ts.map +1 -0
  75. package/dist/application/context/search/SearchIndexEventHandler.js +24 -0
  76. package/dist/application/context/search/SearchIndexEventHandler.js.map +1 -0
  77. package/dist/application/context/search/SearchIndexRebuildController.d.ts +9 -0
  78. package/dist/application/context/search/SearchIndexRebuildController.d.ts.map +1 -0
  79. package/dist/application/context/search/SearchIndexRebuildController.js +9 -0
  80. package/dist/application/context/search/SearchIndexRebuildController.js.map +1 -0
  81. package/dist/application/context/search/SearchIndexRebuildRequest.d.ts +3 -0
  82. package/dist/application/context/search/SearchIndexRebuildRequest.d.ts.map +1 -0
  83. package/dist/application/context/search/SearchIndexRebuildRequest.js +2 -0
  84. package/dist/application/context/search/SearchIndexRebuildRequest.js.map +1 -0
  85. package/dist/application/context/search/SearchIndexRebuildResponse.d.ts +9 -0
  86. package/dist/application/context/search/SearchIndexRebuildResponse.d.ts.map +1 -0
  87. package/dist/application/context/search/SearchIndexRebuildResponse.js +2 -0
  88. package/dist/application/context/search/SearchIndexRebuildResponse.js.map +1 -0
  89. package/dist/application/context/search/SearchRequest.d.ts +5 -0
  90. package/dist/application/context/search/SearchRequest.d.ts.map +1 -0
  91. package/dist/application/context/search/SearchRequest.js +2 -0
  92. package/dist/application/context/search/SearchRequest.js.map +1 -0
  93. package/dist/application/context/search/SearchResponse.d.ts +7 -0
  94. package/dist/application/context/search/SearchResponse.d.ts.map +1 -0
  95. package/dist/application/context/search/SearchResponse.js +2 -0
  96. package/dist/application/context/search/SearchResponse.js.map +1 -0
  97. package/dist/application/context/search/SearchResultLimit.d.ts +6 -0
  98. package/dist/application/context/search/SearchResultLimit.d.ts.map +1 -0
  99. package/dist/application/context/search/SearchResultLimit.js +6 -0
  100. package/dist/application/context/search/SearchResultLimit.js.map +1 -0
  101. package/dist/application/context/search/projectors/ComponentSearchDocumentProjector.d.ts +14 -0
  102. package/dist/application/context/search/projectors/ComponentSearchDocumentProjector.d.ts.map +1 -0
  103. package/dist/application/context/search/projectors/ComponentSearchDocumentProjector.js +93 -0
  104. package/dist/application/context/search/projectors/ComponentSearchDocumentProjector.js.map +1 -0
  105. package/dist/application/context/search/projectors/DecisionSearchDocumentProjector.d.ts +14 -0
  106. package/dist/application/context/search/projectors/DecisionSearchDocumentProjector.d.ts.map +1 -0
  107. package/dist/application/context/search/projectors/DecisionSearchDocumentProjector.js +92 -0
  108. package/dist/application/context/search/projectors/DecisionSearchDocumentProjector.js.map +1 -0
  109. package/dist/application/context/search/projectors/DependencySearchDocumentProjector.d.ts +14 -0
  110. package/dist/application/context/search/projectors/DependencySearchDocumentProjector.d.ts.map +1 -0
  111. package/dist/application/context/search/projectors/DependencySearchDocumentProjector.js +89 -0
  112. package/dist/application/context/search/projectors/DependencySearchDocumentProjector.js.map +1 -0
  113. package/dist/application/context/search/projectors/GuidelineSearchDocumentProjector.d.ts +14 -0
  114. package/dist/application/context/search/projectors/GuidelineSearchDocumentProjector.d.ts.map +1 -0
  115. package/dist/application/context/search/projectors/GuidelineSearchDocumentProjector.js +71 -0
  116. package/dist/application/context/search/projectors/GuidelineSearchDocumentProjector.js.map +1 -0
  117. package/dist/application/context/search/projectors/InvariantSearchDocumentProjector.d.ts +14 -0
  118. package/dist/application/context/search/projectors/InvariantSearchDocumentProjector.d.ts.map +1 -0
  119. package/dist/application/context/search/projectors/InvariantSearchDocumentProjector.js +61 -0
  120. package/dist/application/context/search/projectors/InvariantSearchDocumentProjector.js.map +1 -0
  121. package/dist/application/host/IApplicationContainer.d.ts +6 -0
  122. package/dist/application/host/IApplicationContainer.d.ts.map +1 -1
  123. package/dist/infrastructure/context/search/LocalSearchIndexRebuildGateway.d.ts +18 -0
  124. package/dist/infrastructure/context/search/LocalSearchIndexRebuildGateway.d.ts.map +1 -0
  125. package/dist/infrastructure/context/search/LocalSearchIndexRebuildGateway.js +28 -0
  126. package/dist/infrastructure/context/search/LocalSearchIndexRebuildGateway.js.map +1 -0
  127. package/dist/infrastructure/context/search/ProjectedSearchIndexProvider.d.ts +10 -0
  128. package/dist/infrastructure/context/search/ProjectedSearchIndexProvider.d.ts.map +1 -0
  129. package/dist/infrastructure/context/search/ProjectedSearchIndexProvider.js +9 -0
  130. package/dist/infrastructure/context/search/ProjectedSearchIndexProvider.js.map +1 -0
  131. package/dist/infrastructure/context/search/SearchIndexRecord.d.ts +14 -0
  132. package/dist/infrastructure/context/search/SearchIndexRecord.d.ts.map +1 -0
  133. package/dist/infrastructure/context/search/SearchIndexRecord.js +2 -0
  134. package/dist/infrastructure/context/search/SearchIndexRecord.js.map +1 -0
  135. package/dist/infrastructure/context/search/SearchIndexRecordMapper.d.ts +10 -0
  136. package/dist/infrastructure/context/search/SearchIndexRecordMapper.d.ts.map +1 -0
  137. package/dist/infrastructure/context/search/SearchIndexRecordMapper.js +44 -0
  138. package/dist/infrastructure/context/search/SearchIndexRecordMapper.js.map +1 -0
  139. package/dist/infrastructure/context/search/SqliteSearchIndexStore.d.ts +21 -0
  140. package/dist/infrastructure/context/search/SqliteSearchIndexStore.d.ts.map +1 -0
  141. package/dist/infrastructure/context/search/SqliteSearchIndexStore.js +94 -0
  142. package/dist/infrastructure/context/search/SqliteSearchIndexStore.js.map +1 -0
  143. package/dist/infrastructure/context/search/migrations/001-create-search-index-entries.sql +26 -0
  144. package/dist/infrastructure/host/HostBuilder.d.ts.map +1 -1
  145. package/dist/infrastructure/host/HostBuilder.js +19 -0
  146. package/dist/infrastructure/host/HostBuilder.js.map +1 -1
  147. package/dist/infrastructure/messaging/ProjectionBusFactory.d.ts +1 -0
  148. package/dist/infrastructure/messaging/ProjectionBusFactory.d.ts.map +1 -1
  149. package/dist/infrastructure/messaging/ProjectionBusFactory.js +13 -0
  150. package/dist/infrastructure/messaging/ProjectionBusFactory.js.map +1 -1
  151. package/dist/infrastructure/persistence/migrations.config.d.ts.map +1 -1
  152. package/dist/infrastructure/persistence/migrations.config.js +1 -0
  153. package/dist/infrastructure/persistence/migrations.config.js.map +1 -1
  154. package/dist/presentation/cli/commands/index/rebuild/IndexRebuildOutputBuilder.d.ts +20 -0
  155. package/dist/presentation/cli/commands/index/rebuild/IndexRebuildOutputBuilder.d.ts.map +1 -0
  156. package/dist/presentation/cli/commands/index/rebuild/IndexRebuildOutputBuilder.js +54 -0
  157. package/dist/presentation/cli/commands/index/rebuild/IndexRebuildOutputBuilder.js.map +1 -0
  158. package/dist/presentation/cli/commands/index/rebuild/index.rebuild.d.ts +8 -0
  159. package/dist/presentation/cli/commands/index/rebuild/index.rebuild.d.ts.map +1 -0
  160. package/dist/presentation/cli/commands/index/rebuild/index.rebuild.js +45 -0
  161. package/dist/presentation/cli/commands/index/rebuild/index.rebuild.js.map +1 -0
  162. package/dist/presentation/cli/commands/registry/generated-commands.d.ts.map +1 -1
  163. package/dist/presentation/cli/commands/registry/generated-commands.js +12 -0
  164. package/dist/presentation/cli/commands/registry/generated-commands.js.map +1 -1
  165. package/dist/presentation/cli/commands/search/SearchOutputBuilder.d.ts +17 -0
  166. package/dist/presentation/cli/commands/search/SearchOutputBuilder.d.ts.map +1 -0
  167. package/dist/presentation/cli/commands/search/SearchOutputBuilder.js +111 -0
  168. package/dist/presentation/cli/commands/search/SearchOutputBuilder.js.map +1 -0
  169. package/dist/presentation/cli/commands/search/search.d.ts +12 -0
  170. package/dist/presentation/cli/commands/search/search.d.ts.map +1 -0
  171. package/dist/presentation/cli/commands/search/search.js +119 -0
  172. package/dist/presentation/cli/commands/search/search.js.map +1 -0
  173. package/dist/presentation/cli/help/SubcommandHelpFormatter.d.ts.map +1 -1
  174. package/dist/presentation/cli/help/SubcommandHelpFormatter.js +3 -4
  175. package/dist/presentation/cli/help/SubcommandHelpFormatter.js.map +1 -1
  176. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ import { BaseEvent } from "../../../domain/BaseEvent.js";
2
+ import { SearchDocument } from "./SearchDocument.js";
3
+ import { SearchDocumentChange } from "./SearchDocumentChange.js";
4
+ import { SearchDocumentSource } from "./SearchDocumentSource.js";
5
+ export interface ISearchDocumentProjector {
6
+ readonly eventTypes: readonly string[];
7
+ getSource(event: BaseEvent): SearchDocumentSource;
8
+ project(event: BaseEvent, current: SearchDocument | null): SearchDocumentChange | null;
9
+ }
10
+ //# sourceMappingURL=ISearchDocumentProjector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchDocumentProjector.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchDocumentProjector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,oBAAoB,CAAC;IAClD,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,GAAG,oBAAoB,GAAG,IAAI,CAAC;CACxF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ISearchDocumentProjector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchDocumentProjector.js","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchDocumentProjector.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { SearchRequest } from "./SearchRequest.js";
2
+ import { SearchResponse } from "./SearchResponse.js";
3
+ export interface ISearchGateway {
4
+ search(request: SearchRequest): Promise<SearchResponse>;
5
+ }
6
+ //# sourceMappingURL=ISearchGateway.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchGateway.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchGateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ISearchGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchGateway.js","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchGateway.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { SearchCriteria } from "./SearchCriteria.js";
2
+ import { SearchDocument } from "./SearchDocument.js";
3
+ import { SearchDocumentSource } from "./SearchDocumentSource.js";
4
+ import { SearchHit } from "./SearchHit.js";
5
+ export interface ISearchIndexReader {
6
+ findBySource(source: SearchDocumentSource): Promise<SearchDocument | null>;
7
+ search(criteria: SearchCriteria): Promise<SearchHit[]>;
8
+ }
9
+ //# sourceMappingURL=ISearchIndexReader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchIndexReader.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchIndexReader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3E,MAAM,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;CACxD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ISearchIndexReader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchIndexReader.js","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchIndexReader.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { SearchIndexRebuildRequest } from "./SearchIndexRebuildRequest.js";
2
+ import { SearchIndexRebuildResponse } from "./SearchIndexRebuildResponse.js";
3
+ export interface ISearchIndexRebuildGateway {
4
+ rebuildSearchIndex(request: SearchIndexRebuildRequest): Promise<SearchIndexRebuildResponse>;
5
+ }
6
+ //# sourceMappingURL=ISearchIndexRebuildGateway.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchIndexRebuildGateway.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchIndexRebuildGateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,MAAM,WAAW,0BAA0B;IACzC,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;CAC7F"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ISearchIndexRebuildGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchIndexRebuildGateway.js","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchIndexRebuildGateway.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { SearchCategory } from "./SearchCategory.js";
2
+ export interface ISearchIndexRebuildStore {
3
+ clear(): Promise<number>;
4
+ countByCategory(): Promise<Readonly<Partial<Record<SearchCategory, number>>>>;
5
+ }
6
+ //# sourceMappingURL=ISearchIndexRebuildStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchIndexRebuildStore.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchIndexRebuildStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,WAAW,wBAAwB;IACvC,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,eAAe,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/E"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ISearchIndexRebuildStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchIndexRebuildStore.js","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchIndexRebuildStore.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { SearchDocument } from "./SearchDocument.js";
2
+ import { SearchDocumentSource } from "./SearchDocumentSource.js";
3
+ export interface ISearchIndexWriter {
4
+ upsert(document: SearchDocument): Promise<void>;
5
+ remove(source: SearchDocumentSource): Promise<void>;
6
+ }
7
+ //# sourceMappingURL=ISearchIndexWriter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchIndexWriter.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchIndexWriter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ISearchIndexWriter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchIndexWriter.js","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchIndexWriter.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { SearchCriteria } from "./SearchCriteria.js";
2
+ import { SearchHit } from "./SearchHit.js";
3
+ export interface ISearchProvider {
4
+ search(criteria: SearchCriteria): Promise<readonly SearchHit[]>;
5
+ }
6
+ //# sourceMappingURL=ISearchProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchProvider.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,SAAS,EAAE,CAAC,CAAC;CACjE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ISearchProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISearchProvider.js","sourceRoot":"","sources":["../../../../src/application/context/search/ISearchProvider.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { ISearchGateway } from "./ISearchGateway.js";
2
+ import { ISearchProvider } from "./ISearchProvider.js";
3
+ import { SearchRequest } from "./SearchRequest.js";
4
+ import { SearchResponse } from "./SearchResponse.js";
5
+ export declare class LocalSearchGateway implements ISearchGateway {
6
+ private readonly providers;
7
+ constructor(providers: readonly ISearchProvider[]);
8
+ search(request: SearchRequest): Promise<SearchResponse>;
9
+ private filterHits;
10
+ private sortHits;
11
+ private limitHits;
12
+ private groupByCategory;
13
+ }
14
+ //# sourceMappingURL=LocalSearchGateway.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalSearchGateway.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/LocalSearchGateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,qBAAa,kBAAmB,YAAW,cAAc;IAC3C,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS,eAAe,EAAE;IAE5D,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAW7D,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,SAAS;IASjB,OAAO,CAAC,eAAe;CAcxB"}
@@ -0,0 +1,40 @@
1
+ import { SearchResultLimit } from "./SearchResultLimit.js";
2
+ export class LocalSearchGateway {
3
+ constructor(providers) {
4
+ this.providers = providers;
5
+ }
6
+ async search(request) {
7
+ const providerHits = await Promise.all(this.providers.map((provider) => provider.search(request.criteria)));
8
+ const hits = this.limitHits(this.sortHits(this.filterHits(providerHits.flat(), request)), request);
9
+ if (!request.criteria.groupByCategory) {
10
+ return { hits };
11
+ }
12
+ return { hits, groups: this.groupByCategory(hits) };
13
+ }
14
+ filterHits(hits, request) {
15
+ if (!request.criteria.category) {
16
+ return [...hits];
17
+ }
18
+ return hits.filter((hit) => hit.category === request.criteria.category);
19
+ }
20
+ sortHits(hits) {
21
+ return [...hits].sort((left, right) => right.score - left.score);
22
+ }
23
+ limitHits(hits, request) {
24
+ const limit = Math.min(Math.max(request.criteria.limit ?? SearchResultLimit.DEFAULT, SearchResultLimit.MIN), SearchResultLimit.MAX);
25
+ return hits.slice(0, limit);
26
+ }
27
+ groupByCategory(hits) {
28
+ const groups = new Map();
29
+ for (const hit of hits) {
30
+ const group = groups.get(hit.category) ?? [];
31
+ group.push(hit);
32
+ groups.set(hit.category, group);
33
+ }
34
+ return [...groups.entries()].map(([category, groupedHits]) => ({
35
+ category,
36
+ hits: groupedHits,
37
+ }));
38
+ }
39
+ }
40
+ //# sourceMappingURL=LocalSearchGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalSearchGateway.js","sourceRoot":"","sources":["../../../../src/application/context/search/LocalSearchGateway.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,OAAO,kBAAkB;IAC7B,YAA6B,SAAqC;QAArC,cAAS,GAAT,SAAS,CAA4B;IAAG,CAAC;IAEtE,KAAK,CAAC,MAAM,CAAC,OAAsB;QACjC,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC5G,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;QAEnG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,EAAE,CAAC;YACtC,OAAO,EAAE,IAAI,EAAE,CAAC;QAClB,CAAC;QAED,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;IACtD,CAAC;IAEO,UAAU,CAAC,IAA0B,EAAE,OAAsB;QACnE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;YAC/B,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;QACnB,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC1E,CAAC;IAEO,QAAQ,CAAC,IAA0B;QACzC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IACnE,CAAC;IAEO,SAAS,CAAC,IAA0B,EAAE,OAAsB;QAClE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CACpB,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,IAAI,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,CAAC,GAAG,CAAC,EACpF,iBAAiB,CAAC,GAAG,CACtB,CAAC;QAEF,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC;IAEO,eAAe,CAAC,IAA0B;QAChD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;QAE9C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YAC7C,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAChB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC;YAC7D,QAAQ;YACR,IAAI,EAAE,WAAW;SAClB,CAAC,CAAC,CAAC;IACN,CAAC;CACF"}
@@ -0,0 +1,10 @@
1
+ export declare const SearchCategory: {
2
+ readonly COMPONENT: "component";
3
+ readonly DEPENDENCY: "dependency";
4
+ readonly DECISION: "decision";
5
+ readonly GUIDELINE: "guideline";
6
+ readonly INVARIANT: "invariant";
7
+ };
8
+ export type KnownSearchCategory = (typeof SearchCategory)[keyof typeof SearchCategory];
9
+ export type SearchCategory = KnownSearchCategory | (string & {});
10
+ //# sourceMappingURL=SearchCategory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchCategory.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchCategory.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEvF,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export const SearchCategory = {
2
+ COMPONENT: "component",
3
+ DEPENDENCY: "dependency",
4
+ DECISION: "decision",
5
+ GUIDELINE: "guideline",
6
+ INVARIANT: "invariant",
7
+ };
8
+ //# sourceMappingURL=SearchCategory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchCategory.js","sourceRoot":"","sources":["../../../../src/application/context/search/SearchCategory.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;CACd,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { ISearchGateway } from "./ISearchGateway.js";
2
+ import { SearchRequest } from "./SearchRequest.js";
3
+ import { SearchResponse } from "./SearchResponse.js";
4
+ export declare class SearchController {
5
+ private readonly gateway;
6
+ constructor(gateway: ISearchGateway);
7
+ handle(request: SearchRequest): Promise<SearchResponse>;
8
+ }
9
+ //# sourceMappingURL=SearchController.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchController.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,cAAc;IAE9C,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;CAG9D"}
@@ -0,0 +1,9 @@
1
+ export class SearchController {
2
+ constructor(gateway) {
3
+ this.gateway = gateway;
4
+ }
5
+ async handle(request) {
6
+ return this.gateway.search(request);
7
+ }
8
+ }
9
+ //# sourceMappingURL=SearchController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchController.js","sourceRoot":"","sources":["../../../../src/application/context/search/SearchController.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,gBAAgB;IAC3B,YAA6B,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;IAAG,CAAC;IAExD,KAAK,CAAC,MAAM,CAAC,OAAsB;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;CACF"}
@@ -0,0 +1,8 @@
1
+ import { SearchCategory } from "./SearchCategory.js";
2
+ export interface SearchCriteria {
3
+ readonly query?: string;
4
+ readonly category?: SearchCategory;
5
+ readonly limit?: number;
6
+ readonly groupByCategory?: boolean;
7
+ }
8
+ //# sourceMappingURL=SearchCriteria.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchCriteria.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchCriteria.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;CACpC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SearchCriteria.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchCriteria.js","sourceRoot":"","sources":["../../../../src/application/context/search/SearchCriteria.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import { SearchCategory } from "./SearchCategory.js";
2
+ import { SearchDocumentSource } from "./SearchDocumentSource.js";
3
+ import { SearchFacetValue } from "./SearchFacetValue.js";
4
+ export interface SearchDocument {
5
+ readonly source: SearchDocumentSource;
6
+ readonly category: SearchCategory;
7
+ readonly title: string;
8
+ readonly summary: string | null;
9
+ readonly content: string;
10
+ readonly facets: Readonly<Record<string, SearchFacetValue>>;
11
+ readonly metadata: Readonly<Record<string, SearchFacetValue>>;
12
+ readonly version: number;
13
+ readonly createdAt: string;
14
+ readonly updatedAt: string;
15
+ }
16
+ //# sourceMappingURL=SearchDocument.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchDocument.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC5D,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SearchDocument.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchDocument.js","sourceRoot":"","sources":["../../../../src/application/context/search/SearchDocument.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { SearchDocument } from "./SearchDocument.js";
2
+ import { SearchDocumentSource } from "./SearchDocumentSource.js";
3
+ export type SearchDocumentChange = {
4
+ readonly operation: "upsert";
5
+ readonly document: SearchDocument;
6
+ } | {
7
+ readonly operation: "remove";
8
+ readonly source: SearchDocumentSource;
9
+ };
10
+ //# sourceMappingURL=SearchDocumentChange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchDocumentChange.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchDocumentChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAA;CAAE,GACnE;IAAE,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SearchDocumentChange.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchDocumentChange.js","sourceRoot":"","sources":["../../../../src/application/context/search/SearchDocumentChange.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { ComponentSearchDocumentProjector } from "./projectors/ComponentSearchDocumentProjector.js";
2
+ import { DecisionSearchDocumentProjector } from "./projectors/DecisionSearchDocumentProjector.js";
3
+ import { DependencySearchDocumentProjector } from "./projectors/DependencySearchDocumentProjector.js";
4
+ import { GuidelineSearchDocumentProjector } from "./projectors/GuidelineSearchDocumentProjector.js";
5
+ import { InvariantSearchDocumentProjector } from "./projectors/InvariantSearchDocumentProjector.js";
6
+ export declare class SearchDocumentProjectorRegistry {
7
+ createMemoryProjectors(): readonly [ComponentSearchDocumentProjector, DependencySearchDocumentProjector, DecisionSearchDocumentProjector, GuidelineSearchDocumentProjector, InvariantSearchDocumentProjector];
8
+ }
9
+ //# sourceMappingURL=SearchDocumentProjectorRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchDocumentProjectorRegistry.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchDocumentProjectorRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,+BAA+B,EAAE,MAAM,iDAAiD,CAAC;AAClG,OAAO,EAAE,iCAAiC,EAAE,MAAM,mDAAmD,CAAC;AACtG,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AAEpG,qBAAa,+BAA+B;IAC1C,sBAAsB;CASvB"}
@@ -0,0 +1,17 @@
1
+ import { ComponentSearchDocumentProjector } from "./projectors/ComponentSearchDocumentProjector.js";
2
+ import { DecisionSearchDocumentProjector } from "./projectors/DecisionSearchDocumentProjector.js";
3
+ import { DependencySearchDocumentProjector } from "./projectors/DependencySearchDocumentProjector.js";
4
+ import { GuidelineSearchDocumentProjector } from "./projectors/GuidelineSearchDocumentProjector.js";
5
+ import { InvariantSearchDocumentProjector } from "./projectors/InvariantSearchDocumentProjector.js";
6
+ export class SearchDocumentProjectorRegistry {
7
+ createMemoryProjectors() {
8
+ return [
9
+ new ComponentSearchDocumentProjector(),
10
+ new DependencySearchDocumentProjector(),
11
+ new DecisionSearchDocumentProjector(),
12
+ new GuidelineSearchDocumentProjector(),
13
+ new InvariantSearchDocumentProjector(),
14
+ ];
15
+ }
16
+ }
17
+ //# sourceMappingURL=SearchDocumentProjectorRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchDocumentProjectorRegistry.js","sourceRoot":"","sources":["../../../../src/application/context/search/SearchDocumentProjectorRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,+BAA+B,EAAE,MAAM,iDAAiD,CAAC;AAClG,OAAO,EAAE,iCAAiC,EAAE,MAAM,mDAAmD,CAAC;AACtG,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AAEpG,MAAM,OAAO,+BAA+B;IAC1C,sBAAsB;QACpB,OAAO;YACL,IAAI,gCAAgC,EAAE;YACtC,IAAI,iCAAiC,EAAE;YACvC,IAAI,+BAA+B,EAAE;YACrC,IAAI,gCAAgC,EAAE;YACtC,IAAI,gCAAgC,EAAE;SAC9B,CAAC;IACb,CAAC;CACF"}
@@ -0,0 +1,5 @@
1
+ export interface SearchDocumentSource {
2
+ readonly type: string;
3
+ readonly id: string;
4
+ }
5
+ //# sourceMappingURL=SearchDocumentSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchDocumentSource.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchDocumentSource.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SearchDocumentSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchDocumentSource.js","sourceRoot":"","sources":["../../../../src/application/context/search/SearchDocumentSource.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type SearchFacetValue = string | number | boolean | readonly string[] | null;
2
+ //# sourceMappingURL=SearchFacetValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchFacetValue.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchFacetValue.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SearchFacetValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchFacetValue.js","sourceRoot":"","sources":["../../../../src/application/context/search/SearchFacetValue.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import { SearchCategory } from "./SearchCategory.js";
2
+ import { SearchDocumentSource } from "./SearchDocumentSource.js";
3
+ import { SearchFacetValue } from "./SearchFacetValue.js";
4
+ export interface SearchHit {
5
+ readonly source: SearchDocumentSource;
6
+ readonly category: SearchCategory;
7
+ readonly title: string;
8
+ readonly summary: string | null;
9
+ readonly snippet: string | null;
10
+ readonly facets: Readonly<Record<string, SearchFacetValue>>;
11
+ readonly score: number;
12
+ }
13
+ //# sourceMappingURL=SearchHit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchHit.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchHit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC5D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SearchHit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchHit.js","sourceRoot":"","sources":["../../../../src/application/context/search/SearchHit.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { SearchCategory } from "./SearchCategory.js";
2
+ import { SearchHit } from "./SearchHit.js";
3
+ export interface SearchHitGroup {
4
+ readonly category: SearchCategory;
5
+ readonly hits: readonly SearchHit[];
6
+ }
7
+ //# sourceMappingURL=SearchHitGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchHitGroup.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchHitGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,IAAI,EAAE,SAAS,SAAS,EAAE,CAAC;CACrC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SearchHitGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchHitGroup.js","sourceRoot":"","sources":["../../../../src/application/context/search/SearchHitGroup.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { BaseEvent } from "../../../domain/BaseEvent.js";
2
+ import { IEventHandler } from "../../messaging/IEventHandler.js";
3
+ import { ISearchDocumentProjector } from "./ISearchDocumentProjector.js";
4
+ import { ISearchIndexWriter } from "./ISearchIndexWriter.js";
5
+ import { ISearchIndexReader } from "./ISearchIndexReader.js";
6
+ export declare class SearchIndexEventHandler implements IEventHandler {
7
+ private readonly documentProjectors;
8
+ private readonly reader;
9
+ private readonly writer;
10
+ readonly eventTypes: readonly string[];
11
+ constructor(documentProjectors: readonly ISearchDocumentProjector[], reader: ISearchIndexReader, writer: ISearchIndexWriter);
12
+ handle(event: BaseEvent): Promise<void>;
13
+ }
14
+ //# sourceMappingURL=SearchIndexEventHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchIndexEventHandler.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchIndexEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,qBAAa,uBAAwB,YAAW,aAAa;IAIzD,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALzB,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;gBAGpB,kBAAkB,EAAE,SAAS,wBAAwB,EAAE,EACvD,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,kBAAkB;IAKvC,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAgB9C"}
@@ -0,0 +1,24 @@
1
+ export class SearchIndexEventHandler {
2
+ constructor(documentProjectors, reader, writer) {
3
+ this.documentProjectors = documentProjectors;
4
+ this.reader = reader;
5
+ this.writer = writer;
6
+ this.eventTypes = [...new Set(documentProjectors.flatMap((projector) => projector.eventTypes))];
7
+ }
8
+ async handle(event) {
9
+ const documentProjector = this.documentProjectors.find((candidate) => candidate.eventTypes.includes(event.type));
10
+ if (!documentProjector)
11
+ return;
12
+ const source = documentProjector.getSource(event);
13
+ const current = await this.reader.findBySource(source);
14
+ const change = documentProjector.project(event, current);
15
+ if (!change)
16
+ return;
17
+ if (change.operation === "upsert") {
18
+ await this.writer.upsert(change.document);
19
+ return;
20
+ }
21
+ await this.writer.remove(change.source);
22
+ }
23
+ }
24
+ //# sourceMappingURL=SearchIndexEventHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchIndexEventHandler.js","sourceRoot":"","sources":["../../../../src/application/context/search/SearchIndexEventHandler.ts"],"names":[],"mappings":"AAMA,MAAM,OAAO,uBAAuB;IAGlC,YACmB,kBAAuD,EACvD,MAA0B,EAC1B,MAA0B;QAF1B,uBAAkB,GAAlB,kBAAkB,CAAqC;QACvD,WAAM,GAAN,MAAM,CAAoB;QAC1B,WAAM,GAAN,MAAM,CAAoB;QAE3C,IAAI,CAAC,UAAU,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAClG,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAgB;QAC3B,MAAM,iBAAiB,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACjH,IAAI,CAAC,iBAAiB;YAAE,OAAO;QAE/B,MAAM,MAAM,GAAG,iBAAiB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAClD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QACvD,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,IAAI,MAAM,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;YAClC,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1C,OAAO;QACT,CAAC;QAED,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ import { ISearchIndexRebuildGateway } from "./ISearchIndexRebuildGateway.js";
2
+ import { SearchIndexRebuildRequest } from "./SearchIndexRebuildRequest.js";
3
+ import { SearchIndexRebuildResponse } from "./SearchIndexRebuildResponse.js";
4
+ export declare class SearchIndexRebuildController {
5
+ private readonly gateway;
6
+ constructor(gateway: ISearchIndexRebuildGateway);
7
+ handle(request: SearchIndexRebuildRequest): Promise<SearchIndexRebuildResponse>;
8
+ }
9
+ //# sourceMappingURL=SearchIndexRebuildController.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchIndexRebuildController.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchIndexRebuildController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,qBAAa,4BAA4B;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,0BAA0B;IAE1D,MAAM,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,0BAA0B,CAAC;CAGtF"}
@@ -0,0 +1,9 @@
1
+ export class SearchIndexRebuildController {
2
+ constructor(gateway) {
3
+ this.gateway = gateway;
4
+ }
5
+ async handle(request) {
6
+ return this.gateway.rebuildSearchIndex(request);
7
+ }
8
+ }
9
+ //# sourceMappingURL=SearchIndexRebuildController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchIndexRebuildController.js","sourceRoot":"","sources":["../../../../src/application/context/search/SearchIndexRebuildController.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,4BAA4B;IACvC,YAA6B,OAAmC;QAAnC,YAAO,GAAP,OAAO,CAA4B;IAAG,CAAC;IAEpE,KAAK,CAAC,MAAM,CAAC,OAAkC;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ export interface SearchIndexRebuildRequest {
2
+ }
3
+ //# sourceMappingURL=SearchIndexRebuildRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchIndexRebuildRequest.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchIndexRebuildRequest.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;CAAG"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SearchIndexRebuildRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchIndexRebuildRequest.js","sourceRoot":"","sources":["../../../../src/application/context/search/SearchIndexRebuildRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { SearchCategory } from "./SearchCategory.js";
2
+ export interface SearchIndexRebuildResponse {
3
+ readonly success: boolean;
4
+ readonly eventsInspected: number;
5
+ readonly documentsIndexed: number;
6
+ readonly removedEntries: number;
7
+ readonly countsByCategory: Readonly<Partial<Record<SearchCategory, number>>>;
8
+ }
9
+ //# sourceMappingURL=SearchIndexRebuildResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchIndexRebuildResponse.d.ts","sourceRoot":"","sources":["../../../../src/application/context/search/SearchIndexRebuildResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAC9E"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SearchIndexRebuildResponse.js.map