@mikro-orm/core 7.0.0-dev.1 → 7.0.0-dev.100
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 +96 -58
- package/EntityManager.js +465 -395
- package/MikroORM.d.ts +45 -35
- package/MikroORM.js +109 -160
- package/README.md +3 -2
- package/cache/CacheAdapter.js +1 -2
- package/cache/FileCacheAdapter.d.ts +2 -2
- package/cache/FileCacheAdapter.js +20 -27
- package/cache/GeneratedCacheAdapter.d.ts +2 -3
- package/cache/GeneratedCacheAdapter.js +1 -7
- package/cache/MemoryCacheAdapter.d.ts +1 -1
- package/cache/MemoryCacheAdapter.js +1 -5
- package/cache/NullCacheAdapter.d.ts +1 -1
- package/cache/NullCacheAdapter.js +1 -5
- package/cache/index.d.ts +4 -5
- package/cache/index.js +4 -21
- package/connections/Connection.d.ts +22 -14
- package/connections/Connection.js +27 -23
- package/connections/index.d.ts +1 -1
- package/connections/index.js +1 -17
- package/drivers/DatabaseDriver.d.ts +25 -15
- package/drivers/DatabaseDriver.js +77 -64
- package/drivers/IDatabaseDriver.d.ts +40 -16
- package/drivers/IDatabaseDriver.js +1 -4
- package/drivers/index.d.ts +2 -2
- package/drivers/index.js +2 -18
- package/entity/BaseEntity.d.ts +6 -7
- package/entity/BaseEntity.js +16 -23
- package/entity/Collection.d.ts +98 -34
- package/entity/Collection.js +466 -131
- package/entity/EntityAssigner.d.ts +3 -3
- package/entity/EntityAssigner.js +67 -64
- package/entity/EntityFactory.d.ts +10 -3
- package/entity/EntityFactory.js +112 -91
- package/entity/EntityHelper.d.ts +2 -2
- package/entity/EntityHelper.js +66 -53
- package/entity/EntityIdentifier.d.ts +1 -1
- package/entity/EntityIdentifier.js +1 -5
- package/entity/EntityLoader.d.ts +8 -7
- package/entity/EntityLoader.js +161 -128
- package/entity/EntityRepository.d.ts +8 -8
- package/entity/EntityRepository.js +7 -11
- package/entity/Reference.d.ts +10 -13
- package/entity/Reference.js +64 -46
- package/entity/WrappedEntity.d.ts +12 -17
- package/entity/WrappedEntity.js +22 -31
- package/entity/defineEntity.d.ts +568 -0
- package/entity/defineEntity.js +529 -0
- package/entity/index.d.ts +14 -13
- package/entity/index.js +14 -29
- package/entity/utils.d.ts +8 -1
- package/entity/utils.js +22 -13
- package/entity/validators.d.ts +11 -0
- package/entity/validators.js +65 -0
- package/entity/wrap.d.ts +1 -1
- package/entity/wrap.js +2 -6
- package/enums.d.ts +24 -9
- package/enums.js +50 -41
- package/errors.d.ts +11 -3
- package/errors.js +42 -32
- package/events/EventManager.d.ts +5 -4
- package/events/EventManager.js +26 -22
- package/events/EventSubscriber.d.ts +8 -5
- package/events/EventSubscriber.js +1 -2
- package/events/TransactionEventBroadcaster.d.ts +3 -3
- package/events/TransactionEventBroadcaster.js +1 -5
- package/events/index.d.ts +3 -3
- package/events/index.js +3 -19
- package/exceptions.js +18 -39
- package/hydration/Hydrator.d.ts +5 -5
- package/hydration/Hydrator.js +2 -6
- package/hydration/ObjectHydrator.d.ts +7 -7
- package/hydration/ObjectHydrator.js +58 -50
- package/hydration/index.d.ts +2 -2
- package/hydration/index.js +2 -18
- package/index.d.ts +21 -21
- package/index.js +20 -46
- package/logging/DefaultLogger.d.ts +2 -2
- package/logging/DefaultLogger.js +10 -13
- package/logging/Logger.d.ts +1 -1
- package/logging/Logger.js +1 -2
- package/logging/SimpleLogger.d.ts +3 -3
- package/logging/SimpleLogger.js +2 -6
- package/logging/colors.js +1 -5
- package/logging/index.d.ts +5 -4
- package/logging/index.js +5 -20
- package/logging/inspect.d.ts +2 -0
- package/logging/inspect.js +16 -0
- package/metadata/EntitySchema.d.ts +14 -10
- package/metadata/EntitySchema.js +78 -64
- package/metadata/MetadataDiscovery.d.ts +11 -14
- package/metadata/MetadataDiscovery.js +278 -317
- package/metadata/MetadataProvider.d.ts +13 -4
- package/metadata/MetadataProvider.js +47 -8
- package/metadata/MetadataStorage.d.ts +2 -7
- package/metadata/MetadataStorage.js +19 -35
- package/metadata/MetadataValidator.d.ts +3 -10
- package/metadata/MetadataValidator.js +51 -64
- package/metadata/discover-entities.d.ts +5 -0
- package/metadata/discover-entities.js +40 -0
- package/metadata/index.d.ts +6 -6
- package/metadata/index.js +6 -22
- package/metadata/types.d.ts +480 -0
- package/metadata/types.js +1 -0
- package/naming-strategy/AbstractNamingStrategy.d.ts +7 -3
- package/naming-strategy/AbstractNamingStrategy.js +11 -9
- package/naming-strategy/EntityCaseNamingStrategy.d.ts +1 -1
- package/naming-strategy/EntityCaseNamingStrategy.js +2 -6
- package/naming-strategy/MongoNamingStrategy.d.ts +1 -1
- package/naming-strategy/MongoNamingStrategy.js +2 -6
- package/naming-strategy/NamingStrategy.d.ts +12 -2
- package/naming-strategy/NamingStrategy.js +1 -2
- package/naming-strategy/UnderscoreNamingStrategy.d.ts +1 -1
- package/naming-strategy/UnderscoreNamingStrategy.js +2 -6
- package/naming-strategy/index.d.ts +5 -5
- package/naming-strategy/index.js +5 -21
- package/not-supported.d.ts +2 -0
- package/not-supported.js +4 -0
- package/package.json +19 -20
- package/platforms/ExceptionConverter.d.ts +2 -2
- package/platforms/ExceptionConverter.js +4 -8
- package/platforms/Platform.d.ts +15 -22
- package/platforms/Platform.js +58 -88
- package/platforms/index.d.ts +2 -2
- package/platforms/index.js +2 -18
- package/serialization/EntitySerializer.d.ts +4 -2
- package/serialization/EntitySerializer.js +64 -51
- package/serialization/EntityTransformer.d.ts +1 -1
- package/serialization/EntityTransformer.js +48 -42
- package/serialization/SerializationContext.d.ts +2 -2
- package/serialization/SerializationContext.js +24 -25
- package/serialization/index.d.ts +3 -3
- package/serialization/index.js +3 -19
- package/types/ArrayType.d.ts +3 -3
- package/types/ArrayType.js +6 -11
- package/types/BigIntType.d.ts +12 -9
- package/types/BigIntType.js +6 -6
- package/types/BlobType.d.ts +3 -4
- package/types/BlobType.js +2 -11
- package/types/BooleanType.d.ts +5 -4
- package/types/BooleanType.js +5 -6
- package/types/CharacterType.d.ts +3 -3
- package/types/CharacterType.js +2 -6
- package/types/DateTimeType.d.ts +3 -3
- package/types/DateTimeType.js +2 -6
- package/types/DateType.d.ts +3 -3
- package/types/DateType.js +2 -6
- package/types/DecimalType.d.ts +9 -7
- package/types/DecimalType.js +5 -8
- package/types/DoubleType.d.ts +3 -3
- package/types/DoubleType.js +4 -7
- package/types/EnumArrayType.d.ts +4 -4
- package/types/EnumArrayType.js +4 -10
- package/types/EnumType.d.ts +3 -3
- package/types/EnumType.js +2 -6
- package/types/FloatType.d.ts +3 -3
- package/types/FloatType.js +2 -6
- package/types/IntegerType.d.ts +3 -3
- package/types/IntegerType.js +2 -6
- package/types/IntervalType.d.ts +3 -3
- package/types/IntervalType.js +2 -6
- package/types/JsonType.d.ts +4 -4
- package/types/JsonType.js +9 -8
- package/types/MediumIntType.d.ts +3 -3
- package/types/MediumIntType.js +2 -6
- package/types/SmallIntType.d.ts +3 -3
- package/types/SmallIntType.js +2 -6
- package/types/StringType.d.ts +3 -3
- package/types/StringType.js +2 -6
- package/types/TextType.d.ts +3 -3
- package/types/TextType.js +2 -6
- package/types/TimeType.d.ts +3 -3
- package/types/TimeType.js +4 -8
- package/types/TinyIntType.d.ts +3 -3
- package/types/TinyIntType.js +3 -6
- package/types/Type.d.ts +4 -6
- package/types/Type.js +6 -10
- package/types/Uint8ArrayType.d.ts +3 -4
- package/types/Uint8ArrayType.js +3 -12
- package/types/UnknownType.d.ts +3 -3
- package/types/UnknownType.js +2 -6
- package/types/UuidType.d.ts +3 -3
- package/types/UuidType.js +2 -6
- package/types/index.d.ts +25 -25
- package/types/index.js +52 -79
- package/typings.d.ts +134 -93
- package/typings.js +67 -65
- package/unit-of-work/ChangeSet.d.ts +1 -4
- package/unit-of-work/ChangeSet.js +13 -17
- package/unit-of-work/ChangeSetComputer.d.ts +8 -9
- package/unit-of-work/ChangeSetComputer.js +36 -38
- package/unit-of-work/ChangeSetPersister.d.ts +11 -9
- package/unit-of-work/ChangeSetPersister.js +100 -65
- package/unit-of-work/CommitOrderCalculator.d.ts +1 -1
- package/unit-of-work/CommitOrderCalculator.js +6 -10
- package/unit-of-work/IdentityMap.d.ts +1 -1
- package/unit-of-work/IdentityMap.js +1 -5
- package/unit-of-work/UnitOfWork.d.ts +16 -8
- package/unit-of-work/UnitOfWork.js +266 -209
- package/unit-of-work/index.d.ts +6 -6
- package/unit-of-work/index.js +6 -22
- package/utils/AbstractSchemaGenerator.d.ts +11 -11
- package/utils/AbstractSchemaGenerator.js +21 -20
- package/utils/Configuration.d.ts +774 -224
- package/utils/Configuration.js +166 -216
- package/utils/ConfigurationLoader.d.ts +1 -53
- package/utils/ConfigurationLoader.js +1 -367
- package/utils/Cursor.d.ts +6 -9
- package/utils/Cursor.js +25 -25
- package/utils/DataloaderUtils.d.ts +18 -8
- package/utils/DataloaderUtils.js +63 -21
- package/utils/EntityComparator.d.ts +9 -5
- package/utils/EntityComparator.js +155 -108
- package/utils/NullHighlighter.d.ts +1 -1
- package/utils/NullHighlighter.js +1 -5
- package/utils/QueryHelper.d.ts +12 -4
- package/utils/QueryHelper.js +110 -53
- package/utils/RawQueryFragment.d.ts +37 -14
- package/utils/RawQueryFragment.js +50 -33
- package/utils/RequestContext.d.ts +2 -2
- package/utils/RequestContext.js +3 -7
- package/utils/TransactionContext.d.ts +1 -1
- package/utils/TransactionContext.js +4 -8
- package/utils/TransactionManager.d.ts +65 -0
- package/utils/TransactionManager.js +223 -0
- package/utils/Utils.d.ts +16 -100
- package/utils/Utils.js +114 -332
- package/utils/clone.js +7 -11
- 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 +97 -0
- package/utils/index.d.ts +14 -13
- package/utils/index.js +14 -29
- package/utils/upsert-utils.d.ts +8 -3
- package/utils/upsert-utils.js +57 -10
- package/decorators/Check.d.ts +0 -3
- package/decorators/Check.js +0 -16
- package/decorators/CreateRequestContext.d.ts +0 -3
- package/decorators/CreateRequestContext.js +0 -33
- package/decorators/Embeddable.d.ts +0 -8
- package/decorators/Embeddable.js +0 -14
- package/decorators/Embedded.d.ts +0 -18
- package/decorators/Embedded.js +0 -20
- package/decorators/Entity.d.ts +0 -18
- package/decorators/Entity.js +0 -16
- package/decorators/Enum.d.ts +0 -9
- package/decorators/Enum.js +0 -19
- package/decorators/Filter.d.ts +0 -2
- package/decorators/Filter.js +0 -11
- package/decorators/Formula.d.ts +0 -5
- package/decorators/Formula.js +0 -18
- package/decorators/Indexed.d.ts +0 -17
- package/decorators/Indexed.js +0 -24
- package/decorators/ManyToMany.d.ts +0 -40
- package/decorators/ManyToMany.js +0 -16
- package/decorators/ManyToOne.d.ts +0 -30
- package/decorators/ManyToOne.js +0 -16
- package/decorators/OneToMany.d.ts +0 -28
- package/decorators/OneToMany.js +0 -20
- package/decorators/OneToOne.d.ts +0 -24
- package/decorators/OneToOne.js +0 -10
- package/decorators/PrimaryKey.d.ts +0 -9
- package/decorators/PrimaryKey.js +0 -23
- package/decorators/Property.d.ts +0 -250
- package/decorators/Property.js +0 -34
- package/decorators/Transactional.d.ts +0 -13
- package/decorators/Transactional.js +0 -31
- package/decorators/hooks.d.ts +0 -16
- package/decorators/hooks.js +0 -59
- package/decorators/index.d.ts +0 -17
- package/decorators/index.js +0 -36
- package/entity/ArrayCollection.d.ts +0 -116
- package/entity/ArrayCollection.js +0 -399
- package/entity/EntityValidator.d.ts +0 -19
- package/entity/EntityValidator.js +0 -154
- package/index.mjs +0 -199
- package/metadata/ReflectMetadataProvider.d.ts +0 -8
- package/metadata/ReflectMetadataProvider.js +0 -48
- package/utils/resolveContextProvider.d.ts +0 -10
- package/utils/resolveContextProvider.js +0 -31
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
import type { EntityMetadata } from '../typings';
|
|
2
|
-
import type { Logger } from '../logging/Logger';
|
|
1
|
+
import type { EntityMetadata } from '../typings.js';
|
|
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
|
}
|
|
@@ -1,23 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.MetadataProvider = void 0;
|
|
4
|
-
const Utils_1 = require("../utils/Utils");
|
|
5
|
-
class MetadataProvider {
|
|
1
|
+
import { Utils } from '../utils/Utils.js';
|
|
2
|
+
export class MetadataProvider {
|
|
6
3
|
config;
|
|
7
4
|
constructor(config) {
|
|
8
5
|
this.config = config;
|
|
9
6
|
}
|
|
7
|
+
loadEntityMetadata(meta) {
|
|
8
|
+
for (const prop of meta.props) {
|
|
9
|
+
/* v8 ignore next */
|
|
10
|
+
if (typeof prop.entity === 'string') {
|
|
11
|
+
prop.type = prop.entity;
|
|
12
|
+
}
|
|
13
|
+
else if (prop.entity) {
|
|
14
|
+
const tmp = prop.entity();
|
|
15
|
+
prop.type = Array.isArray(tmp) ? tmp.map(t => Utils.className(t)).sort().join(' | ') : Utils.className(tmp);
|
|
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
|
+
}
|
|
10
22
|
loadFromCache(meta, cache) {
|
|
11
23
|
Object.values(cache.properties).forEach(prop => {
|
|
12
24
|
const metaProp = meta.properties[prop.name];
|
|
25
|
+
/* v8 ignore next */
|
|
13
26
|
if (metaProp?.enum && Array.isArray(metaProp.items)) {
|
|
14
27
|
delete prop.items;
|
|
15
28
|
}
|
|
16
29
|
});
|
|
17
|
-
|
|
30
|
+
Utils.mergeConfig(meta, cache);
|
|
31
|
+
}
|
|
32
|
+
static useCache() {
|
|
33
|
+
return false;
|
|
18
34
|
}
|
|
19
35
|
useCache() {
|
|
20
|
-
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;
|
|
21
61
|
}
|
|
22
62
|
}
|
|
23
|
-
exports.MetadataProvider = MetadataProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EntityMetadata, type Dictionary, type
|
|
2
|
-
import type { EntityManager } from '../EntityManager';
|
|
1
|
+
import { EntityMetadata, type Dictionary, type EntityName } from '../typings.js';
|
|
2
|
+
import type { EntityManager } from '../EntityManager.js';
|
|
3
3
|
export declare class MetadataStorage {
|
|
4
4
|
static readonly PATH_SYMBOL: unique symbol;
|
|
5
5
|
private static readonly metadata;
|
|
@@ -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;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { EntityMetadata } from '../typings.js';
|
|
2
|
+
import { Utils } from '../utils/Utils.js';
|
|
3
|
+
import { MetadataError } from '../errors.js';
|
|
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
|
+
}
|
|
10
|
+
export class MetadataStorage {
|
|
9
11
|
static PATH_SYMBOL = Symbol('MetadataStorage.PATH_SYMBOL');
|
|
10
|
-
static metadata =
|
|
12
|
+
static metadata = getGlobalStorage('metadata');
|
|
11
13
|
metadata;
|
|
12
14
|
constructor(metadata = {}) {
|
|
13
|
-
this.metadata =
|
|
15
|
+
this.metadata = Utils.copy(metadata, false);
|
|
14
16
|
}
|
|
15
17
|
static getMetadata(entity, path) {
|
|
16
|
-
const key = entity && path ? entity + '-' +
|
|
18
|
+
const key = entity && path ? entity + '-' + Utils.hash(path) : null;
|
|
17
19
|
if (key && !MetadataStorage.metadata[key]) {
|
|
18
|
-
MetadataStorage.metadata[key] = new
|
|
20
|
+
MetadataStorage.metadata[key] = new EntityMetadata({ className: entity, path });
|
|
19
21
|
}
|
|
20
22
|
if (key) {
|
|
21
23
|
return MetadataStorage.metadata[key];
|
|
@@ -25,36 +27,19 @@ class MetadataStorage {
|
|
|
25
27
|
static isKnownEntity(name) {
|
|
26
28
|
return !!Object.values(this.metadata).find(meta => meta.className === name);
|
|
27
29
|
}
|
|
28
|
-
static getMetadataFromDecorator(target) {
|
|
29
|
-
if (!Object.hasOwn(target, MetadataStorage.PATH_SYMBOL)) {
|
|
30
|
-
Object.defineProperty(target, MetadataStorage.PATH_SYMBOL, { value: Utils_1.Utils.lookupPathFromDecorator(target.name), writable: true });
|
|
31
|
-
}
|
|
32
|
-
return MetadataStorage.getMetadata(target.name, target[MetadataStorage.PATH_SYMBOL]);
|
|
33
|
-
}
|
|
34
|
-
static init() {
|
|
35
|
-
return new MetadataStorage(MetadataStorage.metadata);
|
|
36
|
-
}
|
|
37
30
|
static clear() {
|
|
38
31
|
Object.keys(this.metadata).forEach(k => delete this.metadata[k]);
|
|
39
32
|
}
|
|
40
33
|
getAll() {
|
|
41
34
|
return this.metadata;
|
|
42
35
|
}
|
|
43
|
-
getByDiscriminatorColumn(meta, data) {
|
|
44
|
-
const value = data[meta.root.discriminatorColumn];
|
|
45
|
-
if (!value) {
|
|
46
|
-
return undefined;
|
|
47
|
-
}
|
|
48
|
-
const type = meta.root.discriminatorMap[value];
|
|
49
|
-
return this.metadata[type];
|
|
50
|
-
}
|
|
51
36
|
get(entityName, init = false, validate = true) {
|
|
52
|
-
entityName =
|
|
37
|
+
entityName = Utils.className(entityName);
|
|
53
38
|
if (validate && !init && !this.has(entityName)) {
|
|
54
|
-
throw
|
|
39
|
+
throw MetadataError.missingMetadata(entityName);
|
|
55
40
|
}
|
|
56
41
|
if (init && !this.has(entityName)) {
|
|
57
|
-
this.metadata[entityName] = new
|
|
42
|
+
this.metadata[entityName] = new EntityMetadata();
|
|
58
43
|
}
|
|
59
44
|
return this.metadata[entityName];
|
|
60
45
|
}
|
|
@@ -62,7 +47,7 @@ class MetadataStorage {
|
|
|
62
47
|
if (!entityName) {
|
|
63
48
|
return;
|
|
64
49
|
}
|
|
65
|
-
entityName =
|
|
50
|
+
entityName = Utils.className(entityName);
|
|
66
51
|
return this.metadata[entityName];
|
|
67
52
|
}
|
|
68
53
|
has(entity) {
|
|
@@ -77,7 +62,7 @@ class MetadataStorage {
|
|
|
77
62
|
decorate(em) {
|
|
78
63
|
Object.values(this.metadata)
|
|
79
64
|
.filter(meta => meta.prototype)
|
|
80
|
-
.forEach(meta =>
|
|
65
|
+
.forEach(meta => EntityHelper.decorate(meta, em));
|
|
81
66
|
}
|
|
82
67
|
*[Symbol.iterator]() {
|
|
83
68
|
for (const meta of Object.values(this.metadata)) {
|
|
@@ -85,4 +70,3 @@ class MetadataStorage {
|
|
|
85
70
|
}
|
|
86
71
|
}
|
|
87
72
|
}
|
|
88
|
-
exports.MetadataStorage = MetadataStorage;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import type { EntityMetadata } from '../typings';
|
|
2
|
-
import { type MetadataDiscoveryOptions } from '../utils';
|
|
3
|
-
import {
|
|
4
|
-
import type { MetadataStorage } from './MetadataStorage';
|
|
1
|
+
import type { EntityMetadata } from '../typings.js';
|
|
2
|
+
import { type MetadataDiscoveryOptions } from '../utils/Configuration.js';
|
|
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;
|
|
@@ -1,73 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const utils_1 = require("../utils");
|
|
5
|
-
const errors_1 = require("../errors");
|
|
6
|
-
const enums_1 = require("../enums");
|
|
1
|
+
import { Utils } from '../utils/Utils.js';
|
|
2
|
+
import { MetadataError } from '../errors.js';
|
|
3
|
+
import { ReferenceKind } from '../enums.js';
|
|
7
4
|
/**
|
|
8
5
|
* @internal
|
|
9
6
|
*/
|
|
10
|
-
class MetadataValidator {
|
|
11
|
-
/**
|
|
12
|
-
* Validate there is only one property decorator. This disallows using `@Property()` together with e.g. `@ManyToOne()`
|
|
13
|
-
* on the same property. One should use only `@ManyToOne()` in such case.
|
|
14
|
-
* We allow the existence of the property in metadata if the reference type is the same, this should allow things like HMR to work.
|
|
15
|
-
*/
|
|
16
|
-
static validateSingleDecorator(meta, propertyName, reference) {
|
|
17
|
-
if (meta.properties[propertyName] && meta.properties[propertyName].kind !== reference) {
|
|
18
|
-
throw errors_1.MetadataError.multipleDecorators(meta.className, propertyName);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
7
|
+
export class MetadataValidator {
|
|
21
8
|
validateEntityDefinition(metadata, name, options) {
|
|
22
9
|
const meta = metadata.get(name);
|
|
23
10
|
if (meta.virtual || meta.expression) {
|
|
24
|
-
for (const prop of
|
|
25
|
-
if (![
|
|
26
|
-
throw new
|
|
11
|
+
for (const prop of Utils.values(meta.properties)) {
|
|
12
|
+
if (![ReferenceKind.SCALAR, ReferenceKind.EMBEDDED, ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind)) {
|
|
13
|
+
throw new MetadataError(`Only scalars, embedded properties and to-many relations are allowed inside virtual entity. Found '${prop.kind}' in ${meta.className}.${prop.name}`);
|
|
27
14
|
}
|
|
28
15
|
if (prop.primary) {
|
|
29
|
-
throw new
|
|
16
|
+
throw new MetadataError(`Virtual entity ${meta.className} cannot have primary key ${meta.className}.${prop.name}`);
|
|
30
17
|
}
|
|
31
18
|
}
|
|
32
19
|
return;
|
|
33
20
|
}
|
|
34
21
|
// entities have PK
|
|
35
22
|
if (!meta.embeddable && (!meta.primaryKeys || meta.primaryKeys.length === 0)) {
|
|
36
|
-
throw
|
|
23
|
+
throw MetadataError.fromMissingPrimaryKey(meta);
|
|
37
24
|
}
|
|
38
25
|
this.validateVersionField(meta);
|
|
39
26
|
this.validateDuplicateFieldNames(meta, options);
|
|
40
27
|
this.validateIndexes(meta, meta.indexes ?? [], 'index');
|
|
41
28
|
this.validateIndexes(meta, meta.uniques ?? [], 'unique');
|
|
42
|
-
for (const prop of
|
|
43
|
-
if (prop.kind !==
|
|
29
|
+
for (const prop of Utils.values(meta.properties)) {
|
|
30
|
+
if (prop.kind !== ReferenceKind.SCALAR) {
|
|
44
31
|
this.validateReference(meta, prop, metadata, options);
|
|
45
32
|
this.validateBidirectional(meta, prop, metadata);
|
|
46
33
|
}
|
|
47
34
|
else if (metadata.has(prop.type)) {
|
|
48
|
-
throw
|
|
35
|
+
throw MetadataError.propertyTargetsEntityType(meta, prop, metadata.get(prop.type));
|
|
49
36
|
}
|
|
50
37
|
}
|
|
51
38
|
}
|
|
52
39
|
validateDiscovered(discovered, options) {
|
|
53
40
|
if (discovered.length === 0 && options.warnWhenNoEntities) {
|
|
54
|
-
throw
|
|
41
|
+
throw MetadataError.noEntityDiscovered();
|
|
55
42
|
}
|
|
56
|
-
const duplicates =
|
|
43
|
+
const duplicates = Utils.findDuplicates(discovered.map(meta => meta.className));
|
|
57
44
|
if (duplicates.length > 0 && options.checkDuplicateEntities) {
|
|
58
|
-
throw
|
|
45
|
+
throw MetadataError.duplicateEntityDiscovered(duplicates);
|
|
59
46
|
}
|
|
60
47
|
const tableNames = discovered.filter(meta => !meta.abstract && meta === meta.root && (meta.tableName || meta.collection) && meta.schema !== '*');
|
|
61
|
-
const duplicateTableNames =
|
|
48
|
+
const duplicateTableNames = Utils.findDuplicates(tableNames.map(meta => {
|
|
62
49
|
const tableName = meta.tableName || meta.collection;
|
|
63
50
|
return (meta.schema ? '.' + meta.schema : '') + tableName;
|
|
64
51
|
}));
|
|
65
52
|
if (duplicateTableNames.length > 0 && options.checkDuplicateTableNames && options.checkDuplicateEntities) {
|
|
66
|
-
throw
|
|
53
|
+
throw MetadataError.duplicateEntityDiscovered(duplicateTableNames, 'table names');
|
|
67
54
|
}
|
|
68
55
|
// validate we found at least one entity (not just abstract/base entities)
|
|
69
56
|
if (discovered.filter(meta => meta.name).length === 0 && options.warnWhenNoEntities) {
|
|
70
|
-
throw
|
|
57
|
+
throw MetadataError.onlyAbstractEntitiesDiscovered();
|
|
71
58
|
}
|
|
72
59
|
const unwrap = (type) => type
|
|
73
60
|
.replace(/Array<(.*)>/, '$1') // unwrap array
|
|
@@ -75,15 +62,15 @@ class MetadataValidator {
|
|
|
75
62
|
.replace(/\((.*)\)/, '$1'); // unwrap union types
|
|
76
63
|
const name = (p) => {
|
|
77
64
|
if (typeof p === 'function') {
|
|
78
|
-
return
|
|
65
|
+
return Utils.className(p());
|
|
79
66
|
}
|
|
80
|
-
return
|
|
67
|
+
return Utils.className(p);
|
|
81
68
|
};
|
|
82
69
|
const pivotProps = new Map();
|
|
83
70
|
// check for not discovered entities
|
|
84
71
|
discovered.forEach(meta => Object.values(meta.properties).forEach(prop => {
|
|
85
|
-
if (prop.kind !==
|
|
86
|
-
throw
|
|
72
|
+
if (prop.kind !== ReferenceKind.SCALAR && !unwrap(prop.type).split(/ ?\| ?/).every(type => discovered.find(m => m.className === type))) {
|
|
73
|
+
throw MetadataError.fromUnknownEntity(prop.type, `${meta.className}.${prop.name}`);
|
|
87
74
|
}
|
|
88
75
|
if (prop.pivotEntity) {
|
|
89
76
|
const props = pivotProps.get(name(prop.pivotEntity)) ?? [];
|
|
@@ -94,24 +81,25 @@ class MetadataValidator {
|
|
|
94
81
|
pivotProps.forEach(props => {
|
|
95
82
|
// if the pivot entity is used in more than one property, check if they are linked
|
|
96
83
|
if (props.length > 1 && props.every(p => !p.prop.mappedBy && !p.prop.inversedBy)) {
|
|
97
|
-
throw
|
|
84
|
+
throw MetadataError.invalidManyToManyWithPivotEntity(props[0].meta, props[0].prop, props[1].meta, props[1].prop);
|
|
98
85
|
}
|
|
99
86
|
});
|
|
100
87
|
}
|
|
101
88
|
validateReference(meta, prop, metadata, options) {
|
|
102
89
|
// references do have types
|
|
103
90
|
if (!prop.type) {
|
|
104
|
-
throw
|
|
91
|
+
throw MetadataError.fromWrongTypeDefinition(meta, prop);
|
|
105
92
|
}
|
|
93
|
+
const targetMeta = metadata.find(prop.type);
|
|
106
94
|
// references do have type of known entity
|
|
107
|
-
if (!
|
|
108
|
-
throw
|
|
95
|
+
if (!targetMeta) {
|
|
96
|
+
throw MetadataError.fromWrongTypeDefinition(meta, prop);
|
|
109
97
|
}
|
|
110
|
-
if (
|
|
111
|
-
throw
|
|
98
|
+
if (targetMeta.abstract && !targetMeta.discriminatorColumn && !targetMeta.embeddable) {
|
|
99
|
+
throw MetadataError.targetIsAbstract(meta, prop);
|
|
112
100
|
}
|
|
113
|
-
if ([
|
|
114
|
-
throw
|
|
101
|
+
if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && prop.persist === false && targetMeta.compositePK && options.checkNonPersistentCompositeProps) {
|
|
102
|
+
throw MetadataError.nonPersistentCompositeProp(meta, prop);
|
|
115
103
|
}
|
|
116
104
|
}
|
|
117
105
|
validateBidirectional(meta, prop, metadata) {
|
|
@@ -125,67 +113,67 @@ class MetadataValidator {
|
|
|
125
113
|
}
|
|
126
114
|
else {
|
|
127
115
|
// 1:m property has `mappedBy`
|
|
128
|
-
if (prop.kind ===
|
|
129
|
-
throw
|
|
116
|
+
if (prop.kind === ReferenceKind.ONE_TO_MANY && !prop.mappedBy) {
|
|
117
|
+
throw MetadataError.fromMissingOption(meta, prop, 'mappedBy');
|
|
130
118
|
}
|
|
131
119
|
}
|
|
132
120
|
}
|
|
133
121
|
validateOwningSide(meta, prop, inverse, metadata) {
|
|
134
122
|
// has correct `inversedBy` on owning side
|
|
135
123
|
if (!inverse) {
|
|
136
|
-
throw
|
|
124
|
+
throw MetadataError.fromWrongReference(meta, prop, 'inversedBy');
|
|
137
125
|
}
|
|
138
126
|
const targetClassName = metadata.find(inverse.type)?.root.className;
|
|
139
127
|
// has correct `inversedBy` reference type
|
|
140
128
|
if (inverse.type !== meta.className && targetClassName !== meta.root.className) {
|
|
141
|
-
throw
|
|
129
|
+
throw MetadataError.fromWrongReference(meta, prop, 'inversedBy', inverse);
|
|
142
130
|
}
|
|
143
131
|
// inverse side is not defined as owner
|
|
144
132
|
if (inverse.inversedBy || inverse.owner) {
|
|
145
|
-
throw
|
|
133
|
+
throw MetadataError.fromWrongOwnership(meta, prop, 'inversedBy');
|
|
146
134
|
}
|
|
147
135
|
}
|
|
148
136
|
validateInverseSide(meta, prop, owner, metadata) {
|
|
149
137
|
// has correct `mappedBy` on inverse side
|
|
150
138
|
if (prop.mappedBy && !owner) {
|
|
151
|
-
throw
|
|
139
|
+
throw MetadataError.fromWrongReference(meta, prop, 'mappedBy');
|
|
152
140
|
}
|
|
153
141
|
// has correct `mappedBy` reference type
|
|
154
142
|
if (owner.type !== meta.className && metadata.find(owner.type)?.root.className !== meta.root.className) {
|
|
155
|
-
throw
|
|
143
|
+
throw MetadataError.fromWrongReference(meta, prop, 'mappedBy', owner);
|
|
156
144
|
}
|
|
157
145
|
// owning side is not defined as inverse
|
|
158
146
|
if (owner.mappedBy) {
|
|
159
|
-
throw
|
|
147
|
+
throw MetadataError.fromWrongOwnership(meta, prop, 'mappedBy');
|
|
160
148
|
}
|
|
161
149
|
// owning side is not defined as inverse
|
|
162
150
|
const valid = [
|
|
163
|
-
{ owner:
|
|
164
|
-
{ owner:
|
|
165
|
-
{ owner:
|
|
151
|
+
{ owner: ReferenceKind.MANY_TO_ONE, inverse: ReferenceKind.ONE_TO_MANY },
|
|
152
|
+
{ owner: ReferenceKind.MANY_TO_MANY, inverse: ReferenceKind.MANY_TO_MANY },
|
|
153
|
+
{ owner: ReferenceKind.ONE_TO_ONE, inverse: ReferenceKind.ONE_TO_ONE },
|
|
166
154
|
];
|
|
167
155
|
if (!valid.find(spec => spec.owner === owner.kind && spec.inverse === prop.kind)) {
|
|
168
|
-
throw
|
|
156
|
+
throw MetadataError.fromWrongReferenceKind(meta, owner, prop);
|
|
169
157
|
}
|
|
170
158
|
if (prop.primary) {
|
|
171
|
-
throw
|
|
159
|
+
throw MetadataError.fromInversideSidePrimary(meta, owner, prop);
|
|
172
160
|
}
|
|
173
161
|
}
|
|
174
162
|
validateIndexes(meta, indexes, type) {
|
|
175
163
|
for (const index of indexes) {
|
|
176
|
-
for (const propName of
|
|
164
|
+
for (const propName of Utils.asArray(index.properties)) {
|
|
177
165
|
const prop = meta.root.properties[propName];
|
|
178
166
|
if (!prop && !Object.values(meta.root.properties).some(p => propName.startsWith(p.name + '.'))) {
|
|
179
|
-
throw
|
|
167
|
+
throw MetadataError.unknownIndexProperty(meta, propName, type);
|
|
180
168
|
}
|
|
181
169
|
}
|
|
182
170
|
}
|
|
183
171
|
}
|
|
184
172
|
validateDuplicateFieldNames(meta, options) {
|
|
185
173
|
const candidates = Object.values(meta.properties)
|
|
186
|
-
.filter(prop => prop.persist !== false && !prop.inherited && prop.fieldNames?.length === 1 && (prop.kind !==
|
|
174
|
+
.filter(prop => prop.persist !== false && !prop.inherited && prop.fieldNames?.length === 1 && (prop.kind !== ReferenceKind.EMBEDDED || prop.object))
|
|
187
175
|
.map(prop => prop.fieldNames[0]);
|
|
188
|
-
const duplicates =
|
|
176
|
+
const duplicates = Utils.findDuplicates(candidates);
|
|
189
177
|
if (duplicates.length > 0 && options.checkDuplicateFieldNames) {
|
|
190
178
|
const pairs = duplicates.flatMap(name => {
|
|
191
179
|
return Object.values(meta.properties)
|
|
@@ -194,7 +182,7 @@ class MetadataValidator {
|
|
|
194
182
|
return [prop.embedded ? prop.embedded.join('.') : prop.name, prop.fieldNames[0]];
|
|
195
183
|
});
|
|
196
184
|
});
|
|
197
|
-
throw
|
|
185
|
+
throw MetadataError.duplicateFieldName(meta.className, pairs);
|
|
198
186
|
}
|
|
199
187
|
}
|
|
200
188
|
validateVersionField(meta) {
|
|
@@ -203,13 +191,12 @@ class MetadataValidator {
|
|
|
203
191
|
}
|
|
204
192
|
const props = Object.values(meta.properties).filter(p => p.version);
|
|
205
193
|
if (props.length > 1) {
|
|
206
|
-
throw
|
|
194
|
+
throw MetadataError.multipleVersionFields(meta, props.map(p => p.name));
|
|
207
195
|
}
|
|
208
196
|
const prop = meta.properties[meta.versionProperty];
|
|
209
197
|
const type = prop.runtimeType ?? prop.columnTypes?.[0] ?? prop.type;
|
|
210
198
|
if (type !== 'number' && type !== 'Date' && !type.startsWith('timestamp') && !type.startsWith('datetime')) {
|
|
211
|
-
throw
|
|
199
|
+
throw MetadataError.invalidVersionFieldType(meta);
|
|
212
200
|
}
|
|
213
201
|
}
|
|
214
202
|
}
|
|
215
|
-
exports.MetadataValidator = MetadataValidator;
|
|
@@ -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 './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export * from './EntitySchema.js';
|
|
3
|
+
export * from './MetadataDiscovery.js';
|
|
4
|
+
export * from './MetadataStorage.js';
|
|
5
|
+
export * from './MetadataProvider.js';
|
|
6
|
+
export * from './MetadataValidator.js';
|
package/metadata/index.js
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./EntitySchema"), exports);
|
|
18
|
-
__exportStar(require("./MetadataDiscovery"), exports);
|
|
19
|
-
__exportStar(require("./MetadataStorage"), exports);
|
|
20
|
-
__exportStar(require("./MetadataProvider"), exports);
|
|
21
|
-
__exportStar(require("./MetadataValidator"), exports);
|
|
22
|
-
__exportStar(require("./ReflectMetadataProvider"), exports);
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export * from './EntitySchema.js';
|
|
3
|
+
export * from './MetadataDiscovery.js';
|
|
4
|
+
export * from './MetadataStorage.js';
|
|
5
|
+
export * from './MetadataProvider.js';
|
|
6
|
+
export * from './MetadataValidator.js';
|