chore: fix CI with new typescript setup (#1194)

Co-authored-by: Ralph Khreish <Crunchyman-ralph@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
This commit is contained in:
Ralph Khreish
2025-09-09 23:35:47 +02:00
committed by GitHub
parent 587745046f
commit 3eeb19590a
20 changed files with 10514 additions and 4927 deletions

View File

@@ -15,6 +15,7 @@ import {
STATUS_ICONS,
type OutputFormat
} from '@tm/core';
import type { StorageType } from '@tm/core/types';
import * as ui from '../utils/ui.js';
/**
@@ -37,7 +38,7 @@ export interface ListTasksResult {
total: number;
filtered: number;
tag?: string;
storageType: 'file' | 'api';
storageType: Exclude<StorageType, 'auto'>;
}
/**
@@ -172,6 +173,13 @@ export class ListTasksCommand extends Command {
includeSubtasks: options.withSubtasks
});
// Runtime guard to prevent 'auto' from reaching CLI consumers
if (result.storageType === 'auto') {
throw new Error(
'Internal error: unresolved storage type reached CLI. Please check TaskService.getStorageType() implementation.'
);
}
return result as ListTasksResult;
}