chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase
This commit is contained in:
parent
970e08c466
commit
1f7e365a4e
237 changed files with 1951 additions and 49413 deletions
|
|
@ -22,7 +22,7 @@
|
|||
* 4. Store result for future queries
|
||||
*/
|
||||
|
||||
import { StorageAdapter } from '../coreTypes.js'
|
||||
import { StorageAdapter, NounMetadata } from '../coreTypes.js'
|
||||
import { prodLog } from './logger.js'
|
||||
|
||||
/**
|
||||
|
|
@ -412,7 +412,7 @@ export class FieldTypeInference {
|
|||
noun: 'FieldTypeCache',
|
||||
...typeInfo
|
||||
}
|
||||
await this.storage.saveMetadata(cacheKey, metadataObj as any).catch(error => {
|
||||
await this.storage.saveMetadata(cacheKey, metadataObj).catch(error => {
|
||||
prodLog.warn(`Failed to save field type cache for '${field}':`, error)
|
||||
})
|
||||
}
|
||||
|
|
@ -487,8 +487,10 @@ export class FieldTypeInference {
|
|||
if (field) {
|
||||
this.typeCache.delete(field)
|
||||
const cacheKey = `${this.CACHE_STORAGE_PREFIX}${field}`
|
||||
// null signals deletion to storage adapter
|
||||
await this.storage.saveMetadata(cacheKey, null as any)
|
||||
// Typed boundary: the storage metadata channel doubles as the delete
|
||||
// path — writing a JSON `null` tombstone clears the cached entry, but
|
||||
// the adapter signature only models real payloads.
|
||||
await this.storage.saveMetadata(cacheKey, null as unknown as NounMetadata)
|
||||
} else {
|
||||
this.typeCache.clear()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue