Skip to content
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
1 change: 0 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ export * from './lib/plugin-loader';
export * from './lib/base-generator';
export * from './lib/auto-installer';
export * from './lib/type-guards';
export * from './lib/logger';
export * from './lib/validation';
224 changes: 0 additions & 224 deletions packages/core/src/lib/logger.spec.ts

This file was deleted.

134 changes: 0 additions & 134 deletions packages/core/src/lib/logger.ts

This file was deleted.

6 changes: 3 additions & 3 deletions packages/core/src/lib/plugin-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { GeneratorPlugin } from './interfaces';
import { PluginLoadError, PluginNotFoundError } from './errors';
import { GeneratorRegistry } from './registry';
import { isGeneratorPlugin } from './type-guards';
import { logger } from './logger';
import { logger } from '@nx/devkit';

const BUILTIN_PLUGIN_MAP: Record<string, string> = {
'openapi-tools': '@nx-plugin-openapi/plugin-openapi',
Expand Down Expand Up @@ -110,11 +110,11 @@ export async function loadPlugin(
const code = (e as Record<string, unknown>)?.['code'];

if (code === 'ERR_MODULE_NOT_FOUND' || /Cannot find module/.test(msg)) {
logger.error(`Plugin not found: ${name}`, { searchPaths });
logger.error(`Plugin not found: ${name}. Searched paths: ${JSON.stringify(searchPaths)}`);
throw new PluginNotFoundError(name, searchPaths);
}

logger.error(`Failed to load plugin: ${name}`, e);
logger.error(`Failed to load plugin: ${name}. Error: ${e}`);
throw new PluginLoadError(name, e);
}
}
2 changes: 1 addition & 1 deletion packages/core/src/lib/validation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Core validation utilities
import { ValidationError, InvalidPathError } from './errors';
import { isValidInputSpec, assertValidPath } from './type-guards';
import { logger } from './logger';
import { logger } from '@nx/devkit';

export interface ValidationResult {
valid: boolean;
Expand Down
Loading