@ooneex/cli 1.20.1 → 1.20.2

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/index.js CHANGED
@@ -5545,7 +5545,7 @@ var package_default = `{
5545
5545
 
5546
5546
  // src/templates/module/test.txt
5547
5547
  var test_default = `import { describe, expect, test } from "bun:test";
5548
- import { {{NAME}}Module } from "@/{{NAME}}Module";
5548
+ import { {{NAME}}Module } from "@module/{{name}}/{{NAME}}Module";
5549
5549
 
5550
5550
  describe("{{NAME}}Module", () => {
5551
5551
  test("should have controllers array", () => {
@@ -5666,7 +5666,7 @@ class MakeModuleCommand {
5666
5666
  const testsDir = join5(moduleDir, "tests");
5667
5667
  const moduleContent = module_default.replace(/{{NAME}}/g, pascalName);
5668
5668
  const packageContent = package_default.replace(/{{NAME}}/g, kebabName);
5669
- const testContent = test_default.replace(/{{NAME}}/g, pascalName);
5669
+ const testContent = test_default.replace(/{{NAME}}/g, pascalName).replace(/{{name}}/g, kebabName);
5670
5670
  await Bun.write(join5(srcDir, `${pascalName}Module.ts`), moduleContent);
5671
5671
  if (!skipMigrations) {
5672
5672
  await Bun.write(join5(srcDir, "migrations", "migrations.ts"), "");
@@ -9551,7 +9551,7 @@ import { migrationCreate } from "@ooneex/migrations";
9551
9551
  var migration_up_default = `#!/usr/bin/env bun
9552
9552
 
9553
9553
  import { up } from "@ooneex/migrations";
9554
- import "@/migrations/migrations";
9554
+ import "@module/{{name}}/migrations/migrations";
9555
9555
 
9556
9556
  await up({
9557
9557
  databaseUrl: Bun.env.DATABASE_URL,
@@ -9580,7 +9580,7 @@ class MakeMigrationCommand {
9580
9580
  const binMigrationUpPath = join21(process.cwd(), base, "bin", "migration", "up.ts");
9581
9581
  const binMigrationUpFile = Bun.file(binMigrationUpPath);
9582
9582
  if (!await binMigrationUpFile.exists()) {
9583
- await Bun.write(binMigrationUpPath, migration_up_default);
9583
+ await Bun.write(binMigrationUpPath, migration_up_default.replace(/{{name}}/g, module ?? ""));
9584
9584
  }
9585
9585
  const logger = new TerminalLogger20;
9586
9586
  logger.success(`${filePath} created successfully`, undefined, {
@@ -13313,7 +13313,7 @@ import { SharedDatabase } from "@module/shared/databases/SharedDatabase";
13313
13313
  import { AppEnv } from "@ooneex/app-env";
13314
13314
  import { container } from "@ooneex/container";
13315
13315
  import { run } from "@ooneex/seeds";
13316
- import "@/seeds/seeds";
13316
+ import "@module/{{name}}/seeds/seeds";
13317
13317
 
13318
13318
  if (!container.has(AppEnv)) {
13319
13319
  container.add(AppEnv);
@@ -13351,7 +13351,7 @@ class MakeSeedCommand {
13351
13351
  const binSeedRunPath = join30(process.cwd(), base, "bin", "seed", "run.ts");
13352
13352
  const binSeedRunFile = Bun.file(binSeedRunPath);
13353
13353
  if (!await binSeedRunFile.exists()) {
13354
- await Bun.write(binSeedRunPath, seed_run_default);
13354
+ await Bun.write(binSeedRunPath, seed_run_default.replace(/{{name}}/g, module ?? ""));
13355
13355
  }
13356
13356
  const logger = new TerminalLogger26;
13357
13357
  logger.success(`${filePath} created successfully`, undefined, {
@@ -21239,4 +21239,4 @@ SeedRunCommand = __legacyDecorateClassTS([
21239
21239
  // src/index.ts
21240
21240
  await run();
21241
21241
 
21242
- //# debugId=D4DF0ABBA727352664756E2164756E21
21242
+ //# debugId=F644FC22050EAEC964756E2164756E21