@mikro-orm/core 7.0.0-dev.130 → 7.0.0-dev.132
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/MikroORM.d.ts +3 -3
- package/MikroORM.js +3 -3
- package/metadata/MetadataDiscovery.js +5 -2
- package/package.json +1 -1
- package/utils/Utils.js +1 -1
package/MikroORM.d.ts
CHANGED
|
@@ -51,9 +51,9 @@ export declare class MikroORM<Driver extends IDatabaseDriver = IDatabaseDriver,
|
|
|
51
51
|
static init<D extends IDatabaseDriver = IDatabaseDriver, EM extends D[typeof EntityManagerType] & EntityManager<D> = D[typeof EntityManagerType] & EntityManager<D>, Entities extends (string | EntityClass<AnyEntity> | EntitySchema)[] = (string | EntityClass<AnyEntity> | EntitySchema)[]>(options: Options<D, EM, Entities>): Promise<MikroORM<D, EM, Entities>>;
|
|
52
52
|
/**
|
|
53
53
|
* Synchronous variant of the `init` method with some limitations:
|
|
54
|
-
* -
|
|
55
|
-
* -
|
|
56
|
-
* -
|
|
54
|
+
* - folder-based discovery not supported
|
|
55
|
+
* - ORM extensions are not autoloaded
|
|
56
|
+
* - when metadata cache is enabled, `FileCacheAdapter` needs to be explicitly set in the config
|
|
57
57
|
*/
|
|
58
58
|
constructor(options: Options<Driver, EM, Entities>);
|
|
59
59
|
/**
|
package/MikroORM.js
CHANGED
|
@@ -94,9 +94,9 @@ export class MikroORM {
|
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* Synchronous variant of the `init` method with some limitations:
|
|
97
|
-
* -
|
|
98
|
-
* -
|
|
99
|
-
* -
|
|
97
|
+
* - folder-based discovery not supported
|
|
98
|
+
* - ORM extensions are not autoloaded
|
|
99
|
+
* - when metadata cache is enabled, `FileCacheAdapter` needs to be explicitly set in the config
|
|
100
100
|
*/
|
|
101
101
|
constructor(options) {
|
|
102
102
|
const env = loadEnvironmentVars();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EntityMetadata, } from '../typings.js';
|
|
2
2
|
import { Utils } from '../utils/Utils.js';
|
|
3
3
|
import { MetadataValidator } from './MetadataValidator.js';
|
|
4
|
+
import { MetadataProvider } from './MetadataProvider.js';
|
|
4
5
|
import { MetadataStorage } from './MetadataStorage.js';
|
|
5
6
|
import { EntitySchema } from './EntitySchema.js';
|
|
6
7
|
import { Cascade, ReferenceKind } from '../enums.js';
|
|
@@ -31,7 +32,8 @@ export class MetadataDiscovery {
|
|
|
31
32
|
async discover(preferTs = true) {
|
|
32
33
|
this.discovered.length = 0;
|
|
33
34
|
const startTime = Date.now();
|
|
34
|
-
this.
|
|
35
|
+
const suffix = this.metadataProvider.constructor === MetadataProvider ? '' : `, using ${colors.cyan(this.metadataProvider.constructor.name)}`;
|
|
36
|
+
this.logger.log('discovery', `ORM entity discovery started${suffix}`);
|
|
35
37
|
await this.findEntities(preferTs);
|
|
36
38
|
for (const meta of this.discovered) {
|
|
37
39
|
/* v8 ignore next */
|
|
@@ -48,7 +50,8 @@ export class MetadataDiscovery {
|
|
|
48
50
|
discoverSync() {
|
|
49
51
|
this.discovered.length = 0;
|
|
50
52
|
const startTime = Date.now();
|
|
51
|
-
this.
|
|
53
|
+
const suffix = this.metadataProvider.constructor === MetadataProvider ? '' : `, using ${colors.cyan(this.metadataProvider.constructor.name)}`;
|
|
54
|
+
this.logger.log('discovery', `ORM entity discovery started${suffix} in sync mode`);
|
|
52
55
|
const refs = this.config.get('entities');
|
|
53
56
|
this.discoverReferences(refs);
|
|
54
57
|
for (const meta of this.discovered) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-dev.
|
|
4
|
+
"version": "7.0.0-dev.132",
|
|
5
5
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./package.json": "./package.json",
|
package/utils/Utils.js
CHANGED
|
@@ -123,7 +123,7 @@ export function parseJsonSafe(value) {
|
|
|
123
123
|
}
|
|
124
124
|
export class Utils {
|
|
125
125
|
static PK_SEPARATOR = '~~~';
|
|
126
|
-
static #ORM_VERSION = '7.0.0-dev.
|
|
126
|
+
static #ORM_VERSION = '7.0.0-dev.132';
|
|
127
127
|
/**
|
|
128
128
|
* Checks if the argument is instance of `Object`. Returns false for arrays.
|
|
129
129
|
*/
|