Skip to content

Commit 879b389

Browse files
committed
refactor: reorganize imports and update type definitions across multiple files
1 parent 5d42ebd commit 879b389

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+302
-251
lines changed

CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ All notable changes to this repository will be documented in this file.
55
Format and process
66

77
- The `Unreleased` section contains completed tasks that have been removed from `TODO.md` and are targeted for the next release.
8-
- integration.test.task.003 — undefined — Test cleanup
9-
- integration.test.task.002 — undefined — Integration test completion
10-
- integration.test.task.003 — undefined — Test cleanup
11-
- integration.test.task.002 — undefined — Integration test completion
128
- Each entry should include: task id, summary, author, PR or commit link, and a one-line description of the change.
139
- When creating a release, move the entries from `Unreleased` to a new versioned section (e.g. `## [1.0.0] - 2025-09-20`) and include release notes.
1410

src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import pino from 'pino';
55
import { getLogger } from './core/system/logger';
66
import { ObservabilityLogger } from './core/system/observability.logger';
77
import { CommandFactory } from './commands/shared/command.factory';
8-
import { EXIT_CODES } from './constants/exit-codes';
8+
import { EXIT_CODES } from './types/core';
99
import { ConsoleOutputWriter } from './core/rendering/console-output.writer';
1010

1111
/**

src/commands/audit/ref-audit.command.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { Command } from 'commander';
22

33
import { container } from '../../core/system/container';
4-
import { SERVICE_KEYS } from '../../types/core';
5-
import { ILogger } from '../../types/observability';
6-
import { CommandName, IReferenceAuditUseCase } from '../../types';
4+
import { CommandName, IReferenceAuditUseCase, SERVICE_KEYS, ILogger } from '../../types';
75
import { BaseCommand } from '../shared/base.command';
86

97
/**

src/commands/audit/supersede.command.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
import { Command } from 'commander';
22

33
import { container } from '../../core/system/container';
4-
import { SERVICE_KEYS } from '../../types/core';
5-
import { ILogger } from '../../types/observability';
6-
import { CommandName, IUIdSupersedeUseCase } from '../../types';
4+
import {
5+
CommandName,
6+
ISupersedeOptions,
7+
IUIdSupersedeUseCase,
8+
SERVICE_KEYS,
9+
ILogger,
10+
} from '../../types';
711
import { BaseCommand } from '../shared/base.command';
812

9-
interface ISupersedeOptions {
10-
oldUid: string;
11-
newUid: string;
12-
}
13-
1413
/**
1514
* Command for superseding UIDs.
1615
*/

src/commands/rendering/next.command.telemetry.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { CommandName } from '../../types';
2-
import { IObservabilityLogger } from '../../types/observability';
3-
import { IHydrationOptions, TaskProviderType } from '../../types/tasks';
4-
5-
export interface OperationContext {
6-
operationLogger: IObservabilityLogger;
7-
startTime: Date;
8-
stopTimer: () => void;
9-
}
1+
import {
2+
OperationContext,
3+
IObservabilityLogger,
4+
IHydrationOptions,
5+
CommandName,
6+
TaskProviderType,
7+
} from '../../types';
8+
9+
export type { OperationContext };
1010

1111
export class NextCommandTelemetry {
1212
/**

src/commands/rendering/next.command.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
import { Command } from 'commander';
22

3-
import { CommandName, TaskProviderType } from '../../types';
4-
import { ILogger, IObservabilityLogger } from '../../types/observability';
5-
import { NextCommandOptions } from '../../types/rendering';
6-
import { ITaskRepository } from '../../types/repository';
7-
import { IHydrationOptions, ITask, TaskState } from '../../types/tasks';
8-
import { TaskProviderFactory } from '../../core/storage/task-provider.factory';
9-
import { isNullOrUndefined } from '../../core/helpers/type.helper';
103
import { TaskHydrationService } from '../../core/processing/hydrate';
11-
import { Resolver } from '../../core/helpers/uid-resolver';
124
import { Renderer } from '../../core/rendering/renderer';
5+
import { TaskProviderFactory } from '../../core/storage';
136
import { ObservabilityLoggerAdapter } from '../../core/system/observability-logger.adapter';
7+
import {
8+
CommandName,
9+
IObservabilityLogger,
10+
ILogger,
11+
IHydrationOptions,
12+
TaskProviderType,
13+
ITaskRepository,
14+
ITask,
15+
TaskState,
16+
NextCommandOptions,
17+
} from '../../types';
1418
import { BaseCommand } from '../shared/base.command';
19+
import { isNullOrUndefined } from '../../core/helpers/type.helper';
20+
import { Resolver } from '../../core/helpers/uid-resolver';
1521

1622
import { NextCommandTelemetry, OperationContext } from './next.command.telemetry';
1723

src/commands/rendering/render.command.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import { Command } from 'commander';
22

33
import { container } from '../../core/system/container';
4-
import { SERVICE_KEYS } from '../../types/core';
5-
import { RenderCommandOptions } from '../../types/rendering';
6-
import { ILogger } from '../../types/observability';
7-
import { IRenderOptions } from '../../types/tasks';
8-
import { CommandName, ITaskRenderUseCase } from '../../types';
4+
import {
5+
CommandName,
6+
IRenderOptions,
7+
ITaskRenderUseCase,
8+
SERVICE_KEYS,
9+
ILogger,
10+
RenderCommandOptions,
11+
} from '../../types';
912
import { BaseCommand } from '../shared/base.command';
1013

1114
/**

src/commands/shared/base.command.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { ILogger } from '../../types';
2-
import { IOutputWriter } from '../../types/rendering';
1+
import { ILogger, IOutputWriter } from '../../types';
32

43
import { BaseCommand } from './base.command';
54

src/commands/shared/base.command.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { ICommand, ILogger } from '../../types';
2-
import { IOutputWriter } from '../../types/rendering';
31
import { ConsoleOutputWriter } from '../../core/rendering';
2+
import { ICommand, ILogger, IOutputWriter } from '../../types';
43

54
export abstract class BaseCommand implements ICommand {
65
abstract name: string;

src/commands/shared/command.factory.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
import { Command } from 'commander';
22

3+
import { ILogger, IOutputWriter } from '../../types';
4+
import { RefAuditCommand } from '../audit/ref-audit.command';
5+
import { SupersedeCommand } from '../audit/supersede.command';
6+
import { NextCommand } from '../rendering/next.command';
7+
import { RenderCommand } from '../rendering/render.command';
38
import { AddTaskCommand } from '../task-management/add-task.command';
49
import { CompleteTaskCommand } from '../task-management/complete-task.command';
510
import { ListTasksCommand } from '../task-management/list-tasks.command';
611
import { ShowTaskCommand } from '../task-management/show-task.command';
712
import { ValidateAndFixCommand } from '../validation/validate-and-fix.command';
813
import { ValidateTasksCommand } from '../validation/validate-tasks.command';
9-
import { NextCommand } from '../rendering/next.command';
10-
import { RenderCommand } from '../rendering/render.command';
11-
import { RefAuditCommand } from '../audit/ref-audit.command';
12-
import { SupersedeCommand } from '../audit/supersede.command';
13-
import { ILogger } from '../../types/observability';
14-
import { IOutputWriter } from '../../types/rendering';
1514

1615
/**
1716
* Factory for creating and configuring CLI commands following Command pattern.

0 commit comments

Comments
 (0)