@aiao/rxdb-client-generator 0.0.1 → 0.0.3

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,5 +1,5 @@
1
1
  import { EntityMetadataOptions, EntityType } from '@aiao/rxdb';
2
- import { Project } from 'ts-morph-browser';
2
+ import { Project } from './ts_morph_browser';
3
3
  export interface RxDBClientGeneratorOptions {
4
4
  /**
5
5
  * 关系查询深度
@@ -14,22 +14,20 @@ export interface RxDBClientGeneratorOptions {
14
14
  * RxDB Client 生成器
15
15
  */
16
16
  export declare class RxDBClientGenerator {
17
+ private metadataMap;
17
18
  project: Project;
18
19
  metadataSet: Set<import('type-fest/source/readonly-deep').ReadonlyObjectDeep<import('@aiao/rxdb').EntityMetadataType>>;
19
- metadataMap: Map<string, import('type-fest/source/readonly-deep').ReadonlyObjectDeep<import('@aiao/rxdb').EntityMetadataType>>;
20
20
  config: Required<RxDBClientGeneratorOptions>;
21
21
  constructor(options?: RxDBClientGeneratorOptions);
22
22
  /**
23
23
  * 添加实体配置
24
24
  * @param value 实体
25
25
  */
26
- addEntity(value: EntityMetadataOptions | EntityType): void;
27
- /**
28
- * 执行生成器
29
- */
30
- execSync(): void;
26
+ addEntity(value: EntityMetadataOptions | EntityType, options?: EntityMetadataOptions[]): void;
27
+ getMetadata(mappedEntity: string, mappedNamespace: string): import('type-fest/source/readonly-deep').ReadonlyObjectDeep<import('@aiao/rxdb').EntityMetadataType> | undefined;
31
28
  /**
32
29
  * 执行生成器
33
30
  */
34
31
  exec(): void;
32
+ getSourceFiles(): import('./ts_morph_browser').SourceFile[];
35
33
  }
@@ -1,9 +1,9 @@
1
1
  import { EntityMetadata, EntityPropertyMetadata } from '@aiao/rxdb';
2
- import { OptionalKind, PropertyDeclarationStructure } from 'ts-morph-browser';
2
+ import { PropertyDeclarationStructure } from './ts_morph_browser';
3
3
  /**
4
4
  * 获取属性配置
5
5
  */
6
- export declare const getPropertyTypeConfig: (property: EntityPropertyMetadata) => Partial<OptionalKind<PropertyDeclarationStructure>> & {
6
+ export declare const getPropertyTypeConfig: (property: EntityPropertyMetadata) => Partial<PropertyDeclarationStructure> & {
7
7
  type: string;
8
8
  name: string;
9
9
  };
@@ -0,0 +1,13 @@
1
+ import { EntityMetadataOptions } from '@aiao/rxdb';
2
+ import { Project } from 'ts-morph';
3
+ interface AnalyzeFileResult {
4
+ decoratorName: string;
5
+ metadataOptions: EntityMetadataOptions;
6
+ extendMetadataOptions: EntityMetadataOptions[];
7
+ implements: string[];
8
+ }
9
+ /**
10
+ * 分析文件中的类
11
+ */
12
+ declare const _default: (filePath: string, project?: Project) => AnalyzeFileResult[];
13
+ export default _default;