mutano 3.0.3 → 3.0.4

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.
Files changed (2) hide show
  1. package/dist/main.js +4 -3
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as path from 'node:path';
2
2
  import camelCase from 'camelcase';
3
- import * as fs from 'fs-extra';
3
+ import { writeFile } from 'node:fs/promises';
4
+ import { ensureDir } from 'fs-extra/esm';
4
5
  import knex from 'knex';
5
6
  import { readFileSync } from 'node:fs';
6
7
  import { createPrismaSchemaBuilder } from '@mrleebo/prisma-ast';
@@ -1003,8 +1004,8 @@ export interface ${schemaName} {
1003
1004
  }
1004
1005
  for (const [filePath, content] of Object.entries(results)) {
1005
1006
  const fullPath = path.resolve(filePath);
1006
- await fs.ensureDir(path.dirname(fullPath));
1007
- await fs.writeFile(fullPath, content);
1007
+ await ensureDir(path.dirname(fullPath));
1008
+ await writeFile(fullPath, content);
1008
1009
  if (!config.silent) {
1009
1010
  console.log(`Created: ${filePath}`);
1010
1011
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mutano",
3
3
  "type": "module",
4
- "version": "3.0.3",
4
+ "version": "3.0.4",
5
5
  "description": "Converts Prisma/MySQL/PostgreSQL/SQLite schemas to Zod/TS/Kysely interfaces",
6
6
  "author": "Alisson Cavalcante Agiani <thelinuxlich@gmail.com>",
7
7
  "license": "MIT",