@mikro-orm/core 7.0.4-dev.10 → 7.0.4-dev.11

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.
@@ -18,9 +18,19 @@ async function getEntityClassOrSchema(filepath, allTargets, baseDir) {
18
18
  }
19
19
  }
20
20
  for (const item of targets) {
21
- const validTarget = EntitySchema.is(item) || (item instanceof Function && MetadataStorage.isKnownEntity(item.name));
22
- if (validTarget && !allTargets.has(item)) {
23
- allTargets.set(item, path);
21
+ if (EntitySchema.is(item)) {
22
+ if (!allTargets.has(item)) {
23
+ allTargets.set(item, path);
24
+ }
25
+ }
26
+ else if (item instanceof Function) {
27
+ const schema = EntitySchema.REGISTRY.get(item);
28
+ if (schema && !allTargets.has(schema)) {
29
+ allTargets.set(schema, path);
30
+ }
31
+ else if (!schema && MetadataStorage.isKnownEntity(item.name) && !allTargets.has(item)) {
32
+ allTargets.set(item, path);
33
+ }
24
34
  }
25
35
  }
26
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "7.0.4-dev.10",
3
+ "version": "7.0.4-dev.11",
4
4
  "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
5
  "keywords": [
6
6
  "data-mapper",
package/utils/Utils.js CHANGED
@@ -129,7 +129,7 @@ export function parseJsonSafe(value) {
129
129
  /** Collection of general-purpose utility methods used throughout the ORM. */
130
130
  export class Utils {
131
131
  static PK_SEPARATOR = '~~~';
132
- static #ORM_VERSION = '7.0.4-dev.10';
132
+ static #ORM_VERSION = '7.0.4-dev.11';
133
133
  /**
134
134
  * Checks if the argument is instance of `Object`. Returns false for arrays.
135
135
  */
@@ -553,7 +553,9 @@ export class Utils {
553
553
  process.execArgv?.some(arg => {
554
554
  return (arg.includes('ts-node') || // check for ts-node loader
555
555
  arg.includes('@swc-node/register') || // check for swc-node/register loader
556
- arg.includes('node_modules/tsx/')); // check for tsx loader
556
+ arg.includes('node_modules/tsx/') || // check for tsx loader
557
+ arg.includes('@oxc-node/core') // check for oxc-node loader
558
+ );
557
559
  }));
558
560
  }
559
561
  /**