@qiu_qiu/vue-auto-component-framework 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { type App, type Component } from 'vue';
2
- import type { FrameworkOptions, LayoutConfig } from '@/types';
3
- import { LayoutManager } from '@/layout/LayoutManager';
2
+ import type { FrameworkOptions, LayoutConfig } from '../types';
3
+ import { LayoutManager } from '../layout/LayoutManager';
4
4
  /**
5
5
  * App creator implementation
6
6
  * Handles Vue app creation with framework features
@@ -1,7 +1,7 @@
1
1
  import { createApp as vueCreateApp } from 'vue';
2
- import { ComponentScanner } from './ComponentScanner';
3
- import { ErrorHandler } from './ErrorHandler';
4
- import { LayoutManager } from '@/layout/LayoutManager';
2
+ import { ComponentScanner } from './ComponentScanner.js';
3
+ import { ErrorHandler } from './ErrorHandler.js';
4
+ import { LayoutManager } from '../layout/LayoutManager.js';
5
5
  /**
6
6
  * App creator implementation
7
7
  * Handles Vue app creation with framework features
@@ -1,5 +1,5 @@
1
1
  import type { Component } from 'vue';
2
- import type { ComponentRegistry as IComponentRegistry } from '@/types';
2
+ import type { ComponentRegistry as IComponentRegistry } from '../types';
3
3
  /**
4
4
  * Component registry implementation
5
5
  * Manages registration and retrieval of Vue components with conflict detection
@@ -1,4 +1,4 @@
1
- import { ErrorHandler } from './ErrorHandler';
1
+ import { ErrorHandler } from './ErrorHandler.js';
2
2
  /**
3
3
  * Component registry implementation
4
4
  * Manages registration and retrieval of Vue components with conflict detection
@@ -1,5 +1,5 @@
1
1
  import type { App } from 'vue';
2
- import type { ComponentScanner as IComponentScanner, ComponentInfo, FrameworkError } from '@/types';
2
+ import type { ComponentScanner as IComponentScanner, ComponentInfo, FrameworkError } from '../types';
3
3
  import { ComponentRegistry } from './ComponentRegistry';
4
4
  /**
5
5
  * Component scanner implementation
@@ -1,6 +1,6 @@
1
- import { FileScanner } from './FileScanner';
2
- import { ComponentRegistry } from './ComponentRegistry';
3
- import { ErrorHandler } from './ErrorHandler';
1
+ import { FileScanner } from './FileScanner.js';
2
+ import { ComponentRegistry } from './ComponentRegistry.js';
3
+ import { ErrorHandler } from './ErrorHandler.js';
4
4
  /**
5
5
  * Component scanner implementation
6
6
  * Handles scanning and registering Vue components with error recovery
@@ -1,4 +1,4 @@
1
- import { FrameworkError } from '@/types';
1
+ import { FrameworkError } from '../types';
2
2
  /**
3
3
  * Error handler utility class for creating and managing framework errors
4
4
  */
@@ -1,4 +1,4 @@
1
- import { FrameworkError, FrameworkErrorType } from '@/types';
1
+ import { FrameworkError, FrameworkErrorType } from '../types/index.js';
2
2
  /**
3
3
  * Error handler utility class for creating and managing framework errors
4
4
  */
