prisma-laravel-migrate 3.1.19 → 3.1.20

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/cli/cli.js CHANGED
@@ -1102,11 +1102,10 @@ async function writeWithMerge(filePath, theirs, type, overwrite = true, currentP
1102
1102
  const readPath = currentPath ?? filePath;
1103
1103
  if (!overwrite && existsSync(filePath)) return;
1104
1104
  const doFormat = (code) => {
1105
- const globalCfg = getConfig(type);
1106
- const typeCfg = globalCfg ?? {};
1105
+ const typeCfg = getConfig(type);
1107
1106
  const usePrettier = !!typeCfg.prettier;
1108
1107
  if (!usePrettier || !code) return code;
1109
- const parser = typeCfg.parser ?? (type === "ts" ? "typescript" : "php");
1108
+ const parser = type == "typescript" ? "typescript" : "php";
1110
1109
  return prettify(code, {
1111
1110
  parser,
1112
1111
  filepathHint: filePath
@@ -3270,7 +3269,7 @@ async function generateTypesFromPrisma(options) {
3270
3269
  await writeWithMerge(
3271
3270
  enumsPath,
3272
3271
  enumsCode,
3273
- "ts",
3272
+ "typescript",
3274
3273
  cfg.overwriteExisting
3275
3274
  );
3276
3275
  }
@@ -3293,7 +3292,7 @@ async function generateTypesFromPrisma(options) {
3293
3292
  await writeWithMerge(
3294
3293
  mainPath,
3295
3294
  mainFile,
3296
- "ts",
3295
+ "typescript",
3297
3296
  cfg.overwriteExisting
3298
3297
  );
3299
3298
  }
@@ -3308,7 +3307,7 @@ async function generateTypesFromPrisma(options) {
3308
3307
  await writeWithMerge(
3309
3308
  filePath,
3310
3309
  code,
3311
- "ts",
3310
+ "typescript",
3312
3311
  cfg.overwriteExisting
3313
3312
  );
3314
3313
  });
@@ -1013,11 +1013,10 @@ async function writeWithMerge(filePath, theirs, type, overwrite = true, currentP
1013
1013
  const readPath = currentPath ?? filePath;
1014
1014
  if (!overwrite && existsSync(filePath)) return;
1015
1015
  const doFormat = (code) => {
1016
- const globalCfg = getConfig(type);
1017
- const typeCfg = globalCfg ?? {};
1016
+ const typeCfg = getConfig(type);
1018
1017
  const usePrettier = !!typeCfg.prettier;
1019
1018
  if (!usePrettier || !code) return code;
1020
- const parser = typeCfg.parser ?? ("php");
1019
+ const parser = "php";
1021
1020
  return prettify(code, {
1022
1021
  parser,
1023
1022
  filepathHint: filePath
@@ -1047,11 +1047,10 @@ async function writeWithMerge(filePath, theirs, type, overwrite = true, currentP
1047
1047
  const readPath = filePath;
1048
1048
  if (!overwrite && existsSync(filePath)) return;
1049
1049
  const doFormat = (code) => {
1050
- const globalCfg = getConfig(type);
1051
- const typeCfg = globalCfg ?? {};
1050
+ const typeCfg = getConfig(type);
1052
1051
  const usePrettier = !!typeCfg.prettier;
1053
1052
  if (!usePrettier || !code) return code;
1054
- const parser = typeCfg.parser ?? ("php");
1053
+ const parser = "php";
1055
1054
  return prettify(code, {
1056
1055
  parser,
1057
1056
  filepathHint: filePath
@@ -1541,11 +1541,10 @@ async function writeWithMerge(filePath, theirs, type, overwrite = true, currentP
1541
1541
  const readPath = filePath;
1542
1542
  if (!overwrite && existsSync(filePath)) return;
1543
1543
  const doFormat = (code) => {
1544
- const globalCfg = getConfig(type);
1545
- const typeCfg = globalCfg ?? {};
1544
+ const typeCfg = getConfig(type);
1546
1545
  const usePrettier = !!typeCfg.prettier;
1547
1546
  if (!usePrettier || !code) return code;
1548
- const parser = typeCfg.parser ?? ("typescript" );
1547
+ const parser = "typescript" ;
1549
1548
  return prettify(code, {
1550
1549
  parser,
1551
1550
  filepathHint: filePath
@@ -1724,7 +1723,7 @@ async function generateTypesFromPrisma(options) {
1724
1723
  await writeWithMerge(
1725
1724
  enumsPath,
1726
1725
  enumsCode,
1727
- "ts",
1726
+ "typescript",
1728
1727
  cfg.overwriteExisting
1729
1728
  );
1730
1729
  }
@@ -1747,7 +1746,7 @@ async function generateTypesFromPrisma(options) {
1747
1746
  await writeWithMerge(
1748
1747
  mainPath,
1749
1748
  mainFile,
1750
- "ts",
1749
+ "typescript",
1751
1750
  cfg.overwriteExisting
1752
1751
  );
1753
1752
  }
@@ -1762,7 +1761,7 @@ async function generateTypesFromPrisma(options) {
1762
1761
  await writeWithMerge(
1763
1762
  filePath,
1764
1763
  code,
1765
- "ts",
1764
+ "typescript",
1766
1765
  cfg.overwriteExisting
1767
1766
  );
1768
1767
  });
package/dist/index.js CHANGED
@@ -1166,11 +1166,10 @@ async function writeWithMerge(filePath, theirs, type, overwrite = true, currentP
1166
1166
  const readPath = currentPath ?? filePath;
1167
1167
  if (!overwrite && existsSync(filePath)) return;
1168
1168
  const doFormat = (code) => {
1169
- const globalCfg = getConfig(type);
1170
- const typeCfg = globalCfg ?? {};
1169
+ const typeCfg = getConfig(type);
1171
1170
  const usePrettier = !!typeCfg.prettier;
1172
1171
  if (!usePrettier || !code) return code;
1173
- const parser = typeCfg.parser ?? (type === "ts" ? "typescript" : "php");
1172
+ const parser = type == "typescript" ? "typescript" : "php";
1174
1173
  return prettify(code, {
1175
1174
  parser,
1176
1175
  filepathHint: filePath
@@ -3265,7 +3264,7 @@ async function generateTypesFromPrisma(options) {
3265
3264
  await writeWithMerge(
3266
3265
  enumsPath,
3267
3266
  enumsCode,
3268
- "ts",
3267
+ "typescript",
3269
3268
  cfg.overwriteExisting
3270
3269
  );
3271
3270
  }
@@ -3288,7 +3287,7 @@ async function generateTypesFromPrisma(options) {
3288
3287
  await writeWithMerge(
3289
3288
  mainPath,
3290
3289
  mainFile,
3291
- "ts",
3290
+ "typescript",
3292
3291
  cfg.overwriteExisting
3293
3292
  );
3294
3293
  }
@@ -3303,7 +3302,7 @@ async function generateTypesFromPrisma(options) {
3303
3302
  await writeWithMerge(
3304
3303
  filePath,
3305
3304
  code,
3306
- "ts",
3305
+ "typescript",
3307
3306
  cfg.overwriteExisting
3308
3307
  );
3309
3308
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prisma-laravel-migrate",
3
- "version": "3.1.19",
3
+ "version": "3.1.20",
4
4
  "description": "Generate laravel migrations and/or models using prisma files",
5
5
  "bin": {
6
6
  "prisma-laravel-migrations": "./dist/cli/migrator.index.js",