Skip to content

Commit 5a1b695

Browse files
chore(all): bump tailwindcss from 4.1.7 to 4.1.8
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) from 4.1.7 to 4.1.8. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.8/packages/tailwindcss) --- updated-dependencies: - dependency-name: tailwindcss dependency-version: 4.1.8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
6 parents 7f27659 + ef10230 + 54d38b8 + 5e9ed8a + 920fac2 + c75e00f commit 5a1b695

37 files changed

+1439
-168
lines changed

package-lock.json

Lines changed: 496 additions & 149 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/backend/DB.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,25 @@ To perform the initial setup of the database, use the following endpoint:
2626

2727
**For SQLite:**
2828
The server will automatically manage the database file location. The request body should be:
29+
2930
```json
3031
{
3132
"type": "sqlite"
3233
}
3334
```
35+
3436
The SQLite database file will be created and stored at: `services/backend/persistent_data/database/deploystack.db`.
3537

3638
**For PostgreSQL:**
3739
The request body should be:
40+
3841
```json
3942
{
4043
"type": "postgres",
4144
"connectionString": "postgresql://username:password@host:port/mydatabase"
4245
}
4346
```
47+
4448
Replace the `connectionString` with your actual PostgreSQL connection URI.
4549

4650
**Important:** After the initial database setup via this API, you **must restart the backend server** for the changes to take full effect and for the application to connect to the newly configured database.
@@ -168,6 +172,7 @@ You can inspect the SQLite database directly using various tools:
168172
```bash
169173
sqlite3 services/backend/persistent_data/database/deploystack.db
170174
```
175+
171176
(Assuming the command is run from the project root directory)
172177
173178
- **Visual Tools**: [DB Browser for SQLite](https://sqlitebrowser.org/) or VSCode extensions like SQLite Viewer

services/backend/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,12 @@ services/backend/
8484
The `services/backend/persistent_data/` directory is designated for storing all data that needs to persist across application restarts or deployments.
8585

8686
**Purpose:**
87+
8788
- To provide a single, consistent location for all persistent backend data.
8889
- When developing backend features that require data persistence (e.g., database files, configuration files that should not be in version control but are generated/modified at runtime), use this directory exclusively.
8990

9091
**Examples of data stored here:**
92+
9193
- SQLite database file (e.g., `persistent_data/database/deploystack.db`)
9294
- Database selection configuration (e.g., `persistent_data/db.selection.json`)
9395

services/backend/SECURITY.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ We will acknowledge receipt of your vulnerability report promptly and work with
1212

1313
User passwords are never stored in plaintext. We employ a strong, adaptive hashing algorithm to protect user credentials.
1414

15-
- **Algorithm:** We will use `argon2id`, which is a part of the Argon2 family of algorithms (Argon2id is generally recommended as it provides resistance against both side-channel attacks and GPU cracking attacks).
16-
- **Salt Generation:** A unique, cryptographically secure salt is automatically generated for each user's password by the `argon2` library at the time of account creation or password change. This salt is then stored as part of the resulting hash string.
17-
- **Parameters:** We use appropriate parameters for `argon2` (e.g., memory cost, time cost, and parallelism) to ensure that the hashing process is computationally intensive, making brute-force attacks significantly more difficult. These parameters are chosen to balance security with acceptable performance on our servers and may be adjusted based on hardware improvements over time.
18-
- **Verification:** During login, the provided password and the stored salt (extracted from the hash string) are used to re-compute the hash. This newly computed hash is then compared against the stored hash in a constant-time manner (handled by the `argon2` library's verify function) to help prevent timing attacks.
15+
- **Algorithm:** We will use `argon2id`, which is a part of the Argon2 family of algorithms (Argon2id is generally recommended as it provides resistance against both side-channel attacks and GPU cracking attacks).
16+
- **Salt Generation:** A unique, cryptographically secure salt is automatically generated for each user's password by the `argon2` library at the time of account creation or password change. This salt is then stored as part of the resulting hash string.
17+
- **Parameters:** We use appropriate parameters for `argon2` (e.g., memory cost, time cost, and parallelism) to ensure that the hashing process is computationally intensive, making brute-force attacks significantly more difficult. These parameters are chosen to balance security with acceptable performance on our servers and may be adjusted based on hardware improvements over time.
18+
- **Verification:** During login, the provided password and the stored salt (extracted from the hash string) are used to re-compute the hash. This newly computed hash is then compared against the stored hash in a constant-time manner (handled by the `argon2` library's verify function) to help prevent timing attacks.
1919

2020
This approach ensures that even if the database were compromised, recovering the original passwords would be computationally infeasible.
2121

2222
## Session Management
2323

2424
User sessions are managed using `lucia-auth`.
2525

26-
- Session identifiers are cryptographically random and stored in secure, HTTP-only cookies to prevent XSS attacks from accessing them.
27-
- Sessions have defined expiration times (both active and idle timeouts) to limit the window of opportunity for session hijacking.
26+
- Session identifiers are cryptographically random and stored in secure, HTTP-only cookies to prevent XSS attacks from accessing them.
27+
- Sessions have defined expiration times (both active and idle timeouts) to limit the window of opportunity for session hijacking.
2828

2929
## Data Validation
3030

services/backend/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@
1212
},
1313
"dependencies": {
1414
"@fastify/cookie": "^11.0.2",
15+
"@fastify/cors": "^11.0.1",
1516
"@lucia-auth/adapter-drizzle": "^1.1.0",
1617
"@node-rs/argon2": "^2.0.2",
1718
"arctic": "^3.7.0",
1819
"argon2": "^0.43.0",
1920
"better-sqlite3": "^11.10.0",
20-
"drizzle-orm": "^0.43.1",
21+
"drizzle-orm": "^0.44.0",
2122
"fastify": "^5.3.3",
2223
"fastify-favicon": "^5.0.0",
2324
"lucia": "^3.2.2",
2425
"pg": "^8.16.0",
2526
"pino": "^9.7.0",
2627
"pino-pretty": "^13.0.0",
27-
"zod": "^3.25.36"
28+
"zod": "^3.25.42"
2829
},
2930
"devDependencies": {
3031
"@commitlint/cli": "^19.8.1",

services/backend/src/db/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function generateSchema(dialect: 'sqlite' | 'postgres'): AnySchema {
5353
const generatedSchema: AnySchema = {};
5454

5555
// Create enum for PostgreSQL auth_type
56+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5657
let authTypeEnum: any = null;
5758
if (dialect === 'postgres') {
5859
authTypeEnum = pgEnum('auth_type', authTypeEnumValues);
@@ -331,6 +332,7 @@ export function getSchema(): AnySchema {
331332

332333
// Helper function to safely execute database operations with proper typing
333334
export function executeDbOperation<T>(
335+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
334336
operation: (db: any, schema: any) => Promise<T> | T
335337
): Promise<T> | T {
336338
const db = getDb();

services/backend/src/fastify/plugins/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
import { FastifyInstance } from 'fastify'
22
import fastifyFavicon from 'fastify-favicon'
3+
import fastifyCors from '@fastify/cors'
34

45
export const registerFastifyPlugins = async (server: FastifyInstance): Promise<void> => {
6+
// Register CORS plugin
7+
await server.register(fastifyCors, {
8+
origin: [
9+
'http://localhost:5173', // Vite dev server
10+
'http://localhost:3000', // Frontend production (if served from same port)
11+
'http://localhost:4173', // Vite preview
12+
],
13+
credentials: true,
14+
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS']
15+
})
16+
517
// Register favicon plugin
618
await server.register(fastifyFavicon, {
719
path: '../shared/public/img',

services/backend/src/lib/lucia.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import type { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
99
// These types would ideally be more specific, generated by Drizzle or manually defined
1010
// to match your authUserTable, authSessionTable structures.
1111
// For now, using 'any' as a placeholder based on db/index.ts AnySchema.
12+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1213
type AuthUserTable = any;
14+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1315
type AuthSessionTable = any;
1416

1517
// Cached instances for lazy initialization

services/backend/src/routes/auth/github.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import type { FastifyInstance, FastifyReply } from 'fastify';
23
import { getLucia, getGithubAuth } from '../../lib/lucia';
3-
import { GithubCallbackSchema, type GithubCallbackInput } from './schemas';
4+
import { type GithubCallbackInput } from './schemas';
45
import { getDb, getSchema } from '../../db';
56
import { eq } from 'drizzle-orm';
67
import { generateId } from 'lucia';

services/backend/src/routes/auth/loginEmail.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { FastifyInstance, FastifyReply } from 'fastify';
22
import { getLucia } from '../../lib/lucia'; // Corrected import
3-
import { LoginEmailSchema, type LoginEmailInput } from './schemas';
3+
import { type LoginEmailInput } from './schemas';
44
// argon2 is not directly used here as lucia.useKey handles password verification
55
import { verify } from '@node-rs/argon2';
66
import { getDb, getSchema } from '../../db';
@@ -23,6 +23,7 @@ export default async function loginEmailRoute(fastify: FastifyInstance) {
2323
}
2424

2525
// Find user by email or username
26+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2627
const users = await (db as any)
2728
.select()
2829
.from(authUserTable)

0 commit comments

Comments
 (0)