chore(release): 2.4.1 #199
+23
-15
@@ -15,6 +15,18 @@ import globals from 'globals';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
const tests = ['**/*.spec.ts', 'test/**/*.ts'];
|
||||
const guardedModules = [
|
||||
{
|
||||
name: 'tbank-sync',
|
||||
except: [
|
||||
'./tbank-sync.api.ts',
|
||||
'./tbank-sync.dto.ts',
|
||||
'./tbank-sync.module.ts',
|
||||
'./tbank-sync-repository.module.ts',
|
||||
],
|
||||
},
|
||||
{ name: 'upcoming-events', except: ['./upcoming-events.api.ts', './upcoming-events.module.ts'] },
|
||||
];
|
||||
const prismaImports = [
|
||||
'@prisma/*', '**/generated/prisma/**', '**/prisma.service',
|
||||
];
|
||||
@@ -213,24 +225,20 @@ export default defineConfig(
|
||||
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['src/**/*.ts'],
|
||||
ignores: [...tests, 'src/modules/investments/tbank-sync/**'],
|
||||
// Separate rule so it does not replace layer-specific no-restricted-imports configs.
|
||||
// A module may import its own internals, so each guarded module gets a block without its zone.
|
||||
...[undefined, ...guardedModules].map((own) => ({
|
||||
files: own ? [`src/modules/investments/${own.name}/**/*.ts`] : ['src/**/*.ts'],
|
||||
ignores: own ? tests : [...tests, ...guardedModules.map(({ name }) => `src/modules/investments/${name}/**`)],
|
||||
rules: {
|
||||
// Separate rule so it does not replace layer-specific no-restricted-imports configs.
|
||||
'import-x/no-restricted-paths': ['error', {
|
||||
zones: [{
|
||||
zones: guardedModules.filter((module) => module !== own).map(({ except, name }) => ({
|
||||
target: './src',
|
||||
from: './src/modules/investments/tbank-sync',
|
||||
except: [
|
||||
'./tbank-sync.api.ts',
|
||||
'./tbank-sync.dto.ts',
|
||||
'./tbank-sync.module.ts',
|
||||
'./tbank-sync-repository.module.ts',
|
||||
],
|
||||
message: 'Use tbank-sync.api for cross-module access.',
|
||||
}],
|
||||
from: `./src/modules/investments/${name}`,
|
||||
except,
|
||||
message: `Use ${name}.api for cross-module access.`,
|
||||
})),
|
||||
}],
|
||||
},
|
||||
},
|
||||
})),
|
||||
);
|
||||
|
||||
@@ -12,7 +12,7 @@ import { PrismaService } from '#src/prisma/prisma.service';
|
||||
|
||||
import { BrokerageOperationsSyncService } from '../operations/operations.api';
|
||||
import { PortfolioService } from '../portfolio/portfolio.api';
|
||||
import { UpcomingEventsService } from '../upcoming-events/upcoming-events.service';
|
||||
import { UpcomingEventsService } from '../upcoming-events/upcoming-events.api';
|
||||
import {
|
||||
HOURLY_CAUSE_INTERRUPTED,
|
||||
type HourlyCause,
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export { EventsErrorCode, UpcomingEventsService } from './upcoming-events.service';
|
||||
+1
-1
@@ -10,7 +10,7 @@ import { BankErrorCode } from './modules/banking/bank-cards/application/bank-car
|
||||
import { IncomeErrorCode } from './modules/investments/income/income-period';
|
||||
import { InstrumentErrorCode } from './modules/investments/instruments/domain/instrument-error-code';
|
||||
import { OperationErrorCode } from './modules/investments/operations/domain/operation-error-code';
|
||||
import { EventsErrorCode } from './modules/investments/upcoming-events/upcoming-events.service';
|
||||
import { EventsErrorCode } from './modules/investments/upcoming-events/upcoming-events.api';
|
||||
|
||||
export const API_PREFIX = 'api/v1';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user