@mikro-orm/core
Advanced tools
+1
-1
| { | ||
| "name": "@mikro-orm/core", | ||
| "version": "7.1.8-dev.10", | ||
| "version": "7.1.8-dev.11", | ||
| "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,0 +5,0 @@ "keywords": [ |
@@ -98,2 +98,4 @@ import type { Constructor, IMigrationGenerator, IMigrationRunner, IMigrator, IMigratorStorage, MaybePromise, Migration, MigrationInfo, MigrationResult, MigrationRow, MigratorEvent } from '../typings.js'; | ||
| protected init(): Promise<void>; | ||
| /** Resolves the migrations path (including source folder auto-detection) without touching the filesystem. */ | ||
| protected resolvePaths(): Promise<void>; | ||
| protected initPaths(): Promise<void>; | ||
@@ -100,0 +102,0 @@ protected initServices(): void; |
@@ -12,2 +12,3 @@ import { Utils } from './Utils.js'; | ||
| initialized = false; | ||
| #pathsEnsured = false; | ||
| #listeners = new Map(); | ||
@@ -307,3 +308,4 @@ constructor(em) { | ||
| } | ||
| async initPaths() { | ||
| /** Resolves the migrations path (including source folder auto-detection) without touching the filesystem. */ | ||
| async resolvePaths() { | ||
| if (this.absolutePath || this.options.migrationsList) { | ||
@@ -317,2 +319,10 @@ return; | ||
| this.absolutePath = fs.absolutePath(this.options[key], this.config.get('baseDir')); | ||
| } | ||
| async initPaths() { | ||
| await this.resolvePaths(); | ||
| if (this.#pathsEnsured || this.options.migrationsList) { | ||
| return; | ||
| } | ||
| this.#pathsEnsured = true; | ||
| const { fs } = await import('@mikro-orm/core/fs-utils'); | ||
| try { | ||
@@ -319,0 +329,0 @@ fs.ensureDir(this.absolutePath); |
+1
-1
@@ -156,3 +156,3 @@ import { clone } from './clone.js'; | ||
| static PK_SEPARATOR = '~~~'; | ||
| static #ORM_VERSION = '7.1.8-dev.10'; | ||
| static #ORM_VERSION = '7.1.8-dev.11'; | ||
| /** | ||
@@ -159,0 +159,0 @@ * Checks if the argument is instance of `Object`. Returns false for arrays. |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
1570955
0.04%33590
0.04%