refactor: migrate to ES modules
package.json type=module, tsconfig module/moduleResolution=NodeNext, target es2022, explicit .js on all relative imports. Center: jsonwebtoken & bcryptjs switched to default imports (ESM/CJS interop). Verified: builds, boots, full auth + plugin round-trip work under ESM. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,17 +5,17 @@ import {
|
||||
} from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import * as bcrypt from 'bcryptjs';
|
||||
import * as jwt from 'jsonwebtoken';
|
||||
import bcrypt from 'bcryptjs';
|
||||
import jwt from 'jsonwebtoken';
|
||||
import { randomBytes } from 'crypto';
|
||||
import { User } from '../entities/user.entity';
|
||||
import { GuildNode } from '../entities/guild-node.entity';
|
||||
import { GuildUser } from '../entities/guild-user.entity';
|
||||
import { UserApiKey } from '../entities/user-api-key.entity';
|
||||
import { RegisterDto } from './dto.register.dto';
|
||||
import { LoginDto } from './dto.login.dto';
|
||||
import { AuditService } from '../audit/audit.service';
|
||||
import { parseDurationToSeconds } from './token.util';
|
||||
import { User } from '../entities/user.entity.js';
|
||||
import { GuildNode } from '../entities/guild-node.entity.js';
|
||||
import { GuildUser } from '../entities/guild-user.entity.js';
|
||||
import { UserApiKey } from '../entities/user-api-key.entity.js';
|
||||
import { RegisterDto } from './dto.register.dto.js';
|
||||
import { LoginDto } from './dto.login.dto.js';
|
||||
import { AuditService } from '../audit/audit.service.js';
|
||||
import { parseDurationToSeconds } from './token.util.js';
|
||||
|
||||
function signAccessToken(userId: string, email: string): string {
|
||||
const secret = process.env.FABRIC_BACKEND_CENTER_JWT_ACCESS_SECRET as string;
|
||||
|
||||
Reference in New Issue
Block a user