@mikro-orm/knex 6.3.1-dev.9 → 6.3.2-dev.0

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.
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BaseSqliteConnection = void 0;
4
4
  const fs_extra_1 = require("fs-extra");
5
- const path_1 = require("path");
5
+ const node_path_1 = require("node:path");
6
6
  const AbstractSqlConnection_1 = require("../../AbstractSqlConnection");
7
7
  const core_1 = require("@mikro-orm/core");
8
8
  class BaseSqliteConnection extends AbstractSqlConnection_1.AbstractSqlConnection {
9
9
  async connect() {
10
10
  this.createKnex();
11
- await (0, fs_extra_1.ensureDir)((0, path_1.dirname)(this.config.get('dbName')));
11
+ await (0, fs_extra_1.ensureDir)((0, node_path_1.dirname)(this.config.get('dbName')));
12
12
  await this.client.raw('pragma foreign_keys = on');
13
13
  }
14
14
  getDefaultClientUrl() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "6.3.1-dev.9",
3
+ "version": "6.3.2-dev.0",
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",
@@ -63,10 +63,10 @@
63
63
  "sqlstring": "2.3.3"
64
64
  },
65
65
  "devDependencies": {
66
- "@mikro-orm/core": "^6.3.0"
66
+ "@mikro-orm/core": "^6.3.1"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.3.1-dev.9",
69
+ "@mikro-orm/core": "6.3.2-dev.0",
70
70
  "better-sqlite3": "*",
71
71
  "libsql": "*",
72
72
  "mariadb": "*"
@@ -1,4 +1,4 @@
1
- import { inspect } from 'util';
1
+ import { inspect } from 'node:util';
2
2
  import { type EntityKey, type EntityProperty, type MetadataStorage } from '@mikro-orm/core';
3
3
  import type { ICriteriaNode, ICriteriaNodeProcessOptions, IQueryBuilder } from '../typings';
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CriteriaNode = void 0;
4
- const util_1 = require("util");
4
+ const node_util_1 = require("node:util");
5
5
  const core_1 = require("@mikro-orm/core");
6
6
  /**
7
7
  * Helper for working with deeply nested where/orderBy/having criteria. Uses composite pattern to build tree from the payload.
@@ -114,12 +114,12 @@ class CriteriaNode {
114
114
  return alias ? `${alias}.${field}` : field;
115
115
  }
116
116
  /** @ignore */
117
- [util_1.inspect.custom]() {
117
+ [node_util_1.inspect.custom]() {
118
118
  const o = {};
119
119
  ['entityName', 'key', 'index', 'payload']
120
120
  .filter(k => this[k] !== undefined)
121
121
  .forEach(k => o[k] = this[k]);
122
- return `${this.constructor.name} ${(0, util_1.inspect)(o)}`;
122
+ return `${this.constructor.name} ${(0, node_util_1.inspect)(o)}`;
123
123
  }
124
124
  }
125
125
  exports.CriteriaNode = CriteriaNode;
@@ -1,4 +1,4 @@
1
- import { inspect } from 'util';
1
+ import { inspect } from 'node:util';
2
2
  import type { Knex } from 'knex';
3
3
  import { type AnyEntity, type ConnectionType, type Dictionary, type EntityData, type EntityKey, type EntityMetadata, type EntityName, type EntityProperty, type FlushMode, type GroupOperator, type Loaded, LockMode, type LoggingOptions, type MetadataStorage, type ObjectQuery, PopulateHint, type PopulateOptions, type QBFilterQuery, type QBQueryOrderMap, QueryFlag, type QueryOrderMap, type QueryResult, RawQueryFragment, type RequiredEntityData, type ExpandProperty } from '@mikro-orm/core';
4
4
  import { JoinType, QueryType } from './enums';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.QueryBuilder = void 0;
4
- const util_1 = require("util");
4
+ const node_util_1 = require("node:util");
5
5
  const core_1 = require("@mikro-orm/core");
6
6
  const enums_1 = require("./enums");
7
7
  const QueryBuilderHelper_1 = require("./QueryBuilderHelper");
@@ -1356,7 +1356,7 @@ class QueryBuilder {
1356
1356
  }
1357
1357
  /* istanbul ignore next */
1358
1358
  /** @ignore */
1359
- [util_1.inspect.custom](depth = 2) {
1359
+ [node_util_1.inspect.custom](depth = 2) {
1360
1360
  const object = { ...this };
1361
1361
  const hidden = ['metadata', 'driver', 'context', 'platform', 'knex', 'type'];
1362
1362
  Object.keys(object).filter(k => k.startsWith('_')).forEach(k => delete object[k]);
@@ -1380,7 +1380,7 @@ class QueryBuilder {
1380
1380
  object.orderBy = this._orderBy;
1381
1381
  }
1382
1382
  const name = this._mainAlias ? `${prefix}QueryBuilder<${this._mainAlias?.entityName}>` : 'QueryBuilder';
1383
- const ret = (0, util_1.inspect)(object, { depth });
1383
+ const ret = (0, node_util_1.inspect)(object, { depth });
1384
1384
  return ret === '[Object]' ? `[${name}]` : name + ' ' + ret;
1385
1385
  }
1386
1386
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.QueryBuilderHelper = void 0;
4
- const util_1 = require("util");
4
+ const node_util_1 = require("node:util");
5
5
  const core_1 = require("@mikro-orm/core");
6
6
  const enums_1 = require("./enums");
7
7
  /**
@@ -445,7 +445,7 @@ class QueryBuilderHelper {
445
445
  const op = Object.keys(core_1.QueryOperator).find(op => op in value);
446
446
  /* istanbul ignore next */
447
447
  if (!op) {
448
- throw new Error(`Invalid query condition: ${(0, util_1.inspect)(cond, { depth: 5 })}`);
448
+ throw new Error(`Invalid query condition: ${(0, node_util_1.inspect)(cond, { depth: 5 })}`);
449
449
  }
450
450
  const replacement = this.getOperatorReplacement(op, value);
451
451
  const fields = core_1.Utils.splitPrimaryKeys(key);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SchemaComparator = void 0;
4
- const util_1 = require("util");
4
+ const node_util_1 = require("node:util");
5
5
  const core_1 = require("@mikro-orm/core");
6
6
  /**
7
7
  * Compares two Schemas and return an instance of SchemaDifference.
@@ -550,7 +550,7 @@ class SchemaComparator {
550
550
  }
551
551
  log(message, params) {
552
552
  if (params) {
553
- message += ' ' + (0, util_1.inspect)(params);
553
+ message += ' ' + (0, node_util_1.inspect)(params);
554
554
  }
555
555
  this.logger.log('schema', message);
556
556
  }