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:
@@ -4,7 +4,7 @@ import {
|
||||
Injectable,
|
||||
UnauthorizedException,
|
||||
} from '@nestjs/common';
|
||||
import { introspectGuildToken } from './center-auth';
|
||||
import { introspectGuildToken } from './center-auth.js';
|
||||
|
||||
@Injectable()
|
||||
export class ApiKeyGuard implements CanActivate {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { MetricsService } from './metrics.service';
|
||||
import { MetricsService } from './metrics.service.js';
|
||||
|
||||
@Controller('metrics')
|
||||
export class MetricsController {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { randomUUID } from 'crypto';
|
||||
import { NextFunction, Request, Response } from 'express';
|
||||
import { MetricsService } from './metrics.service';
|
||||
import { MetricsService } from './metrics.service.js';
|
||||
|
||||
type ReqWithId = Request & { requestId?: string };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user