@postxl/generator 0.49.0 → 0.49.1

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/dist/generator.js CHANGED
@@ -311,7 +311,15 @@ function generate({ models, enums, config, prismaClientPath, logger, }) {
311
311
  if (unfixedWarningCount === 0 && unfixableErrorCount === 0) {
312
312
  console.log(`LINT: All files linted successfully without warnings and errors!`);
313
313
  }
314
- const prettierConfig = yield prettier.resolveConfig(process.cwd());
314
+ let prettierConfig = null;
315
+ const prettierConfigFilePath = yield prettier.resolveConfigFile(process.cwd());
316
+ if (prettierConfigFilePath) {
317
+ console.log(`Found prettier config file at ${prettierConfigFilePath}!`);
318
+ prettierConfig = yield prettier.resolveConfig(prettierConfigFilePath);
319
+ }
320
+ if (!prettierConfig) {
321
+ console.log(`Formatting files with default prettier config!`);
322
+ }
315
323
  yield generated.formatUTF8Files(prettierConfig);
316
324
  // -------------------------------------------------------------------------
317
325
  // Merge with existing files.
package/dist/lib/vfs.js CHANGED
@@ -49,7 +49,7 @@ class ExtendedVirtualFS extends lock_1.VirtualFS {
49
49
  */
50
50
  formatUTF8Files(options = null) {
51
51
  return __awaiter(this, void 0, void 0, function* () {
52
- yield this.transformUTF8Files((path, content) => {
52
+ yield this.transformUTF8Files((path, content) => __awaiter(this, void 0, void 0, function* () {
53
53
  const ext = nodepath.extname(path);
54
54
  let parser = undefined;
55
55
  switch (ext) {
@@ -75,13 +75,13 @@ class ExtendedVirtualFS extends lock_1.VirtualFS {
75
75
  return content;
76
76
  }
77
77
  try {
78
- return prettier.format(content, Object.assign(Object.assign({}, options), { parser }));
78
+ return yield prettier.format(content, Object.assign(Object.assign({}, options), { parser }));
79
79
  }
80
80
  catch (err) {
81
81
  console.error(`${content}\n\nFailed to format ${path}\n\n`);
82
82
  throw err;
83
83
  }
84
- });
84
+ }));
85
85
  });
86
86
  }
87
87
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postxl/generator",
3
- "version": "0.49.0",
3
+ "version": "0.49.1",
4
4
  "main": "./dist/generator.js",
5
5
  "typings": "./dist/generator.d.ts",
6
6
  "bin": {
@@ -15,35 +15,36 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@faker-js/faker": "7.6.0",
18
- "@prisma/generator-helper": "^5.8.0",
19
- "@prisma/internals": "^5.8.0",
20
- "@typescript-eslint/eslint-plugin": "^6.10.0",
21
- "@typescript-eslint/parser": "^6.10.0",
22
- "@typescript-eslint/utils": "^6.10.0",
23
- "eslint": "^8.53.0",
24
- "eslint-plugin-simple-import-sort": "^10.0.0",
25
- "exceljs": "^4.3.0",
26
- "fast-glob": "^3.2.12",
27
- "prettier": "^3.0.3",
18
+ "@prisma/generator-helper": "5.8.1",
19
+ "@prisma/internals": "5.8.1",
20
+ "@typescript-eslint/eslint-plugin": "6.10.0",
21
+ "@typescript-eslint/parser": "6.10.0",
22
+ "@typescript-eslint/utils": "6.10.0",
23
+ "eslint": "8.53.0",
24
+ "eslint-plugin-simple-import-sort": "10.0.0",
25
+ "exceljs": "4.3.0",
26
+ "fast-glob": "3.2.12",
28
27
  "remeda": "1.9.4",
29
28
  "zod": "3.21.4",
30
29
  "@postxl/lock": "1.1.0"
31
30
  },
32
31
  "devDependencies": {
33
- "@prisma/client": "^5.8.0",
34
- "@types/eslint": "^8.44.7",
35
- "@types/jest": "^29.5.0",
32
+ "@prisma/client": "5.8.1",
33
+ "@types/eslint": "8.44.7",
34
+ "@types/jest": "29.5.0",
36
35
  "@types/node": "18.15.10",
37
36
  "jest": "29.7.0",
38
- "prisma": "5.8.0",
37
+ "prettier": "3.0.3",
38
+ "prisma": "5.8.1",
39
39
  "ts-jest": "29.0.5",
40
40
  "ts-node": "10.9.1",
41
- "ts-toolbelt": "^9.6.0",
41
+ "ts-toolbelt": "9.6.0",
42
42
  "tsconfig-paths": "4.1.2",
43
43
  "typescript": "5.2.2"
44
44
  },
45
45
  "peerDependencies": {
46
- "prisma": "5.8.0"
46
+ "prettier": "3.0.3",
47
+ "prisma": "5.8.1"
47
48
  },
48
49
  "wallaby": {
49
50
  "autoDetect": true