mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
refactor: Update .gitignore and enhance error handling in feature-loader
Changes: - Removed specific compiled file patterns from .gitignore to simplify ignore rules. - Modified error handling in feature-loader.ts to rethrow errors instead of keeping original paths, preventing potential broken references. - Added ".js" extensions to import statements in types package for ESM compliance. Benefits: ✅ Cleaner .gitignore for better maintainability ✅ Improved error handling logic in feature-loader ✅ Consistent import paths for ESM compatibility All tests passing.
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -76,14 +76,6 @@ blob-report/
|
|||||||
# TypeScript
|
# TypeScript
|
||||||
*.tsbuildinfo
|
*.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
|
# Misc
|
||||||
*.pem
|
*.pem
|
||||||
|
|
||||||
|
|||||||
@@ -143,8 +143,9 @@ export class FeatureLoader {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(`Failed to migrate image:`, error);
|
logger.error(`Failed to migrate image:`, error);
|
||||||
// Keep original path if migration fails
|
// Rethrow error to let caller decide how to handle it
|
||||||
updatedPaths.push(imagePath);
|
// Keeping original path could lead to broken references
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@automaker/types",
|
"name": "@automaker/types",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
"type": "module",
|
||||||
"description": "Shared type definitions for AutoMaker",
|
"description": "Shared type definitions for AutoMaker",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export type {
|
|||||||
InstallationStatus,
|
InstallationStatus,
|
||||||
ValidationResult,
|
ValidationResult,
|
||||||
ModelDefinition,
|
ModelDefinition,
|
||||||
} from './provider';
|
} from './provider.js';
|
||||||
|
|
||||||
// Feature types
|
// Feature types
|
||||||
export type {
|
export type {
|
||||||
@@ -21,7 +21,7 @@ export type {
|
|||||||
FeatureImagePath,
|
FeatureImagePath,
|
||||||
FeatureStatus,
|
FeatureStatus,
|
||||||
PlanningMode,
|
PlanningMode,
|
||||||
} from './feature';
|
} from './feature.js';
|
||||||
|
|
||||||
// Session types
|
// Session types
|
||||||
export type {
|
export type {
|
||||||
@@ -29,43 +29,43 @@ export type {
|
|||||||
SessionListItem,
|
SessionListItem,
|
||||||
CreateSessionParams,
|
CreateSessionParams,
|
||||||
UpdateSessionParams,
|
UpdateSessionParams,
|
||||||
} from './session';
|
} from './session.js';
|
||||||
|
|
||||||
// Error types
|
// Error types
|
||||||
export type {
|
export type {
|
||||||
ErrorType,
|
ErrorType,
|
||||||
ErrorInfo,
|
ErrorInfo,
|
||||||
} from './error';
|
} from './error.js';
|
||||||
|
|
||||||
// Image types
|
// Image types
|
||||||
export type {
|
export type {
|
||||||
ImageData,
|
ImageData,
|
||||||
ImageContentBlock,
|
ImageContentBlock,
|
||||||
} from './image';
|
} from './image.js';
|
||||||
|
|
||||||
// Model types and constants
|
// Model types and constants
|
||||||
export {
|
export {
|
||||||
CLAUDE_MODEL_MAP,
|
CLAUDE_MODEL_MAP,
|
||||||
DEFAULT_MODELS,
|
DEFAULT_MODELS,
|
||||||
type ModelAlias,
|
type ModelAlias,
|
||||||
} from './model';
|
} from './model.js';
|
||||||
|
|
||||||
// Event types
|
// Event types
|
||||||
export type {
|
export type {
|
||||||
EventType,
|
EventType,
|
||||||
EventCallback,
|
EventCallback,
|
||||||
} from './event';
|
} from './event.js';
|
||||||
|
|
||||||
// Spec types
|
// Spec types
|
||||||
export type {
|
export type {
|
||||||
SpecOutput,
|
SpecOutput,
|
||||||
} from './spec';
|
} from './spec.js';
|
||||||
export {
|
export {
|
||||||
specOutputSchema,
|
specOutputSchema,
|
||||||
} from './spec';
|
} from './spec.js';
|
||||||
|
|
||||||
// Enhancement types
|
// Enhancement types
|
||||||
export type {
|
export type {
|
||||||
EnhancementMode,
|
EnhancementMode,
|
||||||
EnhancementExample,
|
EnhancementExample,
|
||||||
} from './enhancement';
|
} from './enhancement.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user