@open-mercato/core 0.10.1-develop.7826.1.5e82b7c668 → 0.10.1-develop.7827.1.5c631908e4
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/core",
|
|
3
|
-
"version": "0.10.1-develop.
|
|
3
|
+
"version": "0.10.1-develop.7827.1.5c631908e4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -266,16 +266,16 @@
|
|
|
266
266
|
"zod": "^4.6.6"
|
|
267
267
|
},
|
|
268
268
|
"peerDependencies": {
|
|
269
|
-
"@open-mercato/ai-assistant": "0.10.1-develop.
|
|
270
|
-
"@open-mercato/shared": "0.10.1-develop.
|
|
271
|
-
"@open-mercato/ui": "0.10.1-develop.
|
|
269
|
+
"@open-mercato/ai-assistant": "0.10.1-develop.7827.1.5c631908e4",
|
|
270
|
+
"@open-mercato/shared": "0.10.1-develop.7827.1.5c631908e4",
|
|
271
|
+
"@open-mercato/ui": "0.10.1-develop.7827.1.5c631908e4",
|
|
272
272
|
"react": "^19.0.0",
|
|
273
273
|
"react-dom": "^19.0.0"
|
|
274
274
|
},
|
|
275
275
|
"devDependencies": {
|
|
276
|
-
"@open-mercato/ai-assistant": "0.10.1-develop.
|
|
277
|
-
"@open-mercato/shared": "0.10.1-develop.
|
|
278
|
-
"@open-mercato/ui": "0.10.1-develop.
|
|
276
|
+
"@open-mercato/ai-assistant": "0.10.1-develop.7827.1.5c631908e4",
|
|
277
|
+
"@open-mercato/shared": "0.10.1-develop.7827.1.5c631908e4",
|
|
278
|
+
"@open-mercato/ui": "0.10.1-develop.7827.1.5c631908e4",
|
|
279
279
|
"@testing-library/dom": "^10.4.1",
|
|
280
280
|
"@testing-library/jest-dom": "^7.0.1",
|
|
281
281
|
"@testing-library/react": "^16.3.3",
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
import { tokenizeText } from '@open-mercato/shared/lib/search/tokenize'
|
|
59
59
|
import { buildContainmentPatterns } from '@open-mercato/shared/lib/search/containment'
|
|
60
60
|
import { runBeforeQueryPipeline, runAfterQueryPipeline, type QueryExtensionContext } from '@open-mercato/shared/lib/query/query-extension-runner'
|
|
61
|
-
import { warnOnCiphertextLikeFallback } from '@open-mercato/shared/lib/query/ciphertext-search-warning'
|
|
61
|
+
import { warnOnCiphertextLikeFallback, type CiphertextSearchWarning } from '@open-mercato/shared/lib/query/ciphertext-search-warning'
|
|
62
62
|
import {
|
|
63
63
|
matchEncryptedSortFields,
|
|
64
64
|
resolveEncryptedFieldNames,
|
|
@@ -452,12 +452,17 @@ export class HybridQueryEngine implements QueryEngine {
|
|
|
452
452
|
const applyAfterExtensions = async <R>(queryResult: QueryResult<R>): Promise<QueryResult<R>> => {
|
|
453
453
|
if (!ext || !hybridExtCtx) return queryResult
|
|
454
454
|
const diCtx = ext.resolve ? { resolve: ext.resolve } : noopDi
|
|
455
|
-
|
|
455
|
+
const ciphertextSearchWarnings = queryResult.meta?.ciphertextSearchWarnings
|
|
456
|
+
const result = await runAfterQueryPipeline(
|
|
456
457
|
queryResult as QueryResult<Record<string, unknown>>,
|
|
457
458
|
opts,
|
|
458
459
|
hybridExtCtx,
|
|
459
460
|
diCtx,
|
|
460
461
|
) as QueryResult<R>
|
|
462
|
+
if (ciphertextSearchWarnings?.length) {
|
|
463
|
+
result.meta = { ...result.meta, ciphertextSearchWarnings }
|
|
464
|
+
}
|
|
465
|
+
return result
|
|
461
466
|
}
|
|
462
467
|
|
|
463
468
|
try {
|
|
@@ -727,6 +732,7 @@ export class HybridQueryEngine implements QueryEngine {
|
|
|
727
732
|
searchRuntime.encryptedFields = null
|
|
728
733
|
}
|
|
729
734
|
}
|
|
735
|
+
const ciphertextSearchWarnings: CiphertextSearchWarning[] = []
|
|
730
736
|
if (searchFilters.length) {
|
|
731
737
|
this.logSearchDebug('search:init', {
|
|
732
738
|
entity,
|
|
@@ -768,6 +774,7 @@ export class HybridQueryEngine implements QueryEngine {
|
|
|
768
774
|
? 'no-indexable-tokens'
|
|
769
775
|
: searchConfig.enabled ? 'no-search-tokens' : 'search-disabled',
|
|
770
776
|
service: this.getEncryptionService(),
|
|
777
|
+
onDiagnostic: (warning) => ciphertextSearchWarnings.push(warning),
|
|
771
778
|
})
|
|
772
779
|
}
|
|
773
780
|
}
|
|
@@ -791,6 +798,7 @@ export class HybridQueryEngine implements QueryEngine {
|
|
|
791
798
|
? 'no-indexable-tokens'
|
|
792
799
|
: searchConfig.enabled ? 'no-search-tokens' : 'search-disabled',
|
|
793
800
|
service: this.getEncryptionService(),
|
|
801
|
+
onDiagnostic: (warning) => ciphertextSearchWarnings.push(warning),
|
|
794
802
|
})
|
|
795
803
|
}
|
|
796
804
|
const hasNonBaseSearchSource = searchSources.some(
|
|
@@ -1597,6 +1605,9 @@ export class HybridQueryEngine implements QueryEngine {
|
|
|
1597
1605
|
}
|
|
1598
1606
|
|
|
1599
1607
|
result = await applyAfterExtensions(result)
|
|
1608
|
+
if (ciphertextSearchWarnings.length) {
|
|
1609
|
+
result.meta = { ...result.meta, ciphertextSearchWarnings }
|
|
1610
|
+
}
|
|
1600
1611
|
finishProfile({
|
|
1601
1612
|
result: 'ok', total, page, pageSize,
|
|
1602
1613
|
itemCount: Array.isArray(items) ? items.length : undefined,
|