@mikro-orm/mongodb 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/MongoPlatform.js CHANGED
@@ -1,13 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MongoPlatform = void 0;
4
- const bson_1 = require("bson");
5
- const core_1 = require("@mikro-orm/core");
6
- const MongoExceptionConverter_1 = require("./MongoExceptionConverter");
7
- const MongoEntityRepository_1 = require("./MongoEntityRepository");
8
- const MongoSchemaGenerator_1 = require("./MongoSchemaGenerator");
9
- class MongoPlatform extends core_1.Platform {
10
- exceptionConverter = new MongoExceptionConverter_1.MongoExceptionConverter();
1
+ import { ObjectId } from 'mongodb';
2
+ import { Platform, MongoNamingStrategy, Utils, ReferenceKind, MetadataError, } from '@mikro-orm/core';
3
+ import { MongoExceptionConverter } from './MongoExceptionConverter.js';
4
+ import { MongoEntityRepository } from './MongoEntityRepository.js';
5
+ import { MongoSchemaGenerator } from './MongoSchemaGenerator.js';
6
+ export class MongoPlatform extends Platform {
7
+ exceptionConverter = new MongoExceptionConverter();
11
8
  setConfig(config) {
12
9
  config.set('autoJoinOneToOneOwner', false);
13
10
  config.set('loadStrategy', 'select-in');
@@ -15,14 +12,14 @@ class MongoPlatform extends core_1.Platform {
15
12
  super.setConfig(config);
16
13
  }
17
14
  getNamingStrategy() {
18
- return core_1.MongoNamingStrategy;
15
+ return MongoNamingStrategy;
19
16
  }
20
17
  getRepositoryClass() {
21
- return MongoEntityRepository_1.MongoEntityRepository;
18
+ return MongoEntityRepository;
22
19
  }
23
20
  /** @inheritDoc */
24
21
  lookupExtensions(orm) {
25
- MongoSchemaGenerator_1.MongoSchemaGenerator.register(orm);
22
+ MongoSchemaGenerator.register(orm);
26
23
  }
27
24
  /** @inheritDoc */
28
25
  getExtension(extensionName, extensionKey, moduleName, em) {
@@ -32,27 +29,21 @@ class MongoPlatform extends core_1.Platform {
32
29
  if (extensionName === 'Migrator') {
33
30
  return super.getExtension('Migrator', '@mikro-orm/migrator', '@mikro-orm/migrations-mongodb', em);
34
31
  }
35
- /* istanbul ignore next */
32
+ /* v8 ignore next */
36
33
  return super.getExtension(extensionName, extensionKey, moduleName, em);
37
34
  }
38
- /* istanbul ignore next: kept for type inference only */
35
+ /* v8 ignore next: kept for type inference only */
39
36
  getSchemaGenerator(driver, em) {
40
- return new MongoSchemaGenerator_1.MongoSchemaGenerator(em ?? driver);
37
+ return new MongoSchemaGenerator(em ?? driver);
41
38
  }
42
39
  normalizePrimaryKey(data) {
43
- if (data instanceof bson_1.ObjectId) {
40
+ if (Utils.isObject(data) && data.constructor?.name === 'ObjectId') {
44
41
  return data.toHexString();
45
42
  }
46
43
  return data;
47
44
  }
48
45
  denormalizePrimaryKey(data) {
49
- return new bson_1.ObjectId(data);
50
- }
51
- getSerializedPrimaryKeyField(field) {
52
- return 'id';
53
- }
54
- usesDifferentSerializedPrimaryKey() {
55
- return true;
46
+ return new ObjectId('' + data);
56
47
  }
57
48
  usesImplicitTransactions() {
58
49
  return false;
@@ -61,9 +52,9 @@ class MongoPlatform extends core_1.Platform {
61
52
  return true;
62
53
  }
63
54
  convertJsonToDatabaseValue(value) {
64
- return core_1.Utils.copy(value);
55
+ return Utils.copy(value);
65
56
  }
66
- convertJsonToJSValue(value, prop) {
57
+ convertJsonToJSValue(value, context) {
67
58
  return value;
68
59
  }
69
60
  marshallArray(values) {
@@ -71,19 +62,19 @@ class MongoPlatform extends core_1.Platform {
71
62
  }
72
63
  cloneEmbeddable(data) {
73
64
  const ret = super.cloneEmbeddable(data);
74
- core_1.Utils.dropUndefinedProperties(ret);
65
+ Utils.dropUndefinedProperties(ret);
75
66
  return ret;
76
67
  }
77
68
  shouldHaveColumn(prop, populate, exclude) {
78
69
  if (super.shouldHaveColumn(prop, populate, exclude)) {
79
70
  return true;
80
71
  }
81
- return prop.kind === core_1.ReferenceKind.MANY_TO_MANY && prop.owner;
72
+ return prop.kind === ReferenceKind.MANY_TO_MANY && prop.owner;
82
73
  }
83
74
  validateMetadata(meta) {
84
75
  const pk = meta.getPrimaryProps()[0];
85
76
  if (pk && pk.fieldNames?.[0] !== '_id') {
86
- throw core_1.MetadataError.invalidPrimaryKey(meta, pk, '_id');
77
+ throw MetadataError.invalidPrimaryKey(meta, pk, '_id');
87
78
  }
88
79
  }
89
80
  isAllowedTopLevelOperator(operator) {
@@ -93,4 +84,3 @@ class MongoPlatform extends core_1.Platform {
93
84
  return 'mongodb://127.0.0.1:27017';
94
85
  }
95
86
  }
96
- exports.MongoPlatform = MongoPlatform;
@@ -1,14 +1,14 @@
1
1
  import { AbstractSchemaGenerator, type CreateSchemaOptions, type MikroORM } from '@mikro-orm/core';
2
- import type { MongoDriver } from './MongoDriver';
2
+ import type { MongoDriver } from './MongoDriver.js';
3
3
  export declare class MongoSchemaGenerator extends AbstractSchemaGenerator<MongoDriver> {
4
4
  static register(orm: MikroORM): void;
5
- createSchema(options?: MongoCreateSchemaOptions): Promise<void>;
6
- dropSchema(options?: {
5
+ create(options?: MongoCreateSchemaOptions): Promise<void>;
6
+ drop(options?: {
7
7
  dropMigrationsTable?: boolean;
8
8
  }): Promise<void>;
9
- updateSchema(options?: MongoCreateSchemaOptions): Promise<void>;
9
+ update(options?: MongoCreateSchemaOptions): Promise<void>;
10
10
  ensureDatabase(): Promise<boolean>;
11
- refreshDatabase(options?: MongoCreateSchemaOptions): Promise<void>;
11
+ refresh(options?: MongoCreateSchemaOptions): Promise<void>;
12
12
  dropIndexes(options?: {
13
13
  skipIndexes?: {
14
14
  collection: string;
@@ -17,7 +17,9 @@ export declare class MongoSchemaGenerator extends AbstractSchemaGenerator<MongoD
17
17
  collectionsWithFailedIndexes?: string[];
18
18
  }): Promise<void>;
19
19
  ensureIndexes(options?: EnsureIndexesOptions): Promise<void>;
20
+ private mapIndexProperties;
20
21
  private createIndexes;
22
+ private executeQuery;
21
23
  private createUniqueIndexes;
22
24
  private createPropertyIndexes;
23
25
  }
@@ -1,17 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MongoSchemaGenerator = void 0;
4
- const core_1 = require("@mikro-orm/core");
5
- class MongoSchemaGenerator extends core_1.AbstractSchemaGenerator {
1
+ import { AbstractSchemaGenerator, Utils, inspect, } from '@mikro-orm/core';
2
+ export class MongoSchemaGenerator extends AbstractSchemaGenerator {
6
3
  static register(orm) {
7
4
  orm.config.registerExtension('@mikro-orm/schema-generator', () => new MongoSchemaGenerator(orm.em));
8
5
  }
9
- async createSchema(options = {}) {
6
+ async create(options = {}) {
7
+ await this.connection.ensureConnection();
10
8
  options.ensureIndexes ??= true;
11
9
  const existing = await this.connection.listCollections();
12
10
  const metadata = this.getOrderedMetadata();
13
- metadata.push({ collection: this.config.get('migrations').tableName });
14
- /* istanbul ignore next */
11
+ /* v8 ignore next */
15
12
  const promises = metadata
16
13
  .filter(meta => !existing.includes(meta.collection))
17
14
  .map(meta => this.connection.createCollection(meta.collection).catch(err => {
@@ -26,10 +23,9 @@ class MongoSchemaGenerator extends core_1.AbstractSchemaGenerator {
26
23
  }
27
24
  await Promise.all(promises);
28
25
  }
29
- async dropSchema(options = {}) {
30
- const db = this.connection.getDb();
31
- const collections = await db.listCollections().toArray();
32
- const existing = collections.map(c => c.name);
26
+ async drop(options = {}) {
27
+ await this.connection.ensureConnection();
28
+ const existing = await this.connection.listCollections();
33
29
  const metadata = this.getOrderedMetadata();
34
30
  if (options.dropMigrationsTable) {
35
31
  metadata.push({ collection: this.config.get('migrations').tableName });
@@ -39,18 +35,19 @@ class MongoSchemaGenerator extends core_1.AbstractSchemaGenerator {
39
35
  .map(meta => this.connection.dropCollection(meta.collection));
40
36
  await Promise.all(promises);
41
37
  }
42
- async updateSchema(options = {}) {
43
- await this.createSchema(options);
38
+ async update(options = {}) {
39
+ await this.create(options);
44
40
  }
45
41
  async ensureDatabase() {
46
42
  return false;
47
43
  }
48
- async refreshDatabase(options = {}) {
44
+ async refresh(options = {}) {
49
45
  await this.ensureDatabase();
50
- await this.dropSchema();
51
- await this.createSchema(options);
46
+ await this.drop();
47
+ await this.create(options);
52
48
  }
53
49
  async dropIndexes(options) {
50
+ await this.connection.ensureConnection();
54
51
  const db = this.connection.getDb();
55
52
  const collections = await db.listCollections().toArray();
56
53
  const promises = [];
@@ -60,20 +57,21 @@ class MongoSchemaGenerator extends core_1.AbstractSchemaGenerator {
60
57
  }
61
58
  const indexes = await db.collection(collection.name).listIndexes().toArray();
62
59
  for (const index of indexes) {
63
- const isIdIndex = index.key._id === 1 && core_1.Utils.getObjectKeysSize(index.key) === 1;
64
- /* istanbul ignore next */
60
+ const isIdIndex = index.key._id === 1 && Utils.getObjectKeysSize(index.key) === 1;
61
+ /* v8 ignore next */
65
62
  if (!isIdIndex && !options?.skipIndexes?.find(idx => idx.collection === collection.name && idx.indexName === index.name)) {
66
- promises.push(db.collection(collection.name).dropIndex(index.name));
63
+ promises.push(this.executeQuery(db.collection(collection.name), 'dropIndex', index.name));
67
64
  }
68
65
  }
69
66
  }
70
67
  await Promise.all(promises);
71
68
  }
72
69
  async ensureIndexes(options = {}) {
70
+ await this.connection.ensureConnection();
73
71
  options.ensureCollections ??= true;
74
72
  options.retryLimit ??= 3;
75
73
  if (options.ensureCollections) {
76
- await this.createSchema({ ensureIndexes: false });
74
+ await this.create({ ensureIndexes: false });
77
75
  }
78
76
  const promises = [];
79
77
  for (const meta of this.getOrderedMetadata()) {
@@ -114,11 +112,21 @@ class MongoSchemaGenerator extends core_1.AbstractSchemaGenerator {
114
112
  });
115
113
  }
116
114
  }
115
+ mapIndexProperties(index, meta) {
116
+ return Utils.flatten(Utils.asArray(index.properties).map(propName => {
117
+ const rootPropName = propName.split('.')[0];
118
+ const prop = meta.properties[rootPropName];
119
+ if (propName.includes('.')) {
120
+ return [prop.fieldNames[0] + propName.substring(propName.indexOf('.'))];
121
+ }
122
+ return prop?.fieldNames ?? propName;
123
+ }));
124
+ }
117
125
  createIndexes(meta) {
118
126
  const res = [];
119
127
  meta.indexes.forEach(index => {
120
128
  let fieldOrSpec;
121
- const properties = core_1.Utils.flatten(core_1.Utils.asArray(index.properties).map(prop => meta.properties[prop].fieldNames));
129
+ const properties = this.mapIndexProperties(index, meta);
122
130
  const collection = this.connection.getCollection(meta.className);
123
131
  if (Array.isArray(index.options) && index.options.length === 2 && properties.length === 0) {
124
132
  res.push([collection.collectionName, collection.createIndex(index.options[0], index.options[1])]);
@@ -139,7 +147,7 @@ class MongoSchemaGenerator extends core_1.AbstractSchemaGenerator {
139
147
  else {
140
148
  fieldOrSpec = properties.reduce((o, i) => { o[i] = 1; return o; }, {});
141
149
  }
142
- res.push([collection.collectionName, collection.createIndex(fieldOrSpec, {
150
+ res.push([collection.collectionName, this.executeQuery(collection, 'createIndex', fieldOrSpec, {
143
151
  name: index.name,
144
152
  unique: false,
145
153
  ...index.options,
@@ -147,13 +155,26 @@ class MongoSchemaGenerator extends core_1.AbstractSchemaGenerator {
147
155
  });
148
156
  return res;
149
157
  }
158
+ async executeQuery(collection, method, ...args) {
159
+ const now = Date.now();
160
+ return collection[method](...args).then((res) => {
161
+ Utils.dropUndefinedProperties(args);
162
+ const query = `db.getCollection('${collection.collectionName}').${method}(${args.map(arg => inspect(arg)).join(', ')});`;
163
+ this.config.getLogger().logQuery({
164
+ level: 'info',
165
+ query,
166
+ took: Date.now() - now,
167
+ });
168
+ return res;
169
+ });
170
+ }
150
171
  createUniqueIndexes(meta) {
151
172
  const res = [];
152
173
  meta.uniques.forEach(index => {
153
- const properties = core_1.Utils.flatten(core_1.Utils.asArray(index.properties).map(prop => meta.properties[prop].fieldNames));
174
+ const properties = this.mapIndexProperties(index, meta);
154
175
  const fieldOrSpec = properties.reduce((o, i) => { o[i] = 1; return o; }, {});
155
176
  const collection = this.connection.getCollection(meta.className);
156
- res.push([collection.collectionName, collection.createIndex(fieldOrSpec, {
177
+ res.push([collection.collectionName, this.executeQuery(collection, 'createIndex', fieldOrSpec, {
157
178
  name: index.name,
158
179
  unique: true,
159
180
  ...index.options,
@@ -169,11 +190,10 @@ class MongoSchemaGenerator extends core_1.AbstractSchemaGenerator {
169
190
  const fieldOrSpec = prop.embeddedPath
170
191
  ? prop.embeddedPath.join('.')
171
192
  : prop.fieldNames.reduce((o, i) => { o[i] = 1; return o; }, {});
172
- return [[collection.collectionName, collection.createIndex(fieldOrSpec, {
173
- name: (core_1.Utils.isString(prop[type]) ? prop[type] : undefined),
193
+ return [[collection.collectionName, this.executeQuery(collection, 'createIndex', fieldOrSpec, {
194
+ name: typeof prop[type] === 'string' ? prop[type] : undefined,
174
195
  unique: type === 'unique',
175
196
  sparse: prop.nullable === true,
176
197
  })]];
177
198
  }
178
199
  }
179
- exports.MongoSchemaGenerator = MongoSchemaGenerator;
package/README.md CHANGED
@@ -11,7 +11,6 @@ TypeScript ORM for Node.js based on Data Mapper, [Unit of Work](https://mikro-or
11
11
  [![Chat on discord](https://img.shields.io/discord/1214904142443839538?label=discord&color=blue)](https://discord.gg/w8bjxFHS7X)
12
12
  [![Downloads](https://img.shields.io/npm/dm/@mikro-orm/core.svg)](https://www.npmjs.com/package/@mikro-orm/core)
13
13
  [![Coverage Status](https://img.shields.io/coveralls/mikro-orm/mikro-orm.svg)](https://coveralls.io/r/mikro-orm/mikro-orm?branch=master)
14
- [![Maintainability](https://api.codeclimate.com/v1/badges/27999651d3adc47cfa40/maintainability)](https://codeclimate.com/github/mikro-orm/mikro-orm/maintainability)
15
14
  [![Build Status](https://github.com/mikro-orm/mikro-orm/workflows/tests/badge.svg?branch=master)](https://github.com/mikro-orm/mikro-orm/actions?workflow=tests)
16
15
 
17
16
  ## 🤔 Unit of What?
@@ -141,7 +140,7 @@ There is also auto-generated [CHANGELOG.md](CHANGELOG.md) file based on commit m
141
140
  - [Composite and Foreign Keys as Primary Key](https://mikro-orm.io/docs/composite-keys)
142
141
  - [Filters](https://mikro-orm.io/docs/filters)
143
142
  - [Using `QueryBuilder`](https://mikro-orm.io/docs/query-builder)
144
- - [Preloading Deeply Nested Structures via populate](https://mikro-orm.io/docs/nested-populate)
143
+ - [Populating relations](https://mikro-orm.io/docs/populating-relations)
145
144
  - [Property Validation](https://mikro-orm.io/docs/property-validation)
146
145
  - [Lifecycle Hooks](https://mikro-orm.io/docs/events#hooks)
147
146
  - [Vanilla JS Support](https://mikro-orm.io/docs/usage-with-js)
@@ -382,6 +381,8 @@ See also the list of contributors who [participated](https://github.com/mikro-or
382
381
 
383
382
  Please ⭐️ this repository if this project helped you!
384
383
 
384
+ > If you'd like to support my open-source work, consider sponsoring me directly at [github.com/sponsors/b4nan](https://github.com/sponsors/b4nan).
385
+
385
386
  ## 📝 License
386
387
 
387
388
  Copyright © 2018 [Martin Adámek](https://github.com/b4nan).
package/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export * from './MongoConnection';
2
- export * from './MongoDriver';
3
- export * from './MongoPlatform';
4
- export * from './MongoEntityManager';
5
- export * from './MongoEntityRepository';
6
- export * from './MongoSchemaGenerator';
7
- export { MongoEntityManager as EntityManager } from './MongoEntityManager';
8
- export { MongoEntityRepository as EntityRepository } from './MongoEntityRepository';
9
- export { MongoMikroORM as MikroORM, MongoOptions as Options, defineMongoConfig as defineConfig, } from './MongoMikroORM';
10
- export { ObjectId } from 'bson';
11
1
  export * from '@mikro-orm/core';
2
+ export { ObjectId } from 'mongodb';
3
+ export * from './MongoConnection.js';
4
+ export * from './MongoDriver.js';
5
+ export * from './MongoPlatform.js';
6
+ export * from './MongoEntityManager.js';
7
+ export * from './MongoEntityRepository.js';
8
+ export * from './MongoSchemaGenerator.js';
9
+ export { MongoEntityManager as EntityManager } from './MongoEntityManager.js';
10
+ export { MongoEntityRepository as EntityRepository } from './MongoEntityRepository.js';
11
+ export { MongoMikroORM as MikroORM, type MongoOptions as Options, defineMongoConfig as defineConfig, } from './MongoMikroORM.js';
package/index.js CHANGED
@@ -1,34 +1,11 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
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
- exports.ObjectId = exports.defineConfig = exports.MikroORM = exports.EntityRepository = exports.EntityManager = void 0;
18
- /* istanbul ignore file */
19
- __exportStar(require("./MongoConnection"), exports);
20
- __exportStar(require("./MongoDriver"), exports);
21
- __exportStar(require("./MongoPlatform"), exports);
22
- __exportStar(require("./MongoEntityManager"), exports);
23
- __exportStar(require("./MongoEntityRepository"), exports);
24
- __exportStar(require("./MongoSchemaGenerator"), exports);
25
- var MongoEntityManager_1 = require("./MongoEntityManager");
26
- Object.defineProperty(exports, "EntityManager", { enumerable: true, get: function () { return MongoEntityManager_1.MongoEntityManager; } });
27
- var MongoEntityRepository_1 = require("./MongoEntityRepository");
28
- Object.defineProperty(exports, "EntityRepository", { enumerable: true, get: function () { return MongoEntityRepository_1.MongoEntityRepository; } });
29
- var MongoMikroORM_1 = require("./MongoMikroORM");
30
- Object.defineProperty(exports, "MikroORM", { enumerable: true, get: function () { return MongoMikroORM_1.MongoMikroORM; } });
31
- Object.defineProperty(exports, "defineConfig", { enumerable: true, get: function () { return MongoMikroORM_1.defineMongoConfig; } });
32
- var bson_1 = require("bson");
33
- Object.defineProperty(exports, "ObjectId", { enumerable: true, get: function () { return bson_1.ObjectId; } });
34
- __exportStar(require("@mikro-orm/core"), exports);
1
+ export * from '@mikro-orm/core';
2
+ export { ObjectId } from 'mongodb';
3
+ export * from './MongoConnection.js';
4
+ export * from './MongoDriver.js';
5
+ export * from './MongoPlatform.js';
6
+ export * from './MongoEntityManager.js';
7
+ export * from './MongoEntityRepository.js';
8
+ export * from './MongoSchemaGenerator.js';
9
+ export { MongoEntityManager as EntityManager } from './MongoEntityManager.js';
10
+ export { MongoEntityRepository as EntityRepository } from './MongoEntityRepository.js';
11
+ export { MongoMikroORM as MikroORM, defineMongoConfig as defineConfig, } from './MongoMikroORM.js';
package/package.json CHANGED
@@ -1,19 +1,11 @@
1
1
  {
2
2
  "name": "@mikro-orm/mongodb",
3
- "version": "7.0.0-dev.1",
3
+ "type": "module",
4
+ "version": "7.0.0-dev.100",
4
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.",
5
- "main": "index.js",
6
- "module": "index.mjs",
7
- "typings": "index.d.ts",
8
6
  "exports": {
9
7
  "./package.json": "./package.json",
10
- ".": {
11
- "import": {
12
- "types": "./index.d.ts",
13
- "default": "./index.mjs"
14
- },
15
- "require": "./index.js"
16
- }
8
+ ".": "./index.js"
17
9
  },
18
10
  "repository": {
19
11
  "type": "git",
@@ -46,10 +38,10 @@
46
38
  },
47
39
  "homepage": "https://mikro-orm.io",
48
40
  "engines": {
49
- "node": ">= 22.11.0"
41
+ "node": ">= 22.17.0"
50
42
  },
51
43
  "scripts": {
52
- "build": "yarn clean && yarn compile && yarn copy && yarn run -T gen-esm-wrapper index.js index.mjs",
44
+ "build": "yarn clean && yarn compile && yarn copy",
53
45
  "clean": "yarn run -T rimraf ./dist",
54
46
  "compile": "yarn run -T tsc -p tsconfig.build.json",
55
47
  "copy": "node ../../scripts/copy.mjs"
@@ -58,13 +50,12 @@
58
50
  "access": "public"
59
51
  },
60
52
  "dependencies": {
61
- "bson": "^6.10.1",
62
- "mongodb": "6.13.0"
53
+ "mongodb": "7.0.0"
63
54
  },
64
55
  "devDependencies": {
65
- "@mikro-orm/core": "^6.4.5"
56
+ "@mikro-orm/core": "^6.6.2"
66
57
  },
67
58
  "peerDependencies": {
68
- "@mikro-orm/core": "7.0.0-dev.1"
59
+ "@mikro-orm/core": "7.0.0-dev.100"
69
60
  }
70
61
  }
package/index.mjs DELETED
@@ -1,206 +0,0 @@
1
- import mod from "./index.js";
2
-
3
- export default mod;
4
- export const ALIAS_REPLACEMENT = mod.ALIAS_REPLACEMENT;
5
- export const ALIAS_REPLACEMENT_RE = mod.ALIAS_REPLACEMENT_RE;
6
- export const ARRAY_OPERATORS = mod.ARRAY_OPERATORS;
7
- export const AbstractNamingStrategy = mod.AbstractNamingStrategy;
8
- export const AbstractSchemaGenerator = mod.AbstractSchemaGenerator;
9
- export const AfterCreate = mod.AfterCreate;
10
- export const AfterDelete = mod.AfterDelete;
11
- export const AfterUpdate = mod.AfterUpdate;
12
- export const AfterUpsert = mod.AfterUpsert;
13
- export const ArrayCollection = mod.ArrayCollection;
14
- export const ArrayType = mod.ArrayType;
15
- export const BaseEntity = mod.BaseEntity;
16
- export const BeforeCreate = mod.BeforeCreate;
17
- export const BeforeDelete = mod.BeforeDelete;
18
- export const BeforeUpdate = mod.BeforeUpdate;
19
- export const BeforeUpsert = mod.BeforeUpsert;
20
- export const BigIntType = mod.BigIntType;
21
- export const BlobType = mod.BlobType;
22
- export const BooleanType = mod.BooleanType;
23
- export const Cascade = mod.Cascade;
24
- export const ChangeSet = mod.ChangeSet;
25
- export const ChangeSetComputer = mod.ChangeSetComputer;
26
- export const ChangeSetPersister = mod.ChangeSetPersister;
27
- export const ChangeSetType = mod.ChangeSetType;
28
- export const CharacterType = mod.CharacterType;
29
- export const Check = mod.Check;
30
- export const CheckConstraintViolationException = mod.CheckConstraintViolationException;
31
- export const Collection = mod.Collection;
32
- export const CommitOrderCalculator = mod.CommitOrderCalculator;
33
- export const Config = mod.Config;
34
- export const Configuration = mod.Configuration;
35
- export const ConfigurationLoader = mod.ConfigurationLoader;
36
- export const Connection = mod.Connection;
37
- export const ConnectionException = mod.ConnectionException;
38
- export const ConstraintViolationException = mod.ConstraintViolationException;
39
- export const CreateRequestContext = mod.CreateRequestContext;
40
- export const Cursor = mod.Cursor;
41
- export const CursorError = mod.CursorError;
42
- export const DatabaseDriver = mod.DatabaseDriver;
43
- export const DatabaseObjectExistsException = mod.DatabaseObjectExistsException;
44
- export const DatabaseObjectNotFoundException = mod.DatabaseObjectNotFoundException;
45
- export const DataloaderType = mod.DataloaderType;
46
- export const DataloaderUtils = mod.DataloaderUtils;
47
- export const DateTimeType = mod.DateTimeType;
48
- export const DateType = mod.DateType;
49
- export const DeadlockException = mod.DeadlockException;
50
- export const DecimalType = mod.DecimalType;
51
- export const DefaultLogger = mod.DefaultLogger;
52
- export const DeferMode = mod.DeferMode;
53
- export const DoubleType = mod.DoubleType;
54
- export const DriverException = mod.DriverException;
55
- export const EagerProps = mod.EagerProps;
56
- export const Embeddable = mod.Embeddable;
57
- export const Embedded = mod.Embedded;
58
- export const EnsureRequestContext = mod.EnsureRequestContext;
59
- export const Entity = mod.Entity;
60
- export const EntityAssigner = mod.EntityAssigner;
61
- export const EntityCaseNamingStrategy = mod.EntityCaseNamingStrategy;
62
- export const EntityComparator = mod.EntityComparator;
63
- export const EntityFactory = mod.EntityFactory;
64
- export const EntityHelper = mod.EntityHelper;
65
- export const EntityIdentifier = mod.EntityIdentifier;
66
- export const EntityLoader = mod.EntityLoader;
67
- export const EntityManager = mod.EntityManager;
68
- export const EntityManagerType = mod.EntityManagerType;
69
- export const EntityMetadata = mod.EntityMetadata;
70
- export const EntityRepository = mod.EntityRepository;
71
- export const EntityRepositoryType = mod.EntityRepositoryType;
72
- export const EntitySchema = mod.EntitySchema;
73
- export const EntitySerializer = mod.EntitySerializer;
74
- export const EntityTransformer = mod.EntityTransformer;
75
- export const EntityValidator = mod.EntityValidator;
76
- export const Enum = mod.Enum;
77
- export const EnumArrayType = mod.EnumArrayType;
78
- export const EnumType = mod.EnumType;
79
- export const EventManager = mod.EventManager;
80
- export const EventType = mod.EventType;
81
- export const EventTypeMap = mod.EventTypeMap;
82
- export const ExceptionConverter = mod.ExceptionConverter;
83
- export const FileCacheAdapter = mod.FileCacheAdapter;
84
- export const Filter = mod.Filter;
85
- export const FloatType = mod.FloatType;
86
- export const FlushMode = mod.FlushMode;
87
- export const ForeignKeyConstraintViolationException = mod.ForeignKeyConstraintViolationException;
88
- export const Formula = mod.Formula;
89
- export const GeneratedCacheAdapter = mod.GeneratedCacheAdapter;
90
- export const GroupOperator = mod.GroupOperator;
91
- export const HiddenProps = mod.HiddenProps;
92
- export const Hydrator = mod.Hydrator;
93
- export const IdentityMap = mod.IdentityMap;
94
- export const Index = mod.Index;
95
- export const IntegerType = mod.IntegerType;
96
- export const IntervalType = mod.IntervalType;
97
- export const InvalidFieldNameException = mod.InvalidFieldNameException;
98
- export const IsolationLevel = mod.IsolationLevel;
99
- export const JSON_KEY_OPERATORS = mod.JSON_KEY_OPERATORS;
100
- export const JsonProperty = mod.JsonProperty;
101
- export const JsonType = mod.JsonType;
102
- export const LoadStrategy = mod.LoadStrategy;
103
- export const LockMode = mod.LockMode;
104
- export const LockWaitTimeoutException = mod.LockWaitTimeoutException;
105
- export const ManyToMany = mod.ManyToMany;
106
- export const ManyToOne = mod.ManyToOne;
107
- export const MediumIntType = mod.MediumIntType;
108
- export const MemoryCacheAdapter = mod.MemoryCacheAdapter;
109
- export const MetadataDiscovery = mod.MetadataDiscovery;
110
- export const MetadataError = mod.MetadataError;
111
- export const MetadataProvider = mod.MetadataProvider;
112
- export const MetadataStorage = mod.MetadataStorage;
113
- export const MetadataValidator = mod.MetadataValidator;
114
- export const MikroORM = mod.MikroORM;
115
- export const MongoConnection = mod.MongoConnection;
116
- export const MongoDriver = mod.MongoDriver;
117
- export const MongoEntityManager = mod.MongoEntityManager;
118
- export const MongoEntityRepository = mod.MongoEntityRepository;
119
- export const MongoNamingStrategy = mod.MongoNamingStrategy;
120
- export const MongoPlatform = mod.MongoPlatform;
121
- export const MongoSchemaGenerator = mod.MongoSchemaGenerator;
122
- export const NodeState = mod.NodeState;
123
- export const NonUniqueFieldNameException = mod.NonUniqueFieldNameException;
124
- export const NotFoundError = mod.NotFoundError;
125
- export const NotNullConstraintViolationException = mod.NotNullConstraintViolationException;
126
- export const NullCacheAdapter = mod.NullCacheAdapter;
127
- export const NullHighlighter = mod.NullHighlighter;
128
- export const ObjectBindingPattern = mod.ObjectBindingPattern;
129
- export const ObjectHydrator = mod.ObjectHydrator;
130
- export const ObjectId = mod.ObjectId;
131
- export const OnInit = mod.OnInit;
132
- export const OnLoad = mod.OnLoad;
133
- export const OneToMany = mod.OneToMany;
134
- export const OneToOne = mod.OneToOne;
135
- export const OptimisticLockError = mod.OptimisticLockError;
136
- export const OptionalProps = mod.OptionalProps;
137
- export const PlainObject = mod.PlainObject;
138
- export const Platform = mod.Platform;
139
- export const PopulateHint = mod.PopulateHint;
140
- export const PopulatePath = mod.PopulatePath;
141
- export const PrimaryKey = mod.PrimaryKey;
142
- export const PrimaryKeyProp = mod.PrimaryKeyProp;
143
- export const Property = mod.Property;
144
- export const QueryFlag = mod.QueryFlag;
145
- export const QueryHelper = mod.QueryHelper;
146
- export const QueryOperator = mod.QueryOperator;
147
- export const QueryOrder = mod.QueryOrder;
148
- export const QueryOrderNumeric = mod.QueryOrderNumeric;
149
- export const Raw = mod.Raw;
150
- export const RawQueryFragment = mod.RawQueryFragment;
151
- export const ReadOnlyException = mod.ReadOnlyException;
152
- export const Ref = mod.Ref;
153
- export const Reference = mod.Reference;
154
- export const ReferenceKind = mod.ReferenceKind;
155
- export const ReflectMetadataProvider = mod.ReflectMetadataProvider;
156
- export const RequestContext = mod.RequestContext;
157
- export const SCALAR_TYPES = mod.SCALAR_TYPES;
158
- export const ScalarReference = mod.ScalarReference;
159
- export const SerializationContext = mod.SerializationContext;
160
- export const SerializedPrimaryKey = mod.SerializedPrimaryKey;
161
- export const ServerException = mod.ServerException;
162
- export const SimpleLogger = mod.SimpleLogger;
163
- export const SmallIntType = mod.SmallIntType;
164
- export const StringType = mod.StringType;
165
- export const SyntaxErrorException = mod.SyntaxErrorException;
166
- export const TableExistsException = mod.TableExistsException;
167
- export const TableNotFoundException = mod.TableNotFoundException;
168
- export const TextType = mod.TextType;
169
- export const TimeType = mod.TimeType;
170
- export const TinyIntType = mod.TinyIntType;
171
- export const TransactionContext = mod.TransactionContext;
172
- export const TransactionEventBroadcaster = mod.TransactionEventBroadcaster;
173
- export const Transactional = mod.Transactional;
174
- export const Type = mod.Type;
175
- export const Uint8ArrayType = mod.Uint8ArrayType;
176
- export const UnderscoreNamingStrategy = mod.UnderscoreNamingStrategy;
177
- export const Unique = mod.Unique;
178
- export const UniqueConstraintViolationException = mod.UniqueConstraintViolationException;
179
- export const UnitOfWork = mod.UnitOfWork;
180
- export const UnknownType = mod.UnknownType;
181
- export const Utils = mod.Utils;
182
- export const UuidType = mod.UuidType;
183
- export const ValidationError = mod.ValidationError;
184
- export const WrappedEntity = mod.WrappedEntity;
185
- export const assign = mod.assign;
186
- export const colors = mod.colors;
187
- export const compareArrays = mod.compareArrays;
188
- export const compareBooleans = mod.compareBooleans;
189
- export const compareBuffers = mod.compareBuffers;
190
- export const compareObjects = mod.compareObjects;
191
- export const createSqlFunction = mod.createSqlFunction;
192
- export const defineConfig = mod.defineConfig;
193
- export const equals = mod.equals;
194
- export const getOnConflictFields = mod.getOnConflictFields;
195
- export const getOnConflictReturningFields = mod.getOnConflictReturningFields;
196
- export const helper = mod.helper;
197
- export const isRaw = mod.isRaw;
198
- export const parseJsonSafe = mod.parseJsonSafe;
199
- export const raw = mod.raw;
200
- export const ref = mod.ref;
201
- export const rel = mod.rel;
202
- export const serialize = mod.serialize;
203
- export const sql = mod.sql;
204
- export const t = mod.t;
205
- export const types = mod.types;
206
- export const wrap = mod.wrap;