mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 23:41:08 +02:00
fix: resolve build errors for mana-core-auth and clock-backend
- Add rememberMe field to sessions schema - Mock non-existent service imports in tests - Add missing docker-entrypoint.sh for clock-backend Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
346c28f2cd
commit
e29f52135d
3 changed files with 30 additions and 4 deletions
23
apps/clock/apps/backend/docker-entrypoint.sh
Executable file
23
apps/clock/apps/backend/docker-entrypoint.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "=== Clock Backend Entrypoint ==="
|
||||
|
||||
# Wait for PostgreSQL to be ready
|
||||
echo "Waiting for PostgreSQL..."
|
||||
until pg_isready -h ${DB_HOST:-postgres} -p ${DB_PORT:-5432} -U ${DB_USER:-postgres} 2>/dev/null; do
|
||||
echo "PostgreSQL is unavailable - sleeping"
|
||||
sleep 2
|
||||
done
|
||||
echo "PostgreSQL is up!"
|
||||
|
||||
cd /app/apps/clock/apps/backend
|
||||
|
||||
# Run schema push
|
||||
echo "Pushing database schema..."
|
||||
npx drizzle-kit push --force
|
||||
echo "Schema push completed!"
|
||||
|
||||
# Execute the main command
|
||||
echo "Starting application..."
|
||||
exec "$@"
|
||||
|
|
@ -16,10 +16,12 @@ import { ConflictException, NotFoundException, ForbiddenException } from '@nestj
|
|||
import { BetterAuthService } from './better-auth.service';
|
||||
import { createMockConfigService } from '../../__tests__/utils/test-helpers';
|
||||
import { silentError } from '../../__tests__/utils/silent-error.decorator';
|
||||
import { SecurityEventsService } from '../../security/security-events.service';
|
||||
import { ReferralCodeService } from '../../referrals/services/referral-code.service';
|
||||
import { ReferralTierService } from '../../referrals/services/referral-tier.service';
|
||||
import { ReferralTrackingService } from '../../referrals/services/referral-tracking.service';
|
||||
|
||||
// Mock services that are not yet implemented
|
||||
const SecurityEventsService = jest.fn();
|
||||
const ReferralCodeService = jest.fn();
|
||||
const ReferralTierService = jest.fn();
|
||||
const ReferralTrackingService = jest.fn();
|
||||
|
||||
// Mock nanoid before importing factories
|
||||
jest.mock('nanoid', () => ({
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ export const sessions = authSchema.table('sessions', {
|
|||
deviceName: text('device_name'),
|
||||
lastActivityAt: timestamp('last_activity_at', { withTimezone: true }).defaultNow(),
|
||||
revokedAt: timestamp('revoked_at', { withTimezone: true }),
|
||||
rememberMe: boolean('remember_me').default(false),
|
||||
});
|
||||
|
||||
// Accounts table (for OAuth providers and credentials - Better Auth schema)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue