@mikro-orm/cli 7.0.0-dev.65 → 7.0.0-dev.66

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/CLIHelper.js CHANGED
@@ -265,7 +265,7 @@ export class CLIHelper {
265
265
  const loaders = {
266
266
  swc: { esm: '@swc-node/register/esm-register', cjs: '@swc-node/register' },
267
267
  tsx: { esm: 'tsx/esm/api', cjs: 'tsx/cjs/api', cb: (tsx) => tsx.register({ tsconfig: configPath }) },
268
- jiti: { esm: 'jiti/register', cjs: 'jiti/register', cb: () => Utils.setDynamicImportProvider(id => import(id).then(mod => mod?.default ?? mod)) },
268
+ jiti: { esm: 'jiti/register', cjs: 'jiti/register', cb: () => Utils.dynamicImportProvider = id => import(id).then(mod => mod?.default ?? mod) },
269
269
  tsimp: { esm: 'tsimp/import', cjs: 'tsimp/import' },
270
270
  };
271
271
  for (const loader of Utils.keys(loaders)) {
@@ -40,8 +40,8 @@ export class DebugCommand {
40
40
  }
41
41
  const entities = config.get('entities', []);
42
42
  if (entities.length > 0) {
43
- const refs = entities.filter(p => !Utils.isString(p));
44
- const paths = entities.filter(p => Utils.isString(p));
43
+ const refs = entities.filter(p => typeof p !== 'string');
44
+ const paths = entities.filter(p => typeof p === 'string');
45
45
  const will = !config.get('preferTs') ? 'will' : 'could';
46
46
  CLIHelper.dump(` - ${will} use \`entities\` array (contains ${refs.length} references and ${paths.length} paths)`);
47
47
  if (paths.length > 0) {
@@ -50,8 +50,8 @@ export class DebugCommand {
50
50
  }
51
51
  const entitiesTs = config.get('entitiesTs', []);
52
52
  if (entitiesTs.length > 0) {
53
- const refs = entitiesTs.filter(p => !Utils.isString(p));
54
- const paths = entitiesTs.filter(p => Utils.isString(p));
53
+ const refs = entitiesTs.filter(p => typeof p !== 'string');
54
+ const paths = entitiesTs.filter(p => typeof p === 'string');
55
55
  /* v8 ignore next */
56
56
  const will = config.get('preferTs') ? 'will' : 'could';
57
57
  CLIHelper.dump(` - ${will} use \`entitiesTs\` array (contains ${refs.length} references and ${paths.length} paths)`);
@@ -25,7 +25,7 @@ export class GenerateCacheCommand {
25
25
  await config.getMetadataCacheAdapter().clear();
26
26
  config.set('logger', CLIHelper.dump.bind(null));
27
27
  config.set('debug', true);
28
- const discovery = new MetadataDiscovery(MetadataStorage.init(), config.getDriver().getPlatform(), config);
28
+ const discovery = new MetadataDiscovery(new MetadataStorage(), config.getDriver().getPlatform(), config);
29
29
  await discovery.discover(args.ts ?? false);
30
30
  const combined = args.combined && config.get('metadataCache').combined;
31
31
  CLIHelper.dump(colors.green(`${combined ? 'Combined ' : ''}${args.ts ? 'TS' : 'JS'} metadata cache was successfully generated${combined ? ' to ' + combined : ''}`));
@@ -203,7 +203,7 @@ export class MigrationCommandFactory {
203
203
  if (method === 'up' && Utils.isEmpty(options)) {
204
204
  return msg + ' to the latest version';
205
205
  }
206
- if (Utils.isString(options.to)) {
206
+ if (typeof options.to === 'string') {
207
207
  return msg + ' to version ' + options.to;
208
208
  }
209
209
  if (options.migrations?.length === 1) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mikro-orm/cli",
3
3
  "type": "module",
4
- "version": "7.0.0-dev.65",
4
+ "version": "7.0.0-dev.66",
5
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.",
6
6
  "exports": {
7
7
  "./package.json": "./package.json",
@@ -53,8 +53,8 @@
53
53
  "access": "public"
54
54
  },
55
55
  "dependencies": {
56
- "@mikro-orm/core": "7.0.0-dev.65",
57
- "@mikro-orm/knex": "7.0.0-dev.65",
56
+ "@mikro-orm/core": "7.0.0-dev.66",
57
+ "@mikro-orm/knex": "7.0.0-dev.66",
58
58
  "yargs": "17.7.2"
59
59
  },
60
60
  "devDependencies": {