Skip to content

Commit 8b21c62

Browse files
authored
Merge pull request #600 from dahlia/mysql
Fix missing @fedify/mysql entries in CONTRIBUTING.md and `fedify init`
2 parents 571559d + d0c19c5 commit 8b21c62

4 files changed

Lines changed: 44 additions & 7 deletions

File tree

CONTRIBUTING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,8 @@ The repository is organized as a monorepo with the following packages:
344344
- *packages/elysia/*: Elysia integration (@fedify/elysia) for Fedify.
345345
- *packages/express/*: Express integration (@fedify/express) for Fedify.
346346
- *packages/fastify/*: Fastify integration (@fedify/fastify) for Fedify.
347+
- *packages/fixture/*: Testing utilities (@fedify/fixture) providing
348+
runtime-agnostic test adapters.
347349
- *packages/fresh/*: Fresh integration (@fedify/fresh) for Fedify.
348350
- *packages/h3/*: h3 framework integration (@fedify/h3) for Fedify.
349351
- *packages/hono/*: Hono integration (@fedify/hono) for Fedify.
@@ -352,11 +354,12 @@ The repository is organized as a monorepo with the following packages:
352354
`npm init @fedify`.
353355
- *packages/koa/*: Koa integration (@fedify/koa) for Fedify.
354356
- *packages/lint/*: Linting utilities (@fedify/lint) for Fedify.
357+
- *packages/mysql/*: MySQL/MariaDB drivers (@fedify/mysql) for Fedify.
358+
- *packages/nestjs/*: NestJS integration (@fedify/nestjs) for Fedify.
359+
- *packages/next/*: Next.js integration (@fedify/next) for Fedify.
355360
- *packages/postgres/*: PostgreSQL drivers (@fedify/postgres) for Fedify.
356361
- *packages/redis/*: Redis drivers (@fedify/redis) for Fedify.
357362
- *packages/relay/*: ActivityPub relay support (@fedify/relay) for Fedify.
358-
- *packages/nestjs/*: NestJS integration (@fedify/nestjs) for Fedify.
359-
- *packages/next/*: Next.js integration (@fedify/next) for Fedify.
360363
- *packages/sqlite/*: SQLite driver (@fedify/sqlite) for Fedify.
361364
- *packages/sveltekit/*: SvelteKit integration (@fedify/sveltekit) for Fedify.
362365
- *packages/testing/*: Testing utilities (@fedify/testing) for Fedify.
@@ -367,8 +370,6 @@ The repository is organized as a monorepo with the following packages:
367370
(@fedify/vocab-tools) for Fedify.
368371
- *packages/webfinger/*: WebFinger client library (@fedify/webfinger) for
369372
ActivityPub.
370-
- *packages/fixture/*: Testing utilities (@fedify/fixture) providing
371-
runtime-agnostic test adapters.
372373
- *docs/*: The Fedify docs. The docs are built with [Node.js] and
373374
[VitePress].
374375
- *examples/*: The example projects. Some examples are built with Deno, and

packages/init/src/const.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@ export const WEB_FRAMEWORK = [
1212
] as const;
1313

1414
/** All supported message queue backend identifiers. */
15-
export const MESSAGE_QUEUE = ["denokv", "redis", "postgres", "amqp"] as const;
15+
export const MESSAGE_QUEUE = [
16+
"denokv",
17+
"redis",
18+
"postgres",
19+
"mysql",
20+
"amqp",
21+
] as const;
1622

1723
/** All supported key-value store backend identifiers. */
18-
export const KV_STORE = ["denokv", "redis", "postgres"] as const;
24+
export const KV_STORE = ["denokv", "redis", "postgres", "mysql"] as const;
1925

2026
/**
2127
* External database services that need to be running for integration tests.
2228
* Used by the test suite to check service availability before running tests.
2329
*/
24-
export const DB_TO_CHECK = ["redis", "postgres", "amqp"] as const;
30+
export const DB_TO_CHECK = ["redis", "postgres", "mysql", "amqp"] as const;

packages/init/src/json/db-to-check.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
"defaultPort": 5432,
1010
"documentation": "https://www.postgresql.org/download/"
1111
},
12+
"mysql": {
13+
"name": "MySQL/MariaDB",
14+
"defaultPort": 3306,
15+
"documentation": "https://dev.mysql.com/doc/mysql-installation-excerpt/en/"
16+
},
1217
"amqp": {
1318
"name": "RabbitMQ",
1419
"defaultPort": 5672,

packages/init/src/json/mq.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,31 @@
4949
"POSTGRES_URL": "postgres://postgres@localhost:5432/postgres"
5050
}
5151
},
52+
"mysql": {
53+
"label": "MySQL/MariaDB",
54+
"packageManagers": [
55+
"deno",
56+
"bun",
57+
"npm",
58+
"yarn",
59+
"pnpm"
60+
],
61+
"dependencies": {
62+
"npm:mysql2": "^3.18.0"
63+
},
64+
"imports": {
65+
"@fedify/mysql": {
66+
"MysqlMessageQueue": "MysqlMessageQueue"
67+
},
68+
"mysql2/promise": {
69+
"default": "mysql"
70+
}
71+
},
72+
"object": "new MysqlMessageQueue(mysql.createPool(process.env.MYSQL_URL))",
73+
"env": {
74+
"MYSQL_URL": "mysql://root@localhost/fedify"
75+
}
76+
},
5277
"amqp": {
5378
"label": "AMQP (e.g., RabbitMQ)",
5479
"packageManagers": [

0 commit comments

Comments
 (0)