@3lineas/d1-orm 1.0.6 → 1.0.7

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/index.js CHANGED
@@ -101,7 +101,7 @@ export const down = async () => {
101
101
  const seederContent = `import { User } from '${path.relative(
102
102
  path.join(process.cwd(), "database/seeders"),
103
103
  path.join(process.cwd(), userModelsPath, "User")
104
- ).replace(/\\/g, "/")}';
104
+ ).replace(/\\/g, "/")}.ts';
105
105
 
106
106
  export const seed = async () => {
107
107
  await User.create({
@@ -268,7 +268,7 @@ async function makeSeeder(modelName, modelPath) {
268
268
  fs3.mkdirSync(seederDir, { recursive: true });
269
269
  }
270
270
  const relativeModelPath = path3.relative(seederDir, path3.join(process.cwd(), modelPath, modelName)).replace(/\\/g, "/");
271
- const template = `import { ${modelName} } from '${relativeModelPath}';
271
+ const template = `import { ${modelName} } from '${relativeModelPath}.ts';
272
272
 
273
273
  export const seed = async () => {
274
274
  // await ${modelName}.create({ ... });
@@ -612,9 +612,6 @@ async function migrateFresh(args2) {
612
612
  }
613
613
  }
614
614
  await migrate(args2);
615
- if (args2.includes("--seed")) {
616
- await seed(args2);
617
- }
618
615
  } catch (error) {
619
616
  console.error("Error during migrate:fresh:", error);
620
617
  }
@@ -84,7 +84,7 @@ export const down = async () => {
84
84
  const seederContent = `import { User } from '${path.relative(
85
85
  path.join(process.cwd(), "database/seeders"),
86
86
  path.join(process.cwd(), userModelsPath, "User")
87
- ).replace(/\\/g, "/")}';
87
+ ).replace(/\\/g, "/")}.ts';
88
88
 
89
89
  export const seed = async () => {
90
90
  await User.create({
@@ -259,7 +259,7 @@ async function makeSeeder(modelName, modelPath) {
259
259
  fs3.mkdirSync(seederDir, { recursive: true });
260
260
  }
261
261
  const relativeModelPath = path3.relative(seederDir, path3.join(process.cwd(), modelPath, modelName)).replace(/\\/g, "/");
262
- const template = `import { ${modelName} } from '${relativeModelPath}';
262
+ const template = `import { ${modelName} } from '${relativeModelPath}.ts';
263
263
 
264
264
  export const seed = async () => {
265
265
  // await ${modelName}.create({ ... });
@@ -506,9 +506,6 @@ async function migrateFresh(args) {
506
506
  }
507
507
  }
508
508
  await migrate(args);
509
- if (args.includes("--seed")) {
510
- await seed(args);
511
- }
512
509
  } catch (error) {
513
510
  console.error("Error during migrate:fresh:", error);
514
511
  }
@@ -517,7 +514,6 @@ var init_migrate_fresh = __esm({
517
514
  "src/cli/commands/migrate-fresh.ts"() {
518
515
  "use strict";
519
516
  init_migrate();
520
- init_seed();
521
517
  }
522
518
  });
523
519
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3lineas/d1-orm",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "A lightweight and powerful ORM for Cloudflare D1, inspired by Laravel Eloquent.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",