@mikro-orm/core 7.0.0-dev.8 → 7.0.0-dev.81
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.
- package/EntityManager.d.ts +85 -48
- package/EntityManager.js +300 -225
- package/MikroORM.d.ts +40 -31
- package/MikroORM.js +98 -137
- package/README.md +3 -2
- package/cache/FileCacheAdapter.d.ts +1 -1
- package/cache/FileCacheAdapter.js +6 -5
- package/cache/GeneratedCacheAdapter.d.ts +0 -1
- package/cache/GeneratedCacheAdapter.js +0 -2
- package/cache/index.d.ts +0 -1
- package/cache/index.js +0 -1
- package/connections/Connection.d.ts +11 -7
- package/connections/Connection.js +16 -14
- package/drivers/DatabaseDriver.d.ts +11 -5
- package/drivers/DatabaseDriver.js +23 -11
- package/drivers/IDatabaseDriver.d.ts +27 -5
- package/entity/BaseEntity.d.ts +0 -1
- package/entity/BaseEntity.js +0 -3
- package/entity/Collection.d.ts +98 -30
- package/entity/Collection.js +432 -93
- package/entity/EntityAssigner.d.ts +1 -1
- package/entity/EntityAssigner.js +15 -7
- package/entity/EntityFactory.d.ts +7 -0
- package/entity/EntityFactory.js +64 -41
- package/entity/EntityHelper.js +26 -9
- package/entity/EntityLoader.d.ts +5 -4
- package/entity/EntityLoader.js +73 -40
- package/entity/EntityRepository.d.ts +1 -1
- package/entity/Reference.d.ts +9 -7
- package/entity/Reference.js +33 -6
- package/entity/WrappedEntity.d.ts +2 -4
- package/entity/WrappedEntity.js +1 -5
- package/entity/defineEntity.d.ts +549 -0
- package/entity/defineEntity.js +529 -0
- package/entity/index.d.ts +3 -2
- package/entity/index.js +3 -2
- package/entity/utils.d.ts +7 -0
- package/entity/utils.js +16 -4
- package/entity/validators.d.ts +11 -0
- package/entity/validators.js +65 -0
- package/enums.d.ts +21 -6
- package/enums.js +14 -1
- package/errors.d.ts +6 -2
- package/errors.js +14 -9
- package/events/EventSubscriber.d.ts +3 -1
- package/hydration/Hydrator.js +1 -2
- package/hydration/ObjectHydrator.d.ts +4 -4
- package/hydration/ObjectHydrator.js +36 -25
- package/index.d.ts +2 -2
- package/index.js +1 -2
- package/logging/DefaultLogger.d.ts +1 -1
- package/logging/SimpleLogger.d.ts +1 -1
- package/metadata/EntitySchema.d.ts +9 -13
- package/metadata/EntitySchema.js +44 -26
- package/metadata/MetadataDiscovery.d.ts +6 -9
- package/metadata/MetadataDiscovery.js +167 -206
- package/metadata/MetadataProvider.d.ts +11 -2
- package/metadata/MetadataProvider.js +44 -2
- package/metadata/MetadataStorage.d.ts +1 -6
- package/metadata/MetadataStorage.js +6 -18
- package/metadata/MetadataValidator.d.ts +0 -7
- package/metadata/MetadataValidator.js +4 -13
- package/metadata/discover-entities.d.ts +5 -0
- package/metadata/discover-entities.js +40 -0
- package/metadata/index.d.ts +1 -1
- package/metadata/index.js +1 -1
- package/metadata/types.d.ts +480 -0
- package/metadata/types.js +1 -0
- package/naming-strategy/AbstractNamingStrategy.d.ts +5 -1
- package/naming-strategy/AbstractNamingStrategy.js +8 -2
- package/naming-strategy/NamingStrategy.d.ts +11 -1
- package/not-supported.d.ts +2 -0
- package/not-supported.js +4 -0
- package/package.json +18 -10
- package/platforms/ExceptionConverter.js +1 -1
- package/platforms/Platform.d.ts +6 -10
- package/platforms/Platform.js +14 -39
- package/serialization/EntitySerializer.d.ts +2 -0
- package/serialization/EntitySerializer.js +32 -14
- package/serialization/EntityTransformer.js +22 -12
- package/serialization/SerializationContext.js +16 -13
- package/types/ArrayType.d.ts +1 -1
- package/types/ArrayType.js +2 -3
- package/types/BigIntType.d.ts +8 -6
- package/types/BigIntType.js +1 -1
- package/types/BlobType.d.ts +0 -1
- package/types/BlobType.js +0 -3
- package/types/BooleanType.d.ts +2 -1
- package/types/BooleanType.js +3 -0
- package/types/DecimalType.d.ts +6 -4
- package/types/DecimalType.js +3 -3
- package/types/DoubleType.js +2 -2
- package/types/JsonType.d.ts +1 -1
- package/types/JsonType.js +7 -2
- package/types/TinyIntType.js +1 -1
- package/types/Type.d.ts +2 -1
- package/types/Type.js +1 -1
- package/types/Uint8ArrayType.d.ts +0 -1
- package/types/Uint8ArrayType.js +1 -4
- package/types/index.d.ts +1 -1
- package/typings.d.ts +113 -77
- package/typings.js +41 -35
- package/unit-of-work/ChangeSetComputer.d.ts +1 -3
- package/unit-of-work/ChangeSetComputer.js +11 -9
- package/unit-of-work/ChangeSetPersister.d.ts +5 -4
- package/unit-of-work/ChangeSetPersister.js +58 -20
- package/unit-of-work/UnitOfWork.d.ts +8 -1
- package/unit-of-work/UnitOfWork.js +115 -57
- package/utils/AbstractSchemaGenerator.d.ts +5 -5
- package/utils/AbstractSchemaGenerator.js +11 -9
- package/utils/Configuration.d.ts +757 -206
- package/utils/Configuration.js +139 -187
- package/utils/ConfigurationLoader.d.ts +1 -54
- package/utils/ConfigurationLoader.js +1 -352
- package/utils/Cursor.d.ts +3 -3
- package/utils/Cursor.js +4 -1
- package/utils/DataloaderUtils.d.ts +15 -5
- package/utils/DataloaderUtils.js +54 -8
- package/utils/EntityComparator.d.ts +8 -4
- package/utils/EntityComparator.js +111 -64
- package/utils/QueryHelper.d.ts +9 -1
- package/utils/QueryHelper.js +70 -9
- package/utils/RawQueryFragment.d.ts +36 -4
- package/utils/RawQueryFragment.js +35 -14
- package/utils/TransactionManager.d.ts +65 -0
- package/utils/TransactionManager.js +223 -0
- package/utils/Utils.d.ts +8 -97
- package/utils/Utils.js +88 -303
- package/utils/clone.js +2 -3
- package/utils/env-vars.d.ts +3 -0
- package/utils/env-vars.js +87 -0
- package/utils/fs-utils.d.ts +12 -0
- package/utils/fs-utils.js +96 -0
- package/utils/index.d.ts +2 -1
- package/utils/index.js +2 -1
- package/utils/upsert-utils.d.ts +7 -2
- package/utils/upsert-utils.js +55 -4
- package/decorators/Check.d.ts +0 -3
- package/decorators/Check.js +0 -13
- package/decorators/CreateRequestContext.d.ts +0 -3
- package/decorators/CreateRequestContext.js +0 -32
- package/decorators/Embeddable.d.ts +0 -8
- package/decorators/Embeddable.js +0 -11
- package/decorators/Embedded.d.ts +0 -18
- package/decorators/Embedded.js +0 -18
- package/decorators/Entity.d.ts +0 -18
- package/decorators/Entity.js +0 -12
- package/decorators/Enum.d.ts +0 -9
- package/decorators/Enum.js +0 -16
- package/decorators/Filter.d.ts +0 -2
- package/decorators/Filter.js +0 -8
- package/decorators/Formula.d.ts +0 -4
- package/decorators/Formula.js +0 -15
- package/decorators/Indexed.d.ts +0 -19
- package/decorators/Indexed.js +0 -20
- package/decorators/ManyToMany.d.ts +0 -40
- package/decorators/ManyToMany.js +0 -14
- package/decorators/ManyToOne.d.ts +0 -30
- package/decorators/ManyToOne.js +0 -14
- package/decorators/OneToMany.d.ts +0 -28
- package/decorators/OneToMany.js +0 -17
- package/decorators/OneToOne.d.ts +0 -24
- package/decorators/OneToOne.js +0 -7
- package/decorators/PrimaryKey.d.ts +0 -8
- package/decorators/PrimaryKey.js +0 -20
- package/decorators/Property.d.ts +0 -250
- package/decorators/Property.js +0 -32
- package/decorators/Transactional.d.ts +0 -13
- package/decorators/Transactional.js +0 -28
- package/decorators/hooks.d.ts +0 -16
- package/decorators/hooks.js +0 -47
- package/decorators/index.d.ts +0 -17
- package/decorators/index.js +0 -17
- package/entity/ArrayCollection.d.ts +0 -116
- package/entity/ArrayCollection.js +0 -402
- package/entity/EntityValidator.d.ts +0 -19
- package/entity/EntityValidator.js +0 -150
- package/metadata/ReflectMetadataProvider.d.ts +0 -8
- package/metadata/ReflectMetadataProvider.js +0 -44
- package/utils/resolveContextProvider.d.ts +0 -10
- package/utils/resolveContextProvider.js +0 -28
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import type { EntityMetadata } from '../typings.js';
|
|
2
2
|
import type { Logger } from '../logging/Logger.js';
|
|
3
|
+
import type { SyncCacheAdapter } from '../cache/CacheAdapter.js';
|
|
4
|
+
import type { Platform } from '../platforms/Platform.js';
|
|
3
5
|
export interface IConfiguration {
|
|
4
6
|
get(key: string, defaultValue?: any): any;
|
|
5
7
|
getLogger(): Logger;
|
|
8
|
+
getMetadataCacheAdapter(): SyncCacheAdapter;
|
|
9
|
+
getPlatform(): Platform;
|
|
6
10
|
}
|
|
7
|
-
export declare
|
|
11
|
+
export declare class MetadataProvider {
|
|
8
12
|
protected readonly config: IConfiguration;
|
|
9
13
|
constructor(config: IConfiguration);
|
|
10
|
-
|
|
14
|
+
loadEntityMetadata(meta: EntityMetadata): void;
|
|
11
15
|
loadFromCache(meta: EntityMetadata, cache: EntityMetadata): void;
|
|
16
|
+
static useCache(): boolean;
|
|
12
17
|
useCache(): boolean;
|
|
18
|
+
saveToCache(meta: EntityMetadata): void;
|
|
19
|
+
getCachedMetadata<T>(meta: Pick<EntityMetadata<T>, 'className' | 'path' | 'root'>, root: EntityMetadata<T>): EntityMetadata<T> | undefined;
|
|
20
|
+
combineCache(): void;
|
|
21
|
+
getCacheKey(meta: Pick<EntityMetadata, 'className' | 'path'>): string;
|
|
13
22
|
}
|
|
@@ -4,17 +4,59 @@ export class MetadataProvider {
|
|
|
4
4
|
constructor(config) {
|
|
5
5
|
this.config = config;
|
|
6
6
|
}
|
|
7
|
+
loadEntityMetadata(meta) {
|
|
8
|
+
for (const prop of meta.props) {
|
|
9
|
+
if (typeof prop.entity === 'string') {
|
|
10
|
+
prop.type = prop.entity;
|
|
11
|
+
}
|
|
12
|
+
else if (prop.entity) {
|
|
13
|
+
const tmp = prop.entity();
|
|
14
|
+
prop.type = Array.isArray(tmp) ? tmp.map(t => Utils.className(t)).sort().join(' | ') : Utils.className(tmp);
|
|
15
|
+
/* v8 ignore next */
|
|
16
|
+
}
|
|
17
|
+
else if (!prop.type && !(prop.enum && (prop.items?.length ?? 0) > 0)) {
|
|
18
|
+
throw new Error(`Please provide either 'type' or 'entity' attribute in ${meta.className}.${prop.name}.`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
7
22
|
loadFromCache(meta, cache) {
|
|
8
23
|
Object.values(cache.properties).forEach(prop => {
|
|
9
24
|
const metaProp = meta.properties[prop.name];
|
|
10
|
-
/* v8 ignore next
|
|
25
|
+
/* v8 ignore next */
|
|
11
26
|
if (metaProp?.enum && Array.isArray(metaProp.items)) {
|
|
12
27
|
delete prop.items;
|
|
13
28
|
}
|
|
14
29
|
});
|
|
15
30
|
Utils.mergeConfig(meta, cache);
|
|
16
31
|
}
|
|
32
|
+
static useCache() {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
17
35
|
useCache() {
|
|
18
|
-
return this.config.get('metadataCache').enabled ??
|
|
36
|
+
return this.config.get('metadataCache').enabled ?? MetadataProvider.useCache();
|
|
37
|
+
}
|
|
38
|
+
saveToCache(meta) {
|
|
39
|
+
//
|
|
40
|
+
}
|
|
41
|
+
getCachedMetadata(meta, root) {
|
|
42
|
+
if (!this.useCache()) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
const cache = meta.path && this.config.getMetadataCacheAdapter().get(this.getCacheKey(meta));
|
|
46
|
+
if (cache) {
|
|
47
|
+
this.loadFromCache(meta, cache);
|
|
48
|
+
meta.root = root;
|
|
49
|
+
}
|
|
50
|
+
return cache;
|
|
51
|
+
}
|
|
52
|
+
combineCache() {
|
|
53
|
+
const path = this.config.getMetadataCacheAdapter().combine?.();
|
|
54
|
+
// override the path in the options, so we can log it from the CLI in `cache:generate` command
|
|
55
|
+
if (path) {
|
|
56
|
+
this.config.get('metadataCache').combined = path;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
getCacheKey(meta) {
|
|
60
|
+
return meta.className;
|
|
19
61
|
}
|
|
20
62
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntityMetadata, type Dictionary, type
|
|
1
|
+
import { EntityMetadata, type Dictionary, type EntityName } from '../typings.js';
|
|
2
2
|
import type { EntityManager } from '../EntityManager.js';
|
|
3
3
|
export declare class MetadataStorage {
|
|
4
4
|
static readonly PATH_SYMBOL: unique symbol;
|
|
@@ -8,13 +8,8 @@ export declare class MetadataStorage {
|
|
|
8
8
|
static getMetadata(): Dictionary<EntityMetadata>;
|
|
9
9
|
static getMetadata<T = any>(entity: string, path: string): EntityMetadata<T>;
|
|
10
10
|
static isKnownEntity(name: string): boolean;
|
|
11
|
-
static getMetadataFromDecorator<T = any>(target: T & Dictionary & {
|
|
12
|
-
[MetadataStorage.PATH_SYMBOL]?: string;
|
|
13
|
-
}): EntityMetadata<T>;
|
|
14
|
-
static init(): MetadataStorage;
|
|
15
11
|
static clear(): void;
|
|
16
12
|
getAll(): Dictionary<EntityMetadata>;
|
|
17
|
-
getByDiscriminatorColumn<T>(meta: EntityMetadata<T>, data: EntityData<T>): EntityMetadata<T> | undefined;
|
|
18
13
|
get<T = any>(entityName: EntityName<T>, init?: boolean, validate?: boolean): EntityMetadata<T>;
|
|
19
14
|
find<T = any>(entityName: EntityName<T>): EntityMetadata<T> | undefined;
|
|
20
15
|
has(entity: string): boolean;
|
|
@@ -2,9 +2,14 @@ import { EntityMetadata } from '../typings.js';
|
|
|
2
2
|
import { Utils } from '../utils/Utils.js';
|
|
3
3
|
import { MetadataError } from '../errors.js';
|
|
4
4
|
import { EntityHelper } from '../entity/EntityHelper.js';
|
|
5
|
+
function getGlobalStorage(namespace) {
|
|
6
|
+
const key = `mikro-orm-${namespace}`;
|
|
7
|
+
globalThis[key] = globalThis[key] || {};
|
|
8
|
+
return globalThis[key];
|
|
9
|
+
}
|
|
5
10
|
export class MetadataStorage {
|
|
6
11
|
static PATH_SYMBOL = Symbol('MetadataStorage.PATH_SYMBOL');
|
|
7
|
-
static metadata =
|
|
12
|
+
static metadata = getGlobalStorage('metadata');
|
|
8
13
|
metadata;
|
|
9
14
|
constructor(metadata = {}) {
|
|
10
15
|
this.metadata = Utils.copy(metadata, false);
|
|
@@ -22,29 +27,12 @@ export class MetadataStorage {
|
|
|
22
27
|
static isKnownEntity(name) {
|
|
23
28
|
return !!Object.values(this.metadata).find(meta => meta.className === name);
|
|
24
29
|
}
|
|
25
|
-
static getMetadataFromDecorator(target) {
|
|
26
|
-
if (!Object.hasOwn(target, MetadataStorage.PATH_SYMBOL)) {
|
|
27
|
-
Object.defineProperty(target, MetadataStorage.PATH_SYMBOL, { value: Utils.lookupPathFromDecorator(target.name), writable: true });
|
|
28
|
-
}
|
|
29
|
-
return MetadataStorage.getMetadata(target.name, target[MetadataStorage.PATH_SYMBOL]);
|
|
30
|
-
}
|
|
31
|
-
static init() {
|
|
32
|
-
return new MetadataStorage(MetadataStorage.metadata);
|
|
33
|
-
}
|
|
34
30
|
static clear() {
|
|
35
31
|
Object.keys(this.metadata).forEach(k => delete this.metadata[k]);
|
|
36
32
|
}
|
|
37
33
|
getAll() {
|
|
38
34
|
return this.metadata;
|
|
39
35
|
}
|
|
40
|
-
getByDiscriminatorColumn(meta, data) {
|
|
41
|
-
const value = data[meta.root.discriminatorColumn];
|
|
42
|
-
if (!value) {
|
|
43
|
-
return undefined;
|
|
44
|
-
}
|
|
45
|
-
const type = meta.root.discriminatorMap[value];
|
|
46
|
-
return this.metadata[type];
|
|
47
|
-
}
|
|
48
36
|
get(entityName, init = false, validate = true) {
|
|
49
37
|
entityName = Utils.className(entityName);
|
|
50
38
|
if (validate && !init && !this.has(entityName)) {
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import type { EntityMetadata } from '../typings.js';
|
|
2
2
|
import { type MetadataDiscoveryOptions } from '../utils/Configuration.js';
|
|
3
|
-
import { ReferenceKind } from '../enums.js';
|
|
4
3
|
import type { MetadataStorage } from './MetadataStorage.js';
|
|
5
4
|
/**
|
|
6
5
|
* @internal
|
|
7
6
|
*/
|
|
8
7
|
export declare class MetadataValidator {
|
|
9
|
-
/**
|
|
10
|
-
* Validate there is only one property decorator. This disallows using `@Property()` together with e.g. `@ManyToOne()`
|
|
11
|
-
* on the same property. One should use only `@ManyToOne()` in such case.
|
|
12
|
-
* We allow the existence of the property in metadata if the reference type is the same, this should allow things like HMR to work.
|
|
13
|
-
*/
|
|
14
|
-
static validateSingleDecorator(meta: EntityMetadata, propertyName: string, reference: ReferenceKind): void;
|
|
15
8
|
validateEntityDefinition<T>(metadata: MetadataStorage, name: string, options: MetadataDiscoveryOptions): void;
|
|
16
9
|
validateDiscovered(discovered: EntityMetadata[], options: MetadataDiscoveryOptions): void;
|
|
17
10
|
private validateReference;
|
|
@@ -5,16 +5,6 @@ import { ReferenceKind } from '../enums.js';
|
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
7
|
export class MetadataValidator {
|
|
8
|
-
/**
|
|
9
|
-
* Validate there is only one property decorator. This disallows using `@Property()` together with e.g. `@ManyToOne()`
|
|
10
|
-
* on the same property. One should use only `@ManyToOne()` in such case.
|
|
11
|
-
* We allow the existence of the property in metadata if the reference type is the same, this should allow things like HMR to work.
|
|
12
|
-
*/
|
|
13
|
-
static validateSingleDecorator(meta, propertyName, reference) {
|
|
14
|
-
if (meta.properties[propertyName] && meta.properties[propertyName].kind !== reference) {
|
|
15
|
-
throw MetadataError.multipleDecorators(meta.className, propertyName);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
8
|
validateEntityDefinition(metadata, name, options) {
|
|
19
9
|
const meta = metadata.get(name);
|
|
20
10
|
if (meta.virtual || meta.expression) {
|
|
@@ -100,14 +90,15 @@ export class MetadataValidator {
|
|
|
100
90
|
if (!prop.type) {
|
|
101
91
|
throw MetadataError.fromWrongTypeDefinition(meta, prop);
|
|
102
92
|
}
|
|
93
|
+
const targetMeta = metadata.find(prop.type);
|
|
103
94
|
// references do have type of known entity
|
|
104
|
-
if (!
|
|
95
|
+
if (!targetMeta) {
|
|
105
96
|
throw MetadataError.fromWrongTypeDefinition(meta, prop);
|
|
106
97
|
}
|
|
107
|
-
if (
|
|
98
|
+
if (targetMeta.abstract && !targetMeta.discriminatorColumn && !targetMeta.embeddable) {
|
|
108
99
|
throw MetadataError.targetIsAbstract(meta, prop);
|
|
109
100
|
}
|
|
110
|
-
if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && prop.persist === false &&
|
|
101
|
+
if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && prop.persist === false && targetMeta.compositePK && options.checkNonPersistentCompositeProps) {
|
|
111
102
|
throw MetadataError.nonPersistentCompositeProp(meta, prop);
|
|
112
103
|
}
|
|
113
104
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { basename } from 'node:path';
|
|
2
|
+
import { fs } from '../utils/fs-utils.js';
|
|
3
|
+
import { Utils } from '../utils/Utils.js';
|
|
4
|
+
import { MetadataStorage } from './MetadataStorage.js';
|
|
5
|
+
import { EntitySchema } from './EntitySchema.js';
|
|
6
|
+
async function getEntityClassOrSchema(filepath, allTargets, baseDir) {
|
|
7
|
+
const path = Utils.normalizePath(baseDir, filepath);
|
|
8
|
+
const exports = await Utils.dynamicImport(path);
|
|
9
|
+
const targets = Object.values(exports);
|
|
10
|
+
// ignore class implementations that are linked from an EntitySchema
|
|
11
|
+
for (const item of targets) {
|
|
12
|
+
if (item instanceof EntitySchema) {
|
|
13
|
+
for (const item2 of targets) {
|
|
14
|
+
if (item.meta.class === item2) {
|
|
15
|
+
targets.splice(targets.indexOf(item2), 1);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
for (const item of targets) {
|
|
21
|
+
const validTarget = item instanceof EntitySchema || (item instanceof Function && MetadataStorage.isKnownEntity(item.name));
|
|
22
|
+
if (validTarget && !allTargets.has(item)) {
|
|
23
|
+
allTargets.set(item, path);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export async function discoverEntities(paths, options) {
|
|
28
|
+
paths = Utils.asArray(paths).map(path => Utils.normalizePath(path));
|
|
29
|
+
const baseDir = options?.baseDir ?? process.cwd();
|
|
30
|
+
const files = fs.glob(paths, Utils.normalizePath(baseDir));
|
|
31
|
+
const found = new Map();
|
|
32
|
+
for (const filepath of files) {
|
|
33
|
+
const filename = basename(filepath);
|
|
34
|
+
if (!filename.match(/\.[cm]?[jt]s$/) || filename.match(/\.d\.[cm]?ts/)) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
await getEntityClassOrSchema(filepath, found, baseDir);
|
|
38
|
+
}
|
|
39
|
+
return found.keys();
|
|
40
|
+
}
|
package/metadata/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export * from './types.js';
|
|
1
2
|
export * from './EntitySchema.js';
|
|
2
3
|
export * from './MetadataDiscovery.js';
|
|
3
4
|
export * from './MetadataStorage.js';
|
|
4
5
|
export * from './MetadataProvider.js';
|
|
5
6
|
export * from './MetadataValidator.js';
|
|
6
|
-
export * from './ReflectMetadataProvider.js';
|
package/metadata/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export * from './types.js';
|
|
1
2
|
export * from './EntitySchema.js';
|
|
2
3
|
export * from './MetadataDiscovery.js';
|
|
3
4
|
export * from './MetadataStorage.js';
|
|
4
5
|
export * from './MetadataProvider.js';
|
|
5
6
|
export * from './MetadataValidator.js';
|
|
6
|
-
export * from './ReflectMetadataProvider.js';
|