Skip to content

Commit

Permalink
refactor: remove barrel files (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
c100k authored Nov 23, 2024
1 parent 32efbfc commit 5855ae4
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 27 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

## spec/v0.4.1 (unreleased)

* style: set noConsole as error
* refactor: remove barrel files
* refactor: simplify read version from package.json
* chore: replace eslint/prettier by biome
* chore: upgrade to node 22
* chore: simplify linting
Expand Down
9 changes: 5 additions & 4 deletions spec/controllers/DashboardsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ import {
Tags,
} from 'tsoa';

import { DASHBOARDS, ERR_401, ERR_403 } from '../data/index.js';
import { DASHBOARDS } from '../data/dashboard.js';
import { ERR_401, ERR_403 } from '../data/error.js';
import type {
ListDashboardsQueryParams,
ListDashboardsRes,
} from '../model/index.js';
import type { ErrorRes } from '../schema/index.js';
import type { DashboardService } from '../services/index.js';
} from '../model/dashboard.js';
import type { ErrorRes } from '../schema/error.js';
import type { DashboardService } from '../services/DashboardService.js';

@Route('dashboards')
@Produces('application/json')
Expand Down
12 changes: 5 additions & 7 deletions spec/controllers/RunnablesController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,22 @@ import {
Tags,
} from 'tsoa';

import { ERR_401, ERR_403, ERR_404 } from '../data/error.js';
import {
ERR_401,
ERR_403,
ERR_404,
RUNNABLES,
RUNNABLE_OP_ASYNC_DESC,
RUNNABLE_OP_ASYNC_RES,
RUNNABLE_OP_SYNC_DESC,
RUNNABLE_OP_SYNC_RES,
} from '../data/index.js';
} from '../data/runnable.js';
import type {
ListRunnablesQueryParams,
ListRunnablesRes,
Runnable,
RunnableOperationRes,
} from '../model/index.js';
import type { ErrorRes } from '../schema/index.js';
import type { RunnableService } from '../services/index.js';
} from '../model/runnable.js';
import type { ErrorRes } from '../schema/error.js';
import type { RunnableService } from '../services/RunnableService.js';

@Route('runnables')
@Produces('application/json')
Expand Down
2 changes: 1 addition & 1 deletion spec/data/dashboard.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ListDashboardsRes } from '../model/index.js';
import type { ListDashboardsRes } from '../model/dashboard.js';

export const DASHBOARDS: ListDashboardsRes = {
items: [
Expand Down
3 changes: 0 additions & 3 deletions spec/data/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion spec/data/runnable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
type ListRunnablesRes,
type RunnableOperationRes,
RunnableStatus,
} from '../model/index.js';
} from '../model/runnable.js';

export const RUNNABLE_OP_ASYNC_DESC: string =
'The operation has been executed asynchronously and will eventually succeed';
Expand Down
2 changes: 1 addition & 1 deletion spec/model/dashboard.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ListQueryParams, ListRes } from '../schema/index.js';
import type { ListQueryParams, ListRes } from '../schema/list.js';

/**
* A collection of metrics
Expand Down
2 changes: 0 additions & 2 deletions spec/model/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion spec/model/runnnable.ts → spec/model/runnable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ListQueryParams, ListRes } from '../schema/index.js';
import type { ListQueryParams, ListRes } from '../schema/list.js';

export interface ListRunnablesQueryParams extends ListQueryParams {
/**
Expand Down
2 changes: 0 additions & 2 deletions spec/schema/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion spec/services/DashboardService.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {
ListDashboardsQueryParams,
ListDashboardsRes,
} from '../model/index.js';
} from '../model/dashboard.js';

export interface DashboardService {
list(params: ListDashboardsQueryParams): Promise<ListDashboardsRes>;
Expand Down
2 changes: 1 addition & 1 deletion spec/services/RunnableService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
ListRunnablesRes,
Runnable,
RunnableOperationRes,
} from '../model/index.js';
} from '../model/runnable.js';

export interface RunnableService {
list(params: ListRunnablesQueryParams): Promise<ListRunnablesRes>;
Expand Down
2 changes: 0 additions & 2 deletions spec/services/index.ts

This file was deleted.

0 comments on commit 5855ae4

Please sign in to comment.