Loading .github/ai-labeler.yml +2 −2 Original line number Diff line number Diff line Loading @@ -183,11 +183,11 @@ labels: - Routing or middleware support - component/kv: description: "Key-value storage layer" description: "key–value storage layer" instructions: | Use for: - Persistence changes - Data modeling for key-value store - Data modeling for key–value store - component/mq: description: "Message queue infrastructure" Loading postgres/kv.ts +9 −9 Original line number Diff line number Diff line Loading @@ -6,11 +6,11 @@ import { driverSerializesJson } from "./utils.ts"; const logger = getLogger(["fedify", "postgres", "kv"]); /** * Options for the PostgreSQL key-value store. * Options for the PostgreSQL key–value store. */ export interface PostgresKvStoreOptions { /** * The table name to use for the key-value store. * The table name to use for the key–value store. * `"fedify_kv_v2"` by default. * @default `"fedify_kv_v2"` */ Loading @@ -24,7 +24,7 @@ export interface PostgresKvStoreOptions { } /** * A key-value store that uses PostgreSQL as the underlying storage. * A key–value store that uses PostgreSQL as the underlying storage. * * @example * ```ts Loading @@ -46,9 +46,9 @@ export class PostgresKvStore implements KvStore { #driverSerializesJson = false; /** * Creates a new PostgreSQL key-value store. * Creates a new PostgreSQL key–value store. * @param sql The PostgreSQL client to use. * @param options The options for the key-value store. * @param options The options for the key–value store. */ constructor( // deno-lint-ignore ban-types Loading Loading @@ -108,12 +108,12 @@ export class PostgresKvStore implements KvStore { } /** * Creates the table used by the key-value store if it does not already exist. * Creates the table used by the key–value store if it does not already exist. * Does nothing if the table already exists. */ async initialize(): Promise<void> { if (this.#initialized) return; logger.debug("Initializing the key-value store table {tableName}...", { logger.debug("Initializing the key–value store table {tableName}...", { tableName: this.#tableName, }); await this.#sql` Loading @@ -126,13 +126,13 @@ export class PostgresKvStore implements KvStore { `; this.#driverSerializesJson = await driverSerializesJson(this.#sql); this.#initialized = true; logger.debug("Initialized the key-value store table {tableName}.", { logger.debug("Initialized the key–value store table {tableName}.", { tableName: this.#tableName, }); } /** * Drops the table used by the key-value store. Does nothing if the table * Drops the table used by the key–value store. Does nothing if the table * does not exist. */ async drop(): Promise<void> { Loading redis/kv.ts +5 −5 Original line number Diff line number Diff line Loading @@ -8,20 +8,20 @@ import { type Codec, JsonCodec } from "./codec.ts"; */ export interface RedisKvStoreOptions { /** * The prefix to use for all keys in the key-value store in Redis. * The prefix to use for all keys in the key–value store in Redis. * Defaults to `"fedify::"`. */ keyPrefix?: RedisKey; /** * The codec to use for encoding and decoding values in the key-value store. * The codec to use for encoding and decoding values in the key–value store. * Defaults to {@link JsonCodec}. */ codec?: Codec; } /** * A key-value store that uses Redis as the underlying storage. * A key–value store that uses Redis as the underlying storage. * * @example * ```ts ignore Loading @@ -42,9 +42,9 @@ export class RedisKvStore implements KvStore { #textEncoder = new TextEncoder(); /** * Creates a new Redis key-value store. * Creates a new Redis key–value store. * @param redis The Redis client to use. * @param options The options for the key-value store. * @param options The options for the key–value store. */ constructor(redis: Redis, options: RedisKvStoreOptions = {}) { this.#redis = redis; Loading redis/mq.ts +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ export interface RedisMessageQueueOptions { lockKey?: RedisKey; /** * The codec to use for encoding and decoding messages in the key-value store. * The codec to use for encoding and decoding messages in the key–value store. * Defaults to {@link JsonCodec}. * @default {@link JsonCodec} */ Loading sqlite/README.md +1 −1 Original line number Diff line number Diff line @fedify/sqlite: SQLite drivers for Fedify ============== This package provides a SQLite-based key-value store implementation. This package provides a SQLite-based key–value store implementation. ## Usage Loading Loading
.github/ai-labeler.yml +2 −2 Original line number Diff line number Diff line Loading @@ -183,11 +183,11 @@ labels: - Routing or middleware support - component/kv: description: "Key-value storage layer" description: "key–value storage layer" instructions: | Use for: - Persistence changes - Data modeling for key-value store - Data modeling for key–value store - component/mq: description: "Message queue infrastructure" Loading
postgres/kv.ts +9 −9 Original line number Diff line number Diff line Loading @@ -6,11 +6,11 @@ import { driverSerializesJson } from "./utils.ts"; const logger = getLogger(["fedify", "postgres", "kv"]); /** * Options for the PostgreSQL key-value store. * Options for the PostgreSQL key–value store. */ export interface PostgresKvStoreOptions { /** * The table name to use for the key-value store. * The table name to use for the key–value store. * `"fedify_kv_v2"` by default. * @default `"fedify_kv_v2"` */ Loading @@ -24,7 +24,7 @@ export interface PostgresKvStoreOptions { } /** * A key-value store that uses PostgreSQL as the underlying storage. * A key–value store that uses PostgreSQL as the underlying storage. * * @example * ```ts Loading @@ -46,9 +46,9 @@ export class PostgresKvStore implements KvStore { #driverSerializesJson = false; /** * Creates a new PostgreSQL key-value store. * Creates a new PostgreSQL key–value store. * @param sql The PostgreSQL client to use. * @param options The options for the key-value store. * @param options The options for the key–value store. */ constructor( // deno-lint-ignore ban-types Loading Loading @@ -108,12 +108,12 @@ export class PostgresKvStore implements KvStore { } /** * Creates the table used by the key-value store if it does not already exist. * Creates the table used by the key–value store if it does not already exist. * Does nothing if the table already exists. */ async initialize(): Promise<void> { if (this.#initialized) return; logger.debug("Initializing the key-value store table {tableName}...", { logger.debug("Initializing the key–value store table {tableName}...", { tableName: this.#tableName, }); await this.#sql` Loading @@ -126,13 +126,13 @@ export class PostgresKvStore implements KvStore { `; this.#driverSerializesJson = await driverSerializesJson(this.#sql); this.#initialized = true; logger.debug("Initialized the key-value store table {tableName}.", { logger.debug("Initialized the key–value store table {tableName}.", { tableName: this.#tableName, }); } /** * Drops the table used by the key-value store. Does nothing if the table * Drops the table used by the key–value store. Does nothing if the table * does not exist. */ async drop(): Promise<void> { Loading
redis/kv.ts +5 −5 Original line number Diff line number Diff line Loading @@ -8,20 +8,20 @@ import { type Codec, JsonCodec } from "./codec.ts"; */ export interface RedisKvStoreOptions { /** * The prefix to use for all keys in the key-value store in Redis. * The prefix to use for all keys in the key–value store in Redis. * Defaults to `"fedify::"`. */ keyPrefix?: RedisKey; /** * The codec to use for encoding and decoding values in the key-value store. * The codec to use for encoding and decoding values in the key–value store. * Defaults to {@link JsonCodec}. */ codec?: Codec; } /** * A key-value store that uses Redis as the underlying storage. * A key–value store that uses Redis as the underlying storage. * * @example * ```ts ignore Loading @@ -42,9 +42,9 @@ export class RedisKvStore implements KvStore { #textEncoder = new TextEncoder(); /** * Creates a new Redis key-value store. * Creates a new Redis key–value store. * @param redis The Redis client to use. * @param options The options for the key-value store. * @param options The options for the key–value store. */ constructor(redis: Redis, options: RedisKvStoreOptions = {}) { this.#redis = redis; Loading
redis/mq.ts +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ export interface RedisMessageQueueOptions { lockKey?: RedisKey; /** * The codec to use for encoding and decoding messages in the key-value store. * The codec to use for encoding and decoding messages in the key–value store. * Defaults to {@link JsonCodec}. * @default {@link JsonCodec} */ Loading
sqlite/README.md +1 −1 Original line number Diff line number Diff line @fedify/sqlite: SQLite drivers for Fedify ============== This package provides a SQLite-based key-value store implementation. This package provides a SQLite-based key–value store implementation. ## Usage Loading