Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
1 line
1.7 KiB
Plaintext
1 line
1.7 KiB
Plaintext
{"version":3,"sources":["../../src/kv/index.ts"],"sourcesContent":["import type { CollectionConfig } from '../collections/config/types.js'\nimport type { Payload } from '../types/index.js'\n\nexport type KVStoreValue = NonNullable<unknown>\n\nexport interface KVAdapter {\n /**\n * Clears all entries in the store.\n * @returns A promise that resolves once the store is cleared.\n */\n clear(): Promise<void>\n\n /**\n * Deletes a value from the store by its key.\n * @param key - The key to delete.\n * @returns A promise that resolves once the key is deleted.\n */\n delete(key: string): Promise<void>\n\n /**\n * Retrieves a value from the store by its key.\n * @param key - The key to look up.\n * @returns A promise that resolves to the value, or `null` if not found.\n */\n get<T extends KVStoreValue>(key: string): Promise<null | T>\n\n /**\n * Checks if a key exists in the store.\n * @param key - The key to check.\n * @returns A promise that resolves to `true` if the key exists, otherwise `false`.\n */\n has(key: string): Promise<boolean>\n\n /**\n * Retrieves all the keys in the store.\n * @returns A promise that resolves to an array of keys.\n */\n keys(): Promise<string[]>\n\n /**\n * Sets a value in the store with the given key.\n * @param key - The key to associate with the value.\n * @param value - The value to store.\n * @returns A promise that resolves once the value is stored.\n */\n set(key: string, value: KVStoreValue): Promise<void>\n}\n\nexport interface KVAdapterResult {\n init(args: { payload: Payload }): KVAdapter\n\n /** Adapter can create additional collection if needed */\n kvCollection?: CollectionConfig\n}\n"],"names":[],"mappings":"AAgDA,WAKC"} |