@@ -1,4 +1,4 @@
1
- import type { FileScanner as IFileScanner, ScanResult } from '@/types';
1
+ import type { FileScanner as IFileScanner, ScanResult } from '../types';
2
2
  /**
3
3
  * File scanner implementation
4
4
  * Handles scanning directories for component files
@@ -1,7 +1,7 @@
1
1
  import { readdir, stat, access } from 'fs/promises';
2
2
  import { join, resolve } from 'path';
3
3
  import { constants } from 'fs';
4
- import { ErrorHandler } from './ErrorHandler';
4
+ import { ErrorHandler } from './ErrorHandler.js';
5
5
  /**
6
6
  * File scanner implementation
7
7
  * Handles scanning directories for component files
package/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  import type { Component } from 'vue';
2
- import type { FrameworkOptions } from '@/types';
3
- export type { FrameworkOptions, LayoutConfig, LayoutSlots, ComponentInfo, ScanResult } from '@/types';
4
- export { FrameworkError, FrameworkErrorType } from '@/types';
5
- export { ErrorHandler } from '@/core/ErrorHandler';
6
- export { ComponentRegistry } from '@/core/ComponentRegistry';
7
- export { FileScanner } from '@/core/FileScanner';
8
- export { ComponentScanner } from '@/core/ComponentScanner';
9
- export { AppCreator } from '@/core/AppCreator';
2
+ import type { FrameworkOptions } from './types';
3
+ export type { FrameworkOptions, LayoutConfig, LayoutSlots, ComponentInfo, ScanResult } from './types';
4
+ export { FrameworkError, FrameworkErrorType } from './types';
5
+ export { ErrorHandler } from './core/ErrorHandler';
6
+ export { ComponentRegistry } from './core/ComponentRegistry';
7
+ export { FileScanner } from './core/FileScanner';
8
+ export { ComponentScanner } from './core/ComponentScanner';
9
+ export { AppCreator } from './core/AppCreator';
10
10
  export { default as DefaultLayout } from '@/layout/DefaultLayout.vue';
11
- export { LayoutManager } from '@/layout/LayoutManager';
11
+ export { LayoutManager } from './layout/LayoutManager';
12
12
  /**
13
13
  * Create Vue app with framework features
14
14
  * Compatible with Vue's native createApp API with enhanced error handling
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { AppCreator } from '@/core/AppCreator';
2
- export { FrameworkError, FrameworkErrorType } from '@/types';
3
- export { ErrorHandler } from '@/core/ErrorHandler';
1
+ import { AppCreator } from './core/AppCreator.js';
2
+ export { FrameworkError, FrameworkErrorType } from './types/index.js';
3
+ export { ErrorHandler } from './core/ErrorHandler.js';
4
4
  // Export core classes
5
- export { ComponentRegistry } from '@/core/ComponentRegistry';
6
- export { FileScanner } from '@/core/FileScanner';
7
- export { ComponentScanner } from '@/core/ComponentScanner';
8
- export { AppCreator } from '@/core/AppCreator';
5
+ export { ComponentRegistry } from './core/ComponentRegistry.js';
6
+ export { FileScanner } from './core/FileScanner.js';
7
+ export { ComponentScanner } from './core/ComponentScanner.js';
8
+ export { AppCreator } from './core/AppCreator.js';
9
9
  // Export layout components
10
- export { default as DefaultLayout } from '@/layout/DefaultLayout.vue';
11
- export { LayoutManager } from '@/layout/LayoutManager';
10
+ // Vue文件导出在编译输出中已移除
11
+ export { LayoutManager } from './layout/LayoutManager.js';
12
12
  /**
13
13
  * Create Vue app with framework features
14
14
  * Compatible with Vue's native createApp API with enhanced error handling
@@ -24,7 +24,7 @@ export async function createApp(rootComponent, options = {}) {
24
24
  throw error;
25
25
  }
26
26
  // Otherwise, wrap in a framework error
27
- const { ErrorHandler } = await import('@/core/ErrorHandler');
27
+ const { ErrorHandler } = await import('./core/ErrorHandler.js');
28
28
  throw ErrorHandler.createAppError('Failed to create application', { rootComponent: rootComponent?.name || 'anonymous' }, error);
29
29
  }
30
30
  }
@@ -1,5 +1,5 @@
1
1
  import type { App, Component } from 'vue';
2
- import type { LayoutConfig } from '@/types';
2
+ import type { LayoutConfig } from '../types';
3
3
  /**
4
4
  * Layout manager handles layout configuration and registration
5
5
  */
@@ -1,5 +1,5 @@
1
- import { FrameworkError, FrameworkErrorType } from '@/types';
2
- import DefaultLayout from './DefaultLayout.vue';
1
+ import { FrameworkError, FrameworkErrorType } from '../types/index.js';
2
+ // Vue文件导入在编译输出中已移除
3
3
  /**
4
4
  * Layout manager handles layout configuration and registration
5
5
  */
@@ -1,4 +1,4 @@
1
1
  export { default as DefaultLayout } from './DefaultLayout.vue';
2
2
  export { LayoutManager } from './LayoutManager';
3
- export type { LayoutConfig, LayoutSlots } from '@/types';
3
+ export type { LayoutConfig, LayoutSlots } from '../types';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export { default as DefaultLayout } from './DefaultLayout.vue';
2
- export { LayoutManager } from './LayoutManager';
1
+ // Vue文件导出在编译输出中已移除
2
+ export { LayoutManager } from './LayoutManager.js';
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@qiu_qiu/vue-auto-component-framework",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
+ "type": "module",
4
5
  "description": "A Vue3 TypeScript framework with automatic component registration and layout system",
5
6
  "main": "dist/index.js",
6
7
  "types": "dist/index.d.ts",
7
8
  "scripts": {
8
- "build": "tsc",
9
+ "build": "tsc && tsc-alias && node scripts/fix-imports.js",
9
10
  "dev": "tsc --watch",
10
11
  "test": "vitest --run",
11
12
  "test:watch": "vitest",
@@ -33,6 +34,7 @@
33
34
  "eslint": "^8.0.0",
34
35
  "fast-check": "^3.15.0",
35
36
  "jsdom": "^27.4.0",
37
+ "tsc-alias": "^1.8.16",
36
38
  "typescript": "^5.0.0",
37
39
  "vite": "^5.0.0",
38
40
  "vitest": "^1.0.0",