@mikro-orm/core 6.3.1-dev.10 → 6.3.1-dev.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "6.3.1-dev.10",
3
+ "version": "6.3.1-dev.12",
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
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -64,7 +64,7 @@
64
64
  "esprima": "4.0.1",
65
65
  "fs-extra": "11.2.0",
66
66
  "globby": "11.1.0",
67
- "mikro-orm": "6.3.1-dev.10",
67
+ "mikro-orm": "6.3.1-dev.12",
68
68
  "reflect-metadata": "0.2.2"
69
69
  }
70
70
  }
@@ -6,10 +6,10 @@ import { Configuration, type Options } from './Configuration';
6
6
  * @internal
7
7
  */
8
8
  export declare class ConfigurationLoader {
9
- static getConfiguration<D extends IDatabaseDriver = IDatabaseDriver, EM extends D[typeof EntityManagerType] & EntityManager = EntityManager>(validate?: boolean, options?: Partial<Options>, cli?: boolean): Promise<Configuration<D, EM>>;
9
+ static getConfiguration<D extends IDatabaseDriver = IDatabaseDriver, EM extends D[typeof EntityManagerType] & EntityManager = EntityManager>(validate?: boolean, options?: Partial<Options>): Promise<Configuration<D, EM>>;
10
10
  static getPackageConfig(basePath?: string): Dictionary;
11
11
  static getSettings(): Settings;
12
- static getConfigPaths(cli?: boolean): string[];
12
+ static getConfigPaths(): string[];
13
13
  static isESM(): boolean;
14
14
  static registerTsNode(configPath?: string): boolean;
15
15
  static registerDotenv<D extends IDatabaseDriver>(options?: Options<D> | Configuration<D>): void;
@@ -16,10 +16,10 @@ const Utils_1 = require("./Utils");
16
16
  * @internal
17
17
  */
18
18
  class ConfigurationLoader {
19
- static async getConfiguration(validate = true, options = {}, cli = false) {
19
+ static async getConfiguration(validate = true, options = {}) {
20
20
  this.commonJSCompat(options);
21
21
  this.registerDotenv(options);
22
- const paths = this.getConfigPaths(cli);
22
+ const paths = this.getConfigPaths();
23
23
  const env = this.loadEnvironmentVars();
24
24
  for (let path of paths) {
25
25
  path = Utils_1.Utils.absolutePath(path);
@@ -73,7 +73,7 @@ class ConfigurationLoader {
73
73
  }
74
74
  return settings;
75
75
  }
76
- static getConfigPaths(cli = false) {
76
+ static getConfigPaths() {
77
77
  const options = Utils_1.Utils.parseArgs();
78
78
  const configArgName = process.env.MIKRO_ORM_CONFIG_ARG_NAME ?? 'config';
79
79
  if (options[configArgName]) {
@@ -85,7 +85,7 @@ class ConfigurationLoader {
85
85
  paths.push(process.env.MIKRO_ORM_CLI_CONFIG);
86
86
  }
87
87
  paths.push(...(settings.configPaths || []));
88
- if ((cli && settings.useTsNode !== false) || settings.alwaysAllowTs) {
88
+ if (settings.useTsNode !== false || settings.alwaysAllowTs) {
89
89
  paths.push('./src/mikro-orm.config.ts');
90
90
  paths.push('./mikro-orm.config.ts');
91
91
  }