Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove barrel files #83

Merged
merged 1 commit into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.