prisma-laravel-migrate 3.1.14 → 3.1.16

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
@@ -1195,7 +1195,7 @@ async function loadSharedConfig(schemaDir) {
1195
1195
  async function generateLaravelSchema(options) {
1196
1196
  const { dmmf, generator } = options;
1197
1197
  const raw = generator.config ?? {};
1198
- const schemaDir = path13.dirname(options.schemaPath);
1198
+ const schemaDir = path13.dirname(generator.sourceFilePath ?? path13.resolve(options.schemaPath));
1199
1199
  const shared = await loadSharedConfig(schemaDir);
1200
1200
  let groups = [];
1201
1201
  const loadGroups = async (p) => {
@@ -2257,7 +2257,7 @@ function buildModelContent(model) {
2257
2257
  async function generateLaravelModels(options) {
2258
2258
  const { dmmf, generator } = options;
2259
2259
  const raw = generator.config ?? {};
2260
- const schemaDir = path13.dirname(options.schemaPath);
2260
+ const schemaDir = path13.dirname(generator.sourceFilePath ?? path13.resolve(options.schemaPath));
2261
2261
  const shared = await loadSharedConfig(schemaDir);
2262
2262
  let groups = [];
2263
2263
  if (raw["groups"]) {
@@ -1164,7 +1164,7 @@ async function loadSharedConfig(schemaDir) {
1164
1164
  async function generateLaravelSchema(options) {
1165
1165
  const { dmmf, generator } = options;
1166
1166
  const raw = generator.config ?? {};
1167
- const schemaDir = path7.dirname(options.schemaPath);
1167
+ const schemaDir = path7.dirname(generator.sourceFilePath ?? path7.resolve(options.schemaPath));
1168
1168
  const shared = await loadSharedConfig(schemaDir);
1169
1169
  let groups = [];
1170
1170
  const loadGroups = async (p) => {
@@ -1263,7 +1263,7 @@ function buildModelContent(model) {
1263
1263
  async function generateLaravelModels(options) {
1264
1264
  const { dmmf, generator } = options;
1265
1265
  const raw = generator.config ?? {};
1266
- const schemaDir = path7.dirname(options.schemaPath);
1266
+ const schemaDir = path7.dirname(generator.sourceFilePath ?? path7.resolve(options.schemaPath));
1267
1267
  const shared = await loadSharedConfig(schemaDir);
1268
1268
  let groups = [];
1269
1269
  if (raw["groups"]) {
package/dist/index.js CHANGED
@@ -1317,7 +1317,7 @@ async function loadSharedConfig(schemaDir) {
1317
1317
  async function generateLaravelSchema(options) {
1318
1318
  const { dmmf, generator } = options;
1319
1319
  const raw = generator.config ?? {};
1320
- const schemaDir = path9.dirname(options.schemaPath);
1320
+ const schemaDir = path9.dirname(generator.sourceFilePath ?? path9.resolve(options.schemaPath));
1321
1321
  const shared = await loadSharedConfig(schemaDir);
1322
1322
  let groups = [];
1323
1323
  const loadGroups = async (p) => {
@@ -2252,7 +2252,7 @@ var PrismaToLaravelModelGenerator = class {
2252
2252
  async function generateLaravelModels(options) {
2253
2253
  const { dmmf, generator } = options;
2254
2254
  const raw = generator.config ?? {};
2255
- const schemaDir = path9.dirname(options.schemaPath);
2255
+ const schemaDir = path9.dirname(generator.sourceFilePath ?? path9.resolve(options.schemaPath));
2256
2256
  const shared = await loadSharedConfig(schemaDir);
2257
2257
  let groups = [];
2258
2258
  if (raw["groups"]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prisma-laravel-migrate",
3
- "version": "3.1.14",
3
+ "version": "3.1.16",
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",