diff --git a/.gitignore b/.gitignore index 2a5d3f18..c752c12e 100644 --- a/.gitignore +++ b/.gitignore @@ -76,14 +76,6 @@ blob-report/ # TypeScript *.tsbuildinfo -# Prevent compiled files in source directories -libs/*/src/**/*.js -libs/*/src/**/*.d.ts -libs/*/src/**/*.d.ts.map -apps/*/src/**/*.js -apps/*/src/**/*.d.ts -apps/*/src/**/*.d.ts.map - # Misc *.pem diff --git a/apps/server/src/services/feature-loader.ts b/apps/server/src/services/feature-loader.ts index f4d30246..fe77abe6 100644 --- a/apps/server/src/services/feature-loader.ts +++ b/apps/server/src/services/feature-loader.ts @@ -143,8 +143,9 @@ export class FeatureLoader { } } catch (error) { logger.error(`Failed to migrate image:`, error); - // Keep original path if migration fails - updatedPaths.push(imagePath); + // Rethrow error to let caller decide how to handle it + // Keeping original path could lead to broken references + throw error; } } diff --git a/libs/types/package.json b/libs/types/package.json index 2ce002ab..9eb1bea3 100644 --- a/libs/types/package.json +++ b/libs/types/package.json @@ -1,6 +1,7 @@ { "name": "@automaker/types", "version": "1.0.0", + "type": "module", "description": "Shared type definitions for AutoMaker", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/libs/types/src/index.ts b/libs/types/src/index.ts index 6d2fa42f..e7a9fbd9 100644 --- a/libs/types/src/index.ts +++ b/libs/types/src/index.ts @@ -13,7 +13,7 @@ export type { InstallationStatus, ValidationResult, ModelDefinition, -} from './provider'; +} from './provider.js'; // Feature types export type { @@ -21,7 +21,7 @@ export type { FeatureImagePath, FeatureStatus, PlanningMode, -} from './feature'; +} from './feature.js'; // Session types export type { @@ -29,43 +29,43 @@ export type { SessionListItem, CreateSessionParams, UpdateSessionParams, -} from './session'; +} from './session.js'; // Error types export type { ErrorType, ErrorInfo, -} from './error'; +} from './error.js'; // Image types export type { ImageData, ImageContentBlock, -} from './image'; +} from './image.js'; // Model types and constants export { CLAUDE_MODEL_MAP, DEFAULT_MODELS, type ModelAlias, -} from './model'; +} from './model.js'; // Event types export type { EventType, EventCallback, -} from './event'; +} from './event.js'; // Spec types export type { SpecOutput, -} from './spec'; +} from './spec.js'; export { specOutputSchema, -} from './spec'; +} from './spec.js'; // Enhancement types export type { EnhancementMode, EnhancementExample, -} from './enhancement'; +} from './enhancement.js';